1#! /bin/sh
2# Generated from testsuite.at by GNU Autoconf 2.69.
3#
4# Copyright (C) 2009-2012 Free Software Foundation, Inc.
5#
6# This test suite is free software; the Free Software Foundation gives
7# unlimited permission to copy, distribute and modify it.
8## -------------------- ##
9## M4sh Initialization. ##
10## -------------------- ##
11
12# Be more Bourne compatible
13DUALCASE=1; export DUALCASE # for MKS sh
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15  emulate sh
16  NULLCMD=:
17  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18  # is contrary to our usage.  Disable this feature.
19  alias -g '${1+"$@"}'='"$@"'
20  setopt NO_GLOB_SUBST
21else
22  case `(set -o) 2>/dev/null` in #(
23  *posix*) :
24    set -o posix ;; #(
25  *) :
26     ;;
27esac
28fi
29
30
31as_nl='
32'
33export as_nl
34# Printing a long string crashes Solaris 7 /usr/bin/printf.
35as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
37as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
38# Prefer a ksh shell builtin over an external printf program on Solaris,
39# but without wasting forks for bash or zsh.
40if test -z "$BASH_VERSION$ZSH_VERSION" \
41    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
42  as_echo='print -r --'
43  as_echo_n='print -rn --'
44elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='printf %s\n'
46  as_echo_n='printf %s'
47else
48  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50    as_echo_n='/usr/ucb/echo -n'
51  else
52    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53    as_echo_n_body='eval
54      arg=$1;
55      case $arg in #(
56      *"$as_nl"*)
57	expr "X$arg" : "X\\(.*\\)$as_nl";
58	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
59      esac;
60      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
61    '
62    export as_echo_n_body
63    as_echo_n='sh -c $as_echo_n_body as_echo'
64  fi
65  export as_echo_body
66  as_echo='sh -c $as_echo_body as_echo'
67fi
68
69# The user is always right.
70if test "${PATH_SEPARATOR+set}" != set; then
71  PATH_SEPARATOR=:
72  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
73    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
74      PATH_SEPARATOR=';'
75  }
76fi
77
78
79# IFS
80# We need space, tab and new line, in precisely that order.  Quoting is
81# there to prevent editors from complaining about space-tab.
82# (If _AS_PATH_WALK were called with IFS unset, it would disable word
83# splitting by setting IFS to empty value.)
84IFS=" ""	$as_nl"
85
86# Find who we are.  Look in the path if we contain no directory separator.
87as_myself=
88case $0 in #((
89  *[\\/]* ) as_myself=$0 ;;
90  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91for as_dir in $PATH
92do
93  IFS=$as_save_IFS
94  test -z "$as_dir" && as_dir=.
95    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
96  done
97IFS=$as_save_IFS
98
99     ;;
100esac
101# We did not find ourselves, most probably we were run as `sh COMMAND'
102# in which case we are not to be found in the path.
103if test "x$as_myself" = x; then
104  as_myself=$0
105fi
106if test ! -f "$as_myself"; then
107  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
108  exit 1
109fi
110
111# Unset variables that we do not need and which cause bugs (e.g. in
112# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
113# suppresses any "Segmentation fault" message there.  '((' could
114# trigger a bug in pdksh 5.2.14.
115for as_var in BASH_ENV ENV MAIL MAILPATH
116do eval test x\${$as_var+set} = xset \
117  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
118done
119PS1='$ '
120PS2='> '
121PS4='+ '
122
123# NLS nuisances.
124LC_ALL=C
125export LC_ALL
126LANGUAGE=C
127export LANGUAGE
128
129# CDPATH.
130(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
131
132if test "x$CONFIG_SHELL" = x; then
133  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
134  emulate sh
135  NULLCMD=:
136  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
137  # is contrary to our usage.  Disable this feature.
138  alias -g '\${1+\"\$@\"}'='\"\$@\"'
139  setopt NO_GLOB_SUBST
140else
141  case \`(set -o) 2>/dev/null\` in #(
142  *posix*) :
143    set -o posix ;; #(
144  *) :
145     ;;
146esac
147fi
148"
149  as_required="as_fn_return () { (exit \$1); }
150as_fn_success () { as_fn_return 0; }
151as_fn_failure () { as_fn_return 1; }
152as_fn_ret_success () { return 0; }
153as_fn_ret_failure () { return 1; }
154
155exitcode=0
156as_fn_success || { exitcode=1; echo as_fn_success failed.; }
157as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
158as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
159as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
160if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
161
162else
163  exitcode=1; echo positional parameters were not saved.
164fi
165test x\$exitcode = x0 || exit 1
166test -x / || exit 1"
167  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
168  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
169  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
170  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
171test \$(( 1 + 1 )) = 2 || exit 1"
172  if (eval "$as_required") 2>/dev/null; then :
173  as_have_required=yes
174else
175  as_have_required=no
176fi
177  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
178
179else
180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
181as_found=false
182for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
183do
184  IFS=$as_save_IFS
185  test -z "$as_dir" && as_dir=.
186  as_found=:
187  case $as_dir in #(
188	 /*)
189	   for as_base in sh bash ksh sh5; do
190	     # Try only shells that exist, to save several forks.
191	     as_shell=$as_dir/$as_base
192	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
193		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
194  CONFIG_SHELL=$as_shell as_have_required=yes
195		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
196  break 2
197fi
198fi
199	   done;;
200       esac
201  as_found=false
202done
203$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
204	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
205  CONFIG_SHELL=$SHELL as_have_required=yes
206fi; }
207IFS=$as_save_IFS
208
209
210      if test "x$CONFIG_SHELL" != x; then :
211  export CONFIG_SHELL
212             # We cannot yet assume a decent shell, so we have to provide a
213# neutralization value for shells without unset; and this also
214# works around shells that cannot unset nonexistent variables.
215# Preserve -v and -x to the replacement shell.
216BASH_ENV=/dev/null
217ENV=/dev/null
218(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
219case $- in # ((((
220  *v*x* | *x*v* ) as_opts=-vx ;;
221  *v* ) as_opts=-v ;;
222  *x* ) as_opts=-x ;;
223  * ) as_opts= ;;
224esac
225exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
226# Admittedly, this is quite paranoid, since all the known shells bail
227# out after a failed `exec'.
228$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
229exit 255
230fi
231
232    if test x$as_have_required = xno; then :
233  $as_echo "$0: This script requires a shell more modern than all"
234  $as_echo "$0: the shells that I found on your system."
235  if test x${ZSH_VERSION+set} = xset ; then
236    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
237    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
238  else
239    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
240$0: including any error possibly output before this
241$0: message. Then install a modern shell, or manually run
242$0: the script under such a shell if you do have one."
243  fi
244  exit 1
245fi
246fi
247fi
248SHELL=${CONFIG_SHELL-/bin/sh}
249export SHELL
250# Unset more variables known to interfere with behavior of common tools.
251CLICOLOR_FORCE= GREP_OPTIONS=
252unset CLICOLOR_FORCE GREP_OPTIONS
253
254## --------------------- ##
255## M4sh Shell Functions. ##
256## --------------------- ##
257# as_fn_unset VAR
258# ---------------
259# Portably unset VAR.
260as_fn_unset ()
261{
262  { eval $1=; unset $1;}
263}
264as_unset=as_fn_unset
265
266# as_fn_set_status STATUS
267# -----------------------
268# Set $? to STATUS, without forking.
269as_fn_set_status ()
270{
271  return $1
272} # as_fn_set_status
273
274# as_fn_exit STATUS
275# -----------------
276# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
277as_fn_exit ()
278{
279  set +e
280  as_fn_set_status $1
281  exit $1
282} # as_fn_exit
283
284# as_fn_mkdir_p
285# -------------
286# Create "$as_dir" as a directory, including parents if necessary.
287as_fn_mkdir_p ()
288{
289
290  case $as_dir in #(
291  -*) as_dir=./$as_dir;;
292  esac
293  test -d "$as_dir" || eval $as_mkdir_p || {
294    as_dirs=
295    while :; do
296      case $as_dir in #(
297      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
298      *) as_qdir=$as_dir;;
299      esac
300      as_dirs="'$as_qdir' $as_dirs"
301      as_dir=`$as_dirname -- "$as_dir" ||
302$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
303	 X"$as_dir" : 'X\(//\)[^/]' \| \
304	 X"$as_dir" : 'X\(//\)$' \| \
305	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
306$as_echo X"$as_dir" |
307    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
308	    s//\1/
309	    q
310	  }
311	  /^X\(\/\/\)[^/].*/{
312	    s//\1/
313	    q
314	  }
315	  /^X\(\/\/\)$/{
316	    s//\1/
317	    q
318	  }
319	  /^X\(\/\).*/{
320	    s//\1/
321	    q
322	  }
323	  s/.*/./; q'`
324      test -d "$as_dir" && break
325    done
326    test -z "$as_dirs" || eval "mkdir $as_dirs"
327  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
328
329
330} # as_fn_mkdir_p
331
332# as_fn_executable_p FILE
333# -----------------------
334# Test if FILE is an executable regular file.
335as_fn_executable_p ()
336{
337  test -f "$1" && test -x "$1"
338} # as_fn_executable_p
339# as_fn_append VAR VALUE
340# ----------------------
341# Append the text in VALUE to the end of the definition contained in VAR. Take
342# advantage of any shell optimizations that allow amortized linear growth over
343# repeated appends, instead of the typical quadratic growth present in naive
344# implementations.
345if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
346  eval 'as_fn_append ()
347  {
348    eval $1+=\$2
349  }'
350else
351  as_fn_append ()
352  {
353    eval $1=\$$1\$2
354  }
355fi # as_fn_append
356
357# as_fn_arith ARG...
358# ------------------
359# Perform arithmetic evaluation on the ARGs, and store the result in the
360# global $as_val. Take advantage of shells that can avoid forks. The arguments
361# must be portable across $(()) and expr.
362if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
363  eval 'as_fn_arith ()
364  {
365    as_val=$(( $* ))
366  }'
367else
368  as_fn_arith ()
369  {
370    as_val=`expr "$@" || test $? -eq 1`
371  }
372fi # as_fn_arith
373
374
375# as_fn_error STATUS ERROR [LINENO LOG_FD]
376# ----------------------------------------
377# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
378# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
379# script with STATUS, using 1 if that was 0.
380as_fn_error ()
381{
382  as_status=$1; test $as_status -eq 0 && as_status=1
383  if test "$4"; then
384    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
385    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
386  fi
387  $as_echo "$as_me: error: $2" >&2
388  as_fn_exit $as_status
389} # as_fn_error
390
391if expr a : '\(a\)' >/dev/null 2>&1 &&
392   test "X`expr 00001 : '.*\(...\)'`" = X001; then
393  as_expr=expr
394else
395  as_expr=false
396fi
397
398if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
399  as_basename=basename
400else
401  as_basename=false
402fi
403
404as_me=`$as_basename -- "$0" ||
405$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
406	 X"$0" : 'X\(//\)$' \| \
407	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
408$as_echo X/"$0" |
409    sed '/^.*\/\([^/][^/]*\)\/*$/{
410	    s//\1/
411	    q
412	  }
413	  /^X\/\(\/\/\)$/{
414	    s//\1/
415	    q
416	  }
417	  /^X\/\(\/\).*/{
418	    s//\1/
419	    q
420	  }
421	  s/.*/./; q'`
422
423if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
424  as_dirname=dirname
425else
426  as_dirname=false
427fi
428
429# Avoid depending upon Character Ranges.
430as_cr_letters='abcdefghijklmnopqrstuvwxyz'
431as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
432as_cr_Letters=$as_cr_letters$as_cr_LETTERS
433as_cr_digits='0123456789'
434as_cr_alnum=$as_cr_Letters$as_cr_digits
435
436
437  as_lineno_1=$LINENO as_lineno_1a=$LINENO
438  as_lineno_2=$LINENO as_lineno_2a=$LINENO
439  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
440  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
441  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
442  sed -n '
443    p
444    /[$]LINENO/=
445  ' <$as_myself |
446    sed '
447      s/[$]LINENO.*/&-/
448      t lineno
449      b
450      :lineno
451      N
452      :loop
453      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
454      t loop
455      s/-\n.*//
456    ' >$as_me.lineno &&
457  chmod +x "$as_me.lineno" ||
458    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
459
460  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
461  # already done that, so ensure we don't try to do so again and fall
462  # in an infinite loop.  This has already happened in practice.
463  _as_can_reexec=no; export _as_can_reexec
464  # Don't try to exec as it changes $[0], causing all sort of problems
465  # (the dirname of $[0] is not the place where we might find the
466  # original and so on.  Autoconf is especially sensitive to this).
467  . "./$as_me.lineno"
468  # Exit status is that of the last command.
469  exit
470}
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in #(((((
474-n*)
475  case `echo 'xy\c'` in
476  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
477  xy)  ECHO_C='\c';;
478  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
479       ECHO_T='	';;
480  esac;;
481*)
482  ECHO_N='-n';;
483esac
484
485rm -f conf$$ conf$$.exe conf$$.file
486if test -d conf$$.dir; then
487  rm -f conf$$.dir/conf$$.file
488else
489  rm -f conf$$.dir
490  mkdir conf$$.dir 2>/dev/null
491fi
492if (echo >conf$$.file) 2>/dev/null; then
493  if ln -s conf$$.file conf$$ 2>/dev/null; then
494    as_ln_s='ln -s'
495    # ... but there are two gotchas:
496    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
497    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
498    # In both cases, we have to default to `cp -pR'.
499    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
500      as_ln_s='cp -pR'
501  elif ln conf$$.file conf$$ 2>/dev/null; then
502    as_ln_s=ln
503  else
504    as_ln_s='cp -pR'
505  fi
506else
507  as_ln_s='cp -pR'
508fi
509rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
510rmdir conf$$.dir 2>/dev/null
511
512if mkdir -p . 2>/dev/null; then
513  as_mkdir_p='mkdir -p "$as_dir"'
514else
515  test -d ./-p && rmdir ./-p
516  as_mkdir_p=false
517fi
518
519as_test_x='test -x'
520as_executable_p=as_fn_executable_p
521
522# Sed expression to map a string onto a valid CPP name.
523as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
524
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529
530
531
532SHELL=${CONFIG_SHELL-/bin/sh}
533
534# How were we run?
535at_cli_args="$@"
536
537
538# Not all shells have the 'times' builtin; the subshell is needed to make
539# sure we discard the 'times: not found' message from the shell.
540at_times_p=false
541(times) >/dev/null 2>&1 && at_times_p=:
542
543# CLI Arguments to pass to the debugging scripts.
544at_debug_args=
545# -e sets to true
546at_errexit_p=false
547# Shall we be verbose?  ':' means no, empty means yes.
548at_verbose=:
549at_quiet=
550# Running several jobs in parallel, 0 means as many as test groups.
551at_jobs=1
552at_traceon=:
553at_trace_echo=:
554at_check_filter_trace=:
555
556# Shall we keep the debug scripts?  Must be `:' when the suite is
557# run by a debug script, so that the script doesn't remove itself.
558at_debug_p=false
559# Display help message?
560at_help_p=false
561# Display the version message?
562at_version_p=false
563# List test groups?
564at_list_p=false
565# --clean
566at_clean=false
567# Test groups to run
568at_groups=
569# Whether to rerun failed tests.
570at_recheck=
571# Whether a write failure occurred
572at_write_fail=0
573
574# The directory we run the suite in.  Default to . if no -C option.
575at_dir=`pwd`
576# An absolute reference to this testsuite script.
577case $as_myself in
578  [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
579  * ) at_myself=$at_dir/$as_myself ;;
580esac
581# Whether -C is in effect.
582at_change_dir=false
583
584# Whether to enable colored test results.
585at_color=no
586# List of the tested programs.
587at_tested='tar'
588# As many question marks as there are digits in the last test group number.
589# Used to normalize the test group numbers so that `ls' lists them in
590# numerical order.
591at_format='???'
592# Description of all the test groups.
593at_help_all="1;version.at:19;tar version;;
5942;pipe.at:29;decompressing from stdin;pipe;
5953;options.at:24;mixing options;options options00;
5964;options02.at:26;interspersed options;options options02;
5975;options03.at:21;TAR_OPTIONS with string arguments;options options03;
5986;opcomp01.at:21;occurrence compatibility;opcomp opcomp01;
5997;opcomp02.at:21;occurrence compatibility;opcomp opcomp02;
6008;opcomp03.at:21;--verify compatibility;opcomp opcomp03;
6019;opcomp04.at:21;compress option compatibility;opcomp opcomp04;
60210;opcomp05.at:21;--pax-option compatibility;opcomp opcomp05;
60311;opcomp06.at:21;--pax-option compatibility;opcomp opcomp06;
60412;defaults.at:16;checkpoint defaults;checkpoint checkpoint/defaults;
60513;interval.at:16;checkpoint interval;checkpoint checkpoint/interval;
60614;dot.at:16;dot action;checkpoint checkpoint/dot;
60715;dot-compat.at:16;dot action (compatibility syntax);checkpoint checkpoint/dot-compat;
60816;dot-int.at:16;dot action and interval;checkpoint checkpoint/dot-int;
60917;testsuite.at:242;compress: gzip;compression compress-gzip gzip;
61018;testsuite.at:243;compress: bzip2;compression compress-bzip2 bzip2;
61119;testsuite.at:244;compress: xz;compression compress-xz xz;
61220;testsuite.at:246;compress: lzip;compression compress-lzip lzip;
61321;testsuite.at:247;compress: lzop;compression compress-lzop lzop;
61422;testsuite.at:248;compress: zstd;compression compress-zstd zstd;
61523;positional01.at:21;Exclude;options positional positional01 exclude;
61624;positional02.at:21;Directory;options positional positional02 directory chdir;
61725;positional03.at:21;Several options;options positional positional03 chdir;
61826;add-file.at:21;The --add-file option;add-file;
61927;T-mult.at:21;multiple file lists;files-from t-mult;
62028;T-nest.at:21;nested file lists;files-from t-nest;
62129;T-rec.at:21;recursive file lists;files-from t-rec;
62230;T-recurse.at:27;files-from & recurse: toggle;recurse t-recurse files-from;
62331;T-recurse.at:66;toggle --recursion (not) from -T;recurse t-recurse t-recurse2 files-from;
62432;T-cd.at:21;-C in file lists;files-from t-cd chdir;
62533;T-empty.at:26;empty entries;files-from empty-line;
62634;T-null.at:21;0-separated file without -0;files-from null t-null;
62735;T-null2.at:17;--null enables verbatim reading;files-from null t-null2 t-verbatim;
62836;T-zfile.at:26;empty file;files-from empty-file;
62937;T-nonl.at:27;entries with missing newlines;files-from nonewline nonl t-nonl;
63038;T-dir00.at:28;recursive extraction from --files-from;files-from extract t-dir t-dir00;
63139;T-dir01.at:28;trailing slash in --files-from;files-from extract t-dir t-dir01;
63240;indexfile.at:26;tar --index-file=FILE --file=-;stdout indexfile;
63341;verbose.at:26;tar cvf -;stdout verbose;
63442;gzip.at:23;gzip;gzip;
63543;recurse.at:21;recurse;recurse;
63644;recurs02.at:30;recurse: toggle;recurse options recurse02;
63745;shortrec.at:25;short records;shortrec;
63846;numeric.at:18;--numeric-owner basic tests;options numeric numeric-owner;
63947;same-order01.at:26;working -C with --same-order;same-order same-order01 chdir;
64048;same-order02.at:25;multiple -C options;same-order same-order02 chdir;
64149;append.at:21;append;append append00;
64250;append01.at:29;appending files with long names;append append01;
64351;append02.at:54;append vs. create;append append02 append-gnu;
64452;append03.at:21;append with name transformation;append append03;
64553;append04.at:29;append with verify;append append04 verify append-verify;
64654;append05.at:32;append after changed blocking;append append05 blocking;
64755;xform-h.at:30;transforming hard links on create;transform xform xform-h;
64856;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume;
64957;xform02.at:21;transforming escaped delimiters on create;transform xform delimiter;
65058;xform03.at:21;transforming hard link targets;transform xform link;
65159;exclude.at:23;exclude;exclude;
65260;exclude01.at:19;exclude wildcards;exclude exclude01;
65361;exclude02.at:19;exclude: anchoring;exclude exclude02;
65462;exclude03.at:19;exclude: wildcards match slash;exclude exclude03;
65563;exclude04.at:19;exclude: case insensitive;exclude exclude04;
65664;exclude05.at:21;exclude: lots of excludes;exclude exclude05;
65765;exclude06.at:26;exclude: long files in pax archives;exclude exclude06 chdir;
65866;exclude07.at:19;exclude: --exclude-backups option;exclude exclude07;
65967;exclude08.at:36;--exclude-tag option;exclude exclude-tag exclude08;
66068;exclude09.at:37;--exclude-tag option and --listed-incremental;exclude exclude-tag listed incremental exclude09;
66169;exclude10.at:38;--exclude-tag option in incremental pass;exclude exclude-tag listed incremental exclude10;
66270;exclude11.at:36;--exclude-tag-under option;exclude exclude-tag exclude-tag-under exclude11;
66371;exclude12.at:37;--exclude-tag-under and --listed-incremental;exclude exclude-tag exclude-tag-under listed incremental exclude12;
66472;exclude13.at:39;--exclude-tag-under option in incremental pass;exclude exclude-tag exclude-tag-under listed incremental exclude13;
66573;exclude14.at:36;--exclude-tag-all option;exclude exclude-tag exclude-tag-all exclude14;
66674;exclude15.at:36;--exclude-tag-all and --listed-incremental;exclude exclude-tag exclude-tag-all listed incremental exclude15;
66775;exclude16.at:38;--exclude-tag-all option in incremental pass;exclude exclude-tag exclude-tag-all listed incremental exclude16;
66876;delete01.at:23;deleting a member after a big one;delete delete01;
66977;delete02.at:23;deleting a member from stdin archive;delete delete02;
67078;delete03.at:21;deleting members with long names;delete delete03;
67179;delete04.at:23;deleting a large last member;delete delete04;
67280;delete05.at:27;deleting non-existing member;delete delete05;
67381;extrac01.at:23;extract over an existing directory;extract extract01;
67482;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink;
67583;extrac03.at:23;extraction loops;extract extract03;
67684;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch;
67785;extrac05.at:30;extracting selected members from pax;extract extract05;
67886;extrac06.at:34;mode of extracted directories;extract extract06 directory mode;
67987;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink chdir;
68088;extrac08.at:33;restoring mode on existing directory;extract extrac08;
68189;extrac09.at:34;extracting even when . and .. are unreadable;extract extrac09 chdir;
68290;extrac10.at:29;-C and delayed setting of metadata;extract extrac10 chdir;
68391;extrac11.at:25;scarce file descriptors;extract extrac11 chdir;
68492;extrac12.at:25;extract dot permissions;extract extrac12 chdir;
68593;extrac13.at:26;extract over symlinks;extract extrac13 chdir;
68694;extrac14.at:25;extract -C symlink;extract extrac14 chdir;
68795;extrac15.at:25;extract parent mkdir failure;extract extrac15 chdir;
68896;extrac16.at:26;extract empty directory with -C;extract extrac16 chdir;
68997;extrac17.at:21;name matching/transformation ordering;extract extrac17 chdir;
69098;extrac18.at:34;keep-old-files;extract extrac18 old-files keep-old-files;
69199;extrac19.at:21;skip-old-files;extract extrac19 old-files skip-old-files;
692100;extrac20.at:21;keep-directory-symlink;extrac20 extract old-files keep-old-files;
693101;extrac21.at:31;delay-directory-restore;extract extract21 read-only symlink delay-directory-restore;
694102;extrac22.at:19;delay-directory-restore on reversed ordering;extract extrac22 delay delay-reversed;
695103;extrac23.at:18;--no-overwrite-dir;extract extrac23 no-overwrite-dir;
696104;extrac24.at:18;--to-stdout;extract extrac24 to-stdout;
697105;backup01.at:33;extracting existing dir with --backup;extract backup backup01;
698106;difflink.at:17;link mismatch;diff difflink;
699107;label01.at:21;single-volume label;label label01;
700108;label02.at:21;multi-volume label;label label02 multi-label multivolume multiv;
701109;label03.at:27;test-label option;label label03 test-label;
702110;label04.at:27;label with non-create option;label label04;
703111;label05.at:24;label with non-create option;label label05;
704112;incremental.at:23;incremental;incremental listed incr00;
705113;incr01.at:27;restore broken symlinks from incremental;incremental incr01;
706114;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02;
707115;listed01.at:26;--listed for individual files;listed incremental listed01;
708116;listed02.at:28;working --listed;listed incremental listed02;
709117;listed03.at:24;incremental dump when the parent directory is unreadable;listed incremental listed03;
710118;listed04.at:26;--listed-incremental and --one-file-system;listed incremental listed04;
711119;listed05.at:33;--listed-incremental and remounted directories;listed incremental listed05 chdir;
712120;incr03.at:28;renamed files in incrementals;incremental incr03 rename;
713121;incr04.at:29;proper icontents initialization;incremental incr04 icontents;
714122;incr05.at:21;incremental dumps with -C;incremental incr05 chdir;
715123;incr06.at:21;incremental dumps of nested directories;incremental incr06 chdir;
716124;incr07.at:18;incremental restores with -C;incremental extract incr07 chdir;
717125;incr08.at:38;filename normalization;incremental create incr08 chdir;
718126;incr09.at:26;incremental with alternating -C;incremental create incr09 chdir;
719127;incr10.at:18;concatenated incremental archives (deletes);incremental concat cat incr10 chdir;
720128;incr11.at:25;concatenated incremental archives (renames);incremental concat cat incr11 chdir;
721129;filerem01.at:36;file removed as we read it;create incremental listed filechange filerem filerem01;
722130;filerem02.at:26;toplevel file removed;create incremental listed filechange filerem filerem02;
723131;dirrem01.at:38;directory removed before reading;create incremental listed dirchange dirrem dirrem01;
724132;dirrem02.at:31;explicitly named directory removed before reading;create incremental listed dirchange dirrem dirrem02;
725133;rename01.at:24;renamed dirs in incrementals;incremental rename rename01;
726134;rename02.at:24;move between hierarchies;incremental rename rename02;
727135;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename;
728136;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename;
729137;rename05.at:24;renamed subdirectories;incremental rename05 rename;
730138;rename06.at:19;chained renames;incremental rename06 rename;
731139;chtype.at:27;changed file types in incrementals;incremental listed chtype;
732140;ignfail.at:23;ignfail;ignfail;
733141;link01.at:33;link count gt 2;hardlinks link01;
734142;link02.at:32;preserve hard links with --remove-files;hardlinks link02;
735143;link03.at:24;working -l with --remove-files;hardlinks link03;
736144;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04;
737145;longv7.at:24;long names in V7 archives;longname longv7;
738146;long01.at:28;long file names divisible by block size;longname long512;
739147;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01;
740148;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02;
741149;lustar03.at:21;ustar: splitting long names;longname ustar lustar03;
742150;old.at:23;old archives;old;
743151;time01.at:20;time: tricky time stamps;time time01;
744152;time02.at:20;time: clamping mtime;time time02;
745153;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01 chdir;
746154;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02;
747155;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03;
748156;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental listed multiv04;
749157;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync;
750158;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06;
751159;multiv07.at:28;volumes split at an extended header;multivolume multiv multiv07 xsplit;
752160;multiv08.at:25;multivolume header creation;multivolume multiv multiv08;
753161;multiv09.at:26;bad next volume;multivolume multiv multiv09;
754162;multiv10.at:37;file start at the beginning of a posix volume;multivolume multiv multiv10;
755163;owner.at:21;--owner and --group;owner;
756164;map.at:21;--owner-map and --group-map;owner map;
757165;sparse01.at:21;sparse files;sparse sparse01;
758166;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02;
759167;sparse03.at:21;storing sparse files > 8G;sparse sparse03 largefile;
760168;sparse04.at:21;storing long sparse file names;sparse sparse04;
761169;sparse05.at:21;listing sparse files bigger than 2^33 B;sparse sparse05 largefile;
762170;sparse06.at:21;storing sparse file using seek method;sparse sparse06 chdir;
763171;sparse07.at:21;sparse files with unicode names;sparse sparse07 unicode;
764172;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv;
765173;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00;
766174;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01;
767175;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10;
768176;sptrcreat.at:33;sparse file truncated while archiving;truncate filechange sparse sptr sptrcreat;
769177;sptrdiff00.at:26;file truncated in sparse region while comparing;truncate filechange sparse sptr sptrdiff diff;
770178;sptrdiff01.at:26;file truncated in data region while comparing;truncate filechange sparse sptr sptrdiff diff;
771179;update.at:28;update unchanged directories;update update00;
772180;update01.at:29;update directories;update update01;
773181;update02.at:26;update changed files;update update02;
774182;update03.at:20;update with chdir;update update03 chdir;
775183;verify.at:25;verify;verify;
776184;volume.at:23;volume;volume volcheck;
777185;volsize.at:29;volume header size;volume volsize;
778186;comprec.at:21;compressed format recognition;comprec;
779187;shortfile.at:26;short input files;shortfile shortfile0;
780188;shortupd.at:31;updating short archives;shortfile shortfile1 shortupd;
781189;truncate.at:29;truncate;truncate filechange;
782190;grow.at:24;grow;grow filechange;
783191;sigpipe.at:21;sigpipe handling;sigpipe;
784192;comperr.at:18;compressor program failure;compress comperr;
785193;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip;
786194;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip;
787195;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03;
788196;remfiles04a.at:25;remove-files with -C:rel in -c/non-incr. mode;create remove-files remfiles04 remfiles04a chdir;
789197;remfiles04b.at:33;remove-files with -C:rel in -c/incr. mode;create incremental remove-files remfiles04 remfiles04b chdir;
790198;remfiles04c.at:33;remove-files with -C:rel in -r mode;create append remove-files remfiles04 remfiles04c chdir;
791199;remfiles05a.at:34;remove-files with -C:rel,rel in -c/non-incr. mode;create remove-files remfiles05 remfiles05a chdir;
792200;remfiles05b.at:25;remove-files with -C:rel,rel in -c/incr. mode;create incremental remove-files remfiles05 remfiles05b chdir;
793201;remfiles05c.at:25;remove-files with -C:rel,rel in -r mode;create append remove-files remfiles05 remfiles05c chdir;
794202;remfiles06a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles06 remfiles06a chdir;
795203;remfiles06b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles06 remfiles06b chdir;
796204;remfiles06c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles06 remfiles06c chdir;
797205;remfiles07a.at:25;remove-files with -C:abs,rel in -c/non-incr. mode;create remove-files remfiles07 remfiles07a chdir;
798206;remfiles07b.at:25;remove-files with -C:abs,rel in -c/incr. mode;create incremental remove-files remfiles07 remfiles07b chdir;
799207;remfiles07c.at:25;remove-files with -C:abs,rel in -r mode;create append remove-files remfiles07 remfiles07c chdir;
800208;remfiles08a.at:28;remove-files deleting two subdirs in -c/non-incr. mode;create remove-files remfiles08 remfiles08a chdir;
801209;remfiles08b.at:31;remove-files deleting two subdirs in -c/incr. mode;create incremental remove-files remfiles08 remfiles08b chdir;
802210;remfiles08c.at:28;remove-files deleting two subdirs in -r mode;create append remove-files remfiles08 remfiles08c chdir;
803211;remfiles09a.at:25;remove-files on full directory in -c/non-incr. mode;create remove-files remfiles09 remfiles09a;
804212;remfiles09b.at:29;remove-files on full directory in -c/incr. mode;create incremental remove-files remfiles09 remfiles09b;
805213;remfiles09c.at:25;remove-files on full directory in -r mode;create append remove-files remfiles09 remfiles09c;
806214;remfiles10.at:20;remove-files;create remove-files remfiles10;
807215;xattr01.at:25;xattrs: basic functionality;xattrs xattr01;
808216;xattr02.at:25;xattrs: change directory with -C option;xattrs xattr02 chdir;
809217;xattr03.at:25;xattrs: trusted.* attributes;xattrs xattr03 chdir;
810218;xattr04.at:26;xattrs: s/open/openat/ regression;xattrs xattr04 chdir;
811219;xattr05.at:28;xattrs: keywords with '=' and '%';xattrs xattr05 chdir;
812220;xattr06.at:27;xattrs: exclude xattrs on create ;xattrs xattr06;
813221;xattr07.at:26;xattrs: xattrs and --skip-old-files;xattrs xattr07;
814222;acls01.at:25;acls: basic functionality;xattrs acls acls01;
815223;acls02.at:25;acls: work with -C;xattrs acls acls02 chdir;
816224;acls03.at:30;acls: default ACLs;xattrs acls acls03 chdir;
817225;selnx01.at:25;selinux: basic store/restore;xattrs selinux selnx01;
818226;selacl01.at:25;acls/selinux: special files & fifos;xattrs selinux acls selacls01;
819227;capabs_raw01.at:25;capabilities: binary store/restore;xattrs capabilities capabs_raw01;
820228;onetop01.at:21;tar --one-top-level;extract onetop onetop01;
821229;onetop02.at:21;tar --one-top-level --show-transformed;extract onetop onetop02;
822230;onetop03.at:21;tar --one-top-level --transform;extract onetop onetop03;
823231;onetop04.at:21;tar --one-top-level --transform;extract onetop onetop04;
824232;onetop05.at:21;tar --one-top-level restoring permissions;extract onetop onetop05 chdir;
825233;gtarfail.at:21;gtarfail;star gtarfail;
826234;gtarfail2.at:21;gtarfail2;star gtarfail2;
827235;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail;
828236;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g largefile;
829237;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g largefile;
830238;pax-big-10g.at:21;pax-big-10g;star pax-big-10g largefile;
831"
832# List of the all the test groups.
833at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
834
835# at_fn_validate_ranges NAME...
836# -----------------------------
837# Validate and normalize the test group number contained in each variable
838# NAME. Leading zeroes are treated as decimal.
839at_fn_validate_ranges ()
840{
841  for at_grp
842  do
843    eval at_value=\$$at_grp
844    if test $at_value -lt 1 || test $at_value -gt 238; then
845      $as_echo "invalid test group: $at_value" >&2
846      exit 1
847    fi
848    case $at_value in
849      0*) # We want to treat leading 0 as decimal, like expr and test, but
850	  # AS_VAR_ARITH treats it as octal if it uses $(( )).
851	  # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
852	  # expr fork, but it is not worth the effort to determine if the
853	  # shell supports XSI when the user can just avoid leading 0.
854	  eval $at_grp='`expr $at_value + 0`' ;;
855    esac
856  done
857}
858
859at_prev=
860for at_option
861do
862  # If the previous option needs an argument, assign it.
863  if test -n "$at_prev"; then
864    at_option=$at_prev=$at_option
865    at_prev=
866  fi
867
868  case $at_option in
869  *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
870  *)    at_optarg= ;;
871  esac
872
873  # Accept the important Cygnus configure options, so we can diagnose typos.
874
875  case $at_option in
876    --help | -h )
877	at_help_p=:
878	;;
879
880    --list | -l )
881	at_list_p=:
882	;;
883
884    --version | -V )
885	at_version_p=:
886	;;
887
888    --clean | -c )
889	at_clean=:
890	;;
891
892    --color )
893	at_color=always
894	;;
895    --color=* )
896	case $at_optarg in
897	no | never | none) at_color=never ;;
898	auto | tty | if-tty) at_color=auto ;;
899	always | yes | force) at_color=always ;;
900	*) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
901	   as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
902	esac
903	;;
904
905    --debug | -d )
906	at_debug_p=:
907	;;
908
909    --errexit | -e )
910	at_debug_p=:
911	at_errexit_p=:
912	;;
913
914    --verbose | -v )
915	at_verbose=; at_quiet=:
916	;;
917
918    --trace | -x )
919	at_traceon='set -x'
920	at_trace_echo=echo
921	at_check_filter_trace=at_fn_filter_trace
922	;;
923
924    [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
925	at_fn_validate_ranges at_option
926	as_fn_append at_groups "$at_option$as_nl"
927	;;
928
929    # Ranges
930    [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
931	at_range_start=`echo $at_option |tr -d X-`
932	at_fn_validate_ranges at_range_start
933	at_range=`$as_echo "$at_groups_all" | \
934	  sed -ne '/^'$at_range_start'$/,$p'`
935	as_fn_append at_groups "$at_range$as_nl"
936	;;
937
938    -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
939	at_range_end=`echo $at_option |tr -d X-`
940	at_fn_validate_ranges at_range_end
941	at_range=`$as_echo "$at_groups_all" | \
942	  sed -ne '1,/^'$at_range_end'$/p'`
943	as_fn_append at_groups "$at_range$as_nl"
944	;;
945
946    [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
947    [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
948    [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
949    [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
950    [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
951    [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
952	at_range_start=`expr $at_option : '\(.*\)-'`
953	at_range_end=`expr $at_option : '.*-\(.*\)'`
954	if test $at_range_start -gt $at_range_end; then
955	  at_tmp=$at_range_end
956	  at_range_end=$at_range_start
957	  at_range_start=$at_tmp
958	fi
959	at_fn_validate_ranges at_range_start at_range_end
960	at_range=`$as_echo "$at_groups_all" | \
961	  sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
962	as_fn_append at_groups "$at_range$as_nl"
963	;;
964
965    # Directory selection.
966    --directory | -C )
967	at_prev=--directory
968	;;
969    --directory=* )
970	at_change_dir=:
971	at_dir=$at_optarg
972	if test x- = "x$at_dir" ; then
973	  at_dir=./-
974	fi
975	;;
976
977    # Parallel execution.
978    --jobs | -j )
979	at_jobs=0
980	;;
981    --jobs=* | -j[0-9]* )
982	if test -n "$at_optarg"; then
983	  at_jobs=$at_optarg
984	else
985	  at_jobs=`expr X$at_option : 'X-j\(.*\)'`
986	fi
987	case $at_jobs in *[!0-9]*)
988	  at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
989	  as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
990	esac
991	;;
992
993    # Keywords.
994    --keywords | -k )
995	at_prev=--keywords
996	;;
997    --keywords=* )
998	at_groups_selected=$at_help_all
999	at_save_IFS=$IFS
1000	IFS=,
1001	set X $at_optarg
1002	shift
1003	IFS=$at_save_IFS
1004	for at_keyword
1005	do
1006	  at_invert=
1007	  case $at_keyword in
1008	  '!'*)
1009	    at_invert="-v"
1010	    at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
1011	    ;;
1012	  esac
1013	  # It is on purpose that we match the test group titles too.
1014	  at_groups_selected=`$as_echo "$at_groups_selected" |
1015	      grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
1016	done
1017	# Smash the keywords.
1018	at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
1019	as_fn_append at_groups "$at_groups_selected$as_nl"
1020	;;
1021    --recheck)
1022	at_recheck=:
1023	;;
1024
1025    *=*)
1026	at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
1027	# Reject names that are not valid shell variable names.
1028	case $at_envvar in
1029	  '' | [0-9]* | *[!_$as_cr_alnum]* )
1030	    as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
1031	esac
1032	at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
1033	# Export now, but save eval for later and for debug scripts.
1034	export $at_envvar
1035	as_fn_append at_debug_args " $at_envvar='$at_value'"
1036	;;
1037
1038     *) $as_echo "$as_me: invalid option: $at_option" >&2
1039	$as_echo "Try \`$0 --help' for more information." >&2
1040	exit 1
1041	;;
1042  esac
1043done
1044
1045# Verify our last option didn't require an argument
1046if test -n "$at_prev"; then :
1047  as_fn_error $? "\`$at_prev' requires an argument"
1048fi
1049
1050# The file containing the suite.
1051at_suite_log=$at_dir/$as_me.log
1052
1053# Selected test groups.
1054if test -z "$at_groups$at_recheck"; then
1055  at_groups=$at_groups_all
1056else
1057  if test -n "$at_recheck" && test -r "$at_suite_log"; then
1058    at_oldfails=`sed -n '
1059      /^Failed tests:$/,/^Skipped tests:$/{
1060	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
1061      }
1062      /^Unexpected passes:$/,/^## Detailed failed tests/{
1063	s/^[ ]*\([1-9][0-9]*\):.*/\1/p
1064      }
1065      /^## Detailed failed tests/q
1066      ' "$at_suite_log"`
1067    as_fn_append at_groups "$at_oldfails$as_nl"
1068  fi
1069  # Sort the tests, removing duplicates.
1070  at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
1071fi
1072
1073if test x"$at_color" = xalways \
1074   || { test x"$at_color" = xauto && test -t 1; }; then
1075  at_red=`printf '\033[0;31m'`
1076  at_grn=`printf '\033[0;32m'`
1077  at_lgn=`printf '\033[1;32m'`
1078  at_blu=`printf '\033[1;34m'`
1079  at_std=`printf '\033[m'`
1080else
1081  at_red= at_grn= at_lgn= at_blu= at_std=
1082fi
1083
1084# Help message.
1085if $at_help_p; then
1086  cat <<_ATEOF || at_write_fail=1
1087Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
1088
1089Run all the tests, or the selected TESTS, given by numeric ranges, and
1090save a detailed log file.  Upon failure, create debugging scripts.
1091
1092Do not change environment variables directly.  Instead, set them via
1093command line arguments.  Set \`AUTOTEST_PATH' to select the executables
1094to exercise.  Each relative directory is expanded as build and source
1095directories relative to the top level of this distribution.
1096E.g., from within the build directory /tmp/foo-1.0, invoking this:
1097
1098  $ $0 AUTOTEST_PATH=bin
1099
1100is equivalent to the following, assuming the source directory is /src/foo-1.0:
1101
1102  PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
1103_ATEOF
1104cat <<_ATEOF || at_write_fail=1
1105
1106Operation modes:
1107  -h, --help     print the help message, then exit
1108  -V, --version  print version number, then exit
1109  -c, --clean    remove all the files this test suite might create and exit
1110  -l, --list     describes all the tests, or the selected TESTS
1111_ATEOF
1112cat <<_ATEOF || at_write_fail=1
1113
1114Execution tuning:
1115  -C, --directory=DIR
1116                 change to directory DIR before starting
1117      --color[=never|auto|always]
1118                 enable colored test results on terminal, or always
1119  -j, --jobs[=N]
1120                 Allow N jobs at once; infinite jobs with no arg (default 1)
1121  -k, --keywords=KEYWORDS
1122                 select the tests matching all the comma-separated KEYWORDS
1123                 multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
1124      --recheck  select all tests that failed or passed unexpectedly last time
1125  -e, --errexit  abort as soon as a test fails; implies --debug
1126  -v, --verbose  force more detailed output
1127                 default for debugging scripts
1128  -d, --debug    inhibit clean up and top-level logging
1129                 default for debugging scripts
1130  -x, --trace    enable tests shell tracing
1131_ATEOF
1132cat <<_ATEOF || at_write_fail=1
1133
1134Report bugs to <bug-tar@gnu.org>.
1135General help using GNU software: <http://www.gnu.org/gethelp/>.
1136_ATEOF
1137  exit $at_write_fail
1138fi
1139
1140# List of tests.
1141if $at_list_p; then
1142  cat <<_ATEOF || at_write_fail=1
1143GNU tar 1.34 test suite test groups:
1144
1145 NUM: FILE-NAME:LINE     TEST-GROUP-NAME
1146      KEYWORDS
1147
1148_ATEOF
1149  # Pass an empty line as separator between selected groups and help.
1150  $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
1151    awk 'NF == 1 && FS != ";" {
1152	   selected[$ 1] = 1
1153	   next
1154	 }
1155	 /^$/ { FS = ";" }
1156	 NF > 0 {
1157	   if (selected[$ 1]) {
1158	     printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
1159	     if ($ 4) {
1160	       lmax = 79
1161	       indent = "     "
1162	       line = indent
1163	       len = length (line)
1164	       n = split ($ 4, a, " ")
1165	       for (i = 1; i <= n; i++) {
1166		 l = length (a[i]) + 1
1167		 if (i > 1 && len + l > lmax) {
1168		   print line
1169		   line = indent " " a[i]
1170		   len = length (line)
1171		 } else {
1172		   line = line " " a[i]
1173		   len += l
1174		 }
1175	       }
1176	       if (n)
1177		 print line
1178	     }
1179	   }
1180	 }' || at_write_fail=1
1181  exit $at_write_fail
1182fi
1183if $at_version_p; then
1184  $as_echo "$as_me (GNU tar 1.34)" &&
1185  cat <<\_ATEOF || at_write_fail=1
1186
1187Copyright (C) 2012 Free Software Foundation, Inc.
1188This test suite is free software; the Free Software Foundation gives
1189unlimited permission to copy, distribute and modify it.
1190_ATEOF
1191  exit $at_write_fail
1192fi
1193
1194# Should we print banners?  Yes if more than one test is run.
1195case $at_groups in #(
1196  *$as_nl* )
1197      at_print_banners=: ;; #(
1198  * ) at_print_banners=false ;;
1199esac
1200# Text for banner N, set to a single space once printed.
1201# Banner 1. testsuite.at:207
1202# Category starts at test group 3.
1203at_banner_text_1="Options"
1204# Banner 2. testsuite.at:212
1205# Category starts at test group 6.
1206at_banner_text_2="Option compatibility"
1207# Banner 3. testsuite.at:220
1208# Category starts at test group 12.
1209at_banner_text_3="Checkpoints"
1210# Banner 4. testsuite.at:240
1211# Category starts at test group 17.
1212at_banner_text_4="Compression"
1213# Banner 5. testsuite.at:250
1214# Category starts at test group 23.
1215at_banner_text_5="Positional options"
1216# Banner 6. testsuite.at:256
1217# Category starts at test group 27.
1218at_banner_text_6="The -T option"
1219# Banner 7. testsuite.at:270
1220# Category starts at test group 40.
1221at_banner_text_7="Various options"
1222# Banner 8. testsuite.at:279
1223# Category starts at test group 47.
1224at_banner_text_8="The --same-order option"
1225# Banner 9. testsuite.at:283
1226# Category starts at test group 49.
1227at_banner_text_9="Append"
1228# Banner 10. testsuite.at:291
1229# Category starts at test group 55.
1230at_banner_text_10="Transforms"
1231# Banner 11. testsuite.at:297
1232# Category starts at test group 59.
1233at_banner_text_11="Exclude"
1234# Banner 12. testsuite.at:316
1235# Category starts at test group 76.
1236at_banner_text_12="Deletions"
1237# Banner 13. testsuite.at:323
1238# Category starts at test group 81.
1239at_banner_text_13="Extracting"
1240# Banner 14. testsuite.at:351
1241# Category starts at test group 106.
1242at_banner_text_14="Comparing"
1243# Banner 15. testsuite.at:354
1244# Category starts at test group 107.
1245at_banner_text_15="Volume label operations"
1246# Banner 16. testsuite.at:361
1247# Category starts at test group 112.
1248at_banner_text_16="Incremental archives"
1249# Banner 17. testsuite.at:380
1250# Category starts at test group 129.
1251at_banner_text_17="Files removed while archiving"
1252# Banner 18. testsuite.at:384
1253# Category starts at test group 131.
1254at_banner_text_18="Directories removed while archiving"
1255# Banner 19. testsuite.at:388
1256# Category starts at test group 133.
1257at_banner_text_19="Renames"
1258# Banner 20. testsuite.at:397
1259# Category starts at test group 140.
1260at_banner_text_20="Ignore failing reads"
1261# Banner 21. testsuite.at:400
1262# Category starts at test group 141.
1263at_banner_text_21="Link handling"
1264# Banner 22. testsuite.at:406
1265# Category starts at test group 145.
1266at_banner_text_22="Specific archive formats"
1267# Banner 23. testsuite.at:417
1268# Category starts at test group 153.
1269at_banner_text_23="Multivolume archives"
1270# Banner 24. testsuite.at:429
1271# Category starts at test group 163.
1272at_banner_text_24="Owner and Groups"
1273# Banner 25. testsuite.at:433
1274# Category starts at test group 165.
1275at_banner_text_25="Sparse files"
1276# Banner 26. testsuite.at:449
1277# Category starts at test group 179.
1278at_banner_text_26="Updates"
1279# Banner 27. testsuite.at:455
1280# Category starts at test group 183.
1281at_banner_text_27="Verifying the archive"
1282# Banner 28. testsuite.at:458
1283# Category starts at test group 184.
1284at_banner_text_28="Volume operations"
1285# Banner 29. testsuite.at:462
1286# Category starts at test group 186.
1287at_banner_text_29=""
1288# Banner 30. testsuite.at:472
1289# Category starts at test group 193.
1290at_banner_text_30="Removing files after archiving"
1291# Banner 31. testsuite.at:496
1292# Category starts at test group 215.
1293at_banner_text_31="Extended attributes"
1294# Banner 32. testsuite.at:514
1295# Category starts at test group 228.
1296at_banner_text_32="One top level"
1297# Banner 33. testsuite.at:521
1298# Category starts at test group 233.
1299at_banner_text_33="Star tests"
1300
1301# Take any -C into account.
1302if $at_change_dir ; then
1303  test x != "x$at_dir" && cd "$at_dir" \
1304    || as_fn_error $? "unable to change directory"
1305  at_dir=`pwd`
1306fi
1307
1308# Load the config files for any default variable assignments.
1309for at_file in atconfig atlocal
1310do
1311  test -r $at_file || continue
1312  . ./$at_file || as_fn_error $? "invalid content: $at_file"
1313done
1314
1315# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1316: "${at_top_build_prefix=$at_top_builddir}"
1317
1318# Perform any assignments requested during argument parsing.
1319eval "$at_debug_args"
1320
1321# atconfig delivers names relative to the directory the test suite is
1322# in, but the groups themselves are run in testsuite-dir/group-dir.
1323if test -n "$at_top_srcdir"; then
1324  builddir=../..
1325  for at_dir_var in srcdir top_srcdir top_build_prefix
1326  do
1327    eval at_val=\$at_$at_dir_var
1328    case $at_val in
1329      [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1330      *) at_prefix=../../ ;;
1331    esac
1332    eval "$at_dir_var=\$at_prefix\$at_val"
1333  done
1334fi
1335
1336## -------------------- ##
1337## Directory structure. ##
1338## -------------------- ##
1339
1340# This is the set of directories and files used by this script
1341# (non-literals are capitalized):
1342#
1343# TESTSUITE         - the testsuite
1344# TESTSUITE.log     - summarizes the complete testsuite run
1345# TESTSUITE.dir/    - created during a run, remains after -d or failed test
1346# + at-groups/      - during a run: status of all groups in run
1347# | + NNN/          - during a run: meta-data about test group NNN
1348# | | + check-line  - location (source file and line) of current AT_CHECK
1349# | | + status      - exit status of current AT_CHECK
1350# | | + stdout      - stdout of current AT_CHECK
1351# | | + stder1      - stderr, including trace
1352# | | + stderr      - stderr, with trace filtered out
1353# | | + test-source - portion of testsuite that defines group
1354# | | + times       - timestamps for computing duration
1355# | | + pass        - created if group passed
1356# | | + xpass       - created if group xpassed
1357# | | + fail        - created if group failed
1358# | | + xfail       - created if group xfailed
1359# | | + skip        - created if group skipped
1360# + at-stop         - during a run: end the run if this file exists
1361# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1362# + 0..NNN/         - created for each group NNN, remains after -d or failed test
1363# | + TESTSUITE.log - summarizes the group results
1364# | + ...           - files created during the group
1365
1366# The directory the whole suite works in.
1367# Should be absolute to let the user `cd' at will.
1368at_suite_dir=$at_dir/$as_me.dir
1369# The file containing the suite ($at_dir might have changed since earlier).
1370at_suite_log=$at_dir/$as_me.log
1371# The directory containing helper files per test group.
1372at_helper_dir=$at_suite_dir/at-groups
1373# Stop file: if it exists, do not start new jobs.
1374at_stop_file=$at_suite_dir/at-stop
1375# The fifo used for the job dispatcher.
1376at_job_fifo=$at_suite_dir/at-job-fifo
1377
1378if $at_clean; then
1379  test -d "$at_suite_dir" &&
1380    find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1381  rm -f -r "$at_suite_dir" "$at_suite_log"
1382  exit $?
1383fi
1384
1385# Don't take risks: use only absolute directories in PATH.
1386#
1387# For stand-alone test suites (ie. atconfig was not found),
1388# AUTOTEST_PATH is relative to `.'.
1389#
1390# For embedded test suites, AUTOTEST_PATH is relative to the top level
1391# of the package.  Then expand it into build/src parts, since users
1392# may create executables in both places.
1393AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1394at_path=
1395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1396for as_dir in $AUTOTEST_PATH $PATH
1397do
1398  IFS=$as_save_IFS
1399  test -z "$as_dir" && as_dir=.
1400    test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1401case $as_dir in
1402  [\\/]* | ?:[\\/]* )
1403    as_fn_append at_path "$as_dir"
1404    ;;
1405  * )
1406    if test -z "$at_top_build_prefix"; then
1407      # Stand-alone test suite.
1408      as_fn_append at_path "$as_dir"
1409    else
1410      # Embedded test suite.
1411      as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1412      as_fn_append at_path "$at_top_srcdir/$as_dir"
1413    fi
1414    ;;
1415esac
1416  done
1417IFS=$as_save_IFS
1418
1419
1420# Now build and simplify PATH.
1421#
1422# There might be directories that don't exist, but don't redirect
1423# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1424at_new_path=
1425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1426for as_dir in $at_path
1427do
1428  IFS=$as_save_IFS
1429  test -z "$as_dir" && as_dir=.
1430    test -d "$as_dir" || continue
1431case $as_dir in
1432  [\\/]* | ?:[\\/]* ) ;;
1433  * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1434esac
1435case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1436  *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1437  $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1438  *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1439esac
1440  done
1441IFS=$as_save_IFS
1442
1443PATH=$at_new_path
1444export PATH
1445
1446# Setting up the FDs.
1447
1448
1449
1450# 5 is the log file.  Not to be overwritten if `-d'.
1451if $at_debug_p; then
1452  at_suite_log=/dev/null
1453else
1454  : >"$at_suite_log"
1455fi
1456exec 5>>"$at_suite_log"
1457
1458# Banners and logs.
1459$as_echo "## ------------------------ ##
1460## GNU tar 1.34 test suite. ##
1461## ------------------------ ##"
1462{
1463  $as_echo "## ------------------------ ##
1464## GNU tar 1.34 test suite. ##
1465## ------------------------ ##"
1466  echo
1467
1468  $as_echo "$as_me: command line was:"
1469  $as_echo "  \$ $0 $at_cli_args"
1470  echo
1471
1472  # If ChangeLog exists, list a few lines in case it might help determining
1473  # the exact version.
1474  if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1475    $as_echo "## ---------- ##
1476## ChangeLog. ##
1477## ---------- ##"
1478    echo
1479    sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1480    echo
1481  fi
1482
1483  {
1484cat <<_ASUNAME
1485## --------- ##
1486## Platform. ##
1487## --------- ##
1488
1489hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1490uname -m = `(uname -m) 2>/dev/null || echo unknown`
1491uname -r = `(uname -r) 2>/dev/null || echo unknown`
1492uname -s = `(uname -s) 2>/dev/null || echo unknown`
1493uname -v = `(uname -v) 2>/dev/null || echo unknown`
1494
1495/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1496/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1497
1498/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1499/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1500/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1501/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1502/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1503/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1504/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1505
1506_ASUNAME
1507
1508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1509for as_dir in $PATH
1510do
1511  IFS=$as_save_IFS
1512  test -z "$as_dir" && as_dir=.
1513    $as_echo "PATH: $as_dir"
1514  done
1515IFS=$as_save_IFS
1516
1517}
1518  echo
1519
1520  # Contents of the config files.
1521  for at_file in atconfig atlocal
1522  do
1523    test -r $at_file || continue
1524    $as_echo "$as_me: $at_file:"
1525    sed 's/^/| /' $at_file
1526    echo
1527  done
1528} >&5
1529
1530
1531## ------------------------- ##
1532## Autotest shell functions. ##
1533## ------------------------- ##
1534
1535# at_fn_banner NUMBER
1536# -------------------
1537# Output banner NUMBER, provided the testsuite is running multiple groups and
1538# this particular banner has not yet been printed.
1539at_fn_banner ()
1540{
1541  $at_print_banners || return 0
1542  eval at_banner_text=\$at_banner_text_$1
1543  test "x$at_banner_text" = "x " && return 0
1544  eval "at_banner_text_$1=\" \""
1545  if test -z "$at_banner_text"; then
1546    $at_first || echo
1547  else
1548    $as_echo "$as_nl$at_banner_text$as_nl"
1549  fi
1550} # at_fn_banner
1551
1552# at_fn_check_prepare_notrace REASON LINE
1553# ---------------------------------------
1554# Perform AT_CHECK preparations for the command at LINE for an untraceable
1555# command; REASON is the reason for disabling tracing.
1556at_fn_check_prepare_notrace ()
1557{
1558  $at_trace_echo "Not enabling shell tracing (command contains $1)"
1559  $as_echo "$2" >"$at_check_line_file"
1560  at_check_trace=: at_check_filter=:
1561  : >"$at_stdout"; : >"$at_stderr"
1562}
1563
1564# at_fn_check_prepare_trace LINE
1565# ------------------------------
1566# Perform AT_CHECK preparations for the command at LINE for a traceable
1567# command.
1568at_fn_check_prepare_trace ()
1569{
1570  $as_echo "$1" >"$at_check_line_file"
1571  at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1572  : >"$at_stdout"; : >"$at_stderr"
1573}
1574
1575# at_fn_check_prepare_dynamic COMMAND LINE
1576# ----------------------------------------
1577# Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1578# preparation function.
1579at_fn_check_prepare_dynamic ()
1580{
1581  case $1 in
1582    *$as_nl*)
1583      at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1584    *)
1585      at_fn_check_prepare_trace "$2" ;;
1586  esac
1587}
1588
1589# at_fn_filter_trace
1590# ------------------
1591# Remove the lines in the file "$at_stderr" generated by "set -x" and print
1592# them to stderr.
1593at_fn_filter_trace ()
1594{
1595  mv "$at_stderr" "$at_stder1"
1596  grep '^ *+' "$at_stder1" >&2
1597  grep -v '^ *+' "$at_stder1" >"$at_stderr"
1598}
1599
1600# at_fn_log_failure FILE-LIST
1601# ---------------------------
1602# Copy the files in the list on stdout with a "> " prefix, and exit the shell
1603# with a failure exit code.
1604at_fn_log_failure ()
1605{
1606  for file
1607    do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1608  echo 1 > "$at_status_file"
1609  exit 1
1610}
1611
1612# at_fn_check_skip EXIT-CODE LINE
1613# -------------------------------
1614# Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1615# the test group subshell with that same exit code. Use LINE in any report
1616# about test failure.
1617at_fn_check_skip ()
1618{
1619  case $1 in
1620    99) echo 99 > "$at_status_file"; at_failed=:
1621	$as_echo "$2: hard failure"; exit 99;;
1622    77) echo 77 > "$at_status_file"; exit 77;;
1623  esac
1624}
1625
1626# at_fn_check_status EXPECTED EXIT-CODE LINE
1627# ------------------------------------------
1628# Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1629# Otherwise, if it is 77 or 99, exit the test group subshell with that same
1630# exit code; if it is anything else print an error message referring to LINE,
1631# and fail the test.
1632at_fn_check_status ()
1633{
1634  case $2 in
1635    $1 ) ;;
1636    77) echo 77 > "$at_status_file"; exit 77;;
1637    99) echo 99 > "$at_status_file"; at_failed=:
1638	$as_echo "$3: hard failure"; exit 99;;
1639    *) $as_echo "$3: exit code was $2, expected $1"
1640      at_failed=:;;
1641  esac
1642}
1643
1644# at_fn_diff_devnull FILE
1645# -----------------------
1646# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1647# invocations.
1648at_fn_diff_devnull ()
1649{
1650  test -s "$1" || return 0
1651  $at_diff "$at_devnull" "$1"
1652}
1653
1654# at_fn_test NUMBER
1655# -----------------
1656# Parse out test NUMBER from the tail of this file.
1657at_fn_test ()
1658{
1659  eval at_sed=\$at_sed$1
1660  sed "$at_sed" "$at_myself" > "$at_test_source"
1661}
1662
1663# at_fn_create_debugging_script
1664# -----------------------------
1665# Create the debugging script $at_group_dir/run which will reproduce the
1666# current test group.
1667at_fn_create_debugging_script ()
1668{
1669  {
1670    echo "#! /bin/sh" &&
1671    echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1672    $as_echo "cd '$at_dir'" &&
1673    $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1674    echo 'exit 1'
1675  } >"$at_group_dir/run" &&
1676  chmod +x "$at_group_dir/run"
1677}
1678
1679## -------------------------------- ##
1680## End of autotest shell functions. ##
1681## -------------------------------- ##
1682{
1683  $as_echo "## ---------------- ##
1684## Tested programs. ##
1685## ---------------- ##"
1686  echo
1687} >&5
1688
1689# Report what programs are being tested.
1690for at_program in : $at_tested
1691do
1692  test "$at_program" = : && continue
1693  case $at_program in
1694    [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
1695    * )
1696    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1697for as_dir in $PATH
1698do
1699  IFS=$as_save_IFS
1700  test -z "$as_dir" && as_dir=.
1701    test -f "$as_dir/$at_program" && break
1702  done
1703IFS=$as_save_IFS
1704
1705    at_program_=$as_dir/$at_program ;;
1706  esac
1707  if test -f "$at_program_"; then
1708    {
1709      $as_echo "$at_srcdir/testsuite.at:199: $at_program_ --version"
1710      "$at_program_" --version </dev/null
1711      echo
1712    } >&5 2>&1
1713  else
1714    as_fn_error $? "cannot find $at_program" "$LINENO" 5
1715  fi
1716done
1717
1718{
1719  $as_echo "## ------------------ ##
1720## Running the tests. ##
1721## ------------------ ##"
1722} >&5
1723
1724at_start_date=`date`
1725at_start_time=`date +%s 2>/dev/null`
1726$as_echo "$as_me: starting at: $at_start_date" >&5
1727
1728# Create the master directory if it doesn't already exist.
1729as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1730  as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1731
1732# Can we diff with `/dev/null'?  DU 5.0 refuses.
1733if diff /dev/null /dev/null >/dev/null 2>&1; then
1734  at_devnull=/dev/null
1735else
1736  at_devnull=$at_suite_dir/devnull
1737  >"$at_devnull"
1738fi
1739
1740# Use `diff -u' when possible.
1741if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1742then
1743  at_diff='diff -u'
1744else
1745  at_diff=diff
1746fi
1747
1748# Get the last needed group.
1749for at_group in : $at_groups; do :; done
1750
1751# Extract the start and end lines of each test group at the tail
1752# of this file
1753awk '
1754BEGIN { FS="" }
1755/^#AT_START_/ {
1756  start = NR
1757}
1758/^#AT_STOP_/ {
1759  test = substr ($ 0, 10)
1760  print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1761  if (test == "'"$at_group"'") exit
1762}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1763. "$at_suite_dir/at-source-lines" ||
1764  as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1765rm -f "$at_suite_dir/at-source-lines"
1766
1767# Set number of jobs for `-j'; avoid more jobs than test groups.
1768set X $at_groups; shift; at_max_jobs=$#
1769if test $at_max_jobs -eq 0; then
1770  at_jobs=1
1771fi
1772if test $at_jobs -ne 1 &&
1773   { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1774  at_jobs=$at_max_jobs
1775fi
1776
1777# If parallel mode, don't output banners, don't split summary lines.
1778if test $at_jobs -ne 1; then
1779  at_print_banners=false
1780  at_quiet=:
1781fi
1782
1783# Set up helper dirs.
1784rm -rf "$at_helper_dir" &&
1785mkdir "$at_helper_dir" &&
1786cd "$at_helper_dir" &&
1787{ test -z "$at_groups" || mkdir $at_groups; } ||
1788as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1789
1790# Functions for running a test group.  We leave the actual
1791# test group execution outside of a shell function in order
1792# to avoid hitting zsh 4.x exit status bugs.
1793
1794# at_fn_group_prepare
1795# -------------------
1796# Prepare for running a test group.
1797at_fn_group_prepare ()
1798{
1799  # The directory for additional per-group helper files.
1800  at_job_dir=$at_helper_dir/$at_group
1801  # The file containing the location of the last AT_CHECK.
1802  at_check_line_file=$at_job_dir/check-line
1803  # The file containing the exit status of the last command.
1804  at_status_file=$at_job_dir/status
1805  # The files containing the output of the tested commands.
1806  at_stdout=$at_job_dir/stdout
1807  at_stder1=$at_job_dir/stder1
1808  at_stderr=$at_job_dir/stderr
1809  # The file containing the code for a test group.
1810  at_test_source=$at_job_dir/test-source
1811  # The file containing dates.
1812  at_times_file=$at_job_dir/times
1813
1814  # Be sure to come back to the top test directory.
1815  cd "$at_suite_dir"
1816
1817  # Clearly separate the test groups when verbose.
1818  $at_first || $at_verbose echo
1819
1820  at_group_normalized=$at_group
1821
1822  eval 'while :; do
1823    case $at_group_normalized in #(
1824    '"$at_format"'*) break;;
1825    esac
1826    at_group_normalized=0$at_group_normalized
1827  done'
1828
1829
1830  # Create a fresh directory for the next test group, and enter.
1831  # If one already exists, the user may have invoked ./run from
1832  # within that directory; we remove the contents, but not the
1833  # directory itself, so that we aren't pulling the rug out from
1834  # under the shell's notion of the current directory.
1835  at_group_dir=$at_suite_dir/$at_group_normalized
1836  at_group_log=$at_group_dir/$as_me.log
1837  if test -d "$at_group_dir"; then
1838  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1839  rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1840fi ||
1841    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1842$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1843  # Be tolerant if the above `rm' was not able to remove the directory.
1844  as_dir="$at_group_dir"; as_fn_mkdir_p
1845
1846  echo 0 > "$at_status_file"
1847
1848  # In verbose mode, append to the log file *and* show on
1849  # the standard output; in quiet mode only write to the log.
1850  if test -z "$at_verbose"; then
1851    at_tee_pipe='tee -a "$at_group_log"'
1852  else
1853    at_tee_pipe='cat >> "$at_group_log"'
1854  fi
1855}
1856
1857# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1858# -------------------------------------------------
1859# Declare the test group ORDINAL, located at LINE with group description DESC,
1860# and residing under BANNER. Use PAD to align the status column.
1861at_fn_group_banner ()
1862{
1863  at_setup_line="$2"
1864  test -n "$5" && at_fn_banner $5
1865  at_desc="$3"
1866  case $1 in
1867    [0-9])      at_desc_line="  $1: ";;
1868    [0-9][0-9]) at_desc_line=" $1: " ;;
1869    *)          at_desc_line="$1: "  ;;
1870  esac
1871  as_fn_append at_desc_line "$3$4"
1872  $at_quiet $as_echo_n "$at_desc_line"
1873  echo "#                             -*- compilation -*-" >> "$at_group_log"
1874}
1875
1876# at_fn_group_postprocess
1877# -----------------------
1878# Perform cleanup after running a test group.
1879at_fn_group_postprocess ()
1880{
1881  # Be sure to come back to the suite directory, in particular
1882  # since below we might `rm' the group directory we are in currently.
1883  cd "$at_suite_dir"
1884
1885  if test ! -f "$at_check_line_file"; then
1886    sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1887      A failure happened in a test group before any test could be
1888      run. This means that test suite is improperly designed.  Please
1889      report this failure to <bug-tar@gnu.org>.
1890_ATEOF
1891    $as_echo "$at_setup_line" >"$at_check_line_file"
1892    at_status=99
1893  fi
1894  $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1895  $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1896  case $at_xfail:$at_status in
1897    yes:0)
1898	at_msg="UNEXPECTED PASS"
1899	at_res=xpass
1900	at_errexit=$at_errexit_p
1901	at_color=$at_red
1902	;;
1903    no:0)
1904	at_msg="ok"
1905	at_res=pass
1906	at_errexit=false
1907	at_color=$at_grn
1908	;;
1909    *:77)
1910	at_msg='skipped ('`cat "$at_check_line_file"`')'
1911	at_res=skip
1912	at_errexit=false
1913	at_color=$at_blu
1914	;;
1915    no:* | *:99)
1916	at_msg='FAILED ('`cat "$at_check_line_file"`')'
1917	at_res=fail
1918	at_errexit=$at_errexit_p
1919	at_color=$at_red
1920	;;
1921    yes:*)
1922	at_msg='expected failure ('`cat "$at_check_line_file"`')'
1923	at_res=xfail
1924	at_errexit=false
1925	at_color=$at_lgn
1926	;;
1927  esac
1928  echo "$at_res" > "$at_job_dir/$at_res"
1929  # In parallel mode, output the summary line only afterwards.
1930  if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1931    $as_echo "$at_desc_line $at_color$at_msg$at_std"
1932  else
1933    # Make sure there is a separator even with long titles.
1934    $as_echo " $at_color$at_msg$at_std"
1935  fi
1936  at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1937  case $at_status in
1938    0|77)
1939      # $at_times_file is only available if the group succeeded.
1940      # We're not including the group log, so the success message
1941      # is written in the global log separately.  But we also
1942      # write to the group log in case they're using -d.
1943      if test -f "$at_times_file"; then
1944	at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
1945	rm -f "$at_times_file"
1946      fi
1947      $as_echo "$at_log_msg" >> "$at_group_log"
1948      $as_echo "$at_log_msg" >&5
1949
1950      # Cleanup the group directory, unless the user wants the files
1951      # or the success was unexpected.
1952      if $at_debug_p || test $at_res = xpass; then
1953	at_fn_create_debugging_script
1954	if test $at_res = xpass && $at_errexit; then
1955	  echo stop > "$at_stop_file"
1956	fi
1957      else
1958	if test -d "$at_group_dir"; then
1959	  find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1960	  rm -fr "$at_group_dir"
1961	fi
1962	rm -f "$at_test_source"
1963      fi
1964      ;;
1965    *)
1966      # Upon failure, include the log into the testsuite's global
1967      # log.  The failure message is written in the group log.  It
1968      # is later included in the global log.
1969      $as_echo "$at_log_msg" >> "$at_group_log"
1970
1971      # Upon failure, keep the group directory for autopsy, and create
1972      # the debugging script.  With -e, do not start any further tests.
1973      at_fn_create_debugging_script
1974      if $at_errexit; then
1975	echo stop > "$at_stop_file"
1976      fi
1977      ;;
1978  esac
1979}
1980
1981
1982## ------------ ##
1983## Driver loop. ##
1984## ------------ ##
1985
1986
1987if (set -m && set +m && set +b) >/dev/null 2>&1; then
1988  set +b
1989  at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1990else
1991  at_job_control_on=: at_job_control_off=: at_job_group=
1992fi
1993
1994for at_signal in 1 2 15; do
1995  trap 'set +x; set +e
1996	$at_job_control_off
1997	at_signal='"$at_signal"'
1998	echo stop > "$at_stop_file"
1999	trap "" $at_signal
2000	at_pgids=
2001	for at_pgid in `jobs -p 2>/dev/null`; do
2002	  at_pgids="$at_pgids $at_job_group$at_pgid"
2003	done
2004	test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
2005	wait
2006	if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
2007	  echo >&2
2008	fi
2009	at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
2010	set x $at_signame
2011	test 0 -gt 2 && at_signame=$at_signal
2012	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
2013$as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
2014	as_fn_arith 128 + $at_signal && exit_status=$as_val
2015	as_fn_exit $exit_status' $at_signal
2016done
2017
2018rm -f "$at_stop_file"
2019at_first=:
2020
2021if test $at_jobs -ne 1 &&
2022     rm -f "$at_job_fifo" &&
2023     test -n "$at_job_group" &&
2024     ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
2025then
2026  # FIFO job dispatcher.
2027
2028  trap 'at_pids=
2029	for at_pid in `jobs -p`; do
2030	  at_pids="$at_pids $at_job_group$at_pid"
2031	done
2032	if test -n "$at_pids"; then
2033	  at_sig=TSTP
2034	  test "${TMOUT+set}" = set && at_sig=STOP
2035	  kill -$at_sig $at_pids 2>/dev/null
2036	fi
2037	kill -STOP $$
2038	test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
2039
2040  echo
2041  # Turn jobs into a list of numbers, starting from 1.
2042  at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
2043
2044  set X $at_joblist
2045  shift
2046  for at_group in $at_groups; do
2047    $at_job_control_on 2>/dev/null
2048    (
2049      # Start one test group.
2050      $at_job_control_off
2051      if $at_first; then
2052	exec 7>"$at_job_fifo"
2053      else
2054	exec 6<&-
2055      fi
2056      trap 'set +x; set +e
2057	    trap "" PIPE
2058	    echo stop > "$at_stop_file"
2059	    echo >&7
2060	    as_fn_exit 141' PIPE
2061      at_fn_group_prepare
2062      if cd "$at_group_dir" &&
2063	 at_fn_test $at_group &&
2064	 . "$at_test_source"
2065      then :; else
2066	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
2067$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
2068	at_failed=:
2069      fi
2070      at_fn_group_postprocess
2071      echo >&7
2072    ) &
2073    $at_job_control_off
2074    if $at_first; then
2075      at_first=false
2076      exec 6<"$at_job_fifo" 7>"$at_job_fifo"
2077    fi
2078    shift # Consume one token.
2079    if test $# -gt 0; then :; else
2080      read at_token <&6 || break
2081      set x $*
2082    fi
2083    test -f "$at_stop_file" && break
2084  done
2085  exec 7>&-
2086  # Read back the remaining ($at_jobs - 1) tokens.
2087  set X $at_joblist
2088  shift
2089  if test $# -gt 0; then
2090    shift
2091    for at_job
2092    do
2093      read at_token
2094    done <&6
2095  fi
2096  exec 6<&-
2097  wait
2098else
2099  # Run serially, avoid forks and other potential surprises.
2100  for at_group in $at_groups; do
2101    at_fn_group_prepare
2102    if cd "$at_group_dir" &&
2103       at_fn_test $at_group &&
2104       . "$at_test_source"; then :; else
2105      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
2106$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
2107      at_failed=:
2108    fi
2109    at_fn_group_postprocess
2110    test -f "$at_stop_file" && break
2111    at_first=false
2112  done
2113fi
2114
2115# Wrap up the test suite with summary statistics.
2116cd "$at_helper_dir"
2117
2118# Use ?..???? when the list must remain sorted, the faster * otherwise.
2119at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
2120at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
2121at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
2122at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
2123		 echo $f; done | sed '/?/d; s,/xpass,,'`
2124at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
2125		echo $f; done | sed '/?/d; s,/fail,,'`
2126
2127set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
2128shift; at_group_count=$#
2129set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
2130set X $at_xfail_list; shift; at_xfail_count=$#
2131set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
2132set X $at_skip_list; shift; at_skip_count=$#
2133
2134as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
2135as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
2136as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
2137
2138# Back to the top directory.
2139cd "$at_dir"
2140rm -rf "$at_helper_dir"
2141
2142# Compute the duration of the suite.
2143at_stop_date=`date`
2144at_stop_time=`date +%s 2>/dev/null`
2145$as_echo "$as_me: ending at: $at_stop_date" >&5
2146case $at_start_time,$at_stop_time in
2147  [0-9]*,[0-9]*)
2148    as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
2149    as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
2150    as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
2151    as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
2152    as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
2153    at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
2154    $as_echo "$as_me: test suite duration: $at_duration" >&5
2155    ;;
2156esac
2157
2158echo
2159$as_echo "## ------------- ##
2160## Test results. ##
2161## ------------- ##"
2162echo
2163{
2164  echo
2165  $as_echo "## ------------- ##
2166## Test results. ##
2167## ------------- ##"
2168  echo
2169} >&5
2170
2171if test $at_run_count = 1; then
2172  at_result="1 test"
2173  at_were=was
2174else
2175  at_result="$at_run_count tests"
2176  at_were=were
2177fi
2178if $at_errexit_p && test $at_unexpected_count != 0; then
2179  if test $at_xpass_count = 1; then
2180    at_result="$at_result $at_were run, one passed"
2181  else
2182    at_result="$at_result $at_were run, one failed"
2183  fi
2184  at_result="$at_result unexpectedly and inhibited subsequent tests."
2185  at_color=$at_red
2186else
2187  # Don't you just love exponential explosion of the number of cases?
2188  at_color=$at_red
2189  case $at_xpass_count:$at_fail_count:$at_xfail_count in
2190    # So far, so good.
2191    0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
2192    0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
2193
2194    # Some unexpected failures
2195    0:*:0) at_result="$at_result $at_were run,
2196$at_fail_count failed unexpectedly." ;;
2197
2198    # Some failures, both expected and unexpected
2199    0:*:1) at_result="$at_result $at_were run,
2200$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2201    0:*:*) at_result="$at_result $at_were run,
2202$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2203
2204    # No unexpected failures, but some xpasses
2205    *:0:*) at_result="$at_result $at_were run,
2206$at_xpass_count passed unexpectedly." ;;
2207
2208    # No expected failures, but failures and xpasses
2209    *:1:0) at_result="$at_result $at_were run,
2210$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
2211    *:*:0) at_result="$at_result $at_were run,
2212$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
2213
2214    # All of them.
2215    *:*:1) at_result="$at_result $at_were run,
2216$at_xpass_count passed unexpectedly,
2217$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2218    *:*:*) at_result="$at_result $at_were run,
2219$at_xpass_count passed unexpectedly,
2220$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2221  esac
2222
2223  if test $at_skip_count = 0 && test $at_run_count -gt 1; then
2224    at_result="All $at_result"
2225  fi
2226fi
2227
2228# Now put skips in the mix.
2229case $at_skip_count in
2230  0) ;;
2231  1) at_result="$at_result
22321 test was skipped." ;;
2233  *) at_result="$at_result
2234$at_skip_count tests were skipped." ;;
2235esac
2236
2237if test $at_unexpected_count = 0; then
2238  echo "$at_color$at_result$at_std"
2239  echo "$at_result" >&5
2240else
2241  echo "${at_color}ERROR: $at_result$at_std" >&2
2242  echo "ERROR: $at_result" >&5
2243  {
2244    echo
2245    $as_echo "## ------------------------ ##
2246## Summary of the failures. ##
2247## ------------------------ ##"
2248
2249    # Summary of failed and skipped tests.
2250    if test $at_fail_count != 0; then
2251      echo "Failed tests:"
2252      $SHELL "$at_myself" $at_fail_list --list
2253      echo
2254    fi
2255    if test $at_skip_count != 0; then
2256      echo "Skipped tests:"
2257      $SHELL "$at_myself" $at_skip_list --list
2258      echo
2259    fi
2260    if test $at_xpass_count != 0; then
2261      echo "Unexpected passes:"
2262      $SHELL "$at_myself" $at_xpass_list --list
2263      echo
2264    fi
2265    if test $at_fail_count != 0; then
2266      $as_echo "## ---------------------- ##
2267## Detailed failed tests. ##
2268## ---------------------- ##"
2269      echo
2270      for at_group in $at_fail_list
2271      do
2272	at_group_normalized=$at_group
2273
2274  eval 'while :; do
2275    case $at_group_normalized in #(
2276    '"$at_format"'*) break;;
2277    esac
2278    at_group_normalized=0$at_group_normalized
2279  done'
2280
2281	cat "$at_suite_dir/$at_group_normalized/$as_me.log"
2282	echo
2283      done
2284      echo
2285    fi
2286    if test -n "$at_top_srcdir"; then
2287      sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2288## ${at_top_build_prefix}config.log ##
2289_ASBOX
2290      sed 's/^/| /' ${at_top_build_prefix}config.log
2291      echo
2292    fi
2293  } >&5
2294
2295  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2296## $as_me.log was created. ##
2297_ASBOX
2298
2299  echo
2300  if $at_debug_p; then
2301    at_msg='per-test log files'
2302  else
2303    at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
2304  fi
2305  $as_echo "Please send $at_msg and all information you think might help:
2306
2307   To: <bug-tar@gnu.org>
2308   Subject: [GNU tar 1.34] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
2309
2310You may investigate any problem if you feel able to do so, in which
2311case the test suite provides a good starting point.  Its output may
2312be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2313"
2314  exit 1
2315fi
2316
2317exit 0
2318
2319## ------------- ##
2320## Actual tests. ##
2321## ------------- ##
2322#AT_START_1
2323at_fn_group_banner 1 'version.at:19' \
2324  "tar version" "                                    "
2325at_xfail=no
2326(
2327  $as_echo "1. $at_setup_line: testing $at_desc ..."
2328  $at_traceon
2329
2330
2331{ set +x
2332$as_echo "$at_srcdir/version.at:21: tar --version | sed 1q"
2333at_fn_check_prepare_notrace 'a shell pipeline' "version.at:21"
2334( $at_check_trace; tar --version | sed 1q
2335) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2336at_status=$? at_failed=false
2337$at_check_filter
2338at_fn_diff_devnull "$at_stderr" || at_failed=:
2339echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.34
2340" | \
2341  $at_diff - "$at_stdout" || at_failed=:
2342at_fn_check_status 0 $at_status "$at_srcdir/version.at:21"
2343if $at_failed; then :
2344  cat >$XFAILFILE <<'_EOT'
2345
2346==============================================================
2347WARNING: Not using the proper version, *all* checks dubious...
2348==============================================================
2349_EOT
2350
2351else
2352  rm -f $XFAILFILE
2353fi
2354$at_failed && at_fn_log_failure
2355$at_traceon; }
2356
2357
2358  set +x
2359  $at_times_p && times >"$at_times_file"
2360) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2361read at_status <"$at_status_file"
2362#AT_STOP_1
2363#AT_START_2
2364at_fn_group_banner 2 'pipe.at:29' \
2365  "decompressing from stdin" "                       "
2366at_xfail=no
2367      test -f $XFAILFILE && at_xfail=yes
2368(
2369  $as_echo "2. $at_setup_line: testing $at_desc ..."
2370  $at_traceon
2371
2372
2373
2374
2375
2376
2377  { set +x
2378$as_echo "$at_srcdir/pipe.at:33:
2379mkdir v7
2380(cd v7
2381TEST_TAR_FORMAT=v7
2382export TEST_TAR_FORMAT
2383TAR_OPTIONS=\"-H v7\"
2384export TAR_OPTIONS
2385rm -rf *
2386
2387
2388test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2389
2390
2391mkdir directory
2392genfile --length 10240 --pattern zeros --file directory/file1
2393genfile --length 13 --file directory/file2
2394tar cf archive directory
2395mv directory orig
2396cat archive | tar xfv - --warning=no-timestamp | sort
2397echo \"separator\"
2398cmp orig/file1 directory/file1
2399echo \"separator\"
2400cmp orig/file2 directory/file2)"
2401at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2402( $at_check_trace;
2403mkdir v7
2404(cd v7
2405TEST_TAR_FORMAT=v7
2406export TEST_TAR_FORMAT
2407TAR_OPTIONS="-H v7"
2408export TAR_OPTIONS
2409rm -rf *
2410
2411
2412test -z "`sort < /dev/null 2>&1`" || exit 77
2413
2414
2415mkdir directory
2416genfile --length 10240 --pattern zeros --file directory/file1
2417genfile --length 13 --file directory/file2
2418tar cf archive directory
2419mv directory orig
2420cat archive | tar xfv - --warning=no-timestamp | sort
2421echo "separator"
2422cmp orig/file1 directory/file1
2423echo "separator"
2424cmp orig/file2 directory/file2)
2425) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2426at_status=$? at_failed=false
2427$at_check_filter
2428at_fn_diff_devnull "$at_stderr" || at_failed=:
2429echo >>"$at_stdout"; $as_echo "directory/
2430directory/file1
2431directory/file2
2432separator
2433separator
2434" | \
2435  $at_diff - "$at_stdout" || at_failed=:
2436at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2437$at_failed && at_fn_log_failure
2438$at_traceon; }
2439
2440              { set +x
2441$as_echo "$at_srcdir/pipe.at:33:
2442mkdir oldgnu
2443(cd oldgnu
2444TEST_TAR_FORMAT=oldgnu
2445export TEST_TAR_FORMAT
2446TAR_OPTIONS=\"-H oldgnu\"
2447export TAR_OPTIONS
2448rm -rf *
2449
2450
2451test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2452
2453
2454mkdir directory
2455genfile --length 10240 --pattern zeros --file directory/file1
2456genfile --length 13 --file directory/file2
2457tar cf archive directory
2458mv directory orig
2459cat archive | tar xfv - --warning=no-timestamp | sort
2460echo \"separator\"
2461cmp orig/file1 directory/file1
2462echo \"separator\"
2463cmp orig/file2 directory/file2)"
2464at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2465( $at_check_trace;
2466mkdir oldgnu
2467(cd oldgnu
2468TEST_TAR_FORMAT=oldgnu
2469export TEST_TAR_FORMAT
2470TAR_OPTIONS="-H oldgnu"
2471export TAR_OPTIONS
2472rm -rf *
2473
2474
2475test -z "`sort < /dev/null 2>&1`" || exit 77
2476
2477
2478mkdir directory
2479genfile --length 10240 --pattern zeros --file directory/file1
2480genfile --length 13 --file directory/file2
2481tar cf archive directory
2482mv directory orig
2483cat archive | tar xfv - --warning=no-timestamp | sort
2484echo "separator"
2485cmp orig/file1 directory/file1
2486echo "separator"
2487cmp orig/file2 directory/file2)
2488) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2489at_status=$? at_failed=false
2490$at_check_filter
2491at_fn_diff_devnull "$at_stderr" || at_failed=:
2492echo >>"$at_stdout"; $as_echo "directory/
2493directory/file1
2494directory/file2
2495separator
2496separator
2497" | \
2498  $at_diff - "$at_stdout" || at_failed=:
2499at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2500$at_failed && at_fn_log_failure
2501$at_traceon; }
2502
2503              { set +x
2504$as_echo "$at_srcdir/pipe.at:33:
2505mkdir ustar
2506(cd ustar
2507TEST_TAR_FORMAT=ustar
2508export TEST_TAR_FORMAT
2509TAR_OPTIONS=\"-H ustar\"
2510export TAR_OPTIONS
2511rm -rf *
2512
2513
2514test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2515
2516
2517mkdir directory
2518genfile --length 10240 --pattern zeros --file directory/file1
2519genfile --length 13 --file directory/file2
2520tar cf archive directory
2521mv directory orig
2522cat archive | tar xfv - --warning=no-timestamp | sort
2523echo \"separator\"
2524cmp orig/file1 directory/file1
2525echo \"separator\"
2526cmp orig/file2 directory/file2)"
2527at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2528( $at_check_trace;
2529mkdir ustar
2530(cd ustar
2531TEST_TAR_FORMAT=ustar
2532export TEST_TAR_FORMAT
2533TAR_OPTIONS="-H ustar"
2534export TAR_OPTIONS
2535rm -rf *
2536
2537
2538test -z "`sort < /dev/null 2>&1`" || exit 77
2539
2540
2541mkdir directory
2542genfile --length 10240 --pattern zeros --file directory/file1
2543genfile --length 13 --file directory/file2
2544tar cf archive directory
2545mv directory orig
2546cat archive | tar xfv - --warning=no-timestamp | sort
2547echo "separator"
2548cmp orig/file1 directory/file1
2549echo "separator"
2550cmp orig/file2 directory/file2)
2551) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2552at_status=$? at_failed=false
2553$at_check_filter
2554at_fn_diff_devnull "$at_stderr" || at_failed=:
2555echo >>"$at_stdout"; $as_echo "directory/
2556directory/file1
2557directory/file2
2558separator
2559separator
2560" | \
2561  $at_diff - "$at_stdout" || at_failed=:
2562at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2563$at_failed && at_fn_log_failure
2564$at_traceon; }
2565
2566              { set +x
2567$as_echo "$at_srcdir/pipe.at:33:
2568mkdir posix
2569(cd posix
2570TEST_TAR_FORMAT=posix
2571export TEST_TAR_FORMAT
2572TAR_OPTIONS=\"-H posix\"
2573export TAR_OPTIONS
2574rm -rf *
2575
2576
2577test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2578
2579
2580mkdir directory
2581genfile --length 10240 --pattern zeros --file directory/file1
2582genfile --length 13 --file directory/file2
2583tar cf archive directory
2584mv directory orig
2585cat archive | tar xfv - --warning=no-timestamp | sort
2586echo \"separator\"
2587cmp orig/file1 directory/file1
2588echo \"separator\"
2589cmp orig/file2 directory/file2)"
2590at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2591( $at_check_trace;
2592mkdir posix
2593(cd posix
2594TEST_TAR_FORMAT=posix
2595export TEST_TAR_FORMAT
2596TAR_OPTIONS="-H posix"
2597export TAR_OPTIONS
2598rm -rf *
2599
2600
2601test -z "`sort < /dev/null 2>&1`" || exit 77
2602
2603
2604mkdir directory
2605genfile --length 10240 --pattern zeros --file directory/file1
2606genfile --length 13 --file directory/file2
2607tar cf archive directory
2608mv directory orig
2609cat archive | tar xfv - --warning=no-timestamp | sort
2610echo "separator"
2611cmp orig/file1 directory/file1
2612echo "separator"
2613cmp orig/file2 directory/file2)
2614) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2615at_status=$? at_failed=false
2616$at_check_filter
2617at_fn_diff_devnull "$at_stderr" || at_failed=:
2618echo >>"$at_stdout"; $as_echo "directory/
2619directory/file1
2620directory/file2
2621separator
2622separator
2623" | \
2624  $at_diff - "$at_stdout" || at_failed=:
2625at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2626$at_failed && at_fn_log_failure
2627$at_traceon; }
2628
2629              { set +x
2630$as_echo "$at_srcdir/pipe.at:33:
2631mkdir gnu
2632(cd gnu
2633TEST_TAR_FORMAT=gnu
2634export TEST_TAR_FORMAT
2635TAR_OPTIONS=\"-H gnu\"
2636export TAR_OPTIONS
2637rm -rf *
2638
2639
2640test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2641
2642
2643mkdir directory
2644genfile --length 10240 --pattern zeros --file directory/file1
2645genfile --length 13 --file directory/file2
2646tar cf archive directory
2647mv directory orig
2648cat archive | tar xfv - --warning=no-timestamp | sort
2649echo \"separator\"
2650cmp orig/file1 directory/file1
2651echo \"separator\"
2652cmp orig/file2 directory/file2)"
2653at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2654( $at_check_trace;
2655mkdir gnu
2656(cd gnu
2657TEST_TAR_FORMAT=gnu
2658export TEST_TAR_FORMAT
2659TAR_OPTIONS="-H gnu"
2660export TAR_OPTIONS
2661rm -rf *
2662
2663
2664test -z "`sort < /dev/null 2>&1`" || exit 77
2665
2666
2667mkdir directory
2668genfile --length 10240 --pattern zeros --file directory/file1
2669genfile --length 13 --file directory/file2
2670tar cf archive directory
2671mv directory orig
2672cat archive | tar xfv - --warning=no-timestamp | sort
2673echo "separator"
2674cmp orig/file1 directory/file1
2675echo "separator"
2676cmp orig/file2 directory/file2)
2677) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2678at_status=$? at_failed=false
2679$at_check_filter
2680at_fn_diff_devnull "$at_stderr" || at_failed=:
2681echo >>"$at_stdout"; $as_echo "directory/
2682directory/file1
2683directory/file2
2684separator
2685separator
2686" | \
2687  $at_diff - "$at_stdout" || at_failed=:
2688at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2689$at_failed && at_fn_log_failure
2690$at_traceon; }
2691
2692
2693
2694
2695  set +x
2696  $at_times_p && times >"$at_times_file"
2697) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2698read at_status <"$at_status_file"
2699#AT_STOP_2
2700#AT_START_3
2701at_fn_group_banner 3 'options.at:24' \
2702  "mixing options" "                                 " 1
2703at_xfail=no
2704(
2705  $as_echo "3. $at_setup_line: testing $at_desc ..."
2706  $at_traceon
2707
2708
2709
2710{ set +x
2711$as_echo "$at_srcdir/options.at:27:
2712echo > file1
2713TAR_OPTIONS=--numeric-owner tar chof archive file1
2714tar tf archive
2715"
2716at_fn_check_prepare_notrace 'an embedded newline' "options.at:27"
2717( $at_check_trace;
2718echo > file1
2719TAR_OPTIONS=--numeric-owner tar chof archive file1
2720tar tf archive
2721
2722) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2723at_status=$? at_failed=false
2724$at_check_filter
2725at_fn_diff_devnull "$at_stderr" || at_failed=:
2726echo >>"$at_stdout"; $as_echo "file1
2727" | \
2728  $at_diff - "$at_stdout" || at_failed=:
2729at_fn_check_status 0 $at_status "$at_srcdir/options.at:27"
2730$at_failed && at_fn_log_failure
2731$at_traceon; }
2732
2733
2734  set +x
2735  $at_times_p && times >"$at_times_file"
2736) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2737read at_status <"$at_status_file"
2738#AT_STOP_3
2739#AT_START_4
2740at_fn_group_banner 4 'options02.at:26' \
2741  "interspersed options" "                           " 1
2742at_xfail=no
2743(
2744  $as_echo "4. $at_setup_line: testing $at_desc ..."
2745  $at_traceon
2746
2747
2748
2749{ set +x
2750$as_echo "$at_srcdir/options02.at:29:
2751echo > file1
2752tar c file1 -f archive
2753tar tf archive
2754"
2755at_fn_check_prepare_notrace 'an embedded newline' "options02.at:29"
2756( $at_check_trace;
2757echo > file1
2758tar c file1 -f archive
2759tar tf archive
2760
2761) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2762at_status=$? at_failed=false
2763$at_check_filter
2764at_fn_diff_devnull "$at_stderr" || at_failed=:
2765echo >>"$at_stdout"; $as_echo "file1
2766" | \
2767  $at_diff - "$at_stdout" || at_failed=:
2768at_fn_check_status 0 $at_status "$at_srcdir/options02.at:29"
2769$at_failed && at_fn_log_failure
2770$at_traceon; }
2771
2772
2773  set +x
2774  $at_times_p && times >"$at_times_file"
2775) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2776read at_status <"$at_status_file"
2777#AT_STOP_4
2778#AT_START_5
2779at_fn_group_banner 5 'options03.at:21' \
2780  "TAR_OPTIONS with string arguments" "              " 1
2781at_xfail=no
2782(
2783  $as_echo "5. $at_setup_line: testing $at_desc ..."
2784  $at_traceon
2785
2786
2787
2788# Check whether string values are passed correctly through the
2789# TAR_OPTIONS environment variable.  In tar 1.29 the stored values
2790# were inadvertenlty freedm which caused TAR_OPTION to malfunction.
2791# Reported by: Jan Larres <jan@majutsushi.net>
2792# References: <20160906072153.c75tga556ti5sgk2@majutsushi.net>,
2793#             http://lists.gnu.org/archive/html/bug-tar/2016-09/msg00005.html
2794
2795{ set +x
2796$as_echo "$at_srcdir/options03.at:31:
2797echo dir/bar > exclude.list
2798mkdir dir
2799genfile --file=dir/foo
2800genfile --file=dir/bar
2801TAR_OPTIONS=--exclude-from=exclude.list tar cf arc.tar dir
2802tar tf arc.tar
2803"
2804at_fn_check_prepare_notrace 'an embedded newline' "options03.at:31"
2805( $at_check_trace;
2806echo dir/bar > exclude.list
2807mkdir dir
2808genfile --file=dir/foo
2809genfile --file=dir/bar
2810TAR_OPTIONS=--exclude-from=exclude.list tar cf arc.tar dir
2811tar tf arc.tar
2812
2813) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2814at_status=$? at_failed=false
2815$at_check_filter
2816at_fn_diff_devnull "$at_stderr" || at_failed=:
2817echo >>"$at_stdout"; $as_echo "dir/
2818dir/foo
2819" | \
2820  $at_diff - "$at_stdout" || at_failed=:
2821at_fn_check_status 0 $at_status "$at_srcdir/options03.at:31"
2822$at_failed && at_fn_log_failure
2823$at_traceon; }
2824
2825
2826  set +x
2827  $at_times_p && times >"$at_times_file"
2828) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2829read at_status <"$at_status_file"
2830#AT_STOP_5
2831#AT_START_6
2832at_fn_group_banner 6 'opcomp01.at:21' \
2833  "occurrence compatibility" "                       " 2
2834at_xfail=no
2835(
2836  $as_echo "6. $at_setup_line: testing $at_desc ..."
2837  $at_traceon
2838
2839
2840
2841{ set +x
2842$as_echo "$at_srcdir/opcomp01.at:24:
2843tar --occurrence=1 -cf test.tar .
2844"
2845at_fn_check_prepare_notrace 'an embedded newline' "opcomp01.at:24"
2846( $at_check_trace;
2847tar --occurrence=1 -cf test.tar .
2848
2849) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2850at_status=$? at_failed=false
2851$at_check_filter
2852echo >>"$at_stderr"; $as_echo "tar: '--occurrence' cannot be used with '-c'
2853Try 'tar --help' or 'tar --usage' for more information.
2854" | \
2855  $at_diff - "$at_stderr" || at_failed=:
2856at_fn_diff_devnull "$at_stdout" || at_failed=:
2857at_fn_check_status 2 $at_status "$at_srcdir/opcomp01.at:24"
2858$at_failed && at_fn_log_failure
2859$at_traceon; }
2860
2861
2862  set +x
2863  $at_times_p && times >"$at_times_file"
2864) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2865read at_status <"$at_status_file"
2866#AT_STOP_6
2867#AT_START_7
2868at_fn_group_banner 7 'opcomp02.at:21' \
2869  "occurrence compatibility" "                       " 2
2870at_xfail=no
2871(
2872  $as_echo "7. $at_setup_line: testing $at_desc ..."
2873  $at_traceon
2874
2875
2876
2877{ set +x
2878$as_echo "$at_srcdir/opcomp02.at:24:
2879tar --occurrence=1 -tf test.tar
2880"
2881at_fn_check_prepare_notrace 'an embedded newline' "opcomp02.at:24"
2882( $at_check_trace;
2883tar --occurrence=1 -tf test.tar
2884
2885) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2886at_status=$? at_failed=false
2887$at_check_filter
2888echo >>"$at_stderr"; $as_echo "tar: --occurrence is meaningless without a file list
2889Try 'tar --help' or 'tar --usage' for more information.
2890" | \
2891  $at_diff - "$at_stderr" || at_failed=:
2892at_fn_diff_devnull "$at_stdout" || at_failed=:
2893at_fn_check_status 2 $at_status "$at_srcdir/opcomp02.at:24"
2894$at_failed && at_fn_log_failure
2895$at_traceon; }
2896
2897
2898  set +x
2899  $at_times_p && times >"$at_times_file"
2900) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2901read at_status <"$at_status_file"
2902#AT_STOP_7
2903#AT_START_8
2904at_fn_group_banner 8 'opcomp03.at:21' \
2905  "--verify compatibility" "                         " 2
2906at_xfail=no
2907(
2908  $as_echo "8. $at_setup_line: testing $at_desc ..."
2909  $at_traceon
2910
2911
2912
2913{ set +x
2914$as_echo "$at_srcdir/opcomp03.at:24:
2915tar -tWf test.tar .
2916"
2917at_fn_check_prepare_notrace 'an embedded newline' "opcomp03.at:24"
2918( $at_check_trace;
2919tar -tWf test.tar .
2920
2921) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2922at_status=$? at_failed=false
2923$at_check_filter
2924echo >>"$at_stderr"; $as_echo "tar: '--verify' cannot be used with '-t'
2925Try 'tar --help' or 'tar --usage' for more information.
2926" | \
2927  $at_diff - "$at_stderr" || at_failed=:
2928at_fn_diff_devnull "$at_stdout" || at_failed=:
2929at_fn_check_status 2 $at_status "$at_srcdir/opcomp03.at:24"
2930$at_failed && at_fn_log_failure
2931$at_traceon; }
2932
2933
2934  set +x
2935  $at_times_p && times >"$at_times_file"
2936) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2937read at_status <"$at_status_file"
2938#AT_STOP_8
2939#AT_START_9
2940at_fn_group_banner 9 'opcomp04.at:21' \
2941  "compress option compatibility" "                  " 2
2942at_xfail=no
2943(
2944  $as_echo "9. $at_setup_line: testing $at_desc ..."
2945  $at_traceon
2946
2947
2948
2949{ set +x
2950$as_echo "$at_srcdir/opcomp04.at:24:
2951
2952cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
2953
2954genfile --file file
2955tar czf test.tar file
2956genfile --file newfile
2957tar rzf test.tar newfile
2958"
2959at_fn_check_prepare_notrace 'an embedded newline' "opcomp04.at:24"
2960( $at_check_trace;
2961
2962cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
2963
2964genfile --file file
2965tar czf test.tar file
2966genfile --file newfile
2967tar rzf test.tar newfile
2968
2969) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2970at_status=$? at_failed=false
2971$at_check_filter
2972echo >>"$at_stderr"; $as_echo "tar: Cannot update compressed archives
2973Try 'tar --help' or 'tar --usage' for more information.
2974" | \
2975  $at_diff - "$at_stderr" || at_failed=:
2976at_fn_diff_devnull "$at_stdout" || at_failed=:
2977at_fn_check_status 2 $at_status "$at_srcdir/opcomp04.at:24"
2978$at_failed && at_fn_log_failure
2979$at_traceon; }
2980
2981
2982  set +x
2983  $at_times_p && times >"$at_times_file"
2984) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2985read at_status <"$at_status_file"
2986#AT_STOP_9
2987#AT_START_10
2988at_fn_group_banner 10 'opcomp05.at:21' \
2989  "--pax-option compatibility" "                     " 2
2990at_xfail=no
2991(
2992  $as_echo "10. $at_setup_line: testing $at_desc ..."
2993  $at_traceon
2994
2995
2996
2997{ set +x
2998$as_echo "$at_srcdir/opcomp05.at:24:
2999tar -Hgnu -cf test.tar --pax-option user:=root .
3000"
3001at_fn_check_prepare_notrace 'an embedded newline' "opcomp05.at:24"
3002( $at_check_trace;
3003tar -Hgnu -cf test.tar --pax-option user:=root .
3004
3005) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3006at_status=$? at_failed=false
3007$at_check_filter
3008echo >>"$at_stderr"; $as_echo "tar: --pax-option can be used only on POSIX archives
3009Try 'tar --help' or 'tar --usage' for more information.
3010" | \
3011  $at_diff - "$at_stderr" || at_failed=:
3012at_fn_diff_devnull "$at_stdout" || at_failed=:
3013at_fn_check_status 2 $at_status "$at_srcdir/opcomp05.at:24"
3014$at_failed && at_fn_log_failure
3015$at_traceon; }
3016
3017
3018  set +x
3019  $at_times_p && times >"$at_times_file"
3020) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3021read at_status <"$at_status_file"
3022#AT_STOP_10
3023#AT_START_11
3024at_fn_group_banner 11 'opcomp06.at:21' \
3025  "--pax-option compatibility" "                     " 2
3026at_xfail=no
3027(
3028  $as_echo "11. $at_setup_line: testing $at_desc ..."
3029  $at_traceon
3030
3031
3032
3033{ set +x
3034$as_echo "$at_srcdir/opcomp06.at:24:
3035
3036
3037  file=\$(TMPDIR=. mktemp fiXXXXXX)
3038
3039  setfacl -m u:\$UID:rwx \$file &> /dev/null
3040  if test \"\$?\" != 0; then
3041    exit 77
3042  fi
3043
3044
3045  getfacl \$file &> /dev/null
3046  if test \"\$?\" != 0; then
3047    exit 77
3048  fi
3049
3050  rm -rf \$file
3051
3052  file=\$(TMPDIR=. mktemp fiXXXXXX)
3053  setfacl -m u:\$UID:rwx \$file
3054  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
3055  if test \"\$err\" != \"0\"; then
3056    exit 77
3057  fi
3058
3059genfile --file file
3060tar -cf test.tar --acls -Hgnu file
3061"
3062at_fn_check_prepare_notrace 'a $(...) command substitution' "opcomp06.at:24"
3063( $at_check_trace;
3064
3065
3066  file=$(TMPDIR=. mktemp fiXXXXXX)
3067
3068  setfacl -m u:$UID:rwx $file &> /dev/null
3069  if test "$?" != 0; then
3070    exit 77
3071  fi
3072
3073
3074  getfacl $file &> /dev/null
3075  if test "$?" != 0; then
3076    exit 77
3077  fi
3078
3079  rm -rf $file
3080
3081  file=$(TMPDIR=. mktemp fiXXXXXX)
3082  setfacl -m u:$UID:rwx $file
3083  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
3084  if test "$err" != "0"; then
3085    exit 77
3086  fi
3087
3088genfile --file file
3089tar -cf test.tar --acls -Hgnu file
3090
3091) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3092at_status=$? at_failed=false
3093$at_check_filter
3094echo >>"$at_stderr"; $as_echo "tar: --acls can be used only on POSIX archives
3095Try 'tar --help' or 'tar --usage' for more information.
3096" | \
3097  $at_diff - "$at_stderr" || at_failed=:
3098at_fn_diff_devnull "$at_stdout" || at_failed=:
3099at_fn_check_status 2 $at_status "$at_srcdir/opcomp06.at:24"
3100$at_failed && at_fn_log_failure
3101$at_traceon; }
3102
3103
3104  set +x
3105  $at_times_p && times >"$at_times_file"
3106) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3107read at_status <"$at_status_file"
3108#AT_STOP_11
3109#AT_START_12
3110at_fn_group_banner 12 'defaults.at:16' \
3111  "checkpoint defaults" "                            " 3
3112at_xfail=no
3113(
3114  $as_echo "12. $at_setup_line: testing $at_desc ..."
3115  $at_traceon
3116
3117
3118{ set +x
3119$as_echo "$at_srcdir/defaults.at:18:
3120mkdir t
3121cd t
3122for i in 0 1 2 3 4 5 6 7 8 9
3123do
3124  genfile --length 10240 --file \$i
3125done
3126TAR_OPTIONS=-Hgnu
3127export TAR_OPTIONS
3128
3129tar --checkpoint -c -f ../a.tar .
3130
3131"
3132at_fn_check_prepare_notrace 'an embedded newline' "defaults.at:18"
3133( $at_check_trace;
3134mkdir t
3135cd t
3136for i in 0 1 2 3 4 5 6 7 8 9
3137do
3138  genfile --length 10240 --file $i
3139done
3140TAR_OPTIONS=-Hgnu
3141export TAR_OPTIONS
3142
3143tar --checkpoint -c -f ../a.tar .
3144
3145
3146) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3147at_status=$? at_failed=false
3148$at_check_filter
3149echo >>"$at_stderr"; $as_echo "tar: Write checkpoint 10
3150" | \
3151  $at_diff - "$at_stderr" || at_failed=:
3152at_fn_diff_devnull "$at_stdout" || at_failed=:
3153at_fn_check_status 0 $at_status "$at_srcdir/defaults.at:18"
3154$at_failed && at_fn_log_failure
3155$at_traceon; }
3156
3157  set +x
3158  $at_times_p && times >"$at_times_file"
3159) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3160read at_status <"$at_status_file"
3161#AT_STOP_12
3162#AT_START_13
3163at_fn_group_banner 13 'interval.at:16' \
3164  "checkpoint interval" "                            " 3
3165at_xfail=no
3166(
3167  $as_echo "13. $at_setup_line: testing $at_desc ..."
3168  $at_traceon
3169
3170
3171{ set +x
3172$as_echo "$at_srcdir/interval.at:18:
3173mkdir t
3174cd t
3175for i in 0 1 2 3 4 5 6 7 8 9
3176do
3177  genfile --length 10240 --file \$i
3178done
3179TAR_OPTIONS=-Hgnu
3180export TAR_OPTIONS
3181
3182tar --checkpoint=2 -c -f ../a.tar .
3183
3184"
3185at_fn_check_prepare_notrace 'an embedded newline' "interval.at:18"
3186( $at_check_trace;
3187mkdir t
3188cd t
3189for i in 0 1 2 3 4 5 6 7 8 9
3190do
3191  genfile --length 10240 --file $i
3192done
3193TAR_OPTIONS=-Hgnu
3194export TAR_OPTIONS
3195
3196tar --checkpoint=2 -c -f ../a.tar .
3197
3198
3199) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3200at_status=$? at_failed=false
3201$at_check_filter
3202echo >>"$at_stderr"; $as_echo "tar: Write checkpoint 2
3203tar: Write checkpoint 4
3204tar: Write checkpoint 6
3205tar: Write checkpoint 8
3206tar: Write checkpoint 10
3207" | \
3208  $at_diff - "$at_stderr" || at_failed=:
3209at_fn_diff_devnull "$at_stdout" || at_failed=:
3210at_fn_check_status 0 $at_status "$at_srcdir/interval.at:18"
3211$at_failed && at_fn_log_failure
3212$at_traceon; }
3213
3214  set +x
3215  $at_times_p && times >"$at_times_file"
3216) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3217read at_status <"$at_status_file"
3218#AT_STOP_13
3219#AT_START_14
3220at_fn_group_banner 14 'dot.at:16' \
3221  "dot action" "                                     " 3
3222at_xfail=no
3223(
3224  $as_echo "14. $at_setup_line: testing $at_desc ..."
3225  $at_traceon
3226
3227
3228{ set +x
3229$as_echo "$at_srcdir/dot.at:18:
3230mkdir t
3231cd t
3232for i in 0 1 2 3 4 5 6 7 8 9
3233do
3234  genfile --length 10240 --file \$i
3235done
3236TAR_OPTIONS=-Hgnu
3237export TAR_OPTIONS
3238
3239tar --checkpoint-action=dot -c -f ../a.tar .
3240
3241"
3242at_fn_check_prepare_notrace 'an embedded newline' "dot.at:18"
3243( $at_check_trace;
3244mkdir t
3245cd t
3246for i in 0 1 2 3 4 5 6 7 8 9
3247do
3248  genfile --length 10240 --file $i
3249done
3250TAR_OPTIONS=-Hgnu
3251export TAR_OPTIONS
3252
3253tar --checkpoint-action=dot -c -f ../a.tar .
3254
3255
3256) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3257at_status=$? at_failed=false
3258$at_check_filter
3259at_fn_diff_devnull "$at_stderr" || at_failed=:
3260echo >>"$at_stdout"; $as_echo "." | \
3261  $at_diff - "$at_stdout" || at_failed=:
3262at_fn_check_status 0 $at_status "$at_srcdir/dot.at:18"
3263$at_failed && at_fn_log_failure
3264$at_traceon; }
3265
3266  set +x
3267  $at_times_p && times >"$at_times_file"
3268) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3269read at_status <"$at_status_file"
3270#AT_STOP_14
3271#AT_START_15
3272at_fn_group_banner 15 'dot-compat.at:16' \
3273  "dot action (compatibility syntax)" "              " 3
3274at_xfail=no
3275(
3276  $as_echo "15. $at_setup_line: testing $at_desc ..."
3277  $at_traceon
3278
3279
3280{ set +x
3281$as_echo "$at_srcdir/dot-compat.at:18:
3282mkdir t
3283cd t
3284for i in 0 1 2 3 4 5 6 7 8 9
3285do
3286  genfile --length 10240 --file \$i
3287done
3288TAR_OPTIONS=-Hgnu
3289export TAR_OPTIONS
3290
3291tar --checkpoint=.2 -c -f ../a.tar .
3292
3293"
3294at_fn_check_prepare_notrace 'an embedded newline' "dot-compat.at:18"
3295( $at_check_trace;
3296mkdir t
3297cd t
3298for i in 0 1 2 3 4 5 6 7 8 9
3299do
3300  genfile --length 10240 --file $i
3301done
3302TAR_OPTIONS=-Hgnu
3303export TAR_OPTIONS
3304
3305tar --checkpoint=.2 -c -f ../a.tar .
3306
3307
3308) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3309at_status=$? at_failed=false
3310$at_check_filter
3311at_fn_diff_devnull "$at_stderr" || at_failed=:
3312echo >>"$at_stdout"; $as_echo "....." | \
3313  $at_diff - "$at_stdout" || at_failed=:
3314at_fn_check_status 0 $at_status "$at_srcdir/dot-compat.at:18"
3315$at_failed && at_fn_log_failure
3316$at_traceon; }
3317
3318  set +x
3319  $at_times_p && times >"$at_times_file"
3320) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3321read at_status <"$at_status_file"
3322#AT_STOP_15
3323#AT_START_16
3324at_fn_group_banner 16 'dot-int.at:16' \
3325  "dot action and interval" "                        " 3
3326at_xfail=no
3327(
3328  $as_echo "16. $at_setup_line: testing $at_desc ..."
3329  $at_traceon
3330
3331
3332{ set +x
3333$as_echo "$at_srcdir/dot-int.at:18:
3334mkdir t
3335cd t
3336for i in 0 1 2 3 4 5 6 7 8 9
3337do
3338  genfile --length 10240 --file \$i
3339done
3340TAR_OPTIONS=-Hgnu
3341export TAR_OPTIONS
3342
3343tar --checkpoint-action=dot --checkpoint=2 -c -f ../a.tar .
3344
3345"
3346at_fn_check_prepare_notrace 'an embedded newline' "dot-int.at:18"
3347( $at_check_trace;
3348mkdir t
3349cd t
3350for i in 0 1 2 3 4 5 6 7 8 9
3351do
3352  genfile --length 10240 --file $i
3353done
3354TAR_OPTIONS=-Hgnu
3355export TAR_OPTIONS
3356
3357tar --checkpoint-action=dot --checkpoint=2 -c -f ../a.tar .
3358
3359
3360) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3361at_status=$? at_failed=false
3362$at_check_filter
3363at_fn_diff_devnull "$at_stderr" || at_failed=:
3364echo >>"$at_stdout"; $as_echo "....." | \
3365  $at_diff - "$at_stdout" || at_failed=:
3366at_fn_check_status 0 $at_status "$at_srcdir/dot-int.at:18"
3367$at_failed && at_fn_log_failure
3368$at_traceon; }
3369
3370  set +x
3371  $at_times_p && times >"$at_times_file"
3372) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3373read at_status <"$at_status_file"
3374#AT_STOP_16
3375#AT_START_17
3376at_fn_group_banner 17 'testsuite.at:242' \
3377  "compress: gzip" "                                 " 4
3378at_xfail=no
3379(
3380  $as_echo "17. $at_setup_line: testing $at_desc ..."
3381  $at_traceon
3382
3383
3384
3385{ set +x
3386$as_echo "$at_srcdir/testsuite.at:242:
3387
3388cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
3389
3390unset TAR_OPTIONS
3391
3392touch empty
3393set -e
3394: create with --gzip
3395tar --gzip -cf k.tar.gz empty
3396tar tf k.tar.gz
3397
3398
3399echo testing .gz
3400tar -acf k2.tar.gz empty
3401cat k2.tar.gz | gzip -d > k.gz.tar
3402tar tf k.gz.tar
3403
3404echo testing .tgz
3405tar -acf k2.tar.tgz empty
3406cat k2.tar.tgz | gzip -d > k.tgz.tar
3407tar tf k.tgz.tar
3408
3409
3410# Extraction: ensure compressed format is correctly recognized
3411rm -f empty
3412tar xf k.tar.gz
3413test -f empty
3414"
3415at_fn_check_prepare_notrace 'an embedded newline' "testsuite.at:242"
3416( $at_check_trace;
3417
3418cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
3419
3420unset TAR_OPTIONS
3421
3422touch empty
3423set -e
3424: create with --gzip
3425tar --gzip -cf k.tar.gz empty
3426tar tf k.tar.gz
3427
3428
3429echo testing .gz
3430tar -acf k2.tar.gz empty
3431cat k2.tar.gz | gzip -d > k.gz.tar
3432tar tf k.gz.tar
3433
3434echo testing .tgz
3435tar -acf k2.tar.tgz empty
3436cat k2.tar.tgz | gzip -d > k.tgz.tar
3437tar tf k.tgz.tar
3438
3439
3440# Extraction: ensure compressed format is correctly recognized
3441rm -f empty
3442tar xf k.tar.gz
3443test -f empty
3444
3445) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3446at_status=$? at_failed=false
3447$at_check_filter
3448at_fn_diff_devnull "$at_stderr" || at_failed=:
3449echo >>"$at_stdout"; $as_echo "empty
3450testing .gz
3451empty
3452testing .tgz
3453empty
3454" | \
3455  $at_diff - "$at_stdout" || at_failed=:
3456at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:242"
3457$at_failed && at_fn_log_failure
3458$at_traceon; }
3459
3460
3461  set +x
3462  $at_times_p && times >"$at_times_file"
3463) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3464read at_status <"$at_status_file"
3465#AT_STOP_17
3466#AT_START_18
3467at_fn_group_banner 18 'testsuite.at:243' \
3468  "compress: bzip2" "                                " 4
3469at_xfail=no
3470(
3471  $as_echo "18. $at_setup_line: testing $at_desc ..."
3472  $at_traceon
3473
3474
3475
3476{ set +x
3477$as_echo "$at_srcdir/testsuite.at:243:
3478
3479cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
3480
3481unset TAR_OPTIONS
3482
3483touch empty
3484set -e
3485: create with --bzip2
3486tar --bzip2 -cf k.tar.bz2 empty
3487tar tf k.tar.bz2
3488
3489
3490echo testing .bz2
3491tar -acf k2.tar.bz2 empty
3492cat k2.tar.bz2 | bzip2 -d > k.bz2.tar
3493tar tf k.bz2.tar
3494
3495echo testing .tbz2
3496tar -acf k2.tar.tbz2 empty
3497cat k2.tar.tbz2 | bzip2 -d > k.tbz2.tar
3498tar tf k.tbz2.tar
3499
3500
3501# Extraction: ensure compressed format is correctly recognized
3502rm -f empty
3503tar xf k.tar.bz2
3504test -f empty
3505"
3506at_fn_check_prepare_notrace 'an embedded newline' "testsuite.at:243"
3507( $at_check_trace;
3508
3509cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
3510
3511unset TAR_OPTIONS
3512
3513touch empty
3514set -e
3515: create with --bzip2
3516tar --bzip2 -cf k.tar.bz2 empty
3517tar tf k.tar.bz2
3518
3519
3520echo testing .bz2
3521tar -acf k2.tar.bz2 empty
3522cat k2.tar.bz2 | bzip2 -d > k.bz2.tar
3523tar tf k.bz2.tar
3524
3525echo testing .tbz2
3526tar -acf k2.tar.tbz2 empty
3527cat k2.tar.tbz2 | bzip2 -d > k.tbz2.tar
3528tar tf k.tbz2.tar
3529
3530
3531# Extraction: ensure compressed format is correctly recognized
3532rm -f empty
3533tar xf k.tar.bz2
3534test -f empty
3535
3536) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3537at_status=$? at_failed=false
3538$at_check_filter
3539at_fn_diff_devnull "$at_stderr" || at_failed=:
3540echo >>"$at_stdout"; $as_echo "empty
3541testing .bz2
3542empty
3543testing .tbz2
3544empty
3545" | \
3546  $at_diff - "$at_stdout" || at_failed=:
3547at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:243"
3548$at_failed && at_fn_log_failure
3549$at_traceon; }
3550
3551
3552  set +x
3553  $at_times_p && times >"$at_times_file"
3554) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3555read at_status <"$at_status_file"
3556#AT_STOP_18
3557#AT_START_19
3558at_fn_group_banner 19 'testsuite.at:244' \
3559  "compress: xz" "                                   " 4
3560at_xfail=no
3561(
3562  $as_echo "19. $at_setup_line: testing $at_desc ..."
3563  $at_traceon
3564
3565
3566
3567{ set +x
3568$as_echo "$at_srcdir/testsuite.at:244:
3569
3570cat /dev/null | xz - > /dev/null 2>&1 || exit 77
3571
3572unset TAR_OPTIONS
3573
3574touch empty
3575set -e
3576: create with --xz
3577tar --xz -cf k.tar.xz empty
3578tar tf k.tar.xz
3579
3580
3581echo testing .xz
3582tar -acf k2.tar.xz empty
3583cat k2.tar.xz | xz -d > k.xz.tar
3584tar tf k.xz.tar
3585
3586echo testing .txz
3587tar -acf k2.tar.txz empty
3588cat k2.tar.txz | xz -d > k.txz.tar
3589tar tf k.txz.tar
3590
3591
3592# Extraction: ensure compressed format is correctly recognized
3593rm -f empty
3594tar xf k.tar.xz
3595test -f empty
3596"
3597at_fn_check_prepare_notrace 'an embedded newline' "testsuite.at:244"
3598( $at_check_trace;
3599
3600cat /dev/null | xz - > /dev/null 2>&1 || exit 77
3601
3602unset TAR_OPTIONS
3603
3604touch empty
3605set -e
3606: create with --xz
3607tar --xz -cf k.tar.xz empty
3608tar tf k.tar.xz
3609
3610
3611echo testing .xz
3612tar -acf k2.tar.xz empty
3613cat k2.tar.xz | xz -d > k.xz.tar
3614tar tf k.xz.tar
3615
3616echo testing .txz
3617tar -acf k2.tar.txz empty
3618cat k2.tar.txz | xz -d > k.txz.tar
3619tar tf k.txz.tar
3620
3621
3622# Extraction: ensure compressed format is correctly recognized
3623rm -f empty
3624tar xf k.tar.xz
3625test -f empty
3626
3627) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3628at_status=$? at_failed=false
3629$at_check_filter
3630at_fn_diff_devnull "$at_stderr" || at_failed=:
3631echo >>"$at_stdout"; $as_echo "empty
3632testing .xz
3633empty
3634testing .txz
3635empty
3636" | \
3637  $at_diff - "$at_stdout" || at_failed=:
3638at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:244"
3639$at_failed && at_fn_log_failure
3640$at_traceon; }
3641
3642
3643  set +x
3644  $at_times_p && times >"$at_times_file"
3645) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3646read at_status <"$at_status_file"
3647#AT_STOP_19
3648#AT_START_20
3649at_fn_group_banner 20 'testsuite.at:246' \
3650  "compress: lzip" "                                 " 4
3651at_xfail=no
3652(
3653  $as_echo "20. $at_setup_line: testing $at_desc ..."
3654  $at_traceon
3655
3656
3657
3658{ set +x
3659$as_echo "$at_srcdir/testsuite.at:246:
3660
3661cat /dev/null | lzip - > /dev/null 2>&1 || exit 77
3662
3663unset TAR_OPTIONS
3664
3665touch empty
3666set -e
3667: create with --lzip
3668tar --lzip -cf k.tar.lz empty
3669tar tf k.tar.lz
3670
3671
3672echo testing .lz
3673tar -acf k2.tar.lz empty
3674cat k2.tar.lz | lzip -d > k.lz.tar
3675tar tf k.lz.tar
3676
3677
3678# Extraction: ensure compressed format is correctly recognized
3679rm -f empty
3680tar xf k.tar.lz
3681test -f empty
3682"
3683at_fn_check_prepare_notrace 'an embedded newline' "testsuite.at:246"
3684( $at_check_trace;
3685
3686cat /dev/null | lzip - > /dev/null 2>&1 || exit 77
3687
3688unset TAR_OPTIONS
3689
3690touch empty
3691set -e
3692: create with --lzip
3693tar --lzip -cf k.tar.lz empty
3694tar tf k.tar.lz
3695
3696
3697echo testing .lz
3698tar -acf k2.tar.lz empty
3699cat k2.tar.lz | lzip -d > k.lz.tar
3700tar tf k.lz.tar
3701
3702
3703# Extraction: ensure compressed format is correctly recognized
3704rm -f empty
3705tar xf k.tar.lz
3706test -f empty
3707
3708) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3709at_status=$? at_failed=false
3710$at_check_filter
3711at_fn_diff_devnull "$at_stderr" || at_failed=:
3712echo >>"$at_stdout"; $as_echo "empty
3713testing .lz
3714empty
3715" | \
3716  $at_diff - "$at_stdout" || at_failed=:
3717at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:246"
3718$at_failed && at_fn_log_failure
3719$at_traceon; }
3720
3721
3722  set +x
3723  $at_times_p && times >"$at_times_file"
3724) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3725read at_status <"$at_status_file"
3726#AT_STOP_20
3727#AT_START_21
3728at_fn_group_banner 21 'testsuite.at:247' \
3729  "compress: lzop" "                                 " 4
3730at_xfail=no
3731(
3732  $as_echo "21. $at_setup_line: testing $at_desc ..."
3733  $at_traceon
3734
3735
3736
3737{ set +x
3738$as_echo "$at_srcdir/testsuite.at:247:
3739
3740cat /dev/null | lzop - > /dev/null 2>&1 || exit 77
3741
3742unset TAR_OPTIONS
3743
3744touch empty
3745set -e
3746: create with --lzop
3747tar --lzop -cf k.tar.lzo empty
3748tar tf k.tar.lzo
3749
3750
3751echo testing .lzo
3752tar -acf k2.tar.lzo empty
3753cat k2.tar.lzo | lzop -d > k.lzo.tar
3754tar tf k.lzo.tar
3755
3756
3757# Extraction: ensure compressed format is correctly recognized
3758rm -f empty
3759tar xf k.tar.lzo
3760test -f empty
3761"
3762at_fn_check_prepare_notrace 'an embedded newline' "testsuite.at:247"
3763( $at_check_trace;
3764
3765cat /dev/null | lzop - > /dev/null 2>&1 || exit 77
3766
3767unset TAR_OPTIONS
3768
3769touch empty
3770set -e
3771: create with --lzop
3772tar --lzop -cf k.tar.lzo empty
3773tar tf k.tar.lzo
3774
3775
3776echo testing .lzo
3777tar -acf k2.tar.lzo empty
3778cat k2.tar.lzo | lzop -d > k.lzo.tar
3779tar tf k.lzo.tar
3780
3781
3782# Extraction: ensure compressed format is correctly recognized
3783rm -f empty
3784tar xf k.tar.lzo
3785test -f empty
3786
3787) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3788at_status=$? at_failed=false
3789$at_check_filter
3790at_fn_diff_devnull "$at_stderr" || at_failed=:
3791echo >>"$at_stdout"; $as_echo "empty
3792testing .lzo
3793empty
3794" | \
3795  $at_diff - "$at_stdout" || at_failed=:
3796at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:247"
3797$at_failed && at_fn_log_failure
3798$at_traceon; }
3799
3800
3801  set +x
3802  $at_times_p && times >"$at_times_file"
3803) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3804read at_status <"$at_status_file"
3805#AT_STOP_21
3806#AT_START_22
3807at_fn_group_banner 22 'testsuite.at:248' \
3808  "compress: zstd" "                                 " 4
3809at_xfail=no
3810(
3811  $as_echo "22. $at_setup_line: testing $at_desc ..."
3812  $at_traceon
3813
3814
3815
3816{ set +x
3817$as_echo "$at_srcdir/testsuite.at:248:
3818
3819cat /dev/null | zstd - > /dev/null 2>&1 || exit 77
3820
3821unset TAR_OPTIONS
3822
3823touch empty
3824set -e
3825: create with --zstd
3826tar --zstd -cf k.tar.zst empty
3827tar tf k.tar.zst
3828
3829
3830echo testing .zst
3831tar -acf k2.tar.zst empty
3832cat k2.tar.zst | zstd -d > k.zst.tar
3833tar tf k.zst.tar
3834
3835echo testing .tzst
3836tar -acf k2.tar.tzst empty
3837cat k2.tar.tzst | zstd -d > k.tzst.tar
3838tar tf k.tzst.tar
3839
3840
3841# Extraction: ensure compressed format is correctly recognized
3842rm -f empty
3843tar xf k.tar.zst
3844test -f empty
3845"
3846at_fn_check_prepare_notrace 'an embedded newline' "testsuite.at:248"
3847( $at_check_trace;
3848
3849cat /dev/null | zstd - > /dev/null 2>&1 || exit 77
3850
3851unset TAR_OPTIONS
3852
3853touch empty
3854set -e
3855: create with --zstd
3856tar --zstd -cf k.tar.zst empty
3857tar tf k.tar.zst
3858
3859
3860echo testing .zst
3861tar -acf k2.tar.zst empty
3862cat k2.tar.zst | zstd -d > k.zst.tar
3863tar tf k.zst.tar
3864
3865echo testing .tzst
3866tar -acf k2.tar.tzst empty
3867cat k2.tar.tzst | zstd -d > k.tzst.tar
3868tar tf k.tzst.tar
3869
3870
3871# Extraction: ensure compressed format is correctly recognized
3872rm -f empty
3873tar xf k.tar.zst
3874test -f empty
3875
3876) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3877at_status=$? at_failed=false
3878$at_check_filter
3879at_fn_diff_devnull "$at_stderr" || at_failed=:
3880echo >>"$at_stdout"; $as_echo "empty
3881testing .zst
3882empty
3883testing .tzst
3884empty
3885" | \
3886  $at_diff - "$at_stdout" || at_failed=:
3887at_fn_check_status 0 $at_status "$at_srcdir/testsuite.at:248"
3888$at_failed && at_fn_log_failure
3889$at_traceon; }
3890
3891
3892  set +x
3893  $at_times_p && times >"$at_times_file"
3894) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3895read at_status <"$at_status_file"
3896#AT_STOP_22
3897#AT_START_23
3898at_fn_group_banner 23 'positional01.at:21' \
3899  "Exclude" "                                        " 5
3900at_xfail=no
3901(
3902  $as_echo "23. $at_setup_line: testing $at_desc ..."
3903  $at_traceon
3904
3905
3906
3907{ set +x
3908$as_echo "$at_srcdir/positional01.at:24:
3909
3910test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
3911
3912mkdir dir
3913> dir/A.a
3914> dir/B.a
3915> dir/A.b
3916tar -cf a.tar --exclude '*.b' dir
3917echo \$?
3918tar -tf a.tar | sort
3919tar -cf a.tar dir --exclude '*.b'
3920echo \$?
3921tar -tf a.tar | sort
3922"
3923at_fn_check_prepare_notrace 'a `...` command substitution' "positional01.at:24"
3924( $at_check_trace;
3925
3926test -z "`sort < /dev/null 2>&1`" || exit 77
3927
3928mkdir dir
3929> dir/A.a
3930> dir/B.a
3931> dir/A.b
3932tar -cf a.tar --exclude '*.b' dir
3933echo $?
3934tar -tf a.tar | sort
3935tar -cf a.tar dir --exclude '*.b'
3936echo $?
3937tar -tf a.tar | sort
3938
3939) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3940at_status=$? at_failed=false
3941$at_check_filter
3942echo >>"$at_stderr"; $as_echo "tar: The following options were used after any non-optional arguments in archive create or update mode.  These options are positional and affect only arguments that follow them.  Please, rearrange them properly.
3943tar: --exclude '*.b' has no effect
3944tar: Exiting with failure status due to previous errors
3945" | \
3946  $at_diff - "$at_stderr" || at_failed=:
3947echo >>"$at_stdout"; $as_echo "0
3948dir/
3949dir/A.a
3950dir/B.a
39512
3952dir/
3953dir/A.a
3954dir/A.b
3955dir/B.a
3956" | \
3957  $at_diff - "$at_stdout" || at_failed=:
3958at_fn_check_status 0 $at_status "$at_srcdir/positional01.at:24"
3959$at_failed && at_fn_log_failure
3960$at_traceon; }
3961
3962
3963  set +x
3964  $at_times_p && times >"$at_times_file"
3965) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3966read at_status <"$at_status_file"
3967#AT_STOP_23
3968#AT_START_24
3969at_fn_group_banner 24 'positional02.at:21' \
3970  "Directory" "                                      " 5
3971at_xfail=no
3972(
3973  $as_echo "24. $at_setup_line: testing $at_desc ..."
3974  $at_traceon
3975
3976
3977
3978{ set +x
3979$as_echo "$at_srcdir/positional02.at:24:
3980
3981test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
3982
3983mkdir dir
3984> dir/A.a
3985> dir/B.a
3986> dir/A.b
3987tar -cf a.tar -C dir .
3988echo \$?
3989tar -tf a.tar | sort
3990tar -cf a.tar . -C dir
3991"
3992at_fn_check_prepare_notrace 'a `...` command substitution' "positional02.at:24"
3993( $at_check_trace;
3994
3995test -z "`sort < /dev/null 2>&1`" || exit 77
3996
3997mkdir dir
3998> dir/A.a
3999> dir/B.a
4000> dir/A.b
4001tar -cf a.tar -C dir .
4002echo $?
4003tar -tf a.tar | sort
4004tar -cf a.tar . -C dir
4005
4006) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4007at_status=$? at_failed=false
4008$at_check_filter
4009echo >>"$at_stderr"; $as_echo "tar: ./a.tar: file is the archive; not dumped
4010tar: The following options were used after any non-optional arguments in archive create or update mode.  These options are positional and affect only arguments that follow them.  Please, rearrange them properly.
4011tar: -C 'dir' has no effect
4012tar: Exiting with failure status due to previous errors
4013" | \
4014  $at_diff - "$at_stderr" || at_failed=:
4015echo >>"$at_stdout"; $as_echo "0
4016./
4017./A.a
4018./A.b
4019./B.a
4020" | \
4021  $at_diff - "$at_stdout" || at_failed=:
4022at_fn_check_status 2 $at_status "$at_srcdir/positional02.at:24"
4023$at_failed && at_fn_log_failure
4024$at_traceon; }
4025
4026
4027  set +x
4028  $at_times_p && times >"$at_times_file"
4029) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4030read at_status <"$at_status_file"
4031#AT_STOP_24
4032#AT_START_25
4033at_fn_group_banner 25 'positional03.at:21' \
4034  "Several options" "                                " 5
4035at_xfail=no
4036(
4037  $as_echo "25. $at_setup_line: testing $at_desc ..."
4038  $at_traceon
4039
4040
4041
4042{ set +x
4043$as_echo "$at_srcdir/positional03.at:24:
4044
4045test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4046
4047mkdir t
4048cd t
4049mkdir dir
4050> dir/A.a
4051> dir/B.a
4052> dir/A.b
4053tar -vcf ../a.tar --exclude '*.b' . -C dir --exclude '*.c' | sort
4054"
4055at_fn_check_prepare_notrace 'a `...` command substitution' "positional03.at:24"
4056( $at_check_trace;
4057
4058test -z "`sort < /dev/null 2>&1`" || exit 77
4059
4060mkdir t
4061cd t
4062mkdir dir
4063> dir/A.a
4064> dir/B.a
4065> dir/A.b
4066tar -vcf ../a.tar --exclude '*.b' . -C dir --exclude '*.c' | sort
4067
4068) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4069at_status=$? at_failed=false
4070$at_check_filter
4071echo >>"$at_stderr"; $as_echo "tar: The following options were used after any non-optional arguments in archive create or update mode.  These options are positional and affect only arguments that follow them.  Please, rearrange them properly.
4072tar: -C 'dir' has no effect
4073tar: --exclude '*.c' has no effect
4074tar: Exiting with failure status due to previous errors
4075" | \
4076  $at_diff - "$at_stderr" || at_failed=:
4077echo >>"$at_stdout"; $as_echo "./
4078./dir/
4079./dir/A.a
4080./dir/B.a
4081" | \
4082  $at_diff - "$at_stdout" || at_failed=:
4083at_fn_check_status 0 $at_status "$at_srcdir/positional03.at:24"
4084$at_failed && at_fn_log_failure
4085$at_traceon; }
4086
4087
4088  set +x
4089  $at_times_p && times >"$at_times_file"
4090) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4091read at_status <"$at_status_file"
4092#AT_STOP_25
4093#AT_START_26
4094at_fn_group_banner 26 'add-file.at:21' \
4095  "The --add-file option" "                          " 5
4096at_xfail=no
4097      test -f $XFAILFILE && at_xfail=yes
4098(
4099  $as_echo "26. $at_setup_line: testing $at_desc ..."
4100  $at_traceon
4101
4102
4103
4104# Version 1.29 would give "tar: Cowardly refusing to create an empty archive"
4105# if only --add-file arguments were used, and would give "tar: unhandled
4106# positional option 0" when handling the --add-file if at least one file was
4107# also given normally.
4108#
4109# Reported by: James Clarke <jrtc27@jrtc27.com>
4110# References: <20161112000246.77013-1-jrtc27@jrtc27.com>,
4111#             http://lists.gnu.org/archive/html/bug-tar/2016-11/msg00013.html
4112
4113
4114
4115  { set +x
4116$as_echo "$at_srcdir/add-file.at:33:
4117mkdir v7
4118(cd v7
4119TEST_TAR_FORMAT=v7
4120export TEST_TAR_FORMAT
4121TAR_OPTIONS=\"-H v7\"
4122export TAR_OPTIONS
4123rm -rf *
4124
4125genfile --file -File
4126genfile --file foo
4127genfile --file bar
4128
4129echo 1:
4130tar -cvf arc.tar --add-file foo --add-file -File
4131
4132echo 2:
4133tar -cvf arc.tar foo --add-file -File bar
4134
4135
4136cat >input <<'_ATEOF'
4137foo
4138--add-file=-File
4139bar
4140_ATEOF
4141
4142
4143echo 3:
4144tar -cvf arc.tar -T input
4145)"
4146at_fn_check_prepare_notrace 'an embedded newline' "add-file.at:33"
4147( $at_check_trace;
4148mkdir v7
4149(cd v7
4150TEST_TAR_FORMAT=v7
4151export TEST_TAR_FORMAT
4152TAR_OPTIONS="-H v7"
4153export TAR_OPTIONS
4154rm -rf *
4155
4156genfile --file -File
4157genfile --file foo
4158genfile --file bar
4159
4160echo 1:
4161tar -cvf arc.tar --add-file foo --add-file -File
4162
4163echo 2:
4164tar -cvf arc.tar foo --add-file -File bar
4165
4166
4167cat >input <<'_ATEOF'
4168foo
4169--add-file=-File
4170bar
4171_ATEOF
4172
4173
4174echo 3:
4175tar -cvf arc.tar -T input
4176)
4177) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4178at_status=$? at_failed=false
4179$at_check_filter
4180at_fn_diff_devnull "$at_stderr" || at_failed=:
4181echo >>"$at_stdout"; $as_echo "1:
4182foo
4183-File
41842:
4185foo
4186-File
4187bar
41883:
4189foo
4190-File
4191bar
4192" | \
4193  $at_diff - "$at_stdout" || at_failed=:
4194at_fn_check_status 0 $at_status "$at_srcdir/add-file.at:33"
4195$at_failed && at_fn_log_failure
4196$at_traceon; }
4197
4198              { set +x
4199$as_echo "$at_srcdir/add-file.at:33:
4200mkdir oldgnu
4201(cd oldgnu
4202TEST_TAR_FORMAT=oldgnu
4203export TEST_TAR_FORMAT
4204TAR_OPTIONS=\"-H oldgnu\"
4205export TAR_OPTIONS
4206rm -rf *
4207
4208genfile --file -File
4209genfile --file foo
4210genfile --file bar
4211
4212echo 1:
4213tar -cvf arc.tar --add-file foo --add-file -File
4214
4215echo 2:
4216tar -cvf arc.tar foo --add-file -File bar
4217
4218
4219cat >input <<'_ATEOF'
4220foo
4221--add-file=-File
4222bar
4223_ATEOF
4224
4225
4226echo 3:
4227tar -cvf arc.tar -T input
4228)"
4229at_fn_check_prepare_notrace 'an embedded newline' "add-file.at:33"
4230( $at_check_trace;
4231mkdir oldgnu
4232(cd oldgnu
4233TEST_TAR_FORMAT=oldgnu
4234export TEST_TAR_FORMAT
4235TAR_OPTIONS="-H oldgnu"
4236export TAR_OPTIONS
4237rm -rf *
4238
4239genfile --file -File
4240genfile --file foo
4241genfile --file bar
4242
4243echo 1:
4244tar -cvf arc.tar --add-file foo --add-file -File
4245
4246echo 2:
4247tar -cvf arc.tar foo --add-file -File bar
4248
4249
4250cat >input <<'_ATEOF'
4251foo
4252--add-file=-File
4253bar
4254_ATEOF
4255
4256
4257echo 3:
4258tar -cvf arc.tar -T input
4259)
4260) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4261at_status=$? at_failed=false
4262$at_check_filter
4263at_fn_diff_devnull "$at_stderr" || at_failed=:
4264echo >>"$at_stdout"; $as_echo "1:
4265foo
4266-File
42672:
4268foo
4269-File
4270bar
42713:
4272foo
4273-File
4274bar
4275" | \
4276  $at_diff - "$at_stdout" || at_failed=:
4277at_fn_check_status 0 $at_status "$at_srcdir/add-file.at:33"
4278$at_failed && at_fn_log_failure
4279$at_traceon; }
4280
4281              { set +x
4282$as_echo "$at_srcdir/add-file.at:33:
4283mkdir ustar
4284(cd ustar
4285TEST_TAR_FORMAT=ustar
4286export TEST_TAR_FORMAT
4287TAR_OPTIONS=\"-H ustar\"
4288export TAR_OPTIONS
4289rm -rf *
4290
4291genfile --file -File
4292genfile --file foo
4293genfile --file bar
4294
4295echo 1:
4296tar -cvf arc.tar --add-file foo --add-file -File
4297
4298echo 2:
4299tar -cvf arc.tar foo --add-file -File bar
4300
4301
4302cat >input <<'_ATEOF'
4303foo
4304--add-file=-File
4305bar
4306_ATEOF
4307
4308
4309echo 3:
4310tar -cvf arc.tar -T input
4311)"
4312at_fn_check_prepare_notrace 'an embedded newline' "add-file.at:33"
4313( $at_check_trace;
4314mkdir ustar
4315(cd ustar
4316TEST_TAR_FORMAT=ustar
4317export TEST_TAR_FORMAT
4318TAR_OPTIONS="-H ustar"
4319export TAR_OPTIONS
4320rm -rf *
4321
4322genfile --file -File
4323genfile --file foo
4324genfile --file bar
4325
4326echo 1:
4327tar -cvf arc.tar --add-file foo --add-file -File
4328
4329echo 2:
4330tar -cvf arc.tar foo --add-file -File bar
4331
4332
4333cat >input <<'_ATEOF'
4334foo
4335--add-file=-File
4336bar
4337_ATEOF
4338
4339
4340echo 3:
4341tar -cvf arc.tar -T input
4342)
4343) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4344at_status=$? at_failed=false
4345$at_check_filter
4346at_fn_diff_devnull "$at_stderr" || at_failed=:
4347echo >>"$at_stdout"; $as_echo "1:
4348foo
4349-File
43502:
4351foo
4352-File
4353bar
43543:
4355foo
4356-File
4357bar
4358" | \
4359  $at_diff - "$at_stdout" || at_failed=:
4360at_fn_check_status 0 $at_status "$at_srcdir/add-file.at:33"
4361$at_failed && at_fn_log_failure
4362$at_traceon; }
4363
4364              { set +x
4365$as_echo "$at_srcdir/add-file.at:33:
4366mkdir posix
4367(cd posix
4368TEST_TAR_FORMAT=posix
4369export TEST_TAR_FORMAT
4370TAR_OPTIONS=\"-H posix\"
4371export TAR_OPTIONS
4372rm -rf *
4373
4374genfile --file -File
4375genfile --file foo
4376genfile --file bar
4377
4378echo 1:
4379tar -cvf arc.tar --add-file foo --add-file -File
4380
4381echo 2:
4382tar -cvf arc.tar foo --add-file -File bar
4383
4384
4385cat >input <<'_ATEOF'
4386foo
4387--add-file=-File
4388bar
4389_ATEOF
4390
4391
4392echo 3:
4393tar -cvf arc.tar -T input
4394)"
4395at_fn_check_prepare_notrace 'an embedded newline' "add-file.at:33"
4396( $at_check_trace;
4397mkdir posix
4398(cd posix
4399TEST_TAR_FORMAT=posix
4400export TEST_TAR_FORMAT
4401TAR_OPTIONS="-H posix"
4402export TAR_OPTIONS
4403rm -rf *
4404
4405genfile --file -File
4406genfile --file foo
4407genfile --file bar
4408
4409echo 1:
4410tar -cvf arc.tar --add-file foo --add-file -File
4411
4412echo 2:
4413tar -cvf arc.tar foo --add-file -File bar
4414
4415
4416cat >input <<'_ATEOF'
4417foo
4418--add-file=-File
4419bar
4420_ATEOF
4421
4422
4423echo 3:
4424tar -cvf arc.tar -T input
4425)
4426) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4427at_status=$? at_failed=false
4428$at_check_filter
4429at_fn_diff_devnull "$at_stderr" || at_failed=:
4430echo >>"$at_stdout"; $as_echo "1:
4431foo
4432-File
44332:
4434foo
4435-File
4436bar
44373:
4438foo
4439-File
4440bar
4441" | \
4442  $at_diff - "$at_stdout" || at_failed=:
4443at_fn_check_status 0 $at_status "$at_srcdir/add-file.at:33"
4444$at_failed && at_fn_log_failure
4445$at_traceon; }
4446
4447              { set +x
4448$as_echo "$at_srcdir/add-file.at:33:
4449mkdir gnu
4450(cd gnu
4451TEST_TAR_FORMAT=gnu
4452export TEST_TAR_FORMAT
4453TAR_OPTIONS=\"-H gnu\"
4454export TAR_OPTIONS
4455rm -rf *
4456
4457genfile --file -File
4458genfile --file foo
4459genfile --file bar
4460
4461echo 1:
4462tar -cvf arc.tar --add-file foo --add-file -File
4463
4464echo 2:
4465tar -cvf arc.tar foo --add-file -File bar
4466
4467
4468cat >input <<'_ATEOF'
4469foo
4470--add-file=-File
4471bar
4472_ATEOF
4473
4474
4475echo 3:
4476tar -cvf arc.tar -T input
4477)"
4478at_fn_check_prepare_notrace 'an embedded newline' "add-file.at:33"
4479( $at_check_trace;
4480mkdir gnu
4481(cd gnu
4482TEST_TAR_FORMAT=gnu
4483export TEST_TAR_FORMAT
4484TAR_OPTIONS="-H gnu"
4485export TAR_OPTIONS
4486rm -rf *
4487
4488genfile --file -File
4489genfile --file foo
4490genfile --file bar
4491
4492echo 1:
4493tar -cvf arc.tar --add-file foo --add-file -File
4494
4495echo 2:
4496tar -cvf arc.tar foo --add-file -File bar
4497
4498
4499cat >input <<'_ATEOF'
4500foo
4501--add-file=-File
4502bar
4503_ATEOF
4504
4505
4506echo 3:
4507tar -cvf arc.tar -T input
4508)
4509) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4510at_status=$? at_failed=false
4511$at_check_filter
4512at_fn_diff_devnull "$at_stderr" || at_failed=:
4513echo >>"$at_stdout"; $as_echo "1:
4514foo
4515-File
45162:
4517foo
4518-File
4519bar
45203:
4521foo
4522-File
4523bar
4524" | \
4525  $at_diff - "$at_stdout" || at_failed=:
4526at_fn_check_status 0 $at_status "$at_srcdir/add-file.at:33"
4527$at_failed && at_fn_log_failure
4528$at_traceon; }
4529
4530
4531
4532
4533  set +x
4534  $at_times_p && times >"$at_times_file"
4535) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4536read at_status <"$at_status_file"
4537#AT_STOP_26
4538#AT_START_27
4539at_fn_group_banner 27 'T-mult.at:21' \
4540  "multiple file lists" "                            " 6
4541at_xfail=no
4542      test -f $XFAILFILE && at_xfail=yes
4543(
4544  $as_echo "27. $at_setup_line: testing $at_desc ..."
4545  $at_traceon
4546
4547
4548
4549
4550
4551  { set +x
4552$as_echo "$at_srcdir/T-mult.at:24:
4553mkdir ustar
4554(cd ustar
4555TEST_TAR_FORMAT=ustar
4556export TEST_TAR_FORMAT
4557TAR_OPTIONS=\"-H ustar\"
4558export TAR_OPTIONS
4559rm -rf *
4560
4561>file1
4562>file2
4563>file3
4564>file4
4565cat >F1 <<'_ATEOF'
4566file1
4567file2
4568_ATEOF
4569
4570cat >F2 <<'_ATEOF'
4571file3
4572file4
4573_ATEOF
4574
4575tar cf archive -T F1 -T F2
4576tar tf archive
4577)"
4578at_fn_check_prepare_notrace 'an embedded newline' "T-mult.at:24"
4579( $at_check_trace;
4580mkdir ustar
4581(cd ustar
4582TEST_TAR_FORMAT=ustar
4583export TEST_TAR_FORMAT
4584TAR_OPTIONS="-H ustar"
4585export TAR_OPTIONS
4586rm -rf *
4587
4588>file1
4589>file2
4590>file3
4591>file4
4592cat >F1 <<'_ATEOF'
4593file1
4594file2
4595_ATEOF
4596
4597cat >F2 <<'_ATEOF'
4598file3
4599file4
4600_ATEOF
4601
4602tar cf archive -T F1 -T F2
4603tar tf archive
4604)
4605) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4606at_status=$? at_failed=false
4607$at_check_filter
4608at_fn_diff_devnull "$at_stderr" || at_failed=:
4609echo >>"$at_stdout"; $as_echo "file1
4610file2
4611file3
4612file4
4613" | \
4614  $at_diff - "$at_stdout" || at_failed=:
4615at_fn_check_status 0 $at_status "$at_srcdir/T-mult.at:24"
4616$at_failed && at_fn_log_failure
4617$at_traceon; }
4618
4619
4620
4621
4622  set +x
4623  $at_times_p && times >"$at_times_file"
4624) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4625read at_status <"$at_status_file"
4626#AT_STOP_27
4627#AT_START_28
4628at_fn_group_banner 28 'T-nest.at:21' \
4629  "nested file lists" "                              " 6
4630at_xfail=no
4631      test -f $XFAILFILE && at_xfail=yes
4632(
4633  $as_echo "28. $at_setup_line: testing $at_desc ..."
4634  $at_traceon
4635
4636
4637
4638
4639
4640  { set +x
4641$as_echo "$at_srcdir/T-nest.at:24:
4642mkdir ustar
4643(cd ustar
4644TEST_TAR_FORMAT=ustar
4645export TEST_TAR_FORMAT
4646TAR_OPTIONS=\"-H ustar\"
4647export TAR_OPTIONS
4648rm -rf *
4649
4650>file1
4651>file2
4652>file3
4653>file4
4654cat >F1 <<'_ATEOF'
4655file1
4656-T F2
4657file2
4658_ATEOF
4659
4660cat >F2 <<'_ATEOF'
4661file3
4662file4
4663_ATEOF
4664
4665tar cf archive -T F1
4666tar tf archive
4667)"
4668at_fn_check_prepare_notrace 'an embedded newline' "T-nest.at:24"
4669( $at_check_trace;
4670mkdir ustar
4671(cd ustar
4672TEST_TAR_FORMAT=ustar
4673export TEST_TAR_FORMAT
4674TAR_OPTIONS="-H ustar"
4675export TAR_OPTIONS
4676rm -rf *
4677
4678>file1
4679>file2
4680>file3
4681>file4
4682cat >F1 <<'_ATEOF'
4683file1
4684-T F2
4685file2
4686_ATEOF
4687
4688cat >F2 <<'_ATEOF'
4689file3
4690file4
4691_ATEOF
4692
4693tar cf archive -T F1
4694tar tf archive
4695)
4696) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4697at_status=$? at_failed=false
4698$at_check_filter
4699at_fn_diff_devnull "$at_stderr" || at_failed=:
4700echo >>"$at_stdout"; $as_echo "file1
4701file3
4702file4
4703file2
4704" | \
4705  $at_diff - "$at_stdout" || at_failed=:
4706at_fn_check_status 0 $at_status "$at_srcdir/T-nest.at:24"
4707$at_failed && at_fn_log_failure
4708$at_traceon; }
4709
4710
4711
4712
4713  set +x
4714  $at_times_p && times >"$at_times_file"
4715) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4716read at_status <"$at_status_file"
4717#AT_STOP_28
4718#AT_START_29
4719at_fn_group_banner 29 'T-rec.at:21' \
4720  "recursive file lists" "                           " 6
4721at_xfail=no
4722      test -f $XFAILFILE && at_xfail=yes
4723(
4724  $as_echo "29. $at_setup_line: testing $at_desc ..."
4725  $at_traceon
4726
4727
4728
4729
4730
4731  { set +x
4732$as_echo "$at_srcdir/T-rec.at:24:
4733mkdir ustar
4734(cd ustar
4735TEST_TAR_FORMAT=ustar
4736export TEST_TAR_FORMAT
4737TAR_OPTIONS=\"-H ustar\"
4738export TAR_OPTIONS
4739rm -rf *
4740
4741>file1
4742>file2
4743cat >F1 <<'_ATEOF'
4744file1
4745-T F2
4746_ATEOF
4747
4748cat >F2 <<'_ATEOF'
4749file2
4750-T F1
4751_ATEOF
4752
4753tar cf archive -T F1
4754echo \$?
4755tar tf archive
4756)"
4757at_fn_check_prepare_notrace 'an embedded newline' "T-rec.at:24"
4758( $at_check_trace;
4759mkdir ustar
4760(cd ustar
4761TEST_TAR_FORMAT=ustar
4762export TEST_TAR_FORMAT
4763TAR_OPTIONS="-H ustar"
4764export TAR_OPTIONS
4765rm -rf *
4766
4767>file1
4768>file2
4769cat >F1 <<'_ATEOF'
4770file1
4771-T F2
4772_ATEOF
4773
4774cat >F2 <<'_ATEOF'
4775file2
4776-T F1
4777_ATEOF
4778
4779tar cf archive -T F1
4780echo $?
4781tar tf archive
4782)
4783) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4784at_status=$? at_failed=false
4785$at_check_filter
4786echo >>"$at_stderr"; $as_echo "tar: F1: file list requested from F2 already read from command line
4787tar: Exiting with failure status due to previous errors
4788" | \
4789  $at_diff - "$at_stderr" || at_failed=:
4790echo >>"$at_stdout"; $as_echo "2
4791file1
4792file2
4793" | \
4794  $at_diff - "$at_stdout" || at_failed=:
4795at_fn_check_status 0 $at_status "$at_srcdir/T-rec.at:24"
4796$at_failed && at_fn_log_failure
4797$at_traceon; }
4798
4799
4800
4801
4802  set +x
4803  $at_times_p && times >"$at_times_file"
4804) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4805read at_status <"$at_status_file"
4806#AT_STOP_29
4807#AT_START_30
4808at_fn_group_banner 30 'T-recurse.at:27' \
4809  "files-from & recurse: toggle" "                   " 6
4810at_xfail=no
4811      test -f $XFAILFILE && at_xfail=yes
4812(
4813  $as_echo "30. $at_setup_line: testing $at_desc ..."
4814  $at_traceon
4815
4816
4817
4818
4819
4820  { set +x
4821$as_echo "$at_srcdir/T-recurse.at:30:
4822mkdir v7
4823(cd v7
4824TEST_TAR_FORMAT=v7
4825export TEST_TAR_FORMAT
4826TAR_OPTIONS=\"-H v7\"
4827export TAR_OPTIONS
4828rm -rf *
4829
4830mkdir directory1 directory2
4831touch directory1/file directory2/file
4832
4833cat >F1 <<'_ATEOF'
4834--no-recursion
4835directory1/
4836--recursion
4837directory2/
4838_ATEOF
4839
4840
4841cat >F2A <<'_ATEOF'
4842directory1/
4843_ATEOF
4844
4845
4846cat >F2B <<'_ATEOF'
4847directory2/
4848_ATEOF
4849
4850
4851a=archive
4852tar cf \"\$a\" --files-from F1
4853tar tf \"\$a\"
4854
4855a=archive2
4856tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
4857tar tf \"\$a\"
4858)"
4859at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
4860( $at_check_trace;
4861mkdir v7
4862(cd v7
4863TEST_TAR_FORMAT=v7
4864export TEST_TAR_FORMAT
4865TAR_OPTIONS="-H v7"
4866export TAR_OPTIONS
4867rm -rf *
4868
4869mkdir directory1 directory2
4870touch directory1/file directory2/file
4871
4872cat >F1 <<'_ATEOF'
4873--no-recursion
4874directory1/
4875--recursion
4876directory2/
4877_ATEOF
4878
4879
4880cat >F2A <<'_ATEOF'
4881directory1/
4882_ATEOF
4883
4884
4885cat >F2B <<'_ATEOF'
4886directory2/
4887_ATEOF
4888
4889
4890a=archive
4891tar cf "$a" --files-from F1
4892tar tf "$a"
4893
4894a=archive2
4895tar cf "$a" --no-recursion -T F2A --recursion -T F2B
4896tar tf "$a"
4897)
4898) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4899at_status=$? at_failed=false
4900$at_check_filter
4901at_fn_diff_devnull "$at_stderr" || at_failed=:
4902echo >>"$at_stdout"; $as_echo "directory1/
4903directory2/
4904directory2/file
4905directory1/
4906directory2/
4907directory2/file
4908" | \
4909  $at_diff - "$at_stdout" || at_failed=:
4910at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
4911$at_failed && at_fn_log_failure
4912$at_traceon; }
4913
4914              { set +x
4915$as_echo "$at_srcdir/T-recurse.at:30:
4916mkdir oldgnu
4917(cd oldgnu
4918TEST_TAR_FORMAT=oldgnu
4919export TEST_TAR_FORMAT
4920TAR_OPTIONS=\"-H oldgnu\"
4921export TAR_OPTIONS
4922rm -rf *
4923
4924mkdir directory1 directory2
4925touch directory1/file directory2/file
4926
4927cat >F1 <<'_ATEOF'
4928--no-recursion
4929directory1/
4930--recursion
4931directory2/
4932_ATEOF
4933
4934
4935cat >F2A <<'_ATEOF'
4936directory1/
4937_ATEOF
4938
4939
4940cat >F2B <<'_ATEOF'
4941directory2/
4942_ATEOF
4943
4944
4945a=archive
4946tar cf \"\$a\" --files-from F1
4947tar tf \"\$a\"
4948
4949a=archive2
4950tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
4951tar tf \"\$a\"
4952)"
4953at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
4954( $at_check_trace;
4955mkdir oldgnu
4956(cd oldgnu
4957TEST_TAR_FORMAT=oldgnu
4958export TEST_TAR_FORMAT
4959TAR_OPTIONS="-H oldgnu"
4960export TAR_OPTIONS
4961rm -rf *
4962
4963mkdir directory1 directory2
4964touch directory1/file directory2/file
4965
4966cat >F1 <<'_ATEOF'
4967--no-recursion
4968directory1/
4969--recursion
4970directory2/
4971_ATEOF
4972
4973
4974cat >F2A <<'_ATEOF'
4975directory1/
4976_ATEOF
4977
4978
4979cat >F2B <<'_ATEOF'
4980directory2/
4981_ATEOF
4982
4983
4984a=archive
4985tar cf "$a" --files-from F1
4986tar tf "$a"
4987
4988a=archive2
4989tar cf "$a" --no-recursion -T F2A --recursion -T F2B
4990tar tf "$a"
4991)
4992) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4993at_status=$? at_failed=false
4994$at_check_filter
4995at_fn_diff_devnull "$at_stderr" || at_failed=:
4996echo >>"$at_stdout"; $as_echo "directory1/
4997directory2/
4998directory2/file
4999directory1/
5000directory2/
5001directory2/file
5002" | \
5003  $at_diff - "$at_stdout" || at_failed=:
5004at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
5005$at_failed && at_fn_log_failure
5006$at_traceon; }
5007
5008              { set +x
5009$as_echo "$at_srcdir/T-recurse.at:30:
5010mkdir ustar
5011(cd ustar
5012TEST_TAR_FORMAT=ustar
5013export TEST_TAR_FORMAT
5014TAR_OPTIONS=\"-H ustar\"
5015export TAR_OPTIONS
5016rm -rf *
5017
5018mkdir directory1 directory2
5019touch directory1/file directory2/file
5020
5021cat >F1 <<'_ATEOF'
5022--no-recursion
5023directory1/
5024--recursion
5025directory2/
5026_ATEOF
5027
5028
5029cat >F2A <<'_ATEOF'
5030directory1/
5031_ATEOF
5032
5033
5034cat >F2B <<'_ATEOF'
5035directory2/
5036_ATEOF
5037
5038
5039a=archive
5040tar cf \"\$a\" --files-from F1
5041tar tf \"\$a\"
5042
5043a=archive2
5044tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
5045tar tf \"\$a\"
5046)"
5047at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
5048( $at_check_trace;
5049mkdir ustar
5050(cd ustar
5051TEST_TAR_FORMAT=ustar
5052export TEST_TAR_FORMAT
5053TAR_OPTIONS="-H ustar"
5054export TAR_OPTIONS
5055rm -rf *
5056
5057mkdir directory1 directory2
5058touch directory1/file directory2/file
5059
5060cat >F1 <<'_ATEOF'
5061--no-recursion
5062directory1/
5063--recursion
5064directory2/
5065_ATEOF
5066
5067
5068cat >F2A <<'_ATEOF'
5069directory1/
5070_ATEOF
5071
5072
5073cat >F2B <<'_ATEOF'
5074directory2/
5075_ATEOF
5076
5077
5078a=archive
5079tar cf "$a" --files-from F1
5080tar tf "$a"
5081
5082a=archive2
5083tar cf "$a" --no-recursion -T F2A --recursion -T F2B
5084tar tf "$a"
5085)
5086) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5087at_status=$? at_failed=false
5088$at_check_filter
5089at_fn_diff_devnull "$at_stderr" || at_failed=:
5090echo >>"$at_stdout"; $as_echo "directory1/
5091directory2/
5092directory2/file
5093directory1/
5094directory2/
5095directory2/file
5096" | \
5097  $at_diff - "$at_stdout" || at_failed=:
5098at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
5099$at_failed && at_fn_log_failure
5100$at_traceon; }
5101
5102              { set +x
5103$as_echo "$at_srcdir/T-recurse.at:30:
5104mkdir posix
5105(cd posix
5106TEST_TAR_FORMAT=posix
5107export TEST_TAR_FORMAT
5108TAR_OPTIONS=\"-H posix\"
5109export TAR_OPTIONS
5110rm -rf *
5111
5112mkdir directory1 directory2
5113touch directory1/file directory2/file
5114
5115cat >F1 <<'_ATEOF'
5116--no-recursion
5117directory1/
5118--recursion
5119directory2/
5120_ATEOF
5121
5122
5123cat >F2A <<'_ATEOF'
5124directory1/
5125_ATEOF
5126
5127
5128cat >F2B <<'_ATEOF'
5129directory2/
5130_ATEOF
5131
5132
5133a=archive
5134tar cf \"\$a\" --files-from F1
5135tar tf \"\$a\"
5136
5137a=archive2
5138tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
5139tar tf \"\$a\"
5140)"
5141at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
5142( $at_check_trace;
5143mkdir posix
5144(cd posix
5145TEST_TAR_FORMAT=posix
5146export TEST_TAR_FORMAT
5147TAR_OPTIONS="-H posix"
5148export TAR_OPTIONS
5149rm -rf *
5150
5151mkdir directory1 directory2
5152touch directory1/file directory2/file
5153
5154cat >F1 <<'_ATEOF'
5155--no-recursion
5156directory1/
5157--recursion
5158directory2/
5159_ATEOF
5160
5161
5162cat >F2A <<'_ATEOF'
5163directory1/
5164_ATEOF
5165
5166
5167cat >F2B <<'_ATEOF'
5168directory2/
5169_ATEOF
5170
5171
5172a=archive
5173tar cf "$a" --files-from F1
5174tar tf "$a"
5175
5176a=archive2
5177tar cf "$a" --no-recursion -T F2A --recursion -T F2B
5178tar tf "$a"
5179)
5180) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5181at_status=$? at_failed=false
5182$at_check_filter
5183at_fn_diff_devnull "$at_stderr" || at_failed=:
5184echo >>"$at_stdout"; $as_echo "directory1/
5185directory2/
5186directory2/file
5187directory1/
5188directory2/
5189directory2/file
5190" | \
5191  $at_diff - "$at_stdout" || at_failed=:
5192at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
5193$at_failed && at_fn_log_failure
5194$at_traceon; }
5195
5196              { set +x
5197$as_echo "$at_srcdir/T-recurse.at:30:
5198mkdir gnu
5199(cd gnu
5200TEST_TAR_FORMAT=gnu
5201export TEST_TAR_FORMAT
5202TAR_OPTIONS=\"-H gnu\"
5203export TAR_OPTIONS
5204rm -rf *
5205
5206mkdir directory1 directory2
5207touch directory1/file directory2/file
5208
5209cat >F1 <<'_ATEOF'
5210--no-recursion
5211directory1/
5212--recursion
5213directory2/
5214_ATEOF
5215
5216
5217cat >F2A <<'_ATEOF'
5218directory1/
5219_ATEOF
5220
5221
5222cat >F2B <<'_ATEOF'
5223directory2/
5224_ATEOF
5225
5226
5227a=archive
5228tar cf \"\$a\" --files-from F1
5229tar tf \"\$a\"
5230
5231a=archive2
5232tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
5233tar tf \"\$a\"
5234)"
5235at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
5236( $at_check_trace;
5237mkdir gnu
5238(cd gnu
5239TEST_TAR_FORMAT=gnu
5240export TEST_TAR_FORMAT
5241TAR_OPTIONS="-H gnu"
5242export TAR_OPTIONS
5243rm -rf *
5244
5245mkdir directory1 directory2
5246touch directory1/file directory2/file
5247
5248cat >F1 <<'_ATEOF'
5249--no-recursion
5250directory1/
5251--recursion
5252directory2/
5253_ATEOF
5254
5255
5256cat >F2A <<'_ATEOF'
5257directory1/
5258_ATEOF
5259
5260
5261cat >F2B <<'_ATEOF'
5262directory2/
5263_ATEOF
5264
5265
5266a=archive
5267tar cf "$a" --files-from F1
5268tar tf "$a"
5269
5270a=archive2
5271tar cf "$a" --no-recursion -T F2A --recursion -T F2B
5272tar tf "$a"
5273)
5274) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5275at_status=$? at_failed=false
5276$at_check_filter
5277at_fn_diff_devnull "$at_stderr" || at_failed=:
5278echo >>"$at_stdout"; $as_echo "directory1/
5279directory2/
5280directory2/file
5281directory1/
5282directory2/
5283directory2/file
5284" | \
5285  $at_diff - "$at_stdout" || at_failed=:
5286at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
5287$at_failed && at_fn_log_failure
5288$at_traceon; }
5289
5290
5291
5292
5293  set +x
5294  $at_times_p && times >"$at_times_file"
5295) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5296read at_status <"$at_status_file"
5297#AT_STOP_30
5298#AT_START_31
5299at_fn_group_banner 31 'T-recurse.at:66' \
5300  "toggle --recursion (not) from -T" "               " 6
5301at_xfail=no
5302      test -f $XFAILFILE && at_xfail=yes
5303(
5304  $as_echo "31. $at_setup_line: testing $at_desc ..."
5305  $at_traceon
5306
5307
5308
5309
5310
5311  { set +x
5312$as_echo "$at_srcdir/T-recurse.at:69:
5313mkdir v7
5314(cd v7
5315TEST_TAR_FORMAT=v7
5316export TEST_TAR_FORMAT
5317TAR_OPTIONS=\"-H v7\"
5318export TAR_OPTIONS
5319rm -rf *
5320
5321mkdir directory1 directory2
5322touch directory1/file directory2/file
5323
5324cat >F1 <<'_ATEOF'
5325--no-recursion
5326directory1/
5327_ATEOF
5328
5329
5330cat >F2 <<'_ATEOF'
5331directory2/
5332_ATEOF
5333
5334
5335tar cf archive -T F1 --recursion -T F2
5336tar tf archive
5337
5338)"
5339at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
5340( $at_check_trace;
5341mkdir v7
5342(cd v7
5343TEST_TAR_FORMAT=v7
5344export TEST_TAR_FORMAT
5345TAR_OPTIONS="-H v7"
5346export TAR_OPTIONS
5347rm -rf *
5348
5349mkdir directory1 directory2
5350touch directory1/file directory2/file
5351
5352cat >F1 <<'_ATEOF'
5353--no-recursion
5354directory1/
5355_ATEOF
5356
5357
5358cat >F2 <<'_ATEOF'
5359directory2/
5360_ATEOF
5361
5362
5363tar cf archive -T F1 --recursion -T F2
5364tar tf archive
5365
5366)
5367) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5368at_status=$? at_failed=false
5369$at_check_filter
5370at_fn_diff_devnull "$at_stderr" || at_failed=:
5371echo >>"$at_stdout"; $as_echo "directory1/
5372directory2/
5373directory2/file
5374" | \
5375  $at_diff - "$at_stdout" || at_failed=:
5376at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
5377$at_failed && at_fn_log_failure
5378$at_traceon; }
5379
5380              { set +x
5381$as_echo "$at_srcdir/T-recurse.at:69:
5382mkdir oldgnu
5383(cd oldgnu
5384TEST_TAR_FORMAT=oldgnu
5385export TEST_TAR_FORMAT
5386TAR_OPTIONS=\"-H oldgnu\"
5387export TAR_OPTIONS
5388rm -rf *
5389
5390mkdir directory1 directory2
5391touch directory1/file directory2/file
5392
5393cat >F1 <<'_ATEOF'
5394--no-recursion
5395directory1/
5396_ATEOF
5397
5398
5399cat >F2 <<'_ATEOF'
5400directory2/
5401_ATEOF
5402
5403
5404tar cf archive -T F1 --recursion -T F2
5405tar tf archive
5406
5407)"
5408at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
5409( $at_check_trace;
5410mkdir oldgnu
5411(cd oldgnu
5412TEST_TAR_FORMAT=oldgnu
5413export TEST_TAR_FORMAT
5414TAR_OPTIONS="-H oldgnu"
5415export TAR_OPTIONS
5416rm -rf *
5417
5418mkdir directory1 directory2
5419touch directory1/file directory2/file
5420
5421cat >F1 <<'_ATEOF'
5422--no-recursion
5423directory1/
5424_ATEOF
5425
5426
5427cat >F2 <<'_ATEOF'
5428directory2/
5429_ATEOF
5430
5431
5432tar cf archive -T F1 --recursion -T F2
5433tar tf archive
5434
5435)
5436) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5437at_status=$? at_failed=false
5438$at_check_filter
5439at_fn_diff_devnull "$at_stderr" || at_failed=:
5440echo >>"$at_stdout"; $as_echo "directory1/
5441directory2/
5442directory2/file
5443" | \
5444  $at_diff - "$at_stdout" || at_failed=:
5445at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
5446$at_failed && at_fn_log_failure
5447$at_traceon; }
5448
5449              { set +x
5450$as_echo "$at_srcdir/T-recurse.at:69:
5451mkdir ustar
5452(cd ustar
5453TEST_TAR_FORMAT=ustar
5454export TEST_TAR_FORMAT
5455TAR_OPTIONS=\"-H ustar\"
5456export TAR_OPTIONS
5457rm -rf *
5458
5459mkdir directory1 directory2
5460touch directory1/file directory2/file
5461
5462cat >F1 <<'_ATEOF'
5463--no-recursion
5464directory1/
5465_ATEOF
5466
5467
5468cat >F2 <<'_ATEOF'
5469directory2/
5470_ATEOF
5471
5472
5473tar cf archive -T F1 --recursion -T F2
5474tar tf archive
5475
5476)"
5477at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
5478( $at_check_trace;
5479mkdir ustar
5480(cd ustar
5481TEST_TAR_FORMAT=ustar
5482export TEST_TAR_FORMAT
5483TAR_OPTIONS="-H ustar"
5484export TAR_OPTIONS
5485rm -rf *
5486
5487mkdir directory1 directory2
5488touch directory1/file directory2/file
5489
5490cat >F1 <<'_ATEOF'
5491--no-recursion
5492directory1/
5493_ATEOF
5494
5495
5496cat >F2 <<'_ATEOF'
5497directory2/
5498_ATEOF
5499
5500
5501tar cf archive -T F1 --recursion -T F2
5502tar tf archive
5503
5504)
5505) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5506at_status=$? at_failed=false
5507$at_check_filter
5508at_fn_diff_devnull "$at_stderr" || at_failed=:
5509echo >>"$at_stdout"; $as_echo "directory1/
5510directory2/
5511directory2/file
5512" | \
5513  $at_diff - "$at_stdout" || at_failed=:
5514at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
5515$at_failed && at_fn_log_failure
5516$at_traceon; }
5517
5518              { set +x
5519$as_echo "$at_srcdir/T-recurse.at:69:
5520mkdir posix
5521(cd posix
5522TEST_TAR_FORMAT=posix
5523export TEST_TAR_FORMAT
5524TAR_OPTIONS=\"-H posix\"
5525export TAR_OPTIONS
5526rm -rf *
5527
5528mkdir directory1 directory2
5529touch directory1/file directory2/file
5530
5531cat >F1 <<'_ATEOF'
5532--no-recursion
5533directory1/
5534_ATEOF
5535
5536
5537cat >F2 <<'_ATEOF'
5538directory2/
5539_ATEOF
5540
5541
5542tar cf archive -T F1 --recursion -T F2
5543tar tf archive
5544
5545)"
5546at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
5547( $at_check_trace;
5548mkdir posix
5549(cd posix
5550TEST_TAR_FORMAT=posix
5551export TEST_TAR_FORMAT
5552TAR_OPTIONS="-H posix"
5553export TAR_OPTIONS
5554rm -rf *
5555
5556mkdir directory1 directory2
5557touch directory1/file directory2/file
5558
5559cat >F1 <<'_ATEOF'
5560--no-recursion
5561directory1/
5562_ATEOF
5563
5564
5565cat >F2 <<'_ATEOF'
5566directory2/
5567_ATEOF
5568
5569
5570tar cf archive -T F1 --recursion -T F2
5571tar tf archive
5572
5573)
5574) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5575at_status=$? at_failed=false
5576$at_check_filter
5577at_fn_diff_devnull "$at_stderr" || at_failed=:
5578echo >>"$at_stdout"; $as_echo "directory1/
5579directory2/
5580directory2/file
5581" | \
5582  $at_diff - "$at_stdout" || at_failed=:
5583at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
5584$at_failed && at_fn_log_failure
5585$at_traceon; }
5586
5587              { set +x
5588$as_echo "$at_srcdir/T-recurse.at:69:
5589mkdir gnu
5590(cd gnu
5591TEST_TAR_FORMAT=gnu
5592export TEST_TAR_FORMAT
5593TAR_OPTIONS=\"-H gnu\"
5594export TAR_OPTIONS
5595rm -rf *
5596
5597mkdir directory1 directory2
5598touch directory1/file directory2/file
5599
5600cat >F1 <<'_ATEOF'
5601--no-recursion
5602directory1/
5603_ATEOF
5604
5605
5606cat >F2 <<'_ATEOF'
5607directory2/
5608_ATEOF
5609
5610
5611tar cf archive -T F1 --recursion -T F2
5612tar tf archive
5613
5614)"
5615at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
5616( $at_check_trace;
5617mkdir gnu
5618(cd gnu
5619TEST_TAR_FORMAT=gnu
5620export TEST_TAR_FORMAT
5621TAR_OPTIONS="-H gnu"
5622export TAR_OPTIONS
5623rm -rf *
5624
5625mkdir directory1 directory2
5626touch directory1/file directory2/file
5627
5628cat >F1 <<'_ATEOF'
5629--no-recursion
5630directory1/
5631_ATEOF
5632
5633
5634cat >F2 <<'_ATEOF'
5635directory2/
5636_ATEOF
5637
5638
5639tar cf archive -T F1 --recursion -T F2
5640tar tf archive
5641
5642)
5643) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5644at_status=$? at_failed=false
5645$at_check_filter
5646at_fn_diff_devnull "$at_stderr" || at_failed=:
5647echo >>"$at_stdout"; $as_echo "directory1/
5648directory2/
5649directory2/file
5650" | \
5651  $at_diff - "$at_stdout" || at_failed=:
5652at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
5653$at_failed && at_fn_log_failure
5654$at_traceon; }
5655
5656
5657
5658
5659  set +x
5660  $at_times_p && times >"$at_times_file"
5661) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5662read at_status <"$at_status_file"
5663#AT_STOP_31
5664#AT_START_32
5665at_fn_group_banner 32 'T-cd.at:21' \
5666  "-C in file lists" "                               " 6
5667at_xfail=no
5668      test -f $XFAILFILE && at_xfail=yes
5669(
5670  $as_echo "32. $at_setup_line: testing $at_desc ..."
5671  $at_traceon
5672
5673
5674
5675
5676
5677  { set +x
5678$as_echo "$at_srcdir/T-cd.at:24:
5679mkdir ustar
5680(cd ustar
5681TEST_TAR_FORMAT=ustar
5682export TEST_TAR_FORMAT
5683TAR_OPTIONS=\"-H ustar\"
5684export TAR_OPTIONS
5685rm -rf *
5686
5687
5688test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5689
5690>file1
5691mkdir dir
5692>dir/file2
5693>dir/file3
5694cat >F1 <<'_ATEOF'
5695file1
5696-C dir
5697.
5698_ATEOF
5699
5700tar cf archive -T F1
5701tar tf archive | sort
5702)"
5703at_fn_check_prepare_notrace 'a `...` command substitution' "T-cd.at:24"
5704( $at_check_trace;
5705mkdir ustar
5706(cd ustar
5707TEST_TAR_FORMAT=ustar
5708export TEST_TAR_FORMAT
5709TAR_OPTIONS="-H ustar"
5710export TAR_OPTIONS
5711rm -rf *
5712
5713
5714test -z "`sort < /dev/null 2>&1`" || exit 77
5715
5716>file1
5717mkdir dir
5718>dir/file2
5719>dir/file3
5720cat >F1 <<'_ATEOF'
5721file1
5722-C dir
5723.
5724_ATEOF
5725
5726tar cf archive -T F1
5727tar tf archive | sort
5728)
5729) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5730at_status=$? at_failed=false
5731$at_check_filter
5732at_fn_diff_devnull "$at_stderr" || at_failed=:
5733echo >>"$at_stdout"; $as_echo "./
5734./file2
5735./file3
5736file1
5737" | \
5738  $at_diff - "$at_stdout" || at_failed=:
5739at_fn_check_status 0 $at_status "$at_srcdir/T-cd.at:24"
5740$at_failed && at_fn_log_failure
5741$at_traceon; }
5742
5743
5744
5745
5746  set +x
5747  $at_times_p && times >"$at_times_file"
5748) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5749read at_status <"$at_status_file"
5750#AT_STOP_32
5751#AT_START_33
5752at_fn_group_banner 33 'T-empty.at:26' \
5753  "empty entries" "                                  " 6
5754at_xfail=no
5755      test -f $XFAILFILE && at_xfail=yes
5756(
5757  $as_echo "33. $at_setup_line: testing $at_desc ..."
5758  $at_traceon
5759
5760
5761
5762cat >file-list <<'_ATEOF'
5763jeden
5764dwa
5765
5766trzy
5767_ATEOF
5768
5769
5770
5771
5772  { set +x
5773$as_echo "$at_srcdir/T-empty.at:36:
5774mkdir ustar
5775(cd ustar
5776TEST_TAR_FORMAT=ustar
5777export TEST_TAR_FORMAT
5778TAR_OPTIONS=\"-H ustar\"
5779export TAR_OPTIONS
5780rm -rf *
5781
5782
5783genfile --file jeden
5784genfile --file dwa
5785genfile --file trzy
5786
5787tar cfvT archive ../file-list
5788)"
5789at_fn_check_prepare_notrace 'an embedded newline' "T-empty.at:36"
5790( $at_check_trace;
5791mkdir ustar
5792(cd ustar
5793TEST_TAR_FORMAT=ustar
5794export TEST_TAR_FORMAT
5795TAR_OPTIONS="-H ustar"
5796export TAR_OPTIONS
5797rm -rf *
5798
5799
5800genfile --file jeden
5801genfile --file dwa
5802genfile --file trzy
5803
5804tar cfvT archive ../file-list
5805)
5806) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5807at_status=$? at_failed=false
5808$at_check_filter
5809at_fn_diff_devnull "$at_stderr" || at_failed=:
5810echo >>"$at_stdout"; $as_echo "jeden
5811dwa
5812trzy
5813" | \
5814  $at_diff - "$at_stdout" || at_failed=:
5815at_fn_check_status 0 $at_status "$at_srcdir/T-empty.at:36"
5816$at_failed && at_fn_log_failure
5817$at_traceon; }
5818
5819
5820 # Testing one format is enough
5821
5822  set +x
5823  $at_times_p && times >"$at_times_file"
5824) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5825read at_status <"$at_status_file"
5826#AT_STOP_33
5827#AT_START_34
5828at_fn_group_banner 34 'T-null.at:21' \
5829  "0-separated file without -0" "                    " 6
5830at_xfail=no
5831      test -f $XFAILFILE && at_xfail=yes
5832(
5833  $as_echo "34. $at_setup_line: testing $at_desc ..."
5834  $at_traceon
5835
5836
5837
5838
5839
5840  { set +x
5841$as_echo "$at_srcdir/T-null.at:24:
5842mkdir ustar
5843(cd ustar
5844TEST_TAR_FORMAT=ustar
5845export TEST_TAR_FORMAT
5846TAR_OPTIONS=\"-H ustar\"
5847export TAR_OPTIONS
5848rm -rf *
5849
5850
5851test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5852
5853
5854echo jeden > temp
5855echo dwa >> temp
5856echo trzy >> temp
5857cat temp | tr '\\n' '\\0' > file-list
5858
5859genfile -f jeden
5860genfile -f dwa
5861genfile -f trzy
5862
5863tar cfTv archive file-list
5864)"
5865at_fn_check_prepare_notrace 'a `...` command substitution' "T-null.at:24"
5866( $at_check_trace;
5867mkdir ustar
5868(cd ustar
5869TEST_TAR_FORMAT=ustar
5870export TEST_TAR_FORMAT
5871TAR_OPTIONS="-H ustar"
5872export TAR_OPTIONS
5873rm -rf *
5874
5875
5876test -z "`sort < /dev/null 2>&1`" || exit 77
5877
5878
5879echo jeden > temp
5880echo dwa >> temp
5881echo trzy >> temp
5882cat temp | tr '\n' '\0' > file-list
5883
5884genfile -f jeden
5885genfile -f dwa
5886genfile -f trzy
5887
5888tar cfTv archive file-list
5889)
5890) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5891at_status=$? at_failed=false
5892$at_check_filter
5893echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character
5894" | \
5895  $at_diff - "$at_stderr" || at_failed=:
5896echo >>"$at_stdout"; $as_echo "jeden
5897dwa
5898trzy
5899" | \
5900  $at_diff - "$at_stdout" || at_failed=:
5901at_fn_check_status 0 $at_status "$at_srcdir/T-null.at:24"
5902$at_failed && at_fn_log_failure
5903$at_traceon; }
5904
5905
5906 # Testing one format is enough
5907
5908  set +x
5909  $at_times_p && times >"$at_times_file"
5910) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5911read at_status <"$at_status_file"
5912#AT_STOP_34
5913#AT_START_35
5914at_fn_group_banner 35 'T-null2.at:17' \
5915  "--null enables verbatim reading" "                " 6
5916at_xfail=no
5917      test -f $XFAILFILE && at_xfail=yes
5918(
5919  $as_echo "35. $at_setup_line: testing $at_desc ..."
5920  $at_traceon
5921
5922
5923
5924# According to the docs, --null should read each line from the file
5925# list verbatim.  This feature was broken by commit 26538c9b (tar version
5926# 1.27).
5927
5928
5929
5930  { set +x
5931$as_echo "$at_srcdir/T-null2.at:24:
5932mkdir ustar
5933(cd ustar
5934TEST_TAR_FORMAT=ustar
5935export TEST_TAR_FORMAT
5936TAR_OPTIONS=\"-H ustar\"
5937export TAR_OPTIONS
5938rm -rf *
5939
5940cat >file-list <<'_ATEOF'
5941a
5942-b
5943--c d
5944:\\\\.jpg
5945_ATEOF
5946
5947
5948genfile -f a
5949genfile -f -b
5950genfile -f '--c d'
5951genfile -f ':\\\\.jpg'
5952
5953cat file-list | tr '\\n' '\\0' | tar -c -f archive -v --null -T -
5954)"
5955at_fn_check_prepare_notrace 'an embedded newline' "T-null2.at:24"
5956( $at_check_trace;
5957mkdir ustar
5958(cd ustar
5959TEST_TAR_FORMAT=ustar
5960export TEST_TAR_FORMAT
5961TAR_OPTIONS="-H ustar"
5962export TAR_OPTIONS
5963rm -rf *
5964
5965cat >file-list <<'_ATEOF'
5966a
5967-b
5968--c d
5969:\\.jpg
5970_ATEOF
5971
5972
5973genfile -f a
5974genfile -f -b
5975genfile -f '--c d'
5976genfile -f ':\\.jpg'
5977
5978cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T -
5979)
5980) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5981at_status=$? at_failed=false
5982$at_check_filter
5983at_fn_diff_devnull "$at_stderr" || at_failed=:
5984echo >>"$at_stdout"; $as_echo "a
5985-b
5986--c d
5987:\\\\\\\\.jpg
5988" | \
5989  $at_diff - "$at_stdout" || at_failed=:
5990at_fn_check_status 0 $at_status "$at_srcdir/T-null2.at:24"
5991$at_failed && at_fn_log_failure
5992$at_traceon; }
5993
5994
5995 # Testing one format is enough
5996
5997  set +x
5998  $at_times_p && times >"$at_times_file"
5999) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6000read at_status <"$at_status_file"
6001#AT_STOP_35
6002#AT_START_36
6003at_fn_group_banner 36 'T-zfile.at:26' \
6004  "empty file" "                                     " 6
6005at_xfail=no
6006      test -f $XFAILFILE && at_xfail=yes
6007(
6008  $as_echo "36. $at_setup_line: testing $at_desc ..."
6009  $at_traceon
6010
6011
6012
6013
6014
6015  { set +x
6016$as_echo "$at_srcdir/T-zfile.at:29:
6017mkdir ustar
6018(cd ustar
6019TEST_TAR_FORMAT=ustar
6020export TEST_TAR_FORMAT
6021TAR_OPTIONS=\"-H ustar\"
6022export TAR_OPTIONS
6023rm -rf *
6024
6025genfile --length=0 --file empty
6026genfile --file a
6027genfile --file b
6028cat >valid <<'_ATEOF'
6029a
6030b
6031_ATEOF
6032
6033
6034tar cf archive -T empty -T valid
6035tar tf archive
6036echo \"==\"
6037tar cf archive -T valid -T empty
6038tar tf archive
6039)"
6040at_fn_check_prepare_notrace 'an embedded newline' "T-zfile.at:29"
6041( $at_check_trace;
6042mkdir ustar
6043(cd ustar
6044TEST_TAR_FORMAT=ustar
6045export TEST_TAR_FORMAT
6046TAR_OPTIONS="-H ustar"
6047export TAR_OPTIONS
6048rm -rf *
6049
6050genfile --length=0 --file empty
6051genfile --file a
6052genfile --file b
6053cat >valid <<'_ATEOF'
6054a
6055b
6056_ATEOF
6057
6058
6059tar cf archive -T empty -T valid
6060tar tf archive
6061echo "=="
6062tar cf archive -T valid -T empty
6063tar tf archive
6064)
6065) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6066at_status=$? at_failed=false
6067$at_check_filter
6068at_fn_diff_devnull "$at_stderr" || at_failed=:
6069echo >>"$at_stdout"; $as_echo "a
6070b
6071==
6072a
6073b
6074" | \
6075  $at_diff - "$at_stdout" || at_failed=:
6076at_fn_check_status 0 $at_status "$at_srcdir/T-zfile.at:29"
6077$at_failed && at_fn_log_failure
6078$at_traceon; }
6079
6080
6081 # Testing one format is enough
6082
6083  set +x
6084  $at_times_p && times >"$at_times_file"
6085) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6086read at_status <"$at_status_file"
6087#AT_STOP_36
6088#AT_START_37
6089at_fn_group_banner 37 'T-nonl.at:27' \
6090  "entries with missing newlines" "                  " 6
6091at_xfail=no
6092      test -f $XFAILFILE && at_xfail=yes
6093(
6094  $as_echo "37. $at_setup_line: testing $at_desc ..."
6095  $at_traceon
6096
6097
6098
6099
6100
6101  { set +x
6102$as_echo "$at_srcdir/T-nonl.at:30:
6103mkdir ustar
6104(cd ustar
6105TEST_TAR_FORMAT=ustar
6106export TEST_TAR_FORMAT
6107TAR_OPTIONS=\"-H ustar\"
6108export TAR_OPTIONS
6109rm -rf *
6110
6111genfile --length=0 --file empty
6112printf c > 1.nonl
6113printf 'd\\ne' > 2.nonl
6114touch a b c d e
6115cat >filelist <<'_ATEOF'
6116a
6117b
6118_ATEOF
6119
6120
6121tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
6122tar tf archive
6123echo ==
6124tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
6125tar tf archive
6126)"
6127at_fn_check_prepare_notrace 'an embedded newline' "T-nonl.at:30"
6128( $at_check_trace;
6129mkdir ustar
6130(cd ustar
6131TEST_TAR_FORMAT=ustar
6132export TEST_TAR_FORMAT
6133TAR_OPTIONS="-H ustar"
6134export TAR_OPTIONS
6135rm -rf *
6136
6137genfile --length=0 --file empty
6138printf c > 1.nonl
6139printf 'd\ne' > 2.nonl
6140touch a b c d e
6141cat >filelist <<'_ATEOF'
6142a
6143b
6144_ATEOF
6145
6146
6147tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
6148tar tf archive
6149echo ==
6150tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
6151tar tf archive
6152)
6153) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6154at_status=$? at_failed=false
6155$at_check_filter
6156at_fn_diff_devnull "$at_stderr" || at_failed=:
6157echo >>"$at_stdout"; $as_echo "c
6158d
6159e
6160a
6161b
6162==
6163d
6164e
6165a
6166b
6167c
6168" | \
6169  $at_diff - "$at_stdout" || at_failed=:
6170at_fn_check_status 0 $at_status "$at_srcdir/T-nonl.at:30"
6171$at_failed && at_fn_log_failure
6172$at_traceon; }
6173
6174
6175
6176
6177  set +x
6178  $at_times_p && times >"$at_times_file"
6179) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6180read at_status <"$at_status_file"
6181#AT_STOP_37
6182#AT_START_38
6183at_fn_group_banner 38 'T-dir00.at:28' \
6184  "recursive extraction from --files-from" "         " 6
6185at_xfail=no
6186      test -f $XFAILFILE && at_xfail=yes
6187(
6188  $as_echo "38. $at_setup_line: testing $at_desc ..."
6189  $at_traceon
6190
6191
6192
6193
6194  { set +x
6195$as_echo "$at_srcdir/T-dir00.at:30:
6196mkdir v7
6197(cd v7
6198TEST_TAR_FORMAT=v7
6199export TEST_TAR_FORMAT
6200TAR_OPTIONS=\"-H v7\"
6201export TAR_OPTIONS
6202rm -rf *
6203
6204
6205test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6206
6207mkdir dir
6208genfile -f dir/file1
6209genfile -f dir/file2
6210tar cf archive dir
6211rm -rf dir
6212echo dir > list
6213tar xfTv archive list | sort
6214)"
6215at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
6216( $at_check_trace;
6217mkdir v7
6218(cd v7
6219TEST_TAR_FORMAT=v7
6220export TEST_TAR_FORMAT
6221TAR_OPTIONS="-H v7"
6222export TAR_OPTIONS
6223rm -rf *
6224
6225
6226test -z "`sort < /dev/null 2>&1`" || exit 77
6227
6228mkdir dir
6229genfile -f dir/file1
6230genfile -f dir/file2
6231tar cf archive dir
6232rm -rf dir
6233echo dir > list
6234tar xfTv archive list | sort
6235)
6236) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6237at_status=$? at_failed=false
6238$at_check_filter
6239at_fn_diff_devnull "$at_stderr" || at_failed=:
6240echo >>"$at_stdout"; $as_echo "dir/
6241dir/file1
6242dir/file2
6243" | \
6244  $at_diff - "$at_stdout" || at_failed=:
6245at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
6246$at_failed && at_fn_log_failure
6247$at_traceon; }
6248
6249              { set +x
6250$as_echo "$at_srcdir/T-dir00.at:30:
6251mkdir oldgnu
6252(cd oldgnu
6253TEST_TAR_FORMAT=oldgnu
6254export TEST_TAR_FORMAT
6255TAR_OPTIONS=\"-H oldgnu\"
6256export TAR_OPTIONS
6257rm -rf *
6258
6259
6260test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6261
6262mkdir dir
6263genfile -f dir/file1
6264genfile -f dir/file2
6265tar cf archive dir
6266rm -rf dir
6267echo dir > list
6268tar xfTv archive list | sort
6269)"
6270at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
6271( $at_check_trace;
6272mkdir oldgnu
6273(cd oldgnu
6274TEST_TAR_FORMAT=oldgnu
6275export TEST_TAR_FORMAT
6276TAR_OPTIONS="-H oldgnu"
6277export TAR_OPTIONS
6278rm -rf *
6279
6280
6281test -z "`sort < /dev/null 2>&1`" || exit 77
6282
6283mkdir dir
6284genfile -f dir/file1
6285genfile -f dir/file2
6286tar cf archive dir
6287rm -rf dir
6288echo dir > list
6289tar xfTv archive list | sort
6290)
6291) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6292at_status=$? at_failed=false
6293$at_check_filter
6294at_fn_diff_devnull "$at_stderr" || at_failed=:
6295echo >>"$at_stdout"; $as_echo "dir/
6296dir/file1
6297dir/file2
6298" | \
6299  $at_diff - "$at_stdout" || at_failed=:
6300at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
6301$at_failed && at_fn_log_failure
6302$at_traceon; }
6303
6304              { set +x
6305$as_echo "$at_srcdir/T-dir00.at:30:
6306mkdir ustar
6307(cd ustar
6308TEST_TAR_FORMAT=ustar
6309export TEST_TAR_FORMAT
6310TAR_OPTIONS=\"-H ustar\"
6311export TAR_OPTIONS
6312rm -rf *
6313
6314
6315test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6316
6317mkdir dir
6318genfile -f dir/file1
6319genfile -f dir/file2
6320tar cf archive dir
6321rm -rf dir
6322echo dir > list
6323tar xfTv archive list | sort
6324)"
6325at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
6326( $at_check_trace;
6327mkdir ustar
6328(cd ustar
6329TEST_TAR_FORMAT=ustar
6330export TEST_TAR_FORMAT
6331TAR_OPTIONS="-H ustar"
6332export TAR_OPTIONS
6333rm -rf *
6334
6335
6336test -z "`sort < /dev/null 2>&1`" || exit 77
6337
6338mkdir dir
6339genfile -f dir/file1
6340genfile -f dir/file2
6341tar cf archive dir
6342rm -rf dir
6343echo dir > list
6344tar xfTv archive list | sort
6345)
6346) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6347at_status=$? at_failed=false
6348$at_check_filter
6349at_fn_diff_devnull "$at_stderr" || at_failed=:
6350echo >>"$at_stdout"; $as_echo "dir/
6351dir/file1
6352dir/file2
6353" | \
6354  $at_diff - "$at_stdout" || at_failed=:
6355at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
6356$at_failed && at_fn_log_failure
6357$at_traceon; }
6358
6359              { set +x
6360$as_echo "$at_srcdir/T-dir00.at:30:
6361mkdir posix
6362(cd posix
6363TEST_TAR_FORMAT=posix
6364export TEST_TAR_FORMAT
6365TAR_OPTIONS=\"-H posix\"
6366export TAR_OPTIONS
6367rm -rf *
6368
6369
6370test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6371
6372mkdir dir
6373genfile -f dir/file1
6374genfile -f dir/file2
6375tar cf archive dir
6376rm -rf dir
6377echo dir > list
6378tar xfTv archive list | sort
6379)"
6380at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
6381( $at_check_trace;
6382mkdir posix
6383(cd posix
6384TEST_TAR_FORMAT=posix
6385export TEST_TAR_FORMAT
6386TAR_OPTIONS="-H posix"
6387export TAR_OPTIONS
6388rm -rf *
6389
6390
6391test -z "`sort < /dev/null 2>&1`" || exit 77
6392
6393mkdir dir
6394genfile -f dir/file1
6395genfile -f dir/file2
6396tar cf archive dir
6397rm -rf dir
6398echo dir > list
6399tar xfTv archive list | sort
6400)
6401) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6402at_status=$? at_failed=false
6403$at_check_filter
6404at_fn_diff_devnull "$at_stderr" || at_failed=:
6405echo >>"$at_stdout"; $as_echo "dir/
6406dir/file1
6407dir/file2
6408" | \
6409  $at_diff - "$at_stdout" || at_failed=:
6410at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
6411$at_failed && at_fn_log_failure
6412$at_traceon; }
6413
6414              { set +x
6415$as_echo "$at_srcdir/T-dir00.at:30:
6416mkdir gnu
6417(cd gnu
6418TEST_TAR_FORMAT=gnu
6419export TEST_TAR_FORMAT
6420TAR_OPTIONS=\"-H gnu\"
6421export TAR_OPTIONS
6422rm -rf *
6423
6424
6425test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6426
6427mkdir dir
6428genfile -f dir/file1
6429genfile -f dir/file2
6430tar cf archive dir
6431rm -rf dir
6432echo dir > list
6433tar xfTv archive list | sort
6434)"
6435at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
6436( $at_check_trace;
6437mkdir gnu
6438(cd gnu
6439TEST_TAR_FORMAT=gnu
6440export TEST_TAR_FORMAT
6441TAR_OPTIONS="-H gnu"
6442export TAR_OPTIONS
6443rm -rf *
6444
6445
6446test -z "`sort < /dev/null 2>&1`" || exit 77
6447
6448mkdir dir
6449genfile -f dir/file1
6450genfile -f dir/file2
6451tar cf archive dir
6452rm -rf dir
6453echo dir > list
6454tar xfTv archive list | sort
6455)
6456) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6457at_status=$? at_failed=false
6458$at_check_filter
6459at_fn_diff_devnull "$at_stderr" || at_failed=:
6460echo >>"$at_stdout"; $as_echo "dir/
6461dir/file1
6462dir/file2
6463" | \
6464  $at_diff - "$at_stdout" || at_failed=:
6465at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
6466$at_failed && at_fn_log_failure
6467$at_traceon; }
6468
6469
6470
6471  set +x
6472  $at_times_p && times >"$at_times_file"
6473) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6474read at_status <"$at_status_file"
6475#AT_STOP_38
6476#AT_START_39
6477at_fn_group_banner 39 'T-dir01.at:28' \
6478  "trailing slash in --files-from" "                 " 6
6479at_xfail=no
6480      test -f $XFAILFILE && at_xfail=yes
6481(
6482  $as_echo "39. $at_setup_line: testing $at_desc ..."
6483  $at_traceon
6484
6485
6486
6487
6488  { set +x
6489$as_echo "$at_srcdir/T-dir01.at:30:
6490mkdir v7
6491(cd v7
6492TEST_TAR_FORMAT=v7
6493export TEST_TAR_FORMAT
6494TAR_OPTIONS=\"-H v7\"
6495export TAR_OPTIONS
6496rm -rf *
6497
6498
6499test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6500
6501mkdir dir
6502genfile -f dir/file1
6503genfile -f dir/file2
6504tar cf archive dir
6505rm -rf dir
6506echo dir/ > list
6507tar xfTv archive list | sort
6508)"
6509at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
6510( $at_check_trace;
6511mkdir v7
6512(cd v7
6513TEST_TAR_FORMAT=v7
6514export TEST_TAR_FORMAT
6515TAR_OPTIONS="-H v7"
6516export TAR_OPTIONS
6517rm -rf *
6518
6519
6520test -z "`sort < /dev/null 2>&1`" || exit 77
6521
6522mkdir dir
6523genfile -f dir/file1
6524genfile -f dir/file2
6525tar cf archive dir
6526rm -rf dir
6527echo dir/ > list
6528tar xfTv archive list | sort
6529)
6530) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6531at_status=$? at_failed=false
6532$at_check_filter
6533at_fn_diff_devnull "$at_stderr" || at_failed=:
6534echo >>"$at_stdout"; $as_echo "dir/
6535dir/file1
6536dir/file2
6537" | \
6538  $at_diff - "$at_stdout" || at_failed=:
6539at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
6540$at_failed && at_fn_log_failure
6541$at_traceon; }
6542
6543              { set +x
6544$as_echo "$at_srcdir/T-dir01.at:30:
6545mkdir oldgnu
6546(cd oldgnu
6547TEST_TAR_FORMAT=oldgnu
6548export TEST_TAR_FORMAT
6549TAR_OPTIONS=\"-H oldgnu\"
6550export TAR_OPTIONS
6551rm -rf *
6552
6553
6554test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6555
6556mkdir dir
6557genfile -f dir/file1
6558genfile -f dir/file2
6559tar cf archive dir
6560rm -rf dir
6561echo dir/ > list
6562tar xfTv archive list | sort
6563)"
6564at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
6565( $at_check_trace;
6566mkdir oldgnu
6567(cd oldgnu
6568TEST_TAR_FORMAT=oldgnu
6569export TEST_TAR_FORMAT
6570TAR_OPTIONS="-H oldgnu"
6571export TAR_OPTIONS
6572rm -rf *
6573
6574
6575test -z "`sort < /dev/null 2>&1`" || exit 77
6576
6577mkdir dir
6578genfile -f dir/file1
6579genfile -f dir/file2
6580tar cf archive dir
6581rm -rf dir
6582echo dir/ > list
6583tar xfTv archive list | sort
6584)
6585) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6586at_status=$? at_failed=false
6587$at_check_filter
6588at_fn_diff_devnull "$at_stderr" || at_failed=:
6589echo >>"$at_stdout"; $as_echo "dir/
6590dir/file1
6591dir/file2
6592" | \
6593  $at_diff - "$at_stdout" || at_failed=:
6594at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
6595$at_failed && at_fn_log_failure
6596$at_traceon; }
6597
6598              { set +x
6599$as_echo "$at_srcdir/T-dir01.at:30:
6600mkdir ustar
6601(cd ustar
6602TEST_TAR_FORMAT=ustar
6603export TEST_TAR_FORMAT
6604TAR_OPTIONS=\"-H ustar\"
6605export TAR_OPTIONS
6606rm -rf *
6607
6608
6609test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6610
6611mkdir dir
6612genfile -f dir/file1
6613genfile -f dir/file2
6614tar cf archive dir
6615rm -rf dir
6616echo dir/ > list
6617tar xfTv archive list | sort
6618)"
6619at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
6620( $at_check_trace;
6621mkdir ustar
6622(cd ustar
6623TEST_TAR_FORMAT=ustar
6624export TEST_TAR_FORMAT
6625TAR_OPTIONS="-H ustar"
6626export TAR_OPTIONS
6627rm -rf *
6628
6629
6630test -z "`sort < /dev/null 2>&1`" || exit 77
6631
6632mkdir dir
6633genfile -f dir/file1
6634genfile -f dir/file2
6635tar cf archive dir
6636rm -rf dir
6637echo dir/ > list
6638tar xfTv archive list | sort
6639)
6640) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6641at_status=$? at_failed=false
6642$at_check_filter
6643at_fn_diff_devnull "$at_stderr" || at_failed=:
6644echo >>"$at_stdout"; $as_echo "dir/
6645dir/file1
6646dir/file2
6647" | \
6648  $at_diff - "$at_stdout" || at_failed=:
6649at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
6650$at_failed && at_fn_log_failure
6651$at_traceon; }
6652
6653              { set +x
6654$as_echo "$at_srcdir/T-dir01.at:30:
6655mkdir posix
6656(cd posix
6657TEST_TAR_FORMAT=posix
6658export TEST_TAR_FORMAT
6659TAR_OPTIONS=\"-H posix\"
6660export TAR_OPTIONS
6661rm -rf *
6662
6663
6664test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6665
6666mkdir dir
6667genfile -f dir/file1
6668genfile -f dir/file2
6669tar cf archive dir
6670rm -rf dir
6671echo dir/ > list
6672tar xfTv archive list | sort
6673)"
6674at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
6675( $at_check_trace;
6676mkdir posix
6677(cd posix
6678TEST_TAR_FORMAT=posix
6679export TEST_TAR_FORMAT
6680TAR_OPTIONS="-H posix"
6681export TAR_OPTIONS
6682rm -rf *
6683
6684
6685test -z "`sort < /dev/null 2>&1`" || exit 77
6686
6687mkdir dir
6688genfile -f dir/file1
6689genfile -f dir/file2
6690tar cf archive dir
6691rm -rf dir
6692echo dir/ > list
6693tar xfTv archive list | sort
6694)
6695) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6696at_status=$? at_failed=false
6697$at_check_filter
6698at_fn_diff_devnull "$at_stderr" || at_failed=:
6699echo >>"$at_stdout"; $as_echo "dir/
6700dir/file1
6701dir/file2
6702" | \
6703  $at_diff - "$at_stdout" || at_failed=:
6704at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
6705$at_failed && at_fn_log_failure
6706$at_traceon; }
6707
6708              { set +x
6709$as_echo "$at_srcdir/T-dir01.at:30:
6710mkdir gnu
6711(cd gnu
6712TEST_TAR_FORMAT=gnu
6713export TEST_TAR_FORMAT
6714TAR_OPTIONS=\"-H gnu\"
6715export TAR_OPTIONS
6716rm -rf *
6717
6718
6719test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
6720
6721mkdir dir
6722genfile -f dir/file1
6723genfile -f dir/file2
6724tar cf archive dir
6725rm -rf dir
6726echo dir/ > list
6727tar xfTv archive list | sort
6728)"
6729at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
6730( $at_check_trace;
6731mkdir gnu
6732(cd gnu
6733TEST_TAR_FORMAT=gnu
6734export TEST_TAR_FORMAT
6735TAR_OPTIONS="-H gnu"
6736export TAR_OPTIONS
6737rm -rf *
6738
6739
6740test -z "`sort < /dev/null 2>&1`" || exit 77
6741
6742mkdir dir
6743genfile -f dir/file1
6744genfile -f dir/file2
6745tar cf archive dir
6746rm -rf dir
6747echo dir/ > list
6748tar xfTv archive list | sort
6749)
6750) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6751at_status=$? at_failed=false
6752$at_check_filter
6753at_fn_diff_devnull "$at_stderr" || at_failed=:
6754echo >>"$at_stdout"; $as_echo "dir/
6755dir/file1
6756dir/file2
6757" | \
6758  $at_diff - "$at_stdout" || at_failed=:
6759at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
6760$at_failed && at_fn_log_failure
6761$at_traceon; }
6762
6763
6764
6765  set +x
6766  $at_times_p && times >"$at_times_file"
6767) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6768read at_status <"$at_status_file"
6769#AT_STOP_39
6770#AT_START_40
6771at_fn_group_banner 40 'indexfile.at:26' \
6772  "tar --index-file=FILE --file=-" "                 " 7
6773at_xfail=no
6774      test -f $XFAILFILE && at_xfail=yes
6775(
6776  $as_echo "40. $at_setup_line: testing $at_desc ..."
6777  $at_traceon
6778
6779
6780
6781
6782
6783  { set +x
6784$as_echo "$at_srcdir/indexfile.at:29:
6785mkdir v7
6786(cd v7
6787TEST_TAR_FORMAT=v7
6788export TEST_TAR_FORMAT
6789TAR_OPTIONS=\"-H v7\"
6790export TAR_OPTIONS
6791rm -rf *
6792
6793
6794mkdir directory
6795genfile --file=directory/a --length=1035
6796
6797echo \"Creating the archive\"
6798tar -c -v -f - --index-file=idx directory > archive
6799
6800echo \"Testing the archive\"
6801tar -tf archive
6802)"
6803at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
6804( $at_check_trace;
6805mkdir v7
6806(cd v7
6807TEST_TAR_FORMAT=v7
6808export TEST_TAR_FORMAT
6809TAR_OPTIONS="-H v7"
6810export TAR_OPTIONS
6811rm -rf *
6812
6813
6814mkdir directory
6815genfile --file=directory/a --length=1035
6816
6817echo "Creating the archive"
6818tar -c -v -f - --index-file=idx directory > archive
6819
6820echo "Testing the archive"
6821tar -tf archive
6822)
6823) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6824at_status=$? at_failed=false
6825$at_check_filter
6826at_fn_diff_devnull "$at_stderr" || at_failed=:
6827echo >>"$at_stdout"; $as_echo "Creating the archive
6828Testing the archive
6829directory/
6830directory/a
6831" | \
6832  $at_diff - "$at_stdout" || at_failed=:
6833at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
6834$at_failed && at_fn_log_failure
6835$at_traceon; }
6836
6837              { set +x
6838$as_echo "$at_srcdir/indexfile.at:29:
6839mkdir oldgnu
6840(cd oldgnu
6841TEST_TAR_FORMAT=oldgnu
6842export TEST_TAR_FORMAT
6843TAR_OPTIONS=\"-H oldgnu\"
6844export TAR_OPTIONS
6845rm -rf *
6846
6847
6848mkdir directory
6849genfile --file=directory/a --length=1035
6850
6851echo \"Creating the archive\"
6852tar -c -v -f - --index-file=idx directory > archive
6853
6854echo \"Testing the archive\"
6855tar -tf archive
6856)"
6857at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
6858( $at_check_trace;
6859mkdir oldgnu
6860(cd oldgnu
6861TEST_TAR_FORMAT=oldgnu
6862export TEST_TAR_FORMAT
6863TAR_OPTIONS="-H oldgnu"
6864export TAR_OPTIONS
6865rm -rf *
6866
6867
6868mkdir directory
6869genfile --file=directory/a --length=1035
6870
6871echo "Creating the archive"
6872tar -c -v -f - --index-file=idx directory > archive
6873
6874echo "Testing the archive"
6875tar -tf archive
6876)
6877) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6878at_status=$? at_failed=false
6879$at_check_filter
6880at_fn_diff_devnull "$at_stderr" || at_failed=:
6881echo >>"$at_stdout"; $as_echo "Creating the archive
6882Testing the archive
6883directory/
6884directory/a
6885" | \
6886  $at_diff - "$at_stdout" || at_failed=:
6887at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
6888$at_failed && at_fn_log_failure
6889$at_traceon; }
6890
6891              { set +x
6892$as_echo "$at_srcdir/indexfile.at:29:
6893mkdir ustar
6894(cd ustar
6895TEST_TAR_FORMAT=ustar
6896export TEST_TAR_FORMAT
6897TAR_OPTIONS=\"-H ustar\"
6898export TAR_OPTIONS
6899rm -rf *
6900
6901
6902mkdir directory
6903genfile --file=directory/a --length=1035
6904
6905echo \"Creating the archive\"
6906tar -c -v -f - --index-file=idx directory > archive
6907
6908echo \"Testing the archive\"
6909tar -tf archive
6910)"
6911at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
6912( $at_check_trace;
6913mkdir ustar
6914(cd ustar
6915TEST_TAR_FORMAT=ustar
6916export TEST_TAR_FORMAT
6917TAR_OPTIONS="-H ustar"
6918export TAR_OPTIONS
6919rm -rf *
6920
6921
6922mkdir directory
6923genfile --file=directory/a --length=1035
6924
6925echo "Creating the archive"
6926tar -c -v -f - --index-file=idx directory > archive
6927
6928echo "Testing the archive"
6929tar -tf archive
6930)
6931) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6932at_status=$? at_failed=false
6933$at_check_filter
6934at_fn_diff_devnull "$at_stderr" || at_failed=:
6935echo >>"$at_stdout"; $as_echo "Creating the archive
6936Testing the archive
6937directory/
6938directory/a
6939" | \
6940  $at_diff - "$at_stdout" || at_failed=:
6941at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
6942$at_failed && at_fn_log_failure
6943$at_traceon; }
6944
6945              { set +x
6946$as_echo "$at_srcdir/indexfile.at:29:
6947mkdir posix
6948(cd posix
6949TEST_TAR_FORMAT=posix
6950export TEST_TAR_FORMAT
6951TAR_OPTIONS=\"-H posix\"
6952export TAR_OPTIONS
6953rm -rf *
6954
6955
6956mkdir directory
6957genfile --file=directory/a --length=1035
6958
6959echo \"Creating the archive\"
6960tar -c -v -f - --index-file=idx directory > archive
6961
6962echo \"Testing the archive\"
6963tar -tf archive
6964)"
6965at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
6966( $at_check_trace;
6967mkdir posix
6968(cd posix
6969TEST_TAR_FORMAT=posix
6970export TEST_TAR_FORMAT
6971TAR_OPTIONS="-H posix"
6972export TAR_OPTIONS
6973rm -rf *
6974
6975
6976mkdir directory
6977genfile --file=directory/a --length=1035
6978
6979echo "Creating the archive"
6980tar -c -v -f - --index-file=idx directory > archive
6981
6982echo "Testing the archive"
6983tar -tf archive
6984)
6985) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6986at_status=$? at_failed=false
6987$at_check_filter
6988at_fn_diff_devnull "$at_stderr" || at_failed=:
6989echo >>"$at_stdout"; $as_echo "Creating the archive
6990Testing the archive
6991directory/
6992directory/a
6993" | \
6994  $at_diff - "$at_stdout" || at_failed=:
6995at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
6996$at_failed && at_fn_log_failure
6997$at_traceon; }
6998
6999              { set +x
7000$as_echo "$at_srcdir/indexfile.at:29:
7001mkdir gnu
7002(cd gnu
7003TEST_TAR_FORMAT=gnu
7004export TEST_TAR_FORMAT
7005TAR_OPTIONS=\"-H gnu\"
7006export TAR_OPTIONS
7007rm -rf *
7008
7009
7010mkdir directory
7011genfile --file=directory/a --length=1035
7012
7013echo \"Creating the archive\"
7014tar -c -v -f - --index-file=idx directory > archive
7015
7016echo \"Testing the archive\"
7017tar -tf archive
7018)"
7019at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
7020( $at_check_trace;
7021mkdir gnu
7022(cd gnu
7023TEST_TAR_FORMAT=gnu
7024export TEST_TAR_FORMAT
7025TAR_OPTIONS="-H gnu"
7026export TAR_OPTIONS
7027rm -rf *
7028
7029
7030mkdir directory
7031genfile --file=directory/a --length=1035
7032
7033echo "Creating the archive"
7034tar -c -v -f - --index-file=idx directory > archive
7035
7036echo "Testing the archive"
7037tar -tf archive
7038)
7039) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7040at_status=$? at_failed=false
7041$at_check_filter
7042at_fn_diff_devnull "$at_stderr" || at_failed=:
7043echo >>"$at_stdout"; $as_echo "Creating the archive
7044Testing the archive
7045directory/
7046directory/a
7047" | \
7048  $at_diff - "$at_stdout" || at_failed=:
7049at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
7050$at_failed && at_fn_log_failure
7051$at_traceon; }
7052
7053
7054
7055
7056  set +x
7057  $at_times_p && times >"$at_times_file"
7058) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7059read at_status <"$at_status_file"
7060#AT_STOP_40
7061#AT_START_41
7062at_fn_group_banner 41 'verbose.at:26' \
7063  "tar cvf -" "                                      " 7
7064at_xfail=no
7065      test -f $XFAILFILE && at_xfail=yes
7066(
7067  $as_echo "41. $at_setup_line: testing $at_desc ..."
7068  $at_traceon
7069
7070
7071
7072
7073
7074  { set +x
7075$as_echo "$at_srcdir/verbose.at:29:
7076mkdir v7
7077(cd v7
7078TEST_TAR_FORMAT=v7
7079export TEST_TAR_FORMAT
7080TAR_OPTIONS=\"-H v7\"
7081export TAR_OPTIONS
7082rm -rf *
7083
7084genfile --file file --length 10240
7085echo Creating the archive
7086tar cvf - file > archive
7087echo Testing the archive
7088tar tf archive
7089)"
7090at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
7091( $at_check_trace;
7092mkdir v7
7093(cd v7
7094TEST_TAR_FORMAT=v7
7095export TEST_TAR_FORMAT
7096TAR_OPTIONS="-H v7"
7097export TAR_OPTIONS
7098rm -rf *
7099
7100genfile --file file --length 10240
7101echo Creating the archive
7102tar cvf - file > archive
7103echo Testing the archive
7104tar tf archive
7105)
7106) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7107at_status=$? at_failed=false
7108$at_check_filter
7109echo >>"$at_stderr"; $as_echo "file
7110" | \
7111  $at_diff - "$at_stderr" || at_failed=:
7112echo >>"$at_stdout"; $as_echo "Creating the archive
7113Testing the archive
7114file
7115" | \
7116  $at_diff - "$at_stdout" || at_failed=:
7117at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
7118$at_failed && at_fn_log_failure
7119$at_traceon; }
7120
7121              { set +x
7122$as_echo "$at_srcdir/verbose.at:29:
7123mkdir oldgnu
7124(cd oldgnu
7125TEST_TAR_FORMAT=oldgnu
7126export TEST_TAR_FORMAT
7127TAR_OPTIONS=\"-H oldgnu\"
7128export TAR_OPTIONS
7129rm -rf *
7130
7131genfile --file file --length 10240
7132echo Creating the archive
7133tar cvf - file > archive
7134echo Testing the archive
7135tar tf archive
7136)"
7137at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
7138( $at_check_trace;
7139mkdir oldgnu
7140(cd oldgnu
7141TEST_TAR_FORMAT=oldgnu
7142export TEST_TAR_FORMAT
7143TAR_OPTIONS="-H oldgnu"
7144export TAR_OPTIONS
7145rm -rf *
7146
7147genfile --file file --length 10240
7148echo Creating the archive
7149tar cvf - file > archive
7150echo Testing the archive
7151tar tf archive
7152)
7153) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7154at_status=$? at_failed=false
7155$at_check_filter
7156echo >>"$at_stderr"; $as_echo "file
7157" | \
7158  $at_diff - "$at_stderr" || at_failed=:
7159echo >>"$at_stdout"; $as_echo "Creating the archive
7160Testing the archive
7161file
7162" | \
7163  $at_diff - "$at_stdout" || at_failed=:
7164at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
7165$at_failed && at_fn_log_failure
7166$at_traceon; }
7167
7168              { set +x
7169$as_echo "$at_srcdir/verbose.at:29:
7170mkdir ustar
7171(cd ustar
7172TEST_TAR_FORMAT=ustar
7173export TEST_TAR_FORMAT
7174TAR_OPTIONS=\"-H ustar\"
7175export TAR_OPTIONS
7176rm -rf *
7177
7178genfile --file file --length 10240
7179echo Creating the archive
7180tar cvf - file > archive
7181echo Testing the archive
7182tar tf archive
7183)"
7184at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
7185( $at_check_trace;
7186mkdir ustar
7187(cd ustar
7188TEST_TAR_FORMAT=ustar
7189export TEST_TAR_FORMAT
7190TAR_OPTIONS="-H ustar"
7191export TAR_OPTIONS
7192rm -rf *
7193
7194genfile --file file --length 10240
7195echo Creating the archive
7196tar cvf - file > archive
7197echo Testing the archive
7198tar tf archive
7199)
7200) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7201at_status=$? at_failed=false
7202$at_check_filter
7203echo >>"$at_stderr"; $as_echo "file
7204" | \
7205  $at_diff - "$at_stderr" || at_failed=:
7206echo >>"$at_stdout"; $as_echo "Creating the archive
7207Testing the archive
7208file
7209" | \
7210  $at_diff - "$at_stdout" || at_failed=:
7211at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
7212$at_failed && at_fn_log_failure
7213$at_traceon; }
7214
7215              { set +x
7216$as_echo "$at_srcdir/verbose.at:29:
7217mkdir posix
7218(cd posix
7219TEST_TAR_FORMAT=posix
7220export TEST_TAR_FORMAT
7221TAR_OPTIONS=\"-H posix\"
7222export TAR_OPTIONS
7223rm -rf *
7224
7225genfile --file file --length 10240
7226echo Creating the archive
7227tar cvf - file > archive
7228echo Testing the archive
7229tar tf archive
7230)"
7231at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
7232( $at_check_trace;
7233mkdir posix
7234(cd posix
7235TEST_TAR_FORMAT=posix
7236export TEST_TAR_FORMAT
7237TAR_OPTIONS="-H posix"
7238export TAR_OPTIONS
7239rm -rf *
7240
7241genfile --file file --length 10240
7242echo Creating the archive
7243tar cvf - file > archive
7244echo Testing the archive
7245tar tf archive
7246)
7247) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7248at_status=$? at_failed=false
7249$at_check_filter
7250echo >>"$at_stderr"; $as_echo "file
7251" | \
7252  $at_diff - "$at_stderr" || at_failed=:
7253echo >>"$at_stdout"; $as_echo "Creating the archive
7254Testing the archive
7255file
7256" | \
7257  $at_diff - "$at_stdout" || at_failed=:
7258at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
7259$at_failed && at_fn_log_failure
7260$at_traceon; }
7261
7262              { set +x
7263$as_echo "$at_srcdir/verbose.at:29:
7264mkdir gnu
7265(cd gnu
7266TEST_TAR_FORMAT=gnu
7267export TEST_TAR_FORMAT
7268TAR_OPTIONS=\"-H gnu\"
7269export TAR_OPTIONS
7270rm -rf *
7271
7272genfile --file file --length 10240
7273echo Creating the archive
7274tar cvf - file > archive
7275echo Testing the archive
7276tar tf archive
7277)"
7278at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
7279( $at_check_trace;
7280mkdir gnu
7281(cd gnu
7282TEST_TAR_FORMAT=gnu
7283export TEST_TAR_FORMAT
7284TAR_OPTIONS="-H gnu"
7285export TAR_OPTIONS
7286rm -rf *
7287
7288genfile --file file --length 10240
7289echo Creating the archive
7290tar cvf - file > archive
7291echo Testing the archive
7292tar tf archive
7293)
7294) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7295at_status=$? at_failed=false
7296$at_check_filter
7297echo >>"$at_stderr"; $as_echo "file
7298" | \
7299  $at_diff - "$at_stderr" || at_failed=:
7300echo >>"$at_stdout"; $as_echo "Creating the archive
7301Testing the archive
7302file
7303" | \
7304  $at_diff - "$at_stdout" || at_failed=:
7305at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
7306$at_failed && at_fn_log_failure
7307$at_traceon; }
7308
7309
7310
7311
7312  set +x
7313  $at_times_p && times >"$at_times_file"
7314) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7315read at_status <"$at_status_file"
7316#AT_STOP_41
7317#AT_START_42
7318at_fn_group_banner 42 'gzip.at:23' \
7319  "gzip" "                                           " 7
7320at_xfail=no
7321(
7322  $as_echo "42. $at_setup_line: testing $at_desc ..."
7323  $at_traceon
7324
7325
7326
7327unset TAR_OPTIONS
7328
7329{ set +x
7330$as_echo "$at_srcdir/gzip.at:28:
7331
7332cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
7333
7334tar xfvz /dev/null 2>err
7335RC=\$?
7336sed -n '/^tar:/p' err >&2
7337exit \$RC
7338"
7339at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:28"
7340( $at_check_trace;
7341
7342cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
7343
7344tar xfvz /dev/null 2>err
7345RC=$?
7346sed -n '/^tar:/p' err >&2
7347exit $RC
7348
7349) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7350at_status=$? at_failed=false
7351$at_check_filter
7352echo >>"$at_stderr"; $as_echo "tar: Child returned status 1
7353tar: Error is not recoverable: exiting now
7354" | \
7355  $at_diff - "$at_stderr" || at_failed=:
7356at_fn_diff_devnull "$at_stdout" || at_failed=:
7357at_fn_check_status 2 $at_status "$at_srcdir/gzip.at:28"
7358$at_failed && at_fn_log_failure
7359$at_traceon; }
7360
7361
7362  set +x
7363  $at_times_p && times >"$at_times_file"
7364) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7365read at_status <"$at_status_file"
7366#AT_STOP_42
7367#AT_START_43
7368at_fn_group_banner 43 'recurse.at:21' \
7369  "recurse" "                                        " 7
7370at_xfail=no
7371      test -f $XFAILFILE && at_xfail=yes
7372(
7373  $as_echo "43. $at_setup_line: testing $at_desc ..."
7374  $at_traceon
7375
7376
7377
7378
7379
7380  { set +x
7381$as_echo "$at_srcdir/recurse.at:24:
7382mkdir v7
7383(cd v7
7384TEST_TAR_FORMAT=v7
7385export TEST_TAR_FORMAT
7386TAR_OPTIONS=\"-H v7\"
7387export TAR_OPTIONS
7388rm -rf *
7389
7390mkdir directory
7391touch directory/file
7392tar --create --file archive --no-recursion directory || exit 1
7393tar tf archive
7394)"
7395at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
7396( $at_check_trace;
7397mkdir v7
7398(cd v7
7399TEST_TAR_FORMAT=v7
7400export TEST_TAR_FORMAT
7401TAR_OPTIONS="-H v7"
7402export TAR_OPTIONS
7403rm -rf *
7404
7405mkdir directory
7406touch directory/file
7407tar --create --file archive --no-recursion directory || exit 1
7408tar tf archive
7409)
7410) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7411at_status=$? at_failed=false
7412$at_check_filter
7413at_fn_diff_devnull "$at_stderr" || at_failed=:
7414echo >>"$at_stdout"; $as_echo "directory/
7415" | \
7416  $at_diff - "$at_stdout" || at_failed=:
7417at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
7418$at_failed && at_fn_log_failure
7419$at_traceon; }
7420
7421              { set +x
7422$as_echo "$at_srcdir/recurse.at:24:
7423mkdir oldgnu
7424(cd oldgnu
7425TEST_TAR_FORMAT=oldgnu
7426export TEST_TAR_FORMAT
7427TAR_OPTIONS=\"-H oldgnu\"
7428export TAR_OPTIONS
7429rm -rf *
7430
7431mkdir directory
7432touch directory/file
7433tar --create --file archive --no-recursion directory || exit 1
7434tar tf archive
7435)"
7436at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
7437( $at_check_trace;
7438mkdir oldgnu
7439(cd oldgnu
7440TEST_TAR_FORMAT=oldgnu
7441export TEST_TAR_FORMAT
7442TAR_OPTIONS="-H oldgnu"
7443export TAR_OPTIONS
7444rm -rf *
7445
7446mkdir directory
7447touch directory/file
7448tar --create --file archive --no-recursion directory || exit 1
7449tar tf archive
7450)
7451) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7452at_status=$? at_failed=false
7453$at_check_filter
7454at_fn_diff_devnull "$at_stderr" || at_failed=:
7455echo >>"$at_stdout"; $as_echo "directory/
7456" | \
7457  $at_diff - "$at_stdout" || at_failed=:
7458at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
7459$at_failed && at_fn_log_failure
7460$at_traceon; }
7461
7462              { set +x
7463$as_echo "$at_srcdir/recurse.at:24:
7464mkdir ustar
7465(cd ustar
7466TEST_TAR_FORMAT=ustar
7467export TEST_TAR_FORMAT
7468TAR_OPTIONS=\"-H ustar\"
7469export TAR_OPTIONS
7470rm -rf *
7471
7472mkdir directory
7473touch directory/file
7474tar --create --file archive --no-recursion directory || exit 1
7475tar tf archive
7476)"
7477at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
7478( $at_check_trace;
7479mkdir ustar
7480(cd ustar
7481TEST_TAR_FORMAT=ustar
7482export TEST_TAR_FORMAT
7483TAR_OPTIONS="-H ustar"
7484export TAR_OPTIONS
7485rm -rf *
7486
7487mkdir directory
7488touch directory/file
7489tar --create --file archive --no-recursion directory || exit 1
7490tar tf archive
7491)
7492) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7493at_status=$? at_failed=false
7494$at_check_filter
7495at_fn_diff_devnull "$at_stderr" || at_failed=:
7496echo >>"$at_stdout"; $as_echo "directory/
7497" | \
7498  $at_diff - "$at_stdout" || at_failed=:
7499at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
7500$at_failed && at_fn_log_failure
7501$at_traceon; }
7502
7503              { set +x
7504$as_echo "$at_srcdir/recurse.at:24:
7505mkdir posix
7506(cd posix
7507TEST_TAR_FORMAT=posix
7508export TEST_TAR_FORMAT
7509TAR_OPTIONS=\"-H posix\"
7510export TAR_OPTIONS
7511rm -rf *
7512
7513mkdir directory
7514touch directory/file
7515tar --create --file archive --no-recursion directory || exit 1
7516tar tf archive
7517)"
7518at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
7519( $at_check_trace;
7520mkdir posix
7521(cd posix
7522TEST_TAR_FORMAT=posix
7523export TEST_TAR_FORMAT
7524TAR_OPTIONS="-H posix"
7525export TAR_OPTIONS
7526rm -rf *
7527
7528mkdir directory
7529touch directory/file
7530tar --create --file archive --no-recursion directory || exit 1
7531tar tf archive
7532)
7533) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7534at_status=$? at_failed=false
7535$at_check_filter
7536at_fn_diff_devnull "$at_stderr" || at_failed=:
7537echo >>"$at_stdout"; $as_echo "directory/
7538" | \
7539  $at_diff - "$at_stdout" || at_failed=:
7540at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
7541$at_failed && at_fn_log_failure
7542$at_traceon; }
7543
7544              { set +x
7545$as_echo "$at_srcdir/recurse.at:24:
7546mkdir gnu
7547(cd gnu
7548TEST_TAR_FORMAT=gnu
7549export TEST_TAR_FORMAT
7550TAR_OPTIONS=\"-H gnu\"
7551export TAR_OPTIONS
7552rm -rf *
7553
7554mkdir directory
7555touch directory/file
7556tar --create --file archive --no-recursion directory || exit 1
7557tar tf archive
7558)"
7559at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
7560( $at_check_trace;
7561mkdir gnu
7562(cd gnu
7563TEST_TAR_FORMAT=gnu
7564export TEST_TAR_FORMAT
7565TAR_OPTIONS="-H gnu"
7566export TAR_OPTIONS
7567rm -rf *
7568
7569mkdir directory
7570touch directory/file
7571tar --create --file archive --no-recursion directory || exit 1
7572tar tf archive
7573)
7574) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7575at_status=$? at_failed=false
7576$at_check_filter
7577at_fn_diff_devnull "$at_stderr" || at_failed=:
7578echo >>"$at_stdout"; $as_echo "directory/
7579" | \
7580  $at_diff - "$at_stdout" || at_failed=:
7581at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
7582$at_failed && at_fn_log_failure
7583$at_traceon; }
7584
7585
7586
7587
7588  set +x
7589  $at_times_p && times >"$at_times_file"
7590) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7591read at_status <"$at_status_file"
7592#AT_STOP_43
7593#AT_START_44
7594at_fn_group_banner 44 'recurs02.at:30' \
7595  "recurse: toggle" "                                " 7
7596at_xfail=no
7597      test -f $XFAILFILE && at_xfail=yes
7598(
7599  $as_echo "44. $at_setup_line: testing $at_desc ..."
7600  $at_traceon
7601
7602
7603
7604
7605
7606  { set +x
7607$as_echo "$at_srcdir/recurs02.at:33:
7608mkdir v7
7609(cd v7
7610TEST_TAR_FORMAT=v7
7611export TEST_TAR_FORMAT
7612TAR_OPTIONS=\"-H v7\"
7613export TAR_OPTIONS
7614rm -rf *
7615
7616mkdir directory1 directory2
7617touch directory1/file directory2/file
7618tar --create --file archive \\
7619    --no-recursion directory1 \\
7620    --recursion directory2 || exit 1
7621tar tf archive
7622tar cf archive directory1 directory2
7623tar tf archive \\
7624    --no-recursion directory1 \\
7625    --recursion directory2 || exit 1
7626)"
7627at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
7628( $at_check_trace;
7629mkdir v7
7630(cd v7
7631TEST_TAR_FORMAT=v7
7632export TEST_TAR_FORMAT
7633TAR_OPTIONS="-H v7"
7634export TAR_OPTIONS
7635rm -rf *
7636
7637mkdir directory1 directory2
7638touch directory1/file directory2/file
7639tar --create --file archive \
7640    --no-recursion directory1 \
7641    --recursion directory2 || exit 1
7642tar tf archive
7643tar cf archive directory1 directory2
7644tar tf archive \
7645    --no-recursion directory1 \
7646    --recursion directory2 || exit 1
7647)
7648) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7649at_status=$? at_failed=false
7650$at_check_filter
7651at_fn_diff_devnull "$at_stderr" || at_failed=:
7652echo >>"$at_stdout"; $as_echo "directory1/
7653directory2/
7654directory2/file
7655directory1/
7656directory2/
7657directory2/file
7658" | \
7659  $at_diff - "$at_stdout" || at_failed=:
7660at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
7661$at_failed && at_fn_log_failure
7662$at_traceon; }
7663
7664              { set +x
7665$as_echo "$at_srcdir/recurs02.at:33:
7666mkdir oldgnu
7667(cd oldgnu
7668TEST_TAR_FORMAT=oldgnu
7669export TEST_TAR_FORMAT
7670TAR_OPTIONS=\"-H oldgnu\"
7671export TAR_OPTIONS
7672rm -rf *
7673
7674mkdir directory1 directory2
7675touch directory1/file directory2/file
7676tar --create --file archive \\
7677    --no-recursion directory1 \\
7678    --recursion directory2 || exit 1
7679tar tf archive
7680tar cf archive directory1 directory2
7681tar tf archive \\
7682    --no-recursion directory1 \\
7683    --recursion directory2 || exit 1
7684)"
7685at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
7686( $at_check_trace;
7687mkdir oldgnu
7688(cd oldgnu
7689TEST_TAR_FORMAT=oldgnu
7690export TEST_TAR_FORMAT
7691TAR_OPTIONS="-H oldgnu"
7692export TAR_OPTIONS
7693rm -rf *
7694
7695mkdir directory1 directory2
7696touch directory1/file directory2/file
7697tar --create --file archive \
7698    --no-recursion directory1 \
7699    --recursion directory2 || exit 1
7700tar tf archive
7701tar cf archive directory1 directory2
7702tar tf archive \
7703    --no-recursion directory1 \
7704    --recursion directory2 || exit 1
7705)
7706) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7707at_status=$? at_failed=false
7708$at_check_filter
7709at_fn_diff_devnull "$at_stderr" || at_failed=:
7710echo >>"$at_stdout"; $as_echo "directory1/
7711directory2/
7712directory2/file
7713directory1/
7714directory2/
7715directory2/file
7716" | \
7717  $at_diff - "$at_stdout" || at_failed=:
7718at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
7719$at_failed && at_fn_log_failure
7720$at_traceon; }
7721
7722              { set +x
7723$as_echo "$at_srcdir/recurs02.at:33:
7724mkdir ustar
7725(cd ustar
7726TEST_TAR_FORMAT=ustar
7727export TEST_TAR_FORMAT
7728TAR_OPTIONS=\"-H ustar\"
7729export TAR_OPTIONS
7730rm -rf *
7731
7732mkdir directory1 directory2
7733touch directory1/file directory2/file
7734tar --create --file archive \\
7735    --no-recursion directory1 \\
7736    --recursion directory2 || exit 1
7737tar tf archive
7738tar cf archive directory1 directory2
7739tar tf archive \\
7740    --no-recursion directory1 \\
7741    --recursion directory2 || exit 1
7742)"
7743at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
7744( $at_check_trace;
7745mkdir ustar
7746(cd ustar
7747TEST_TAR_FORMAT=ustar
7748export TEST_TAR_FORMAT
7749TAR_OPTIONS="-H ustar"
7750export TAR_OPTIONS
7751rm -rf *
7752
7753mkdir directory1 directory2
7754touch directory1/file directory2/file
7755tar --create --file archive \
7756    --no-recursion directory1 \
7757    --recursion directory2 || exit 1
7758tar tf archive
7759tar cf archive directory1 directory2
7760tar tf archive \
7761    --no-recursion directory1 \
7762    --recursion directory2 || exit 1
7763)
7764) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7765at_status=$? at_failed=false
7766$at_check_filter
7767at_fn_diff_devnull "$at_stderr" || at_failed=:
7768echo >>"$at_stdout"; $as_echo "directory1/
7769directory2/
7770directory2/file
7771directory1/
7772directory2/
7773directory2/file
7774" | \
7775  $at_diff - "$at_stdout" || at_failed=:
7776at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
7777$at_failed && at_fn_log_failure
7778$at_traceon; }
7779
7780              { set +x
7781$as_echo "$at_srcdir/recurs02.at:33:
7782mkdir posix
7783(cd posix
7784TEST_TAR_FORMAT=posix
7785export TEST_TAR_FORMAT
7786TAR_OPTIONS=\"-H posix\"
7787export TAR_OPTIONS
7788rm -rf *
7789
7790mkdir directory1 directory2
7791touch directory1/file directory2/file
7792tar --create --file archive \\
7793    --no-recursion directory1 \\
7794    --recursion directory2 || exit 1
7795tar tf archive
7796tar cf archive directory1 directory2
7797tar tf archive \\
7798    --no-recursion directory1 \\
7799    --recursion directory2 || exit 1
7800)"
7801at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
7802( $at_check_trace;
7803mkdir posix
7804(cd posix
7805TEST_TAR_FORMAT=posix
7806export TEST_TAR_FORMAT
7807TAR_OPTIONS="-H posix"
7808export TAR_OPTIONS
7809rm -rf *
7810
7811mkdir directory1 directory2
7812touch directory1/file directory2/file
7813tar --create --file archive \
7814    --no-recursion directory1 \
7815    --recursion directory2 || exit 1
7816tar tf archive
7817tar cf archive directory1 directory2
7818tar tf archive \
7819    --no-recursion directory1 \
7820    --recursion directory2 || exit 1
7821)
7822) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7823at_status=$? at_failed=false
7824$at_check_filter
7825at_fn_diff_devnull "$at_stderr" || at_failed=:
7826echo >>"$at_stdout"; $as_echo "directory1/
7827directory2/
7828directory2/file
7829directory1/
7830directory2/
7831directory2/file
7832" | \
7833  $at_diff - "$at_stdout" || at_failed=:
7834at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
7835$at_failed && at_fn_log_failure
7836$at_traceon; }
7837
7838              { set +x
7839$as_echo "$at_srcdir/recurs02.at:33:
7840mkdir gnu
7841(cd gnu
7842TEST_TAR_FORMAT=gnu
7843export TEST_TAR_FORMAT
7844TAR_OPTIONS=\"-H gnu\"
7845export TAR_OPTIONS
7846rm -rf *
7847
7848mkdir directory1 directory2
7849touch directory1/file directory2/file
7850tar --create --file archive \\
7851    --no-recursion directory1 \\
7852    --recursion directory2 || exit 1
7853tar tf archive
7854tar cf archive directory1 directory2
7855tar tf archive \\
7856    --no-recursion directory1 \\
7857    --recursion directory2 || exit 1
7858)"
7859at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
7860( $at_check_trace;
7861mkdir gnu
7862(cd gnu
7863TEST_TAR_FORMAT=gnu
7864export TEST_TAR_FORMAT
7865TAR_OPTIONS="-H gnu"
7866export TAR_OPTIONS
7867rm -rf *
7868
7869mkdir directory1 directory2
7870touch directory1/file directory2/file
7871tar --create --file archive \
7872    --no-recursion directory1 \
7873    --recursion directory2 || exit 1
7874tar tf archive
7875tar cf archive directory1 directory2
7876tar tf archive \
7877    --no-recursion directory1 \
7878    --recursion directory2 || exit 1
7879)
7880) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7881at_status=$? at_failed=false
7882$at_check_filter
7883at_fn_diff_devnull "$at_stderr" || at_failed=:
7884echo >>"$at_stdout"; $as_echo "directory1/
7885directory2/
7886directory2/file
7887directory1/
7888directory2/
7889directory2/file
7890" | \
7891  $at_diff - "$at_stdout" || at_failed=:
7892at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
7893$at_failed && at_fn_log_failure
7894$at_traceon; }
7895
7896
7897
7898
7899  set +x
7900  $at_times_p && times >"$at_times_file"
7901) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7902read at_status <"$at_status_file"
7903#AT_STOP_44
7904#AT_START_45
7905at_fn_group_banner 45 'shortrec.at:25' \
7906  "short records" "                                  " 7
7907at_xfail=no
7908      test -f $XFAILFILE && at_xfail=yes
7909(
7910  $as_echo "45. $at_setup_line: testing $at_desc ..."
7911  $at_traceon
7912
7913
7914
7915
7916
7917  { set +x
7918$as_echo "$at_srcdir/shortrec.at:28:
7919mkdir v7
7920(cd v7
7921TEST_TAR_FORMAT=v7
7922export TEST_TAR_FORMAT
7923TAR_OPTIONS=\"-H v7\"
7924export TAR_OPTIONS
7925rm -rf *
7926
7927mkdir directory
7928(cd directory && touch a b c d e f g h i j k l m n o p q r)
7929tar -c -b 1 -f - directory | tar -t -f - > /dev/null
7930tar -c -b 1 -f archive directory
7931tar -t -f archive > /dev/null
7932tar -t -f - < archive > /dev/null
7933
7934rm -r directory
7935)"
7936at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
7937( $at_check_trace;
7938mkdir v7
7939(cd v7
7940TEST_TAR_FORMAT=v7
7941export TEST_TAR_FORMAT
7942TAR_OPTIONS="-H v7"
7943export TAR_OPTIONS
7944rm -rf *
7945
7946mkdir directory
7947(cd directory && touch a b c d e f g h i j k l m n o p q r)
7948tar -c -b 1 -f - directory | tar -t -f - > /dev/null
7949tar -c -b 1 -f archive directory
7950tar -t -f archive > /dev/null
7951tar -t -f - < archive > /dev/null
7952
7953rm -r directory
7954)
7955) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7956at_status=$? at_failed=false
7957$at_check_filter
7958at_fn_diff_devnull "$at_stderr" || at_failed=:
7959at_fn_diff_devnull "$at_stdout" || at_failed=:
7960at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
7961$at_failed && at_fn_log_failure
7962$at_traceon; }
7963
7964              { set +x
7965$as_echo "$at_srcdir/shortrec.at:28:
7966mkdir oldgnu
7967(cd oldgnu
7968TEST_TAR_FORMAT=oldgnu
7969export TEST_TAR_FORMAT
7970TAR_OPTIONS=\"-H oldgnu\"
7971export TAR_OPTIONS
7972rm -rf *
7973
7974mkdir directory
7975(cd directory && touch a b c d e f g h i j k l m n o p q r)
7976tar -c -b 1 -f - directory | tar -t -f - > /dev/null
7977tar -c -b 1 -f archive directory
7978tar -t -f archive > /dev/null
7979tar -t -f - < archive > /dev/null
7980
7981rm -r directory
7982)"
7983at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
7984( $at_check_trace;
7985mkdir oldgnu
7986(cd oldgnu
7987TEST_TAR_FORMAT=oldgnu
7988export TEST_TAR_FORMAT
7989TAR_OPTIONS="-H oldgnu"
7990export TAR_OPTIONS
7991rm -rf *
7992
7993mkdir directory
7994(cd directory && touch a b c d e f g h i j k l m n o p q r)
7995tar -c -b 1 -f - directory | tar -t -f - > /dev/null
7996tar -c -b 1 -f archive directory
7997tar -t -f archive > /dev/null
7998tar -t -f - < archive > /dev/null
7999
8000rm -r directory
8001)
8002) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8003at_status=$? at_failed=false
8004$at_check_filter
8005at_fn_diff_devnull "$at_stderr" || at_failed=:
8006at_fn_diff_devnull "$at_stdout" || at_failed=:
8007at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
8008$at_failed && at_fn_log_failure
8009$at_traceon; }
8010
8011              { set +x
8012$as_echo "$at_srcdir/shortrec.at:28:
8013mkdir ustar
8014(cd ustar
8015TEST_TAR_FORMAT=ustar
8016export TEST_TAR_FORMAT
8017TAR_OPTIONS=\"-H ustar\"
8018export TAR_OPTIONS
8019rm -rf *
8020
8021mkdir directory
8022(cd directory && touch a b c d e f g h i j k l m n o p q r)
8023tar -c -b 1 -f - directory | tar -t -f - > /dev/null
8024tar -c -b 1 -f archive directory
8025tar -t -f archive > /dev/null
8026tar -t -f - < archive > /dev/null
8027
8028rm -r directory
8029)"
8030at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
8031( $at_check_trace;
8032mkdir ustar
8033(cd ustar
8034TEST_TAR_FORMAT=ustar
8035export TEST_TAR_FORMAT
8036TAR_OPTIONS="-H ustar"
8037export TAR_OPTIONS
8038rm -rf *
8039
8040mkdir directory
8041(cd directory && touch a b c d e f g h i j k l m n o p q r)
8042tar -c -b 1 -f - directory | tar -t -f - > /dev/null
8043tar -c -b 1 -f archive directory
8044tar -t -f archive > /dev/null
8045tar -t -f - < archive > /dev/null
8046
8047rm -r directory
8048)
8049) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8050at_status=$? at_failed=false
8051$at_check_filter
8052at_fn_diff_devnull "$at_stderr" || at_failed=:
8053at_fn_diff_devnull "$at_stdout" || at_failed=:
8054at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
8055$at_failed && at_fn_log_failure
8056$at_traceon; }
8057
8058              { set +x
8059$as_echo "$at_srcdir/shortrec.at:28:
8060mkdir posix
8061(cd posix
8062TEST_TAR_FORMAT=posix
8063export TEST_TAR_FORMAT
8064TAR_OPTIONS=\"-H posix\"
8065export TAR_OPTIONS
8066rm -rf *
8067
8068mkdir directory
8069(cd directory && touch a b c d e f g h i j k l m n o p q r)
8070tar -c -b 1 -f - directory | tar -t -f - > /dev/null
8071tar -c -b 1 -f archive directory
8072tar -t -f archive > /dev/null
8073tar -t -f - < archive > /dev/null
8074
8075rm -r directory
8076)"
8077at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
8078( $at_check_trace;
8079mkdir posix
8080(cd posix
8081TEST_TAR_FORMAT=posix
8082export TEST_TAR_FORMAT
8083TAR_OPTIONS="-H posix"
8084export TAR_OPTIONS
8085rm -rf *
8086
8087mkdir directory
8088(cd directory && touch a b c d e f g h i j k l m n o p q r)
8089tar -c -b 1 -f - directory | tar -t -f - > /dev/null
8090tar -c -b 1 -f archive directory
8091tar -t -f archive > /dev/null
8092tar -t -f - < archive > /dev/null
8093
8094rm -r directory
8095)
8096) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8097at_status=$? at_failed=false
8098$at_check_filter
8099at_fn_diff_devnull "$at_stderr" || at_failed=:
8100at_fn_diff_devnull "$at_stdout" || at_failed=:
8101at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
8102$at_failed && at_fn_log_failure
8103$at_traceon; }
8104
8105              { set +x
8106$as_echo "$at_srcdir/shortrec.at:28:
8107mkdir gnu
8108(cd gnu
8109TEST_TAR_FORMAT=gnu
8110export TEST_TAR_FORMAT
8111TAR_OPTIONS=\"-H gnu\"
8112export TAR_OPTIONS
8113rm -rf *
8114
8115mkdir directory
8116(cd directory && touch a b c d e f g h i j k l m n o p q r)
8117tar -c -b 1 -f - directory | tar -t -f - > /dev/null
8118tar -c -b 1 -f archive directory
8119tar -t -f archive > /dev/null
8120tar -t -f - < archive > /dev/null
8121
8122rm -r directory
8123)"
8124at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
8125( $at_check_trace;
8126mkdir gnu
8127(cd gnu
8128TEST_TAR_FORMAT=gnu
8129export TEST_TAR_FORMAT
8130TAR_OPTIONS="-H gnu"
8131export TAR_OPTIONS
8132rm -rf *
8133
8134mkdir directory
8135(cd directory && touch a b c d e f g h i j k l m n o p q r)
8136tar -c -b 1 -f - directory | tar -t -f - > /dev/null
8137tar -c -b 1 -f archive directory
8138tar -t -f archive > /dev/null
8139tar -t -f - < archive > /dev/null
8140
8141rm -r directory
8142)
8143) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8144at_status=$? at_failed=false
8145$at_check_filter
8146at_fn_diff_devnull "$at_stderr" || at_failed=:
8147at_fn_diff_devnull "$at_stdout" || at_failed=:
8148at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
8149$at_failed && at_fn_log_failure
8150$at_traceon; }
8151
8152
8153
8154
8155  set +x
8156  $at_times_p && times >"$at_times_file"
8157) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8158read at_status <"$at_status_file"
8159#AT_STOP_45
8160#AT_START_46
8161at_fn_group_banner 46 'numeric.at:18' \
8162  "--numeric-owner basic tests" "                    " 7
8163at_xfail=no
8164      test -f $XFAILFILE && at_xfail=yes
8165(
8166  $as_echo "46. $at_setup_line: testing $at_desc ..."
8167  $at_traceon
8168
8169
8170
8171
8172
8173
8174
8175  { set +x
8176$as_echo "$at_srcdir/numeric.at:29:
8177mkdir posix
8178(cd posix
8179TEST_TAR_FORMAT=posix
8180export TEST_TAR_FORMAT
8181TAR_OPTIONS=\"-H posix\"
8182export TAR_OPTIONS
8183rm -rf *
8184
8185MYUID=\$(id -u) || exit 77
8186MYGID=\$(id -g) || exit 77
8187MYUSR=\$(id -un) || exit 77
8188MYGRP=\$(id -gn) || exit 77
8189
8190mkdir dir
8191# Ensure correct group id on BSDs.
8192chown :\$MYGID dir >/dev/null 2>/dev/null
8193genfile --file dir/file
8194
8195
8196
8197decho --create
8198tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8199tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8200
8201
8202decho --list
8203tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8204tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8205
8206
8207decho --diff
8208tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8209tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8210
8211
8212decho --extract
8213tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8214tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8215
8216)"
8217at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
8218( $at_check_trace;
8219mkdir posix
8220(cd posix
8221TEST_TAR_FORMAT=posix
8222export TEST_TAR_FORMAT
8223TAR_OPTIONS="-H posix"
8224export TAR_OPTIONS
8225rm -rf *
8226
8227MYUID=$(id -u) || exit 77
8228MYGID=$(id -g) || exit 77
8229MYUSR=$(id -un) || exit 77
8230MYGRP=$(id -gn) || exit 77
8231
8232mkdir dir
8233# Ensure correct group id on BSDs.
8234chown :$MYGID dir >/dev/null 2>/dev/null
8235genfile --file dir/file
8236
8237
8238
8239decho --create
8240tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8241tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8242
8243
8244decho --list
8245tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8246tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8247
8248
8249decho --diff
8250tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8251tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8252
8253
8254decho --extract
8255tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8256tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8257
8258)
8259) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8260at_status=$? at_failed=false
8261$at_check_filter
8262echo >>"$at_stderr"; $as_echo "--create
8263--list
8264--diff
8265--extract
8266" | \
8267  $at_diff - "$at_stderr" || at_failed=:
8268echo >>"$at_stdout"; $as_echo "--create
8269OK
8270OK
8271OK
8272OK
8273--list
8274OK
8275OK
8276OK
8277OK
8278--diff
8279OK
8280OK
8281OK
8282OK
8283--extract
8284OK
8285OK
8286OK
8287OK
8288" | \
8289  $at_diff - "$at_stdout" || at_failed=:
8290at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
8291$at_failed && at_fn_log_failure
8292$at_traceon; }
8293
8294              { set +x
8295$as_echo "$at_srcdir/numeric.at:29:
8296mkdir gnu
8297(cd gnu
8298TEST_TAR_FORMAT=gnu
8299export TEST_TAR_FORMAT
8300TAR_OPTIONS=\"-H gnu\"
8301export TAR_OPTIONS
8302rm -rf *
8303
8304MYUID=\$(id -u) || exit 77
8305MYGID=\$(id -g) || exit 77
8306MYUSR=\$(id -un) || exit 77
8307MYGRP=\$(id -gn) || exit 77
8308
8309mkdir dir
8310# Ensure correct group id on BSDs.
8311chown :\$MYGID dir >/dev/null 2>/dev/null
8312genfile --file dir/file
8313
8314
8315
8316decho --create
8317tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8318tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8319
8320
8321decho --list
8322tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8323tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8324
8325
8326decho --diff
8327tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8328tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8329
8330
8331decho --extract
8332tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8333tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8334
8335)"
8336at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
8337( $at_check_trace;
8338mkdir gnu
8339(cd gnu
8340TEST_TAR_FORMAT=gnu
8341export TEST_TAR_FORMAT
8342TAR_OPTIONS="-H gnu"
8343export TAR_OPTIONS
8344rm -rf *
8345
8346MYUID=$(id -u) || exit 77
8347MYGID=$(id -g) || exit 77
8348MYUSR=$(id -un) || exit 77
8349MYGRP=$(id -gn) || exit 77
8350
8351mkdir dir
8352# Ensure correct group id on BSDs.
8353chown :$MYGID dir >/dev/null 2>/dev/null
8354genfile --file dir/file
8355
8356
8357
8358decho --create
8359tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8360tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8361
8362
8363decho --list
8364tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8365tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8366
8367
8368decho --diff
8369tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8370tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8371
8372
8373decho --extract
8374tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8375tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8376
8377)
8378) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8379at_status=$? at_failed=false
8380$at_check_filter
8381echo >>"$at_stderr"; $as_echo "--create
8382--list
8383--diff
8384--extract
8385" | \
8386  $at_diff - "$at_stderr" || at_failed=:
8387echo >>"$at_stdout"; $as_echo "--create
8388OK
8389OK
8390OK
8391OK
8392--list
8393OK
8394OK
8395OK
8396OK
8397--diff
8398OK
8399OK
8400OK
8401OK
8402--extract
8403OK
8404OK
8405OK
8406OK
8407" | \
8408  $at_diff - "$at_stdout" || at_failed=:
8409at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
8410$at_failed && at_fn_log_failure
8411$at_traceon; }
8412
8413              { set +x
8414$as_echo "$at_srcdir/numeric.at:29:
8415mkdir ustar
8416(cd ustar
8417TEST_TAR_FORMAT=ustar
8418export TEST_TAR_FORMAT
8419TAR_OPTIONS=\"-H ustar\"
8420export TAR_OPTIONS
8421rm -rf *
8422
8423MYUID=\$(id -u) || exit 77
8424MYGID=\$(id -g) || exit 77
8425MYUSR=\$(id -un) || exit 77
8426MYGRP=\$(id -gn) || exit 77
8427
8428mkdir dir
8429# Ensure correct group id on BSDs.
8430chown :\$MYGID dir >/dev/null 2>/dev/null
8431genfile --file dir/file
8432
8433
8434
8435decho --create
8436tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8437tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8438
8439
8440decho --list
8441tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8442tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8443
8444
8445decho --diff
8446tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8447tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8448
8449
8450decho --extract
8451tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8452tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8453
8454)"
8455at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
8456( $at_check_trace;
8457mkdir ustar
8458(cd ustar
8459TEST_TAR_FORMAT=ustar
8460export TEST_TAR_FORMAT
8461TAR_OPTIONS="-H ustar"
8462export TAR_OPTIONS
8463rm -rf *
8464
8465MYUID=$(id -u) || exit 77
8466MYGID=$(id -g) || exit 77
8467MYUSR=$(id -un) || exit 77
8468MYGRP=$(id -gn) || exit 77
8469
8470mkdir dir
8471# Ensure correct group id on BSDs.
8472chown :$MYGID dir >/dev/null 2>/dev/null
8473genfile --file dir/file
8474
8475
8476
8477decho --create
8478tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8479tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8480
8481
8482decho --list
8483tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8484tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8485
8486
8487decho --diff
8488tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8489tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8490
8491
8492decho --extract
8493tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8494tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8495
8496)
8497) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8498at_status=$? at_failed=false
8499$at_check_filter
8500echo >>"$at_stderr"; $as_echo "--create
8501--list
8502--diff
8503--extract
8504" | \
8505  $at_diff - "$at_stderr" || at_failed=:
8506echo >>"$at_stdout"; $as_echo "--create
8507OK
8508OK
8509OK
8510OK
8511--list
8512OK
8513OK
8514OK
8515OK
8516--diff
8517OK
8518OK
8519OK
8520OK
8521--extract
8522OK
8523OK
8524OK
8525OK
8526" | \
8527  $at_diff - "$at_stdout" || at_failed=:
8528at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
8529$at_failed && at_fn_log_failure
8530$at_traceon; }
8531
8532              { set +x
8533$as_echo "$at_srcdir/numeric.at:29:
8534mkdir oldgnu
8535(cd oldgnu
8536TEST_TAR_FORMAT=oldgnu
8537export TEST_TAR_FORMAT
8538TAR_OPTIONS=\"-H oldgnu\"
8539export TAR_OPTIONS
8540rm -rf *
8541
8542MYUID=\$(id -u) || exit 77
8543MYGID=\$(id -g) || exit 77
8544MYUSR=\$(id -un) || exit 77
8545MYGRP=\$(id -gn) || exit 77
8546
8547mkdir dir
8548# Ensure correct group id on BSDs.
8549chown :\$MYGID dir >/dev/null 2>/dev/null
8550genfile --file dir/file
8551
8552
8553
8554decho --create
8555tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8556tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8557
8558
8559decho --list
8560tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8561tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8562
8563
8564decho --diff
8565tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8566tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8567
8568
8569decho --extract
8570tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
8571tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
8572
8573)"
8574at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
8575( $at_check_trace;
8576mkdir oldgnu
8577(cd oldgnu
8578TEST_TAR_FORMAT=oldgnu
8579export TEST_TAR_FORMAT
8580TAR_OPTIONS="-H oldgnu"
8581export TAR_OPTIONS
8582rm -rf *
8583
8584MYUID=$(id -u) || exit 77
8585MYGID=$(id -g) || exit 77
8586MYUSR=$(id -un) || exit 77
8587MYGRP=$(id -gn) || exit 77
8588
8589mkdir dir
8590# Ensure correct group id on BSDs.
8591chown :$MYGID dir >/dev/null 2>/dev/null
8592genfile --file dir/file
8593
8594
8595
8596decho --create
8597tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8598tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8599
8600
8601decho --list
8602tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8603tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8604
8605
8606decho --diff
8607tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8608tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8609
8610
8611decho --extract
8612tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
8613tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
8614
8615)
8616) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8617at_status=$? at_failed=false
8618$at_check_filter
8619echo >>"$at_stderr"; $as_echo "--create
8620--list
8621--diff
8622--extract
8623" | \
8624  $at_diff - "$at_stderr" || at_failed=:
8625echo >>"$at_stdout"; $as_echo "--create
8626OK
8627OK
8628OK
8629OK
8630--list
8631OK
8632OK
8633OK
8634OK
8635--diff
8636OK
8637OK
8638OK
8639OK
8640--extract
8641OK
8642OK
8643OK
8644OK
8645" | \
8646  $at_diff - "$at_stdout" || at_failed=:
8647at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
8648$at_failed && at_fn_log_failure
8649$at_traceon; }
8650
8651
8652
8653
8654  set +x
8655  $at_times_p && times >"$at_times_file"
8656) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8657read at_status <"$at_status_file"
8658#AT_STOP_46
8659#AT_START_47
8660at_fn_group_banner 47 'same-order01.at:26' \
8661  "working -C with --same-order" "                   " 8
8662at_xfail=no
8663      test -f $XFAILFILE && at_xfail=yes
8664(
8665  $as_echo "47. $at_setup_line: testing $at_desc ..."
8666  $at_traceon
8667
8668
8669
8670
8671
8672  { set +x
8673$as_echo "$at_srcdir/same-order01.at:29:
8674mkdir v7
8675(cd v7
8676TEST_TAR_FORMAT=v7
8677export TEST_TAR_FORMAT
8678TAR_OPTIONS=\"-H v7\"
8679export TAR_OPTIONS
8680rm -rf *
8681
8682
8683test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8684
8685
8686genfile -l 1024 -f file1
8687genfile -l 1024 -f file2
8688tar cf archive file1 file2
8689
8690mkdir directory
8691tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8692
8693ls directory|sort
8694)"
8695at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
8696( $at_check_trace;
8697mkdir v7
8698(cd v7
8699TEST_TAR_FORMAT=v7
8700export TEST_TAR_FORMAT
8701TAR_OPTIONS="-H v7"
8702export TAR_OPTIONS
8703rm -rf *
8704
8705
8706test -z "`sort < /dev/null 2>&1`" || exit 77
8707
8708
8709genfile -l 1024 -f file1
8710genfile -l 1024 -f file2
8711tar cf archive file1 file2
8712
8713mkdir directory
8714tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8715
8716ls directory|sort
8717)
8718) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8719at_status=$? at_failed=false
8720$at_check_filter
8721at_fn_diff_devnull "$at_stderr" || at_failed=:
8722echo >>"$at_stdout"; $as_echo "file1
8723file2
8724" | \
8725  $at_diff - "$at_stdout" || at_failed=:
8726at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
8727$at_failed && at_fn_log_failure
8728$at_traceon; }
8729
8730              { set +x
8731$as_echo "$at_srcdir/same-order01.at:29:
8732mkdir oldgnu
8733(cd oldgnu
8734TEST_TAR_FORMAT=oldgnu
8735export TEST_TAR_FORMAT
8736TAR_OPTIONS=\"-H oldgnu\"
8737export TAR_OPTIONS
8738rm -rf *
8739
8740
8741test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8742
8743
8744genfile -l 1024 -f file1
8745genfile -l 1024 -f file2
8746tar cf archive file1 file2
8747
8748mkdir directory
8749tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8750
8751ls directory|sort
8752)"
8753at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
8754( $at_check_trace;
8755mkdir oldgnu
8756(cd oldgnu
8757TEST_TAR_FORMAT=oldgnu
8758export TEST_TAR_FORMAT
8759TAR_OPTIONS="-H oldgnu"
8760export TAR_OPTIONS
8761rm -rf *
8762
8763
8764test -z "`sort < /dev/null 2>&1`" || exit 77
8765
8766
8767genfile -l 1024 -f file1
8768genfile -l 1024 -f file2
8769tar cf archive file1 file2
8770
8771mkdir directory
8772tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8773
8774ls directory|sort
8775)
8776) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8777at_status=$? at_failed=false
8778$at_check_filter
8779at_fn_diff_devnull "$at_stderr" || at_failed=:
8780echo >>"$at_stdout"; $as_echo "file1
8781file2
8782" | \
8783  $at_diff - "$at_stdout" || at_failed=:
8784at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
8785$at_failed && at_fn_log_failure
8786$at_traceon; }
8787
8788              { set +x
8789$as_echo "$at_srcdir/same-order01.at:29:
8790mkdir ustar
8791(cd ustar
8792TEST_TAR_FORMAT=ustar
8793export TEST_TAR_FORMAT
8794TAR_OPTIONS=\"-H ustar\"
8795export TAR_OPTIONS
8796rm -rf *
8797
8798
8799test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8800
8801
8802genfile -l 1024 -f file1
8803genfile -l 1024 -f file2
8804tar cf archive file1 file2
8805
8806mkdir directory
8807tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8808
8809ls directory|sort
8810)"
8811at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
8812( $at_check_trace;
8813mkdir ustar
8814(cd ustar
8815TEST_TAR_FORMAT=ustar
8816export TEST_TAR_FORMAT
8817TAR_OPTIONS="-H ustar"
8818export TAR_OPTIONS
8819rm -rf *
8820
8821
8822test -z "`sort < /dev/null 2>&1`" || exit 77
8823
8824
8825genfile -l 1024 -f file1
8826genfile -l 1024 -f file2
8827tar cf archive file1 file2
8828
8829mkdir directory
8830tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8831
8832ls directory|sort
8833)
8834) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8835at_status=$? at_failed=false
8836$at_check_filter
8837at_fn_diff_devnull "$at_stderr" || at_failed=:
8838echo >>"$at_stdout"; $as_echo "file1
8839file2
8840" | \
8841  $at_diff - "$at_stdout" || at_failed=:
8842at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
8843$at_failed && at_fn_log_failure
8844$at_traceon; }
8845
8846              { set +x
8847$as_echo "$at_srcdir/same-order01.at:29:
8848mkdir posix
8849(cd posix
8850TEST_TAR_FORMAT=posix
8851export TEST_TAR_FORMAT
8852TAR_OPTIONS=\"-H posix\"
8853export TAR_OPTIONS
8854rm -rf *
8855
8856
8857test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8858
8859
8860genfile -l 1024 -f file1
8861genfile -l 1024 -f file2
8862tar cf archive file1 file2
8863
8864mkdir directory
8865tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8866
8867ls directory|sort
8868)"
8869at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
8870( $at_check_trace;
8871mkdir posix
8872(cd posix
8873TEST_TAR_FORMAT=posix
8874export TEST_TAR_FORMAT
8875TAR_OPTIONS="-H posix"
8876export TAR_OPTIONS
8877rm -rf *
8878
8879
8880test -z "`sort < /dev/null 2>&1`" || exit 77
8881
8882
8883genfile -l 1024 -f file1
8884genfile -l 1024 -f file2
8885tar cf archive file1 file2
8886
8887mkdir directory
8888tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8889
8890ls directory|sort
8891)
8892) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8893at_status=$? at_failed=false
8894$at_check_filter
8895at_fn_diff_devnull "$at_stderr" || at_failed=:
8896echo >>"$at_stdout"; $as_echo "file1
8897file2
8898" | \
8899  $at_diff - "$at_stdout" || at_failed=:
8900at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
8901$at_failed && at_fn_log_failure
8902$at_traceon; }
8903
8904              { set +x
8905$as_echo "$at_srcdir/same-order01.at:29:
8906mkdir gnu
8907(cd gnu
8908TEST_TAR_FORMAT=gnu
8909export TEST_TAR_FORMAT
8910TAR_OPTIONS=\"-H gnu\"
8911export TAR_OPTIONS
8912rm -rf *
8913
8914
8915test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8916
8917
8918genfile -l 1024 -f file1
8919genfile -l 1024 -f file2
8920tar cf archive file1 file2
8921
8922mkdir directory
8923tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8924
8925ls directory|sort
8926)"
8927at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
8928( $at_check_trace;
8929mkdir gnu
8930(cd gnu
8931TEST_TAR_FORMAT=gnu
8932export TEST_TAR_FORMAT
8933TAR_OPTIONS="-H gnu"
8934export TAR_OPTIONS
8935rm -rf *
8936
8937
8938test -z "`sort < /dev/null 2>&1`" || exit 77
8939
8940
8941genfile -l 1024 -f file1
8942genfile -l 1024 -f file2
8943tar cf archive file1 file2
8944
8945mkdir directory
8946tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
8947
8948ls directory|sort
8949)
8950) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8951at_status=$? at_failed=false
8952$at_check_filter
8953at_fn_diff_devnull "$at_stderr" || at_failed=:
8954echo >>"$at_stdout"; $as_echo "file1
8955file2
8956" | \
8957  $at_diff - "$at_stdout" || at_failed=:
8958at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
8959$at_failed && at_fn_log_failure
8960$at_traceon; }
8961
8962
8963
8964
8965  set +x
8966  $at_times_p && times >"$at_times_file"
8967) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8968read at_status <"$at_status_file"
8969#AT_STOP_47
8970#AT_START_48
8971at_fn_group_banner 48 'same-order02.at:25' \
8972  "multiple -C options" "                            " 8
8973at_xfail=no
8974      test -f $XFAILFILE && at_xfail=yes
8975(
8976  $as_echo "48. $at_setup_line: testing $at_desc ..."
8977  $at_traceon
8978
8979
8980
8981
8982
8983  { set +x
8984$as_echo "$at_srcdir/same-order02.at:28:
8985mkdir v7
8986(cd v7
8987TEST_TAR_FORMAT=v7
8988export TEST_TAR_FORMAT
8989TAR_OPTIONS=\"-H v7\"
8990export TAR_OPTIONS
8991rm -rf *
8992
8993genfile -l 1024 -f file1
8994genfile -l 1024 -f file2
8995tar cf archive file1 file2
8996
8997mkdir en
8998mkdir to
8999
9000HERE=\`pwd\`
9001tar -xf archive --same-order --warning=no-timestamp \\
9002  -C \$HERE/en file1 \\
9003  -C \$HERE/to file2 || exit 1
9004
9005ls en
9006echo separator
9007ls to
9008)"
9009at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
9010( $at_check_trace;
9011mkdir v7
9012(cd v7
9013TEST_TAR_FORMAT=v7
9014export TEST_TAR_FORMAT
9015TAR_OPTIONS="-H v7"
9016export TAR_OPTIONS
9017rm -rf *
9018
9019genfile -l 1024 -f file1
9020genfile -l 1024 -f file2
9021tar cf archive file1 file2
9022
9023mkdir en
9024mkdir to
9025
9026HERE=`pwd`
9027tar -xf archive --same-order --warning=no-timestamp \
9028  -C $HERE/en file1 \
9029  -C $HERE/to file2 || exit 1
9030
9031ls en
9032echo separator
9033ls to
9034)
9035) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9036at_status=$? at_failed=false
9037$at_check_filter
9038at_fn_diff_devnull "$at_stderr" || at_failed=:
9039echo >>"$at_stdout"; $as_echo "file1
9040separator
9041file2
9042" | \
9043  $at_diff - "$at_stdout" || at_failed=:
9044at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
9045$at_failed && at_fn_log_failure
9046$at_traceon; }
9047
9048              { set +x
9049$as_echo "$at_srcdir/same-order02.at:28:
9050mkdir oldgnu
9051(cd oldgnu
9052TEST_TAR_FORMAT=oldgnu
9053export TEST_TAR_FORMAT
9054TAR_OPTIONS=\"-H oldgnu\"
9055export TAR_OPTIONS
9056rm -rf *
9057
9058genfile -l 1024 -f file1
9059genfile -l 1024 -f file2
9060tar cf archive file1 file2
9061
9062mkdir en
9063mkdir to
9064
9065HERE=\`pwd\`
9066tar -xf archive --same-order --warning=no-timestamp \\
9067  -C \$HERE/en file1 \\
9068  -C \$HERE/to file2 || exit 1
9069
9070ls en
9071echo separator
9072ls to
9073)"
9074at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
9075( $at_check_trace;
9076mkdir oldgnu
9077(cd oldgnu
9078TEST_TAR_FORMAT=oldgnu
9079export TEST_TAR_FORMAT
9080TAR_OPTIONS="-H oldgnu"
9081export TAR_OPTIONS
9082rm -rf *
9083
9084genfile -l 1024 -f file1
9085genfile -l 1024 -f file2
9086tar cf archive file1 file2
9087
9088mkdir en
9089mkdir to
9090
9091HERE=`pwd`
9092tar -xf archive --same-order --warning=no-timestamp \
9093  -C $HERE/en file1 \
9094  -C $HERE/to file2 || exit 1
9095
9096ls en
9097echo separator
9098ls to
9099)
9100) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9101at_status=$? at_failed=false
9102$at_check_filter
9103at_fn_diff_devnull "$at_stderr" || at_failed=:
9104echo >>"$at_stdout"; $as_echo "file1
9105separator
9106file2
9107" | \
9108  $at_diff - "$at_stdout" || at_failed=:
9109at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
9110$at_failed && at_fn_log_failure
9111$at_traceon; }
9112
9113              { set +x
9114$as_echo "$at_srcdir/same-order02.at:28:
9115mkdir ustar
9116(cd ustar
9117TEST_TAR_FORMAT=ustar
9118export TEST_TAR_FORMAT
9119TAR_OPTIONS=\"-H ustar\"
9120export TAR_OPTIONS
9121rm -rf *
9122
9123genfile -l 1024 -f file1
9124genfile -l 1024 -f file2
9125tar cf archive file1 file2
9126
9127mkdir en
9128mkdir to
9129
9130HERE=\`pwd\`
9131tar -xf archive --same-order --warning=no-timestamp \\
9132  -C \$HERE/en file1 \\
9133  -C \$HERE/to file2 || exit 1
9134
9135ls en
9136echo separator
9137ls to
9138)"
9139at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
9140( $at_check_trace;
9141mkdir ustar
9142(cd ustar
9143TEST_TAR_FORMAT=ustar
9144export TEST_TAR_FORMAT
9145TAR_OPTIONS="-H ustar"
9146export TAR_OPTIONS
9147rm -rf *
9148
9149genfile -l 1024 -f file1
9150genfile -l 1024 -f file2
9151tar cf archive file1 file2
9152
9153mkdir en
9154mkdir to
9155
9156HERE=`pwd`
9157tar -xf archive --same-order --warning=no-timestamp \
9158  -C $HERE/en file1 \
9159  -C $HERE/to file2 || exit 1
9160
9161ls en
9162echo separator
9163ls to
9164)
9165) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9166at_status=$? at_failed=false
9167$at_check_filter
9168at_fn_diff_devnull "$at_stderr" || at_failed=:
9169echo >>"$at_stdout"; $as_echo "file1
9170separator
9171file2
9172" | \
9173  $at_diff - "$at_stdout" || at_failed=:
9174at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
9175$at_failed && at_fn_log_failure
9176$at_traceon; }
9177
9178              { set +x
9179$as_echo "$at_srcdir/same-order02.at:28:
9180mkdir posix
9181(cd posix
9182TEST_TAR_FORMAT=posix
9183export TEST_TAR_FORMAT
9184TAR_OPTIONS=\"-H posix\"
9185export TAR_OPTIONS
9186rm -rf *
9187
9188genfile -l 1024 -f file1
9189genfile -l 1024 -f file2
9190tar cf archive file1 file2
9191
9192mkdir en
9193mkdir to
9194
9195HERE=\`pwd\`
9196tar -xf archive --same-order --warning=no-timestamp \\
9197  -C \$HERE/en file1 \\
9198  -C \$HERE/to file2 || exit 1
9199
9200ls en
9201echo separator
9202ls to
9203)"
9204at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
9205( $at_check_trace;
9206mkdir posix
9207(cd posix
9208TEST_TAR_FORMAT=posix
9209export TEST_TAR_FORMAT
9210TAR_OPTIONS="-H posix"
9211export TAR_OPTIONS
9212rm -rf *
9213
9214genfile -l 1024 -f file1
9215genfile -l 1024 -f file2
9216tar cf archive file1 file2
9217
9218mkdir en
9219mkdir to
9220
9221HERE=`pwd`
9222tar -xf archive --same-order --warning=no-timestamp \
9223  -C $HERE/en file1 \
9224  -C $HERE/to file2 || exit 1
9225
9226ls en
9227echo separator
9228ls to
9229)
9230) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9231at_status=$? at_failed=false
9232$at_check_filter
9233at_fn_diff_devnull "$at_stderr" || at_failed=:
9234echo >>"$at_stdout"; $as_echo "file1
9235separator
9236file2
9237" | \
9238  $at_diff - "$at_stdout" || at_failed=:
9239at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
9240$at_failed && at_fn_log_failure
9241$at_traceon; }
9242
9243              { set +x
9244$as_echo "$at_srcdir/same-order02.at:28:
9245mkdir gnu
9246(cd gnu
9247TEST_TAR_FORMAT=gnu
9248export TEST_TAR_FORMAT
9249TAR_OPTIONS=\"-H gnu\"
9250export TAR_OPTIONS
9251rm -rf *
9252
9253genfile -l 1024 -f file1
9254genfile -l 1024 -f file2
9255tar cf archive file1 file2
9256
9257mkdir en
9258mkdir to
9259
9260HERE=\`pwd\`
9261tar -xf archive --same-order --warning=no-timestamp \\
9262  -C \$HERE/en file1 \\
9263  -C \$HERE/to file2 || exit 1
9264
9265ls en
9266echo separator
9267ls to
9268)"
9269at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
9270( $at_check_trace;
9271mkdir gnu
9272(cd gnu
9273TEST_TAR_FORMAT=gnu
9274export TEST_TAR_FORMAT
9275TAR_OPTIONS="-H gnu"
9276export TAR_OPTIONS
9277rm -rf *
9278
9279genfile -l 1024 -f file1
9280genfile -l 1024 -f file2
9281tar cf archive file1 file2
9282
9283mkdir en
9284mkdir to
9285
9286HERE=`pwd`
9287tar -xf archive --same-order --warning=no-timestamp \
9288  -C $HERE/en file1 \
9289  -C $HERE/to file2 || exit 1
9290
9291ls en
9292echo separator
9293ls to
9294)
9295) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9296at_status=$? at_failed=false
9297$at_check_filter
9298at_fn_diff_devnull "$at_stderr" || at_failed=:
9299echo >>"$at_stdout"; $as_echo "file1
9300separator
9301file2
9302" | \
9303  $at_diff - "$at_stdout" || at_failed=:
9304at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
9305$at_failed && at_fn_log_failure
9306$at_traceon; }
9307
9308
9309
9310
9311  set +x
9312  $at_times_p && times >"$at_times_file"
9313) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9314read at_status <"$at_status_file"
9315#AT_STOP_48
9316#AT_START_49
9317at_fn_group_banner 49 'append.at:21' \
9318  "append" "                                         " 9
9319at_xfail=no
9320      test -f $XFAILFILE && at_xfail=yes
9321(
9322  $as_echo "49. $at_setup_line: testing $at_desc ..."
9323  $at_traceon
9324
9325
9326
9327
9328
9329  { set +x
9330$as_echo "$at_srcdir/append.at:24:
9331mkdir v7
9332(cd v7
9333TEST_TAR_FORMAT=v7
9334export TEST_TAR_FORMAT
9335TAR_OPTIONS=\"-H v7\"
9336export TAR_OPTIONS
9337rm -rf *
9338touch file1
9339          touch file2
9340          tar cf archive file1
9341          tar rf archive file2
9342          tar tf archive)"
9343at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
9344( $at_check_trace;
9345mkdir v7
9346(cd v7
9347TEST_TAR_FORMAT=v7
9348export TEST_TAR_FORMAT
9349TAR_OPTIONS="-H v7"
9350export TAR_OPTIONS
9351rm -rf *
9352touch file1
9353          touch file2
9354          tar cf archive file1
9355          tar rf archive file2
9356          tar tf archive)
9357) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9358at_status=$? at_failed=false
9359$at_check_filter
9360at_fn_diff_devnull "$at_stderr" || at_failed=:
9361echo >>"$at_stdout"; $as_echo "file1
9362file2
9363" | \
9364  $at_diff - "$at_stdout" || at_failed=:
9365at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
9366$at_failed && at_fn_log_failure
9367$at_traceon; }
9368
9369              { set +x
9370$as_echo "$at_srcdir/append.at:24:
9371mkdir oldgnu
9372(cd oldgnu
9373TEST_TAR_FORMAT=oldgnu
9374export TEST_TAR_FORMAT
9375TAR_OPTIONS=\"-H oldgnu\"
9376export TAR_OPTIONS
9377rm -rf *
9378touch file1
9379          touch file2
9380          tar cf archive file1
9381          tar rf archive file2
9382          tar tf archive)"
9383at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
9384( $at_check_trace;
9385mkdir oldgnu
9386(cd oldgnu
9387TEST_TAR_FORMAT=oldgnu
9388export TEST_TAR_FORMAT
9389TAR_OPTIONS="-H oldgnu"
9390export TAR_OPTIONS
9391rm -rf *
9392touch file1
9393          touch file2
9394          tar cf archive file1
9395          tar rf archive file2
9396          tar tf archive)
9397) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9398at_status=$? at_failed=false
9399$at_check_filter
9400at_fn_diff_devnull "$at_stderr" || at_failed=:
9401echo >>"$at_stdout"; $as_echo "file1
9402file2
9403" | \
9404  $at_diff - "$at_stdout" || at_failed=:
9405at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
9406$at_failed && at_fn_log_failure
9407$at_traceon; }
9408
9409              { set +x
9410$as_echo "$at_srcdir/append.at:24:
9411mkdir ustar
9412(cd ustar
9413TEST_TAR_FORMAT=ustar
9414export TEST_TAR_FORMAT
9415TAR_OPTIONS=\"-H ustar\"
9416export TAR_OPTIONS
9417rm -rf *
9418touch file1
9419          touch file2
9420          tar cf archive file1
9421          tar rf archive file2
9422          tar tf archive)"
9423at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
9424( $at_check_trace;
9425mkdir ustar
9426(cd ustar
9427TEST_TAR_FORMAT=ustar
9428export TEST_TAR_FORMAT
9429TAR_OPTIONS="-H ustar"
9430export TAR_OPTIONS
9431rm -rf *
9432touch file1
9433          touch file2
9434          tar cf archive file1
9435          tar rf archive file2
9436          tar tf archive)
9437) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9438at_status=$? at_failed=false
9439$at_check_filter
9440at_fn_diff_devnull "$at_stderr" || at_failed=:
9441echo >>"$at_stdout"; $as_echo "file1
9442file2
9443" | \
9444  $at_diff - "$at_stdout" || at_failed=:
9445at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
9446$at_failed && at_fn_log_failure
9447$at_traceon; }
9448
9449              { set +x
9450$as_echo "$at_srcdir/append.at:24:
9451mkdir posix
9452(cd posix
9453TEST_TAR_FORMAT=posix
9454export TEST_TAR_FORMAT
9455TAR_OPTIONS=\"-H posix\"
9456export TAR_OPTIONS
9457rm -rf *
9458touch file1
9459          touch file2
9460          tar cf archive file1
9461          tar rf archive file2
9462          tar tf archive)"
9463at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
9464( $at_check_trace;
9465mkdir posix
9466(cd posix
9467TEST_TAR_FORMAT=posix
9468export TEST_TAR_FORMAT
9469TAR_OPTIONS="-H posix"
9470export TAR_OPTIONS
9471rm -rf *
9472touch file1
9473          touch file2
9474          tar cf archive file1
9475          tar rf archive file2
9476          tar tf archive)
9477) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9478at_status=$? at_failed=false
9479$at_check_filter
9480at_fn_diff_devnull "$at_stderr" || at_failed=:
9481echo >>"$at_stdout"; $as_echo "file1
9482file2
9483" | \
9484  $at_diff - "$at_stdout" || at_failed=:
9485at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
9486$at_failed && at_fn_log_failure
9487$at_traceon; }
9488
9489              { set +x
9490$as_echo "$at_srcdir/append.at:24:
9491mkdir gnu
9492(cd gnu
9493TEST_TAR_FORMAT=gnu
9494export TEST_TAR_FORMAT
9495TAR_OPTIONS=\"-H gnu\"
9496export TAR_OPTIONS
9497rm -rf *
9498touch file1
9499          touch file2
9500          tar cf archive file1
9501          tar rf archive file2
9502          tar tf archive)"
9503at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
9504( $at_check_trace;
9505mkdir gnu
9506(cd gnu
9507TEST_TAR_FORMAT=gnu
9508export TEST_TAR_FORMAT
9509TAR_OPTIONS="-H gnu"
9510export TAR_OPTIONS
9511rm -rf *
9512touch file1
9513          touch file2
9514          tar cf archive file1
9515          tar rf archive file2
9516          tar tf archive)
9517) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9518at_status=$? at_failed=false
9519$at_check_filter
9520at_fn_diff_devnull "$at_stderr" || at_failed=:
9521echo >>"$at_stdout"; $as_echo "file1
9522file2
9523" | \
9524  $at_diff - "$at_stdout" || at_failed=:
9525at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
9526$at_failed && at_fn_log_failure
9527$at_traceon; }
9528
9529
9530
9531
9532  set +x
9533  $at_times_p && times >"$at_times_file"
9534) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9535read at_status <"$at_status_file"
9536#AT_STOP_49
9537#AT_START_50
9538at_fn_group_banner 50 'append01.at:29' \
9539  "appending files with long names" "                " 9
9540at_xfail=no
9541      test -f $XFAILFILE && at_xfail=yes
9542(
9543  $as_echo "50. $at_setup_line: testing $at_desc ..."
9544  $at_traceon
9545
9546
9547
9548
9549
9550
9551
9552  { set +x
9553$as_echo "$at_srcdir/append01.at:34:
9554mkdir oldgnu
9555(cd oldgnu
9556TEST_TAR_FORMAT=oldgnu
9557export TEST_TAR_FORMAT
9558TAR_OPTIONS=\"-H oldgnu\"
9559export TAR_OPTIONS
9560rm -rf *
9561
9562mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
9563touch This_is_a_very_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
9564tar 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
9565tar 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
9566tar tf archive
9567)"
9568at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
9569( $at_check_trace;
9570mkdir oldgnu
9571(cd oldgnu
9572TEST_TAR_FORMAT=oldgnu
9573export TEST_TAR_FORMAT
9574TAR_OPTIONS="-H oldgnu"
9575export TAR_OPTIONS
9576rm -rf *
9577
9578mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
9579touch This_is_a_very_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
9580tar 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
9581tar 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
9582tar tf archive
9583)
9584) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9585at_status=$? at_failed=false
9586$at_check_filter
9587at_fn_diff_devnull "$at_stderr" || at_failed=:
9588echo >>"$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
9589This_is_a_very_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
9590" | \
9591  $at_diff - "$at_stdout" || at_failed=:
9592at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
9593$at_failed && at_fn_log_failure
9594$at_traceon; }
9595
9596              { set +x
9597$as_echo "$at_srcdir/append01.at:34:
9598mkdir ustar
9599(cd ustar
9600TEST_TAR_FORMAT=ustar
9601export TEST_TAR_FORMAT
9602TAR_OPTIONS=\"-H ustar\"
9603export TAR_OPTIONS
9604rm -rf *
9605
9606mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
9607touch This_is_a_very_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
9608tar 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
9609tar 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
9610tar tf archive
9611)"
9612at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
9613( $at_check_trace;
9614mkdir ustar
9615(cd ustar
9616TEST_TAR_FORMAT=ustar
9617export TEST_TAR_FORMAT
9618TAR_OPTIONS="-H ustar"
9619export TAR_OPTIONS
9620rm -rf *
9621
9622mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
9623touch This_is_a_very_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
9624tar 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
9625tar 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
9626tar tf archive
9627)
9628) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9629at_status=$? at_failed=false
9630$at_check_filter
9631at_fn_diff_devnull "$at_stderr" || at_failed=:
9632echo >>"$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
9633This_is_a_very_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
9634" | \
9635  $at_diff - "$at_stdout" || at_failed=:
9636at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
9637$at_failed && at_fn_log_failure
9638$at_traceon; }
9639
9640              { set +x
9641$as_echo "$at_srcdir/append01.at:34:
9642mkdir posix
9643(cd posix
9644TEST_TAR_FORMAT=posix
9645export TEST_TAR_FORMAT
9646TAR_OPTIONS=\"-H posix\"
9647export TAR_OPTIONS
9648rm -rf *
9649
9650mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
9651touch This_is_a_very_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
9652tar 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
9653tar 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
9654tar tf archive
9655)"
9656at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
9657( $at_check_trace;
9658mkdir posix
9659(cd posix
9660TEST_TAR_FORMAT=posix
9661export TEST_TAR_FORMAT
9662TAR_OPTIONS="-H posix"
9663export TAR_OPTIONS
9664rm -rf *
9665
9666mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
9667touch This_is_a_very_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
9668tar 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
9669tar 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
9670tar tf archive
9671)
9672) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9673at_status=$? at_failed=false
9674$at_check_filter
9675at_fn_diff_devnull "$at_stderr" || at_failed=:
9676echo >>"$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
9677This_is_a_very_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
9678" | \
9679  $at_diff - "$at_stdout" || at_failed=:
9680at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
9681$at_failed && at_fn_log_failure
9682$at_traceon; }
9683
9684              { set +x
9685$as_echo "$at_srcdir/append01.at:34:
9686mkdir gnu
9687(cd gnu
9688TEST_TAR_FORMAT=gnu
9689export TEST_TAR_FORMAT
9690TAR_OPTIONS=\"-H gnu\"
9691export TAR_OPTIONS
9692rm -rf *
9693
9694mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
9695touch This_is_a_very_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
9696tar 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
9697tar 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
9698tar tf archive
9699)"
9700at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
9701( $at_check_trace;
9702mkdir gnu
9703(cd gnu
9704TEST_TAR_FORMAT=gnu
9705export TEST_TAR_FORMAT
9706TAR_OPTIONS="-H gnu"
9707export TAR_OPTIONS
9708rm -rf *
9709
9710mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
9711touch This_is_a_very_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
9712tar 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
9713tar 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
9714tar tf archive
9715)
9716) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9717at_status=$? at_failed=false
9718$at_check_filter
9719at_fn_diff_devnull "$at_stderr" || at_failed=:
9720echo >>"$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
9721This_is_a_very_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
9722" | \
9723  $at_diff - "$at_stdout" || at_failed=:
9724at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
9725$at_failed && at_fn_log_failure
9726$at_traceon; }
9727
9728
9729
9730
9731
9732  set +x
9733  $at_times_p && times >"$at_times_file"
9734) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9735read at_status <"$at_status_file"
9736#AT_STOP_50
9737#AT_START_51
9738at_fn_group_banner 51 'append02.at:54' \
9739  "append vs. create" "                              " 9
9740at_xfail=no
9741      test -f $XFAILFILE && at_xfail=yes
9742(
9743  $as_echo "51. $at_setup_line: testing $at_desc ..."
9744  $at_traceon
9745
9746
9747
9748
9749
9750  { set +x
9751$as_echo "$at_srcdir/append02.at:57:
9752mkdir v7
9753(cd v7
9754TEST_TAR_FORMAT=v7
9755export TEST_TAR_FORMAT
9756TAR_OPTIONS=\"-H v7\"
9757export TAR_OPTIONS
9758rm -rf *
9759
9760genfile --file file1
9761genfile --file file2
9762
9763# Make sure file timestamps in the archive will not differ
9764MTIME=\"--mtime=@0\"
9765
9766# For PAX archives, we need to make sure extended header names are
9767# reproducible and that their contents won't change with time
9768if test \$TEST_TAR_FORMAT = posix; then
9769  TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
9770fi
9771
9772echo Creating archive.1
9773tar \$MTIME -cf archive.1 file1 file2
9774
9775echo Creating archive.2
9776tar \$MTIME -cf archive.2 -T /dev/null
9777tar \$MTIME -rf archive.2 file1
9778tar \$MTIME -rf archive.2 file2
9779
9780echo Comparing archives
9781cmp archive.1 archive.2
9782)"
9783at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
9784( $at_check_trace;
9785mkdir v7
9786(cd v7
9787TEST_TAR_FORMAT=v7
9788export TEST_TAR_FORMAT
9789TAR_OPTIONS="-H v7"
9790export TAR_OPTIONS
9791rm -rf *
9792
9793genfile --file file1
9794genfile --file file2
9795
9796# Make sure file timestamps in the archive will not differ
9797MTIME="--mtime=@0"
9798
9799# For PAX archives, we need to make sure extended header names are
9800# reproducible and that their contents won't change with time
9801if test $TEST_TAR_FORMAT = posix; then
9802  TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
9803fi
9804
9805echo Creating archive.1
9806tar $MTIME -cf archive.1 file1 file2
9807
9808echo Creating archive.2
9809tar $MTIME -cf archive.2 -T /dev/null
9810tar $MTIME -rf archive.2 file1
9811tar $MTIME -rf archive.2 file2
9812
9813echo Comparing archives
9814cmp archive.1 archive.2
9815)
9816) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9817at_status=$? at_failed=false
9818$at_check_filter
9819at_fn_diff_devnull "$at_stderr" || at_failed=:
9820echo >>"$at_stdout"; $as_echo "Creating archive.1
9821Creating archive.2
9822Comparing archives
9823" | \
9824  $at_diff - "$at_stdout" || at_failed=:
9825at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
9826$at_failed && at_fn_log_failure
9827$at_traceon; }
9828
9829              { set +x
9830$as_echo "$at_srcdir/append02.at:57:
9831mkdir oldgnu
9832(cd oldgnu
9833TEST_TAR_FORMAT=oldgnu
9834export TEST_TAR_FORMAT
9835TAR_OPTIONS=\"-H oldgnu\"
9836export TAR_OPTIONS
9837rm -rf *
9838
9839genfile --file file1
9840genfile --file file2
9841
9842# Make sure file timestamps in the archive will not differ
9843MTIME=\"--mtime=@0\"
9844
9845# For PAX archives, we need to make sure extended header names are
9846# reproducible and that their contents won't change with time
9847if test \$TEST_TAR_FORMAT = posix; then
9848  TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
9849fi
9850
9851echo Creating archive.1
9852tar \$MTIME -cf archive.1 file1 file2
9853
9854echo Creating archive.2
9855tar \$MTIME -cf archive.2 -T /dev/null
9856tar \$MTIME -rf archive.2 file1
9857tar \$MTIME -rf archive.2 file2
9858
9859echo Comparing archives
9860cmp archive.1 archive.2
9861)"
9862at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
9863( $at_check_trace;
9864mkdir oldgnu
9865(cd oldgnu
9866TEST_TAR_FORMAT=oldgnu
9867export TEST_TAR_FORMAT
9868TAR_OPTIONS="-H oldgnu"
9869export TAR_OPTIONS
9870rm -rf *
9871
9872genfile --file file1
9873genfile --file file2
9874
9875# Make sure file timestamps in the archive will not differ
9876MTIME="--mtime=@0"
9877
9878# For PAX archives, we need to make sure extended header names are
9879# reproducible and that their contents won't change with time
9880if test $TEST_TAR_FORMAT = posix; then
9881  TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
9882fi
9883
9884echo Creating archive.1
9885tar $MTIME -cf archive.1 file1 file2
9886
9887echo Creating archive.2
9888tar $MTIME -cf archive.2 -T /dev/null
9889tar $MTIME -rf archive.2 file1
9890tar $MTIME -rf archive.2 file2
9891
9892echo Comparing archives
9893cmp archive.1 archive.2
9894)
9895) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9896at_status=$? at_failed=false
9897$at_check_filter
9898at_fn_diff_devnull "$at_stderr" || at_failed=:
9899echo >>"$at_stdout"; $as_echo "Creating archive.1
9900Creating archive.2
9901Comparing archives
9902" | \
9903  $at_diff - "$at_stdout" || at_failed=:
9904at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
9905$at_failed && at_fn_log_failure
9906$at_traceon; }
9907
9908              { set +x
9909$as_echo "$at_srcdir/append02.at:57:
9910mkdir ustar
9911(cd ustar
9912TEST_TAR_FORMAT=ustar
9913export TEST_TAR_FORMAT
9914TAR_OPTIONS=\"-H ustar\"
9915export TAR_OPTIONS
9916rm -rf *
9917
9918genfile --file file1
9919genfile --file file2
9920
9921# Make sure file timestamps in the archive will not differ
9922MTIME=\"--mtime=@0\"
9923
9924# For PAX archives, we need to make sure extended header names are
9925# reproducible and that their contents won't change with time
9926if test \$TEST_TAR_FORMAT = posix; then
9927  TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
9928fi
9929
9930echo Creating archive.1
9931tar \$MTIME -cf archive.1 file1 file2
9932
9933echo Creating archive.2
9934tar \$MTIME -cf archive.2 -T /dev/null
9935tar \$MTIME -rf archive.2 file1
9936tar \$MTIME -rf archive.2 file2
9937
9938echo Comparing archives
9939cmp archive.1 archive.2
9940)"
9941at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
9942( $at_check_trace;
9943mkdir ustar
9944(cd ustar
9945TEST_TAR_FORMAT=ustar
9946export TEST_TAR_FORMAT
9947TAR_OPTIONS="-H ustar"
9948export TAR_OPTIONS
9949rm -rf *
9950
9951genfile --file file1
9952genfile --file file2
9953
9954# Make sure file timestamps in the archive will not differ
9955MTIME="--mtime=@0"
9956
9957# For PAX archives, we need to make sure extended header names are
9958# reproducible and that their contents won't change with time
9959if test $TEST_TAR_FORMAT = posix; then
9960  TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
9961fi
9962
9963echo Creating archive.1
9964tar $MTIME -cf archive.1 file1 file2
9965
9966echo Creating archive.2
9967tar $MTIME -cf archive.2 -T /dev/null
9968tar $MTIME -rf archive.2 file1
9969tar $MTIME -rf archive.2 file2
9970
9971echo Comparing archives
9972cmp archive.1 archive.2
9973)
9974) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9975at_status=$? at_failed=false
9976$at_check_filter
9977at_fn_diff_devnull "$at_stderr" || at_failed=:
9978echo >>"$at_stdout"; $as_echo "Creating archive.1
9979Creating archive.2
9980Comparing archives
9981" | \
9982  $at_diff - "$at_stdout" || at_failed=:
9983at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
9984$at_failed && at_fn_log_failure
9985$at_traceon; }
9986
9987              { set +x
9988$as_echo "$at_srcdir/append02.at:57:
9989mkdir posix
9990(cd posix
9991TEST_TAR_FORMAT=posix
9992export TEST_TAR_FORMAT
9993TAR_OPTIONS=\"-H posix\"
9994export TAR_OPTIONS
9995rm -rf *
9996
9997genfile --file file1
9998genfile --file file2
9999
10000# Make sure file timestamps in the archive will not differ
10001MTIME=\"--mtime=@0\"
10002
10003# For PAX archives, we need to make sure extended header names are
10004# reproducible and that their contents won't change with time
10005if test \$TEST_TAR_FORMAT = posix; then
10006  TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
10007fi
10008
10009echo Creating archive.1
10010tar \$MTIME -cf archive.1 file1 file2
10011
10012echo Creating archive.2
10013tar \$MTIME -cf archive.2 -T /dev/null
10014tar \$MTIME -rf archive.2 file1
10015tar \$MTIME -rf archive.2 file2
10016
10017echo Comparing archives
10018cmp archive.1 archive.2
10019)"
10020at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
10021( $at_check_trace;
10022mkdir posix
10023(cd posix
10024TEST_TAR_FORMAT=posix
10025export TEST_TAR_FORMAT
10026TAR_OPTIONS="-H posix"
10027export TAR_OPTIONS
10028rm -rf *
10029
10030genfile --file file1
10031genfile --file file2
10032
10033# Make sure file timestamps in the archive will not differ
10034MTIME="--mtime=@0"
10035
10036# For PAX archives, we need to make sure extended header names are
10037# reproducible and that their contents won't change with time
10038if test $TEST_TAR_FORMAT = posix; then
10039  TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
10040fi
10041
10042echo Creating archive.1
10043tar $MTIME -cf archive.1 file1 file2
10044
10045echo Creating archive.2
10046tar $MTIME -cf archive.2 -T /dev/null
10047tar $MTIME -rf archive.2 file1
10048tar $MTIME -rf archive.2 file2
10049
10050echo Comparing archives
10051cmp archive.1 archive.2
10052)
10053) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10054at_status=$? at_failed=false
10055$at_check_filter
10056at_fn_diff_devnull "$at_stderr" || at_failed=:
10057echo >>"$at_stdout"; $as_echo "Creating archive.1
10058Creating archive.2
10059Comparing archives
10060" | \
10061  $at_diff - "$at_stdout" || at_failed=:
10062at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
10063$at_failed && at_fn_log_failure
10064$at_traceon; }
10065
10066              { set +x
10067$as_echo "$at_srcdir/append02.at:57:
10068mkdir gnu
10069(cd gnu
10070TEST_TAR_FORMAT=gnu
10071export TEST_TAR_FORMAT
10072TAR_OPTIONS=\"-H gnu\"
10073export TAR_OPTIONS
10074rm -rf *
10075
10076genfile --file file1
10077genfile --file file2
10078
10079# Make sure file timestamps in the archive will not differ
10080MTIME=\"--mtime=@0\"
10081
10082# For PAX archives, we need to make sure extended header names are
10083# reproducible and that their contents won't change with time
10084if test \$TEST_TAR_FORMAT = posix; then
10085  TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
10086fi
10087
10088echo Creating archive.1
10089tar \$MTIME -cf archive.1 file1 file2
10090
10091echo Creating archive.2
10092tar \$MTIME -cf archive.2 -T /dev/null
10093tar \$MTIME -rf archive.2 file1
10094tar \$MTIME -rf archive.2 file2
10095
10096echo Comparing archives
10097cmp archive.1 archive.2
10098)"
10099at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
10100( $at_check_trace;
10101mkdir gnu
10102(cd gnu
10103TEST_TAR_FORMAT=gnu
10104export TEST_TAR_FORMAT
10105TAR_OPTIONS="-H gnu"
10106export TAR_OPTIONS
10107rm -rf *
10108
10109genfile --file file1
10110genfile --file file2
10111
10112# Make sure file timestamps in the archive will not differ
10113MTIME="--mtime=@0"
10114
10115# For PAX archives, we need to make sure extended header names are
10116# reproducible and that their contents won't change with time
10117if test $TEST_TAR_FORMAT = posix; then
10118  TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
10119fi
10120
10121echo Creating archive.1
10122tar $MTIME -cf archive.1 file1 file2
10123
10124echo Creating archive.2
10125tar $MTIME -cf archive.2 -T /dev/null
10126tar $MTIME -rf archive.2 file1
10127tar $MTIME -rf archive.2 file2
10128
10129echo Comparing archives
10130cmp archive.1 archive.2
10131)
10132) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10133at_status=$? at_failed=false
10134$at_check_filter
10135at_fn_diff_devnull "$at_stderr" || at_failed=:
10136echo >>"$at_stdout"; $as_echo "Creating archive.1
10137Creating archive.2
10138Comparing archives
10139" | \
10140  $at_diff - "$at_stdout" || at_failed=:
10141at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
10142$at_failed && at_fn_log_failure
10143$at_traceon; }
10144
10145
10146
10147
10148  set +x
10149  $at_times_p && times >"$at_times_file"
10150) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10151read at_status <"$at_status_file"
10152#AT_STOP_51
10153#AT_START_52
10154at_fn_group_banner 52 'append03.at:21' \
10155  "append with name transformation" "                " 9
10156at_xfail=no
10157      test -f $XFAILFILE && at_xfail=yes
10158(
10159  $as_echo "52. $at_setup_line: testing $at_desc ..."
10160  $at_traceon
10161
10162
10163
10164# Description: Make sure filenames are transformed during append.
10165
10166
10167
10168  { set +x
10169$as_echo "$at_srcdir/append03.at:26:
10170mkdir v7
10171(cd v7
10172TEST_TAR_FORMAT=v7
10173export TEST_TAR_FORMAT
10174TAR_OPTIONS=\"-H v7\"
10175export TAR_OPTIONS
10176rm -rf *
10177
10178genfile --file file.1
10179genfile --file file.2
10180
10181tar -c -f archive --transform 's/file/plik/' file.*
10182echo Appending
10183tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10184echo Testing
10185tar tf archive
10186)"
10187at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
10188( $at_check_trace;
10189mkdir v7
10190(cd v7
10191TEST_TAR_FORMAT=v7
10192export TEST_TAR_FORMAT
10193TAR_OPTIONS="-H v7"
10194export TAR_OPTIONS
10195rm -rf *
10196
10197genfile --file file.1
10198genfile --file file.2
10199
10200tar -c -f archive --transform 's/file/plik/' file.*
10201echo Appending
10202tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10203echo Testing
10204tar tf archive
10205)
10206) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10207at_status=$? at_failed=false
10208$at_check_filter
10209at_fn_diff_devnull "$at_stderr" || at_failed=:
10210echo >>"$at_stdout"; $as_echo "Appending
10211plik.1
10212Testing
10213plik.1
10214plik.2
10215plik.1
10216" | \
10217  $at_diff - "$at_stdout" || at_failed=:
10218at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
10219$at_failed && at_fn_log_failure
10220$at_traceon; }
10221
10222              { set +x
10223$as_echo "$at_srcdir/append03.at:26:
10224mkdir oldgnu
10225(cd oldgnu
10226TEST_TAR_FORMAT=oldgnu
10227export TEST_TAR_FORMAT
10228TAR_OPTIONS=\"-H oldgnu\"
10229export TAR_OPTIONS
10230rm -rf *
10231
10232genfile --file file.1
10233genfile --file file.2
10234
10235tar -c -f archive --transform 's/file/plik/' file.*
10236echo Appending
10237tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10238echo Testing
10239tar tf archive
10240)"
10241at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
10242( $at_check_trace;
10243mkdir oldgnu
10244(cd oldgnu
10245TEST_TAR_FORMAT=oldgnu
10246export TEST_TAR_FORMAT
10247TAR_OPTIONS="-H oldgnu"
10248export TAR_OPTIONS
10249rm -rf *
10250
10251genfile --file file.1
10252genfile --file file.2
10253
10254tar -c -f archive --transform 's/file/plik/' file.*
10255echo Appending
10256tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10257echo Testing
10258tar tf archive
10259)
10260) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10261at_status=$? at_failed=false
10262$at_check_filter
10263at_fn_diff_devnull "$at_stderr" || at_failed=:
10264echo >>"$at_stdout"; $as_echo "Appending
10265plik.1
10266Testing
10267plik.1
10268plik.2
10269plik.1
10270" | \
10271  $at_diff - "$at_stdout" || at_failed=:
10272at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
10273$at_failed && at_fn_log_failure
10274$at_traceon; }
10275
10276              { set +x
10277$as_echo "$at_srcdir/append03.at:26:
10278mkdir ustar
10279(cd ustar
10280TEST_TAR_FORMAT=ustar
10281export TEST_TAR_FORMAT
10282TAR_OPTIONS=\"-H ustar\"
10283export TAR_OPTIONS
10284rm -rf *
10285
10286genfile --file file.1
10287genfile --file file.2
10288
10289tar -c -f archive --transform 's/file/plik/' file.*
10290echo Appending
10291tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10292echo Testing
10293tar tf archive
10294)"
10295at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
10296( $at_check_trace;
10297mkdir ustar
10298(cd ustar
10299TEST_TAR_FORMAT=ustar
10300export TEST_TAR_FORMAT
10301TAR_OPTIONS="-H ustar"
10302export TAR_OPTIONS
10303rm -rf *
10304
10305genfile --file file.1
10306genfile --file file.2
10307
10308tar -c -f archive --transform 's/file/plik/' file.*
10309echo Appending
10310tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10311echo Testing
10312tar tf archive
10313)
10314) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10315at_status=$? at_failed=false
10316$at_check_filter
10317at_fn_diff_devnull "$at_stderr" || at_failed=:
10318echo >>"$at_stdout"; $as_echo "Appending
10319plik.1
10320Testing
10321plik.1
10322plik.2
10323plik.1
10324" | \
10325  $at_diff - "$at_stdout" || at_failed=:
10326at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
10327$at_failed && at_fn_log_failure
10328$at_traceon; }
10329
10330              { set +x
10331$as_echo "$at_srcdir/append03.at:26:
10332mkdir posix
10333(cd posix
10334TEST_TAR_FORMAT=posix
10335export TEST_TAR_FORMAT
10336TAR_OPTIONS=\"-H posix\"
10337export TAR_OPTIONS
10338rm -rf *
10339
10340genfile --file file.1
10341genfile --file file.2
10342
10343tar -c -f archive --transform 's/file/plik/' file.*
10344echo Appending
10345tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10346echo Testing
10347tar tf archive
10348)"
10349at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
10350( $at_check_trace;
10351mkdir posix
10352(cd posix
10353TEST_TAR_FORMAT=posix
10354export TEST_TAR_FORMAT
10355TAR_OPTIONS="-H posix"
10356export TAR_OPTIONS
10357rm -rf *
10358
10359genfile --file file.1
10360genfile --file file.2
10361
10362tar -c -f archive --transform 's/file/plik/' file.*
10363echo Appending
10364tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10365echo Testing
10366tar tf archive
10367)
10368) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10369at_status=$? at_failed=false
10370$at_check_filter
10371at_fn_diff_devnull "$at_stderr" || at_failed=:
10372echo >>"$at_stdout"; $as_echo "Appending
10373plik.1
10374Testing
10375plik.1
10376plik.2
10377plik.1
10378" | \
10379  $at_diff - "$at_stdout" || at_failed=:
10380at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
10381$at_failed && at_fn_log_failure
10382$at_traceon; }
10383
10384              { set +x
10385$as_echo "$at_srcdir/append03.at:26:
10386mkdir gnu
10387(cd gnu
10388TEST_TAR_FORMAT=gnu
10389export TEST_TAR_FORMAT
10390TAR_OPTIONS=\"-H gnu\"
10391export TAR_OPTIONS
10392rm -rf *
10393
10394genfile --file file.1
10395genfile --file file.2
10396
10397tar -c -f archive --transform 's/file/plik/' file.*
10398echo Appending
10399tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10400echo Testing
10401tar tf archive
10402)"
10403at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
10404( $at_check_trace;
10405mkdir gnu
10406(cd gnu
10407TEST_TAR_FORMAT=gnu
10408export TEST_TAR_FORMAT
10409TAR_OPTIONS="-H gnu"
10410export TAR_OPTIONS
10411rm -rf *
10412
10413genfile --file file.1
10414genfile --file file.2
10415
10416tar -c -f archive --transform 's/file/plik/' file.*
10417echo Appending
10418tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
10419echo Testing
10420tar tf archive
10421)
10422) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10423at_status=$? at_failed=false
10424$at_check_filter
10425at_fn_diff_devnull "$at_stderr" || at_failed=:
10426echo >>"$at_stdout"; $as_echo "Appending
10427plik.1
10428Testing
10429plik.1
10430plik.2
10431plik.1
10432" | \
10433  $at_diff - "$at_stdout" || at_failed=:
10434at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
10435$at_failed && at_fn_log_failure
10436$at_traceon; }
10437
10438
10439
10440
10441  set +x
10442  $at_times_p && times >"$at_times_file"
10443) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10444read at_status <"$at_status_file"
10445#AT_STOP_52
10446#AT_START_53
10447at_fn_group_banner 53 'append04.at:29' \
10448  "append with verify" "                             " 9
10449at_xfail=no
10450      test -f $XFAILFILE && at_xfail=yes
10451(
10452  $as_echo "53. $at_setup_line: testing $at_desc ..."
10453  $at_traceon
10454
10455
10456
10457
10458
10459  { set +x
10460$as_echo "$at_srcdir/append04.at:32:
10461mkdir v7
10462(cd v7
10463TEST_TAR_FORMAT=v7
10464export TEST_TAR_FORMAT
10465TAR_OPTIONS=\"-H v7\"
10466export TAR_OPTIONS
10467rm -rf *
10468
10469# Create two empty files:
10470touch file1 file2
10471
10472# Create an archive:
10473tar cpfW archive.tar file1 file2
10474
10475# Verify created archive by listing its content:
10476tar -tf archive.tar
10477echo ==
10478# Create another empty file:
10479touch file3
10480
10481# Append it to the already created archive:
10482tar rpfW archive.tar file3
10483
10484# Verify content of the new archive:
10485tar -tf archive.tar
10486)"
10487at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
10488( $at_check_trace;
10489mkdir v7
10490(cd v7
10491TEST_TAR_FORMAT=v7
10492export TEST_TAR_FORMAT
10493TAR_OPTIONS="-H v7"
10494export TAR_OPTIONS
10495rm -rf *
10496
10497# Create two empty files:
10498touch file1 file2
10499
10500# Create an archive:
10501tar cpfW archive.tar file1 file2
10502
10503# Verify created archive by listing its content:
10504tar -tf archive.tar
10505echo ==
10506# Create another empty file:
10507touch file3
10508
10509# Append it to the already created archive:
10510tar rpfW archive.tar file3
10511
10512# Verify content of the new archive:
10513tar -tf archive.tar
10514)
10515) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10516at_status=$? at_failed=false
10517$at_check_filter
10518at_fn_diff_devnull "$at_stderr" || at_failed=:
10519echo >>"$at_stdout"; $as_echo "file1
10520file2
10521==
10522file1
10523file2
10524file3
10525" | \
10526  $at_diff - "$at_stdout" || at_failed=:
10527at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
10528$at_failed && at_fn_log_failure
10529$at_traceon; }
10530
10531              { set +x
10532$as_echo "$at_srcdir/append04.at:32:
10533mkdir oldgnu
10534(cd oldgnu
10535TEST_TAR_FORMAT=oldgnu
10536export TEST_TAR_FORMAT
10537TAR_OPTIONS=\"-H oldgnu\"
10538export TAR_OPTIONS
10539rm -rf *
10540
10541# Create two empty files:
10542touch file1 file2
10543
10544# Create an archive:
10545tar cpfW archive.tar file1 file2
10546
10547# Verify created archive by listing its content:
10548tar -tf archive.tar
10549echo ==
10550# Create another empty file:
10551touch file3
10552
10553# Append it to the already created archive:
10554tar rpfW archive.tar file3
10555
10556# Verify content of the new archive:
10557tar -tf archive.tar
10558)"
10559at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
10560( $at_check_trace;
10561mkdir oldgnu
10562(cd oldgnu
10563TEST_TAR_FORMAT=oldgnu
10564export TEST_TAR_FORMAT
10565TAR_OPTIONS="-H oldgnu"
10566export TAR_OPTIONS
10567rm -rf *
10568
10569# Create two empty files:
10570touch file1 file2
10571
10572# Create an archive:
10573tar cpfW archive.tar file1 file2
10574
10575# Verify created archive by listing its content:
10576tar -tf archive.tar
10577echo ==
10578# Create another empty file:
10579touch file3
10580
10581# Append it to the already created archive:
10582tar rpfW archive.tar file3
10583
10584# Verify content of the new archive:
10585tar -tf archive.tar
10586)
10587) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10588at_status=$? at_failed=false
10589$at_check_filter
10590at_fn_diff_devnull "$at_stderr" || at_failed=:
10591echo >>"$at_stdout"; $as_echo "file1
10592file2
10593==
10594file1
10595file2
10596file3
10597" | \
10598  $at_diff - "$at_stdout" || at_failed=:
10599at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
10600$at_failed && at_fn_log_failure
10601$at_traceon; }
10602
10603              { set +x
10604$as_echo "$at_srcdir/append04.at:32:
10605mkdir ustar
10606(cd ustar
10607TEST_TAR_FORMAT=ustar
10608export TEST_TAR_FORMAT
10609TAR_OPTIONS=\"-H ustar\"
10610export TAR_OPTIONS
10611rm -rf *
10612
10613# Create two empty files:
10614touch file1 file2
10615
10616# Create an archive:
10617tar cpfW archive.tar file1 file2
10618
10619# Verify created archive by listing its content:
10620tar -tf archive.tar
10621echo ==
10622# Create another empty file:
10623touch file3
10624
10625# Append it to the already created archive:
10626tar rpfW archive.tar file3
10627
10628# Verify content of the new archive:
10629tar -tf archive.tar
10630)"
10631at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
10632( $at_check_trace;
10633mkdir ustar
10634(cd ustar
10635TEST_TAR_FORMAT=ustar
10636export TEST_TAR_FORMAT
10637TAR_OPTIONS="-H ustar"
10638export TAR_OPTIONS
10639rm -rf *
10640
10641# Create two empty files:
10642touch file1 file2
10643
10644# Create an archive:
10645tar cpfW archive.tar file1 file2
10646
10647# Verify created archive by listing its content:
10648tar -tf archive.tar
10649echo ==
10650# Create another empty file:
10651touch file3
10652
10653# Append it to the already created archive:
10654tar rpfW archive.tar file3
10655
10656# Verify content of the new archive:
10657tar -tf archive.tar
10658)
10659) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10660at_status=$? at_failed=false
10661$at_check_filter
10662at_fn_diff_devnull "$at_stderr" || at_failed=:
10663echo >>"$at_stdout"; $as_echo "file1
10664file2
10665==
10666file1
10667file2
10668file3
10669" | \
10670  $at_diff - "$at_stdout" || at_failed=:
10671at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
10672$at_failed && at_fn_log_failure
10673$at_traceon; }
10674
10675              { set +x
10676$as_echo "$at_srcdir/append04.at:32:
10677mkdir posix
10678(cd posix
10679TEST_TAR_FORMAT=posix
10680export TEST_TAR_FORMAT
10681TAR_OPTIONS=\"-H posix\"
10682export TAR_OPTIONS
10683rm -rf *
10684
10685# Create two empty files:
10686touch file1 file2
10687
10688# Create an archive:
10689tar cpfW archive.tar file1 file2
10690
10691# Verify created archive by listing its content:
10692tar -tf archive.tar
10693echo ==
10694# Create another empty file:
10695touch file3
10696
10697# Append it to the already created archive:
10698tar rpfW archive.tar file3
10699
10700# Verify content of the new archive:
10701tar -tf archive.tar
10702)"
10703at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
10704( $at_check_trace;
10705mkdir posix
10706(cd posix
10707TEST_TAR_FORMAT=posix
10708export TEST_TAR_FORMAT
10709TAR_OPTIONS="-H posix"
10710export TAR_OPTIONS
10711rm -rf *
10712
10713# Create two empty files:
10714touch file1 file2
10715
10716# Create an archive:
10717tar cpfW archive.tar file1 file2
10718
10719# Verify created archive by listing its content:
10720tar -tf archive.tar
10721echo ==
10722# Create another empty file:
10723touch file3
10724
10725# Append it to the already created archive:
10726tar rpfW archive.tar file3
10727
10728# Verify content of the new archive:
10729tar -tf archive.tar
10730)
10731) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10732at_status=$? at_failed=false
10733$at_check_filter
10734at_fn_diff_devnull "$at_stderr" || at_failed=:
10735echo >>"$at_stdout"; $as_echo "file1
10736file2
10737==
10738file1
10739file2
10740file3
10741" | \
10742  $at_diff - "$at_stdout" || at_failed=:
10743at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
10744$at_failed && at_fn_log_failure
10745$at_traceon; }
10746
10747              { set +x
10748$as_echo "$at_srcdir/append04.at:32:
10749mkdir gnu
10750(cd gnu
10751TEST_TAR_FORMAT=gnu
10752export TEST_TAR_FORMAT
10753TAR_OPTIONS=\"-H gnu\"
10754export TAR_OPTIONS
10755rm -rf *
10756
10757# Create two empty files:
10758touch file1 file2
10759
10760# Create an archive:
10761tar cpfW archive.tar file1 file2
10762
10763# Verify created archive by listing its content:
10764tar -tf archive.tar
10765echo ==
10766# Create another empty file:
10767touch file3
10768
10769# Append it to the already created archive:
10770tar rpfW archive.tar file3
10771
10772# Verify content of the new archive:
10773tar -tf archive.tar
10774)"
10775at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
10776( $at_check_trace;
10777mkdir gnu
10778(cd gnu
10779TEST_TAR_FORMAT=gnu
10780export TEST_TAR_FORMAT
10781TAR_OPTIONS="-H gnu"
10782export TAR_OPTIONS
10783rm -rf *
10784
10785# Create two empty files:
10786touch file1 file2
10787
10788# Create an archive:
10789tar cpfW archive.tar file1 file2
10790
10791# Verify created archive by listing its content:
10792tar -tf archive.tar
10793echo ==
10794# Create another empty file:
10795touch file3
10796
10797# Append it to the already created archive:
10798tar rpfW archive.tar file3
10799
10800# Verify content of the new archive:
10801tar -tf archive.tar
10802)
10803) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10804at_status=$? at_failed=false
10805$at_check_filter
10806at_fn_diff_devnull "$at_stderr" || at_failed=:
10807echo >>"$at_stdout"; $as_echo "file1
10808file2
10809==
10810file1
10811file2
10812file3
10813" | \
10814  $at_diff - "$at_stdout" || at_failed=:
10815at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
10816$at_failed && at_fn_log_failure
10817$at_traceon; }
10818
10819
10820
10821
10822  set +x
10823  $at_times_p && times >"$at_times_file"
10824) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10825read at_status <"$at_status_file"
10826#AT_STOP_53
10827#AT_START_54
10828at_fn_group_banner 54 'append05.at:32' \
10829  "append after changed blocking" "                  " 9
10830at_xfail=no
10831      test -f $XFAILFILE && at_xfail=yes
10832(
10833  $as_echo "54. $at_setup_line: testing $at_desc ..."
10834  $at_traceon
10835
10836
10837
10838
10839
10840  { set +x
10841$as_echo "$at_srcdir/append05.at:35:
10842mkdir v7
10843(cd v7
10844TEST_TAR_FORMAT=v7
10845export TEST_TAR_FORMAT
10846TAR_OPTIONS=\"-H v7\"
10847export TAR_OPTIONS
10848rm -rf *
10849
10850for f in a b c d e f g h i
10851do
10852  echo \$f > \$f
10853done
10854
10855decho 'creating archive'
10856tar -cf archive -b1 a b c
10857
10858tar tf archive
10859
10860decho 'adding d e f'
10861tar -vrf archive -b3 d e f
10862echo ==
10863tar tf archive
10864
10865decho 'adding g h i'
10866tar -vrf archive -b5 g h i
10867
10868decho 'resulting archive'
10869tar tf archive
10870)"
10871at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
10872( $at_check_trace;
10873mkdir v7
10874(cd v7
10875TEST_TAR_FORMAT=v7
10876export TEST_TAR_FORMAT
10877TAR_OPTIONS="-H v7"
10878export TAR_OPTIONS
10879rm -rf *
10880
10881for f in a b c d e f g h i
10882do
10883  echo $f > $f
10884done
10885
10886decho 'creating archive'
10887tar -cf archive -b1 a b c
10888
10889tar tf archive
10890
10891decho 'adding d e f'
10892tar -vrf archive -b3 d e f
10893echo ==
10894tar tf archive
10895
10896decho 'adding g h i'
10897tar -vrf archive -b5 g h i
10898
10899decho 'resulting archive'
10900tar tf archive
10901)
10902) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10903at_status=$? at_failed=false
10904$at_check_filter
10905echo >>"$at_stderr"; $as_echo "creating archive
10906adding d e f
10907adding g h i
10908resulting archive
10909" | \
10910  $at_diff - "$at_stderr" || at_failed=:
10911echo >>"$at_stdout"; $as_echo "creating archive
10912a
10913b
10914c
10915adding d e f
10916d
10917e
10918f
10919==
10920a
10921b
10922c
10923d
10924e
10925f
10926adding g h i
10927g
10928h
10929i
10930resulting archive
10931a
10932b
10933c
10934d
10935e
10936f
10937g
10938h
10939i
10940" | \
10941  $at_diff - "$at_stdout" || at_failed=:
10942at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
10943$at_failed && at_fn_log_failure
10944$at_traceon; }
10945
10946              { set +x
10947$as_echo "$at_srcdir/append05.at:35:
10948mkdir oldgnu
10949(cd oldgnu
10950TEST_TAR_FORMAT=oldgnu
10951export TEST_TAR_FORMAT
10952TAR_OPTIONS=\"-H oldgnu\"
10953export TAR_OPTIONS
10954rm -rf *
10955
10956for f in a b c d e f g h i
10957do
10958  echo \$f > \$f
10959done
10960
10961decho 'creating archive'
10962tar -cf archive -b1 a b c
10963
10964tar tf archive
10965
10966decho 'adding d e f'
10967tar -vrf archive -b3 d e f
10968echo ==
10969tar tf archive
10970
10971decho 'adding g h i'
10972tar -vrf archive -b5 g h i
10973
10974decho 'resulting archive'
10975tar tf archive
10976)"
10977at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
10978( $at_check_trace;
10979mkdir oldgnu
10980(cd oldgnu
10981TEST_TAR_FORMAT=oldgnu
10982export TEST_TAR_FORMAT
10983TAR_OPTIONS="-H oldgnu"
10984export TAR_OPTIONS
10985rm -rf *
10986
10987for f in a b c d e f g h i
10988do
10989  echo $f > $f
10990done
10991
10992decho 'creating archive'
10993tar -cf archive -b1 a b c
10994
10995tar tf archive
10996
10997decho 'adding d e f'
10998tar -vrf archive -b3 d e f
10999echo ==
11000tar tf archive
11001
11002decho 'adding g h i'
11003tar -vrf archive -b5 g h i
11004
11005decho 'resulting archive'
11006tar tf archive
11007)
11008) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11009at_status=$? at_failed=false
11010$at_check_filter
11011echo >>"$at_stderr"; $as_echo "creating archive
11012adding d e f
11013adding g h i
11014resulting archive
11015" | \
11016  $at_diff - "$at_stderr" || at_failed=:
11017echo >>"$at_stdout"; $as_echo "creating archive
11018a
11019b
11020c
11021adding d e f
11022d
11023e
11024f
11025==
11026a
11027b
11028c
11029d
11030e
11031f
11032adding g h i
11033g
11034h
11035i
11036resulting archive
11037a
11038b
11039c
11040d
11041e
11042f
11043g
11044h
11045i
11046" | \
11047  $at_diff - "$at_stdout" || at_failed=:
11048at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
11049$at_failed && at_fn_log_failure
11050$at_traceon; }
11051
11052              { set +x
11053$as_echo "$at_srcdir/append05.at:35:
11054mkdir ustar
11055(cd ustar
11056TEST_TAR_FORMAT=ustar
11057export TEST_TAR_FORMAT
11058TAR_OPTIONS=\"-H ustar\"
11059export TAR_OPTIONS
11060rm -rf *
11061
11062for f in a b c d e f g h i
11063do
11064  echo \$f > \$f
11065done
11066
11067decho 'creating archive'
11068tar -cf archive -b1 a b c
11069
11070tar tf archive
11071
11072decho 'adding d e f'
11073tar -vrf archive -b3 d e f
11074echo ==
11075tar tf archive
11076
11077decho 'adding g h i'
11078tar -vrf archive -b5 g h i
11079
11080decho 'resulting archive'
11081tar tf archive
11082)"
11083at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
11084( $at_check_trace;
11085mkdir ustar
11086(cd ustar
11087TEST_TAR_FORMAT=ustar
11088export TEST_TAR_FORMAT
11089TAR_OPTIONS="-H ustar"
11090export TAR_OPTIONS
11091rm -rf *
11092
11093for f in a b c d e f g h i
11094do
11095  echo $f > $f
11096done
11097
11098decho 'creating archive'
11099tar -cf archive -b1 a b c
11100
11101tar tf archive
11102
11103decho 'adding d e f'
11104tar -vrf archive -b3 d e f
11105echo ==
11106tar tf archive
11107
11108decho 'adding g h i'
11109tar -vrf archive -b5 g h i
11110
11111decho 'resulting archive'
11112tar tf archive
11113)
11114) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11115at_status=$? at_failed=false
11116$at_check_filter
11117echo >>"$at_stderr"; $as_echo "creating archive
11118adding d e f
11119adding g h i
11120resulting archive
11121" | \
11122  $at_diff - "$at_stderr" || at_failed=:
11123echo >>"$at_stdout"; $as_echo "creating archive
11124a
11125b
11126c
11127adding d e f
11128d
11129e
11130f
11131==
11132a
11133b
11134c
11135d
11136e
11137f
11138adding g h i
11139g
11140h
11141i
11142resulting archive
11143a
11144b
11145c
11146d
11147e
11148f
11149g
11150h
11151i
11152" | \
11153  $at_diff - "$at_stdout" || at_failed=:
11154at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
11155$at_failed && at_fn_log_failure
11156$at_traceon; }
11157
11158              { set +x
11159$as_echo "$at_srcdir/append05.at:35:
11160mkdir posix
11161(cd posix
11162TEST_TAR_FORMAT=posix
11163export TEST_TAR_FORMAT
11164TAR_OPTIONS=\"-H posix\"
11165export TAR_OPTIONS
11166rm -rf *
11167
11168for f in a b c d e f g h i
11169do
11170  echo \$f > \$f
11171done
11172
11173decho 'creating archive'
11174tar -cf archive -b1 a b c
11175
11176tar tf archive
11177
11178decho 'adding d e f'
11179tar -vrf archive -b3 d e f
11180echo ==
11181tar tf archive
11182
11183decho 'adding g h i'
11184tar -vrf archive -b5 g h i
11185
11186decho 'resulting archive'
11187tar tf archive
11188)"
11189at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
11190( $at_check_trace;
11191mkdir posix
11192(cd posix
11193TEST_TAR_FORMAT=posix
11194export TEST_TAR_FORMAT
11195TAR_OPTIONS="-H posix"
11196export TAR_OPTIONS
11197rm -rf *
11198
11199for f in a b c d e f g h i
11200do
11201  echo $f > $f
11202done
11203
11204decho 'creating archive'
11205tar -cf archive -b1 a b c
11206
11207tar tf archive
11208
11209decho 'adding d e f'
11210tar -vrf archive -b3 d e f
11211echo ==
11212tar tf archive
11213
11214decho 'adding g h i'
11215tar -vrf archive -b5 g h i
11216
11217decho 'resulting archive'
11218tar tf archive
11219)
11220) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11221at_status=$? at_failed=false
11222$at_check_filter
11223echo >>"$at_stderr"; $as_echo "creating archive
11224adding d e f
11225adding g h i
11226resulting archive
11227" | \
11228  $at_diff - "$at_stderr" || at_failed=:
11229echo >>"$at_stdout"; $as_echo "creating archive
11230a
11231b
11232c
11233adding d e f
11234d
11235e
11236f
11237==
11238a
11239b
11240c
11241d
11242e
11243f
11244adding g h i
11245g
11246h
11247i
11248resulting archive
11249a
11250b
11251c
11252d
11253e
11254f
11255g
11256h
11257i
11258" | \
11259  $at_diff - "$at_stdout" || at_failed=:
11260at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
11261$at_failed && at_fn_log_failure
11262$at_traceon; }
11263
11264              { set +x
11265$as_echo "$at_srcdir/append05.at:35:
11266mkdir gnu
11267(cd gnu
11268TEST_TAR_FORMAT=gnu
11269export TEST_TAR_FORMAT
11270TAR_OPTIONS=\"-H gnu\"
11271export TAR_OPTIONS
11272rm -rf *
11273
11274for f in a b c d e f g h i
11275do
11276  echo \$f > \$f
11277done
11278
11279decho 'creating archive'
11280tar -cf archive -b1 a b c
11281
11282tar tf archive
11283
11284decho 'adding d e f'
11285tar -vrf archive -b3 d e f
11286echo ==
11287tar tf archive
11288
11289decho 'adding g h i'
11290tar -vrf archive -b5 g h i
11291
11292decho 'resulting archive'
11293tar tf archive
11294)"
11295at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
11296( $at_check_trace;
11297mkdir gnu
11298(cd gnu
11299TEST_TAR_FORMAT=gnu
11300export TEST_TAR_FORMAT
11301TAR_OPTIONS="-H gnu"
11302export TAR_OPTIONS
11303rm -rf *
11304
11305for f in a b c d e f g h i
11306do
11307  echo $f > $f
11308done
11309
11310decho 'creating archive'
11311tar -cf archive -b1 a b c
11312
11313tar tf archive
11314
11315decho 'adding d e f'
11316tar -vrf archive -b3 d e f
11317echo ==
11318tar tf archive
11319
11320decho 'adding g h i'
11321tar -vrf archive -b5 g h i
11322
11323decho 'resulting archive'
11324tar tf archive
11325)
11326) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11327at_status=$? at_failed=false
11328$at_check_filter
11329echo >>"$at_stderr"; $as_echo "creating archive
11330adding d e f
11331adding g h i
11332resulting archive
11333" | \
11334  $at_diff - "$at_stderr" || at_failed=:
11335echo >>"$at_stdout"; $as_echo "creating archive
11336a
11337b
11338c
11339adding d e f
11340d
11341e
11342f
11343==
11344a
11345b
11346c
11347d
11348e
11349f
11350adding g h i
11351g
11352h
11353i
11354resulting archive
11355a
11356b
11357c
11358d
11359e
11360f
11361g
11362h
11363i
11364" | \
11365  $at_diff - "$at_stdout" || at_failed=:
11366at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
11367$at_failed && at_fn_log_failure
11368$at_traceon; }
11369
11370
11371
11372
11373  set +x
11374  $at_times_p && times >"$at_times_file"
11375) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11376read at_status <"$at_status_file"
11377#AT_STOP_54
11378#AT_START_55
11379at_fn_group_banner 55 'xform-h.at:30' \
11380  "transforming hard links on create" "              " 10
11381at_xfail=no
11382      test -f $XFAILFILE && at_xfail=yes
11383(
11384  $as_echo "55. $at_setup_line: testing $at_desc ..."
11385  $at_traceon
11386
11387
11388
11389
11390
11391
11392
11393  { set +x
11394$as_echo "$at_srcdir/xform-h.at:39:
11395mkdir v7
11396(cd v7
11397TEST_TAR_FORMAT=v7
11398export TEST_TAR_FORMAT
11399TAR_OPTIONS=\"-H v7\"
11400export TAR_OPTIONS
11401rm -rf *
11402
11403mkdir basedir
11404echo \"hello\" > basedir/test
11405ln basedir/test basedir/test_link
11406
11407
11408echo \"Default transform scope\"
11409tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
11410tar tvf archive | sed -n 's/.*test_link link to //p'
11411
11412
11413echo \"Transforming hard links\"
11414tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
11415tar tvf archive | sed -n 's/.*test_link link to //p'
11416
11417
11418echo \"Not transforming hard links\"
11419tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
11420tar tvf archive | sed -n 's/.*test_link link to //p'
11421
11422)"
11423at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
11424( $at_check_trace;
11425mkdir v7
11426(cd v7
11427TEST_TAR_FORMAT=v7
11428export TEST_TAR_FORMAT
11429TAR_OPTIONS="-H v7"
11430export TAR_OPTIONS
11431rm -rf *
11432
11433mkdir basedir
11434echo "hello" > basedir/test
11435ln basedir/test basedir/test_link
11436
11437
11438echo "Default transform scope"
11439tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
11440tar tvf archive | sed -n 's/.*test_link link to //p'
11441
11442
11443echo "Transforming hard links"
11444tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
11445tar tvf archive | sed -n 's/.*test_link link to //p'
11446
11447
11448echo "Not transforming hard links"
11449tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
11450tar tvf archive | sed -n 's/.*test_link link to //p'
11451
11452)
11453) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11454at_status=$? at_failed=false
11455$at_check_filter
11456at_fn_diff_devnull "$at_stderr" || at_failed=:
11457echo >>"$at_stdout"; $as_echo "Default transform scope
11458test
11459Transforming hard links
11460test
11461Not transforming hard links
11462basedir/test
11463" | \
11464  $at_diff - "$at_stdout" || at_failed=:
11465at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
11466$at_failed && at_fn_log_failure
11467$at_traceon; }
11468
11469              { set +x
11470$as_echo "$at_srcdir/xform-h.at:39:
11471mkdir oldgnu
11472(cd oldgnu
11473TEST_TAR_FORMAT=oldgnu
11474export TEST_TAR_FORMAT
11475TAR_OPTIONS=\"-H oldgnu\"
11476export TAR_OPTIONS
11477rm -rf *
11478
11479mkdir basedir
11480echo \"hello\" > basedir/test
11481ln basedir/test basedir/test_link
11482
11483
11484echo \"Default transform scope\"
11485tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
11486tar tvf archive | sed -n 's/.*test_link link to //p'
11487
11488
11489echo \"Transforming hard links\"
11490tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
11491tar tvf archive | sed -n 's/.*test_link link to //p'
11492
11493
11494echo \"Not transforming hard links\"
11495tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
11496tar tvf archive | sed -n 's/.*test_link link to //p'
11497
11498)"
11499at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
11500( $at_check_trace;
11501mkdir oldgnu
11502(cd oldgnu
11503TEST_TAR_FORMAT=oldgnu
11504export TEST_TAR_FORMAT
11505TAR_OPTIONS="-H oldgnu"
11506export TAR_OPTIONS
11507rm -rf *
11508
11509mkdir basedir
11510echo "hello" > basedir/test
11511ln basedir/test basedir/test_link
11512
11513
11514echo "Default transform scope"
11515tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
11516tar tvf archive | sed -n 's/.*test_link link to //p'
11517
11518
11519echo "Transforming hard links"
11520tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
11521tar tvf archive | sed -n 's/.*test_link link to //p'
11522
11523
11524echo "Not transforming hard links"
11525tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
11526tar tvf archive | sed -n 's/.*test_link link to //p'
11527
11528)
11529) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11530at_status=$? at_failed=false
11531$at_check_filter
11532at_fn_diff_devnull "$at_stderr" || at_failed=:
11533echo >>"$at_stdout"; $as_echo "Default transform scope
11534test
11535Transforming hard links
11536test
11537Not transforming hard links
11538basedir/test
11539" | \
11540  $at_diff - "$at_stdout" || at_failed=:
11541at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
11542$at_failed && at_fn_log_failure
11543$at_traceon; }
11544
11545              { set +x
11546$as_echo "$at_srcdir/xform-h.at:39:
11547mkdir ustar
11548(cd ustar
11549TEST_TAR_FORMAT=ustar
11550export TEST_TAR_FORMAT
11551TAR_OPTIONS=\"-H ustar\"
11552export TAR_OPTIONS
11553rm -rf *
11554
11555mkdir basedir
11556echo \"hello\" > basedir/test
11557ln basedir/test basedir/test_link
11558
11559
11560echo \"Default transform scope\"
11561tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
11562tar tvf archive | sed -n 's/.*test_link link to //p'
11563
11564
11565echo \"Transforming hard links\"
11566tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
11567tar tvf archive | sed -n 's/.*test_link link to //p'
11568
11569
11570echo \"Not transforming hard links\"
11571tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
11572tar tvf archive | sed -n 's/.*test_link link to //p'
11573
11574)"
11575at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
11576( $at_check_trace;
11577mkdir ustar
11578(cd ustar
11579TEST_TAR_FORMAT=ustar
11580export TEST_TAR_FORMAT
11581TAR_OPTIONS="-H ustar"
11582export TAR_OPTIONS
11583rm -rf *
11584
11585mkdir basedir
11586echo "hello" > basedir/test
11587ln basedir/test basedir/test_link
11588
11589
11590echo "Default transform scope"
11591tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
11592tar tvf archive | sed -n 's/.*test_link link to //p'
11593
11594
11595echo "Transforming hard links"
11596tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
11597tar tvf archive | sed -n 's/.*test_link link to //p'
11598
11599
11600echo "Not transforming hard links"
11601tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
11602tar tvf archive | sed -n 's/.*test_link link to //p'
11603
11604)
11605) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11606at_status=$? at_failed=false
11607$at_check_filter
11608at_fn_diff_devnull "$at_stderr" || at_failed=:
11609echo >>"$at_stdout"; $as_echo "Default transform scope
11610test
11611Transforming hard links
11612test
11613Not transforming hard links
11614basedir/test
11615" | \
11616  $at_diff - "$at_stdout" || at_failed=:
11617at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
11618$at_failed && at_fn_log_failure
11619$at_traceon; }
11620
11621              { set +x
11622$as_echo "$at_srcdir/xform-h.at:39:
11623mkdir posix
11624(cd posix
11625TEST_TAR_FORMAT=posix
11626export TEST_TAR_FORMAT
11627TAR_OPTIONS=\"-H posix\"
11628export TAR_OPTIONS
11629rm -rf *
11630
11631mkdir basedir
11632echo \"hello\" > basedir/test
11633ln basedir/test basedir/test_link
11634
11635
11636echo \"Default transform scope\"
11637tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
11638tar tvf archive | sed -n 's/.*test_link link to //p'
11639
11640
11641echo \"Transforming hard links\"
11642tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
11643tar tvf archive | sed -n 's/.*test_link link to //p'
11644
11645
11646echo \"Not transforming hard links\"
11647tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
11648tar tvf archive | sed -n 's/.*test_link link to //p'
11649
11650)"
11651at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
11652( $at_check_trace;
11653mkdir posix
11654(cd posix
11655TEST_TAR_FORMAT=posix
11656export TEST_TAR_FORMAT
11657TAR_OPTIONS="-H posix"
11658export TAR_OPTIONS
11659rm -rf *
11660
11661mkdir basedir
11662echo "hello" > basedir/test
11663ln basedir/test basedir/test_link
11664
11665
11666echo "Default transform scope"
11667tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
11668tar tvf archive | sed -n 's/.*test_link link to //p'
11669
11670
11671echo "Transforming hard links"
11672tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
11673tar tvf archive | sed -n 's/.*test_link link to //p'
11674
11675
11676echo "Not transforming hard links"
11677tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
11678tar tvf archive | sed -n 's/.*test_link link to //p'
11679
11680)
11681) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11682at_status=$? at_failed=false
11683$at_check_filter
11684at_fn_diff_devnull "$at_stderr" || at_failed=:
11685echo >>"$at_stdout"; $as_echo "Default transform scope
11686test
11687Transforming hard links
11688test
11689Not transforming hard links
11690basedir/test
11691" | \
11692  $at_diff - "$at_stdout" || at_failed=:
11693at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
11694$at_failed && at_fn_log_failure
11695$at_traceon; }
11696
11697              { set +x
11698$as_echo "$at_srcdir/xform-h.at:39:
11699mkdir gnu
11700(cd gnu
11701TEST_TAR_FORMAT=gnu
11702export TEST_TAR_FORMAT
11703TAR_OPTIONS=\"-H gnu\"
11704export TAR_OPTIONS
11705rm -rf *
11706
11707mkdir basedir
11708echo \"hello\" > basedir/test
11709ln basedir/test basedir/test_link
11710
11711
11712echo \"Default transform scope\"
11713tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
11714tar tvf archive | sed -n 's/.*test_link link to //p'
11715
11716
11717echo \"Transforming hard links\"
11718tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
11719tar tvf archive | sed -n 's/.*test_link link to //p'
11720
11721
11722echo \"Not transforming hard links\"
11723tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
11724tar tvf archive | sed -n 's/.*test_link link to //p'
11725
11726)"
11727at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
11728( $at_check_trace;
11729mkdir gnu
11730(cd gnu
11731TEST_TAR_FORMAT=gnu
11732export TEST_TAR_FORMAT
11733TAR_OPTIONS="-H gnu"
11734export TAR_OPTIONS
11735rm -rf *
11736
11737mkdir basedir
11738echo "hello" > basedir/test
11739ln basedir/test basedir/test_link
11740
11741
11742echo "Default transform scope"
11743tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
11744tar tvf archive | sed -n 's/.*test_link link to //p'
11745
11746
11747echo "Transforming hard links"
11748tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
11749tar tvf archive | sed -n 's/.*test_link link to //p'
11750
11751
11752echo "Not transforming hard links"
11753tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
11754tar tvf archive | sed -n 's/.*test_link link to //p'
11755
11756)
11757) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11758at_status=$? at_failed=false
11759$at_check_filter
11760at_fn_diff_devnull "$at_stderr" || at_failed=:
11761echo >>"$at_stdout"; $as_echo "Default transform scope
11762test
11763Transforming hard links
11764test
11765Not transforming hard links
11766basedir/test
11767" | \
11768  $at_diff - "$at_stdout" || at_failed=:
11769at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
11770$at_failed && at_fn_log_failure
11771$at_traceon; }
11772
11773
11774
11775
11776
11777
11778  set +x
11779  $at_times_p && times >"$at_times_file"
11780) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11781read at_status <"$at_status_file"
11782#AT_STOP_55
11783#AT_START_56
11784at_fn_group_banner 56 'xform01.at:26' \
11785  "transformations and GNU volume labels" "          " 10
11786at_xfail=no
11787      test -f $XFAILFILE && at_xfail=yes
11788(
11789  $as_echo "56. $at_setup_line: testing $at_desc ..."
11790  $at_traceon
11791
11792
11793
11794
11795
11796  { set +x
11797$as_echo "$at_srcdir/xform01.at:29:
11798mkdir gnu
11799(cd gnu
11800TEST_TAR_FORMAT=gnu
11801export TEST_TAR_FORMAT
11802TAR_OPTIONS=\"-H gnu\"
11803export TAR_OPTIONS
11804rm -rf *
11805
11806genfile --file file
11807tar -cf archive.tar -V /label/ file
11808tar tf archive.tar
11809)"
11810at_fn_check_prepare_notrace 'an embedded newline' "xform01.at:29"
11811( $at_check_trace;
11812mkdir gnu
11813(cd gnu
11814TEST_TAR_FORMAT=gnu
11815export TEST_TAR_FORMAT
11816TAR_OPTIONS="-H gnu"
11817export TAR_OPTIONS
11818rm -rf *
11819
11820genfile --file file
11821tar -cf archive.tar -V /label/ file
11822tar tf archive.tar
11823)
11824) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11825at_status=$? at_failed=false
11826$at_check_filter
11827at_fn_diff_devnull "$at_stderr" || at_failed=:
11828echo >>"$at_stdout"; $as_echo "/label/
11829file
11830" | \
11831  $at_diff - "$at_stdout" || at_failed=:
11832at_fn_check_status 0 $at_status "$at_srcdir/xform01.at:29"
11833$at_failed && at_fn_log_failure
11834$at_traceon; }
11835
11836
11837
11838
11839  set +x
11840  $at_times_p && times >"$at_times_file"
11841) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11842read at_status <"$at_status_file"
11843#AT_STOP_56
11844#AT_START_57
11845at_fn_group_banner 57 'xform02.at:21' \
11846  "transforming escaped delimiters on create" "      " 10
11847at_xfail=no
11848      test -f $XFAILFILE && at_xfail=yes
11849(
11850  $as_echo "57. $at_setup_line: testing $at_desc ..."
11851  $at_traceon
11852
11853
11854
11855
11856
11857  { set +x
11858$as_echo "$at_srcdir/xform02.at:24:
11859mkdir v7
11860(cd v7
11861TEST_TAR_FORMAT=v7
11862export TEST_TAR_FORMAT
11863TAR_OPTIONS=\"-H v7\"
11864export TAR_OPTIONS
11865rm -rf *
11866
11867genfile --file file
11868tar cvf /dev/null file \\
11869   --transform='s/file/other\\/name/' \\
11870   --show-transformed-name
11871)"
11872at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
11873( $at_check_trace;
11874mkdir v7
11875(cd v7
11876TEST_TAR_FORMAT=v7
11877export TEST_TAR_FORMAT
11878TAR_OPTIONS="-H v7"
11879export TAR_OPTIONS
11880rm -rf *
11881
11882genfile --file file
11883tar cvf /dev/null file \
11884   --transform='s/file/other\/name/' \
11885   --show-transformed-name
11886)
11887) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11888at_status=$? at_failed=false
11889$at_check_filter
11890at_fn_diff_devnull "$at_stderr" || at_failed=:
11891echo >>"$at_stdout"; $as_echo "other/name
11892" | \
11893  $at_diff - "$at_stdout" || at_failed=:
11894at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
11895$at_failed && at_fn_log_failure
11896$at_traceon; }
11897
11898              { set +x
11899$as_echo "$at_srcdir/xform02.at:24:
11900mkdir oldgnu
11901(cd oldgnu
11902TEST_TAR_FORMAT=oldgnu
11903export TEST_TAR_FORMAT
11904TAR_OPTIONS=\"-H oldgnu\"
11905export TAR_OPTIONS
11906rm -rf *
11907
11908genfile --file file
11909tar cvf /dev/null file \\
11910   --transform='s/file/other\\/name/' \\
11911   --show-transformed-name
11912)"
11913at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
11914( $at_check_trace;
11915mkdir oldgnu
11916(cd oldgnu
11917TEST_TAR_FORMAT=oldgnu
11918export TEST_TAR_FORMAT
11919TAR_OPTIONS="-H oldgnu"
11920export TAR_OPTIONS
11921rm -rf *
11922
11923genfile --file file
11924tar cvf /dev/null file \
11925   --transform='s/file/other\/name/' \
11926   --show-transformed-name
11927)
11928) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11929at_status=$? at_failed=false
11930$at_check_filter
11931at_fn_diff_devnull "$at_stderr" || at_failed=:
11932echo >>"$at_stdout"; $as_echo "other/name
11933" | \
11934  $at_diff - "$at_stdout" || at_failed=:
11935at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
11936$at_failed && at_fn_log_failure
11937$at_traceon; }
11938
11939              { set +x
11940$as_echo "$at_srcdir/xform02.at:24:
11941mkdir ustar
11942(cd ustar
11943TEST_TAR_FORMAT=ustar
11944export TEST_TAR_FORMAT
11945TAR_OPTIONS=\"-H ustar\"
11946export TAR_OPTIONS
11947rm -rf *
11948
11949genfile --file file
11950tar cvf /dev/null file \\
11951   --transform='s/file/other\\/name/' \\
11952   --show-transformed-name
11953)"
11954at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
11955( $at_check_trace;
11956mkdir ustar
11957(cd ustar
11958TEST_TAR_FORMAT=ustar
11959export TEST_TAR_FORMAT
11960TAR_OPTIONS="-H ustar"
11961export TAR_OPTIONS
11962rm -rf *
11963
11964genfile --file file
11965tar cvf /dev/null file \
11966   --transform='s/file/other\/name/' \
11967   --show-transformed-name
11968)
11969) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11970at_status=$? at_failed=false
11971$at_check_filter
11972at_fn_diff_devnull "$at_stderr" || at_failed=:
11973echo >>"$at_stdout"; $as_echo "other/name
11974" | \
11975  $at_diff - "$at_stdout" || at_failed=:
11976at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
11977$at_failed && at_fn_log_failure
11978$at_traceon; }
11979
11980              { set +x
11981$as_echo "$at_srcdir/xform02.at:24:
11982mkdir posix
11983(cd posix
11984TEST_TAR_FORMAT=posix
11985export TEST_TAR_FORMAT
11986TAR_OPTIONS=\"-H posix\"
11987export TAR_OPTIONS
11988rm -rf *
11989
11990genfile --file file
11991tar cvf /dev/null file \\
11992   --transform='s/file/other\\/name/' \\
11993   --show-transformed-name
11994)"
11995at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
11996( $at_check_trace;
11997mkdir posix
11998(cd posix
11999TEST_TAR_FORMAT=posix
12000export TEST_TAR_FORMAT
12001TAR_OPTIONS="-H posix"
12002export TAR_OPTIONS
12003rm -rf *
12004
12005genfile --file file
12006tar cvf /dev/null file \
12007   --transform='s/file/other\/name/' \
12008   --show-transformed-name
12009)
12010) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12011at_status=$? at_failed=false
12012$at_check_filter
12013at_fn_diff_devnull "$at_stderr" || at_failed=:
12014echo >>"$at_stdout"; $as_echo "other/name
12015" | \
12016  $at_diff - "$at_stdout" || at_failed=:
12017at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
12018$at_failed && at_fn_log_failure
12019$at_traceon; }
12020
12021              { set +x
12022$as_echo "$at_srcdir/xform02.at:24:
12023mkdir gnu
12024(cd gnu
12025TEST_TAR_FORMAT=gnu
12026export TEST_TAR_FORMAT
12027TAR_OPTIONS=\"-H gnu\"
12028export TAR_OPTIONS
12029rm -rf *
12030
12031genfile --file file
12032tar cvf /dev/null file \\
12033   --transform='s/file/other\\/name/' \\
12034   --show-transformed-name
12035)"
12036at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
12037( $at_check_trace;
12038mkdir gnu
12039(cd gnu
12040TEST_TAR_FORMAT=gnu
12041export TEST_TAR_FORMAT
12042TAR_OPTIONS="-H gnu"
12043export TAR_OPTIONS
12044rm -rf *
12045
12046genfile --file file
12047tar cvf /dev/null file \
12048   --transform='s/file/other\/name/' \
12049   --show-transformed-name
12050)
12051) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12052at_status=$? at_failed=false
12053$at_check_filter
12054at_fn_diff_devnull "$at_stderr" || at_failed=:
12055echo >>"$at_stdout"; $as_echo "other/name
12056" | \
12057  $at_diff - "$at_stdout" || at_failed=:
12058at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
12059$at_failed && at_fn_log_failure
12060$at_traceon; }
12061
12062
12063
12064
12065  set +x
12066  $at_times_p && times >"$at_times_file"
12067) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12068read at_status <"$at_status_file"
12069#AT_STOP_57
12070#AT_START_58
12071at_fn_group_banner 58 'xform03.at:21' \
12072  "transforming hard link targets" "                 " 10
12073at_xfail=no
12074      test -f $XFAILFILE && at_xfail=yes
12075(
12076  $as_echo "58. $at_setup_line: testing $at_desc ..."
12077  $at_traceon
12078
12079
12080
12081
12082
12083
12084
12085  { set +x
12086$as_echo "$at_srcdir/xform03.at:24:
12087mkdir v7
12088(cd v7
12089TEST_TAR_FORMAT=v7
12090export TEST_TAR_FORMAT
12091TAR_OPTIONS=\"-H v7\"
12092export TAR_OPTIONS
12093rm -rf *
12094
12095mkdir d
12096mkdir d/a
12097genfile --file d/a/b
12098dir=\$(pwd|sed s,^//*,,)/d
12099tar -cf a.tar --xform=\"s|^\$dir/a|dir/c|\" /\$dir/a/b /\$dir/a/b 2>err
12100mkdir t
12101tar -C t -xf a.tar
12102find t -type f
12103)"
12104at_fn_check_prepare_notrace 'a $(...) command substitution' "xform03.at:24"
12105( $at_check_trace;
12106mkdir v7
12107(cd v7
12108TEST_TAR_FORMAT=v7
12109export TEST_TAR_FORMAT
12110TAR_OPTIONS="-H v7"
12111export TAR_OPTIONS
12112rm -rf *
12113
12114mkdir d
12115mkdir d/a
12116genfile --file d/a/b
12117dir=$(pwd|sed s,^//*,,)/d
12118tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err
12119mkdir t
12120tar -C t -xf a.tar
12121find t -type f
12122)
12123) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12124at_status=$? at_failed=false
12125$at_check_filter
12126echo stderr:; tee stderr <"$at_stderr"
12127echo >>"$at_stdout"; $as_echo "t/dir/c/b
12128" | \
12129  $at_diff - "$at_stdout" || at_failed=:
12130at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12131$at_failed && at_fn_log_failure
12132$at_traceon; }
12133
12134              { set +x
12135$as_echo "$at_srcdir/xform03.at:24: sed \"/tar: Removing leading \\\`\\/*\\/' from/d\" stderr"
12136at_fn_check_prepare_notrace 'a `...` command substitution' "xform03.at:24"
12137( $at_check_trace; sed "/tar: Removing leading \`\/*\/' from/d" stderr
12138) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12139at_status=$? at_failed=false
12140$at_check_filter
12141at_fn_diff_devnull "$at_stderr" || at_failed=:
12142at_fn_diff_devnull "$at_stdout" || at_failed=:
12143at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12144$at_failed && at_fn_log_failure
12145$at_traceon; }
12146{ set +x
12147$as_echo "$at_srcdir/xform03.at:24:
12148mkdir oldgnu
12149(cd oldgnu
12150TEST_TAR_FORMAT=oldgnu
12151export TEST_TAR_FORMAT
12152TAR_OPTIONS=\"-H oldgnu\"
12153export TAR_OPTIONS
12154rm -rf *
12155
12156mkdir d
12157mkdir d/a
12158genfile --file d/a/b
12159dir=\$(pwd|sed s,^//*,,)/d
12160tar -cf a.tar --xform=\"s|^\$dir/a|dir/c|\" /\$dir/a/b /\$dir/a/b 2>err
12161mkdir t
12162tar -C t -xf a.tar
12163find t -type f
12164)"
12165at_fn_check_prepare_notrace 'a $(...) command substitution' "xform03.at:24"
12166( $at_check_trace;
12167mkdir oldgnu
12168(cd oldgnu
12169TEST_TAR_FORMAT=oldgnu
12170export TEST_TAR_FORMAT
12171TAR_OPTIONS="-H oldgnu"
12172export TAR_OPTIONS
12173rm -rf *
12174
12175mkdir d
12176mkdir d/a
12177genfile --file d/a/b
12178dir=$(pwd|sed s,^//*,,)/d
12179tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err
12180mkdir t
12181tar -C t -xf a.tar
12182find t -type f
12183)
12184) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12185at_status=$? at_failed=false
12186$at_check_filter
12187echo stderr:; tee stderr <"$at_stderr"
12188echo >>"$at_stdout"; $as_echo "t/dir/c/b
12189" | \
12190  $at_diff - "$at_stdout" || at_failed=:
12191at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12192$at_failed && at_fn_log_failure
12193$at_traceon; }
12194
12195              { set +x
12196$as_echo "$at_srcdir/xform03.at:24: sed \"/tar: Removing leading \\\`\\/*\\/' from/d\" stderr"
12197at_fn_check_prepare_notrace 'a `...` command substitution' "xform03.at:24"
12198( $at_check_trace; sed "/tar: Removing leading \`\/*\/' from/d" stderr
12199) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12200at_status=$? at_failed=false
12201$at_check_filter
12202at_fn_diff_devnull "$at_stderr" || at_failed=:
12203at_fn_diff_devnull "$at_stdout" || at_failed=:
12204at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12205$at_failed && at_fn_log_failure
12206$at_traceon; }
12207{ set +x
12208$as_echo "$at_srcdir/xform03.at:24:
12209mkdir ustar
12210(cd ustar
12211TEST_TAR_FORMAT=ustar
12212export TEST_TAR_FORMAT
12213TAR_OPTIONS=\"-H ustar\"
12214export TAR_OPTIONS
12215rm -rf *
12216
12217mkdir d
12218mkdir d/a
12219genfile --file d/a/b
12220dir=\$(pwd|sed s,^//*,,)/d
12221tar -cf a.tar --xform=\"s|^\$dir/a|dir/c|\" /\$dir/a/b /\$dir/a/b 2>err
12222mkdir t
12223tar -C t -xf a.tar
12224find t -type f
12225)"
12226at_fn_check_prepare_notrace 'a $(...) command substitution' "xform03.at:24"
12227( $at_check_trace;
12228mkdir ustar
12229(cd ustar
12230TEST_TAR_FORMAT=ustar
12231export TEST_TAR_FORMAT
12232TAR_OPTIONS="-H ustar"
12233export TAR_OPTIONS
12234rm -rf *
12235
12236mkdir d
12237mkdir d/a
12238genfile --file d/a/b
12239dir=$(pwd|sed s,^//*,,)/d
12240tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err
12241mkdir t
12242tar -C t -xf a.tar
12243find t -type f
12244)
12245) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12246at_status=$? at_failed=false
12247$at_check_filter
12248echo stderr:; tee stderr <"$at_stderr"
12249echo >>"$at_stdout"; $as_echo "t/dir/c/b
12250" | \
12251  $at_diff - "$at_stdout" || at_failed=:
12252at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12253$at_failed && at_fn_log_failure
12254$at_traceon; }
12255
12256              { set +x
12257$as_echo "$at_srcdir/xform03.at:24: sed \"/tar: Removing leading \\\`\\/*\\/' from/d\" stderr"
12258at_fn_check_prepare_notrace 'a `...` command substitution' "xform03.at:24"
12259( $at_check_trace; sed "/tar: Removing leading \`\/*\/' from/d" stderr
12260) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12261at_status=$? at_failed=false
12262$at_check_filter
12263at_fn_diff_devnull "$at_stderr" || at_failed=:
12264at_fn_diff_devnull "$at_stdout" || at_failed=:
12265at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12266$at_failed && at_fn_log_failure
12267$at_traceon; }
12268{ set +x
12269$as_echo "$at_srcdir/xform03.at:24:
12270mkdir posix
12271(cd posix
12272TEST_TAR_FORMAT=posix
12273export TEST_TAR_FORMAT
12274TAR_OPTIONS=\"-H posix\"
12275export TAR_OPTIONS
12276rm -rf *
12277
12278mkdir d
12279mkdir d/a
12280genfile --file d/a/b
12281dir=\$(pwd|sed s,^//*,,)/d
12282tar -cf a.tar --xform=\"s|^\$dir/a|dir/c|\" /\$dir/a/b /\$dir/a/b 2>err
12283mkdir t
12284tar -C t -xf a.tar
12285find t -type f
12286)"
12287at_fn_check_prepare_notrace 'a $(...) command substitution' "xform03.at:24"
12288( $at_check_trace;
12289mkdir posix
12290(cd posix
12291TEST_TAR_FORMAT=posix
12292export TEST_TAR_FORMAT
12293TAR_OPTIONS="-H posix"
12294export TAR_OPTIONS
12295rm -rf *
12296
12297mkdir d
12298mkdir d/a
12299genfile --file d/a/b
12300dir=$(pwd|sed s,^//*,,)/d
12301tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err
12302mkdir t
12303tar -C t -xf a.tar
12304find t -type f
12305)
12306) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12307at_status=$? at_failed=false
12308$at_check_filter
12309echo stderr:; tee stderr <"$at_stderr"
12310echo >>"$at_stdout"; $as_echo "t/dir/c/b
12311" | \
12312  $at_diff - "$at_stdout" || at_failed=:
12313at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12314$at_failed && at_fn_log_failure
12315$at_traceon; }
12316
12317              { set +x
12318$as_echo "$at_srcdir/xform03.at:24: sed \"/tar: Removing leading \\\`\\/*\\/' from/d\" stderr"
12319at_fn_check_prepare_notrace 'a `...` command substitution' "xform03.at:24"
12320( $at_check_trace; sed "/tar: Removing leading \`\/*\/' from/d" stderr
12321) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12322at_status=$? at_failed=false
12323$at_check_filter
12324at_fn_diff_devnull "$at_stderr" || at_failed=:
12325at_fn_diff_devnull "$at_stdout" || at_failed=:
12326at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12327$at_failed && at_fn_log_failure
12328$at_traceon; }
12329{ set +x
12330$as_echo "$at_srcdir/xform03.at:24:
12331mkdir gnu
12332(cd gnu
12333TEST_TAR_FORMAT=gnu
12334export TEST_TAR_FORMAT
12335TAR_OPTIONS=\"-H gnu\"
12336export TAR_OPTIONS
12337rm -rf *
12338
12339mkdir d
12340mkdir d/a
12341genfile --file d/a/b
12342dir=\$(pwd|sed s,^//*,,)/d
12343tar -cf a.tar --xform=\"s|^\$dir/a|dir/c|\" /\$dir/a/b /\$dir/a/b 2>err
12344mkdir t
12345tar -C t -xf a.tar
12346find t -type f
12347)"
12348at_fn_check_prepare_notrace 'a $(...) command substitution' "xform03.at:24"
12349( $at_check_trace;
12350mkdir gnu
12351(cd gnu
12352TEST_TAR_FORMAT=gnu
12353export TEST_TAR_FORMAT
12354TAR_OPTIONS="-H gnu"
12355export TAR_OPTIONS
12356rm -rf *
12357
12358mkdir d
12359mkdir d/a
12360genfile --file d/a/b
12361dir=$(pwd|sed s,^//*,,)/d
12362tar -cf a.tar --xform="s|^$dir/a|dir/c|" /$dir/a/b /$dir/a/b 2>err
12363mkdir t
12364tar -C t -xf a.tar
12365find t -type f
12366)
12367) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12368at_status=$? at_failed=false
12369$at_check_filter
12370echo stderr:; tee stderr <"$at_stderr"
12371echo >>"$at_stdout"; $as_echo "t/dir/c/b
12372" | \
12373  $at_diff - "$at_stdout" || at_failed=:
12374at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12375$at_failed && at_fn_log_failure
12376$at_traceon; }
12377
12378              { set +x
12379$as_echo "$at_srcdir/xform03.at:24: sed \"/tar: Removing leading \\\`\\/*\\/' from/d\" stderr"
12380at_fn_check_prepare_notrace 'a `...` command substitution' "xform03.at:24"
12381( $at_check_trace; sed "/tar: Removing leading \`\/*\/' from/d" stderr
12382) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12383at_status=$? at_failed=false
12384$at_check_filter
12385at_fn_diff_devnull "$at_stderr" || at_failed=:
12386at_fn_diff_devnull "$at_stdout" || at_failed=:
12387at_fn_check_status 0 $at_status "$at_srcdir/xform03.at:24"
12388$at_failed && at_fn_log_failure
12389$at_traceon; }
12390
12391
12392
12393
12394  set +x
12395  $at_times_p && times >"$at_times_file"
12396) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12397read at_status <"$at_status_file"
12398#AT_STOP_58
12399#AT_START_59
12400at_fn_group_banner 59 'exclude.at:23' \
12401  "exclude" "                                        " 11
12402at_xfail=no
12403      test -f $XFAILFILE && at_xfail=yes
12404(
12405  $as_echo "59. $at_setup_line: testing $at_desc ..."
12406  $at_traceon
12407
12408
12409
12410
12411
12412  { set +x
12413$as_echo "$at_srcdir/exclude.at:26:
12414mkdir ustar
12415(cd ustar
12416TEST_TAR_FORMAT=ustar
12417export TEST_TAR_FORMAT
12418TAR_OPTIONS=\"-H ustar\"
12419export TAR_OPTIONS
12420rm -rf *
12421
12422
12423test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12424
12425
12426mkdir dir
12427echo blues > dir/blues
12428echo jazz > dir/jazz
12429mkdir dir/folk
12430echo tagfile > dir/folk/tagfile
12431echo sanjuan > dir/folk/sanjuan
12432mkdir dir/rock
12433echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG
12434echo \"test\" > dir/rock/file
12435
12436for option in exclude-caches exclude-caches-under exclude-caches-all
12437do
12438  echo OPTION \$option
12439  tar -cf archive.tar --\$option -v dir 2>err | sort
12440  cat err
12441  echo ARCHIVE
12442  tar tf archive.tar | sort
12443done
12444
12445for option in exclude-tag exclude-tag-under exclude-tag-all
12446do
12447  echo OPTION \$option
12448  tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort
12449  cat err
12450  echo ARCHIVE
12451  tar tf archive.tar | sort
12452done
12453)"
12454at_fn_check_prepare_notrace 'a `...` command substitution' "exclude.at:26"
12455( $at_check_trace;
12456mkdir ustar
12457(cd ustar
12458TEST_TAR_FORMAT=ustar
12459export TEST_TAR_FORMAT
12460TAR_OPTIONS="-H ustar"
12461export TAR_OPTIONS
12462rm -rf *
12463
12464
12465test -z "`sort < /dev/null 2>&1`" || exit 77
12466
12467
12468mkdir dir
12469echo blues > dir/blues
12470echo jazz > dir/jazz
12471mkdir dir/folk
12472echo tagfile > dir/folk/tagfile
12473echo sanjuan > dir/folk/sanjuan
12474mkdir dir/rock
12475echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
12476echo "test" > dir/rock/file
12477
12478for option in exclude-caches exclude-caches-under exclude-caches-all
12479do
12480  echo OPTION $option
12481  tar -cf archive.tar --$option -v dir 2>err | sort
12482  cat err
12483  echo ARCHIVE
12484  tar tf archive.tar | sort
12485done
12486
12487for option in exclude-tag exclude-tag-under exclude-tag-all
12488do
12489  echo OPTION $option
12490  tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
12491  cat err
12492  echo ARCHIVE
12493  tar tf archive.tar | sort
12494done
12495)
12496) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12497at_status=$? at_failed=false
12498$at_check_filter
12499at_fn_diff_devnull "$at_stderr" || at_failed=:
12500echo >>"$at_stdout"; $as_echo "OPTION exclude-caches
12501dir/
12502dir/blues
12503dir/folk/
12504dir/folk/sanjuan
12505dir/folk/tagfile
12506dir/jazz
12507dir/rock/
12508dir/rock/CACHEDIR.TAG
12509tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
12510ARCHIVE
12511dir/
12512dir/blues
12513dir/folk/
12514dir/folk/sanjuan
12515dir/folk/tagfile
12516dir/jazz
12517dir/rock/
12518dir/rock/CACHEDIR.TAG
12519OPTION exclude-caches-under
12520dir/
12521dir/blues
12522dir/folk/
12523dir/folk/sanjuan
12524dir/folk/tagfile
12525dir/jazz
12526dir/rock/
12527tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
12528ARCHIVE
12529dir/
12530dir/blues
12531dir/folk/
12532dir/folk/sanjuan
12533dir/folk/tagfile
12534dir/jazz
12535dir/rock/
12536OPTION exclude-caches-all
12537dir/
12538dir/blues
12539dir/folk/
12540dir/folk/sanjuan
12541dir/folk/tagfile
12542dir/jazz
12543tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
12544ARCHIVE
12545dir/
12546dir/blues
12547dir/folk/
12548dir/folk/sanjuan
12549dir/folk/tagfile
12550dir/jazz
12551OPTION exclude-tag
12552dir/
12553dir/blues
12554dir/folk/
12555dir/folk/tagfile
12556dir/jazz
12557dir/rock/
12558dir/rock/CACHEDIR.TAG
12559dir/rock/file
12560tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
12561ARCHIVE
12562dir/
12563dir/blues
12564dir/folk/
12565dir/folk/tagfile
12566dir/jazz
12567dir/rock/
12568dir/rock/CACHEDIR.TAG
12569dir/rock/file
12570OPTION exclude-tag-under
12571dir/
12572dir/blues
12573dir/folk/
12574dir/jazz
12575dir/rock/
12576dir/rock/CACHEDIR.TAG
12577dir/rock/file
12578tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
12579ARCHIVE
12580dir/
12581dir/blues
12582dir/folk/
12583dir/jazz
12584dir/rock/
12585dir/rock/CACHEDIR.TAG
12586dir/rock/file
12587OPTION exclude-tag-all
12588dir/
12589dir/blues
12590dir/jazz
12591dir/rock/
12592dir/rock/CACHEDIR.TAG
12593dir/rock/file
12594tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
12595ARCHIVE
12596dir/
12597dir/blues
12598dir/jazz
12599dir/rock/
12600dir/rock/CACHEDIR.TAG
12601dir/rock/file
12602" | \
12603  $at_diff - "$at_stdout" || at_failed=:
12604at_fn_check_status 0 $at_status "$at_srcdir/exclude.at:26"
12605$at_failed && at_fn_log_failure
12606$at_traceon; }
12607
12608
12609
12610
12611  set +x
12612  $at_times_p && times >"$at_times_file"
12613) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12614read at_status <"$at_status_file"
12615#AT_STOP_59
12616#AT_START_60
12617at_fn_group_banner 60 'exclude01.at:19' \
12618  "exclude wildcards" "                              " 11
12619at_xfail=no
12620      test -f $XFAILFILE && at_xfail=yes
12621(
12622  $as_echo "60. $at_setup_line: testing $at_desc ..."
12623  $at_traceon
12624
12625
12626
12627
12628
12629  { set +x
12630$as_echo "$at_srcdir/exclude01.at:22:
12631mkdir v7
12632(cd v7
12633TEST_TAR_FORMAT=v7
12634export TEST_TAR_FORMAT
12635TAR_OPTIONS=\"-H v7\"
12636export TAR_OPTIONS
12637rm -rf *
12638
12639
12640test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12641
12642
12643rm -rf testdir
12644mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12645touch testdir/dir1/file1
12646touch testdir/dir1/\\*
12647touch testdir/dir2/file2
12648touch testdir/dir2/\\*
12649touch testdir/dir3/file3
12650touch testdir/dir3/\\*
12651
12652tar cf archive --exclude=testdir/dir1/\\* \\
12653               --no-wildcards \\
12654               --exclude=testdir/dir2/\\* \\
12655               --wildcards \\
12656               --exclude=testdir/dir3/\\* \\
12657               testdir
12658tar tf archive | sort
12659
12660echo \"NEXT\"
12661tar cf archive testdir
12662tar t \"testdir/dir1/*\" -f archive | sort
12663
12664echo \"NEXT\"
12665tar cf archive testdir/dir1
12666tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
12667
12668echo \"NEXT\"
12669tar cf archive testdir
12670tar t --wildcards \"testdir/dir1/*\" -f archive | sort
12671
12672rm -rf testdir
12673)"
12674at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
12675( $at_check_trace;
12676mkdir v7
12677(cd v7
12678TEST_TAR_FORMAT=v7
12679export TEST_TAR_FORMAT
12680TAR_OPTIONS="-H v7"
12681export TAR_OPTIONS
12682rm -rf *
12683
12684
12685test -z "`sort < /dev/null 2>&1`" || exit 77
12686
12687
12688rm -rf testdir
12689mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12690touch testdir/dir1/file1
12691touch testdir/dir1/\*
12692touch testdir/dir2/file2
12693touch testdir/dir2/\*
12694touch testdir/dir3/file3
12695touch testdir/dir3/\*
12696
12697tar cf archive --exclude=testdir/dir1/\* \
12698               --no-wildcards \
12699               --exclude=testdir/dir2/\* \
12700               --wildcards \
12701               --exclude=testdir/dir3/\* \
12702               testdir
12703tar tf archive | sort
12704
12705echo "NEXT"
12706tar cf archive testdir
12707tar t "testdir/dir1/*" -f archive | sort
12708
12709echo "NEXT"
12710tar cf archive testdir/dir1
12711tar t --no-wildcards "testdir/dir1/*" -f archive | sort
12712
12713echo "NEXT"
12714tar cf archive testdir
12715tar t --wildcards "testdir/dir1/*" -f archive | sort
12716
12717rm -rf testdir
12718)
12719) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12720at_status=$? at_failed=false
12721$at_check_filter
12722at_fn_diff_devnull "$at_stderr" || at_failed=:
12723echo >>"$at_stdout"; $as_echo "testdir/
12724testdir/dir1/
12725testdir/dir2/
12726testdir/dir2/file2
12727testdir/dir3/
12728NEXT
12729testdir/dir1/*
12730NEXT
12731testdir/dir1/*
12732NEXT
12733testdir/dir1/*
12734testdir/dir1/file1
12735" | \
12736  $at_diff - "$at_stdout" || at_failed=:
12737at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
12738$at_failed && at_fn_log_failure
12739$at_traceon; }
12740
12741              { set +x
12742$as_echo "$at_srcdir/exclude01.at:22:
12743mkdir oldgnu
12744(cd oldgnu
12745TEST_TAR_FORMAT=oldgnu
12746export TEST_TAR_FORMAT
12747TAR_OPTIONS=\"-H oldgnu\"
12748export TAR_OPTIONS
12749rm -rf *
12750
12751
12752test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12753
12754
12755rm -rf testdir
12756mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12757touch testdir/dir1/file1
12758touch testdir/dir1/\\*
12759touch testdir/dir2/file2
12760touch testdir/dir2/\\*
12761touch testdir/dir3/file3
12762touch testdir/dir3/\\*
12763
12764tar cf archive --exclude=testdir/dir1/\\* \\
12765               --no-wildcards \\
12766               --exclude=testdir/dir2/\\* \\
12767               --wildcards \\
12768               --exclude=testdir/dir3/\\* \\
12769               testdir
12770tar tf archive | sort
12771
12772echo \"NEXT\"
12773tar cf archive testdir
12774tar t \"testdir/dir1/*\" -f archive | sort
12775
12776echo \"NEXT\"
12777tar cf archive testdir/dir1
12778tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
12779
12780echo \"NEXT\"
12781tar cf archive testdir
12782tar t --wildcards \"testdir/dir1/*\" -f archive | sort
12783
12784rm -rf testdir
12785)"
12786at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
12787( $at_check_trace;
12788mkdir oldgnu
12789(cd oldgnu
12790TEST_TAR_FORMAT=oldgnu
12791export TEST_TAR_FORMAT
12792TAR_OPTIONS="-H oldgnu"
12793export TAR_OPTIONS
12794rm -rf *
12795
12796
12797test -z "`sort < /dev/null 2>&1`" || exit 77
12798
12799
12800rm -rf testdir
12801mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12802touch testdir/dir1/file1
12803touch testdir/dir1/\*
12804touch testdir/dir2/file2
12805touch testdir/dir2/\*
12806touch testdir/dir3/file3
12807touch testdir/dir3/\*
12808
12809tar cf archive --exclude=testdir/dir1/\* \
12810               --no-wildcards \
12811               --exclude=testdir/dir2/\* \
12812               --wildcards \
12813               --exclude=testdir/dir3/\* \
12814               testdir
12815tar tf archive | sort
12816
12817echo "NEXT"
12818tar cf archive testdir
12819tar t "testdir/dir1/*" -f archive | sort
12820
12821echo "NEXT"
12822tar cf archive testdir/dir1
12823tar t --no-wildcards "testdir/dir1/*" -f archive | sort
12824
12825echo "NEXT"
12826tar cf archive testdir
12827tar t --wildcards "testdir/dir1/*" -f archive | sort
12828
12829rm -rf testdir
12830)
12831) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12832at_status=$? at_failed=false
12833$at_check_filter
12834at_fn_diff_devnull "$at_stderr" || at_failed=:
12835echo >>"$at_stdout"; $as_echo "testdir/
12836testdir/dir1/
12837testdir/dir2/
12838testdir/dir2/file2
12839testdir/dir3/
12840NEXT
12841testdir/dir1/*
12842NEXT
12843testdir/dir1/*
12844NEXT
12845testdir/dir1/*
12846testdir/dir1/file1
12847" | \
12848  $at_diff - "$at_stdout" || at_failed=:
12849at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
12850$at_failed && at_fn_log_failure
12851$at_traceon; }
12852
12853              { set +x
12854$as_echo "$at_srcdir/exclude01.at:22:
12855mkdir ustar
12856(cd ustar
12857TEST_TAR_FORMAT=ustar
12858export TEST_TAR_FORMAT
12859TAR_OPTIONS=\"-H ustar\"
12860export TAR_OPTIONS
12861rm -rf *
12862
12863
12864test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12865
12866
12867rm -rf testdir
12868mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12869touch testdir/dir1/file1
12870touch testdir/dir1/\\*
12871touch testdir/dir2/file2
12872touch testdir/dir2/\\*
12873touch testdir/dir3/file3
12874touch testdir/dir3/\\*
12875
12876tar cf archive --exclude=testdir/dir1/\\* \\
12877               --no-wildcards \\
12878               --exclude=testdir/dir2/\\* \\
12879               --wildcards \\
12880               --exclude=testdir/dir3/\\* \\
12881               testdir
12882tar tf archive | sort
12883
12884echo \"NEXT\"
12885tar cf archive testdir
12886tar t \"testdir/dir1/*\" -f archive | sort
12887
12888echo \"NEXT\"
12889tar cf archive testdir/dir1
12890tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
12891
12892echo \"NEXT\"
12893tar cf archive testdir
12894tar t --wildcards \"testdir/dir1/*\" -f archive | sort
12895
12896rm -rf testdir
12897)"
12898at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
12899( $at_check_trace;
12900mkdir ustar
12901(cd ustar
12902TEST_TAR_FORMAT=ustar
12903export TEST_TAR_FORMAT
12904TAR_OPTIONS="-H ustar"
12905export TAR_OPTIONS
12906rm -rf *
12907
12908
12909test -z "`sort < /dev/null 2>&1`" || exit 77
12910
12911
12912rm -rf testdir
12913mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12914touch testdir/dir1/file1
12915touch testdir/dir1/\*
12916touch testdir/dir2/file2
12917touch testdir/dir2/\*
12918touch testdir/dir3/file3
12919touch testdir/dir3/\*
12920
12921tar cf archive --exclude=testdir/dir1/\* \
12922               --no-wildcards \
12923               --exclude=testdir/dir2/\* \
12924               --wildcards \
12925               --exclude=testdir/dir3/\* \
12926               testdir
12927tar tf archive | sort
12928
12929echo "NEXT"
12930tar cf archive testdir
12931tar t "testdir/dir1/*" -f archive | sort
12932
12933echo "NEXT"
12934tar cf archive testdir/dir1
12935tar t --no-wildcards "testdir/dir1/*" -f archive | sort
12936
12937echo "NEXT"
12938tar cf archive testdir
12939tar t --wildcards "testdir/dir1/*" -f archive | sort
12940
12941rm -rf testdir
12942)
12943) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12944at_status=$? at_failed=false
12945$at_check_filter
12946at_fn_diff_devnull "$at_stderr" || at_failed=:
12947echo >>"$at_stdout"; $as_echo "testdir/
12948testdir/dir1/
12949testdir/dir2/
12950testdir/dir2/file2
12951testdir/dir3/
12952NEXT
12953testdir/dir1/*
12954NEXT
12955testdir/dir1/*
12956NEXT
12957testdir/dir1/*
12958testdir/dir1/file1
12959" | \
12960  $at_diff - "$at_stdout" || at_failed=:
12961at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
12962$at_failed && at_fn_log_failure
12963$at_traceon; }
12964
12965              { set +x
12966$as_echo "$at_srcdir/exclude01.at:22:
12967mkdir posix
12968(cd posix
12969TEST_TAR_FORMAT=posix
12970export TEST_TAR_FORMAT
12971TAR_OPTIONS=\"-H posix\"
12972export TAR_OPTIONS
12973rm -rf *
12974
12975
12976test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12977
12978
12979rm -rf testdir
12980mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12981touch testdir/dir1/file1
12982touch testdir/dir1/\\*
12983touch testdir/dir2/file2
12984touch testdir/dir2/\\*
12985touch testdir/dir3/file3
12986touch testdir/dir3/\\*
12987
12988tar cf archive --exclude=testdir/dir1/\\* \\
12989               --no-wildcards \\
12990               --exclude=testdir/dir2/\\* \\
12991               --wildcards \\
12992               --exclude=testdir/dir3/\\* \\
12993               testdir
12994tar tf archive | sort
12995
12996echo \"NEXT\"
12997tar cf archive testdir
12998tar t \"testdir/dir1/*\" -f archive | sort
12999
13000echo \"NEXT\"
13001tar cf archive testdir/dir1
13002tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
13003
13004echo \"NEXT\"
13005tar cf archive testdir
13006tar t --wildcards \"testdir/dir1/*\" -f archive | sort
13007
13008rm -rf testdir
13009)"
13010at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
13011( $at_check_trace;
13012mkdir posix
13013(cd posix
13014TEST_TAR_FORMAT=posix
13015export TEST_TAR_FORMAT
13016TAR_OPTIONS="-H posix"
13017export TAR_OPTIONS
13018rm -rf *
13019
13020
13021test -z "`sort < /dev/null 2>&1`" || exit 77
13022
13023
13024rm -rf testdir
13025mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
13026touch testdir/dir1/file1
13027touch testdir/dir1/\*
13028touch testdir/dir2/file2
13029touch testdir/dir2/\*
13030touch testdir/dir3/file3
13031touch testdir/dir3/\*
13032
13033tar cf archive --exclude=testdir/dir1/\* \
13034               --no-wildcards \
13035               --exclude=testdir/dir2/\* \
13036               --wildcards \
13037               --exclude=testdir/dir3/\* \
13038               testdir
13039tar tf archive | sort
13040
13041echo "NEXT"
13042tar cf archive testdir
13043tar t "testdir/dir1/*" -f archive | sort
13044
13045echo "NEXT"
13046tar cf archive testdir/dir1
13047tar t --no-wildcards "testdir/dir1/*" -f archive | sort
13048
13049echo "NEXT"
13050tar cf archive testdir
13051tar t --wildcards "testdir/dir1/*" -f archive | sort
13052
13053rm -rf testdir
13054)
13055) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13056at_status=$? at_failed=false
13057$at_check_filter
13058at_fn_diff_devnull "$at_stderr" || at_failed=:
13059echo >>"$at_stdout"; $as_echo "testdir/
13060testdir/dir1/
13061testdir/dir2/
13062testdir/dir2/file2
13063testdir/dir3/
13064NEXT
13065testdir/dir1/*
13066NEXT
13067testdir/dir1/*
13068NEXT
13069testdir/dir1/*
13070testdir/dir1/file1
13071" | \
13072  $at_diff - "$at_stdout" || at_failed=:
13073at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
13074$at_failed && at_fn_log_failure
13075$at_traceon; }
13076
13077              { set +x
13078$as_echo "$at_srcdir/exclude01.at:22:
13079mkdir gnu
13080(cd gnu
13081TEST_TAR_FORMAT=gnu
13082export TEST_TAR_FORMAT
13083TAR_OPTIONS=\"-H gnu\"
13084export TAR_OPTIONS
13085rm -rf *
13086
13087
13088test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13089
13090
13091rm -rf testdir
13092mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
13093touch testdir/dir1/file1
13094touch testdir/dir1/\\*
13095touch testdir/dir2/file2
13096touch testdir/dir2/\\*
13097touch testdir/dir3/file3
13098touch testdir/dir3/\\*
13099
13100tar cf archive --exclude=testdir/dir1/\\* \\
13101               --no-wildcards \\
13102               --exclude=testdir/dir2/\\* \\
13103               --wildcards \\
13104               --exclude=testdir/dir3/\\* \\
13105               testdir
13106tar tf archive | sort
13107
13108echo \"NEXT\"
13109tar cf archive testdir
13110tar t \"testdir/dir1/*\" -f archive | sort
13111
13112echo \"NEXT\"
13113tar cf archive testdir/dir1
13114tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
13115
13116echo \"NEXT\"
13117tar cf archive testdir
13118tar t --wildcards \"testdir/dir1/*\" -f archive | sort
13119
13120rm -rf testdir
13121)"
13122at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
13123( $at_check_trace;
13124mkdir gnu
13125(cd gnu
13126TEST_TAR_FORMAT=gnu
13127export TEST_TAR_FORMAT
13128TAR_OPTIONS="-H gnu"
13129export TAR_OPTIONS
13130rm -rf *
13131
13132
13133test -z "`sort < /dev/null 2>&1`" || exit 77
13134
13135
13136rm -rf testdir
13137mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
13138touch testdir/dir1/file1
13139touch testdir/dir1/\*
13140touch testdir/dir2/file2
13141touch testdir/dir2/\*
13142touch testdir/dir3/file3
13143touch testdir/dir3/\*
13144
13145tar cf archive --exclude=testdir/dir1/\* \
13146               --no-wildcards \
13147               --exclude=testdir/dir2/\* \
13148               --wildcards \
13149               --exclude=testdir/dir3/\* \
13150               testdir
13151tar tf archive | sort
13152
13153echo "NEXT"
13154tar cf archive testdir
13155tar t "testdir/dir1/*" -f archive | sort
13156
13157echo "NEXT"
13158tar cf archive testdir/dir1
13159tar t --no-wildcards "testdir/dir1/*" -f archive | sort
13160
13161echo "NEXT"
13162tar cf archive testdir
13163tar t --wildcards "testdir/dir1/*" -f archive | sort
13164
13165rm -rf testdir
13166)
13167) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13168at_status=$? at_failed=false
13169$at_check_filter
13170at_fn_diff_devnull "$at_stderr" || at_failed=:
13171echo >>"$at_stdout"; $as_echo "testdir/
13172testdir/dir1/
13173testdir/dir2/
13174testdir/dir2/file2
13175testdir/dir3/
13176NEXT
13177testdir/dir1/*
13178NEXT
13179testdir/dir1/*
13180NEXT
13181testdir/dir1/*
13182testdir/dir1/file1
13183" | \
13184  $at_diff - "$at_stdout" || at_failed=:
13185at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
13186$at_failed && at_fn_log_failure
13187$at_traceon; }
13188
13189
13190
13191
13192  set +x
13193  $at_times_p && times >"$at_times_file"
13194) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13195read at_status <"$at_status_file"
13196#AT_STOP_60
13197#AT_START_61
13198at_fn_group_banner 61 'exclude02.at:19' \
13199  "exclude: anchoring" "                             " 11
13200at_xfail=no
13201      test -f $XFAILFILE && at_xfail=yes
13202(
13203  $as_echo "61. $at_setup_line: testing $at_desc ..."
13204  $at_traceon
13205
13206
13207
13208
13209
13210  { set +x
13211$as_echo "$at_srcdir/exclude02.at:22:
13212mkdir v7
13213(cd v7
13214TEST_TAR_FORMAT=v7
13215export TEST_TAR_FORMAT
13216TAR_OPTIONS=\"-H v7\"
13217export TAR_OPTIONS
13218rm -rf *
13219
13220
13221test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13222
13223
13224rm -rf testdir
13225mkdir -p testdir
13226touch file1.txt
13227touch testdir/file1.txt
13228touch testdir/file2
13229
13230tar cf archive --exclude=\"file1.txt\" \\
13231               testdir
13232tar tf archive | sort
13233
13234echo \"SUB 1\"
13235tar cf archive --no-anchored \\
13236               --exclude=\"file1.txt\" \\
13237               testdir
13238tar tf archive | sort
13239
13240echo \"SUB 2\"
13241tar cf archive --anchored \\
13242               --exclude=\"file1.txt\" \\
13243               testdir
13244tar tf archive | sort
13245
13246echo \"SUB 3\"
13247tar cf archive testdir file1.txt
13248tar t \"file1.txt\" -f archive | sort
13249
13250echo \"SUB 4\"
13251tar t --no-anchored \"file1.txt\" -f archive | sort
13252
13253echo \"SUB 5\"
13254tar t --anchored \"file1.txt\" -f archive | sort
13255
13256rm -rf testdir file1.txt
13257
13258)"
13259at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
13260( $at_check_trace;
13261mkdir v7
13262(cd v7
13263TEST_TAR_FORMAT=v7
13264export TEST_TAR_FORMAT
13265TAR_OPTIONS="-H v7"
13266export TAR_OPTIONS
13267rm -rf *
13268
13269
13270test -z "`sort < /dev/null 2>&1`" || exit 77
13271
13272
13273rm -rf testdir
13274mkdir -p testdir
13275touch file1.txt
13276touch testdir/file1.txt
13277touch testdir/file2
13278
13279tar cf archive --exclude="file1.txt" \
13280               testdir
13281tar tf archive | sort
13282
13283echo "SUB 1"
13284tar cf archive --no-anchored \
13285               --exclude="file1.txt" \
13286               testdir
13287tar tf archive | sort
13288
13289echo "SUB 2"
13290tar cf archive --anchored \
13291               --exclude="file1.txt" \
13292               testdir
13293tar tf archive | sort
13294
13295echo "SUB 3"
13296tar cf archive testdir file1.txt
13297tar t "file1.txt" -f archive | sort
13298
13299echo "SUB 4"
13300tar t --no-anchored "file1.txt" -f archive | sort
13301
13302echo "SUB 5"
13303tar t --anchored "file1.txt" -f archive | sort
13304
13305rm -rf testdir file1.txt
13306
13307)
13308) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13309at_status=$? at_failed=false
13310$at_check_filter
13311at_fn_diff_devnull "$at_stderr" || at_failed=:
13312echo >>"$at_stdout"; $as_echo "testdir/
13313testdir/file2
13314SUB 1
13315testdir/
13316testdir/file2
13317SUB 2
13318testdir/
13319testdir/file1.txt
13320testdir/file2
13321SUB 3
13322file1.txt
13323SUB 4
13324file1.txt
13325testdir/file1.txt
13326SUB 5
13327file1.txt
13328" | \
13329  $at_diff - "$at_stdout" || at_failed=:
13330at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
13331$at_failed && at_fn_log_failure
13332$at_traceon; }
13333
13334              { set +x
13335$as_echo "$at_srcdir/exclude02.at:22:
13336mkdir oldgnu
13337(cd oldgnu
13338TEST_TAR_FORMAT=oldgnu
13339export TEST_TAR_FORMAT
13340TAR_OPTIONS=\"-H oldgnu\"
13341export TAR_OPTIONS
13342rm -rf *
13343
13344
13345test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13346
13347
13348rm -rf testdir
13349mkdir -p testdir
13350touch file1.txt
13351touch testdir/file1.txt
13352touch testdir/file2
13353
13354tar cf archive --exclude=\"file1.txt\" \\
13355               testdir
13356tar tf archive | sort
13357
13358echo \"SUB 1\"
13359tar cf archive --no-anchored \\
13360               --exclude=\"file1.txt\" \\
13361               testdir
13362tar tf archive | sort
13363
13364echo \"SUB 2\"
13365tar cf archive --anchored \\
13366               --exclude=\"file1.txt\" \\
13367               testdir
13368tar tf archive | sort
13369
13370echo \"SUB 3\"
13371tar cf archive testdir file1.txt
13372tar t \"file1.txt\" -f archive | sort
13373
13374echo \"SUB 4\"
13375tar t --no-anchored \"file1.txt\" -f archive | sort
13376
13377echo \"SUB 5\"
13378tar t --anchored \"file1.txt\" -f archive | sort
13379
13380rm -rf testdir file1.txt
13381
13382)"
13383at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
13384( $at_check_trace;
13385mkdir oldgnu
13386(cd oldgnu
13387TEST_TAR_FORMAT=oldgnu
13388export TEST_TAR_FORMAT
13389TAR_OPTIONS="-H oldgnu"
13390export TAR_OPTIONS
13391rm -rf *
13392
13393
13394test -z "`sort < /dev/null 2>&1`" || exit 77
13395
13396
13397rm -rf testdir
13398mkdir -p testdir
13399touch file1.txt
13400touch testdir/file1.txt
13401touch testdir/file2
13402
13403tar cf archive --exclude="file1.txt" \
13404               testdir
13405tar tf archive | sort
13406
13407echo "SUB 1"
13408tar cf archive --no-anchored \
13409               --exclude="file1.txt" \
13410               testdir
13411tar tf archive | sort
13412
13413echo "SUB 2"
13414tar cf archive --anchored \
13415               --exclude="file1.txt" \
13416               testdir
13417tar tf archive | sort
13418
13419echo "SUB 3"
13420tar cf archive testdir file1.txt
13421tar t "file1.txt" -f archive | sort
13422
13423echo "SUB 4"
13424tar t --no-anchored "file1.txt" -f archive | sort
13425
13426echo "SUB 5"
13427tar t --anchored "file1.txt" -f archive | sort
13428
13429rm -rf testdir file1.txt
13430
13431)
13432) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13433at_status=$? at_failed=false
13434$at_check_filter
13435at_fn_diff_devnull "$at_stderr" || at_failed=:
13436echo >>"$at_stdout"; $as_echo "testdir/
13437testdir/file2
13438SUB 1
13439testdir/
13440testdir/file2
13441SUB 2
13442testdir/
13443testdir/file1.txt
13444testdir/file2
13445SUB 3
13446file1.txt
13447SUB 4
13448file1.txt
13449testdir/file1.txt
13450SUB 5
13451file1.txt
13452" | \
13453  $at_diff - "$at_stdout" || at_failed=:
13454at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
13455$at_failed && at_fn_log_failure
13456$at_traceon; }
13457
13458              { set +x
13459$as_echo "$at_srcdir/exclude02.at:22:
13460mkdir ustar
13461(cd ustar
13462TEST_TAR_FORMAT=ustar
13463export TEST_TAR_FORMAT
13464TAR_OPTIONS=\"-H ustar\"
13465export TAR_OPTIONS
13466rm -rf *
13467
13468
13469test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13470
13471
13472rm -rf testdir
13473mkdir -p testdir
13474touch file1.txt
13475touch testdir/file1.txt
13476touch testdir/file2
13477
13478tar cf archive --exclude=\"file1.txt\" \\
13479               testdir
13480tar tf archive | sort
13481
13482echo \"SUB 1\"
13483tar cf archive --no-anchored \\
13484               --exclude=\"file1.txt\" \\
13485               testdir
13486tar tf archive | sort
13487
13488echo \"SUB 2\"
13489tar cf archive --anchored \\
13490               --exclude=\"file1.txt\" \\
13491               testdir
13492tar tf archive | sort
13493
13494echo \"SUB 3\"
13495tar cf archive testdir file1.txt
13496tar t \"file1.txt\" -f archive | sort
13497
13498echo \"SUB 4\"
13499tar t --no-anchored \"file1.txt\" -f archive | sort
13500
13501echo \"SUB 5\"
13502tar t --anchored \"file1.txt\" -f archive | sort
13503
13504rm -rf testdir file1.txt
13505
13506)"
13507at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
13508( $at_check_trace;
13509mkdir ustar
13510(cd ustar
13511TEST_TAR_FORMAT=ustar
13512export TEST_TAR_FORMAT
13513TAR_OPTIONS="-H ustar"
13514export TAR_OPTIONS
13515rm -rf *
13516
13517
13518test -z "`sort < /dev/null 2>&1`" || exit 77
13519
13520
13521rm -rf testdir
13522mkdir -p testdir
13523touch file1.txt
13524touch testdir/file1.txt
13525touch testdir/file2
13526
13527tar cf archive --exclude="file1.txt" \
13528               testdir
13529tar tf archive | sort
13530
13531echo "SUB 1"
13532tar cf archive --no-anchored \
13533               --exclude="file1.txt" \
13534               testdir
13535tar tf archive | sort
13536
13537echo "SUB 2"
13538tar cf archive --anchored \
13539               --exclude="file1.txt" \
13540               testdir
13541tar tf archive | sort
13542
13543echo "SUB 3"
13544tar cf archive testdir file1.txt
13545tar t "file1.txt" -f archive | sort
13546
13547echo "SUB 4"
13548tar t --no-anchored "file1.txt" -f archive | sort
13549
13550echo "SUB 5"
13551tar t --anchored "file1.txt" -f archive | sort
13552
13553rm -rf testdir file1.txt
13554
13555)
13556) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13557at_status=$? at_failed=false
13558$at_check_filter
13559at_fn_diff_devnull "$at_stderr" || at_failed=:
13560echo >>"$at_stdout"; $as_echo "testdir/
13561testdir/file2
13562SUB 1
13563testdir/
13564testdir/file2
13565SUB 2
13566testdir/
13567testdir/file1.txt
13568testdir/file2
13569SUB 3
13570file1.txt
13571SUB 4
13572file1.txt
13573testdir/file1.txt
13574SUB 5
13575file1.txt
13576" | \
13577  $at_diff - "$at_stdout" || at_failed=:
13578at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
13579$at_failed && at_fn_log_failure
13580$at_traceon; }
13581
13582              { set +x
13583$as_echo "$at_srcdir/exclude02.at:22:
13584mkdir posix
13585(cd posix
13586TEST_TAR_FORMAT=posix
13587export TEST_TAR_FORMAT
13588TAR_OPTIONS=\"-H posix\"
13589export TAR_OPTIONS
13590rm -rf *
13591
13592
13593test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13594
13595
13596rm -rf testdir
13597mkdir -p testdir
13598touch file1.txt
13599touch testdir/file1.txt
13600touch testdir/file2
13601
13602tar cf archive --exclude=\"file1.txt\" \\
13603               testdir
13604tar tf archive | sort
13605
13606echo \"SUB 1\"
13607tar cf archive --no-anchored \\
13608               --exclude=\"file1.txt\" \\
13609               testdir
13610tar tf archive | sort
13611
13612echo \"SUB 2\"
13613tar cf archive --anchored \\
13614               --exclude=\"file1.txt\" \\
13615               testdir
13616tar tf archive | sort
13617
13618echo \"SUB 3\"
13619tar cf archive testdir file1.txt
13620tar t \"file1.txt\" -f archive | sort
13621
13622echo \"SUB 4\"
13623tar t --no-anchored \"file1.txt\" -f archive | sort
13624
13625echo \"SUB 5\"
13626tar t --anchored \"file1.txt\" -f archive | sort
13627
13628rm -rf testdir file1.txt
13629
13630)"
13631at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
13632( $at_check_trace;
13633mkdir posix
13634(cd posix
13635TEST_TAR_FORMAT=posix
13636export TEST_TAR_FORMAT
13637TAR_OPTIONS="-H posix"
13638export TAR_OPTIONS
13639rm -rf *
13640
13641
13642test -z "`sort < /dev/null 2>&1`" || exit 77
13643
13644
13645rm -rf testdir
13646mkdir -p testdir
13647touch file1.txt
13648touch testdir/file1.txt
13649touch testdir/file2
13650
13651tar cf archive --exclude="file1.txt" \
13652               testdir
13653tar tf archive | sort
13654
13655echo "SUB 1"
13656tar cf archive --no-anchored \
13657               --exclude="file1.txt" \
13658               testdir
13659tar tf archive | sort
13660
13661echo "SUB 2"
13662tar cf archive --anchored \
13663               --exclude="file1.txt" \
13664               testdir
13665tar tf archive | sort
13666
13667echo "SUB 3"
13668tar cf archive testdir file1.txt
13669tar t "file1.txt" -f archive | sort
13670
13671echo "SUB 4"
13672tar t --no-anchored "file1.txt" -f archive | sort
13673
13674echo "SUB 5"
13675tar t --anchored "file1.txt" -f archive | sort
13676
13677rm -rf testdir file1.txt
13678
13679)
13680) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13681at_status=$? at_failed=false
13682$at_check_filter
13683at_fn_diff_devnull "$at_stderr" || at_failed=:
13684echo >>"$at_stdout"; $as_echo "testdir/
13685testdir/file2
13686SUB 1
13687testdir/
13688testdir/file2
13689SUB 2
13690testdir/
13691testdir/file1.txt
13692testdir/file2
13693SUB 3
13694file1.txt
13695SUB 4
13696file1.txt
13697testdir/file1.txt
13698SUB 5
13699file1.txt
13700" | \
13701  $at_diff - "$at_stdout" || at_failed=:
13702at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
13703$at_failed && at_fn_log_failure
13704$at_traceon; }
13705
13706              { set +x
13707$as_echo "$at_srcdir/exclude02.at:22:
13708mkdir gnu
13709(cd gnu
13710TEST_TAR_FORMAT=gnu
13711export TEST_TAR_FORMAT
13712TAR_OPTIONS=\"-H gnu\"
13713export TAR_OPTIONS
13714rm -rf *
13715
13716
13717test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13718
13719
13720rm -rf testdir
13721mkdir -p testdir
13722touch file1.txt
13723touch testdir/file1.txt
13724touch testdir/file2
13725
13726tar cf archive --exclude=\"file1.txt\" \\
13727               testdir
13728tar tf archive | sort
13729
13730echo \"SUB 1\"
13731tar cf archive --no-anchored \\
13732               --exclude=\"file1.txt\" \\
13733               testdir
13734tar tf archive | sort
13735
13736echo \"SUB 2\"
13737tar cf archive --anchored \\
13738               --exclude=\"file1.txt\" \\
13739               testdir
13740tar tf archive | sort
13741
13742echo \"SUB 3\"
13743tar cf archive testdir file1.txt
13744tar t \"file1.txt\" -f archive | sort
13745
13746echo \"SUB 4\"
13747tar t --no-anchored \"file1.txt\" -f archive | sort
13748
13749echo \"SUB 5\"
13750tar t --anchored \"file1.txt\" -f archive | sort
13751
13752rm -rf testdir file1.txt
13753
13754)"
13755at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
13756( $at_check_trace;
13757mkdir gnu
13758(cd gnu
13759TEST_TAR_FORMAT=gnu
13760export TEST_TAR_FORMAT
13761TAR_OPTIONS="-H gnu"
13762export TAR_OPTIONS
13763rm -rf *
13764
13765
13766test -z "`sort < /dev/null 2>&1`" || exit 77
13767
13768
13769rm -rf testdir
13770mkdir -p testdir
13771touch file1.txt
13772touch testdir/file1.txt
13773touch testdir/file2
13774
13775tar cf archive --exclude="file1.txt" \
13776               testdir
13777tar tf archive | sort
13778
13779echo "SUB 1"
13780tar cf archive --no-anchored \
13781               --exclude="file1.txt" \
13782               testdir
13783tar tf archive | sort
13784
13785echo "SUB 2"
13786tar cf archive --anchored \
13787               --exclude="file1.txt" \
13788               testdir
13789tar tf archive | sort
13790
13791echo "SUB 3"
13792tar cf archive testdir file1.txt
13793tar t "file1.txt" -f archive | sort
13794
13795echo "SUB 4"
13796tar t --no-anchored "file1.txt" -f archive | sort
13797
13798echo "SUB 5"
13799tar t --anchored "file1.txt" -f archive | sort
13800
13801rm -rf testdir file1.txt
13802
13803)
13804) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13805at_status=$? at_failed=false
13806$at_check_filter
13807at_fn_diff_devnull "$at_stderr" || at_failed=:
13808echo >>"$at_stdout"; $as_echo "testdir/
13809testdir/file2
13810SUB 1
13811testdir/
13812testdir/file2
13813SUB 2
13814testdir/
13815testdir/file1.txt
13816testdir/file2
13817SUB 3
13818file1.txt
13819SUB 4
13820file1.txt
13821testdir/file1.txt
13822SUB 5
13823file1.txt
13824" | \
13825  $at_diff - "$at_stdout" || at_failed=:
13826at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
13827$at_failed && at_fn_log_failure
13828$at_traceon; }
13829
13830
13831
13832
13833  set +x
13834  $at_times_p && times >"$at_times_file"
13835) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13836read at_status <"$at_status_file"
13837#AT_STOP_61
13838#AT_START_62
13839at_fn_group_banner 62 'exclude03.at:19' \
13840  "exclude: wildcards match slash" "                 " 11
13841at_xfail=no
13842      test -f $XFAILFILE && at_xfail=yes
13843(
13844  $as_echo "62. $at_setup_line: testing $at_desc ..."
13845  $at_traceon
13846
13847
13848
13849
13850
13851  { set +x
13852$as_echo "$at_srcdir/exclude03.at:22:
13853mkdir v7
13854(cd v7
13855TEST_TAR_FORMAT=v7
13856export TEST_TAR_FORMAT
13857TAR_OPTIONS=\"-H v7\"
13858export TAR_OPTIONS
13859rm -rf *
13860
13861
13862test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13863
13864
13865rm -rf testdir
13866mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
13867touch testdir/\\*f\\*1
13868touch testdir/dir1/file1
13869touch testdir/dir1/\\*
13870touch testdir/dir2/file2
13871touch testdir/dir2/\\*
13872touch testdir/dir3/file3
13873touch testdir/dir3/\\*
13874
13875tar cf archive --exclude='testdir*f*1' \\
13876               --no-wildcards-match-slash \\
13877               --exclude='testdir*f*2' \\
13878               --wildcards-match-slash \\
13879               --exclude='testdir*f*3' \\
13880               testdir
13881tar tf archive | sort
13882
13883echo \"NEXT\"
13884tar cf archive testdir
13885tar t --wildcards 'testdir/*f*1' -f archive | sort
13886
13887echo \"NEXT\"
13888tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
13889
13890echo \"NEXT\"
13891tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
13892
13893rm -rf testdir
13894
13895)"
13896at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
13897( $at_check_trace;
13898mkdir v7
13899(cd v7
13900TEST_TAR_FORMAT=v7
13901export TEST_TAR_FORMAT
13902TAR_OPTIONS="-H v7"
13903export TAR_OPTIONS
13904rm -rf *
13905
13906
13907test -z "`sort < /dev/null 2>&1`" || exit 77
13908
13909
13910rm -rf testdir
13911mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
13912touch testdir/\*f\*1
13913touch testdir/dir1/file1
13914touch testdir/dir1/\*
13915touch testdir/dir2/file2
13916touch testdir/dir2/\*
13917touch testdir/dir3/file3
13918touch testdir/dir3/\*
13919
13920tar cf archive --exclude='testdir*f*1' \
13921               --no-wildcards-match-slash \
13922               --exclude='testdir*f*2' \
13923               --wildcards-match-slash \
13924               --exclude='testdir*f*3' \
13925               testdir
13926tar tf archive | sort
13927
13928echo "NEXT"
13929tar cf archive testdir
13930tar t --wildcards 'testdir/*f*1' -f archive | sort
13931
13932echo "NEXT"
13933tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
13934
13935echo "NEXT"
13936tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
13937
13938rm -rf testdir
13939
13940)
13941) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13942at_status=$? at_failed=false
13943$at_check_filter
13944at_fn_diff_devnull "$at_stderr" || at_failed=:
13945echo >>"$at_stdout"; $as_echo "testdir/
13946testdir/dir1/
13947testdir/dir1/*
13948testdir/dir2/
13949testdir/dir2/*
13950testdir/dir2/file2
13951testdir/dir3/
13952testdir/dir3/*
13953NEXT
13954testdir/*f*1
13955testdir/dir1/file1
13956NEXT
13957testdir/*f*1
13958NEXT
13959testdir/*f*1
13960testdir/dir1/file1
13961" | \
13962  $at_diff - "$at_stdout" || at_failed=:
13963at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
13964$at_failed && at_fn_log_failure
13965$at_traceon; }
13966
13967              { set +x
13968$as_echo "$at_srcdir/exclude03.at:22:
13969mkdir oldgnu
13970(cd oldgnu
13971TEST_TAR_FORMAT=oldgnu
13972export TEST_TAR_FORMAT
13973TAR_OPTIONS=\"-H oldgnu\"
13974export TAR_OPTIONS
13975rm -rf *
13976
13977
13978test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13979
13980
13981rm -rf testdir
13982mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
13983touch testdir/\\*f\\*1
13984touch testdir/dir1/file1
13985touch testdir/dir1/\\*
13986touch testdir/dir2/file2
13987touch testdir/dir2/\\*
13988touch testdir/dir3/file3
13989touch testdir/dir3/\\*
13990
13991tar cf archive --exclude='testdir*f*1' \\
13992               --no-wildcards-match-slash \\
13993               --exclude='testdir*f*2' \\
13994               --wildcards-match-slash \\
13995               --exclude='testdir*f*3' \\
13996               testdir
13997tar tf archive | sort
13998
13999echo \"NEXT\"
14000tar cf archive testdir
14001tar t --wildcards 'testdir/*f*1' -f archive | sort
14002
14003echo \"NEXT\"
14004tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
14005
14006echo \"NEXT\"
14007tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
14008
14009rm -rf testdir
14010
14011)"
14012at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
14013( $at_check_trace;
14014mkdir oldgnu
14015(cd oldgnu
14016TEST_TAR_FORMAT=oldgnu
14017export TEST_TAR_FORMAT
14018TAR_OPTIONS="-H oldgnu"
14019export TAR_OPTIONS
14020rm -rf *
14021
14022
14023test -z "`sort < /dev/null 2>&1`" || exit 77
14024
14025
14026rm -rf testdir
14027mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
14028touch testdir/\*f\*1
14029touch testdir/dir1/file1
14030touch testdir/dir1/\*
14031touch testdir/dir2/file2
14032touch testdir/dir2/\*
14033touch testdir/dir3/file3
14034touch testdir/dir3/\*
14035
14036tar cf archive --exclude='testdir*f*1' \
14037               --no-wildcards-match-slash \
14038               --exclude='testdir*f*2' \
14039               --wildcards-match-slash \
14040               --exclude='testdir*f*3' \
14041               testdir
14042tar tf archive | sort
14043
14044echo "NEXT"
14045tar cf archive testdir
14046tar t --wildcards 'testdir/*f*1' -f archive | sort
14047
14048echo "NEXT"
14049tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
14050
14051echo "NEXT"
14052tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
14053
14054rm -rf testdir
14055
14056)
14057) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14058at_status=$? at_failed=false
14059$at_check_filter
14060at_fn_diff_devnull "$at_stderr" || at_failed=:
14061echo >>"$at_stdout"; $as_echo "testdir/
14062testdir/dir1/
14063testdir/dir1/*
14064testdir/dir2/
14065testdir/dir2/*
14066testdir/dir2/file2
14067testdir/dir3/
14068testdir/dir3/*
14069NEXT
14070testdir/*f*1
14071testdir/dir1/file1
14072NEXT
14073testdir/*f*1
14074NEXT
14075testdir/*f*1
14076testdir/dir1/file1
14077" | \
14078  $at_diff - "$at_stdout" || at_failed=:
14079at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
14080$at_failed && at_fn_log_failure
14081$at_traceon; }
14082
14083              { set +x
14084$as_echo "$at_srcdir/exclude03.at:22:
14085mkdir ustar
14086(cd ustar
14087TEST_TAR_FORMAT=ustar
14088export TEST_TAR_FORMAT
14089TAR_OPTIONS=\"-H ustar\"
14090export TAR_OPTIONS
14091rm -rf *
14092
14093
14094test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14095
14096
14097rm -rf testdir
14098mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
14099touch testdir/\\*f\\*1
14100touch testdir/dir1/file1
14101touch testdir/dir1/\\*
14102touch testdir/dir2/file2
14103touch testdir/dir2/\\*
14104touch testdir/dir3/file3
14105touch testdir/dir3/\\*
14106
14107tar cf archive --exclude='testdir*f*1' \\
14108               --no-wildcards-match-slash \\
14109               --exclude='testdir*f*2' \\
14110               --wildcards-match-slash \\
14111               --exclude='testdir*f*3' \\
14112               testdir
14113tar tf archive | sort
14114
14115echo \"NEXT\"
14116tar cf archive testdir
14117tar t --wildcards 'testdir/*f*1' -f archive | sort
14118
14119echo \"NEXT\"
14120tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
14121
14122echo \"NEXT\"
14123tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
14124
14125rm -rf testdir
14126
14127)"
14128at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
14129( $at_check_trace;
14130mkdir ustar
14131(cd ustar
14132TEST_TAR_FORMAT=ustar
14133export TEST_TAR_FORMAT
14134TAR_OPTIONS="-H ustar"
14135export TAR_OPTIONS
14136rm -rf *
14137
14138
14139test -z "`sort < /dev/null 2>&1`" || exit 77
14140
14141
14142rm -rf testdir
14143mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
14144touch testdir/\*f\*1
14145touch testdir/dir1/file1
14146touch testdir/dir1/\*
14147touch testdir/dir2/file2
14148touch testdir/dir2/\*
14149touch testdir/dir3/file3
14150touch testdir/dir3/\*
14151
14152tar cf archive --exclude='testdir*f*1' \
14153               --no-wildcards-match-slash \
14154               --exclude='testdir*f*2' \
14155               --wildcards-match-slash \
14156               --exclude='testdir*f*3' \
14157               testdir
14158tar tf archive | sort
14159
14160echo "NEXT"
14161tar cf archive testdir
14162tar t --wildcards 'testdir/*f*1' -f archive | sort
14163
14164echo "NEXT"
14165tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
14166
14167echo "NEXT"
14168tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
14169
14170rm -rf testdir
14171
14172)
14173) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14174at_status=$? at_failed=false
14175$at_check_filter
14176at_fn_diff_devnull "$at_stderr" || at_failed=:
14177echo >>"$at_stdout"; $as_echo "testdir/
14178testdir/dir1/
14179testdir/dir1/*
14180testdir/dir2/
14181testdir/dir2/*
14182testdir/dir2/file2
14183testdir/dir3/
14184testdir/dir3/*
14185NEXT
14186testdir/*f*1
14187testdir/dir1/file1
14188NEXT
14189testdir/*f*1
14190NEXT
14191testdir/*f*1
14192testdir/dir1/file1
14193" | \
14194  $at_diff - "$at_stdout" || at_failed=:
14195at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
14196$at_failed && at_fn_log_failure
14197$at_traceon; }
14198
14199              { set +x
14200$as_echo "$at_srcdir/exclude03.at:22:
14201mkdir posix
14202(cd posix
14203TEST_TAR_FORMAT=posix
14204export TEST_TAR_FORMAT
14205TAR_OPTIONS=\"-H posix\"
14206export TAR_OPTIONS
14207rm -rf *
14208
14209
14210test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14211
14212
14213rm -rf testdir
14214mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
14215touch testdir/\\*f\\*1
14216touch testdir/dir1/file1
14217touch testdir/dir1/\\*
14218touch testdir/dir2/file2
14219touch testdir/dir2/\\*
14220touch testdir/dir3/file3
14221touch testdir/dir3/\\*
14222
14223tar cf archive --exclude='testdir*f*1' \\
14224               --no-wildcards-match-slash \\
14225               --exclude='testdir*f*2' \\
14226               --wildcards-match-slash \\
14227               --exclude='testdir*f*3' \\
14228               testdir
14229tar tf archive | sort
14230
14231echo \"NEXT\"
14232tar cf archive testdir
14233tar t --wildcards 'testdir/*f*1' -f archive | sort
14234
14235echo \"NEXT\"
14236tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
14237
14238echo \"NEXT\"
14239tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
14240
14241rm -rf testdir
14242
14243)"
14244at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
14245( $at_check_trace;
14246mkdir posix
14247(cd posix
14248TEST_TAR_FORMAT=posix
14249export TEST_TAR_FORMAT
14250TAR_OPTIONS="-H posix"
14251export TAR_OPTIONS
14252rm -rf *
14253
14254
14255test -z "`sort < /dev/null 2>&1`" || exit 77
14256
14257
14258rm -rf testdir
14259mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
14260touch testdir/\*f\*1
14261touch testdir/dir1/file1
14262touch testdir/dir1/\*
14263touch testdir/dir2/file2
14264touch testdir/dir2/\*
14265touch testdir/dir3/file3
14266touch testdir/dir3/\*
14267
14268tar cf archive --exclude='testdir*f*1' \
14269               --no-wildcards-match-slash \
14270               --exclude='testdir*f*2' \
14271               --wildcards-match-slash \
14272               --exclude='testdir*f*3' \
14273               testdir
14274tar tf archive | sort
14275
14276echo "NEXT"
14277tar cf archive testdir
14278tar t --wildcards 'testdir/*f*1' -f archive | sort
14279
14280echo "NEXT"
14281tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
14282
14283echo "NEXT"
14284tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
14285
14286rm -rf testdir
14287
14288)
14289) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14290at_status=$? at_failed=false
14291$at_check_filter
14292at_fn_diff_devnull "$at_stderr" || at_failed=:
14293echo >>"$at_stdout"; $as_echo "testdir/
14294testdir/dir1/
14295testdir/dir1/*
14296testdir/dir2/
14297testdir/dir2/*
14298testdir/dir2/file2
14299testdir/dir3/
14300testdir/dir3/*
14301NEXT
14302testdir/*f*1
14303testdir/dir1/file1
14304NEXT
14305testdir/*f*1
14306NEXT
14307testdir/*f*1
14308testdir/dir1/file1
14309" | \
14310  $at_diff - "$at_stdout" || at_failed=:
14311at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
14312$at_failed && at_fn_log_failure
14313$at_traceon; }
14314
14315              { set +x
14316$as_echo "$at_srcdir/exclude03.at:22:
14317mkdir gnu
14318(cd gnu
14319TEST_TAR_FORMAT=gnu
14320export TEST_TAR_FORMAT
14321TAR_OPTIONS=\"-H gnu\"
14322export TAR_OPTIONS
14323rm -rf *
14324
14325
14326test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14327
14328
14329rm -rf testdir
14330mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
14331touch testdir/\\*f\\*1
14332touch testdir/dir1/file1
14333touch testdir/dir1/\\*
14334touch testdir/dir2/file2
14335touch testdir/dir2/\\*
14336touch testdir/dir3/file3
14337touch testdir/dir3/\\*
14338
14339tar cf archive --exclude='testdir*f*1' \\
14340               --no-wildcards-match-slash \\
14341               --exclude='testdir*f*2' \\
14342               --wildcards-match-slash \\
14343               --exclude='testdir*f*3' \\
14344               testdir
14345tar tf archive | sort
14346
14347echo \"NEXT\"
14348tar cf archive testdir
14349tar t --wildcards 'testdir/*f*1' -f archive | sort
14350
14351echo \"NEXT\"
14352tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
14353
14354echo \"NEXT\"
14355tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
14356
14357rm -rf testdir
14358
14359)"
14360at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
14361( $at_check_trace;
14362mkdir gnu
14363(cd gnu
14364TEST_TAR_FORMAT=gnu
14365export TEST_TAR_FORMAT
14366TAR_OPTIONS="-H gnu"
14367export TAR_OPTIONS
14368rm -rf *
14369
14370
14371test -z "`sort < /dev/null 2>&1`" || exit 77
14372
14373
14374rm -rf testdir
14375mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
14376touch testdir/\*f\*1
14377touch testdir/dir1/file1
14378touch testdir/dir1/\*
14379touch testdir/dir2/file2
14380touch testdir/dir2/\*
14381touch testdir/dir3/file3
14382touch testdir/dir3/\*
14383
14384tar cf archive --exclude='testdir*f*1' \
14385               --no-wildcards-match-slash \
14386               --exclude='testdir*f*2' \
14387               --wildcards-match-slash \
14388               --exclude='testdir*f*3' \
14389               testdir
14390tar tf archive | sort
14391
14392echo "NEXT"
14393tar cf archive testdir
14394tar t --wildcards 'testdir/*f*1' -f archive | sort
14395
14396echo "NEXT"
14397tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
14398
14399echo "NEXT"
14400tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
14401
14402rm -rf testdir
14403
14404)
14405) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14406at_status=$? at_failed=false
14407$at_check_filter
14408at_fn_diff_devnull "$at_stderr" || at_failed=:
14409echo >>"$at_stdout"; $as_echo "testdir/
14410testdir/dir1/
14411testdir/dir1/*
14412testdir/dir2/
14413testdir/dir2/*
14414testdir/dir2/file2
14415testdir/dir3/
14416testdir/dir3/*
14417NEXT
14418testdir/*f*1
14419testdir/dir1/file1
14420NEXT
14421testdir/*f*1
14422NEXT
14423testdir/*f*1
14424testdir/dir1/file1
14425" | \
14426  $at_diff - "$at_stdout" || at_failed=:
14427at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
14428$at_failed && at_fn_log_failure
14429$at_traceon; }
14430
14431
14432
14433
14434  set +x
14435  $at_times_p && times >"$at_times_file"
14436) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14437read at_status <"$at_status_file"
14438#AT_STOP_62
14439#AT_START_63
14440at_fn_group_banner 63 'exclude04.at:19' \
14441  "exclude: case insensitive" "                      " 11
14442at_xfail=no
14443      test -f $XFAILFILE && at_xfail=yes
14444(
14445  $as_echo "63. $at_setup_line: testing $at_desc ..."
14446  $at_traceon
14447
14448
14449
14450
14451
14452  { set +x
14453$as_echo "$at_srcdir/exclude04.at:22:
14454mkdir v7
14455(cd v7
14456TEST_TAR_FORMAT=v7
14457export TEST_TAR_FORMAT
14458TAR_OPTIONS=\"-H v7\"
14459export TAR_OPTIONS
14460rm -rf *
14461
14462
14463test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14464
14465
14466rm -rf testdir
14467mkdir -p testdir/dir
14468touch testdir/file1
14469touch testdir/file2
14470touch testdir/file3
14471touch testdir/file4
14472touch testdir/dir/File1
14473touch testdir/dir/File2
14474touch testdir/dir/File3
14475touch testdir/dir/File4
14476
14477tar cf archive --exclude=FILE2 \\
14478               --exclude=file1 \\
14479               --ignore-case \\
14480               --exclude=file3 \\
14481               --no-ignore-case \\
14482               --exclude=FILE2 \\
14483               --exclude=file4 \\
14484               testdir
14485tar tf archive | sort
14486
14487echo \"SUB 1\"
14488tar cf archive testdir
14489tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14490
14491echo \"SUB 2\"
14492tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14493
14494echo \"SUB 3\"
14495tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14496
14497rm -rf testdir
14498
14499)"
14500at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
14501( $at_check_trace;
14502mkdir v7
14503(cd v7
14504TEST_TAR_FORMAT=v7
14505export TEST_TAR_FORMAT
14506TAR_OPTIONS="-H v7"
14507export TAR_OPTIONS
14508rm -rf *
14509
14510
14511test -z "`sort < /dev/null 2>&1`" || exit 77
14512
14513
14514rm -rf testdir
14515mkdir -p testdir/dir
14516touch testdir/file1
14517touch testdir/file2
14518touch testdir/file3
14519touch testdir/file4
14520touch testdir/dir/File1
14521touch testdir/dir/File2
14522touch testdir/dir/File3
14523touch testdir/dir/File4
14524
14525tar cf archive --exclude=FILE2 \
14526               --exclude=file1 \
14527               --ignore-case \
14528               --exclude=file3 \
14529               --no-ignore-case \
14530               --exclude=FILE2 \
14531               --exclude=file4 \
14532               testdir
14533tar tf archive | sort
14534
14535echo "SUB 1"
14536tar cf archive testdir
14537tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14538
14539echo "SUB 2"
14540tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14541
14542echo "SUB 3"
14543tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14544
14545rm -rf testdir
14546
14547)
14548) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14549at_status=$? at_failed=false
14550$at_check_filter
14551at_fn_diff_devnull "$at_stderr" || at_failed=:
14552echo >>"$at_stdout"; $as_echo "testdir/
14553testdir/dir/
14554testdir/dir/File1
14555testdir/dir/File2
14556testdir/dir/File4
14557testdir/file2
14558SUB 1
14559testdir/dir/File2
14560SUB 2
14561testdir/dir/File2
14562testdir/file2
14563SUB 3
14564testdir/dir/File2
14565" | \
14566  $at_diff - "$at_stdout" || at_failed=:
14567at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
14568$at_failed && at_fn_log_failure
14569$at_traceon; }
14570
14571              { set +x
14572$as_echo "$at_srcdir/exclude04.at:22:
14573mkdir oldgnu
14574(cd oldgnu
14575TEST_TAR_FORMAT=oldgnu
14576export TEST_TAR_FORMAT
14577TAR_OPTIONS=\"-H oldgnu\"
14578export TAR_OPTIONS
14579rm -rf *
14580
14581
14582test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14583
14584
14585rm -rf testdir
14586mkdir -p testdir/dir
14587touch testdir/file1
14588touch testdir/file2
14589touch testdir/file3
14590touch testdir/file4
14591touch testdir/dir/File1
14592touch testdir/dir/File2
14593touch testdir/dir/File3
14594touch testdir/dir/File4
14595
14596tar cf archive --exclude=FILE2 \\
14597               --exclude=file1 \\
14598               --ignore-case \\
14599               --exclude=file3 \\
14600               --no-ignore-case \\
14601               --exclude=FILE2 \\
14602               --exclude=file4 \\
14603               testdir
14604tar tf archive | sort
14605
14606echo \"SUB 1\"
14607tar cf archive testdir
14608tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14609
14610echo \"SUB 2\"
14611tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14612
14613echo \"SUB 3\"
14614tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14615
14616rm -rf testdir
14617
14618)"
14619at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
14620( $at_check_trace;
14621mkdir oldgnu
14622(cd oldgnu
14623TEST_TAR_FORMAT=oldgnu
14624export TEST_TAR_FORMAT
14625TAR_OPTIONS="-H oldgnu"
14626export TAR_OPTIONS
14627rm -rf *
14628
14629
14630test -z "`sort < /dev/null 2>&1`" || exit 77
14631
14632
14633rm -rf testdir
14634mkdir -p testdir/dir
14635touch testdir/file1
14636touch testdir/file2
14637touch testdir/file3
14638touch testdir/file4
14639touch testdir/dir/File1
14640touch testdir/dir/File2
14641touch testdir/dir/File3
14642touch testdir/dir/File4
14643
14644tar cf archive --exclude=FILE2 \
14645               --exclude=file1 \
14646               --ignore-case \
14647               --exclude=file3 \
14648               --no-ignore-case \
14649               --exclude=FILE2 \
14650               --exclude=file4 \
14651               testdir
14652tar tf archive | sort
14653
14654echo "SUB 1"
14655tar cf archive testdir
14656tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14657
14658echo "SUB 2"
14659tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14660
14661echo "SUB 3"
14662tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14663
14664rm -rf testdir
14665
14666)
14667) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14668at_status=$? at_failed=false
14669$at_check_filter
14670at_fn_diff_devnull "$at_stderr" || at_failed=:
14671echo >>"$at_stdout"; $as_echo "testdir/
14672testdir/dir/
14673testdir/dir/File1
14674testdir/dir/File2
14675testdir/dir/File4
14676testdir/file2
14677SUB 1
14678testdir/dir/File2
14679SUB 2
14680testdir/dir/File2
14681testdir/file2
14682SUB 3
14683testdir/dir/File2
14684" | \
14685  $at_diff - "$at_stdout" || at_failed=:
14686at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
14687$at_failed && at_fn_log_failure
14688$at_traceon; }
14689
14690              { set +x
14691$as_echo "$at_srcdir/exclude04.at:22:
14692mkdir ustar
14693(cd ustar
14694TEST_TAR_FORMAT=ustar
14695export TEST_TAR_FORMAT
14696TAR_OPTIONS=\"-H ustar\"
14697export TAR_OPTIONS
14698rm -rf *
14699
14700
14701test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14702
14703
14704rm -rf testdir
14705mkdir -p testdir/dir
14706touch testdir/file1
14707touch testdir/file2
14708touch testdir/file3
14709touch testdir/file4
14710touch testdir/dir/File1
14711touch testdir/dir/File2
14712touch testdir/dir/File3
14713touch testdir/dir/File4
14714
14715tar cf archive --exclude=FILE2 \\
14716               --exclude=file1 \\
14717               --ignore-case \\
14718               --exclude=file3 \\
14719               --no-ignore-case \\
14720               --exclude=FILE2 \\
14721               --exclude=file4 \\
14722               testdir
14723tar tf archive | sort
14724
14725echo \"SUB 1\"
14726tar cf archive testdir
14727tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14728
14729echo \"SUB 2\"
14730tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14731
14732echo \"SUB 3\"
14733tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14734
14735rm -rf testdir
14736
14737)"
14738at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
14739( $at_check_trace;
14740mkdir ustar
14741(cd ustar
14742TEST_TAR_FORMAT=ustar
14743export TEST_TAR_FORMAT
14744TAR_OPTIONS="-H ustar"
14745export TAR_OPTIONS
14746rm -rf *
14747
14748
14749test -z "`sort < /dev/null 2>&1`" || exit 77
14750
14751
14752rm -rf testdir
14753mkdir -p testdir/dir
14754touch testdir/file1
14755touch testdir/file2
14756touch testdir/file3
14757touch testdir/file4
14758touch testdir/dir/File1
14759touch testdir/dir/File2
14760touch testdir/dir/File3
14761touch testdir/dir/File4
14762
14763tar cf archive --exclude=FILE2 \
14764               --exclude=file1 \
14765               --ignore-case \
14766               --exclude=file3 \
14767               --no-ignore-case \
14768               --exclude=FILE2 \
14769               --exclude=file4 \
14770               testdir
14771tar tf archive | sort
14772
14773echo "SUB 1"
14774tar cf archive testdir
14775tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14776
14777echo "SUB 2"
14778tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14779
14780echo "SUB 3"
14781tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14782
14783rm -rf testdir
14784
14785)
14786) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14787at_status=$? at_failed=false
14788$at_check_filter
14789at_fn_diff_devnull "$at_stderr" || at_failed=:
14790echo >>"$at_stdout"; $as_echo "testdir/
14791testdir/dir/
14792testdir/dir/File1
14793testdir/dir/File2
14794testdir/dir/File4
14795testdir/file2
14796SUB 1
14797testdir/dir/File2
14798SUB 2
14799testdir/dir/File2
14800testdir/file2
14801SUB 3
14802testdir/dir/File2
14803" | \
14804  $at_diff - "$at_stdout" || at_failed=:
14805at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
14806$at_failed && at_fn_log_failure
14807$at_traceon; }
14808
14809              { set +x
14810$as_echo "$at_srcdir/exclude04.at:22:
14811mkdir posix
14812(cd posix
14813TEST_TAR_FORMAT=posix
14814export TEST_TAR_FORMAT
14815TAR_OPTIONS=\"-H posix\"
14816export TAR_OPTIONS
14817rm -rf *
14818
14819
14820test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14821
14822
14823rm -rf testdir
14824mkdir -p testdir/dir
14825touch testdir/file1
14826touch testdir/file2
14827touch testdir/file3
14828touch testdir/file4
14829touch testdir/dir/File1
14830touch testdir/dir/File2
14831touch testdir/dir/File3
14832touch testdir/dir/File4
14833
14834tar cf archive --exclude=FILE2 \\
14835               --exclude=file1 \\
14836               --ignore-case \\
14837               --exclude=file3 \\
14838               --no-ignore-case \\
14839               --exclude=FILE2 \\
14840               --exclude=file4 \\
14841               testdir
14842tar tf archive | sort
14843
14844echo \"SUB 1\"
14845tar cf archive testdir
14846tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14847
14848echo \"SUB 2\"
14849tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14850
14851echo \"SUB 3\"
14852tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14853
14854rm -rf testdir
14855
14856)"
14857at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
14858( $at_check_trace;
14859mkdir posix
14860(cd posix
14861TEST_TAR_FORMAT=posix
14862export TEST_TAR_FORMAT
14863TAR_OPTIONS="-H posix"
14864export TAR_OPTIONS
14865rm -rf *
14866
14867
14868test -z "`sort < /dev/null 2>&1`" || exit 77
14869
14870
14871rm -rf testdir
14872mkdir -p testdir/dir
14873touch testdir/file1
14874touch testdir/file2
14875touch testdir/file3
14876touch testdir/file4
14877touch testdir/dir/File1
14878touch testdir/dir/File2
14879touch testdir/dir/File3
14880touch testdir/dir/File4
14881
14882tar cf archive --exclude=FILE2 \
14883               --exclude=file1 \
14884               --ignore-case \
14885               --exclude=file3 \
14886               --no-ignore-case \
14887               --exclude=FILE2 \
14888               --exclude=file4 \
14889               testdir
14890tar tf archive | sort
14891
14892echo "SUB 1"
14893tar cf archive testdir
14894tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14895
14896echo "SUB 2"
14897tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14898
14899echo "SUB 3"
14900tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14901
14902rm -rf testdir
14903
14904)
14905) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14906at_status=$? at_failed=false
14907$at_check_filter
14908at_fn_diff_devnull "$at_stderr" || at_failed=:
14909echo >>"$at_stdout"; $as_echo "testdir/
14910testdir/dir/
14911testdir/dir/File1
14912testdir/dir/File2
14913testdir/dir/File4
14914testdir/file2
14915SUB 1
14916testdir/dir/File2
14917SUB 2
14918testdir/dir/File2
14919testdir/file2
14920SUB 3
14921testdir/dir/File2
14922" | \
14923  $at_diff - "$at_stdout" || at_failed=:
14924at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
14925$at_failed && at_fn_log_failure
14926$at_traceon; }
14927
14928              { set +x
14929$as_echo "$at_srcdir/exclude04.at:22:
14930mkdir gnu
14931(cd gnu
14932TEST_TAR_FORMAT=gnu
14933export TEST_TAR_FORMAT
14934TAR_OPTIONS=\"-H gnu\"
14935export TAR_OPTIONS
14936rm -rf *
14937
14938
14939test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14940
14941
14942rm -rf testdir
14943mkdir -p testdir/dir
14944touch testdir/file1
14945touch testdir/file2
14946touch testdir/file3
14947touch testdir/file4
14948touch testdir/dir/File1
14949touch testdir/dir/File2
14950touch testdir/dir/File3
14951touch testdir/dir/File4
14952
14953tar cf archive --exclude=FILE2 \\
14954               --exclude=file1 \\
14955               --ignore-case \\
14956               --exclude=file3 \\
14957               --no-ignore-case \\
14958               --exclude=FILE2 \\
14959               --exclude=file4 \\
14960               testdir
14961tar tf archive | sort
14962
14963echo \"SUB 1\"
14964tar cf archive testdir
14965tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
14966
14967echo \"SUB 2\"
14968tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
14969
14970echo \"SUB 3\"
14971tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
14972
14973rm -rf testdir
14974
14975)"
14976at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
14977( $at_check_trace;
14978mkdir gnu
14979(cd gnu
14980TEST_TAR_FORMAT=gnu
14981export TEST_TAR_FORMAT
14982TAR_OPTIONS="-H gnu"
14983export TAR_OPTIONS
14984rm -rf *
14985
14986
14987test -z "`sort < /dev/null 2>&1`" || exit 77
14988
14989
14990rm -rf testdir
14991mkdir -p testdir/dir
14992touch testdir/file1
14993touch testdir/file2
14994touch testdir/file3
14995touch testdir/file4
14996touch testdir/dir/File1
14997touch testdir/dir/File2
14998touch testdir/dir/File3
14999touch testdir/dir/File4
15000
15001tar cf archive --exclude=FILE2 \
15002               --exclude=file1 \
15003               --ignore-case \
15004               --exclude=file3 \
15005               --no-ignore-case \
15006               --exclude=FILE2 \
15007               --exclude=file4 \
15008               testdir
15009tar tf archive | sort
15010
15011echo "SUB 1"
15012tar cf archive testdir
15013tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
15014
15015echo "SUB 2"
15016tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
15017
15018echo "SUB 3"
15019tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
15020
15021rm -rf testdir
15022
15023)
15024) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15025at_status=$? at_failed=false
15026$at_check_filter
15027at_fn_diff_devnull "$at_stderr" || at_failed=:
15028echo >>"$at_stdout"; $as_echo "testdir/
15029testdir/dir/
15030testdir/dir/File1
15031testdir/dir/File2
15032testdir/dir/File4
15033testdir/file2
15034SUB 1
15035testdir/dir/File2
15036SUB 2
15037testdir/dir/File2
15038testdir/file2
15039SUB 3
15040testdir/dir/File2
15041" | \
15042  $at_diff - "$at_stdout" || at_failed=:
15043at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
15044$at_failed && at_fn_log_failure
15045$at_traceon; }
15046
15047
15048
15049
15050  set +x
15051  $at_times_p && times >"$at_times_file"
15052) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15053read at_status <"$at_status_file"
15054#AT_STOP_63
15055#AT_START_64
15056at_fn_group_banner 64 'exclude05.at:21' \
15057  "exclude: lots of excludes" "                      " 11
15058at_xfail=no
15059      test -f $XFAILFILE && at_xfail=yes
15060(
15061  $as_echo "64. $at_setup_line: testing $at_desc ..."
15062  $at_traceon
15063
15064
15065
15066
15067
15068  { set +x
15069$as_echo "$at_srcdir/exclude05.at:24:
15070mkdir v7
15071(cd v7
15072TEST_TAR_FORMAT=v7
15073export TEST_TAR_FORMAT
15074TAR_OPTIONS=\"-H v7\"
15075export TAR_OPTIONS
15076rm -rf *
15077
15078
15079test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15080
15081
15082rm -rf testdir exclfile
15083mkdir -p testdir
15084awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
15085 while read name
15086 do
15087   genfile --file \$name
15088 done
15089
15090awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
15091
15092tar cf archive --anchored --exclude-from=exclfile \\
15093               testdir
15094tar tf archive | sort
15095
15096echo \"NEXT\"
15097tar cf archive --exclude-from=exclfile \\
15098               testdir
15099tar tf archive | sort
15100
15101rm -rf testdir exclfile
15102
15103)"
15104at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
15105( $at_check_trace;
15106mkdir v7
15107(cd v7
15108TEST_TAR_FORMAT=v7
15109export TEST_TAR_FORMAT
15110TAR_OPTIONS="-H v7"
15111export TAR_OPTIONS
15112rm -rf *
15113
15114
15115test -z "`sort < /dev/null 2>&1`" || exit 77
15116
15117
15118rm -rf testdir exclfile
15119mkdir -p testdir
15120awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
15121 while read name
15122 do
15123   genfile --file $name
15124 done
15125
15126awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
15127
15128tar cf archive --anchored --exclude-from=exclfile \
15129               testdir
15130tar tf archive | sort
15131
15132echo "NEXT"
15133tar cf archive --exclude-from=exclfile \
15134               testdir
15135tar tf archive | sort
15136
15137rm -rf testdir exclfile
15138
15139)
15140) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15141at_status=$? at_failed=false
15142$at_check_filter
15143at_fn_diff_devnull "$at_stderr" || at_failed=:
15144echo >>"$at_stdout"; $as_echo "testdir/
15145testdir/file10
15146testdir/file11
15147testdir/file9
15148NEXT
15149testdir/
15150testdir/file10
15151testdir/file11
15152testdir/file9
15153" | \
15154  $at_diff - "$at_stdout" || at_failed=:
15155at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
15156$at_failed && at_fn_log_failure
15157$at_traceon; }
15158
15159              { set +x
15160$as_echo "$at_srcdir/exclude05.at:24:
15161mkdir oldgnu
15162(cd oldgnu
15163TEST_TAR_FORMAT=oldgnu
15164export TEST_TAR_FORMAT
15165TAR_OPTIONS=\"-H oldgnu\"
15166export TAR_OPTIONS
15167rm -rf *
15168
15169
15170test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15171
15172
15173rm -rf testdir exclfile
15174mkdir -p testdir
15175awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
15176 while read name
15177 do
15178   genfile --file \$name
15179 done
15180
15181awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
15182
15183tar cf archive --anchored --exclude-from=exclfile \\
15184               testdir
15185tar tf archive | sort
15186
15187echo \"NEXT\"
15188tar cf archive --exclude-from=exclfile \\
15189               testdir
15190tar tf archive | sort
15191
15192rm -rf testdir exclfile
15193
15194)"
15195at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
15196( $at_check_trace;
15197mkdir oldgnu
15198(cd oldgnu
15199TEST_TAR_FORMAT=oldgnu
15200export TEST_TAR_FORMAT
15201TAR_OPTIONS="-H oldgnu"
15202export TAR_OPTIONS
15203rm -rf *
15204
15205
15206test -z "`sort < /dev/null 2>&1`" || exit 77
15207
15208
15209rm -rf testdir exclfile
15210mkdir -p testdir
15211awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
15212 while read name
15213 do
15214   genfile --file $name
15215 done
15216
15217awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
15218
15219tar cf archive --anchored --exclude-from=exclfile \
15220               testdir
15221tar tf archive | sort
15222
15223echo "NEXT"
15224tar cf archive --exclude-from=exclfile \
15225               testdir
15226tar tf archive | sort
15227
15228rm -rf testdir exclfile
15229
15230)
15231) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15232at_status=$? at_failed=false
15233$at_check_filter
15234at_fn_diff_devnull "$at_stderr" || at_failed=:
15235echo >>"$at_stdout"; $as_echo "testdir/
15236testdir/file10
15237testdir/file11
15238testdir/file9
15239NEXT
15240testdir/
15241testdir/file10
15242testdir/file11
15243testdir/file9
15244" | \
15245  $at_diff - "$at_stdout" || at_failed=:
15246at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
15247$at_failed && at_fn_log_failure
15248$at_traceon; }
15249
15250              { set +x
15251$as_echo "$at_srcdir/exclude05.at:24:
15252mkdir ustar
15253(cd ustar
15254TEST_TAR_FORMAT=ustar
15255export TEST_TAR_FORMAT
15256TAR_OPTIONS=\"-H ustar\"
15257export TAR_OPTIONS
15258rm -rf *
15259
15260
15261test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15262
15263
15264rm -rf testdir exclfile
15265mkdir -p testdir
15266awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
15267 while read name
15268 do
15269   genfile --file \$name
15270 done
15271
15272awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
15273
15274tar cf archive --anchored --exclude-from=exclfile \\
15275               testdir
15276tar tf archive | sort
15277
15278echo \"NEXT\"
15279tar cf archive --exclude-from=exclfile \\
15280               testdir
15281tar tf archive | sort
15282
15283rm -rf testdir exclfile
15284
15285)"
15286at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
15287( $at_check_trace;
15288mkdir ustar
15289(cd ustar
15290TEST_TAR_FORMAT=ustar
15291export TEST_TAR_FORMAT
15292TAR_OPTIONS="-H ustar"
15293export TAR_OPTIONS
15294rm -rf *
15295
15296
15297test -z "`sort < /dev/null 2>&1`" || exit 77
15298
15299
15300rm -rf testdir exclfile
15301mkdir -p testdir
15302awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
15303 while read name
15304 do
15305   genfile --file $name
15306 done
15307
15308awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
15309
15310tar cf archive --anchored --exclude-from=exclfile \
15311               testdir
15312tar tf archive | sort
15313
15314echo "NEXT"
15315tar cf archive --exclude-from=exclfile \
15316               testdir
15317tar tf archive | sort
15318
15319rm -rf testdir exclfile
15320
15321)
15322) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15323at_status=$? at_failed=false
15324$at_check_filter
15325at_fn_diff_devnull "$at_stderr" || at_failed=:
15326echo >>"$at_stdout"; $as_echo "testdir/
15327testdir/file10
15328testdir/file11
15329testdir/file9
15330NEXT
15331testdir/
15332testdir/file10
15333testdir/file11
15334testdir/file9
15335" | \
15336  $at_diff - "$at_stdout" || at_failed=:
15337at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
15338$at_failed && at_fn_log_failure
15339$at_traceon; }
15340
15341              { set +x
15342$as_echo "$at_srcdir/exclude05.at:24:
15343mkdir posix
15344(cd posix
15345TEST_TAR_FORMAT=posix
15346export TEST_TAR_FORMAT
15347TAR_OPTIONS=\"-H posix\"
15348export TAR_OPTIONS
15349rm -rf *
15350
15351
15352test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15353
15354
15355rm -rf testdir exclfile
15356mkdir -p testdir
15357awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
15358 while read name
15359 do
15360   genfile --file \$name
15361 done
15362
15363awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
15364
15365tar cf archive --anchored --exclude-from=exclfile \\
15366               testdir
15367tar tf archive | sort
15368
15369echo \"NEXT\"
15370tar cf archive --exclude-from=exclfile \\
15371               testdir
15372tar tf archive | sort
15373
15374rm -rf testdir exclfile
15375
15376)"
15377at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
15378( $at_check_trace;
15379mkdir posix
15380(cd posix
15381TEST_TAR_FORMAT=posix
15382export TEST_TAR_FORMAT
15383TAR_OPTIONS="-H posix"
15384export TAR_OPTIONS
15385rm -rf *
15386
15387
15388test -z "`sort < /dev/null 2>&1`" || exit 77
15389
15390
15391rm -rf testdir exclfile
15392mkdir -p testdir
15393awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
15394 while read name
15395 do
15396   genfile --file $name
15397 done
15398
15399awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
15400
15401tar cf archive --anchored --exclude-from=exclfile \
15402               testdir
15403tar tf archive | sort
15404
15405echo "NEXT"
15406tar cf archive --exclude-from=exclfile \
15407               testdir
15408tar tf archive | sort
15409
15410rm -rf testdir exclfile
15411
15412)
15413) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15414at_status=$? at_failed=false
15415$at_check_filter
15416at_fn_diff_devnull "$at_stderr" || at_failed=:
15417echo >>"$at_stdout"; $as_echo "testdir/
15418testdir/file10
15419testdir/file11
15420testdir/file9
15421NEXT
15422testdir/
15423testdir/file10
15424testdir/file11
15425testdir/file9
15426" | \
15427  $at_diff - "$at_stdout" || at_failed=:
15428at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
15429$at_failed && at_fn_log_failure
15430$at_traceon; }
15431
15432              { set +x
15433$as_echo "$at_srcdir/exclude05.at:24:
15434mkdir gnu
15435(cd gnu
15436TEST_TAR_FORMAT=gnu
15437export TEST_TAR_FORMAT
15438TAR_OPTIONS=\"-H gnu\"
15439export TAR_OPTIONS
15440rm -rf *
15441
15442
15443test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15444
15445
15446rm -rf testdir exclfile
15447mkdir -p testdir
15448awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
15449 while read name
15450 do
15451   genfile --file \$name
15452 done
15453
15454awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
15455
15456tar cf archive --anchored --exclude-from=exclfile \\
15457               testdir
15458tar tf archive | sort
15459
15460echo \"NEXT\"
15461tar cf archive --exclude-from=exclfile \\
15462               testdir
15463tar tf archive | sort
15464
15465rm -rf testdir exclfile
15466
15467)"
15468at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
15469( $at_check_trace;
15470mkdir gnu
15471(cd gnu
15472TEST_TAR_FORMAT=gnu
15473export TEST_TAR_FORMAT
15474TAR_OPTIONS="-H gnu"
15475export TAR_OPTIONS
15476rm -rf *
15477
15478
15479test -z "`sort < /dev/null 2>&1`" || exit 77
15480
15481
15482rm -rf testdir exclfile
15483mkdir -p testdir
15484awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
15485 while read name
15486 do
15487   genfile --file $name
15488 done
15489
15490awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
15491
15492tar cf archive --anchored --exclude-from=exclfile \
15493               testdir
15494tar tf archive | sort
15495
15496echo "NEXT"
15497tar cf archive --exclude-from=exclfile \
15498               testdir
15499tar tf archive | sort
15500
15501rm -rf testdir exclfile
15502
15503)
15504) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15505at_status=$? at_failed=false
15506$at_check_filter
15507at_fn_diff_devnull "$at_stderr" || at_failed=:
15508echo >>"$at_stdout"; $as_echo "testdir/
15509testdir/file10
15510testdir/file11
15511testdir/file9
15512NEXT
15513testdir/
15514testdir/file10
15515testdir/file11
15516testdir/file9
15517" | \
15518  $at_diff - "$at_stdout" || at_failed=:
15519at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
15520$at_failed && at_fn_log_failure
15521$at_traceon; }
15522
15523
15524
15525
15526  set +x
15527  $at_times_p && times >"$at_times_file"
15528) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15529read at_status <"$at_status_file"
15530#AT_STOP_64
15531#AT_START_65
15532at_fn_group_banner 65 'exclude06.at:26' \
15533  "exclude: long files in pax archives" "            " 11
15534at_xfail=no
15535      test -f $XFAILFILE && at_xfail=yes
15536(
15537  $as_echo "65. $at_setup_line: testing $at_desc ..."
15538  $at_traceon
15539
15540
15541
15542
15543
15544
15545
15546  { set +x
15547$as_echo "$at_srcdir/exclude06.at:31:
15548mkdir pax
15549(cd pax
15550TEST_TAR_FORMAT=pax
15551export TEST_TAR_FORMAT
15552TAR_OPTIONS=\"-H pax\"
15553export TAR_OPTIONS
15554rm -rf *
15555
15556
15557install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null  || exit 77
15558genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
15559genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
15560
15561tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
15562mkdir out
15563tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
15564find out -type f
15565)"
15566at_fn_check_prepare_notrace 'an embedded newline' "exclude06.at:31"
15567( $at_check_trace;
15568mkdir pax
15569(cd pax
15570TEST_TAR_FORMAT=pax
15571export TEST_TAR_FORMAT
15572TAR_OPTIONS="-H pax"
15573export TAR_OPTIONS
15574rm -rf *
15575
15576
15577install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null  || exit 77
15578genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
15579genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
15580
15581tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
15582mkdir out
15583tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
15584find out -type f
15585)
15586) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15587at_status=$? at_failed=false
15588$at_check_filter
15589at_fn_diff_devnull "$at_stderr" || at_failed=:
15590echo >>"$at_stdout"; $as_echo "out/one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
15591" | \
15592  $at_diff - "$at_stdout" || at_failed=:
15593at_fn_check_status 0 $at_status "$at_srcdir/exclude06.at:31"
15594$at_failed && at_fn_log_failure
15595$at_traceon; }
15596
15597
15598
15599
15600
15601  set +x
15602  $at_times_p && times >"$at_times_file"
15603) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15604read at_status <"$at_status_file"
15605#AT_STOP_65
15606#AT_START_66
15607at_fn_group_banner 66 'exclude07.at:19' \
15608  "exclude: --exclude-backups option" "              " 11
15609at_xfail=no
15610      test -f $XFAILFILE && at_xfail=yes
15611(
15612  $as_echo "66. $at_setup_line: testing $at_desc ..."
15613  $at_traceon
15614
15615
15616
15617
15618
15619  { set +x
15620$as_echo "$at_srcdir/exclude07.at:22:
15621mkdir v7
15622(cd v7
15623TEST_TAR_FORMAT=v7
15624export TEST_TAR_FORMAT
15625TAR_OPTIONS=\"-H v7\"
15626export TAR_OPTIONS
15627rm -rf *
15628
15629mkdir dir
15630genfile --file dir/file
15631genfile --file dir/file~
15632genfile --file \"dir/.#file\"
15633genfile --file \"dir/#file#\"
15634
15635tar -v -c -f archive --exclude-backups dir
15636)"
15637at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
15638( $at_check_trace;
15639mkdir v7
15640(cd v7
15641TEST_TAR_FORMAT=v7
15642export TEST_TAR_FORMAT
15643TAR_OPTIONS="-H v7"
15644export TAR_OPTIONS
15645rm -rf *
15646
15647mkdir dir
15648genfile --file dir/file
15649genfile --file dir/file~
15650genfile --file "dir/.#file"
15651genfile --file "dir/#file#"
15652
15653tar -v -c -f archive --exclude-backups dir
15654)
15655) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15656at_status=$? at_failed=false
15657$at_check_filter
15658at_fn_diff_devnull "$at_stderr" || at_failed=:
15659echo >>"$at_stdout"; $as_echo "dir/
15660dir/file
15661" | \
15662  $at_diff - "$at_stdout" || at_failed=:
15663at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
15664$at_failed && at_fn_log_failure
15665$at_traceon; }
15666
15667              { set +x
15668$as_echo "$at_srcdir/exclude07.at:22:
15669mkdir oldgnu
15670(cd oldgnu
15671TEST_TAR_FORMAT=oldgnu
15672export TEST_TAR_FORMAT
15673TAR_OPTIONS=\"-H oldgnu\"
15674export TAR_OPTIONS
15675rm -rf *
15676
15677mkdir dir
15678genfile --file dir/file
15679genfile --file dir/file~
15680genfile --file \"dir/.#file\"
15681genfile --file \"dir/#file#\"
15682
15683tar -v -c -f archive --exclude-backups dir
15684)"
15685at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
15686( $at_check_trace;
15687mkdir oldgnu
15688(cd oldgnu
15689TEST_TAR_FORMAT=oldgnu
15690export TEST_TAR_FORMAT
15691TAR_OPTIONS="-H oldgnu"
15692export TAR_OPTIONS
15693rm -rf *
15694
15695mkdir dir
15696genfile --file dir/file
15697genfile --file dir/file~
15698genfile --file "dir/.#file"
15699genfile --file "dir/#file#"
15700
15701tar -v -c -f archive --exclude-backups dir
15702)
15703) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15704at_status=$? at_failed=false
15705$at_check_filter
15706at_fn_diff_devnull "$at_stderr" || at_failed=:
15707echo >>"$at_stdout"; $as_echo "dir/
15708dir/file
15709" | \
15710  $at_diff - "$at_stdout" || at_failed=:
15711at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
15712$at_failed && at_fn_log_failure
15713$at_traceon; }
15714
15715              { set +x
15716$as_echo "$at_srcdir/exclude07.at:22:
15717mkdir ustar
15718(cd ustar
15719TEST_TAR_FORMAT=ustar
15720export TEST_TAR_FORMAT
15721TAR_OPTIONS=\"-H ustar\"
15722export TAR_OPTIONS
15723rm -rf *
15724
15725mkdir dir
15726genfile --file dir/file
15727genfile --file dir/file~
15728genfile --file \"dir/.#file\"
15729genfile --file \"dir/#file#\"
15730
15731tar -v -c -f archive --exclude-backups dir
15732)"
15733at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
15734( $at_check_trace;
15735mkdir ustar
15736(cd ustar
15737TEST_TAR_FORMAT=ustar
15738export TEST_TAR_FORMAT
15739TAR_OPTIONS="-H ustar"
15740export TAR_OPTIONS
15741rm -rf *
15742
15743mkdir dir
15744genfile --file dir/file
15745genfile --file dir/file~
15746genfile --file "dir/.#file"
15747genfile --file "dir/#file#"
15748
15749tar -v -c -f archive --exclude-backups dir
15750)
15751) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15752at_status=$? at_failed=false
15753$at_check_filter
15754at_fn_diff_devnull "$at_stderr" || at_failed=:
15755echo >>"$at_stdout"; $as_echo "dir/
15756dir/file
15757" | \
15758  $at_diff - "$at_stdout" || at_failed=:
15759at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
15760$at_failed && at_fn_log_failure
15761$at_traceon; }
15762
15763              { set +x
15764$as_echo "$at_srcdir/exclude07.at:22:
15765mkdir posix
15766(cd posix
15767TEST_TAR_FORMAT=posix
15768export TEST_TAR_FORMAT
15769TAR_OPTIONS=\"-H posix\"
15770export TAR_OPTIONS
15771rm -rf *
15772
15773mkdir dir
15774genfile --file dir/file
15775genfile --file dir/file~
15776genfile --file \"dir/.#file\"
15777genfile --file \"dir/#file#\"
15778
15779tar -v -c -f archive --exclude-backups dir
15780)"
15781at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
15782( $at_check_trace;
15783mkdir posix
15784(cd posix
15785TEST_TAR_FORMAT=posix
15786export TEST_TAR_FORMAT
15787TAR_OPTIONS="-H posix"
15788export TAR_OPTIONS
15789rm -rf *
15790
15791mkdir dir
15792genfile --file dir/file
15793genfile --file dir/file~
15794genfile --file "dir/.#file"
15795genfile --file "dir/#file#"
15796
15797tar -v -c -f archive --exclude-backups dir
15798)
15799) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15800at_status=$? at_failed=false
15801$at_check_filter
15802at_fn_diff_devnull "$at_stderr" || at_failed=:
15803echo >>"$at_stdout"; $as_echo "dir/
15804dir/file
15805" | \
15806  $at_diff - "$at_stdout" || at_failed=:
15807at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
15808$at_failed && at_fn_log_failure
15809$at_traceon; }
15810
15811              { set +x
15812$as_echo "$at_srcdir/exclude07.at:22:
15813mkdir gnu
15814(cd gnu
15815TEST_TAR_FORMAT=gnu
15816export TEST_TAR_FORMAT
15817TAR_OPTIONS=\"-H gnu\"
15818export TAR_OPTIONS
15819rm -rf *
15820
15821mkdir dir
15822genfile --file dir/file
15823genfile --file dir/file~
15824genfile --file \"dir/.#file\"
15825genfile --file \"dir/#file#\"
15826
15827tar -v -c -f archive --exclude-backups dir
15828)"
15829at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
15830( $at_check_trace;
15831mkdir gnu
15832(cd gnu
15833TEST_TAR_FORMAT=gnu
15834export TEST_TAR_FORMAT
15835TAR_OPTIONS="-H gnu"
15836export TAR_OPTIONS
15837rm -rf *
15838
15839mkdir dir
15840genfile --file dir/file
15841genfile --file dir/file~
15842genfile --file "dir/.#file"
15843genfile --file "dir/#file#"
15844
15845tar -v -c -f archive --exclude-backups dir
15846)
15847) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15848at_status=$? at_failed=false
15849$at_check_filter
15850at_fn_diff_devnull "$at_stderr" || at_failed=:
15851echo >>"$at_stdout"; $as_echo "dir/
15852dir/file
15853" | \
15854  $at_diff - "$at_stdout" || at_failed=:
15855at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
15856$at_failed && at_fn_log_failure
15857$at_traceon; }
15858
15859
15860
15861
15862  set +x
15863  $at_times_p && times >"$at_times_file"
15864) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15865read at_status <"$at_status_file"
15866#AT_STOP_66
15867#AT_START_67
15868at_fn_group_banner 67 'exclude08.at:36' \
15869  "--exclude-tag option" "                           " 11
15870at_xfail=no
15871      test -f $XFAILFILE && at_xfail=yes
15872(
15873  $as_echo "67. $at_setup_line: testing $at_desc ..."
15874  $at_traceon
15875
15876
15877
15878
15879
15880  { set +x
15881$as_echo "$at_srcdir/exclude08.at:39:
15882mkdir v7
15883(cd v7
15884TEST_TAR_FORMAT=v7
15885export TEST_TAR_FORMAT
15886TAR_OPTIONS=\"-H v7\"
15887export TAR_OPTIONS
15888rm -rf *
15889
15890
15891test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15892
15893mkexcltest etest
15894tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
15895)"
15896at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
15897( $at_check_trace;
15898mkdir v7
15899(cd v7
15900TEST_TAR_FORMAT=v7
15901export TEST_TAR_FORMAT
15902TAR_OPTIONS="-H v7"
15903export TAR_OPTIONS
15904rm -rf *
15905
15906
15907test -z "`sort < /dev/null 2>&1`" || exit 77
15908
15909mkexcltest etest
15910tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
15911)
15912) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15913at_status=$? at_failed=false
15914$at_check_filter
15915echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
15916" | \
15917  $at_diff - "$at_stderr" || at_failed=:
15918echo >>"$at_stdout"; $as_echo "etest/
15919etest/subdir/
15920etest/subdir/excludeme
15921etest/top-level-file
15922" | \
15923  $at_diff - "$at_stdout" || at_failed=:
15924at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
15925$at_failed && at_fn_log_failure
15926$at_traceon; }
15927
15928              { set +x
15929$as_echo "$at_srcdir/exclude08.at:39:
15930mkdir oldgnu
15931(cd oldgnu
15932TEST_TAR_FORMAT=oldgnu
15933export TEST_TAR_FORMAT
15934TAR_OPTIONS=\"-H oldgnu\"
15935export TAR_OPTIONS
15936rm -rf *
15937
15938
15939test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15940
15941mkexcltest etest
15942tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
15943)"
15944at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
15945( $at_check_trace;
15946mkdir oldgnu
15947(cd oldgnu
15948TEST_TAR_FORMAT=oldgnu
15949export TEST_TAR_FORMAT
15950TAR_OPTIONS="-H oldgnu"
15951export TAR_OPTIONS
15952rm -rf *
15953
15954
15955test -z "`sort < /dev/null 2>&1`" || exit 77
15956
15957mkexcltest etest
15958tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
15959)
15960) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15961at_status=$? at_failed=false
15962$at_check_filter
15963echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
15964" | \
15965  $at_diff - "$at_stderr" || at_failed=:
15966echo >>"$at_stdout"; $as_echo "etest/
15967etest/subdir/
15968etest/subdir/excludeme
15969etest/top-level-file
15970" | \
15971  $at_diff - "$at_stdout" || at_failed=:
15972at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
15973$at_failed && at_fn_log_failure
15974$at_traceon; }
15975
15976              { set +x
15977$as_echo "$at_srcdir/exclude08.at:39:
15978mkdir ustar
15979(cd ustar
15980TEST_TAR_FORMAT=ustar
15981export TEST_TAR_FORMAT
15982TAR_OPTIONS=\"-H ustar\"
15983export TAR_OPTIONS
15984rm -rf *
15985
15986
15987test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15988
15989mkexcltest etest
15990tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
15991)"
15992at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
15993( $at_check_trace;
15994mkdir ustar
15995(cd ustar
15996TEST_TAR_FORMAT=ustar
15997export TEST_TAR_FORMAT
15998TAR_OPTIONS="-H ustar"
15999export TAR_OPTIONS
16000rm -rf *
16001
16002
16003test -z "`sort < /dev/null 2>&1`" || exit 77
16004
16005mkexcltest etest
16006tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
16007)
16008) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16009at_status=$? at_failed=false
16010$at_check_filter
16011echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
16012" | \
16013  $at_diff - "$at_stderr" || at_failed=:
16014echo >>"$at_stdout"; $as_echo "etest/
16015etest/subdir/
16016etest/subdir/excludeme
16017etest/top-level-file
16018" | \
16019  $at_diff - "$at_stdout" || at_failed=:
16020at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
16021$at_failed && at_fn_log_failure
16022$at_traceon; }
16023
16024              { set +x
16025$as_echo "$at_srcdir/exclude08.at:39:
16026mkdir posix
16027(cd posix
16028TEST_TAR_FORMAT=posix
16029export TEST_TAR_FORMAT
16030TAR_OPTIONS=\"-H posix\"
16031export TAR_OPTIONS
16032rm -rf *
16033
16034
16035test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16036
16037mkexcltest etest
16038tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
16039)"
16040at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
16041( $at_check_trace;
16042mkdir posix
16043(cd posix
16044TEST_TAR_FORMAT=posix
16045export TEST_TAR_FORMAT
16046TAR_OPTIONS="-H posix"
16047export TAR_OPTIONS
16048rm -rf *
16049
16050
16051test -z "`sort < /dev/null 2>&1`" || exit 77
16052
16053mkexcltest etest
16054tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
16055)
16056) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16057at_status=$? at_failed=false
16058$at_check_filter
16059echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
16060" | \
16061  $at_diff - "$at_stderr" || at_failed=:
16062echo >>"$at_stdout"; $as_echo "etest/
16063etest/subdir/
16064etest/subdir/excludeme
16065etest/top-level-file
16066" | \
16067  $at_diff - "$at_stdout" || at_failed=:
16068at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
16069$at_failed && at_fn_log_failure
16070$at_traceon; }
16071
16072              { set +x
16073$as_echo "$at_srcdir/exclude08.at:39:
16074mkdir gnu
16075(cd gnu
16076TEST_TAR_FORMAT=gnu
16077export TEST_TAR_FORMAT
16078TAR_OPTIONS=\"-H gnu\"
16079export TAR_OPTIONS
16080rm -rf *
16081
16082
16083test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16084
16085mkexcltest etest
16086tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
16087)"
16088at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
16089( $at_check_trace;
16090mkdir gnu
16091(cd gnu
16092TEST_TAR_FORMAT=gnu
16093export TEST_TAR_FORMAT
16094TAR_OPTIONS="-H gnu"
16095export TAR_OPTIONS
16096rm -rf *
16097
16098
16099test -z "`sort < /dev/null 2>&1`" || exit 77
16100
16101mkexcltest etest
16102tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
16103)
16104) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16105at_status=$? at_failed=false
16106$at_check_filter
16107echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
16108" | \
16109  $at_diff - "$at_stderr" || at_failed=:
16110echo >>"$at_stdout"; $as_echo "etest/
16111etest/subdir/
16112etest/subdir/excludeme
16113etest/top-level-file
16114" | \
16115  $at_diff - "$at_stdout" || at_failed=:
16116at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
16117$at_failed && at_fn_log_failure
16118$at_traceon; }
16119
16120
16121
16122
16123  set +x
16124  $at_times_p && times >"$at_times_file"
16125) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16126read at_status <"$at_status_file"
16127#AT_STOP_67
16128#AT_START_68
16129at_fn_group_banner 68 'exclude09.at:37' \
16130  "--exclude-tag option and --listed-incremental" "  " 11
16131at_xfail=no
16132      test -f $XFAILFILE && at_xfail=yes
16133(
16134  $as_echo "68. $at_setup_line: testing $at_desc ..."
16135  $at_traceon
16136
16137
16138
16139
16140
16141  { set +x
16142$as_echo "$at_srcdir/exclude09.at:40:
16143mkdir gnu
16144(cd gnu
16145TEST_TAR_FORMAT=gnu
16146export TEST_TAR_FORMAT
16147TAR_OPTIONS=\"-H gnu\"
16148export TAR_OPTIONS
16149rm -rf *
16150
16151
16152test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16153
16154mkexcltest etest
16155tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
16156)"
16157at_fn_check_prepare_notrace 'a `...` command substitution' "exclude09.at:40"
16158( $at_check_trace;
16159mkdir gnu
16160(cd gnu
16161TEST_TAR_FORMAT=gnu
16162export TEST_TAR_FORMAT
16163TAR_OPTIONS="-H gnu"
16164export TAR_OPTIONS
16165rm -rf *
16166
16167
16168test -z "`sort < /dev/null 2>&1`" || exit 77
16169
16170mkexcltest etest
16171tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
16172)
16173) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16174at_status=$? at_failed=false
16175$at_check_filter
16176echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
16177tar: etest/subdir: Directory is new
16178tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
16179" | \
16180  $at_diff - "$at_stderr" || at_failed=:
16181echo >>"$at_stdout"; $as_echo "etest/
16182etest/subdir/
16183etest/subdir/excludeme
16184etest/top-level-file
16185" | \
16186  $at_diff - "$at_stdout" || at_failed=:
16187at_fn_check_status 0 $at_status "$at_srcdir/exclude09.at:40"
16188$at_failed && at_fn_log_failure
16189$at_traceon; }
16190
16191
16192
16193
16194  set +x
16195  $at_times_p && times >"$at_times_file"
16196) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16197read at_status <"$at_status_file"
16198#AT_STOP_68
16199#AT_START_69
16200at_fn_group_banner 69 'exclude10.at:38' \
16201  "--exclude-tag option in incremental pass" "       " 11
16202at_xfail=no
16203      test -f $XFAILFILE && at_xfail=yes
16204(
16205  $as_echo "69. $at_setup_line: testing $at_desc ..."
16206  $at_traceon
16207
16208
16209
16210
16211
16212  { set +x
16213$as_echo "$at_srcdir/exclude10.at:41:
16214mkdir gnu
16215(cd gnu
16216TEST_TAR_FORMAT=gnu
16217export TEST_TAR_FORMAT
16218TAR_OPTIONS=\"-H gnu\"
16219export TAR_OPTIONS
16220rm -rf *
16221
16222
16223test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16224
16225mkexcltest etest
16226rm etest/subdir/excludeme
16227decho \"# Level 0\"
16228tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
16229touch etest/subdir/excludeme
16230touch etest/subdir/otherfile
16231
16232decho \"# Level 1\"
16233cp snar-0 snar-1
16234tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
16235)"
16236at_fn_check_prepare_notrace 'a `...` command substitution' "exclude10.at:41"
16237( $at_check_trace;
16238mkdir gnu
16239(cd gnu
16240TEST_TAR_FORMAT=gnu
16241export TEST_TAR_FORMAT
16242TAR_OPTIONS="-H gnu"
16243export TAR_OPTIONS
16244rm -rf *
16245
16246
16247test -z "`sort < /dev/null 2>&1`" || exit 77
16248
16249mkexcltest etest
16250rm etest/subdir/excludeme
16251decho "# Level 0"
16252tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
16253touch etest/subdir/excludeme
16254touch etest/subdir/otherfile
16255
16256decho "# Level 1"
16257cp snar-0 snar-1
16258tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
16259)
16260) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16261at_status=$? at_failed=false
16262$at_check_filter
16263echo >>"$at_stderr"; $as_echo "# Level 0
16264tar: etest: Directory is new
16265tar: etest/subdir: Directory is new
16266# Level 1
16267tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
16268" | \
16269  $at_diff - "$at_stderr" || at_failed=:
16270echo >>"$at_stdout"; $as_echo "# Level 0
16271etest/
16272etest/subdir/
16273etest/subdir/subdir-file
16274etest/top-level-file
16275# Level 1
16276etest/
16277etest/subdir/
16278etest/subdir/excludeme
16279" | \
16280  $at_diff - "$at_stdout" || at_failed=:
16281at_fn_check_status 0 $at_status "$at_srcdir/exclude10.at:41"
16282$at_failed && at_fn_log_failure
16283$at_traceon; }
16284
16285
16286
16287
16288  set +x
16289  $at_times_p && times >"$at_times_file"
16290) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16291read at_status <"$at_status_file"
16292#AT_STOP_69
16293#AT_START_70
16294at_fn_group_banner 70 'exclude11.at:36' \
16295  "--exclude-tag-under option" "                     " 11
16296at_xfail=no
16297      test -f $XFAILFILE && at_xfail=yes
16298(
16299  $as_echo "70. $at_setup_line: testing $at_desc ..."
16300  $at_traceon
16301
16302
16303
16304
16305
16306  { set +x
16307$as_echo "$at_srcdir/exclude11.at:39:
16308mkdir v7
16309(cd v7
16310TEST_TAR_FORMAT=v7
16311export TEST_TAR_FORMAT
16312TAR_OPTIONS=\"-H v7\"
16313export TAR_OPTIONS
16314rm -rf *
16315
16316
16317test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16318
16319mkexcltest etest
16320tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16321)"
16322at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
16323( $at_check_trace;
16324mkdir v7
16325(cd v7
16326TEST_TAR_FORMAT=v7
16327export TEST_TAR_FORMAT
16328TAR_OPTIONS="-H v7"
16329export TAR_OPTIONS
16330rm -rf *
16331
16332
16333test -z "`sort < /dev/null 2>&1`" || exit 77
16334
16335mkexcltest etest
16336tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16337)
16338) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16339at_status=$? at_failed=false
16340$at_check_filter
16341echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
16342" | \
16343  $at_diff - "$at_stderr" || at_failed=:
16344echo >>"$at_stdout"; $as_echo "etest/
16345etest/subdir/
16346etest/top-level-file
16347" | \
16348  $at_diff - "$at_stdout" || at_failed=:
16349at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
16350$at_failed && at_fn_log_failure
16351$at_traceon; }
16352
16353              { set +x
16354$as_echo "$at_srcdir/exclude11.at:39:
16355mkdir oldgnu
16356(cd oldgnu
16357TEST_TAR_FORMAT=oldgnu
16358export TEST_TAR_FORMAT
16359TAR_OPTIONS=\"-H oldgnu\"
16360export TAR_OPTIONS
16361rm -rf *
16362
16363
16364test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16365
16366mkexcltest etest
16367tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16368)"
16369at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
16370( $at_check_trace;
16371mkdir oldgnu
16372(cd oldgnu
16373TEST_TAR_FORMAT=oldgnu
16374export TEST_TAR_FORMAT
16375TAR_OPTIONS="-H oldgnu"
16376export TAR_OPTIONS
16377rm -rf *
16378
16379
16380test -z "`sort < /dev/null 2>&1`" || exit 77
16381
16382mkexcltest etest
16383tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16384)
16385) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16386at_status=$? at_failed=false
16387$at_check_filter
16388echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
16389" | \
16390  $at_diff - "$at_stderr" || at_failed=:
16391echo >>"$at_stdout"; $as_echo "etest/
16392etest/subdir/
16393etest/top-level-file
16394" | \
16395  $at_diff - "$at_stdout" || at_failed=:
16396at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
16397$at_failed && at_fn_log_failure
16398$at_traceon; }
16399
16400              { set +x
16401$as_echo "$at_srcdir/exclude11.at:39:
16402mkdir ustar
16403(cd ustar
16404TEST_TAR_FORMAT=ustar
16405export TEST_TAR_FORMAT
16406TAR_OPTIONS=\"-H ustar\"
16407export TAR_OPTIONS
16408rm -rf *
16409
16410
16411test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16412
16413mkexcltest etest
16414tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16415)"
16416at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
16417( $at_check_trace;
16418mkdir ustar
16419(cd ustar
16420TEST_TAR_FORMAT=ustar
16421export TEST_TAR_FORMAT
16422TAR_OPTIONS="-H ustar"
16423export TAR_OPTIONS
16424rm -rf *
16425
16426
16427test -z "`sort < /dev/null 2>&1`" || exit 77
16428
16429mkexcltest etest
16430tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16431)
16432) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16433at_status=$? at_failed=false
16434$at_check_filter
16435echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
16436" | \
16437  $at_diff - "$at_stderr" || at_failed=:
16438echo >>"$at_stdout"; $as_echo "etest/
16439etest/subdir/
16440etest/top-level-file
16441" | \
16442  $at_diff - "$at_stdout" || at_failed=:
16443at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
16444$at_failed && at_fn_log_failure
16445$at_traceon; }
16446
16447              { set +x
16448$as_echo "$at_srcdir/exclude11.at:39:
16449mkdir posix
16450(cd posix
16451TEST_TAR_FORMAT=posix
16452export TEST_TAR_FORMAT
16453TAR_OPTIONS=\"-H posix\"
16454export TAR_OPTIONS
16455rm -rf *
16456
16457
16458test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16459
16460mkexcltest etest
16461tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16462)"
16463at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
16464( $at_check_trace;
16465mkdir posix
16466(cd posix
16467TEST_TAR_FORMAT=posix
16468export TEST_TAR_FORMAT
16469TAR_OPTIONS="-H posix"
16470export TAR_OPTIONS
16471rm -rf *
16472
16473
16474test -z "`sort < /dev/null 2>&1`" || exit 77
16475
16476mkexcltest etest
16477tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16478)
16479) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16480at_status=$? at_failed=false
16481$at_check_filter
16482echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
16483" | \
16484  $at_diff - "$at_stderr" || at_failed=:
16485echo >>"$at_stdout"; $as_echo "etest/
16486etest/subdir/
16487etest/top-level-file
16488" | \
16489  $at_diff - "$at_stdout" || at_failed=:
16490at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
16491$at_failed && at_fn_log_failure
16492$at_traceon; }
16493
16494              { set +x
16495$as_echo "$at_srcdir/exclude11.at:39:
16496mkdir gnu
16497(cd gnu
16498TEST_TAR_FORMAT=gnu
16499export TEST_TAR_FORMAT
16500TAR_OPTIONS=\"-H gnu\"
16501export TAR_OPTIONS
16502rm -rf *
16503
16504
16505test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16506
16507mkexcltest etest
16508tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16509)"
16510at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
16511( $at_check_trace;
16512mkdir gnu
16513(cd gnu
16514TEST_TAR_FORMAT=gnu
16515export TEST_TAR_FORMAT
16516TAR_OPTIONS="-H gnu"
16517export TAR_OPTIONS
16518rm -rf *
16519
16520
16521test -z "`sort < /dev/null 2>&1`" || exit 77
16522
16523mkexcltest etest
16524tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
16525)
16526) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16527at_status=$? at_failed=false
16528$at_check_filter
16529echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
16530" | \
16531  $at_diff - "$at_stderr" || at_failed=:
16532echo >>"$at_stdout"; $as_echo "etest/
16533etest/subdir/
16534etest/top-level-file
16535" | \
16536  $at_diff - "$at_stdout" || at_failed=:
16537at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
16538$at_failed && at_fn_log_failure
16539$at_traceon; }
16540
16541
16542
16543
16544  set +x
16545  $at_times_p && times >"$at_times_file"
16546) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16547read at_status <"$at_status_file"
16548#AT_STOP_70
16549#AT_START_71
16550at_fn_group_banner 71 'exclude12.at:37' \
16551  "--exclude-tag-under and --listed-incremental" "   " 11
16552at_xfail=no
16553      test -f $XFAILFILE && at_xfail=yes
16554(
16555  $as_echo "71. $at_setup_line: testing $at_desc ..."
16556  $at_traceon
16557
16558
16559
16560
16561
16562  { set +x
16563$as_echo "$at_srcdir/exclude12.at:40:
16564mkdir gnu
16565(cd gnu
16566TEST_TAR_FORMAT=gnu
16567export TEST_TAR_FORMAT
16568TAR_OPTIONS=\"-H gnu\"
16569export TAR_OPTIONS
16570rm -rf *
16571
16572
16573test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16574
16575mkexcltest etest
16576tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
16577)"
16578at_fn_check_prepare_notrace 'a `...` command substitution' "exclude12.at:40"
16579( $at_check_trace;
16580mkdir gnu
16581(cd gnu
16582TEST_TAR_FORMAT=gnu
16583export TEST_TAR_FORMAT
16584TAR_OPTIONS="-H gnu"
16585export TAR_OPTIONS
16586rm -rf *
16587
16588
16589test -z "`sort < /dev/null 2>&1`" || exit 77
16590
16591mkexcltest etest
16592tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
16593)
16594) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16595at_status=$? at_failed=false
16596$at_check_filter
16597echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
16598tar: etest/subdir: Directory is new
16599tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
16600" | \
16601  $at_diff - "$at_stderr" || at_failed=:
16602echo >>"$at_stdout"; $as_echo "etest/
16603etest/subdir/
16604etest/top-level-file
16605" | \
16606  $at_diff - "$at_stdout" || at_failed=:
16607at_fn_check_status 0 $at_status "$at_srcdir/exclude12.at:40"
16608$at_failed && at_fn_log_failure
16609$at_traceon; }
16610
16611
16612
16613
16614  set +x
16615  $at_times_p && times >"$at_times_file"
16616) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16617read at_status <"$at_status_file"
16618#AT_STOP_71
16619#AT_START_72
16620at_fn_group_banner 72 'exclude13.at:39' \
16621  "--exclude-tag-under option in incremental pass" " " 11
16622at_xfail=no
16623      test -f $XFAILFILE && at_xfail=yes
16624(
16625  $as_echo "72. $at_setup_line: testing $at_desc ..."
16626  $at_traceon
16627
16628
16629
16630
16631
16632  { set +x
16633$as_echo "$at_srcdir/exclude13.at:42:
16634mkdir gnu
16635(cd gnu
16636TEST_TAR_FORMAT=gnu
16637export TEST_TAR_FORMAT
16638TAR_OPTIONS=\"-H gnu\"
16639export TAR_OPTIONS
16640rm -rf *
16641
16642
16643test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16644
16645mkexcltest etest
16646rm etest/subdir/excludeme
16647decho \"# Level 0\"
16648tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
16649touch etest/subdir/excludeme
16650touch etest/subdir/otherfile
16651
16652decho \"# Level 1\"
16653cp snar-0 snar-1
16654tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
16655)"
16656at_fn_check_prepare_notrace 'a `...` command substitution' "exclude13.at:42"
16657( $at_check_trace;
16658mkdir gnu
16659(cd gnu
16660TEST_TAR_FORMAT=gnu
16661export TEST_TAR_FORMAT
16662TAR_OPTIONS="-H gnu"
16663export TAR_OPTIONS
16664rm -rf *
16665
16666
16667test -z "`sort < /dev/null 2>&1`" || exit 77
16668
16669mkexcltest etest
16670rm etest/subdir/excludeme
16671decho "# Level 0"
16672tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
16673touch etest/subdir/excludeme
16674touch etest/subdir/otherfile
16675
16676decho "# Level 1"
16677cp snar-0 snar-1
16678tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
16679)
16680) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16681at_status=$? at_failed=false
16682$at_check_filter
16683echo >>"$at_stderr"; $as_echo "# Level 0
16684tar: etest: Directory is new
16685tar: etest/subdir: Directory is new
16686# Level 1
16687tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
16688" | \
16689  $at_diff - "$at_stderr" || at_failed=:
16690echo >>"$at_stdout"; $as_echo "# Level 0
16691etest/
16692etest/subdir/
16693etest/subdir/subdir-file
16694etest/top-level-file
16695# Level 1
16696etest/
16697etest/subdir/
16698" | \
16699  $at_diff - "$at_stdout" || at_failed=:
16700at_fn_check_status 0 $at_status "$at_srcdir/exclude13.at:42"
16701$at_failed && at_fn_log_failure
16702$at_traceon; }
16703
16704
16705
16706
16707  set +x
16708  $at_times_p && times >"$at_times_file"
16709) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16710read at_status <"$at_status_file"
16711#AT_STOP_72
16712#AT_START_73
16713at_fn_group_banner 73 'exclude14.at:36' \
16714  "--exclude-tag-all option" "                       " 11
16715at_xfail=no
16716      test -f $XFAILFILE && at_xfail=yes
16717(
16718  $as_echo "73. $at_setup_line: testing $at_desc ..."
16719  $at_traceon
16720
16721
16722
16723
16724
16725  { set +x
16726$as_echo "$at_srcdir/exclude14.at:39:
16727mkdir v7
16728(cd v7
16729TEST_TAR_FORMAT=v7
16730export TEST_TAR_FORMAT
16731TAR_OPTIONS=\"-H v7\"
16732export TAR_OPTIONS
16733rm -rf *
16734
16735
16736test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16737
16738mkexcltest etest
16739tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16740)"
16741at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
16742( $at_check_trace;
16743mkdir v7
16744(cd v7
16745TEST_TAR_FORMAT=v7
16746export TEST_TAR_FORMAT
16747TAR_OPTIONS="-H v7"
16748export TAR_OPTIONS
16749rm -rf *
16750
16751
16752test -z "`sort < /dev/null 2>&1`" || exit 77
16753
16754mkexcltest etest
16755tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16756)
16757) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16758at_status=$? at_failed=false
16759$at_check_filter
16760echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
16761" | \
16762  $at_diff - "$at_stderr" || at_failed=:
16763echo >>"$at_stdout"; $as_echo "etest/
16764etest/top-level-file
16765" | \
16766  $at_diff - "$at_stdout" || at_failed=:
16767at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
16768$at_failed && at_fn_log_failure
16769$at_traceon; }
16770
16771              { set +x
16772$as_echo "$at_srcdir/exclude14.at:39:
16773mkdir oldgnu
16774(cd oldgnu
16775TEST_TAR_FORMAT=oldgnu
16776export TEST_TAR_FORMAT
16777TAR_OPTIONS=\"-H oldgnu\"
16778export TAR_OPTIONS
16779rm -rf *
16780
16781
16782test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16783
16784mkexcltest etest
16785tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16786)"
16787at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
16788( $at_check_trace;
16789mkdir oldgnu
16790(cd oldgnu
16791TEST_TAR_FORMAT=oldgnu
16792export TEST_TAR_FORMAT
16793TAR_OPTIONS="-H oldgnu"
16794export TAR_OPTIONS
16795rm -rf *
16796
16797
16798test -z "`sort < /dev/null 2>&1`" || exit 77
16799
16800mkexcltest etest
16801tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16802)
16803) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16804at_status=$? at_failed=false
16805$at_check_filter
16806echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
16807" | \
16808  $at_diff - "$at_stderr" || at_failed=:
16809echo >>"$at_stdout"; $as_echo "etest/
16810etest/top-level-file
16811" | \
16812  $at_diff - "$at_stdout" || at_failed=:
16813at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
16814$at_failed && at_fn_log_failure
16815$at_traceon; }
16816
16817              { set +x
16818$as_echo "$at_srcdir/exclude14.at:39:
16819mkdir ustar
16820(cd ustar
16821TEST_TAR_FORMAT=ustar
16822export TEST_TAR_FORMAT
16823TAR_OPTIONS=\"-H ustar\"
16824export TAR_OPTIONS
16825rm -rf *
16826
16827
16828test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16829
16830mkexcltest etest
16831tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16832)"
16833at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
16834( $at_check_trace;
16835mkdir ustar
16836(cd ustar
16837TEST_TAR_FORMAT=ustar
16838export TEST_TAR_FORMAT
16839TAR_OPTIONS="-H ustar"
16840export TAR_OPTIONS
16841rm -rf *
16842
16843
16844test -z "`sort < /dev/null 2>&1`" || exit 77
16845
16846mkexcltest etest
16847tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16848)
16849) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16850at_status=$? at_failed=false
16851$at_check_filter
16852echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
16853" | \
16854  $at_diff - "$at_stderr" || at_failed=:
16855echo >>"$at_stdout"; $as_echo "etest/
16856etest/top-level-file
16857" | \
16858  $at_diff - "$at_stdout" || at_failed=:
16859at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
16860$at_failed && at_fn_log_failure
16861$at_traceon; }
16862
16863              { set +x
16864$as_echo "$at_srcdir/exclude14.at:39:
16865mkdir posix
16866(cd posix
16867TEST_TAR_FORMAT=posix
16868export TEST_TAR_FORMAT
16869TAR_OPTIONS=\"-H posix\"
16870export TAR_OPTIONS
16871rm -rf *
16872
16873
16874test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16875
16876mkexcltest etest
16877tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16878)"
16879at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
16880( $at_check_trace;
16881mkdir posix
16882(cd posix
16883TEST_TAR_FORMAT=posix
16884export TEST_TAR_FORMAT
16885TAR_OPTIONS="-H posix"
16886export TAR_OPTIONS
16887rm -rf *
16888
16889
16890test -z "`sort < /dev/null 2>&1`" || exit 77
16891
16892mkexcltest etest
16893tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16894)
16895) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16896at_status=$? at_failed=false
16897$at_check_filter
16898echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
16899" | \
16900  $at_diff - "$at_stderr" || at_failed=:
16901echo >>"$at_stdout"; $as_echo "etest/
16902etest/top-level-file
16903" | \
16904  $at_diff - "$at_stdout" || at_failed=:
16905at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
16906$at_failed && at_fn_log_failure
16907$at_traceon; }
16908
16909              { set +x
16910$as_echo "$at_srcdir/exclude14.at:39:
16911mkdir gnu
16912(cd gnu
16913TEST_TAR_FORMAT=gnu
16914export TEST_TAR_FORMAT
16915TAR_OPTIONS=\"-H gnu\"
16916export TAR_OPTIONS
16917rm -rf *
16918
16919
16920test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16921
16922mkexcltest etest
16923tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16924)"
16925at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
16926( $at_check_trace;
16927mkdir gnu
16928(cd gnu
16929TEST_TAR_FORMAT=gnu
16930export TEST_TAR_FORMAT
16931TAR_OPTIONS="-H gnu"
16932export TAR_OPTIONS
16933rm -rf *
16934
16935
16936test -z "`sort < /dev/null 2>&1`" || exit 77
16937
16938mkexcltest etest
16939tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
16940)
16941) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16942at_status=$? at_failed=false
16943$at_check_filter
16944echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
16945" | \
16946  $at_diff - "$at_stderr" || at_failed=:
16947echo >>"$at_stdout"; $as_echo "etest/
16948etest/top-level-file
16949" | \
16950  $at_diff - "$at_stdout" || at_failed=:
16951at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
16952$at_failed && at_fn_log_failure
16953$at_traceon; }
16954
16955
16956
16957
16958  set +x
16959  $at_times_p && times >"$at_times_file"
16960) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16961read at_status <"$at_status_file"
16962#AT_STOP_73
16963#AT_START_74
16964at_fn_group_banner 74 'exclude15.at:36' \
16965  "--exclude-tag-all and --listed-incremental" "     " 11
16966at_xfail=no
16967      test -f $XFAILFILE && at_xfail=yes
16968(
16969  $as_echo "74. $at_setup_line: testing $at_desc ..."
16970  $at_traceon
16971
16972
16973
16974
16975
16976  { set +x
16977$as_echo "$at_srcdir/exclude15.at:39:
16978mkdir gnu
16979(cd gnu
16980TEST_TAR_FORMAT=gnu
16981export TEST_TAR_FORMAT
16982TAR_OPTIONS=\"-H gnu\"
16983export TAR_OPTIONS
16984rm -rf *
16985
16986
16987test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
16988
16989mkexcltest etest
16990tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
16991)"
16992at_fn_check_prepare_notrace 'a `...` command substitution' "exclude15.at:39"
16993( $at_check_trace;
16994mkdir gnu
16995(cd gnu
16996TEST_TAR_FORMAT=gnu
16997export TEST_TAR_FORMAT
16998TAR_OPTIONS="-H gnu"
16999export TAR_OPTIONS
17000rm -rf *
17001
17002
17003test -z "`sort < /dev/null 2>&1`" || exit 77
17004
17005mkexcltest etest
17006tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
17007)
17008) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17009at_status=$? at_failed=false
17010$at_check_filter
17011echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
17012tar: etest/subdir: Directory is new
17013tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
17014" | \
17015  $at_diff - "$at_stderr" || at_failed=:
17016echo >>"$at_stdout"; $as_echo "etest/
17017etest/top-level-file
17018" | \
17019  $at_diff - "$at_stdout" || at_failed=:
17020at_fn_check_status 0 $at_status "$at_srcdir/exclude15.at:39"
17021$at_failed && at_fn_log_failure
17022$at_traceon; }
17023
17024
17025
17026
17027  set +x
17028  $at_times_p && times >"$at_times_file"
17029) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17030read at_status <"$at_status_file"
17031#AT_STOP_74
17032#AT_START_75
17033at_fn_group_banner 75 'exclude16.at:38' \
17034  "--exclude-tag-all option in incremental pass" "   " 11
17035at_xfail=no
17036      test -f $XFAILFILE && at_xfail=yes
17037(
17038  $as_echo "75. $at_setup_line: testing $at_desc ..."
17039  $at_traceon
17040
17041
17042
17043
17044
17045  { set +x
17046$as_echo "$at_srcdir/exclude16.at:41:
17047mkdir gnu
17048(cd gnu
17049TEST_TAR_FORMAT=gnu
17050export TEST_TAR_FORMAT
17051TAR_OPTIONS=\"-H gnu\"
17052export TAR_OPTIONS
17053rm -rf *
17054
17055
17056test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
17057
17058mkexcltest etest
17059rm etest/subdir/excludeme
17060decho \"# Level 0\"
17061tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
17062touch etest/subdir/excludeme
17063touch etest/subdir/otherfile
17064
17065decho \"# Level 1\"
17066cp snar-0 snar-1
17067tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
17068)"
17069at_fn_check_prepare_notrace 'a `...` command substitution' "exclude16.at:41"
17070( $at_check_trace;
17071mkdir gnu
17072(cd gnu
17073TEST_TAR_FORMAT=gnu
17074export TEST_TAR_FORMAT
17075TAR_OPTIONS="-H gnu"
17076export TAR_OPTIONS
17077rm -rf *
17078
17079
17080test -z "`sort < /dev/null 2>&1`" || exit 77
17081
17082mkexcltest etest
17083rm etest/subdir/excludeme
17084decho "# Level 0"
17085tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
17086touch etest/subdir/excludeme
17087touch etest/subdir/otherfile
17088
17089decho "# Level 1"
17090cp snar-0 snar-1
17091tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
17092)
17093) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17094at_status=$? at_failed=false
17095$at_check_filter
17096echo >>"$at_stderr"; $as_echo "# Level 0
17097tar: etest: Directory is new
17098tar: etest/subdir: Directory is new
17099# Level 1
17100tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
17101" | \
17102  $at_diff - "$at_stderr" || at_failed=:
17103echo >>"$at_stdout"; $as_echo "# Level 0
17104etest/
17105etest/subdir/
17106etest/subdir/subdir-file
17107etest/top-level-file
17108# Level 1
17109etest/
17110" | \
17111  $at_diff - "$at_stdout" || at_failed=:
17112at_fn_check_status 0 $at_status "$at_srcdir/exclude16.at:41"
17113$at_failed && at_fn_log_failure
17114$at_traceon; }
17115
17116
17117
17118
17119  set +x
17120  $at_times_p && times >"$at_times_file"
17121) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17122read at_status <"$at_status_file"
17123#AT_STOP_75
17124#AT_START_76
17125at_fn_group_banner 76 'delete01.at:23' \
17126  "deleting a member after a big one" "              " 12
17127at_xfail=no
17128      test -f $XFAILFILE && at_xfail=yes
17129(
17130  $as_echo "76. $at_setup_line: testing $at_desc ..."
17131  $at_traceon
17132
17133
17134
17135
17136
17137  { set +x
17138$as_echo "$at_srcdir/delete01.at:26:
17139mkdir v7
17140(cd v7
17141TEST_TAR_FORMAT=v7
17142export TEST_TAR_FORMAT
17143TAR_OPTIONS=\"-H v7\"
17144export TAR_OPTIONS
17145rm -rf *
17146
17147genfile -l 50000 --file file1
17148genfile -l 1024 --file file2
17149tar cf archive file1 file2
17150tar f archive --delete file2
17151tar tf archive)"
17152at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
17153( $at_check_trace;
17154mkdir v7
17155(cd v7
17156TEST_TAR_FORMAT=v7
17157export TEST_TAR_FORMAT
17158TAR_OPTIONS="-H v7"
17159export TAR_OPTIONS
17160rm -rf *
17161
17162genfile -l 50000 --file file1
17163genfile -l 1024 --file file2
17164tar cf archive file1 file2
17165tar f archive --delete file2
17166tar tf archive)
17167) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17168at_status=$? at_failed=false
17169$at_check_filter
17170at_fn_diff_devnull "$at_stderr" || at_failed=:
17171echo >>"$at_stdout"; $as_echo "file1
17172" | \
17173  $at_diff - "$at_stdout" || at_failed=:
17174at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
17175$at_failed && at_fn_log_failure
17176$at_traceon; }
17177
17178              { set +x
17179$as_echo "$at_srcdir/delete01.at:26:
17180mkdir oldgnu
17181(cd oldgnu
17182TEST_TAR_FORMAT=oldgnu
17183export TEST_TAR_FORMAT
17184TAR_OPTIONS=\"-H oldgnu\"
17185export TAR_OPTIONS
17186rm -rf *
17187
17188genfile -l 50000 --file file1
17189genfile -l 1024 --file file2
17190tar cf archive file1 file2
17191tar f archive --delete file2
17192tar tf archive)"
17193at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
17194( $at_check_trace;
17195mkdir oldgnu
17196(cd oldgnu
17197TEST_TAR_FORMAT=oldgnu
17198export TEST_TAR_FORMAT
17199TAR_OPTIONS="-H oldgnu"
17200export TAR_OPTIONS
17201rm -rf *
17202
17203genfile -l 50000 --file file1
17204genfile -l 1024 --file file2
17205tar cf archive file1 file2
17206tar f archive --delete file2
17207tar tf archive)
17208) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17209at_status=$? at_failed=false
17210$at_check_filter
17211at_fn_diff_devnull "$at_stderr" || at_failed=:
17212echo >>"$at_stdout"; $as_echo "file1
17213" | \
17214  $at_diff - "$at_stdout" || at_failed=:
17215at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
17216$at_failed && at_fn_log_failure
17217$at_traceon; }
17218
17219              { set +x
17220$as_echo "$at_srcdir/delete01.at:26:
17221mkdir ustar
17222(cd ustar
17223TEST_TAR_FORMAT=ustar
17224export TEST_TAR_FORMAT
17225TAR_OPTIONS=\"-H ustar\"
17226export TAR_OPTIONS
17227rm -rf *
17228
17229genfile -l 50000 --file file1
17230genfile -l 1024 --file file2
17231tar cf archive file1 file2
17232tar f archive --delete file2
17233tar tf archive)"
17234at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
17235( $at_check_trace;
17236mkdir ustar
17237(cd ustar
17238TEST_TAR_FORMAT=ustar
17239export TEST_TAR_FORMAT
17240TAR_OPTIONS="-H ustar"
17241export TAR_OPTIONS
17242rm -rf *
17243
17244genfile -l 50000 --file file1
17245genfile -l 1024 --file file2
17246tar cf archive file1 file2
17247tar f archive --delete file2
17248tar tf archive)
17249) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17250at_status=$? at_failed=false
17251$at_check_filter
17252at_fn_diff_devnull "$at_stderr" || at_failed=:
17253echo >>"$at_stdout"; $as_echo "file1
17254" | \
17255  $at_diff - "$at_stdout" || at_failed=:
17256at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
17257$at_failed && at_fn_log_failure
17258$at_traceon; }
17259
17260              { set +x
17261$as_echo "$at_srcdir/delete01.at:26:
17262mkdir posix
17263(cd posix
17264TEST_TAR_FORMAT=posix
17265export TEST_TAR_FORMAT
17266TAR_OPTIONS=\"-H posix\"
17267export TAR_OPTIONS
17268rm -rf *
17269
17270genfile -l 50000 --file file1
17271genfile -l 1024 --file file2
17272tar cf archive file1 file2
17273tar f archive --delete file2
17274tar tf archive)"
17275at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
17276( $at_check_trace;
17277mkdir posix
17278(cd posix
17279TEST_TAR_FORMAT=posix
17280export TEST_TAR_FORMAT
17281TAR_OPTIONS="-H posix"
17282export TAR_OPTIONS
17283rm -rf *
17284
17285genfile -l 50000 --file file1
17286genfile -l 1024 --file file2
17287tar cf archive file1 file2
17288tar f archive --delete file2
17289tar tf archive)
17290) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17291at_status=$? at_failed=false
17292$at_check_filter
17293at_fn_diff_devnull "$at_stderr" || at_failed=:
17294echo >>"$at_stdout"; $as_echo "file1
17295" | \
17296  $at_diff - "$at_stdout" || at_failed=:
17297at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
17298$at_failed && at_fn_log_failure
17299$at_traceon; }
17300
17301              { set +x
17302$as_echo "$at_srcdir/delete01.at:26:
17303mkdir gnu
17304(cd gnu
17305TEST_TAR_FORMAT=gnu
17306export TEST_TAR_FORMAT
17307TAR_OPTIONS=\"-H gnu\"
17308export TAR_OPTIONS
17309rm -rf *
17310
17311genfile -l 50000 --file file1
17312genfile -l 1024 --file file2
17313tar cf archive file1 file2
17314tar f archive --delete file2
17315tar tf archive)"
17316at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
17317( $at_check_trace;
17318mkdir gnu
17319(cd gnu
17320TEST_TAR_FORMAT=gnu
17321export TEST_TAR_FORMAT
17322TAR_OPTIONS="-H gnu"
17323export TAR_OPTIONS
17324rm -rf *
17325
17326genfile -l 50000 --file file1
17327genfile -l 1024 --file file2
17328tar cf archive file1 file2
17329tar f archive --delete file2
17330tar tf archive)
17331) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17332at_status=$? at_failed=false
17333$at_check_filter
17334at_fn_diff_devnull "$at_stderr" || at_failed=:
17335echo >>"$at_stdout"; $as_echo "file1
17336" | \
17337  $at_diff - "$at_stdout" || at_failed=:
17338at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
17339$at_failed && at_fn_log_failure
17340$at_traceon; }
17341
17342
17343
17344
17345  set +x
17346  $at_times_p && times >"$at_times_file"
17347) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17348read at_status <"$at_status_file"
17349#AT_STOP_76
17350#AT_START_77
17351at_fn_group_banner 77 'delete02.at:23' \
17352  "deleting a member from stdin archive" "           " 12
17353at_xfail=no
17354      test -f $XFAILFILE && at_xfail=yes
17355(
17356  $as_echo "77. $at_setup_line: testing $at_desc ..."
17357  $at_traceon
17358
17359
17360
17361
17362
17363  { set +x
17364$as_echo "$at_srcdir/delete02.at:26:
17365mkdir v7
17366(cd v7
17367TEST_TAR_FORMAT=v7
17368export TEST_TAR_FORMAT
17369TAR_OPTIONS=\"-H v7\"
17370export TAR_OPTIONS
17371rm -rf *
17372
17373genfile -l 3073 -p zeros --file 1
17374cp 1 2
17375cp 2 3
17376tar cf archive 1 2 3
17377tar tf archive
17378cat archive | tar f - --delete 2 > archive2
17379echo separator
17380tar tf archive2)"
17381at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
17382( $at_check_trace;
17383mkdir v7
17384(cd v7
17385TEST_TAR_FORMAT=v7
17386export TEST_TAR_FORMAT
17387TAR_OPTIONS="-H v7"
17388export TAR_OPTIONS
17389rm -rf *
17390
17391genfile -l 3073 -p zeros --file 1
17392cp 1 2
17393cp 2 3
17394tar cf archive 1 2 3
17395tar tf archive
17396cat archive | tar f - --delete 2 > archive2
17397echo separator
17398tar tf archive2)
17399) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17400at_status=$? at_failed=false
17401$at_check_filter
17402at_fn_diff_devnull "$at_stderr" || at_failed=:
17403echo >>"$at_stdout"; $as_echo "1
174042
174053
17406separator
174071
174083
17409" | \
17410  $at_diff - "$at_stdout" || at_failed=:
17411at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
17412$at_failed && at_fn_log_failure
17413$at_traceon; }
17414
17415              { set +x
17416$as_echo "$at_srcdir/delete02.at:26:
17417mkdir oldgnu
17418(cd oldgnu
17419TEST_TAR_FORMAT=oldgnu
17420export TEST_TAR_FORMAT
17421TAR_OPTIONS=\"-H oldgnu\"
17422export TAR_OPTIONS
17423rm -rf *
17424
17425genfile -l 3073 -p zeros --file 1
17426cp 1 2
17427cp 2 3
17428tar cf archive 1 2 3
17429tar tf archive
17430cat archive | tar f - --delete 2 > archive2
17431echo separator
17432tar tf archive2)"
17433at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
17434( $at_check_trace;
17435mkdir oldgnu
17436(cd oldgnu
17437TEST_TAR_FORMAT=oldgnu
17438export TEST_TAR_FORMAT
17439TAR_OPTIONS="-H oldgnu"
17440export TAR_OPTIONS
17441rm -rf *
17442
17443genfile -l 3073 -p zeros --file 1
17444cp 1 2
17445cp 2 3
17446tar cf archive 1 2 3
17447tar tf archive
17448cat archive | tar f - --delete 2 > archive2
17449echo separator
17450tar tf archive2)
17451) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17452at_status=$? at_failed=false
17453$at_check_filter
17454at_fn_diff_devnull "$at_stderr" || at_failed=:
17455echo >>"$at_stdout"; $as_echo "1
174562
174573
17458separator
174591
174603
17461" | \
17462  $at_diff - "$at_stdout" || at_failed=:
17463at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
17464$at_failed && at_fn_log_failure
17465$at_traceon; }
17466
17467              { set +x
17468$as_echo "$at_srcdir/delete02.at:26:
17469mkdir ustar
17470(cd ustar
17471TEST_TAR_FORMAT=ustar
17472export TEST_TAR_FORMAT
17473TAR_OPTIONS=\"-H ustar\"
17474export TAR_OPTIONS
17475rm -rf *
17476
17477genfile -l 3073 -p zeros --file 1
17478cp 1 2
17479cp 2 3
17480tar cf archive 1 2 3
17481tar tf archive
17482cat archive | tar f - --delete 2 > archive2
17483echo separator
17484tar tf archive2)"
17485at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
17486( $at_check_trace;
17487mkdir ustar
17488(cd ustar
17489TEST_TAR_FORMAT=ustar
17490export TEST_TAR_FORMAT
17491TAR_OPTIONS="-H ustar"
17492export TAR_OPTIONS
17493rm -rf *
17494
17495genfile -l 3073 -p zeros --file 1
17496cp 1 2
17497cp 2 3
17498tar cf archive 1 2 3
17499tar tf archive
17500cat archive | tar f - --delete 2 > archive2
17501echo separator
17502tar tf archive2)
17503) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17504at_status=$? at_failed=false
17505$at_check_filter
17506at_fn_diff_devnull "$at_stderr" || at_failed=:
17507echo >>"$at_stdout"; $as_echo "1
175082
175093
17510separator
175111
175123
17513" | \
17514  $at_diff - "$at_stdout" || at_failed=:
17515at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
17516$at_failed && at_fn_log_failure
17517$at_traceon; }
17518
17519              { set +x
17520$as_echo "$at_srcdir/delete02.at:26:
17521mkdir posix
17522(cd posix
17523TEST_TAR_FORMAT=posix
17524export TEST_TAR_FORMAT
17525TAR_OPTIONS=\"-H posix\"
17526export TAR_OPTIONS
17527rm -rf *
17528
17529genfile -l 3073 -p zeros --file 1
17530cp 1 2
17531cp 2 3
17532tar cf archive 1 2 3
17533tar tf archive
17534cat archive | tar f - --delete 2 > archive2
17535echo separator
17536tar tf archive2)"
17537at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
17538( $at_check_trace;
17539mkdir posix
17540(cd posix
17541TEST_TAR_FORMAT=posix
17542export TEST_TAR_FORMAT
17543TAR_OPTIONS="-H posix"
17544export TAR_OPTIONS
17545rm -rf *
17546
17547genfile -l 3073 -p zeros --file 1
17548cp 1 2
17549cp 2 3
17550tar cf archive 1 2 3
17551tar tf archive
17552cat archive | tar f - --delete 2 > archive2
17553echo separator
17554tar tf archive2)
17555) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17556at_status=$? at_failed=false
17557$at_check_filter
17558at_fn_diff_devnull "$at_stderr" || at_failed=:
17559echo >>"$at_stdout"; $as_echo "1
175602
175613
17562separator
175631
175643
17565" | \
17566  $at_diff - "$at_stdout" || at_failed=:
17567at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
17568$at_failed && at_fn_log_failure
17569$at_traceon; }
17570
17571              { set +x
17572$as_echo "$at_srcdir/delete02.at:26:
17573mkdir gnu
17574(cd gnu
17575TEST_TAR_FORMAT=gnu
17576export TEST_TAR_FORMAT
17577TAR_OPTIONS=\"-H gnu\"
17578export TAR_OPTIONS
17579rm -rf *
17580
17581genfile -l 3073 -p zeros --file 1
17582cp 1 2
17583cp 2 3
17584tar cf archive 1 2 3
17585tar tf archive
17586cat archive | tar f - --delete 2 > archive2
17587echo separator
17588tar tf archive2)"
17589at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
17590( $at_check_trace;
17591mkdir gnu
17592(cd gnu
17593TEST_TAR_FORMAT=gnu
17594export TEST_TAR_FORMAT
17595TAR_OPTIONS="-H gnu"
17596export TAR_OPTIONS
17597rm -rf *
17598
17599genfile -l 3073 -p zeros --file 1
17600cp 1 2
17601cp 2 3
17602tar cf archive 1 2 3
17603tar tf archive
17604cat archive | tar f - --delete 2 > archive2
17605echo separator
17606tar tf archive2)
17607) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17608at_status=$? at_failed=false
17609$at_check_filter
17610at_fn_diff_devnull "$at_stderr" || at_failed=:
17611echo >>"$at_stdout"; $as_echo "1
176122
176133
17614separator
176151
176163
17617" | \
17618  $at_diff - "$at_stdout" || at_failed=:
17619at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
17620$at_failed && at_fn_log_failure
17621$at_traceon; }
17622
17623
17624
17625
17626  set +x
17627  $at_times_p && times >"$at_times_file"
17628) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17629read at_status <"$at_status_file"
17630#AT_STOP_77
17631#AT_START_78
17632at_fn_group_banner 78 'delete03.at:21' \
17633  "deleting members with long names" "               " 12
17634at_xfail=no
17635      test -f $XFAILFILE && at_xfail=yes
17636(
17637  $as_echo "78. $at_setup_line: testing $at_desc ..."
17638  $at_traceon
17639
17640
17641
17642
17643
17644
17645
17646  { set +x
17647$as_echo "$at_srcdir/delete03.at:26:
17648mkdir gnu
17649(cd gnu
17650TEST_TAR_FORMAT=gnu
17651export TEST_TAR_FORMAT
17652TAR_OPTIONS=\"-H gnu\"
17653export TAR_OPTIONS
17654rm -rf *
17655
17656
17657prefix=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
17658rm -f \$prefix*
17659for i in 1 2 3 4 5 6 7 8 9
17660do touch \$prefix\$i
17661done
17662tar -cf archive ./\$prefix* &&
17663 tar --delete -f archive ./\${prefix}5 &&
17664 tar -tf archive
17665)"
17666at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
17667( $at_check_trace;
17668mkdir gnu
17669(cd gnu
17670TEST_TAR_FORMAT=gnu
17671export TEST_TAR_FORMAT
17672TAR_OPTIONS="-H gnu"
17673export TAR_OPTIONS
17674rm -rf *
17675
17676
17677prefix=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
17678rm -f $prefix*
17679for i in 1 2 3 4 5 6 7 8 9
17680do touch $prefix$i
17681done
17682tar -cf archive ./$prefix* &&
17683 tar --delete -f archive ./${prefix}5 &&
17684 tar -tf archive
17685)
17686) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17687at_status=$? at_failed=false
17688$at_check_filter
17689at_fn_diff_devnull "$at_stderr" || at_failed=:
17690echo >>"$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
17691./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
17692./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
17693./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
17694./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
17695./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
17696./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
17697./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
17698" | \
17699  $at_diff - "$at_stdout" || at_failed=:
17700at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
17701$at_failed && at_fn_log_failure
17702$at_traceon; }
17703
17704              { set +x
17705$as_echo "$at_srcdir/delete03.at:26:
17706mkdir oldgnu
17707(cd oldgnu
17708TEST_TAR_FORMAT=oldgnu
17709export TEST_TAR_FORMAT
17710TAR_OPTIONS=\"-H oldgnu\"
17711export TAR_OPTIONS
17712rm -rf *
17713
17714
17715prefix=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
17716rm -f \$prefix*
17717for i in 1 2 3 4 5 6 7 8 9
17718do touch \$prefix\$i
17719done
17720tar -cf archive ./\$prefix* &&
17721 tar --delete -f archive ./\${prefix}5 &&
17722 tar -tf archive
17723)"
17724at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
17725( $at_check_trace;
17726mkdir oldgnu
17727(cd oldgnu
17728TEST_TAR_FORMAT=oldgnu
17729export TEST_TAR_FORMAT
17730TAR_OPTIONS="-H oldgnu"
17731export TAR_OPTIONS
17732rm -rf *
17733
17734
17735prefix=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
17736rm -f $prefix*
17737for i in 1 2 3 4 5 6 7 8 9
17738do touch $prefix$i
17739done
17740tar -cf archive ./$prefix* &&
17741 tar --delete -f archive ./${prefix}5 &&
17742 tar -tf archive
17743)
17744) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17745at_status=$? at_failed=false
17746$at_check_filter
17747at_fn_diff_devnull "$at_stderr" || at_failed=:
17748echo >>"$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
17749./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
17750./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
17751./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
17752./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
17753./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
17754./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
17755./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
17756" | \
17757  $at_diff - "$at_stdout" || at_failed=:
17758at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
17759$at_failed && at_fn_log_failure
17760$at_traceon; }
17761
17762              { set +x
17763$as_echo "$at_srcdir/delete03.at:26:
17764mkdir posix
17765(cd posix
17766TEST_TAR_FORMAT=posix
17767export TEST_TAR_FORMAT
17768TAR_OPTIONS=\"-H posix\"
17769export TAR_OPTIONS
17770rm -rf *
17771
17772
17773prefix=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
17774rm -f \$prefix*
17775for i in 1 2 3 4 5 6 7 8 9
17776do touch \$prefix\$i
17777done
17778tar -cf archive ./\$prefix* &&
17779 tar --delete -f archive ./\${prefix}5 &&
17780 tar -tf archive
17781)"
17782at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
17783( $at_check_trace;
17784mkdir posix
17785(cd posix
17786TEST_TAR_FORMAT=posix
17787export TEST_TAR_FORMAT
17788TAR_OPTIONS="-H posix"
17789export TAR_OPTIONS
17790rm -rf *
17791
17792
17793prefix=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
17794rm -f $prefix*
17795for i in 1 2 3 4 5 6 7 8 9
17796do touch $prefix$i
17797done
17798tar -cf archive ./$prefix* &&
17799 tar --delete -f archive ./${prefix}5 &&
17800 tar -tf archive
17801)
17802) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17803at_status=$? at_failed=false
17804$at_check_filter
17805at_fn_diff_devnull "$at_stderr" || at_failed=:
17806echo >>"$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
17807./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
17808./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
17809./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
17810./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
17811./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
17812./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
17813./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
17814" | \
17815  $at_diff - "$at_stdout" || at_failed=:
17816at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
17817$at_failed && at_fn_log_failure
17818$at_traceon; }
17819
17820
17821
17822
17823
17824  set +x
17825  $at_times_p && times >"$at_times_file"
17826) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17827read at_status <"$at_status_file"
17828#AT_STOP_78
17829#AT_START_79
17830at_fn_group_banner 79 'delete04.at:23' \
17831  "deleting a large last member" "                   " 12
17832at_xfail=no
17833      test -f $XFAILFILE && at_xfail=yes
17834(
17835  $as_echo "79. $at_setup_line: testing $at_desc ..."
17836  $at_traceon
17837
17838
17839
17840
17841
17842  { set +x
17843$as_echo "$at_srcdir/delete04.at:26:
17844mkdir v7
17845(cd v7
17846TEST_TAR_FORMAT=v7
17847export TEST_TAR_FORMAT
17848TAR_OPTIONS=\"-H v7\"
17849export TAR_OPTIONS
17850rm -rf *
17851
17852genfile -l      3 -f file1
17853genfile -l      5 -f file2
17854genfile -l      3 -f file3
17855genfile -l      6 -f file4
17856genfile -l     24 -f file5
17857genfile -l     13 -f file6
17858genfile -l   1385 -f file7
17859genfile -l     30 -f file8
17860genfile -l     10 -f file9
17861genfile -l 256000 -f file10
17862tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
17863tar f archive --delete file10
17864tar tf archive
17865)"
17866at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
17867( $at_check_trace;
17868mkdir v7
17869(cd v7
17870TEST_TAR_FORMAT=v7
17871export TEST_TAR_FORMAT
17872TAR_OPTIONS="-H v7"
17873export TAR_OPTIONS
17874rm -rf *
17875
17876genfile -l      3 -f file1
17877genfile -l      5 -f file2
17878genfile -l      3 -f file3
17879genfile -l      6 -f file4
17880genfile -l     24 -f file5
17881genfile -l     13 -f file6
17882genfile -l   1385 -f file7
17883genfile -l     30 -f file8
17884genfile -l     10 -f file9
17885genfile -l 256000 -f file10
17886tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
17887tar f archive --delete file10
17888tar tf archive
17889)
17890) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17891at_status=$? at_failed=false
17892$at_check_filter
17893at_fn_diff_devnull "$at_stderr" || at_failed=:
17894echo >>"$at_stdout"; $as_echo "file1
17895file2
17896file3
17897file4
17898file5
17899file6
17900file7
17901file8
17902file9
17903" | \
17904  $at_diff - "$at_stdout" || at_failed=:
17905at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
17906$at_failed && at_fn_log_failure
17907$at_traceon; }
17908
17909              { set +x
17910$as_echo "$at_srcdir/delete04.at:26:
17911mkdir oldgnu
17912(cd oldgnu
17913TEST_TAR_FORMAT=oldgnu
17914export TEST_TAR_FORMAT
17915TAR_OPTIONS=\"-H oldgnu\"
17916export TAR_OPTIONS
17917rm -rf *
17918
17919genfile -l      3 -f file1
17920genfile -l      5 -f file2
17921genfile -l      3 -f file3
17922genfile -l      6 -f file4
17923genfile -l     24 -f file5
17924genfile -l     13 -f file6
17925genfile -l   1385 -f file7
17926genfile -l     30 -f file8
17927genfile -l     10 -f file9
17928genfile -l 256000 -f file10
17929tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
17930tar f archive --delete file10
17931tar tf archive
17932)"
17933at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
17934( $at_check_trace;
17935mkdir oldgnu
17936(cd oldgnu
17937TEST_TAR_FORMAT=oldgnu
17938export TEST_TAR_FORMAT
17939TAR_OPTIONS="-H oldgnu"
17940export TAR_OPTIONS
17941rm -rf *
17942
17943genfile -l      3 -f file1
17944genfile -l      5 -f file2
17945genfile -l      3 -f file3
17946genfile -l      6 -f file4
17947genfile -l     24 -f file5
17948genfile -l     13 -f file6
17949genfile -l   1385 -f file7
17950genfile -l     30 -f file8
17951genfile -l     10 -f file9
17952genfile -l 256000 -f file10
17953tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
17954tar f archive --delete file10
17955tar tf archive
17956)
17957) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17958at_status=$? at_failed=false
17959$at_check_filter
17960at_fn_diff_devnull "$at_stderr" || at_failed=:
17961echo >>"$at_stdout"; $as_echo "file1
17962file2
17963file3
17964file4
17965file5
17966file6
17967file7
17968file8
17969file9
17970" | \
17971  $at_diff - "$at_stdout" || at_failed=:
17972at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
17973$at_failed && at_fn_log_failure
17974$at_traceon; }
17975
17976              { set +x
17977$as_echo "$at_srcdir/delete04.at:26:
17978mkdir ustar
17979(cd ustar
17980TEST_TAR_FORMAT=ustar
17981export TEST_TAR_FORMAT
17982TAR_OPTIONS=\"-H ustar\"
17983export TAR_OPTIONS
17984rm -rf *
17985
17986genfile -l      3 -f file1
17987genfile -l      5 -f file2
17988genfile -l      3 -f file3
17989genfile -l      6 -f file4
17990genfile -l     24 -f file5
17991genfile -l     13 -f file6
17992genfile -l   1385 -f file7
17993genfile -l     30 -f file8
17994genfile -l     10 -f file9
17995genfile -l 256000 -f file10
17996tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
17997tar f archive --delete file10
17998tar tf archive
17999)"
18000at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
18001( $at_check_trace;
18002mkdir ustar
18003(cd ustar
18004TEST_TAR_FORMAT=ustar
18005export TEST_TAR_FORMAT
18006TAR_OPTIONS="-H ustar"
18007export TAR_OPTIONS
18008rm -rf *
18009
18010genfile -l      3 -f file1
18011genfile -l      5 -f file2
18012genfile -l      3 -f file3
18013genfile -l      6 -f file4
18014genfile -l     24 -f file5
18015genfile -l     13 -f file6
18016genfile -l   1385 -f file7
18017genfile -l     30 -f file8
18018genfile -l     10 -f file9
18019genfile -l 256000 -f file10
18020tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
18021tar f archive --delete file10
18022tar tf archive
18023)
18024) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18025at_status=$? at_failed=false
18026$at_check_filter
18027at_fn_diff_devnull "$at_stderr" || at_failed=:
18028echo >>"$at_stdout"; $as_echo "file1
18029file2
18030file3
18031file4
18032file5
18033file6
18034file7
18035file8
18036file9
18037" | \
18038  $at_diff - "$at_stdout" || at_failed=:
18039at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
18040$at_failed && at_fn_log_failure
18041$at_traceon; }
18042
18043              { set +x
18044$as_echo "$at_srcdir/delete04.at:26:
18045mkdir posix
18046(cd posix
18047TEST_TAR_FORMAT=posix
18048export TEST_TAR_FORMAT
18049TAR_OPTIONS=\"-H posix\"
18050export TAR_OPTIONS
18051rm -rf *
18052
18053genfile -l      3 -f file1
18054genfile -l      5 -f file2
18055genfile -l      3 -f file3
18056genfile -l      6 -f file4
18057genfile -l     24 -f file5
18058genfile -l     13 -f file6
18059genfile -l   1385 -f file7
18060genfile -l     30 -f file8
18061genfile -l     10 -f file9
18062genfile -l 256000 -f file10
18063tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
18064tar f archive --delete file10
18065tar tf archive
18066)"
18067at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
18068( $at_check_trace;
18069mkdir posix
18070(cd posix
18071TEST_TAR_FORMAT=posix
18072export TEST_TAR_FORMAT
18073TAR_OPTIONS="-H posix"
18074export TAR_OPTIONS
18075rm -rf *
18076
18077genfile -l      3 -f file1
18078genfile -l      5 -f file2
18079genfile -l      3 -f file3
18080genfile -l      6 -f file4
18081genfile -l     24 -f file5
18082genfile -l     13 -f file6
18083genfile -l   1385 -f file7
18084genfile -l     30 -f file8
18085genfile -l     10 -f file9
18086genfile -l 256000 -f file10
18087tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
18088tar f archive --delete file10
18089tar tf archive
18090)
18091) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18092at_status=$? at_failed=false
18093$at_check_filter
18094at_fn_diff_devnull "$at_stderr" || at_failed=:
18095echo >>"$at_stdout"; $as_echo "file1
18096file2
18097file3
18098file4
18099file5
18100file6
18101file7
18102file8
18103file9
18104" | \
18105  $at_diff - "$at_stdout" || at_failed=:
18106at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
18107$at_failed && at_fn_log_failure
18108$at_traceon; }
18109
18110              { set +x
18111$as_echo "$at_srcdir/delete04.at:26:
18112mkdir gnu
18113(cd gnu
18114TEST_TAR_FORMAT=gnu
18115export TEST_TAR_FORMAT
18116TAR_OPTIONS=\"-H gnu\"
18117export TAR_OPTIONS
18118rm -rf *
18119
18120genfile -l      3 -f file1
18121genfile -l      5 -f file2
18122genfile -l      3 -f file3
18123genfile -l      6 -f file4
18124genfile -l     24 -f file5
18125genfile -l     13 -f file6
18126genfile -l   1385 -f file7
18127genfile -l     30 -f file8
18128genfile -l     10 -f file9
18129genfile -l 256000 -f file10
18130tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
18131tar f archive --delete file10
18132tar tf archive
18133)"
18134at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
18135( $at_check_trace;
18136mkdir gnu
18137(cd gnu
18138TEST_TAR_FORMAT=gnu
18139export TEST_TAR_FORMAT
18140TAR_OPTIONS="-H gnu"
18141export TAR_OPTIONS
18142rm -rf *
18143
18144genfile -l      3 -f file1
18145genfile -l      5 -f file2
18146genfile -l      3 -f file3
18147genfile -l      6 -f file4
18148genfile -l     24 -f file5
18149genfile -l     13 -f file6
18150genfile -l   1385 -f file7
18151genfile -l     30 -f file8
18152genfile -l     10 -f file9
18153genfile -l 256000 -f file10
18154tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
18155tar f archive --delete file10
18156tar tf archive
18157)
18158) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18159at_status=$? at_failed=false
18160$at_check_filter
18161at_fn_diff_devnull "$at_stderr" || at_failed=:
18162echo >>"$at_stdout"; $as_echo "file1
18163file2
18164file3
18165file4
18166file5
18167file6
18168file7
18169file8
18170file9
18171" | \
18172  $at_diff - "$at_stdout" || at_failed=:
18173at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
18174$at_failed && at_fn_log_failure
18175$at_traceon; }
18176
18177
18178
18179
18180  set +x
18181  $at_times_p && times >"$at_times_file"
18182) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18183read at_status <"$at_status_file"
18184#AT_STOP_79
18185#AT_START_80
18186at_fn_group_banner 80 'delete05.at:27' \
18187  "deleting non-existing member" "                   " 12
18188at_xfail=no
18189      test -f $XFAILFILE && at_xfail=yes
18190(
18191  $as_echo "80. $at_setup_line: testing $at_desc ..."
18192  $at_traceon
18193
18194
18195
18196
18197
18198  { set +x
18199$as_echo "$at_srcdir/delete05.at:30:
18200mkdir v7
18201(cd v7
18202TEST_TAR_FORMAT=v7
18203export TEST_TAR_FORMAT
18204TAR_OPTIONS=\"-H v7\"
18205export TAR_OPTIONS
18206rm -rf *
18207
18208genfile -l 1024 -f en
18209genfile -l 1024 -f to
18210
18211tar cf archive en to
18212# Make sure we don't use bogus blocking factor.
18213# GNU tar up to and including 1.14.91 produced an empty archive this way:
18214tar --file archive --blocking-factor=20 --delete tre
18215tar tf archive
18216)"
18217at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
18218( $at_check_trace;
18219mkdir v7
18220(cd v7
18221TEST_TAR_FORMAT=v7
18222export TEST_TAR_FORMAT
18223TAR_OPTIONS="-H v7"
18224export TAR_OPTIONS
18225rm -rf *
18226
18227genfile -l 1024 -f en
18228genfile -l 1024 -f to
18229
18230tar cf archive en to
18231# Make sure we don't use bogus blocking factor.
18232# GNU tar up to and including 1.14.91 produced an empty archive this way:
18233tar --file archive --blocking-factor=20 --delete tre
18234tar tf archive
18235)
18236) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18237at_status=$? at_failed=false
18238$at_check_filter
18239echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
18240tar: Exiting with failure status due to previous errors
18241" | \
18242  $at_diff - "$at_stderr" || at_failed=:
18243echo >>"$at_stdout"; $as_echo "en
18244to
18245" | \
18246  $at_diff - "$at_stdout" || at_failed=:
18247at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
18248$at_failed && at_fn_log_failure
18249$at_traceon; }
18250
18251              { set +x
18252$as_echo "$at_srcdir/delete05.at:30:
18253mkdir oldgnu
18254(cd oldgnu
18255TEST_TAR_FORMAT=oldgnu
18256export TEST_TAR_FORMAT
18257TAR_OPTIONS=\"-H oldgnu\"
18258export TAR_OPTIONS
18259rm -rf *
18260
18261genfile -l 1024 -f en
18262genfile -l 1024 -f to
18263
18264tar cf archive en to
18265# Make sure we don't use bogus blocking factor.
18266# GNU tar up to and including 1.14.91 produced an empty archive this way:
18267tar --file archive --blocking-factor=20 --delete tre
18268tar tf archive
18269)"
18270at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
18271( $at_check_trace;
18272mkdir oldgnu
18273(cd oldgnu
18274TEST_TAR_FORMAT=oldgnu
18275export TEST_TAR_FORMAT
18276TAR_OPTIONS="-H oldgnu"
18277export TAR_OPTIONS
18278rm -rf *
18279
18280genfile -l 1024 -f en
18281genfile -l 1024 -f to
18282
18283tar cf archive en to
18284# Make sure we don't use bogus blocking factor.
18285# GNU tar up to and including 1.14.91 produced an empty archive this way:
18286tar --file archive --blocking-factor=20 --delete tre
18287tar tf archive
18288)
18289) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18290at_status=$? at_failed=false
18291$at_check_filter
18292echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
18293tar: Exiting with failure status due to previous errors
18294" | \
18295  $at_diff - "$at_stderr" || at_failed=:
18296echo >>"$at_stdout"; $as_echo "en
18297to
18298" | \
18299  $at_diff - "$at_stdout" || at_failed=:
18300at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
18301$at_failed && at_fn_log_failure
18302$at_traceon; }
18303
18304              { set +x
18305$as_echo "$at_srcdir/delete05.at:30:
18306mkdir ustar
18307(cd ustar
18308TEST_TAR_FORMAT=ustar
18309export TEST_TAR_FORMAT
18310TAR_OPTIONS=\"-H ustar\"
18311export TAR_OPTIONS
18312rm -rf *
18313
18314genfile -l 1024 -f en
18315genfile -l 1024 -f to
18316
18317tar cf archive en to
18318# Make sure we don't use bogus blocking factor.
18319# GNU tar up to and including 1.14.91 produced an empty archive this way:
18320tar --file archive --blocking-factor=20 --delete tre
18321tar tf archive
18322)"
18323at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
18324( $at_check_trace;
18325mkdir ustar
18326(cd ustar
18327TEST_TAR_FORMAT=ustar
18328export TEST_TAR_FORMAT
18329TAR_OPTIONS="-H ustar"
18330export TAR_OPTIONS
18331rm -rf *
18332
18333genfile -l 1024 -f en
18334genfile -l 1024 -f to
18335
18336tar cf archive en to
18337# Make sure we don't use bogus blocking factor.
18338# GNU tar up to and including 1.14.91 produced an empty archive this way:
18339tar --file archive --blocking-factor=20 --delete tre
18340tar tf archive
18341)
18342) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18343at_status=$? at_failed=false
18344$at_check_filter
18345echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
18346tar: Exiting with failure status due to previous errors
18347" | \
18348  $at_diff - "$at_stderr" || at_failed=:
18349echo >>"$at_stdout"; $as_echo "en
18350to
18351" | \
18352  $at_diff - "$at_stdout" || at_failed=:
18353at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
18354$at_failed && at_fn_log_failure
18355$at_traceon; }
18356
18357              { set +x
18358$as_echo "$at_srcdir/delete05.at:30:
18359mkdir posix
18360(cd posix
18361TEST_TAR_FORMAT=posix
18362export TEST_TAR_FORMAT
18363TAR_OPTIONS=\"-H posix\"
18364export TAR_OPTIONS
18365rm -rf *
18366
18367genfile -l 1024 -f en
18368genfile -l 1024 -f to
18369
18370tar cf archive en to
18371# Make sure we don't use bogus blocking factor.
18372# GNU tar up to and including 1.14.91 produced an empty archive this way:
18373tar --file archive --blocking-factor=20 --delete tre
18374tar tf archive
18375)"
18376at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
18377( $at_check_trace;
18378mkdir posix
18379(cd posix
18380TEST_TAR_FORMAT=posix
18381export TEST_TAR_FORMAT
18382TAR_OPTIONS="-H posix"
18383export TAR_OPTIONS
18384rm -rf *
18385
18386genfile -l 1024 -f en
18387genfile -l 1024 -f to
18388
18389tar cf archive en to
18390# Make sure we don't use bogus blocking factor.
18391# GNU tar up to and including 1.14.91 produced an empty archive this way:
18392tar --file archive --blocking-factor=20 --delete tre
18393tar tf archive
18394)
18395) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18396at_status=$? at_failed=false
18397$at_check_filter
18398echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
18399tar: Exiting with failure status due to previous errors
18400" | \
18401  $at_diff - "$at_stderr" || at_failed=:
18402echo >>"$at_stdout"; $as_echo "en
18403to
18404" | \
18405  $at_diff - "$at_stdout" || at_failed=:
18406at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
18407$at_failed && at_fn_log_failure
18408$at_traceon; }
18409
18410              { set +x
18411$as_echo "$at_srcdir/delete05.at:30:
18412mkdir gnu
18413(cd gnu
18414TEST_TAR_FORMAT=gnu
18415export TEST_TAR_FORMAT
18416TAR_OPTIONS=\"-H gnu\"
18417export TAR_OPTIONS
18418rm -rf *
18419
18420genfile -l 1024 -f en
18421genfile -l 1024 -f to
18422
18423tar cf archive en to
18424# Make sure we don't use bogus blocking factor.
18425# GNU tar up to and including 1.14.91 produced an empty archive this way:
18426tar --file archive --blocking-factor=20 --delete tre
18427tar tf archive
18428)"
18429at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
18430( $at_check_trace;
18431mkdir gnu
18432(cd gnu
18433TEST_TAR_FORMAT=gnu
18434export TEST_TAR_FORMAT
18435TAR_OPTIONS="-H gnu"
18436export TAR_OPTIONS
18437rm -rf *
18438
18439genfile -l 1024 -f en
18440genfile -l 1024 -f to
18441
18442tar cf archive en to
18443# Make sure we don't use bogus blocking factor.
18444# GNU tar up to and including 1.14.91 produced an empty archive this way:
18445tar --file archive --blocking-factor=20 --delete tre
18446tar tf archive
18447)
18448) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18449at_status=$? at_failed=false
18450$at_check_filter
18451echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
18452tar: Exiting with failure status due to previous errors
18453" | \
18454  $at_diff - "$at_stderr" || at_failed=:
18455echo >>"$at_stdout"; $as_echo "en
18456to
18457" | \
18458  $at_diff - "$at_stdout" || at_failed=:
18459at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
18460$at_failed && at_fn_log_failure
18461$at_traceon; }
18462
18463
18464
18465
18466  set +x
18467  $at_times_p && times >"$at_times_file"
18468) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18469read at_status <"$at_status_file"
18470#AT_STOP_80
18471#AT_START_81
18472at_fn_group_banner 81 'extrac01.at:23' \
18473  "extract over an existing directory" "             " 13
18474at_xfail=no
18475      test -f $XFAILFILE && at_xfail=yes
18476(
18477  $as_echo "81. $at_setup_line: testing $at_desc ..."
18478  $at_traceon
18479
18480
18481
18482
18483
18484  { set +x
18485$as_echo "$at_srcdir/extrac01.at:26:
18486mkdir v7
18487(cd v7
18488TEST_TAR_FORMAT=v7
18489export TEST_TAR_FORMAT
18490TAR_OPTIONS=\"-H v7\"
18491export TAR_OPTIONS
18492rm -rf *
18493
18494mkdir directory
18495touch directory/file
18496tar cf archive directory || exit 1
18497tar xf archive --warning=no-timestamp || exit 1
18498)"
18499at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
18500( $at_check_trace;
18501mkdir v7
18502(cd v7
18503TEST_TAR_FORMAT=v7
18504export TEST_TAR_FORMAT
18505TAR_OPTIONS="-H v7"
18506export TAR_OPTIONS
18507rm -rf *
18508
18509mkdir directory
18510touch directory/file
18511tar cf archive directory || exit 1
18512tar xf archive --warning=no-timestamp || exit 1
18513)
18514) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18515at_status=$? at_failed=false
18516$at_check_filter
18517at_fn_diff_devnull "$at_stderr" || at_failed=:
18518at_fn_diff_devnull "$at_stdout" || at_failed=:
18519at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
18520$at_failed && at_fn_log_failure
18521$at_traceon; }
18522
18523              { set +x
18524$as_echo "$at_srcdir/extrac01.at:26:
18525mkdir oldgnu
18526(cd oldgnu
18527TEST_TAR_FORMAT=oldgnu
18528export TEST_TAR_FORMAT
18529TAR_OPTIONS=\"-H oldgnu\"
18530export TAR_OPTIONS
18531rm -rf *
18532
18533mkdir directory
18534touch directory/file
18535tar cf archive directory || exit 1
18536tar xf archive --warning=no-timestamp || exit 1
18537)"
18538at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
18539( $at_check_trace;
18540mkdir oldgnu
18541(cd oldgnu
18542TEST_TAR_FORMAT=oldgnu
18543export TEST_TAR_FORMAT
18544TAR_OPTIONS="-H oldgnu"
18545export TAR_OPTIONS
18546rm -rf *
18547
18548mkdir directory
18549touch directory/file
18550tar cf archive directory || exit 1
18551tar xf archive --warning=no-timestamp || exit 1
18552)
18553) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18554at_status=$? at_failed=false
18555$at_check_filter
18556at_fn_diff_devnull "$at_stderr" || at_failed=:
18557at_fn_diff_devnull "$at_stdout" || at_failed=:
18558at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
18559$at_failed && at_fn_log_failure
18560$at_traceon; }
18561
18562              { set +x
18563$as_echo "$at_srcdir/extrac01.at:26:
18564mkdir ustar
18565(cd ustar
18566TEST_TAR_FORMAT=ustar
18567export TEST_TAR_FORMAT
18568TAR_OPTIONS=\"-H ustar\"
18569export TAR_OPTIONS
18570rm -rf *
18571
18572mkdir directory
18573touch directory/file
18574tar cf archive directory || exit 1
18575tar xf archive --warning=no-timestamp || exit 1
18576)"
18577at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
18578( $at_check_trace;
18579mkdir ustar
18580(cd ustar
18581TEST_TAR_FORMAT=ustar
18582export TEST_TAR_FORMAT
18583TAR_OPTIONS="-H ustar"
18584export TAR_OPTIONS
18585rm -rf *
18586
18587mkdir directory
18588touch directory/file
18589tar cf archive directory || exit 1
18590tar xf archive --warning=no-timestamp || exit 1
18591)
18592) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18593at_status=$? at_failed=false
18594$at_check_filter
18595at_fn_diff_devnull "$at_stderr" || at_failed=:
18596at_fn_diff_devnull "$at_stdout" || at_failed=:
18597at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
18598$at_failed && at_fn_log_failure
18599$at_traceon; }
18600
18601              { set +x
18602$as_echo "$at_srcdir/extrac01.at:26:
18603mkdir posix
18604(cd posix
18605TEST_TAR_FORMAT=posix
18606export TEST_TAR_FORMAT
18607TAR_OPTIONS=\"-H posix\"
18608export TAR_OPTIONS
18609rm -rf *
18610
18611mkdir directory
18612touch directory/file
18613tar cf archive directory || exit 1
18614tar xf archive --warning=no-timestamp || exit 1
18615)"
18616at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
18617( $at_check_trace;
18618mkdir posix
18619(cd posix
18620TEST_TAR_FORMAT=posix
18621export TEST_TAR_FORMAT
18622TAR_OPTIONS="-H posix"
18623export TAR_OPTIONS
18624rm -rf *
18625
18626mkdir directory
18627touch directory/file
18628tar cf archive directory || exit 1
18629tar xf archive --warning=no-timestamp || exit 1
18630)
18631) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18632at_status=$? at_failed=false
18633$at_check_filter
18634at_fn_diff_devnull "$at_stderr" || at_failed=:
18635at_fn_diff_devnull "$at_stdout" || at_failed=:
18636at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
18637$at_failed && at_fn_log_failure
18638$at_traceon; }
18639
18640              { set +x
18641$as_echo "$at_srcdir/extrac01.at:26:
18642mkdir gnu
18643(cd gnu
18644TEST_TAR_FORMAT=gnu
18645export TEST_TAR_FORMAT
18646TAR_OPTIONS=\"-H gnu\"
18647export TAR_OPTIONS
18648rm -rf *
18649
18650mkdir directory
18651touch directory/file
18652tar cf archive directory || exit 1
18653tar xf archive --warning=no-timestamp || exit 1
18654)"
18655at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
18656( $at_check_trace;
18657mkdir gnu
18658(cd gnu
18659TEST_TAR_FORMAT=gnu
18660export TEST_TAR_FORMAT
18661TAR_OPTIONS="-H gnu"
18662export TAR_OPTIONS
18663rm -rf *
18664
18665mkdir directory
18666touch directory/file
18667tar cf archive directory || exit 1
18668tar xf archive --warning=no-timestamp || exit 1
18669)
18670) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18671at_status=$? at_failed=false
18672$at_check_filter
18673at_fn_diff_devnull "$at_stderr" || at_failed=:
18674at_fn_diff_devnull "$at_stdout" || at_failed=:
18675at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
18676$at_failed && at_fn_log_failure
18677$at_traceon; }
18678
18679
18680
18681
18682  set +x
18683  $at_times_p && times >"$at_times_file"
18684) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18685read at_status <"$at_status_file"
18686#AT_STOP_81
18687#AT_START_82
18688at_fn_group_banner 82 'extrac02.at:23' \
18689  "extracting symlinks over an existing file" "      " 13
18690at_xfail=no
18691      test -f $XFAILFILE && at_xfail=yes
18692(
18693  $as_echo "82. $at_setup_line: testing $at_desc ..."
18694  $at_traceon
18695
18696
18697
18698# FIXME: Skip if symlinks are not supported on the system
18699
18700
18701
18702  { set +x
18703$as_echo "$at_srcdir/extrac02.at:28:
18704mkdir v7
18705(cd v7
18706TEST_TAR_FORMAT=v7
18707export TEST_TAR_FORMAT
18708TAR_OPTIONS=\"-H v7\"
18709export TAR_OPTIONS
18710rm -rf *
18711
18712touch file
18713ln -s file link 2> /dev/null || ln file link
18714tar cf archive link
18715rm link
18716touch link
18717tar xf archive
18718)"
18719at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
18720( $at_check_trace;
18721mkdir v7
18722(cd v7
18723TEST_TAR_FORMAT=v7
18724export TEST_TAR_FORMAT
18725TAR_OPTIONS="-H v7"
18726export TAR_OPTIONS
18727rm -rf *
18728
18729touch file
18730ln -s file link 2> /dev/null || ln file link
18731tar cf archive link
18732rm link
18733touch link
18734tar xf archive
18735)
18736) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18737at_status=$? at_failed=false
18738$at_check_filter
18739at_fn_diff_devnull "$at_stderr" || at_failed=:
18740at_fn_diff_devnull "$at_stdout" || at_failed=:
18741at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
18742$at_failed && at_fn_log_failure
18743$at_traceon; }
18744
18745              { set +x
18746$as_echo "$at_srcdir/extrac02.at:28:
18747mkdir oldgnu
18748(cd oldgnu
18749TEST_TAR_FORMAT=oldgnu
18750export TEST_TAR_FORMAT
18751TAR_OPTIONS=\"-H oldgnu\"
18752export TAR_OPTIONS
18753rm -rf *
18754
18755touch file
18756ln -s file link 2> /dev/null || ln file link
18757tar cf archive link
18758rm link
18759touch link
18760tar xf archive
18761)"
18762at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
18763( $at_check_trace;
18764mkdir oldgnu
18765(cd oldgnu
18766TEST_TAR_FORMAT=oldgnu
18767export TEST_TAR_FORMAT
18768TAR_OPTIONS="-H oldgnu"
18769export TAR_OPTIONS
18770rm -rf *
18771
18772touch file
18773ln -s file link 2> /dev/null || ln file link
18774tar cf archive link
18775rm link
18776touch link
18777tar xf archive
18778)
18779) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18780at_status=$? at_failed=false
18781$at_check_filter
18782at_fn_diff_devnull "$at_stderr" || at_failed=:
18783at_fn_diff_devnull "$at_stdout" || at_failed=:
18784at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
18785$at_failed && at_fn_log_failure
18786$at_traceon; }
18787
18788              { set +x
18789$as_echo "$at_srcdir/extrac02.at:28:
18790mkdir ustar
18791(cd ustar
18792TEST_TAR_FORMAT=ustar
18793export TEST_TAR_FORMAT
18794TAR_OPTIONS=\"-H ustar\"
18795export TAR_OPTIONS
18796rm -rf *
18797
18798touch file
18799ln -s file link 2> /dev/null || ln file link
18800tar cf archive link
18801rm link
18802touch link
18803tar xf archive
18804)"
18805at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
18806( $at_check_trace;
18807mkdir ustar
18808(cd ustar
18809TEST_TAR_FORMAT=ustar
18810export TEST_TAR_FORMAT
18811TAR_OPTIONS="-H ustar"
18812export TAR_OPTIONS
18813rm -rf *
18814
18815touch file
18816ln -s file link 2> /dev/null || ln file link
18817tar cf archive link
18818rm link
18819touch link
18820tar xf archive
18821)
18822) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18823at_status=$? at_failed=false
18824$at_check_filter
18825at_fn_diff_devnull "$at_stderr" || at_failed=:
18826at_fn_diff_devnull "$at_stdout" || at_failed=:
18827at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
18828$at_failed && at_fn_log_failure
18829$at_traceon; }
18830
18831              { set +x
18832$as_echo "$at_srcdir/extrac02.at:28:
18833mkdir posix
18834(cd posix
18835TEST_TAR_FORMAT=posix
18836export TEST_TAR_FORMAT
18837TAR_OPTIONS=\"-H posix\"
18838export TAR_OPTIONS
18839rm -rf *
18840
18841touch file
18842ln -s file link 2> /dev/null || ln file link
18843tar cf archive link
18844rm link
18845touch link
18846tar xf archive
18847)"
18848at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
18849( $at_check_trace;
18850mkdir posix
18851(cd posix
18852TEST_TAR_FORMAT=posix
18853export TEST_TAR_FORMAT
18854TAR_OPTIONS="-H posix"
18855export TAR_OPTIONS
18856rm -rf *
18857
18858touch file
18859ln -s file link 2> /dev/null || ln file link
18860tar cf archive link
18861rm link
18862touch link
18863tar xf archive
18864)
18865) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18866at_status=$? at_failed=false
18867$at_check_filter
18868at_fn_diff_devnull "$at_stderr" || at_failed=:
18869at_fn_diff_devnull "$at_stdout" || at_failed=:
18870at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
18871$at_failed && at_fn_log_failure
18872$at_traceon; }
18873
18874              { set +x
18875$as_echo "$at_srcdir/extrac02.at:28:
18876mkdir gnu
18877(cd gnu
18878TEST_TAR_FORMAT=gnu
18879export TEST_TAR_FORMAT
18880TAR_OPTIONS=\"-H gnu\"
18881export TAR_OPTIONS
18882rm -rf *
18883
18884touch file
18885ln -s file link 2> /dev/null || ln file link
18886tar cf archive link
18887rm link
18888touch link
18889tar xf archive
18890)"
18891at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
18892( $at_check_trace;
18893mkdir gnu
18894(cd gnu
18895TEST_TAR_FORMAT=gnu
18896export TEST_TAR_FORMAT
18897TAR_OPTIONS="-H gnu"
18898export TAR_OPTIONS
18899rm -rf *
18900
18901touch file
18902ln -s file link 2> /dev/null || ln file link
18903tar cf archive link
18904rm link
18905touch link
18906tar xf archive
18907)
18908) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18909at_status=$? at_failed=false
18910$at_check_filter
18911at_fn_diff_devnull "$at_stderr" || at_failed=:
18912at_fn_diff_devnull "$at_stdout" || at_failed=:
18913at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
18914$at_failed && at_fn_log_failure
18915$at_traceon; }
18916
18917
18918
18919
18920  set +x
18921  $at_times_p && times >"$at_times_file"
18922) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18923read at_status <"$at_status_file"
18924#AT_STOP_82
18925#AT_START_83
18926at_fn_group_banner 83 'extrac03.at:23' \
18927  "extraction loops" "                               " 13
18928at_xfail=no
18929      test -f $XFAILFILE && at_xfail=yes
18930(
18931  $as_echo "83. $at_setup_line: testing $at_desc ..."
18932  $at_traceon
18933
18934
18935
18936
18937
18938  { set +x
18939$as_echo "$at_srcdir/extrac03.at:26:
18940mkdir v7
18941(cd v7
18942TEST_TAR_FORMAT=v7
18943export TEST_TAR_FORMAT
18944TAR_OPTIONS=\"-H v7\"
18945export TAR_OPTIONS
18946rm -rf *
18947
18948mkdir directory
18949tar -cPvf archive directory/../directory
18950echo separator
18951tar -xPvf archive --warning=no-timestamp)"
18952at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
18953( $at_check_trace;
18954mkdir v7
18955(cd v7
18956TEST_TAR_FORMAT=v7
18957export TEST_TAR_FORMAT
18958TAR_OPTIONS="-H v7"
18959export TAR_OPTIONS
18960rm -rf *
18961
18962mkdir directory
18963tar -cPvf archive directory/../directory
18964echo separator
18965tar -xPvf archive --warning=no-timestamp)
18966) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18967at_status=$? at_failed=false
18968$at_check_filter
18969at_fn_diff_devnull "$at_stderr" || at_failed=:
18970echo >>"$at_stdout"; $as_echo "directory/../directory/
18971separator
18972directory/../directory/
18973" | \
18974  $at_diff - "$at_stdout" || at_failed=:
18975at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
18976$at_failed && at_fn_log_failure
18977$at_traceon; }
18978
18979              { set +x
18980$as_echo "$at_srcdir/extrac03.at:26:
18981mkdir oldgnu
18982(cd oldgnu
18983TEST_TAR_FORMAT=oldgnu
18984export TEST_TAR_FORMAT
18985TAR_OPTIONS=\"-H oldgnu\"
18986export TAR_OPTIONS
18987rm -rf *
18988
18989mkdir directory
18990tar -cPvf archive directory/../directory
18991echo separator
18992tar -xPvf archive --warning=no-timestamp)"
18993at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
18994( $at_check_trace;
18995mkdir oldgnu
18996(cd oldgnu
18997TEST_TAR_FORMAT=oldgnu
18998export TEST_TAR_FORMAT
18999TAR_OPTIONS="-H oldgnu"
19000export TAR_OPTIONS
19001rm -rf *
19002
19003mkdir directory
19004tar -cPvf archive directory/../directory
19005echo separator
19006tar -xPvf archive --warning=no-timestamp)
19007) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19008at_status=$? at_failed=false
19009$at_check_filter
19010at_fn_diff_devnull "$at_stderr" || at_failed=:
19011echo >>"$at_stdout"; $as_echo "directory/../directory/
19012separator
19013directory/../directory/
19014" | \
19015  $at_diff - "$at_stdout" || at_failed=:
19016at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
19017$at_failed && at_fn_log_failure
19018$at_traceon; }
19019
19020              { set +x
19021$as_echo "$at_srcdir/extrac03.at:26:
19022mkdir ustar
19023(cd ustar
19024TEST_TAR_FORMAT=ustar
19025export TEST_TAR_FORMAT
19026TAR_OPTIONS=\"-H ustar\"
19027export TAR_OPTIONS
19028rm -rf *
19029
19030mkdir directory
19031tar -cPvf archive directory/../directory
19032echo separator
19033tar -xPvf archive --warning=no-timestamp)"
19034at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
19035( $at_check_trace;
19036mkdir ustar
19037(cd ustar
19038TEST_TAR_FORMAT=ustar
19039export TEST_TAR_FORMAT
19040TAR_OPTIONS="-H ustar"
19041export TAR_OPTIONS
19042rm -rf *
19043
19044mkdir directory
19045tar -cPvf archive directory/../directory
19046echo separator
19047tar -xPvf archive --warning=no-timestamp)
19048) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19049at_status=$? at_failed=false
19050$at_check_filter
19051at_fn_diff_devnull "$at_stderr" || at_failed=:
19052echo >>"$at_stdout"; $as_echo "directory/../directory/
19053separator
19054directory/../directory/
19055" | \
19056  $at_diff - "$at_stdout" || at_failed=:
19057at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
19058$at_failed && at_fn_log_failure
19059$at_traceon; }
19060
19061              { set +x
19062$as_echo "$at_srcdir/extrac03.at:26:
19063mkdir posix
19064(cd posix
19065TEST_TAR_FORMAT=posix
19066export TEST_TAR_FORMAT
19067TAR_OPTIONS=\"-H posix\"
19068export TAR_OPTIONS
19069rm -rf *
19070
19071mkdir directory
19072tar -cPvf archive directory/../directory
19073echo separator
19074tar -xPvf archive --warning=no-timestamp)"
19075at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
19076( $at_check_trace;
19077mkdir posix
19078(cd posix
19079TEST_TAR_FORMAT=posix
19080export TEST_TAR_FORMAT
19081TAR_OPTIONS="-H posix"
19082export TAR_OPTIONS
19083rm -rf *
19084
19085mkdir directory
19086tar -cPvf archive directory/../directory
19087echo separator
19088tar -xPvf archive --warning=no-timestamp)
19089) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19090at_status=$? at_failed=false
19091$at_check_filter
19092at_fn_diff_devnull "$at_stderr" || at_failed=:
19093echo >>"$at_stdout"; $as_echo "directory/../directory/
19094separator
19095directory/../directory/
19096" | \
19097  $at_diff - "$at_stdout" || at_failed=:
19098at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
19099$at_failed && at_fn_log_failure
19100$at_traceon; }
19101
19102              { set +x
19103$as_echo "$at_srcdir/extrac03.at:26:
19104mkdir gnu
19105(cd gnu
19106TEST_TAR_FORMAT=gnu
19107export TEST_TAR_FORMAT
19108TAR_OPTIONS=\"-H gnu\"
19109export TAR_OPTIONS
19110rm -rf *
19111
19112mkdir directory
19113tar -cPvf archive directory/../directory
19114echo separator
19115tar -xPvf archive --warning=no-timestamp)"
19116at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
19117( $at_check_trace;
19118mkdir gnu
19119(cd gnu
19120TEST_TAR_FORMAT=gnu
19121export TEST_TAR_FORMAT
19122TAR_OPTIONS="-H gnu"
19123export TAR_OPTIONS
19124rm -rf *
19125
19126mkdir directory
19127tar -cPvf archive directory/../directory
19128echo separator
19129tar -xPvf archive --warning=no-timestamp)
19130) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19131at_status=$? at_failed=false
19132$at_check_filter
19133at_fn_diff_devnull "$at_stderr" || at_failed=:
19134echo >>"$at_stdout"; $as_echo "directory/../directory/
19135separator
19136directory/../directory/
19137" | \
19138  $at_diff - "$at_stdout" || at_failed=:
19139at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
19140$at_failed && at_fn_log_failure
19141$at_traceon; }
19142
19143
19144
19145
19146  set +x
19147  $at_times_p && times >"$at_times_file"
19148) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19149read at_status <"$at_status_file"
19150#AT_STOP_83
19151#AT_START_84
19152at_fn_group_banner 84 'extrac04.at:23' \
19153  "extract + fnmatch" "                              " 13
19154at_xfail=no
19155      test -f $XFAILFILE && at_xfail=yes
19156(
19157  $as_echo "84. $at_setup_line: testing $at_desc ..."
19158  $at_traceon
19159
19160
19161
19162
19163
19164  { set +x
19165$as_echo "$at_srcdir/extrac04.at:26:
19166mkdir v7
19167(cd v7
19168TEST_TAR_FORMAT=v7
19169export TEST_TAR_FORMAT
19170TAR_OPTIONS=\"-H v7\"
19171export TAR_OPTIONS
19172rm -rf *
19173
19174
19175test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
19176
19177touch file1
19178mkdir directory
19179mkdir directory/subdirectory
19180touch directory/file1
19181touch directory/file2
19182touch directory/subdirectory/file1
19183touch directory/subdirectory/file2
19184tar -cf archive ./file1 directory
19185tar -tf archive \\
19186  --exclude='./*1' \\
19187  --exclude='d*/*1' \\
19188  --exclude='d*/s*/*2' | sort
19189)"
19190at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
19191( $at_check_trace;
19192mkdir v7
19193(cd v7
19194TEST_TAR_FORMAT=v7
19195export TEST_TAR_FORMAT
19196TAR_OPTIONS="-H v7"
19197export TAR_OPTIONS
19198rm -rf *
19199
19200
19201test -z "`sort < /dev/null 2>&1`" || exit 77
19202
19203touch file1
19204mkdir directory
19205mkdir directory/subdirectory
19206touch directory/file1
19207touch directory/file2
19208touch directory/subdirectory/file1
19209touch directory/subdirectory/file2
19210tar -cf archive ./file1 directory
19211tar -tf archive \
19212  --exclude='./*1' \
19213  --exclude='d*/*1' \
19214  --exclude='d*/s*/*2' | sort
19215)
19216) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19217at_status=$? at_failed=false
19218$at_check_filter
19219at_fn_diff_devnull "$at_stderr" || at_failed=:
19220echo >>"$at_stdout"; $as_echo "directory/
19221directory/file2
19222directory/subdirectory/
19223" | \
19224  $at_diff - "$at_stdout" || at_failed=:
19225at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
19226$at_failed && at_fn_log_failure
19227$at_traceon; }
19228
19229              { set +x
19230$as_echo "$at_srcdir/extrac04.at:26:
19231mkdir oldgnu
19232(cd oldgnu
19233TEST_TAR_FORMAT=oldgnu
19234export TEST_TAR_FORMAT
19235TAR_OPTIONS=\"-H oldgnu\"
19236export TAR_OPTIONS
19237rm -rf *
19238
19239
19240test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
19241
19242touch file1
19243mkdir directory
19244mkdir directory/subdirectory
19245touch directory/file1
19246touch directory/file2
19247touch directory/subdirectory/file1
19248touch directory/subdirectory/file2
19249tar -cf archive ./file1 directory
19250tar -tf archive \\
19251  --exclude='./*1' \\
19252  --exclude='d*/*1' \\
19253  --exclude='d*/s*/*2' | sort
19254)"
19255at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
19256( $at_check_trace;
19257mkdir oldgnu
19258(cd oldgnu
19259TEST_TAR_FORMAT=oldgnu
19260export TEST_TAR_FORMAT
19261TAR_OPTIONS="-H oldgnu"
19262export TAR_OPTIONS
19263rm -rf *
19264
19265
19266test -z "`sort < /dev/null 2>&1`" || exit 77
19267
19268touch file1
19269mkdir directory
19270mkdir directory/subdirectory
19271touch directory/file1
19272touch directory/file2
19273touch directory/subdirectory/file1
19274touch directory/subdirectory/file2
19275tar -cf archive ./file1 directory
19276tar -tf archive \
19277  --exclude='./*1' \
19278  --exclude='d*/*1' \
19279  --exclude='d*/s*/*2' | sort
19280)
19281) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19282at_status=$? at_failed=false
19283$at_check_filter
19284at_fn_diff_devnull "$at_stderr" || at_failed=:
19285echo >>"$at_stdout"; $as_echo "directory/
19286directory/file2
19287directory/subdirectory/
19288" | \
19289  $at_diff - "$at_stdout" || at_failed=:
19290at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
19291$at_failed && at_fn_log_failure
19292$at_traceon; }
19293
19294              { set +x
19295$as_echo "$at_srcdir/extrac04.at:26:
19296mkdir ustar
19297(cd ustar
19298TEST_TAR_FORMAT=ustar
19299export TEST_TAR_FORMAT
19300TAR_OPTIONS=\"-H ustar\"
19301export TAR_OPTIONS
19302rm -rf *
19303
19304
19305test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
19306
19307touch file1
19308mkdir directory
19309mkdir directory/subdirectory
19310touch directory/file1
19311touch directory/file2
19312touch directory/subdirectory/file1
19313touch directory/subdirectory/file2
19314tar -cf archive ./file1 directory
19315tar -tf archive \\
19316  --exclude='./*1' \\
19317  --exclude='d*/*1' \\
19318  --exclude='d*/s*/*2' | sort
19319)"
19320at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
19321( $at_check_trace;
19322mkdir ustar
19323(cd ustar
19324TEST_TAR_FORMAT=ustar
19325export TEST_TAR_FORMAT
19326TAR_OPTIONS="-H ustar"
19327export TAR_OPTIONS
19328rm -rf *
19329
19330
19331test -z "`sort < /dev/null 2>&1`" || exit 77
19332
19333touch file1
19334mkdir directory
19335mkdir directory/subdirectory
19336touch directory/file1
19337touch directory/file2
19338touch directory/subdirectory/file1
19339touch directory/subdirectory/file2
19340tar -cf archive ./file1 directory
19341tar -tf archive \
19342  --exclude='./*1' \
19343  --exclude='d*/*1' \
19344  --exclude='d*/s*/*2' | sort
19345)
19346) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19347at_status=$? at_failed=false
19348$at_check_filter
19349at_fn_diff_devnull "$at_stderr" || at_failed=:
19350echo >>"$at_stdout"; $as_echo "directory/
19351directory/file2
19352directory/subdirectory/
19353" | \
19354  $at_diff - "$at_stdout" || at_failed=:
19355at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
19356$at_failed && at_fn_log_failure
19357$at_traceon; }
19358
19359              { set +x
19360$as_echo "$at_srcdir/extrac04.at:26:
19361mkdir posix
19362(cd posix
19363TEST_TAR_FORMAT=posix
19364export TEST_TAR_FORMAT
19365TAR_OPTIONS=\"-H posix\"
19366export TAR_OPTIONS
19367rm -rf *
19368
19369
19370test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
19371
19372touch file1
19373mkdir directory
19374mkdir directory/subdirectory
19375touch directory/file1
19376touch directory/file2
19377touch directory/subdirectory/file1
19378touch directory/subdirectory/file2
19379tar -cf archive ./file1 directory
19380tar -tf archive \\
19381  --exclude='./*1' \\
19382  --exclude='d*/*1' \\
19383  --exclude='d*/s*/*2' | sort
19384)"
19385at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
19386( $at_check_trace;
19387mkdir posix
19388(cd posix
19389TEST_TAR_FORMAT=posix
19390export TEST_TAR_FORMAT
19391TAR_OPTIONS="-H posix"
19392export TAR_OPTIONS
19393rm -rf *
19394
19395
19396test -z "`sort < /dev/null 2>&1`" || exit 77
19397
19398touch file1
19399mkdir directory
19400mkdir directory/subdirectory
19401touch directory/file1
19402touch directory/file2
19403touch directory/subdirectory/file1
19404touch directory/subdirectory/file2
19405tar -cf archive ./file1 directory
19406tar -tf archive \
19407  --exclude='./*1' \
19408  --exclude='d*/*1' \
19409  --exclude='d*/s*/*2' | sort
19410)
19411) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19412at_status=$? at_failed=false
19413$at_check_filter
19414at_fn_diff_devnull "$at_stderr" || at_failed=:
19415echo >>"$at_stdout"; $as_echo "directory/
19416directory/file2
19417directory/subdirectory/
19418" | \
19419  $at_diff - "$at_stdout" || at_failed=:
19420at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
19421$at_failed && at_fn_log_failure
19422$at_traceon; }
19423
19424              { set +x
19425$as_echo "$at_srcdir/extrac04.at:26:
19426mkdir gnu
19427(cd gnu
19428TEST_TAR_FORMAT=gnu
19429export TEST_TAR_FORMAT
19430TAR_OPTIONS=\"-H gnu\"
19431export TAR_OPTIONS
19432rm -rf *
19433
19434
19435test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
19436
19437touch file1
19438mkdir directory
19439mkdir directory/subdirectory
19440touch directory/file1
19441touch directory/file2
19442touch directory/subdirectory/file1
19443touch directory/subdirectory/file2
19444tar -cf archive ./file1 directory
19445tar -tf archive \\
19446  --exclude='./*1' \\
19447  --exclude='d*/*1' \\
19448  --exclude='d*/s*/*2' | sort
19449)"
19450at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
19451( $at_check_trace;
19452mkdir gnu
19453(cd gnu
19454TEST_TAR_FORMAT=gnu
19455export TEST_TAR_FORMAT
19456TAR_OPTIONS="-H gnu"
19457export TAR_OPTIONS
19458rm -rf *
19459
19460
19461test -z "`sort < /dev/null 2>&1`" || exit 77
19462
19463touch file1
19464mkdir directory
19465mkdir directory/subdirectory
19466touch directory/file1
19467touch directory/file2
19468touch directory/subdirectory/file1
19469touch directory/subdirectory/file2
19470tar -cf archive ./file1 directory
19471tar -tf archive \
19472  --exclude='./*1' \
19473  --exclude='d*/*1' \
19474  --exclude='d*/s*/*2' | sort
19475)
19476) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19477at_status=$? at_failed=false
19478$at_check_filter
19479at_fn_diff_devnull "$at_stderr" || at_failed=:
19480echo >>"$at_stdout"; $as_echo "directory/
19481directory/file2
19482directory/subdirectory/
19483" | \
19484  $at_diff - "$at_stdout" || at_failed=:
19485at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
19486$at_failed && at_fn_log_failure
19487$at_traceon; }
19488
19489
19490
19491
19492  set +x
19493  $at_times_p && times >"$at_times_file"
19494) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19495read at_status <"$at_status_file"
19496#AT_STOP_84
19497#AT_START_85
19498at_fn_group_banner 85 'extrac05.at:30' \
19499  "extracting selected members from pax" "           " 13
19500at_xfail=no
19501      test -f $XFAILFILE && at_xfail=yes
19502(
19503  $as_echo "85. $at_setup_line: testing $at_desc ..."
19504  $at_traceon
19505
19506
19507
19508cat >list <<'_ATEOF'
19509jeden
19510cztery
19511_ATEOF
19512
19513
19514
19515
19516  { set +x
19517$as_echo "$at_srcdir/extrac05.at:38:
19518mkdir posix
19519(cd posix
19520TEST_TAR_FORMAT=posix
19521export TEST_TAR_FORMAT
19522TAR_OPTIONS=\"-H posix\"
19523export TAR_OPTIONS
19524rm -rf *
19525
19526genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
19527genfile --length 118 --file jeden
19528genfile --length 223 --file dwa
19529genfile --length 517 --file trzy
19530genfile --length 110 --file cztery
19531
19532tar cf archive jeden dwa trzy cztery || exit 1
19533
19534mkdir dir
19535cd dir
19536
19537tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
19538
19539cd ..
19540)"
19541at_fn_check_prepare_notrace 'an embedded newline' "extrac05.at:38"
19542( $at_check_trace;
19543mkdir posix
19544(cd posix
19545TEST_TAR_FORMAT=posix
19546export TEST_TAR_FORMAT
19547TAR_OPTIONS="-H posix"
19548export TAR_OPTIONS
19549rm -rf *
19550
19551genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
19552genfile --length 118 --file jeden
19553genfile --length 223 --file dwa
19554genfile --length 517 --file trzy
19555genfile --length 110 --file cztery
19556
19557tar cf archive jeden dwa trzy cztery || exit 1
19558
19559mkdir dir
19560cd dir
19561
19562tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
19563
19564cd ..
19565)
19566) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19567at_status=$? at_failed=false
19568$at_check_filter
19569at_fn_diff_devnull "$at_stderr" || at_failed=:
19570echo >>"$at_stdout"; $as_echo "jeden
19571cztery
19572" | \
19573  $at_diff - "$at_stdout" || at_failed=:
19574at_fn_check_status 0 $at_status "$at_srcdir/extrac05.at:38"
19575$at_failed && at_fn_log_failure
19576$at_traceon; }
19577
19578
19579
19580
19581  set +x
19582  $at_times_p && times >"$at_times_file"
19583) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19584read at_status <"$at_status_file"
19585#AT_STOP_85
19586#AT_START_86
19587at_fn_group_banner 86 'extrac06.at:34' \
19588  "mode of extracted directories" "                  " 13
19589at_xfail=no
19590      test -f $XFAILFILE && at_xfail=yes
19591(
19592  $as_echo "86. $at_setup_line: testing $at_desc ..."
19593  $at_traceon
19594
19595
19596
19597
19598
19599  { set +x
19600$as_echo "$at_srcdir/extrac06.at:37:
19601mkdir v7
19602(cd v7
19603TEST_TAR_FORMAT=v7
19604export TEST_TAR_FORMAT
19605TAR_OPTIONS=\"-H v7\"
19606export TAR_OPTIONS
19607rm -rf *
19608
19609
19610# Force umask
19611umask 022
19612
19613# Make sure user's umask is honored, even if we are superuser
19614TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
19615
19616# Create a directory
19617mkdir directory
19618chmod 777 directory
19619genfile --stat=mode:777 directory
19620
19621# Archive it
19622tar cf arc directory
19623
19624# Change its permissions ...
19625chmod 755 directory
19626genfile --stat=mode:777 directory
19627
19628# ... and attempt to restore it twice
19629tar xf arc directory --warning=no-timestamp
19630genfile --stat=mode:777 directory
19631
19632tar xf arc directory --warning=no-timestamp
19633genfile --stat=mode:777 directory
19634
19635# After both restores, the directory mode should be 755
19636)"
19637at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
19638( $at_check_trace;
19639mkdir v7
19640(cd v7
19641TEST_TAR_FORMAT=v7
19642export TEST_TAR_FORMAT
19643TAR_OPTIONS="-H v7"
19644export TAR_OPTIONS
19645rm -rf *
19646
19647
19648# Force umask
19649umask 022
19650
19651# Make sure user's umask is honored, even if we are superuser
19652TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
19653
19654# Create a directory
19655mkdir directory
19656chmod 777 directory
19657genfile --stat=mode:777 directory
19658
19659# Archive it
19660tar cf arc directory
19661
19662# Change its permissions ...
19663chmod 755 directory
19664genfile --stat=mode:777 directory
19665
19666# ... and attempt to restore it twice
19667tar xf arc directory --warning=no-timestamp
19668genfile --stat=mode:777 directory
19669
19670tar xf arc directory --warning=no-timestamp
19671genfile --stat=mode:777 directory
19672
19673# After both restores, the directory mode should be 755
19674)
19675) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19676at_status=$? at_failed=false
19677$at_check_filter
19678at_fn_diff_devnull "$at_stderr" || at_failed=:
19679echo >>"$at_stdout"; $as_echo "777
19680755
19681755
19682755
19683" | \
19684  $at_diff - "$at_stdout" || at_failed=:
19685at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
19686$at_failed && at_fn_log_failure
19687$at_traceon; }
19688
19689              { set +x
19690$as_echo "$at_srcdir/extrac06.at:37:
19691mkdir oldgnu
19692(cd oldgnu
19693TEST_TAR_FORMAT=oldgnu
19694export TEST_TAR_FORMAT
19695TAR_OPTIONS=\"-H oldgnu\"
19696export TAR_OPTIONS
19697rm -rf *
19698
19699
19700# Force umask
19701umask 022
19702
19703# Make sure user's umask is honored, even if we are superuser
19704TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
19705
19706# Create a directory
19707mkdir directory
19708chmod 777 directory
19709genfile --stat=mode:777 directory
19710
19711# Archive it
19712tar cf arc directory
19713
19714# Change its permissions ...
19715chmod 755 directory
19716genfile --stat=mode:777 directory
19717
19718# ... and attempt to restore it twice
19719tar xf arc directory --warning=no-timestamp
19720genfile --stat=mode:777 directory
19721
19722tar xf arc directory --warning=no-timestamp
19723genfile --stat=mode:777 directory
19724
19725# After both restores, the directory mode should be 755
19726)"
19727at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
19728( $at_check_trace;
19729mkdir oldgnu
19730(cd oldgnu
19731TEST_TAR_FORMAT=oldgnu
19732export TEST_TAR_FORMAT
19733TAR_OPTIONS="-H oldgnu"
19734export TAR_OPTIONS
19735rm -rf *
19736
19737
19738# Force umask
19739umask 022
19740
19741# Make sure user's umask is honored, even if we are superuser
19742TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
19743
19744# Create a directory
19745mkdir directory
19746chmod 777 directory
19747genfile --stat=mode:777 directory
19748
19749# Archive it
19750tar cf arc directory
19751
19752# Change its permissions ...
19753chmod 755 directory
19754genfile --stat=mode:777 directory
19755
19756# ... and attempt to restore it twice
19757tar xf arc directory --warning=no-timestamp
19758genfile --stat=mode:777 directory
19759
19760tar xf arc directory --warning=no-timestamp
19761genfile --stat=mode:777 directory
19762
19763# After both restores, the directory mode should be 755
19764)
19765) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19766at_status=$? at_failed=false
19767$at_check_filter
19768at_fn_diff_devnull "$at_stderr" || at_failed=:
19769echo >>"$at_stdout"; $as_echo "777
19770755
19771755
19772755
19773" | \
19774  $at_diff - "$at_stdout" || at_failed=:
19775at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
19776$at_failed && at_fn_log_failure
19777$at_traceon; }
19778
19779              { set +x
19780$as_echo "$at_srcdir/extrac06.at:37:
19781mkdir ustar
19782(cd ustar
19783TEST_TAR_FORMAT=ustar
19784export TEST_TAR_FORMAT
19785TAR_OPTIONS=\"-H ustar\"
19786export TAR_OPTIONS
19787rm -rf *
19788
19789
19790# Force umask
19791umask 022
19792
19793# Make sure user's umask is honored, even if we are superuser
19794TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
19795
19796# Create a directory
19797mkdir directory
19798chmod 777 directory
19799genfile --stat=mode:777 directory
19800
19801# Archive it
19802tar cf arc directory
19803
19804# Change its permissions ...
19805chmod 755 directory
19806genfile --stat=mode:777 directory
19807
19808# ... and attempt to restore it twice
19809tar xf arc directory --warning=no-timestamp
19810genfile --stat=mode:777 directory
19811
19812tar xf arc directory --warning=no-timestamp
19813genfile --stat=mode:777 directory
19814
19815# After both restores, the directory mode should be 755
19816)"
19817at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
19818( $at_check_trace;
19819mkdir ustar
19820(cd ustar
19821TEST_TAR_FORMAT=ustar
19822export TEST_TAR_FORMAT
19823TAR_OPTIONS="-H ustar"
19824export TAR_OPTIONS
19825rm -rf *
19826
19827
19828# Force umask
19829umask 022
19830
19831# Make sure user's umask is honored, even if we are superuser
19832TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
19833
19834# Create a directory
19835mkdir directory
19836chmod 777 directory
19837genfile --stat=mode:777 directory
19838
19839# Archive it
19840tar cf arc directory
19841
19842# Change its permissions ...
19843chmod 755 directory
19844genfile --stat=mode:777 directory
19845
19846# ... and attempt to restore it twice
19847tar xf arc directory --warning=no-timestamp
19848genfile --stat=mode:777 directory
19849
19850tar xf arc directory --warning=no-timestamp
19851genfile --stat=mode:777 directory
19852
19853# After both restores, the directory mode should be 755
19854)
19855) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19856at_status=$? at_failed=false
19857$at_check_filter
19858at_fn_diff_devnull "$at_stderr" || at_failed=:
19859echo >>"$at_stdout"; $as_echo "777
19860755
19861755
19862755
19863" | \
19864  $at_diff - "$at_stdout" || at_failed=:
19865at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
19866$at_failed && at_fn_log_failure
19867$at_traceon; }
19868
19869              { set +x
19870$as_echo "$at_srcdir/extrac06.at:37:
19871mkdir posix
19872(cd posix
19873TEST_TAR_FORMAT=posix
19874export TEST_TAR_FORMAT
19875TAR_OPTIONS=\"-H posix\"
19876export TAR_OPTIONS
19877rm -rf *
19878
19879
19880# Force umask
19881umask 022
19882
19883# Make sure user's umask is honored, even if we are superuser
19884TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
19885
19886# Create a directory
19887mkdir directory
19888chmod 777 directory
19889genfile --stat=mode:777 directory
19890
19891# Archive it
19892tar cf arc directory
19893
19894# Change its permissions ...
19895chmod 755 directory
19896genfile --stat=mode:777 directory
19897
19898# ... and attempt to restore it twice
19899tar xf arc directory --warning=no-timestamp
19900genfile --stat=mode:777 directory
19901
19902tar xf arc directory --warning=no-timestamp
19903genfile --stat=mode:777 directory
19904
19905# After both restores, the directory mode should be 755
19906)"
19907at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
19908( $at_check_trace;
19909mkdir posix
19910(cd posix
19911TEST_TAR_FORMAT=posix
19912export TEST_TAR_FORMAT
19913TAR_OPTIONS="-H posix"
19914export TAR_OPTIONS
19915rm -rf *
19916
19917
19918# Force umask
19919umask 022
19920
19921# Make sure user's umask is honored, even if we are superuser
19922TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
19923
19924# Create a directory
19925mkdir directory
19926chmod 777 directory
19927genfile --stat=mode:777 directory
19928
19929# Archive it
19930tar cf arc directory
19931
19932# Change its permissions ...
19933chmod 755 directory
19934genfile --stat=mode:777 directory
19935
19936# ... and attempt to restore it twice
19937tar xf arc directory --warning=no-timestamp
19938genfile --stat=mode:777 directory
19939
19940tar xf arc directory --warning=no-timestamp
19941genfile --stat=mode:777 directory
19942
19943# After both restores, the directory mode should be 755
19944)
19945) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19946at_status=$? at_failed=false
19947$at_check_filter
19948at_fn_diff_devnull "$at_stderr" || at_failed=:
19949echo >>"$at_stdout"; $as_echo "777
19950755
19951755
19952755
19953" | \
19954  $at_diff - "$at_stdout" || at_failed=:
19955at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
19956$at_failed && at_fn_log_failure
19957$at_traceon; }
19958
19959              { set +x
19960$as_echo "$at_srcdir/extrac06.at:37:
19961mkdir gnu
19962(cd gnu
19963TEST_TAR_FORMAT=gnu
19964export TEST_TAR_FORMAT
19965TAR_OPTIONS=\"-H gnu\"
19966export TAR_OPTIONS
19967rm -rf *
19968
19969
19970# Force umask
19971umask 022
19972
19973# Make sure user's umask is honored, even if we are superuser
19974TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
19975
19976# Create a directory
19977mkdir directory
19978chmod 777 directory
19979genfile --stat=mode:777 directory
19980
19981# Archive it
19982tar cf arc directory
19983
19984# Change its permissions ...
19985chmod 755 directory
19986genfile --stat=mode:777 directory
19987
19988# ... and attempt to restore it twice
19989tar xf arc directory --warning=no-timestamp
19990genfile --stat=mode:777 directory
19991
19992tar xf arc directory --warning=no-timestamp
19993genfile --stat=mode:777 directory
19994
19995# After both restores, the directory mode should be 755
19996)"
19997at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
19998( $at_check_trace;
19999mkdir gnu
20000(cd gnu
20001TEST_TAR_FORMAT=gnu
20002export TEST_TAR_FORMAT
20003TAR_OPTIONS="-H gnu"
20004export TAR_OPTIONS
20005rm -rf *
20006
20007
20008# Force umask
20009umask 022
20010
20011# Make sure user's umask is honored, even if we are superuser
20012TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
20013
20014# Create a directory
20015mkdir directory
20016chmod 777 directory
20017genfile --stat=mode:777 directory
20018
20019# Archive it
20020tar cf arc directory
20021
20022# Change its permissions ...
20023chmod 755 directory
20024genfile --stat=mode:777 directory
20025
20026# ... and attempt to restore it twice
20027tar xf arc directory --warning=no-timestamp
20028genfile --stat=mode:777 directory
20029
20030tar xf arc directory --warning=no-timestamp
20031genfile --stat=mode:777 directory
20032
20033# After both restores, the directory mode should be 755
20034)
20035) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20036at_status=$? at_failed=false
20037$at_check_filter
20038at_fn_diff_devnull "$at_stderr" || at_failed=:
20039echo >>"$at_stdout"; $as_echo "777
20040755
20041755
20042755
20043" | \
20044  $at_diff - "$at_stdout" || at_failed=:
20045at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
20046$at_failed && at_fn_log_failure
20047$at_traceon; }
20048
20049
20050
20051
20052  set +x
20053  $at_times_p && times >"$at_times_file"
20054) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20055read at_status <"$at_status_file"
20056#AT_STOP_86
20057#AT_START_87
20058at_fn_group_banner 87 'extrac07.at:27' \
20059  "extracting symlinks to a read-only dir" "         " 13
20060at_xfail=no
20061      test -f $XFAILFILE && at_xfail=yes
20062(
20063  $as_echo "87. $at_setup_line: testing $at_desc ..."
20064  $at_traceon
20065
20066
20067
20068
20069
20070  { set +x
20071$as_echo "$at_srcdir/extrac07.at:30:
20072mkdir ustar
20073(cd ustar
20074TEST_TAR_FORMAT=ustar
20075export TEST_TAR_FORMAT
20076TAR_OPTIONS=\"-H ustar\"
20077export TAR_OPTIONS
20078rm -rf *
20079
20080
20081echo \"test\" > \$\$
20082chmod 0 \$\$
20083cat \$\$ > /dev/null 2>&1
20084result=\$?
20085rm -f \$\$
20086test \$result -eq 0 && exit 77
20087
20088
20089echo Prepare the directory
20090mkdir dir
20091genfile -f foo
20092cd dir
20093ln -s ../foo .
20094cd ..
20095chmod a-w dir
20096
20097echo Create the archive
20098tar cf archive dir || exit 1
20099
20100chmod +w dir
20101
20102echo Extract
20103mkdir out
20104tar -C out -xvf archive
20105)"
20106at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30"
20107( $at_check_trace;
20108mkdir ustar
20109(cd ustar
20110TEST_TAR_FORMAT=ustar
20111export TEST_TAR_FORMAT
20112TAR_OPTIONS="-H ustar"
20113export TAR_OPTIONS
20114rm -rf *
20115
20116
20117echo "test" > $$
20118chmod 0 $$
20119cat $$ > /dev/null 2>&1
20120result=$?
20121rm -f $$
20122test $result -eq 0 && exit 77
20123
20124
20125echo Prepare the directory
20126mkdir dir
20127genfile -f foo
20128cd dir
20129ln -s ../foo .
20130cd ..
20131chmod a-w dir
20132
20133echo Create the archive
20134tar cf archive dir || exit 1
20135
20136chmod +w dir
20137
20138echo Extract
20139mkdir out
20140tar -C out -xvf archive
20141)
20142) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20143at_status=$? at_failed=false
20144$at_check_filter
20145at_fn_diff_devnull "$at_stderr" || at_failed=:
20146echo >>"$at_stdout"; $as_echo "Prepare the directory
20147Create the archive
20148Extract
20149dir/
20150dir/foo
20151" | \
20152  $at_diff - "$at_stdout" || at_failed=:
20153at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30"
20154$at_failed && at_fn_log_failure
20155$at_traceon; }
20156
20157
20158 # Testing one format is enough
20159
20160  set +x
20161  $at_times_p && times >"$at_times_file"
20162) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20163read at_status <"$at_status_file"
20164#AT_STOP_87
20165#AT_START_88
20166at_fn_group_banner 88 'extrac08.at:33' \
20167  "restoring mode on existing directory" "           " 13
20168at_xfail=no
20169      test -f $XFAILFILE && at_xfail=yes
20170(
20171  $as_echo "88. $at_setup_line: testing $at_desc ..."
20172  $at_traceon
20173
20174
20175
20176
20177
20178  { set +x
20179$as_echo "$at_srcdir/extrac08.at:36:
20180mkdir v7
20181(cd v7
20182TEST_TAR_FORMAT=v7
20183export TEST_TAR_FORMAT
20184TAR_OPTIONS=\"-H v7\"
20185export TAR_OPTIONS
20186rm -rf *
20187
20188umask 000
20189mkdir dir
20190chmod 755 dir
20191echo bla > dir/file
20192tar cf test.tar dir
20193chmod 700 dir
20194tar xfv test.tar --warning=no-timestamp
20195genfile --stat=mode.777 dir
20196)"
20197at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
20198( $at_check_trace;
20199mkdir v7
20200(cd v7
20201TEST_TAR_FORMAT=v7
20202export TEST_TAR_FORMAT
20203TAR_OPTIONS="-H v7"
20204export TAR_OPTIONS
20205rm -rf *
20206
20207umask 000
20208mkdir dir
20209chmod 755 dir
20210echo bla > dir/file
20211tar cf test.tar dir
20212chmod 700 dir
20213tar xfv test.tar --warning=no-timestamp
20214genfile --stat=mode.777 dir
20215)
20216) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20217at_status=$? at_failed=false
20218$at_check_filter
20219at_fn_diff_devnull "$at_stderr" || at_failed=:
20220echo >>"$at_stdout"; $as_echo "dir/
20221dir/file
20222755
20223" | \
20224  $at_diff - "$at_stdout" || at_failed=:
20225at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
20226$at_failed && at_fn_log_failure
20227$at_traceon; }
20228
20229              { set +x
20230$as_echo "$at_srcdir/extrac08.at:36:
20231mkdir oldgnu
20232(cd oldgnu
20233TEST_TAR_FORMAT=oldgnu
20234export TEST_TAR_FORMAT
20235TAR_OPTIONS=\"-H oldgnu\"
20236export TAR_OPTIONS
20237rm -rf *
20238
20239umask 000
20240mkdir dir
20241chmod 755 dir
20242echo bla > dir/file
20243tar cf test.tar dir
20244chmod 700 dir
20245tar xfv test.tar --warning=no-timestamp
20246genfile --stat=mode.777 dir
20247)"
20248at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
20249( $at_check_trace;
20250mkdir oldgnu
20251(cd oldgnu
20252TEST_TAR_FORMAT=oldgnu
20253export TEST_TAR_FORMAT
20254TAR_OPTIONS="-H oldgnu"
20255export TAR_OPTIONS
20256rm -rf *
20257
20258umask 000
20259mkdir dir
20260chmod 755 dir
20261echo bla > dir/file
20262tar cf test.tar dir
20263chmod 700 dir
20264tar xfv test.tar --warning=no-timestamp
20265genfile --stat=mode.777 dir
20266)
20267) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20268at_status=$? at_failed=false
20269$at_check_filter
20270at_fn_diff_devnull "$at_stderr" || at_failed=:
20271echo >>"$at_stdout"; $as_echo "dir/
20272dir/file
20273755
20274" | \
20275  $at_diff - "$at_stdout" || at_failed=:
20276at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
20277$at_failed && at_fn_log_failure
20278$at_traceon; }
20279
20280              { set +x
20281$as_echo "$at_srcdir/extrac08.at:36:
20282mkdir ustar
20283(cd ustar
20284TEST_TAR_FORMAT=ustar
20285export TEST_TAR_FORMAT
20286TAR_OPTIONS=\"-H ustar\"
20287export TAR_OPTIONS
20288rm -rf *
20289
20290umask 000
20291mkdir dir
20292chmod 755 dir
20293echo bla > dir/file
20294tar cf test.tar dir
20295chmod 700 dir
20296tar xfv test.tar --warning=no-timestamp
20297genfile --stat=mode.777 dir
20298)"
20299at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
20300( $at_check_trace;
20301mkdir ustar
20302(cd ustar
20303TEST_TAR_FORMAT=ustar
20304export TEST_TAR_FORMAT
20305TAR_OPTIONS="-H ustar"
20306export TAR_OPTIONS
20307rm -rf *
20308
20309umask 000
20310mkdir dir
20311chmod 755 dir
20312echo bla > dir/file
20313tar cf test.tar dir
20314chmod 700 dir
20315tar xfv test.tar --warning=no-timestamp
20316genfile --stat=mode.777 dir
20317)
20318) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20319at_status=$? at_failed=false
20320$at_check_filter
20321at_fn_diff_devnull "$at_stderr" || at_failed=:
20322echo >>"$at_stdout"; $as_echo "dir/
20323dir/file
20324755
20325" | \
20326  $at_diff - "$at_stdout" || at_failed=:
20327at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
20328$at_failed && at_fn_log_failure
20329$at_traceon; }
20330
20331              { set +x
20332$as_echo "$at_srcdir/extrac08.at:36:
20333mkdir posix
20334(cd posix
20335TEST_TAR_FORMAT=posix
20336export TEST_TAR_FORMAT
20337TAR_OPTIONS=\"-H posix\"
20338export TAR_OPTIONS
20339rm -rf *
20340
20341umask 000
20342mkdir dir
20343chmod 755 dir
20344echo bla > dir/file
20345tar cf test.tar dir
20346chmod 700 dir
20347tar xfv test.tar --warning=no-timestamp
20348genfile --stat=mode.777 dir
20349)"
20350at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
20351( $at_check_trace;
20352mkdir posix
20353(cd posix
20354TEST_TAR_FORMAT=posix
20355export TEST_TAR_FORMAT
20356TAR_OPTIONS="-H posix"
20357export TAR_OPTIONS
20358rm -rf *
20359
20360umask 000
20361mkdir dir
20362chmod 755 dir
20363echo bla > dir/file
20364tar cf test.tar dir
20365chmod 700 dir
20366tar xfv test.tar --warning=no-timestamp
20367genfile --stat=mode.777 dir
20368)
20369) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20370at_status=$? at_failed=false
20371$at_check_filter
20372at_fn_diff_devnull "$at_stderr" || at_failed=:
20373echo >>"$at_stdout"; $as_echo "dir/
20374dir/file
20375755
20376" | \
20377  $at_diff - "$at_stdout" || at_failed=:
20378at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
20379$at_failed && at_fn_log_failure
20380$at_traceon; }
20381
20382              { set +x
20383$as_echo "$at_srcdir/extrac08.at:36:
20384mkdir gnu
20385(cd gnu
20386TEST_TAR_FORMAT=gnu
20387export TEST_TAR_FORMAT
20388TAR_OPTIONS=\"-H gnu\"
20389export TAR_OPTIONS
20390rm -rf *
20391
20392umask 000
20393mkdir dir
20394chmod 755 dir
20395echo bla > dir/file
20396tar cf test.tar dir
20397chmod 700 dir
20398tar xfv test.tar --warning=no-timestamp
20399genfile --stat=mode.777 dir
20400)"
20401at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
20402( $at_check_trace;
20403mkdir gnu
20404(cd gnu
20405TEST_TAR_FORMAT=gnu
20406export TEST_TAR_FORMAT
20407TAR_OPTIONS="-H gnu"
20408export TAR_OPTIONS
20409rm -rf *
20410
20411umask 000
20412mkdir dir
20413chmod 755 dir
20414echo bla > dir/file
20415tar cf test.tar dir
20416chmod 700 dir
20417tar xfv test.tar --warning=no-timestamp
20418genfile --stat=mode.777 dir
20419)
20420) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20421at_status=$? at_failed=false
20422$at_check_filter
20423at_fn_diff_devnull "$at_stderr" || at_failed=:
20424echo >>"$at_stdout"; $as_echo "dir/
20425dir/file
20426755
20427" | \
20428  $at_diff - "$at_stdout" || at_failed=:
20429at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
20430$at_failed && at_fn_log_failure
20431$at_traceon; }
20432
20433
20434
20435
20436  set +x
20437  $at_times_p && times >"$at_times_file"
20438) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20439read at_status <"$at_status_file"
20440#AT_STOP_88
20441#AT_START_89
20442at_fn_group_banner 89 'extrac09.at:34' \
20443  "extracting even when . and .. are unreadable" "   " 13
20444at_xfail=no
20445      test -f $XFAILFILE && at_xfail=yes
20446(
20447  $as_echo "89. $at_setup_line: testing $at_desc ..."
20448  $at_traceon
20449
20450
20451
20452
20453
20454  { set +x
20455$as_echo "$at_srcdir/extrac09.at:37:
20456mkdir gnu
20457(cd gnu
20458TEST_TAR_FORMAT=gnu
20459export TEST_TAR_FORMAT
20460TAR_OPTIONS=\"-H gnu\"
20461export TAR_OPTIONS
20462rm -rf *
20463
20464
20465echo \"test\" > \$\$
20466chmod 0 \$\$
20467cat \$\$ > /dev/null 2>&1
20468result=\$?
20469rm -f \$\$
20470test \$result -eq 0 && exit 77
20471
20472
20473mkdir dir
20474mkdir dir/sub
20475mkdir dir/sub/extract
20476genfile --file dir/sub/f
20477cd dir/sub
20478
20479tar -cf archive.tar f
20480
20481chmod a-r . ..
20482tar -xvf archive.tar -C extract f
20483status=\$?
20484chmod a+r . ..
20485cmp f extract/f || status=\$?
20486exit \$status
20487)"
20488at_fn_check_prepare_notrace 'an embedded newline' "extrac09.at:37"
20489( $at_check_trace;
20490mkdir gnu
20491(cd gnu
20492TEST_TAR_FORMAT=gnu
20493export TEST_TAR_FORMAT
20494TAR_OPTIONS="-H gnu"
20495export TAR_OPTIONS
20496rm -rf *
20497
20498
20499echo "test" > $$
20500chmod 0 $$
20501cat $$ > /dev/null 2>&1
20502result=$?
20503rm -f $$
20504test $result -eq 0 && exit 77
20505
20506
20507mkdir dir
20508mkdir dir/sub
20509mkdir dir/sub/extract
20510genfile --file dir/sub/f
20511cd dir/sub
20512
20513tar -cf archive.tar f
20514
20515chmod a-r . ..
20516tar -xvf archive.tar -C extract f
20517status=$?
20518chmod a+r . ..
20519cmp f extract/f || status=$?
20520exit $status
20521)
20522) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20523at_status=$? at_failed=false
20524$at_check_filter
20525at_fn_diff_devnull "$at_stderr" || at_failed=:
20526echo >>"$at_stdout"; $as_echo "f
20527" | \
20528  $at_diff - "$at_stdout" || at_failed=:
20529at_fn_check_status 0 $at_status "$at_srcdir/extrac09.at:37"
20530$at_failed && at_fn_log_failure
20531$at_traceon; }
20532
20533
20534
20535
20536  set +x
20537  $at_times_p && times >"$at_times_file"
20538) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20539read at_status <"$at_status_file"
20540#AT_STOP_89
20541#AT_START_90
20542at_fn_group_banner 90 'extrac10.at:29' \
20543  "-C and delayed setting of metadata" "             " 13
20544at_xfail=no
20545      test -f $XFAILFILE && at_xfail=yes
20546(
20547  $as_echo "90. $at_setup_line: testing $at_desc ..."
20548  $at_traceon
20549
20550
20551
20552
20553
20554  { set +x
20555$as_echo "$at_srcdir/extrac10.at:32:
20556mkdir gnu
20557(cd gnu
20558TEST_TAR_FORMAT=gnu
20559export TEST_TAR_FORMAT
20560TAR_OPTIONS=\"-H gnu\"
20561export TAR_OPTIONS
20562rm -rf *
20563
20564mkdir d x x/y
20565echo foo >d/d1
20566echo bar >e
20567
20568tar -cf archive.tar d e &&
20569tar -xf archive.tar -C x d -C y e &&
20570diff -r d x/d &&
20571diff e x/y/e
20572)"
20573at_fn_check_prepare_notrace 'an embedded newline' "extrac10.at:32"
20574( $at_check_trace;
20575mkdir gnu
20576(cd gnu
20577TEST_TAR_FORMAT=gnu
20578export TEST_TAR_FORMAT
20579TAR_OPTIONS="-H gnu"
20580export TAR_OPTIONS
20581rm -rf *
20582
20583mkdir d x x/y
20584echo foo >d/d1
20585echo bar >e
20586
20587tar -cf archive.tar d e &&
20588tar -xf archive.tar -C x d -C y e &&
20589diff -r d x/d &&
20590diff e x/y/e
20591)
20592) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20593at_status=$? at_failed=false
20594$at_check_filter
20595at_fn_diff_devnull "$at_stderr" || at_failed=:
20596at_fn_diff_devnull "$at_stdout" || at_failed=:
20597at_fn_check_status 0 $at_status "$at_srcdir/extrac10.at:32"
20598$at_failed && at_fn_log_failure
20599$at_traceon; }
20600
20601
20602
20603
20604  set +x
20605  $at_times_p && times >"$at_times_file"
20606) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20607read at_status <"$at_status_file"
20608#AT_STOP_90
20609#AT_START_91
20610at_fn_group_banner 91 'extrac11.at:25' \
20611  "scarce file descriptors" "                        " 13
20612at_xfail=no
20613      test -f $XFAILFILE && at_xfail=yes
20614(
20615  $as_echo "91. $at_setup_line: testing $at_desc ..."
20616  $at_traceon
20617
20618
20619
20620
20621
20622  { set +x
20623$as_echo "$at_srcdir/extrac11.at:28:
20624mkdir gnu
20625(cd gnu
20626TEST_TAR_FORMAT=gnu
20627export TEST_TAR_FORMAT
20628TAR_OPTIONS=\"-H gnu\"
20629export TAR_OPTIONS
20630rm -rf *
20631
20632exec </dev/null
20633dirs='a
20634      a/b
20635      a/b/c
20636      a/b/c/d
20637      a/b/c/d/e
20638      a/b/c/d/e/f
20639      a/b/c/d/e/f/g
20640      a/b/c/d/e/f/g/h
20641      a/b/c/d/e/f/g/h/i
20642      a/b/c/d/e/f/g/h/i/j
20643      a/b/c/d/e/f/g/h/i/j/k
20644'
20645files=
20646mkdir \$dirs dest1 dest2 dest3 || exit
20647for dir in \$dirs; do
20648  for file in X Y Z; do
20649    echo \$file >\$dir/\$file || exit
20650    files=\"\$files \$file\"
20651  done
20652done
20653
20654# Check that \"ulimit\" itself works.  Close file descriptors before
20655# invoking ulimit, to work around a bug (or a \"feature\") in some shells,
20656# where they squirrel away dups of file descriptors into FD 10 and up
20657# before closing the originals.
20658( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
20659   ulimit -n 100 &&
20660   tar -cf archive1.tar a &&
20661   tar -xf archive1.tar -C dest1 a
20662  ) &&
20663  diff -r a dest1/a
20664) >/dev/null 2>&1 ||
20665   exit 77
20666
20667# Another test that \"ulimit\" itself works:
20668# tar should fail when completely starved of file descriptors.
20669( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
20670   ulimit -n 4 &&
20671   tar -cf archive2.tar a &&
20672   tar -xf archive2.tar -C dest2 a
20673  ) &&
20674  diff -r a dest2/a
20675) >/dev/null 2>&1 &&
20676   exit 77
20677
20678# Test if it is possible to limit the number of file descriptors to 10.
20679( ulimit -n 10 ) >/dev/null 2>&1 || exit 77
20680
20681# Tar should work when there are few, but enough, file descriptors.
20682( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
20683   ulimit -n 10 &&
20684   tar -cf archive3.tar a &&
20685   tar -xf archive3.tar -C dest3 a
20686  ) &&
20687  diff -r a dest3/a >/dev/null 2>&1
20688) || { diff -r a dest3/a; exit 1; }
20689)"
20690at_fn_check_prepare_notrace 'an embedded newline' "extrac11.at:28"
20691( $at_check_trace;
20692mkdir gnu
20693(cd gnu
20694TEST_TAR_FORMAT=gnu
20695export TEST_TAR_FORMAT
20696TAR_OPTIONS="-H gnu"
20697export TAR_OPTIONS
20698rm -rf *
20699
20700exec </dev/null
20701dirs='a
20702      a/b
20703      a/b/c
20704      a/b/c/d
20705      a/b/c/d/e
20706      a/b/c/d/e/f
20707      a/b/c/d/e/f/g
20708      a/b/c/d/e/f/g/h
20709      a/b/c/d/e/f/g/h/i
20710      a/b/c/d/e/f/g/h/i/j
20711      a/b/c/d/e/f/g/h/i/j/k
20712'
20713files=
20714mkdir $dirs dest1 dest2 dest3 || exit
20715for dir in $dirs; do
20716  for file in X Y Z; do
20717    echo $file >$dir/$file || exit
20718    files="$files $file"
20719  done
20720done
20721
20722# Check that "ulimit" itself works.  Close file descriptors before
20723# invoking ulimit, to work around a bug (or a "feature") in some shells,
20724# where they squirrel away dups of file descriptors into FD 10 and up
20725# before closing the originals.
20726( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
20727   ulimit -n 100 &&
20728   tar -cf archive1.tar a &&
20729   tar -xf archive1.tar -C dest1 a
20730  ) &&
20731  diff -r a dest1/a
20732) >/dev/null 2>&1 ||
20733   exit 77
20734
20735# Another test that "ulimit" itself works:
20736# tar should fail when completely starved of file descriptors.
20737( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
20738   ulimit -n 4 &&
20739   tar -cf archive2.tar a &&
20740   tar -xf archive2.tar -C dest2 a
20741  ) &&
20742  diff -r a dest2/a
20743) >/dev/null 2>&1 &&
20744   exit 77
20745
20746# Test if it is possible to limit the number of file descriptors to 10.
20747( ulimit -n 10 ) >/dev/null 2>&1 || exit 77
20748
20749# Tar should work when there are few, but enough, file descriptors.
20750( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
20751   ulimit -n 10 &&
20752   tar -cf archive3.tar a &&
20753   tar -xf archive3.tar -C dest3 a
20754  ) &&
20755  diff -r a dest3/a >/dev/null 2>&1
20756) || { diff -r a dest3/a; exit 1; }
20757)
20758) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20759at_status=$? at_failed=false
20760$at_check_filter
20761at_fn_diff_devnull "$at_stderr" || at_failed=:
20762at_fn_diff_devnull "$at_stdout" || at_failed=:
20763at_fn_check_status 0 $at_status "$at_srcdir/extrac11.at:28"
20764$at_failed && at_fn_log_failure
20765$at_traceon; }
20766
20767
20768
20769
20770  set +x
20771  $at_times_p && times >"$at_times_file"
20772) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20773read at_status <"$at_status_file"
20774#AT_STOP_91
20775#AT_START_92
20776at_fn_group_banner 92 'extrac12.at:25' \
20777  "extract dot permissions" "                        " 13
20778at_xfail=no
20779      test -f $XFAILFILE && at_xfail=yes
20780(
20781  $as_echo "92. $at_setup_line: testing $at_desc ..."
20782  $at_traceon
20783
20784
20785
20786
20787
20788  { set +x
20789$as_echo "$at_srcdir/extrac12.at:28:
20790mkdir gnu
20791(cd gnu
20792TEST_TAR_FORMAT=gnu
20793export TEST_TAR_FORMAT
20794TAR_OPTIONS=\"-H gnu\"
20795export TAR_OPTIONS
20796rm -rf *
20797
20798mkdir src dst
20799echo file1 >src/file1
20800echo file2 >src/file2
20801chmod a-w src
20802
20803tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
20804tar -xf archive.tar -C dst &&
20805cmp src/file1 dst/file1 &&
20806cmp src/file2 dst/file2
20807)"
20808at_fn_check_prepare_notrace 'an embedded newline' "extrac12.at:28"
20809( $at_check_trace;
20810mkdir gnu
20811(cd gnu
20812TEST_TAR_FORMAT=gnu
20813export TEST_TAR_FORMAT
20814TAR_OPTIONS="-H gnu"
20815export TAR_OPTIONS
20816rm -rf *
20817
20818mkdir src dst
20819echo file1 >src/file1
20820echo file2 >src/file2
20821chmod a-w src
20822
20823tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
20824tar -xf archive.tar -C dst &&
20825cmp src/file1 dst/file1 &&
20826cmp src/file2 dst/file2
20827)
20828) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20829at_status=$? at_failed=false
20830$at_check_filter
20831at_fn_diff_devnull "$at_stderr" || at_failed=:
20832at_fn_diff_devnull "$at_stdout" || at_failed=:
20833at_fn_check_status 0 $at_status "$at_srcdir/extrac12.at:28"
20834$at_failed && at_fn_log_failure
20835$at_traceon; }
20836
20837
20838
20839
20840  set +x
20841  $at_times_p && times >"$at_times_file"
20842) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20843read at_status <"$at_status_file"
20844#AT_STOP_92
20845#AT_START_93
20846at_fn_group_banner 93 'extrac13.at:26' \
20847  "extract over symlinks" "                          " 13
20848at_xfail=no
20849      test -f $XFAILFILE && at_xfail=yes
20850(
20851  $as_echo "93. $at_setup_line: testing $at_desc ..."
20852  $at_traceon
20853
20854
20855
20856
20857
20858  { set +x
20859$as_echo "$at_srcdir/extrac13.at:29:
20860mkdir gnu
20861(cd gnu
20862TEST_TAR_FORMAT=gnu
20863export TEST_TAR_FORMAT
20864TAR_OPTIONS=\"-H gnu\"
20865export TAR_OPTIONS
20866rm -rf *
20867
20868mkdir src dst1 dst2 dst3
20869echo file1 >src/file1
20870ln -s target1 dst1/file1
20871echo target1 >dst1/target1
20872echo target1 >target1
20873
20874tar -cf archive.tar -C src . &&
20875tar -xf archive.tar -C dst1 --warning=no-timestamp &&
20876diff src/file1 dst1/file1 &&
20877diff target1 dst1/target1
20878
20879ln -s target1 dst2/file1
20880echo target1 >dst2/target1
20881tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
20882diff src/file1 dst2/file1 &&
20883diff target1 dst2/target1
20884
20885ln -s target1 dst3/file1
20886echo target1 >dst3/target1
20887tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
20888diff src/file1 dst3/file1 &&
20889diff src/file1 dst3/target1
20890)"
20891at_fn_check_prepare_notrace 'an embedded newline' "extrac13.at:29"
20892( $at_check_trace;
20893mkdir gnu
20894(cd gnu
20895TEST_TAR_FORMAT=gnu
20896export TEST_TAR_FORMAT
20897TAR_OPTIONS="-H gnu"
20898export TAR_OPTIONS
20899rm -rf *
20900
20901mkdir src dst1 dst2 dst3
20902echo file1 >src/file1
20903ln -s target1 dst1/file1
20904echo target1 >dst1/target1
20905echo target1 >target1
20906
20907tar -cf archive.tar -C src . &&
20908tar -xf archive.tar -C dst1 --warning=no-timestamp &&
20909diff src/file1 dst1/file1 &&
20910diff target1 dst1/target1
20911
20912ln -s target1 dst2/file1
20913echo target1 >dst2/target1
20914tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
20915diff src/file1 dst2/file1 &&
20916diff target1 dst2/target1
20917
20918ln -s target1 dst3/file1
20919echo target1 >dst3/target1
20920tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
20921diff src/file1 dst3/file1 &&
20922diff src/file1 dst3/target1
20923)
20924) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20925at_status=$? at_failed=false
20926$at_check_filter
20927at_fn_diff_devnull "$at_stderr" || at_failed=:
20928at_fn_diff_devnull "$at_stdout" || at_failed=:
20929at_fn_check_status 0 $at_status "$at_srcdir/extrac13.at:29"
20930$at_failed && at_fn_log_failure
20931$at_traceon; }
20932
20933
20934
20935
20936  set +x
20937  $at_times_p && times >"$at_times_file"
20938) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20939read at_status <"$at_status_file"
20940#AT_STOP_93
20941#AT_START_94
20942at_fn_group_banner 94 'extrac14.at:25' \
20943  "extract -C symlink" "                             " 13
20944at_xfail=no
20945      test -f $XFAILFILE && at_xfail=yes
20946(
20947  $as_echo "94. $at_setup_line: testing $at_desc ..."
20948  $at_traceon
20949
20950
20951
20952
20953
20954  { set +x
20955$as_echo "$at_srcdir/extrac14.at:28:
20956mkdir gnu
20957(cd gnu
20958TEST_TAR_FORMAT=gnu
20959export TEST_TAR_FORMAT
20960TAR_OPTIONS=\"-H gnu\"
20961export TAR_OPTIONS
20962rm -rf *
20963
20964mkdir dest
20965ln -s dest symlink
20966echo foo >foo
20967tar -cf archive.tar foo &&
20968tar -xf archive.tar -C symlink --warning=no-timestamp &&
20969cmp foo dest/foo
20970)"
20971at_fn_check_prepare_notrace 'an embedded newline' "extrac14.at:28"
20972( $at_check_trace;
20973mkdir gnu
20974(cd gnu
20975TEST_TAR_FORMAT=gnu
20976export TEST_TAR_FORMAT
20977TAR_OPTIONS="-H gnu"
20978export TAR_OPTIONS
20979rm -rf *
20980
20981mkdir dest
20982ln -s dest symlink
20983echo foo >foo
20984tar -cf archive.tar foo &&
20985tar -xf archive.tar -C symlink --warning=no-timestamp &&
20986cmp foo dest/foo
20987)
20988) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20989at_status=$? at_failed=false
20990$at_check_filter
20991at_fn_diff_devnull "$at_stderr" || at_failed=:
20992at_fn_diff_devnull "$at_stdout" || at_failed=:
20993at_fn_check_status 0 $at_status "$at_srcdir/extrac14.at:28"
20994$at_failed && at_fn_log_failure
20995$at_traceon; }
20996
20997
20998
20999
21000  set +x
21001  $at_times_p && times >"$at_times_file"
21002) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21003read at_status <"$at_status_file"
21004#AT_STOP_94
21005#AT_START_95
21006at_fn_group_banner 95 'extrac15.at:25' \
21007  "extract parent mkdir failure" "                   " 13
21008at_xfail=no
21009      test -f $XFAILFILE && at_xfail=yes
21010(
21011  $as_echo "95. $at_setup_line: testing $at_desc ..."
21012  $at_traceon
21013
21014
21015
21016
21017
21018  { set +x
21019$as_echo "$at_srcdir/extrac15.at:28:
21020mkdir gnu
21021(cd gnu
21022TEST_TAR_FORMAT=gnu
21023export TEST_TAR_FORMAT
21024TAR_OPTIONS=\"-H gnu\"
21025export TAR_OPTIONS
21026rm -rf *
21027
21028
21029echo \"test\" > \$\$
21030chmod 0 \$\$
21031cat \$\$ > /dev/null 2>&1
21032result=\$?
21033rm -f \$\$
21034test \$result -eq 0 && exit 77
21035
21036
21037mkdir src src/a src/a/b dest dest/a
21038touch src/a/b/c
21039chmod a-w dest/a
21040
21041tar -cf archive.tar -C src a/b/c &&
21042if tar -xf archive.tar -C dest a/b/c
21043then (exit 1)
21044else (exit 0)
21045fi
21046)"
21047at_fn_check_prepare_notrace 'an embedded newline' "extrac15.at:28"
21048( $at_check_trace;
21049mkdir gnu
21050(cd gnu
21051TEST_TAR_FORMAT=gnu
21052export TEST_TAR_FORMAT
21053TAR_OPTIONS="-H gnu"
21054export TAR_OPTIONS
21055rm -rf *
21056
21057
21058echo "test" > $$
21059chmod 0 $$
21060cat $$ > /dev/null 2>&1
21061result=$?
21062rm -f $$
21063test $result -eq 0 && exit 77
21064
21065
21066mkdir src src/a src/a/b dest dest/a
21067touch src/a/b/c
21068chmod a-w dest/a
21069
21070tar -cf archive.tar -C src a/b/c &&
21071if tar -xf archive.tar -C dest a/b/c
21072then (exit 1)
21073else (exit 0)
21074fi
21075)
21076) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21077at_status=$? at_failed=false
21078$at_check_filter
21079echo >>"$at_stderr"; $as_echo "tar: a/b: Cannot mkdir: Permission denied
21080tar: a/b/c: Cannot open: No such file or directory
21081tar: Exiting with failure status due to previous errors
21082" | \
21083  $at_diff - "$at_stderr" || at_failed=:
21084at_fn_diff_devnull "$at_stdout" || at_failed=:
21085at_fn_check_status 0 $at_status "$at_srcdir/extrac15.at:28"
21086$at_failed && at_fn_log_failure
21087$at_traceon; }
21088
21089
21090
21091
21092  set +x
21093  $at_times_p && times >"$at_times_file"
21094) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21095read at_status <"$at_status_file"
21096#AT_STOP_95
21097#AT_START_96
21098at_fn_group_banner 96 'extrac16.at:26' \
21099  "extract empty directory with -C" "                " 13
21100at_xfail=no
21101      test -f $XFAILFILE && at_xfail=yes
21102(
21103  $as_echo "96. $at_setup_line: testing $at_desc ..."
21104  $at_traceon
21105
21106
21107
21108
21109
21110  { set +x
21111$as_echo "$at_srcdir/extrac16.at:29:
21112mkdir gnu
21113(cd gnu
21114TEST_TAR_FORMAT=gnu
21115export TEST_TAR_FORMAT
21116TAR_OPTIONS=\"-H gnu\"
21117export TAR_OPTIONS
21118rm -rf *
21119
21120mkdir src src/a src/a/b dest
21121touch src/a/c
21122
21123tar -cf archive.tar -C src a &&
21124tar -xf archive.tar -C dest
21125)"
21126at_fn_check_prepare_notrace 'an embedded newline' "extrac16.at:29"
21127( $at_check_trace;
21128mkdir gnu
21129(cd gnu
21130TEST_TAR_FORMAT=gnu
21131export TEST_TAR_FORMAT
21132TAR_OPTIONS="-H gnu"
21133export TAR_OPTIONS
21134rm -rf *
21135
21136mkdir src src/a src/a/b dest
21137touch src/a/c
21138
21139tar -cf archive.tar -C src a &&
21140tar -xf archive.tar -C dest
21141)
21142) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21143at_status=$? at_failed=false
21144$at_check_filter
21145at_fn_diff_devnull "$at_stderr" || at_failed=:
21146at_fn_diff_devnull "$at_stdout" || at_failed=:
21147at_fn_check_status 0 $at_status "$at_srcdir/extrac16.at:29"
21148$at_failed && at_fn_log_failure
21149$at_traceon; }
21150
21151
21152
21153
21154  set +x
21155  $at_times_p && times >"$at_times_file"
21156) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21157read at_status <"$at_status_file"
21158#AT_STOP_96
21159#AT_START_97
21160at_fn_group_banner 97 'extrac17.at:21' \
21161  "name matching/transformation ordering" "          " 13
21162at_xfail=no
21163      test -f $XFAILFILE && at_xfail=yes
21164(
21165  $as_echo "97. $at_setup_line: testing $at_desc ..."
21166  $at_traceon
21167
21168
21169
21170# Description: Tar 1.24 changed the ordering of name matching and
21171# name transformation so that the former saw already transformed
21172# file names (see commit 9c194c99 and exclude06.at).  This reverted
21173# ordering made it impossible to match file names in certain cases.
21174# In particular, the testcase below would not extract anything.
21175#
21176# Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
21177# References: <x6r5fd9jye@gzp>, <20101026175126.29028@Pirx.gnu.org.ua>
21178#             http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
21179
21180
21181
21182  { set +x
21183$as_echo "$at_srcdir/extrac17.at:34:
21184mkdir v7
21185(cd v7
21186TEST_TAR_FORMAT=v7
21187export TEST_TAR_FORMAT
21188TAR_OPTIONS=\"-H v7\"
21189export TAR_OPTIONS
21190rm -rf *
21191
21192mkdir dir dir/subdir1 dir/subdir2 out
21193genfile --file dir/subdir1/file1
21194genfile --file dir/subdir2/file2
21195
21196tar cf dir.tar dir
21197
21198tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
21199  dir/subdir1/
21200)"
21201at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
21202( $at_check_trace;
21203mkdir v7
21204(cd v7
21205TEST_TAR_FORMAT=v7
21206export TEST_TAR_FORMAT
21207TAR_OPTIONS="-H v7"
21208export TAR_OPTIONS
21209rm -rf *
21210
21211mkdir dir dir/subdir1 dir/subdir2 out
21212genfile --file dir/subdir1/file1
21213genfile --file dir/subdir2/file2
21214
21215tar cf dir.tar dir
21216
21217tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
21218  dir/subdir1/
21219)
21220) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21221at_status=$? at_failed=false
21222$at_check_filter
21223at_fn_diff_devnull "$at_stderr" || at_failed=:
21224echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
21225" | \
21226  $at_diff - "$at_stdout" || at_failed=:
21227at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
21228$at_failed && at_fn_log_failure
21229$at_traceon; }
21230
21231              { set +x
21232$as_echo "$at_srcdir/extrac17.at:34:
21233mkdir oldgnu
21234(cd oldgnu
21235TEST_TAR_FORMAT=oldgnu
21236export TEST_TAR_FORMAT
21237TAR_OPTIONS=\"-H oldgnu\"
21238export TAR_OPTIONS
21239rm -rf *
21240
21241mkdir dir dir/subdir1 dir/subdir2 out
21242genfile --file dir/subdir1/file1
21243genfile --file dir/subdir2/file2
21244
21245tar cf dir.tar dir
21246
21247tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
21248  dir/subdir1/
21249)"
21250at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
21251( $at_check_trace;
21252mkdir oldgnu
21253(cd oldgnu
21254TEST_TAR_FORMAT=oldgnu
21255export TEST_TAR_FORMAT
21256TAR_OPTIONS="-H oldgnu"
21257export TAR_OPTIONS
21258rm -rf *
21259
21260mkdir dir dir/subdir1 dir/subdir2 out
21261genfile --file dir/subdir1/file1
21262genfile --file dir/subdir2/file2
21263
21264tar cf dir.tar dir
21265
21266tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
21267  dir/subdir1/
21268)
21269) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21270at_status=$? at_failed=false
21271$at_check_filter
21272at_fn_diff_devnull "$at_stderr" || at_failed=:
21273echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
21274" | \
21275  $at_diff - "$at_stdout" || at_failed=:
21276at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
21277$at_failed && at_fn_log_failure
21278$at_traceon; }
21279
21280              { set +x
21281$as_echo "$at_srcdir/extrac17.at:34:
21282mkdir ustar
21283(cd ustar
21284TEST_TAR_FORMAT=ustar
21285export TEST_TAR_FORMAT
21286TAR_OPTIONS=\"-H ustar\"
21287export TAR_OPTIONS
21288rm -rf *
21289
21290mkdir dir dir/subdir1 dir/subdir2 out
21291genfile --file dir/subdir1/file1
21292genfile --file dir/subdir2/file2
21293
21294tar cf dir.tar dir
21295
21296tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
21297  dir/subdir1/
21298)"
21299at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
21300( $at_check_trace;
21301mkdir ustar
21302(cd ustar
21303TEST_TAR_FORMAT=ustar
21304export TEST_TAR_FORMAT
21305TAR_OPTIONS="-H ustar"
21306export TAR_OPTIONS
21307rm -rf *
21308
21309mkdir dir dir/subdir1 dir/subdir2 out
21310genfile --file dir/subdir1/file1
21311genfile --file dir/subdir2/file2
21312
21313tar cf dir.tar dir
21314
21315tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
21316  dir/subdir1/
21317)
21318) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21319at_status=$? at_failed=false
21320$at_check_filter
21321at_fn_diff_devnull "$at_stderr" || at_failed=:
21322echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
21323" | \
21324  $at_diff - "$at_stdout" || at_failed=:
21325at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
21326$at_failed && at_fn_log_failure
21327$at_traceon; }
21328
21329              { set +x
21330$as_echo "$at_srcdir/extrac17.at:34:
21331mkdir posix
21332(cd posix
21333TEST_TAR_FORMAT=posix
21334export TEST_TAR_FORMAT
21335TAR_OPTIONS=\"-H posix\"
21336export TAR_OPTIONS
21337rm -rf *
21338
21339mkdir dir dir/subdir1 dir/subdir2 out
21340genfile --file dir/subdir1/file1
21341genfile --file dir/subdir2/file2
21342
21343tar cf dir.tar dir
21344
21345tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
21346  dir/subdir1/
21347)"
21348at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
21349( $at_check_trace;
21350mkdir posix
21351(cd posix
21352TEST_TAR_FORMAT=posix
21353export TEST_TAR_FORMAT
21354TAR_OPTIONS="-H posix"
21355export TAR_OPTIONS
21356rm -rf *
21357
21358mkdir dir dir/subdir1 dir/subdir2 out
21359genfile --file dir/subdir1/file1
21360genfile --file dir/subdir2/file2
21361
21362tar cf dir.tar dir
21363
21364tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
21365  dir/subdir1/
21366)
21367) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21368at_status=$? at_failed=false
21369$at_check_filter
21370at_fn_diff_devnull "$at_stderr" || at_failed=:
21371echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
21372" | \
21373  $at_diff - "$at_stdout" || at_failed=:
21374at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
21375$at_failed && at_fn_log_failure
21376$at_traceon; }
21377
21378              { set +x
21379$as_echo "$at_srcdir/extrac17.at:34:
21380mkdir gnu
21381(cd gnu
21382TEST_TAR_FORMAT=gnu
21383export TEST_TAR_FORMAT
21384TAR_OPTIONS=\"-H gnu\"
21385export TAR_OPTIONS
21386rm -rf *
21387
21388mkdir dir dir/subdir1 dir/subdir2 out
21389genfile --file dir/subdir1/file1
21390genfile --file dir/subdir2/file2
21391
21392tar cf dir.tar dir
21393
21394tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
21395  dir/subdir1/
21396)"
21397at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
21398( $at_check_trace;
21399mkdir gnu
21400(cd gnu
21401TEST_TAR_FORMAT=gnu
21402export TEST_TAR_FORMAT
21403TAR_OPTIONS="-H gnu"
21404export TAR_OPTIONS
21405rm -rf *
21406
21407mkdir dir dir/subdir1 dir/subdir2 out
21408genfile --file dir/subdir1/file1
21409genfile --file dir/subdir2/file2
21410
21411tar cf dir.tar dir
21412
21413tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
21414  dir/subdir1/
21415)
21416) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21417at_status=$? at_failed=false
21418$at_check_filter
21419at_fn_diff_devnull "$at_stderr" || at_failed=:
21420echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
21421" | \
21422  $at_diff - "$at_stdout" || at_failed=:
21423at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
21424$at_failed && at_fn_log_failure
21425$at_traceon; }
21426
21427
21428
21429
21430  set +x
21431  $at_times_p && times >"$at_times_file"
21432) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21433read at_status <"$at_status_file"
21434#AT_STOP_97
21435#AT_START_98
21436at_fn_group_banner 98 'extrac18.at:34' \
21437  "keep-old-files" "                                 " 13
21438at_xfail=no
21439      test -f $XFAILFILE && at_xfail=yes
21440(
21441  $as_echo "98. $at_setup_line: testing $at_desc ..."
21442  $at_traceon
21443
21444
21445
21446
21447
21448  { set +x
21449$as_echo "$at_srcdir/extrac18.at:37:
21450mkdir v7
21451(cd v7
21452TEST_TAR_FORMAT=v7
21453export TEST_TAR_FORMAT
21454TAR_OPTIONS=\"-H v7\"
21455export TAR_OPTIONS
21456rm -rf *
21457
21458mkdir dir
21459cd dir
21460echo 'Old file a' > a
21461echo 'Old file b' > b
21462
21463tar cf ../archive .
21464
21465rm b
21466echo 'File a' > a
21467
21468tar -x -k -f ../archive
21469echo status=\$?
21470
21471cat a
21472)"
21473at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
21474( $at_check_trace;
21475mkdir v7
21476(cd v7
21477TEST_TAR_FORMAT=v7
21478export TEST_TAR_FORMAT
21479TAR_OPTIONS="-H v7"
21480export TAR_OPTIONS
21481rm -rf *
21482
21483mkdir dir
21484cd dir
21485echo 'Old file a' > a
21486echo 'Old file b' > b
21487
21488tar cf ../archive .
21489
21490rm b
21491echo 'File a' > a
21492
21493tar -x -k -f ../archive
21494echo status=$?
21495
21496cat a
21497)
21498) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21499at_status=$? at_failed=false
21500$at_check_filter
21501echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
21502tar: Exiting with failure status due to previous errors
21503" | \
21504  $at_diff - "$at_stderr" || at_failed=:
21505echo >>"$at_stdout"; $as_echo "status=2
21506File a
21507" | \
21508  $at_diff - "$at_stdout" || at_failed=:
21509at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
21510$at_failed && at_fn_log_failure
21511$at_traceon; }
21512
21513              { set +x
21514$as_echo "$at_srcdir/extrac18.at:37:
21515mkdir oldgnu
21516(cd oldgnu
21517TEST_TAR_FORMAT=oldgnu
21518export TEST_TAR_FORMAT
21519TAR_OPTIONS=\"-H oldgnu\"
21520export TAR_OPTIONS
21521rm -rf *
21522
21523mkdir dir
21524cd dir
21525echo 'Old file a' > a
21526echo 'Old file b' > b
21527
21528tar cf ../archive .
21529
21530rm b
21531echo 'File a' > a
21532
21533tar -x -k -f ../archive
21534echo status=\$?
21535
21536cat a
21537)"
21538at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
21539( $at_check_trace;
21540mkdir oldgnu
21541(cd oldgnu
21542TEST_TAR_FORMAT=oldgnu
21543export TEST_TAR_FORMAT
21544TAR_OPTIONS="-H oldgnu"
21545export TAR_OPTIONS
21546rm -rf *
21547
21548mkdir dir
21549cd dir
21550echo 'Old file a' > a
21551echo 'Old file b' > b
21552
21553tar cf ../archive .
21554
21555rm b
21556echo 'File a' > a
21557
21558tar -x -k -f ../archive
21559echo status=$?
21560
21561cat a
21562)
21563) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21564at_status=$? at_failed=false
21565$at_check_filter
21566echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
21567tar: Exiting with failure status due to previous errors
21568" | \
21569  $at_diff - "$at_stderr" || at_failed=:
21570echo >>"$at_stdout"; $as_echo "status=2
21571File a
21572" | \
21573  $at_diff - "$at_stdout" || at_failed=:
21574at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
21575$at_failed && at_fn_log_failure
21576$at_traceon; }
21577
21578              { set +x
21579$as_echo "$at_srcdir/extrac18.at:37:
21580mkdir ustar
21581(cd ustar
21582TEST_TAR_FORMAT=ustar
21583export TEST_TAR_FORMAT
21584TAR_OPTIONS=\"-H ustar\"
21585export TAR_OPTIONS
21586rm -rf *
21587
21588mkdir dir
21589cd dir
21590echo 'Old file a' > a
21591echo 'Old file b' > b
21592
21593tar cf ../archive .
21594
21595rm b
21596echo 'File a' > a
21597
21598tar -x -k -f ../archive
21599echo status=\$?
21600
21601cat a
21602)"
21603at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
21604( $at_check_trace;
21605mkdir ustar
21606(cd ustar
21607TEST_TAR_FORMAT=ustar
21608export TEST_TAR_FORMAT
21609TAR_OPTIONS="-H ustar"
21610export TAR_OPTIONS
21611rm -rf *
21612
21613mkdir dir
21614cd dir
21615echo 'Old file a' > a
21616echo 'Old file b' > b
21617
21618tar cf ../archive .
21619
21620rm b
21621echo 'File a' > a
21622
21623tar -x -k -f ../archive
21624echo status=$?
21625
21626cat a
21627)
21628) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21629at_status=$? at_failed=false
21630$at_check_filter
21631echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
21632tar: Exiting with failure status due to previous errors
21633" | \
21634  $at_diff - "$at_stderr" || at_failed=:
21635echo >>"$at_stdout"; $as_echo "status=2
21636File a
21637" | \
21638  $at_diff - "$at_stdout" || at_failed=:
21639at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
21640$at_failed && at_fn_log_failure
21641$at_traceon; }
21642
21643              { set +x
21644$as_echo "$at_srcdir/extrac18.at:37:
21645mkdir posix
21646(cd posix
21647TEST_TAR_FORMAT=posix
21648export TEST_TAR_FORMAT
21649TAR_OPTIONS=\"-H posix\"
21650export TAR_OPTIONS
21651rm -rf *
21652
21653mkdir dir
21654cd dir
21655echo 'Old file a' > a
21656echo 'Old file b' > b
21657
21658tar cf ../archive .
21659
21660rm b
21661echo 'File a' > a
21662
21663tar -x -k -f ../archive
21664echo status=\$?
21665
21666cat a
21667)"
21668at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
21669( $at_check_trace;
21670mkdir posix
21671(cd posix
21672TEST_TAR_FORMAT=posix
21673export TEST_TAR_FORMAT
21674TAR_OPTIONS="-H posix"
21675export TAR_OPTIONS
21676rm -rf *
21677
21678mkdir dir
21679cd dir
21680echo 'Old file a' > a
21681echo 'Old file b' > b
21682
21683tar cf ../archive .
21684
21685rm b
21686echo 'File a' > a
21687
21688tar -x -k -f ../archive
21689echo status=$?
21690
21691cat a
21692)
21693) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21694at_status=$? at_failed=false
21695$at_check_filter
21696echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
21697tar: Exiting with failure status due to previous errors
21698" | \
21699  $at_diff - "$at_stderr" || at_failed=:
21700echo >>"$at_stdout"; $as_echo "status=2
21701File a
21702" | \
21703  $at_diff - "$at_stdout" || at_failed=:
21704at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
21705$at_failed && at_fn_log_failure
21706$at_traceon; }
21707
21708              { set +x
21709$as_echo "$at_srcdir/extrac18.at:37:
21710mkdir gnu
21711(cd gnu
21712TEST_TAR_FORMAT=gnu
21713export TEST_TAR_FORMAT
21714TAR_OPTIONS=\"-H gnu\"
21715export TAR_OPTIONS
21716rm -rf *
21717
21718mkdir dir
21719cd dir
21720echo 'Old file a' > a
21721echo 'Old file b' > b
21722
21723tar cf ../archive .
21724
21725rm b
21726echo 'File a' > a
21727
21728tar -x -k -f ../archive
21729echo status=\$?
21730
21731cat a
21732)"
21733at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
21734( $at_check_trace;
21735mkdir gnu
21736(cd gnu
21737TEST_TAR_FORMAT=gnu
21738export TEST_TAR_FORMAT
21739TAR_OPTIONS="-H gnu"
21740export TAR_OPTIONS
21741rm -rf *
21742
21743mkdir dir
21744cd dir
21745echo 'Old file a' > a
21746echo 'Old file b' > b
21747
21748tar cf ../archive .
21749
21750rm b
21751echo 'File a' > a
21752
21753tar -x -k -f ../archive
21754echo status=$?
21755
21756cat a
21757)
21758) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21759at_status=$? at_failed=false
21760$at_check_filter
21761echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
21762tar: Exiting with failure status due to previous errors
21763" | \
21764  $at_diff - "$at_stderr" || at_failed=:
21765echo >>"$at_stdout"; $as_echo "status=2
21766File a
21767" | \
21768  $at_diff - "$at_stdout" || at_failed=:
21769at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
21770$at_failed && at_fn_log_failure
21771$at_traceon; }
21772
21773
21774
21775
21776  set +x
21777  $at_times_p && times >"$at_times_file"
21778) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21779read at_status <"$at_status_file"
21780#AT_STOP_98
21781#AT_START_99
21782at_fn_group_banner 99 'extrac19.at:21' \
21783  "skip-old-files" "                                 " 13
21784at_xfail=no
21785      test -f $XFAILFILE && at_xfail=yes
21786(
21787  $as_echo "99. $at_setup_line: testing $at_desc ..."
21788  $at_traceon
21789
21790
21791
21792
21793
21794  { set +x
21795$as_echo "$at_srcdir/extrac19.at:24:
21796mkdir v7
21797(cd v7
21798TEST_TAR_FORMAT=v7
21799export TEST_TAR_FORMAT
21800TAR_OPTIONS=\"-H v7\"
21801export TAR_OPTIONS
21802rm -rf *
21803
21804mkdir dir
21805cd dir
21806echo 'Old file a' > a
21807echo 'Old file b' > b
21808
21809tar cf ../archive .
21810
21811rm b
21812echo 'File a' > a
21813
21814tar -x --skip-old-files -f ../archive
21815echo status=\$?
21816
21817cat a
21818)"
21819at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
21820( $at_check_trace;
21821mkdir v7
21822(cd v7
21823TEST_TAR_FORMAT=v7
21824export TEST_TAR_FORMAT
21825TAR_OPTIONS="-H v7"
21826export TAR_OPTIONS
21827rm -rf *
21828
21829mkdir dir
21830cd dir
21831echo 'Old file a' > a
21832echo 'Old file b' > b
21833
21834tar cf ../archive .
21835
21836rm b
21837echo 'File a' > a
21838
21839tar -x --skip-old-files -f ../archive
21840echo status=$?
21841
21842cat a
21843)
21844) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21845at_status=$? at_failed=false
21846$at_check_filter
21847at_fn_diff_devnull "$at_stderr" || at_failed=:
21848echo >>"$at_stdout"; $as_echo "status=0
21849File a
21850" | \
21851  $at_diff - "$at_stdout" || at_failed=:
21852at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
21853$at_failed && at_fn_log_failure
21854$at_traceon; }
21855
21856              { set +x
21857$as_echo "$at_srcdir/extrac19.at:24:
21858mkdir oldgnu
21859(cd oldgnu
21860TEST_TAR_FORMAT=oldgnu
21861export TEST_TAR_FORMAT
21862TAR_OPTIONS=\"-H oldgnu\"
21863export TAR_OPTIONS
21864rm -rf *
21865
21866mkdir dir
21867cd dir
21868echo 'Old file a' > a
21869echo 'Old file b' > b
21870
21871tar cf ../archive .
21872
21873rm b
21874echo 'File a' > a
21875
21876tar -x --skip-old-files -f ../archive
21877echo status=\$?
21878
21879cat a
21880)"
21881at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
21882( $at_check_trace;
21883mkdir oldgnu
21884(cd oldgnu
21885TEST_TAR_FORMAT=oldgnu
21886export TEST_TAR_FORMAT
21887TAR_OPTIONS="-H oldgnu"
21888export TAR_OPTIONS
21889rm -rf *
21890
21891mkdir dir
21892cd dir
21893echo 'Old file a' > a
21894echo 'Old file b' > b
21895
21896tar cf ../archive .
21897
21898rm b
21899echo 'File a' > a
21900
21901tar -x --skip-old-files -f ../archive
21902echo status=$?
21903
21904cat a
21905)
21906) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21907at_status=$? at_failed=false
21908$at_check_filter
21909at_fn_diff_devnull "$at_stderr" || at_failed=:
21910echo >>"$at_stdout"; $as_echo "status=0
21911File a
21912" | \
21913  $at_diff - "$at_stdout" || at_failed=:
21914at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
21915$at_failed && at_fn_log_failure
21916$at_traceon; }
21917
21918              { set +x
21919$as_echo "$at_srcdir/extrac19.at:24:
21920mkdir ustar
21921(cd ustar
21922TEST_TAR_FORMAT=ustar
21923export TEST_TAR_FORMAT
21924TAR_OPTIONS=\"-H ustar\"
21925export TAR_OPTIONS
21926rm -rf *
21927
21928mkdir dir
21929cd dir
21930echo 'Old file a' > a
21931echo 'Old file b' > b
21932
21933tar cf ../archive .
21934
21935rm b
21936echo 'File a' > a
21937
21938tar -x --skip-old-files -f ../archive
21939echo status=\$?
21940
21941cat a
21942)"
21943at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
21944( $at_check_trace;
21945mkdir ustar
21946(cd ustar
21947TEST_TAR_FORMAT=ustar
21948export TEST_TAR_FORMAT
21949TAR_OPTIONS="-H ustar"
21950export TAR_OPTIONS
21951rm -rf *
21952
21953mkdir dir
21954cd dir
21955echo 'Old file a' > a
21956echo 'Old file b' > b
21957
21958tar cf ../archive .
21959
21960rm b
21961echo 'File a' > a
21962
21963tar -x --skip-old-files -f ../archive
21964echo status=$?
21965
21966cat a
21967)
21968) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21969at_status=$? at_failed=false
21970$at_check_filter
21971at_fn_diff_devnull "$at_stderr" || at_failed=:
21972echo >>"$at_stdout"; $as_echo "status=0
21973File a
21974" | \
21975  $at_diff - "$at_stdout" || at_failed=:
21976at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
21977$at_failed && at_fn_log_failure
21978$at_traceon; }
21979
21980              { set +x
21981$as_echo "$at_srcdir/extrac19.at:24:
21982mkdir posix
21983(cd posix
21984TEST_TAR_FORMAT=posix
21985export TEST_TAR_FORMAT
21986TAR_OPTIONS=\"-H posix\"
21987export TAR_OPTIONS
21988rm -rf *
21989
21990mkdir dir
21991cd dir
21992echo 'Old file a' > a
21993echo 'Old file b' > b
21994
21995tar cf ../archive .
21996
21997rm b
21998echo 'File a' > a
21999
22000tar -x --skip-old-files -f ../archive
22001echo status=\$?
22002
22003cat a
22004)"
22005at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
22006( $at_check_trace;
22007mkdir posix
22008(cd posix
22009TEST_TAR_FORMAT=posix
22010export TEST_TAR_FORMAT
22011TAR_OPTIONS="-H posix"
22012export TAR_OPTIONS
22013rm -rf *
22014
22015mkdir dir
22016cd dir
22017echo 'Old file a' > a
22018echo 'Old file b' > b
22019
22020tar cf ../archive .
22021
22022rm b
22023echo 'File a' > a
22024
22025tar -x --skip-old-files -f ../archive
22026echo status=$?
22027
22028cat a
22029)
22030) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22031at_status=$? at_failed=false
22032$at_check_filter
22033at_fn_diff_devnull "$at_stderr" || at_failed=:
22034echo >>"$at_stdout"; $as_echo "status=0
22035File a
22036" | \
22037  $at_diff - "$at_stdout" || at_failed=:
22038at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
22039$at_failed && at_fn_log_failure
22040$at_traceon; }
22041
22042              { set +x
22043$as_echo "$at_srcdir/extrac19.at:24:
22044mkdir gnu
22045(cd gnu
22046TEST_TAR_FORMAT=gnu
22047export TEST_TAR_FORMAT
22048TAR_OPTIONS=\"-H gnu\"
22049export TAR_OPTIONS
22050rm -rf *
22051
22052mkdir dir
22053cd dir
22054echo 'Old file a' > a
22055echo 'Old file b' > b
22056
22057tar cf ../archive .
22058
22059rm b
22060echo 'File a' > a
22061
22062tar -x --skip-old-files -f ../archive
22063echo status=\$?
22064
22065cat a
22066)"
22067at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
22068( $at_check_trace;
22069mkdir gnu
22070(cd gnu
22071TEST_TAR_FORMAT=gnu
22072export TEST_TAR_FORMAT
22073TAR_OPTIONS="-H gnu"
22074export TAR_OPTIONS
22075rm -rf *
22076
22077mkdir dir
22078cd dir
22079echo 'Old file a' > a
22080echo 'Old file b' > b
22081
22082tar cf ../archive .
22083
22084rm b
22085echo 'File a' > a
22086
22087tar -x --skip-old-files -f ../archive
22088echo status=$?
22089
22090cat a
22091)
22092) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22093at_status=$? at_failed=false
22094$at_check_filter
22095at_fn_diff_devnull "$at_stderr" || at_failed=:
22096echo >>"$at_stdout"; $as_echo "status=0
22097File a
22098" | \
22099  $at_diff - "$at_stdout" || at_failed=:
22100at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
22101$at_failed && at_fn_log_failure
22102$at_traceon; }
22103
22104
22105
22106
22107  set +x
22108  $at_times_p && times >"$at_times_file"
22109) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22110read at_status <"$at_status_file"
22111#AT_STOP_99
22112#AT_START_100
22113at_fn_group_banner 100 'extrac20.at:21' \
22114  "keep-directory-symlink" "                         " 13
22115at_xfail=no
22116      test -f $XFAILFILE && at_xfail=yes
22117(
22118  $as_echo "100. $at_setup_line: testing $at_desc ..."
22119  $at_traceon
22120
22121
22122
22123
22124
22125  { set +x
22126$as_echo "$at_srcdir/extrac20.at:24:
22127mkdir v7
22128(cd v7
22129TEST_TAR_FORMAT=v7
22130export TEST_TAR_FORMAT
22131TAR_OPTIONS=\"-H v7\"
22132export TAR_OPTIONS
22133rm -rf *
22134
22135
22136test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22137
22138
22139for i in a b c
22140do
22141  dir=in\$i
22142  mkdir -p \$dir/root/dir \$dir/root/dirsymlink
22143  touch \$dir/root/dirsymlink/file\$i
22144  test \$i != a && touch \$dir/root/dirsymlink/file.conflict
22145  tar cf archive\$i.tar -C \$dir root
22146done
22147
22148prep()
22149{
22150  echo \"== \$1 ==\"
22151  echo \"== \$1 ==\" >&2
22152  backup_dir=\$1
22153  dir=out
22154  mkdir -p \$dir/root/dir
22155  ln -s dir \$dir/root/dirsymlink
22156  test \$round = normal && cd \$dir >/dev/null
22157}
22158
22159clean()
22160{
22161  test \$round = normal && cd .. >/dev/null
22162  find \$dir | sort
22163  mv \$dir \$backup_dir
22164}
22165
22166# Expand to '-f ../\$1' or '-f \$1 -C \$dir' depending on \$round variable
22167file_spec()
22168{
22169  if test \$round = normal
22170  then
22171    echo \"-f ../\$1\"
22172  else
22173    echo \"-f \$1 -C \$dir\"
22174  fi
22175}
22176
22177for round in normal dir
22178do
22179  # Check that 'dirsymlink' replaces 'dir'
22180  prep without_option_\$round
22181  tar -x \`file_spec archivea.tar\` || exit 1
22182  tar -x \`file_spec archiveb.tar\` || exit 1
22183  clean
22184
22185  # Keep directory symlink must keep root/dirsymlink
22186  prep with_option_\$round
22187  tar -x --keep-directory-symlink \`file_spec archivea.tar\` || exit 1
22188  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` || exit 1
22189  clean
22190
22191  prep collision_\$round
22192  tar -x --keep-directory-symlink \`file_spec archivea.tar\` --keep-old-files || exit 1
22193  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` --keep-old-files || exit 1
22194  tar -x --keep-directory-symlink \`file_spec archivec.tar\` --keep-old-files && exit 1
22195  clean
22196done
22197)"
22198at_fn_check_prepare_notrace 'a `...` command substitution' "extrac20.at:24"
22199( $at_check_trace;
22200mkdir v7
22201(cd v7
22202TEST_TAR_FORMAT=v7
22203export TEST_TAR_FORMAT
22204TAR_OPTIONS="-H v7"
22205export TAR_OPTIONS
22206rm -rf *
22207
22208
22209test -z "`sort < /dev/null 2>&1`" || exit 77
22210
22211
22212for i in a b c
22213do
22214  dir=in$i
22215  mkdir -p $dir/root/dir $dir/root/dirsymlink
22216  touch $dir/root/dirsymlink/file$i
22217  test $i != a && touch $dir/root/dirsymlink/file.conflict
22218  tar cf archive$i.tar -C $dir root
22219done
22220
22221prep()
22222{
22223  echo "== $1 =="
22224  echo "== $1 ==" >&2
22225  backup_dir=$1
22226  dir=out
22227  mkdir -p $dir/root/dir
22228  ln -s dir $dir/root/dirsymlink
22229  test $round = normal && cd $dir >/dev/null
22230}
22231
22232clean()
22233{
22234  test $round = normal && cd .. >/dev/null
22235  find $dir | sort
22236  mv $dir $backup_dir
22237}
22238
22239# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable
22240file_spec()
22241{
22242  if test $round = normal
22243  then
22244    echo "-f ../$1"
22245  else
22246    echo "-f $1 -C $dir"
22247  fi
22248}
22249
22250for round in normal dir
22251do
22252  # Check that 'dirsymlink' replaces 'dir'
22253  prep without_option_$round
22254  tar -x `file_spec archivea.tar` || exit 1
22255  tar -x `file_spec archiveb.tar` || exit 1
22256  clean
22257
22258  # Keep directory symlink must keep root/dirsymlink
22259  prep with_option_$round
22260  tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1
22261  tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1
22262  clean
22263
22264  prep collision_$round
22265  tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1
22266  tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1
22267  tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1
22268  clean
22269done
22270)
22271) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22272at_status=$? at_failed=false
22273$at_check_filter
22274echo >>"$at_stderr"; $as_echo "== without_option_normal ==
22275== with_option_normal ==
22276== collision_normal ==
22277tar: root/dirsymlink/file.conflict: Cannot open: File exists
22278tar: Exiting with failure status due to previous errors
22279== without_option_dir ==
22280== with_option_dir ==
22281== collision_dir ==
22282tar: root/dirsymlink/file.conflict: Cannot open: File exists
22283tar: Exiting with failure status due to previous errors
22284" | \
22285  $at_diff - "$at_stderr" || at_failed=:
22286echo >>"$at_stdout"; $as_echo "== without_option_normal ==
22287out
22288out/root
22289out/root/dir
22290out/root/dirsymlink
22291out/root/dirsymlink/file.conflict
22292out/root/dirsymlink/filea
22293out/root/dirsymlink/fileb
22294== with_option_normal ==
22295out
22296out/root
22297out/root/dir
22298out/root/dir/file.conflict
22299out/root/dir/filea
22300out/root/dir/fileb
22301out/root/dirsymlink
22302== collision_normal ==
22303out
22304out/root
22305out/root/dir
22306out/root/dir/file.conflict
22307out/root/dir/filea
22308out/root/dir/fileb
22309out/root/dir/filec
22310out/root/dirsymlink
22311== without_option_dir ==
22312out
22313out/root
22314out/root/dir
22315out/root/dirsymlink
22316out/root/dirsymlink/file.conflict
22317out/root/dirsymlink/filea
22318out/root/dirsymlink/fileb
22319== with_option_dir ==
22320out
22321out/root
22322out/root/dir
22323out/root/dir/file.conflict
22324out/root/dir/filea
22325out/root/dir/fileb
22326out/root/dirsymlink
22327== collision_dir ==
22328out
22329out/root
22330out/root/dir
22331out/root/dir/file.conflict
22332out/root/dir/filea
22333out/root/dir/fileb
22334out/root/dir/filec
22335out/root/dirsymlink
22336" | \
22337  $at_diff - "$at_stdout" || at_failed=:
22338at_fn_check_status 0 $at_status "$at_srcdir/extrac20.at:24"
22339$at_failed && at_fn_log_failure
22340$at_traceon; }
22341
22342              { set +x
22343$as_echo "$at_srcdir/extrac20.at:24:
22344mkdir oldgnu
22345(cd oldgnu
22346TEST_TAR_FORMAT=oldgnu
22347export TEST_TAR_FORMAT
22348TAR_OPTIONS=\"-H oldgnu\"
22349export TAR_OPTIONS
22350rm -rf *
22351
22352
22353test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22354
22355
22356for i in a b c
22357do
22358  dir=in\$i
22359  mkdir -p \$dir/root/dir \$dir/root/dirsymlink
22360  touch \$dir/root/dirsymlink/file\$i
22361  test \$i != a && touch \$dir/root/dirsymlink/file.conflict
22362  tar cf archive\$i.tar -C \$dir root
22363done
22364
22365prep()
22366{
22367  echo \"== \$1 ==\"
22368  echo \"== \$1 ==\" >&2
22369  backup_dir=\$1
22370  dir=out
22371  mkdir -p \$dir/root/dir
22372  ln -s dir \$dir/root/dirsymlink
22373  test \$round = normal && cd \$dir >/dev/null
22374}
22375
22376clean()
22377{
22378  test \$round = normal && cd .. >/dev/null
22379  find \$dir | sort
22380  mv \$dir \$backup_dir
22381}
22382
22383# Expand to '-f ../\$1' or '-f \$1 -C \$dir' depending on \$round variable
22384file_spec()
22385{
22386  if test \$round = normal
22387  then
22388    echo \"-f ../\$1\"
22389  else
22390    echo \"-f \$1 -C \$dir\"
22391  fi
22392}
22393
22394for round in normal dir
22395do
22396  # Check that 'dirsymlink' replaces 'dir'
22397  prep without_option_\$round
22398  tar -x \`file_spec archivea.tar\` || exit 1
22399  tar -x \`file_spec archiveb.tar\` || exit 1
22400  clean
22401
22402  # Keep directory symlink must keep root/dirsymlink
22403  prep with_option_\$round
22404  tar -x --keep-directory-symlink \`file_spec archivea.tar\` || exit 1
22405  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` || exit 1
22406  clean
22407
22408  prep collision_\$round
22409  tar -x --keep-directory-symlink \`file_spec archivea.tar\` --keep-old-files || exit 1
22410  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` --keep-old-files || exit 1
22411  tar -x --keep-directory-symlink \`file_spec archivec.tar\` --keep-old-files && exit 1
22412  clean
22413done
22414)"
22415at_fn_check_prepare_notrace 'a `...` command substitution' "extrac20.at:24"
22416( $at_check_trace;
22417mkdir oldgnu
22418(cd oldgnu
22419TEST_TAR_FORMAT=oldgnu
22420export TEST_TAR_FORMAT
22421TAR_OPTIONS="-H oldgnu"
22422export TAR_OPTIONS
22423rm -rf *
22424
22425
22426test -z "`sort < /dev/null 2>&1`" || exit 77
22427
22428
22429for i in a b c
22430do
22431  dir=in$i
22432  mkdir -p $dir/root/dir $dir/root/dirsymlink
22433  touch $dir/root/dirsymlink/file$i
22434  test $i != a && touch $dir/root/dirsymlink/file.conflict
22435  tar cf archive$i.tar -C $dir root
22436done
22437
22438prep()
22439{
22440  echo "== $1 =="
22441  echo "== $1 ==" >&2
22442  backup_dir=$1
22443  dir=out
22444  mkdir -p $dir/root/dir
22445  ln -s dir $dir/root/dirsymlink
22446  test $round = normal && cd $dir >/dev/null
22447}
22448
22449clean()
22450{
22451  test $round = normal && cd .. >/dev/null
22452  find $dir | sort
22453  mv $dir $backup_dir
22454}
22455
22456# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable
22457file_spec()
22458{
22459  if test $round = normal
22460  then
22461    echo "-f ../$1"
22462  else
22463    echo "-f $1 -C $dir"
22464  fi
22465}
22466
22467for round in normal dir
22468do
22469  # Check that 'dirsymlink' replaces 'dir'
22470  prep without_option_$round
22471  tar -x `file_spec archivea.tar` || exit 1
22472  tar -x `file_spec archiveb.tar` || exit 1
22473  clean
22474
22475  # Keep directory symlink must keep root/dirsymlink
22476  prep with_option_$round
22477  tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1
22478  tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1
22479  clean
22480
22481  prep collision_$round
22482  tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1
22483  tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1
22484  tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1
22485  clean
22486done
22487)
22488) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22489at_status=$? at_failed=false
22490$at_check_filter
22491echo >>"$at_stderr"; $as_echo "== without_option_normal ==
22492== with_option_normal ==
22493== collision_normal ==
22494tar: root/dirsymlink/file.conflict: Cannot open: File exists
22495tar: Exiting with failure status due to previous errors
22496== without_option_dir ==
22497== with_option_dir ==
22498== collision_dir ==
22499tar: root/dirsymlink/file.conflict: Cannot open: File exists
22500tar: Exiting with failure status due to previous errors
22501" | \
22502  $at_diff - "$at_stderr" || at_failed=:
22503echo >>"$at_stdout"; $as_echo "== without_option_normal ==
22504out
22505out/root
22506out/root/dir
22507out/root/dirsymlink
22508out/root/dirsymlink/file.conflict
22509out/root/dirsymlink/filea
22510out/root/dirsymlink/fileb
22511== with_option_normal ==
22512out
22513out/root
22514out/root/dir
22515out/root/dir/file.conflict
22516out/root/dir/filea
22517out/root/dir/fileb
22518out/root/dirsymlink
22519== collision_normal ==
22520out
22521out/root
22522out/root/dir
22523out/root/dir/file.conflict
22524out/root/dir/filea
22525out/root/dir/fileb
22526out/root/dir/filec
22527out/root/dirsymlink
22528== without_option_dir ==
22529out
22530out/root
22531out/root/dir
22532out/root/dirsymlink
22533out/root/dirsymlink/file.conflict
22534out/root/dirsymlink/filea
22535out/root/dirsymlink/fileb
22536== with_option_dir ==
22537out
22538out/root
22539out/root/dir
22540out/root/dir/file.conflict
22541out/root/dir/filea
22542out/root/dir/fileb
22543out/root/dirsymlink
22544== collision_dir ==
22545out
22546out/root
22547out/root/dir
22548out/root/dir/file.conflict
22549out/root/dir/filea
22550out/root/dir/fileb
22551out/root/dir/filec
22552out/root/dirsymlink
22553" | \
22554  $at_diff - "$at_stdout" || at_failed=:
22555at_fn_check_status 0 $at_status "$at_srcdir/extrac20.at:24"
22556$at_failed && at_fn_log_failure
22557$at_traceon; }
22558
22559              { set +x
22560$as_echo "$at_srcdir/extrac20.at:24:
22561mkdir ustar
22562(cd ustar
22563TEST_TAR_FORMAT=ustar
22564export TEST_TAR_FORMAT
22565TAR_OPTIONS=\"-H ustar\"
22566export TAR_OPTIONS
22567rm -rf *
22568
22569
22570test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22571
22572
22573for i in a b c
22574do
22575  dir=in\$i
22576  mkdir -p \$dir/root/dir \$dir/root/dirsymlink
22577  touch \$dir/root/dirsymlink/file\$i
22578  test \$i != a && touch \$dir/root/dirsymlink/file.conflict
22579  tar cf archive\$i.tar -C \$dir root
22580done
22581
22582prep()
22583{
22584  echo \"== \$1 ==\"
22585  echo \"== \$1 ==\" >&2
22586  backup_dir=\$1
22587  dir=out
22588  mkdir -p \$dir/root/dir
22589  ln -s dir \$dir/root/dirsymlink
22590  test \$round = normal && cd \$dir >/dev/null
22591}
22592
22593clean()
22594{
22595  test \$round = normal && cd .. >/dev/null
22596  find \$dir | sort
22597  mv \$dir \$backup_dir
22598}
22599
22600# Expand to '-f ../\$1' or '-f \$1 -C \$dir' depending on \$round variable
22601file_spec()
22602{
22603  if test \$round = normal
22604  then
22605    echo \"-f ../\$1\"
22606  else
22607    echo \"-f \$1 -C \$dir\"
22608  fi
22609}
22610
22611for round in normal dir
22612do
22613  # Check that 'dirsymlink' replaces 'dir'
22614  prep without_option_\$round
22615  tar -x \`file_spec archivea.tar\` || exit 1
22616  tar -x \`file_spec archiveb.tar\` || exit 1
22617  clean
22618
22619  # Keep directory symlink must keep root/dirsymlink
22620  prep with_option_\$round
22621  tar -x --keep-directory-symlink \`file_spec archivea.tar\` || exit 1
22622  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` || exit 1
22623  clean
22624
22625  prep collision_\$round
22626  tar -x --keep-directory-symlink \`file_spec archivea.tar\` --keep-old-files || exit 1
22627  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` --keep-old-files || exit 1
22628  tar -x --keep-directory-symlink \`file_spec archivec.tar\` --keep-old-files && exit 1
22629  clean
22630done
22631)"
22632at_fn_check_prepare_notrace 'a `...` command substitution' "extrac20.at:24"
22633( $at_check_trace;
22634mkdir ustar
22635(cd ustar
22636TEST_TAR_FORMAT=ustar
22637export TEST_TAR_FORMAT
22638TAR_OPTIONS="-H ustar"
22639export TAR_OPTIONS
22640rm -rf *
22641
22642
22643test -z "`sort < /dev/null 2>&1`" || exit 77
22644
22645
22646for i in a b c
22647do
22648  dir=in$i
22649  mkdir -p $dir/root/dir $dir/root/dirsymlink
22650  touch $dir/root/dirsymlink/file$i
22651  test $i != a && touch $dir/root/dirsymlink/file.conflict
22652  tar cf archive$i.tar -C $dir root
22653done
22654
22655prep()
22656{
22657  echo "== $1 =="
22658  echo "== $1 ==" >&2
22659  backup_dir=$1
22660  dir=out
22661  mkdir -p $dir/root/dir
22662  ln -s dir $dir/root/dirsymlink
22663  test $round = normal && cd $dir >/dev/null
22664}
22665
22666clean()
22667{
22668  test $round = normal && cd .. >/dev/null
22669  find $dir | sort
22670  mv $dir $backup_dir
22671}
22672
22673# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable
22674file_spec()
22675{
22676  if test $round = normal
22677  then
22678    echo "-f ../$1"
22679  else
22680    echo "-f $1 -C $dir"
22681  fi
22682}
22683
22684for round in normal dir
22685do
22686  # Check that 'dirsymlink' replaces 'dir'
22687  prep without_option_$round
22688  tar -x `file_spec archivea.tar` || exit 1
22689  tar -x `file_spec archiveb.tar` || exit 1
22690  clean
22691
22692  # Keep directory symlink must keep root/dirsymlink
22693  prep with_option_$round
22694  tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1
22695  tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1
22696  clean
22697
22698  prep collision_$round
22699  tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1
22700  tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1
22701  tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1
22702  clean
22703done
22704)
22705) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22706at_status=$? at_failed=false
22707$at_check_filter
22708echo >>"$at_stderr"; $as_echo "== without_option_normal ==
22709== with_option_normal ==
22710== collision_normal ==
22711tar: root/dirsymlink/file.conflict: Cannot open: File exists
22712tar: Exiting with failure status due to previous errors
22713== without_option_dir ==
22714== with_option_dir ==
22715== collision_dir ==
22716tar: root/dirsymlink/file.conflict: Cannot open: File exists
22717tar: Exiting with failure status due to previous errors
22718" | \
22719  $at_diff - "$at_stderr" || at_failed=:
22720echo >>"$at_stdout"; $as_echo "== without_option_normal ==
22721out
22722out/root
22723out/root/dir
22724out/root/dirsymlink
22725out/root/dirsymlink/file.conflict
22726out/root/dirsymlink/filea
22727out/root/dirsymlink/fileb
22728== with_option_normal ==
22729out
22730out/root
22731out/root/dir
22732out/root/dir/file.conflict
22733out/root/dir/filea
22734out/root/dir/fileb
22735out/root/dirsymlink
22736== collision_normal ==
22737out
22738out/root
22739out/root/dir
22740out/root/dir/file.conflict
22741out/root/dir/filea
22742out/root/dir/fileb
22743out/root/dir/filec
22744out/root/dirsymlink
22745== without_option_dir ==
22746out
22747out/root
22748out/root/dir
22749out/root/dirsymlink
22750out/root/dirsymlink/file.conflict
22751out/root/dirsymlink/filea
22752out/root/dirsymlink/fileb
22753== with_option_dir ==
22754out
22755out/root
22756out/root/dir
22757out/root/dir/file.conflict
22758out/root/dir/filea
22759out/root/dir/fileb
22760out/root/dirsymlink
22761== collision_dir ==
22762out
22763out/root
22764out/root/dir
22765out/root/dir/file.conflict
22766out/root/dir/filea
22767out/root/dir/fileb
22768out/root/dir/filec
22769out/root/dirsymlink
22770" | \
22771  $at_diff - "$at_stdout" || at_failed=:
22772at_fn_check_status 0 $at_status "$at_srcdir/extrac20.at:24"
22773$at_failed && at_fn_log_failure
22774$at_traceon; }
22775
22776              { set +x
22777$as_echo "$at_srcdir/extrac20.at:24:
22778mkdir posix
22779(cd posix
22780TEST_TAR_FORMAT=posix
22781export TEST_TAR_FORMAT
22782TAR_OPTIONS=\"-H posix\"
22783export TAR_OPTIONS
22784rm -rf *
22785
22786
22787test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22788
22789
22790for i in a b c
22791do
22792  dir=in\$i
22793  mkdir -p \$dir/root/dir \$dir/root/dirsymlink
22794  touch \$dir/root/dirsymlink/file\$i
22795  test \$i != a && touch \$dir/root/dirsymlink/file.conflict
22796  tar cf archive\$i.tar -C \$dir root
22797done
22798
22799prep()
22800{
22801  echo \"== \$1 ==\"
22802  echo \"== \$1 ==\" >&2
22803  backup_dir=\$1
22804  dir=out
22805  mkdir -p \$dir/root/dir
22806  ln -s dir \$dir/root/dirsymlink
22807  test \$round = normal && cd \$dir >/dev/null
22808}
22809
22810clean()
22811{
22812  test \$round = normal && cd .. >/dev/null
22813  find \$dir | sort
22814  mv \$dir \$backup_dir
22815}
22816
22817# Expand to '-f ../\$1' or '-f \$1 -C \$dir' depending on \$round variable
22818file_spec()
22819{
22820  if test \$round = normal
22821  then
22822    echo \"-f ../\$1\"
22823  else
22824    echo \"-f \$1 -C \$dir\"
22825  fi
22826}
22827
22828for round in normal dir
22829do
22830  # Check that 'dirsymlink' replaces 'dir'
22831  prep without_option_\$round
22832  tar -x \`file_spec archivea.tar\` || exit 1
22833  tar -x \`file_spec archiveb.tar\` || exit 1
22834  clean
22835
22836  # Keep directory symlink must keep root/dirsymlink
22837  prep with_option_\$round
22838  tar -x --keep-directory-symlink \`file_spec archivea.tar\` || exit 1
22839  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` || exit 1
22840  clean
22841
22842  prep collision_\$round
22843  tar -x --keep-directory-symlink \`file_spec archivea.tar\` --keep-old-files || exit 1
22844  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` --keep-old-files || exit 1
22845  tar -x --keep-directory-symlink \`file_spec archivec.tar\` --keep-old-files && exit 1
22846  clean
22847done
22848)"
22849at_fn_check_prepare_notrace 'a `...` command substitution' "extrac20.at:24"
22850( $at_check_trace;
22851mkdir posix
22852(cd posix
22853TEST_TAR_FORMAT=posix
22854export TEST_TAR_FORMAT
22855TAR_OPTIONS="-H posix"
22856export TAR_OPTIONS
22857rm -rf *
22858
22859
22860test -z "`sort < /dev/null 2>&1`" || exit 77
22861
22862
22863for i in a b c
22864do
22865  dir=in$i
22866  mkdir -p $dir/root/dir $dir/root/dirsymlink
22867  touch $dir/root/dirsymlink/file$i
22868  test $i != a && touch $dir/root/dirsymlink/file.conflict
22869  tar cf archive$i.tar -C $dir root
22870done
22871
22872prep()
22873{
22874  echo "== $1 =="
22875  echo "== $1 ==" >&2
22876  backup_dir=$1
22877  dir=out
22878  mkdir -p $dir/root/dir
22879  ln -s dir $dir/root/dirsymlink
22880  test $round = normal && cd $dir >/dev/null
22881}
22882
22883clean()
22884{
22885  test $round = normal && cd .. >/dev/null
22886  find $dir | sort
22887  mv $dir $backup_dir
22888}
22889
22890# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable
22891file_spec()
22892{
22893  if test $round = normal
22894  then
22895    echo "-f ../$1"
22896  else
22897    echo "-f $1 -C $dir"
22898  fi
22899}
22900
22901for round in normal dir
22902do
22903  # Check that 'dirsymlink' replaces 'dir'
22904  prep without_option_$round
22905  tar -x `file_spec archivea.tar` || exit 1
22906  tar -x `file_spec archiveb.tar` || exit 1
22907  clean
22908
22909  # Keep directory symlink must keep root/dirsymlink
22910  prep with_option_$round
22911  tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1
22912  tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1
22913  clean
22914
22915  prep collision_$round
22916  tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1
22917  tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1
22918  tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1
22919  clean
22920done
22921)
22922) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22923at_status=$? at_failed=false
22924$at_check_filter
22925echo >>"$at_stderr"; $as_echo "== without_option_normal ==
22926== with_option_normal ==
22927== collision_normal ==
22928tar: root/dirsymlink/file.conflict: Cannot open: File exists
22929tar: Exiting with failure status due to previous errors
22930== without_option_dir ==
22931== with_option_dir ==
22932== collision_dir ==
22933tar: root/dirsymlink/file.conflict: Cannot open: File exists
22934tar: Exiting with failure status due to previous errors
22935" | \
22936  $at_diff - "$at_stderr" || at_failed=:
22937echo >>"$at_stdout"; $as_echo "== without_option_normal ==
22938out
22939out/root
22940out/root/dir
22941out/root/dirsymlink
22942out/root/dirsymlink/file.conflict
22943out/root/dirsymlink/filea
22944out/root/dirsymlink/fileb
22945== with_option_normal ==
22946out
22947out/root
22948out/root/dir
22949out/root/dir/file.conflict
22950out/root/dir/filea
22951out/root/dir/fileb
22952out/root/dirsymlink
22953== collision_normal ==
22954out
22955out/root
22956out/root/dir
22957out/root/dir/file.conflict
22958out/root/dir/filea
22959out/root/dir/fileb
22960out/root/dir/filec
22961out/root/dirsymlink
22962== without_option_dir ==
22963out
22964out/root
22965out/root/dir
22966out/root/dirsymlink
22967out/root/dirsymlink/file.conflict
22968out/root/dirsymlink/filea
22969out/root/dirsymlink/fileb
22970== with_option_dir ==
22971out
22972out/root
22973out/root/dir
22974out/root/dir/file.conflict
22975out/root/dir/filea
22976out/root/dir/fileb
22977out/root/dirsymlink
22978== collision_dir ==
22979out
22980out/root
22981out/root/dir
22982out/root/dir/file.conflict
22983out/root/dir/filea
22984out/root/dir/fileb
22985out/root/dir/filec
22986out/root/dirsymlink
22987" | \
22988  $at_diff - "$at_stdout" || at_failed=:
22989at_fn_check_status 0 $at_status "$at_srcdir/extrac20.at:24"
22990$at_failed && at_fn_log_failure
22991$at_traceon; }
22992
22993              { set +x
22994$as_echo "$at_srcdir/extrac20.at:24:
22995mkdir gnu
22996(cd gnu
22997TEST_TAR_FORMAT=gnu
22998export TEST_TAR_FORMAT
22999TAR_OPTIONS=\"-H gnu\"
23000export TAR_OPTIONS
23001rm -rf *
23002
23003
23004test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23005
23006
23007for i in a b c
23008do
23009  dir=in\$i
23010  mkdir -p \$dir/root/dir \$dir/root/dirsymlink
23011  touch \$dir/root/dirsymlink/file\$i
23012  test \$i != a && touch \$dir/root/dirsymlink/file.conflict
23013  tar cf archive\$i.tar -C \$dir root
23014done
23015
23016prep()
23017{
23018  echo \"== \$1 ==\"
23019  echo \"== \$1 ==\" >&2
23020  backup_dir=\$1
23021  dir=out
23022  mkdir -p \$dir/root/dir
23023  ln -s dir \$dir/root/dirsymlink
23024  test \$round = normal && cd \$dir >/dev/null
23025}
23026
23027clean()
23028{
23029  test \$round = normal && cd .. >/dev/null
23030  find \$dir | sort
23031  mv \$dir \$backup_dir
23032}
23033
23034# Expand to '-f ../\$1' or '-f \$1 -C \$dir' depending on \$round variable
23035file_spec()
23036{
23037  if test \$round = normal
23038  then
23039    echo \"-f ../\$1\"
23040  else
23041    echo \"-f \$1 -C \$dir\"
23042  fi
23043}
23044
23045for round in normal dir
23046do
23047  # Check that 'dirsymlink' replaces 'dir'
23048  prep without_option_\$round
23049  tar -x \`file_spec archivea.tar\` || exit 1
23050  tar -x \`file_spec archiveb.tar\` || exit 1
23051  clean
23052
23053  # Keep directory symlink must keep root/dirsymlink
23054  prep with_option_\$round
23055  tar -x --keep-directory-symlink \`file_spec archivea.tar\` || exit 1
23056  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` || exit 1
23057  clean
23058
23059  prep collision_\$round
23060  tar -x --keep-directory-symlink \`file_spec archivea.tar\` --keep-old-files || exit 1
23061  tar -x --keep-directory-symlink \`file_spec archiveb.tar\` --keep-old-files || exit 1
23062  tar -x --keep-directory-symlink \`file_spec archivec.tar\` --keep-old-files && exit 1
23063  clean
23064done
23065)"
23066at_fn_check_prepare_notrace 'a `...` command substitution' "extrac20.at:24"
23067( $at_check_trace;
23068mkdir gnu
23069(cd gnu
23070TEST_TAR_FORMAT=gnu
23071export TEST_TAR_FORMAT
23072TAR_OPTIONS="-H gnu"
23073export TAR_OPTIONS
23074rm -rf *
23075
23076
23077test -z "`sort < /dev/null 2>&1`" || exit 77
23078
23079
23080for i in a b c
23081do
23082  dir=in$i
23083  mkdir -p $dir/root/dir $dir/root/dirsymlink
23084  touch $dir/root/dirsymlink/file$i
23085  test $i != a && touch $dir/root/dirsymlink/file.conflict
23086  tar cf archive$i.tar -C $dir root
23087done
23088
23089prep()
23090{
23091  echo "== $1 =="
23092  echo "== $1 ==" >&2
23093  backup_dir=$1
23094  dir=out
23095  mkdir -p $dir/root/dir
23096  ln -s dir $dir/root/dirsymlink
23097  test $round = normal && cd $dir >/dev/null
23098}
23099
23100clean()
23101{
23102  test $round = normal && cd .. >/dev/null
23103  find $dir | sort
23104  mv $dir $backup_dir
23105}
23106
23107# Expand to '-f ../$1' or '-f $1 -C $dir' depending on $round variable
23108file_spec()
23109{
23110  if test $round = normal
23111  then
23112    echo "-f ../$1"
23113  else
23114    echo "-f $1 -C $dir"
23115  fi
23116}
23117
23118for round in normal dir
23119do
23120  # Check that 'dirsymlink' replaces 'dir'
23121  prep without_option_$round
23122  tar -x `file_spec archivea.tar` || exit 1
23123  tar -x `file_spec archiveb.tar` || exit 1
23124  clean
23125
23126  # Keep directory symlink must keep root/dirsymlink
23127  prep with_option_$round
23128  tar -x --keep-directory-symlink `file_spec archivea.tar` || exit 1
23129  tar -x --keep-directory-symlink `file_spec archiveb.tar` || exit 1
23130  clean
23131
23132  prep collision_$round
23133  tar -x --keep-directory-symlink `file_spec archivea.tar` --keep-old-files || exit 1
23134  tar -x --keep-directory-symlink `file_spec archiveb.tar` --keep-old-files || exit 1
23135  tar -x --keep-directory-symlink `file_spec archivec.tar` --keep-old-files && exit 1
23136  clean
23137done
23138)
23139) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23140at_status=$? at_failed=false
23141$at_check_filter
23142echo >>"$at_stderr"; $as_echo "== without_option_normal ==
23143== with_option_normal ==
23144== collision_normal ==
23145tar: root/dirsymlink/file.conflict: Cannot open: File exists
23146tar: Exiting with failure status due to previous errors
23147== without_option_dir ==
23148== with_option_dir ==
23149== collision_dir ==
23150tar: root/dirsymlink/file.conflict: Cannot open: File exists
23151tar: Exiting with failure status due to previous errors
23152" | \
23153  $at_diff - "$at_stderr" || at_failed=:
23154echo >>"$at_stdout"; $as_echo "== without_option_normal ==
23155out
23156out/root
23157out/root/dir
23158out/root/dirsymlink
23159out/root/dirsymlink/file.conflict
23160out/root/dirsymlink/filea
23161out/root/dirsymlink/fileb
23162== with_option_normal ==
23163out
23164out/root
23165out/root/dir
23166out/root/dir/file.conflict
23167out/root/dir/filea
23168out/root/dir/fileb
23169out/root/dirsymlink
23170== collision_normal ==
23171out
23172out/root
23173out/root/dir
23174out/root/dir/file.conflict
23175out/root/dir/filea
23176out/root/dir/fileb
23177out/root/dir/filec
23178out/root/dirsymlink
23179== without_option_dir ==
23180out
23181out/root
23182out/root/dir
23183out/root/dirsymlink
23184out/root/dirsymlink/file.conflict
23185out/root/dirsymlink/filea
23186out/root/dirsymlink/fileb
23187== with_option_dir ==
23188out
23189out/root
23190out/root/dir
23191out/root/dir/file.conflict
23192out/root/dir/filea
23193out/root/dir/fileb
23194out/root/dirsymlink
23195== collision_dir ==
23196out
23197out/root
23198out/root/dir
23199out/root/dir/file.conflict
23200out/root/dir/filea
23201out/root/dir/fileb
23202out/root/dir/filec
23203out/root/dirsymlink
23204" | \
23205  $at_diff - "$at_stdout" || at_failed=:
23206at_fn_check_status 0 $at_status "$at_srcdir/extrac20.at:24"
23207$at_failed && at_fn_log_failure
23208$at_traceon; }
23209
23210
23211
23212
23213  set +x
23214  $at_times_p && times >"$at_times_file"
23215) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23216read at_status <"$at_status_file"
23217#AT_STOP_100
23218#AT_START_101
23219at_fn_group_banner 101 'extrac21.at:31' \
23220  "delay-directory-restore" "                        " 13
23221at_xfail=no
23222      test -f $XFAILFILE && at_xfail=yes
23223(
23224  $as_echo "101. $at_setup_line: testing $at_desc ..."
23225  $at_traceon
23226
23227
23228
23229
23230  { set +x
23231$as_echo "$at_srcdir/extrac21.at:33:
23232mkdir ustar
23233(cd ustar
23234TEST_TAR_FORMAT=ustar
23235export TEST_TAR_FORMAT
23236TAR_OPTIONS=\"-H ustar\"
23237export TAR_OPTIONS
23238rm -rf *
23239
23240
23241echo \"test\" > \$\$
23242chmod 0 \$\$
23243cat \$\$ > /dev/null 2>&1
23244result=\$?
23245rm -f \$\$
23246test \$result -eq 0 && exit 77
23247
23248
23249mkdir a a/b a/c
23250genfile --file a/b/D
23251genfile --file a/c/A
23252cd a/b
23253ln -sf ../c/A
23254cd ../..
23255chmod a-w a/b
23256tar --no-recurs -c -f A.tar a a/b a/b/D a/c a/b/A a/c/A
23257mkdir out
23258tar -C out -v -x -f A.tar --delay-directory-restore
23259)"
23260at_fn_check_prepare_notrace 'an embedded newline' "extrac21.at:33"
23261( $at_check_trace;
23262mkdir ustar
23263(cd ustar
23264TEST_TAR_FORMAT=ustar
23265export TEST_TAR_FORMAT
23266TAR_OPTIONS="-H ustar"
23267export TAR_OPTIONS
23268rm -rf *
23269
23270
23271echo "test" > $$
23272chmod 0 $$
23273cat $$ > /dev/null 2>&1
23274result=$?
23275rm -f $$
23276test $result -eq 0 && exit 77
23277
23278
23279mkdir a a/b a/c
23280genfile --file a/b/D
23281genfile --file a/c/A
23282cd a/b
23283ln -sf ../c/A
23284cd ../..
23285chmod a-w a/b
23286tar --no-recurs -c -f A.tar a a/b a/b/D a/c a/b/A a/c/A
23287mkdir out
23288tar -C out -v -x -f A.tar --delay-directory-restore
23289)
23290) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23291at_status=$? at_failed=false
23292$at_check_filter
23293at_fn_diff_devnull "$at_stderr" || at_failed=:
23294echo >>"$at_stdout"; $as_echo "a/
23295a/b/
23296a/b/D
23297a/c/
23298a/b/A
23299a/c/A
23300" | \
23301  $at_diff - "$at_stdout" || at_failed=:
23302at_fn_check_status 0 $at_status "$at_srcdir/extrac21.at:33"
23303$at_failed && at_fn_log_failure
23304$at_traceon; }
23305
23306
23307 # Testing one format is enough
23308
23309  set +x
23310  $at_times_p && times >"$at_times_file"
23311) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23312read at_status <"$at_status_file"
23313#AT_STOP_101
23314#AT_START_102
23315at_fn_group_banner 102 'extrac22.at:19' \
23316  "delay-directory-restore on reversed ordering" "   " 13
23317at_xfail=no
23318      test -f $XFAILFILE && at_xfail=yes
23319(
23320  $as_echo "102. $at_setup_line: testing $at_desc ..."
23321  $at_traceon
23322
23323
23324# The --delay-directory-resore option worked incorrectly on archives with
23325# reversed member ordering (which was documented, anyway). This is illustrated
23326# in
23327#   http://lists.gnu.org/archive/html/bug-tar/2019-03/msg00022.html
23328# which was taken as a base for this testcase.
23329# The bug affected tar versions <= 1.32.
23330
23331
23332
23333
23334  { set +x
23335$as_echo "$at_srcdir/extrac22.at:29:
23336mkdir v7
23337(cd v7
23338TEST_TAR_FORMAT=v7
23339export TEST_TAR_FORMAT
23340TAR_OPTIONS=\"-H v7\"
23341export TAR_OPTIONS
23342rm -rf *
23343
23344
23345echo \"test\" > \$\$
23346chmod 0 \$\$
23347cat \$\$ > /dev/null 2>&1
23348result=\$?
23349rm -f \$\$
23350test \$result -eq 0 && exit 77
23351
23352
23353test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23354
23355mkdir t
23356(cd t
23357 genfile --length 100 --file data1
23358 mkdir dir1
23359 cp data1 dir1
23360 mkdir dir2
23361 cd dir2
23362 ln -s ../dir1/data1 data2
23363 cd ..
23364 chmod -w dir2)
23365
23366cat >filelist <<'_ATEOF'
23367./dir2/data2
23368./dir2
23369./dir1/data1
23370./dir1
23371./data1
23372_ATEOF
23373
23374
23375tar -C t -c -f a.tar --no-recursion -T filelist
23376
23377mkdir restore
23378tar -x -p --delay-directory-restore -C restore -f a.tar
23379# Previous versions of tar would fail here with the following diagnostics:
23380# tar: ./dir2/data2: Cannot unlink: Permission denied
23381)"
23382at_fn_check_prepare_notrace 'a `...` command substitution' "extrac22.at:29"
23383( $at_check_trace;
23384mkdir v7
23385(cd v7
23386TEST_TAR_FORMAT=v7
23387export TEST_TAR_FORMAT
23388TAR_OPTIONS="-H v7"
23389export TAR_OPTIONS
23390rm -rf *
23391
23392
23393echo "test" > $$
23394chmod 0 $$
23395cat $$ > /dev/null 2>&1
23396result=$?
23397rm -f $$
23398test $result -eq 0 && exit 77
23399
23400
23401test -z "`sort < /dev/null 2>&1`" || exit 77
23402
23403mkdir t
23404(cd t
23405 genfile --length 100 --file data1
23406 mkdir dir1
23407 cp data1 dir1
23408 mkdir dir2
23409 cd dir2
23410 ln -s ../dir1/data1 data2
23411 cd ..
23412 chmod -w dir2)
23413
23414cat >filelist <<'_ATEOF'
23415./dir2/data2
23416./dir2
23417./dir1/data1
23418./dir1
23419./data1
23420_ATEOF
23421
23422
23423tar -C t -c -f a.tar --no-recursion -T filelist
23424
23425mkdir restore
23426tar -x -p --delay-directory-restore -C restore -f a.tar
23427# Previous versions of tar would fail here with the following diagnostics:
23428# tar: ./dir2/data2: Cannot unlink: Permission denied
23429)
23430) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23431at_status=$? at_failed=false
23432$at_check_filter
23433at_fn_diff_devnull "$at_stderr" || at_failed=:
23434at_fn_diff_devnull "$at_stdout" || at_failed=:
23435at_fn_check_status 0 $at_status "$at_srcdir/extrac22.at:29"
23436$at_failed && at_fn_log_failure
23437$at_traceon; }
23438
23439              { set +x
23440$as_echo "$at_srcdir/extrac22.at:29:
23441mkdir oldgnu
23442(cd oldgnu
23443TEST_TAR_FORMAT=oldgnu
23444export TEST_TAR_FORMAT
23445TAR_OPTIONS=\"-H oldgnu\"
23446export TAR_OPTIONS
23447rm -rf *
23448
23449
23450echo \"test\" > \$\$
23451chmod 0 \$\$
23452cat \$\$ > /dev/null 2>&1
23453result=\$?
23454rm -f \$\$
23455test \$result -eq 0 && exit 77
23456
23457
23458test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23459
23460mkdir t
23461(cd t
23462 genfile --length 100 --file data1
23463 mkdir dir1
23464 cp data1 dir1
23465 mkdir dir2
23466 cd dir2
23467 ln -s ../dir1/data1 data2
23468 cd ..
23469 chmod -w dir2)
23470
23471cat >filelist <<'_ATEOF'
23472./dir2/data2
23473./dir2
23474./dir1/data1
23475./dir1
23476./data1
23477_ATEOF
23478
23479
23480tar -C t -c -f a.tar --no-recursion -T filelist
23481
23482mkdir restore
23483tar -x -p --delay-directory-restore -C restore -f a.tar
23484# Previous versions of tar would fail here with the following diagnostics:
23485# tar: ./dir2/data2: Cannot unlink: Permission denied
23486)"
23487at_fn_check_prepare_notrace 'a `...` command substitution' "extrac22.at:29"
23488( $at_check_trace;
23489mkdir oldgnu
23490(cd oldgnu
23491TEST_TAR_FORMAT=oldgnu
23492export TEST_TAR_FORMAT
23493TAR_OPTIONS="-H oldgnu"
23494export TAR_OPTIONS
23495rm -rf *
23496
23497
23498echo "test" > $$
23499chmod 0 $$
23500cat $$ > /dev/null 2>&1
23501result=$?
23502rm -f $$
23503test $result -eq 0 && exit 77
23504
23505
23506test -z "`sort < /dev/null 2>&1`" || exit 77
23507
23508mkdir t
23509(cd t
23510 genfile --length 100 --file data1
23511 mkdir dir1
23512 cp data1 dir1
23513 mkdir dir2
23514 cd dir2
23515 ln -s ../dir1/data1 data2
23516 cd ..
23517 chmod -w dir2)
23518
23519cat >filelist <<'_ATEOF'
23520./dir2/data2
23521./dir2
23522./dir1/data1
23523./dir1
23524./data1
23525_ATEOF
23526
23527
23528tar -C t -c -f a.tar --no-recursion -T filelist
23529
23530mkdir restore
23531tar -x -p --delay-directory-restore -C restore -f a.tar
23532# Previous versions of tar would fail here with the following diagnostics:
23533# tar: ./dir2/data2: Cannot unlink: Permission denied
23534)
23535) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23536at_status=$? at_failed=false
23537$at_check_filter
23538at_fn_diff_devnull "$at_stderr" || at_failed=:
23539at_fn_diff_devnull "$at_stdout" || at_failed=:
23540at_fn_check_status 0 $at_status "$at_srcdir/extrac22.at:29"
23541$at_failed && at_fn_log_failure
23542$at_traceon; }
23543
23544              { set +x
23545$as_echo "$at_srcdir/extrac22.at:29:
23546mkdir ustar
23547(cd ustar
23548TEST_TAR_FORMAT=ustar
23549export TEST_TAR_FORMAT
23550TAR_OPTIONS=\"-H ustar\"
23551export TAR_OPTIONS
23552rm -rf *
23553
23554
23555echo \"test\" > \$\$
23556chmod 0 \$\$
23557cat \$\$ > /dev/null 2>&1
23558result=\$?
23559rm -f \$\$
23560test \$result -eq 0 && exit 77
23561
23562
23563test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23564
23565mkdir t
23566(cd t
23567 genfile --length 100 --file data1
23568 mkdir dir1
23569 cp data1 dir1
23570 mkdir dir2
23571 cd dir2
23572 ln -s ../dir1/data1 data2
23573 cd ..
23574 chmod -w dir2)
23575
23576cat >filelist <<'_ATEOF'
23577./dir2/data2
23578./dir2
23579./dir1/data1
23580./dir1
23581./data1
23582_ATEOF
23583
23584
23585tar -C t -c -f a.tar --no-recursion -T filelist
23586
23587mkdir restore
23588tar -x -p --delay-directory-restore -C restore -f a.tar
23589# Previous versions of tar would fail here with the following diagnostics:
23590# tar: ./dir2/data2: Cannot unlink: Permission denied
23591)"
23592at_fn_check_prepare_notrace 'a `...` command substitution' "extrac22.at:29"
23593( $at_check_trace;
23594mkdir ustar
23595(cd ustar
23596TEST_TAR_FORMAT=ustar
23597export TEST_TAR_FORMAT
23598TAR_OPTIONS="-H ustar"
23599export TAR_OPTIONS
23600rm -rf *
23601
23602
23603echo "test" > $$
23604chmod 0 $$
23605cat $$ > /dev/null 2>&1
23606result=$?
23607rm -f $$
23608test $result -eq 0 && exit 77
23609
23610
23611test -z "`sort < /dev/null 2>&1`" || exit 77
23612
23613mkdir t
23614(cd t
23615 genfile --length 100 --file data1
23616 mkdir dir1
23617 cp data1 dir1
23618 mkdir dir2
23619 cd dir2
23620 ln -s ../dir1/data1 data2
23621 cd ..
23622 chmod -w dir2)
23623
23624cat >filelist <<'_ATEOF'
23625./dir2/data2
23626./dir2
23627./dir1/data1
23628./dir1
23629./data1
23630_ATEOF
23631
23632
23633tar -C t -c -f a.tar --no-recursion -T filelist
23634
23635mkdir restore
23636tar -x -p --delay-directory-restore -C restore -f a.tar
23637# Previous versions of tar would fail here with the following diagnostics:
23638# tar: ./dir2/data2: Cannot unlink: Permission denied
23639)
23640) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23641at_status=$? at_failed=false
23642$at_check_filter
23643at_fn_diff_devnull "$at_stderr" || at_failed=:
23644at_fn_diff_devnull "$at_stdout" || at_failed=:
23645at_fn_check_status 0 $at_status "$at_srcdir/extrac22.at:29"
23646$at_failed && at_fn_log_failure
23647$at_traceon; }
23648
23649              { set +x
23650$as_echo "$at_srcdir/extrac22.at:29:
23651mkdir posix
23652(cd posix
23653TEST_TAR_FORMAT=posix
23654export TEST_TAR_FORMAT
23655TAR_OPTIONS=\"-H posix\"
23656export TAR_OPTIONS
23657rm -rf *
23658
23659
23660echo \"test\" > \$\$
23661chmod 0 \$\$
23662cat \$\$ > /dev/null 2>&1
23663result=\$?
23664rm -f \$\$
23665test \$result -eq 0 && exit 77
23666
23667
23668test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23669
23670mkdir t
23671(cd t
23672 genfile --length 100 --file data1
23673 mkdir dir1
23674 cp data1 dir1
23675 mkdir dir2
23676 cd dir2
23677 ln -s ../dir1/data1 data2
23678 cd ..
23679 chmod -w dir2)
23680
23681cat >filelist <<'_ATEOF'
23682./dir2/data2
23683./dir2
23684./dir1/data1
23685./dir1
23686./data1
23687_ATEOF
23688
23689
23690tar -C t -c -f a.tar --no-recursion -T filelist
23691
23692mkdir restore
23693tar -x -p --delay-directory-restore -C restore -f a.tar
23694# Previous versions of tar would fail here with the following diagnostics:
23695# tar: ./dir2/data2: Cannot unlink: Permission denied
23696)"
23697at_fn_check_prepare_notrace 'a `...` command substitution' "extrac22.at:29"
23698( $at_check_trace;
23699mkdir posix
23700(cd posix
23701TEST_TAR_FORMAT=posix
23702export TEST_TAR_FORMAT
23703TAR_OPTIONS="-H posix"
23704export TAR_OPTIONS
23705rm -rf *
23706
23707
23708echo "test" > $$
23709chmod 0 $$
23710cat $$ > /dev/null 2>&1
23711result=$?
23712rm -f $$
23713test $result -eq 0 && exit 77
23714
23715
23716test -z "`sort < /dev/null 2>&1`" || exit 77
23717
23718mkdir t
23719(cd t
23720 genfile --length 100 --file data1
23721 mkdir dir1
23722 cp data1 dir1
23723 mkdir dir2
23724 cd dir2
23725 ln -s ../dir1/data1 data2
23726 cd ..
23727 chmod -w dir2)
23728
23729cat >filelist <<'_ATEOF'
23730./dir2/data2
23731./dir2
23732./dir1/data1
23733./dir1
23734./data1
23735_ATEOF
23736
23737
23738tar -C t -c -f a.tar --no-recursion -T filelist
23739
23740mkdir restore
23741tar -x -p --delay-directory-restore -C restore -f a.tar
23742# Previous versions of tar would fail here with the following diagnostics:
23743# tar: ./dir2/data2: Cannot unlink: Permission denied
23744)
23745) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23746at_status=$? at_failed=false
23747$at_check_filter
23748at_fn_diff_devnull "$at_stderr" || at_failed=:
23749at_fn_diff_devnull "$at_stdout" || at_failed=:
23750at_fn_check_status 0 $at_status "$at_srcdir/extrac22.at:29"
23751$at_failed && at_fn_log_failure
23752$at_traceon; }
23753
23754              { set +x
23755$as_echo "$at_srcdir/extrac22.at:29:
23756mkdir gnu
23757(cd gnu
23758TEST_TAR_FORMAT=gnu
23759export TEST_TAR_FORMAT
23760TAR_OPTIONS=\"-H gnu\"
23761export TAR_OPTIONS
23762rm -rf *
23763
23764
23765echo \"test\" > \$\$
23766chmod 0 \$\$
23767cat \$\$ > /dev/null 2>&1
23768result=\$?
23769rm -f \$\$
23770test \$result -eq 0 && exit 77
23771
23772
23773test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23774
23775mkdir t
23776(cd t
23777 genfile --length 100 --file data1
23778 mkdir dir1
23779 cp data1 dir1
23780 mkdir dir2
23781 cd dir2
23782 ln -s ../dir1/data1 data2
23783 cd ..
23784 chmod -w dir2)
23785
23786cat >filelist <<'_ATEOF'
23787./dir2/data2
23788./dir2
23789./dir1/data1
23790./dir1
23791./data1
23792_ATEOF
23793
23794
23795tar -C t -c -f a.tar --no-recursion -T filelist
23796
23797mkdir restore
23798tar -x -p --delay-directory-restore -C restore -f a.tar
23799# Previous versions of tar would fail here with the following diagnostics:
23800# tar: ./dir2/data2: Cannot unlink: Permission denied
23801)"
23802at_fn_check_prepare_notrace 'a `...` command substitution' "extrac22.at:29"
23803( $at_check_trace;
23804mkdir gnu
23805(cd gnu
23806TEST_TAR_FORMAT=gnu
23807export TEST_TAR_FORMAT
23808TAR_OPTIONS="-H gnu"
23809export TAR_OPTIONS
23810rm -rf *
23811
23812
23813echo "test" > $$
23814chmod 0 $$
23815cat $$ > /dev/null 2>&1
23816result=$?
23817rm -f $$
23818test $result -eq 0 && exit 77
23819
23820
23821test -z "`sort < /dev/null 2>&1`" || exit 77
23822
23823mkdir t
23824(cd t
23825 genfile --length 100 --file data1
23826 mkdir dir1
23827 cp data1 dir1
23828 mkdir dir2
23829 cd dir2
23830 ln -s ../dir1/data1 data2
23831 cd ..
23832 chmod -w dir2)
23833
23834cat >filelist <<'_ATEOF'
23835./dir2/data2
23836./dir2
23837./dir1/data1
23838./dir1
23839./data1
23840_ATEOF
23841
23842
23843tar -C t -c -f a.tar --no-recursion -T filelist
23844
23845mkdir restore
23846tar -x -p --delay-directory-restore -C restore -f a.tar
23847# Previous versions of tar would fail here with the following diagnostics:
23848# tar: ./dir2/data2: Cannot unlink: Permission denied
23849)
23850) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23851at_status=$? at_failed=false
23852$at_check_filter
23853at_fn_diff_devnull "$at_stderr" || at_failed=:
23854at_fn_diff_devnull "$at_stdout" || at_failed=:
23855at_fn_check_status 0 $at_status "$at_srcdir/extrac22.at:29"
23856$at_failed && at_fn_log_failure
23857$at_traceon; }
23858
23859
23860
23861  set +x
23862  $at_times_p && times >"$at_times_file"
23863) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23864read at_status <"$at_status_file"
23865#AT_STOP_102
23866#AT_START_103
23867at_fn_group_banner 103 'extrac23.at:18' \
23868  "--no-overwrite-dir" "                             " 13
23869at_xfail=no
23870      test -f $XFAILFILE && at_xfail=yes
23871(
23872  $as_echo "103. $at_setup_line: testing $at_desc ..."
23873  $at_traceon
23874
23875
23876
23877# Description: Implementation of the --no-overwrite-dir option was flawed in
23878# tar versions up to 1.32.90.  This option is intended to preserve metadata
23879# of existing directories.  In fact it worked only for non-empty directories.
23880# Moreover, if the actual directory was owned by the user tar runs as and the
23881# S_IWUSR bit was not set in its actual permissions, tar failed to create files
23882# in it.
23883#
23884# Reported by: Michael Kaufmann <mail@michael-kaufmann.ch>
23885# References: <20200207112934.Horde.anXzYhAj2CHiwUrw5CuT0G-@webmail.michael-kaufmann.ch>,
23886#   https://lists.gnu.org/archive/html/bug-tar/2020-02/msg00003.html
23887
23888
23889
23890  { set +x
23891$as_echo "$at_srcdir/extrac23.at:32:
23892mkdir v7
23893(cd v7
23894TEST_TAR_FORMAT=v7
23895export TEST_TAR_FORMAT
23896TAR_OPTIONS=\"-H v7\"
23897export TAR_OPTIONS
23898rm -rf *
23899
23900# Test if the directory permissions are restored properly.
23901mkdir dir
23902chmod 755 dir
23903tar cf a.tar dir
23904chmod 777 dir
23905tar -xf a.tar --no-overwrite-dir
23906genfile --stat=mode.777 dir
23907
23908# Test if temprorary permissions are set correctly to allow the owner
23909# to write to the directory.
23910genfile --file dir/file
23911tar cf a.tar dir
23912rm dir/file
23913chmod 400 dir
23914tar -xf a.tar --no-overwrite-dir
23915genfile --stat=mode.777 dir
23916chmod 700 dir
23917find dir
23918)"
23919at_fn_check_prepare_notrace 'an embedded newline' "extrac23.at:32"
23920( $at_check_trace;
23921mkdir v7
23922(cd v7
23923TEST_TAR_FORMAT=v7
23924export TEST_TAR_FORMAT
23925TAR_OPTIONS="-H v7"
23926export TAR_OPTIONS
23927rm -rf *
23928
23929# Test if the directory permissions are restored properly.
23930mkdir dir
23931chmod 755 dir
23932tar cf a.tar dir
23933chmod 777 dir
23934tar -xf a.tar --no-overwrite-dir
23935genfile --stat=mode.777 dir
23936
23937# Test if temprorary permissions are set correctly to allow the owner
23938# to write to the directory.
23939genfile --file dir/file
23940tar cf a.tar dir
23941rm dir/file
23942chmod 400 dir
23943tar -xf a.tar --no-overwrite-dir
23944genfile --stat=mode.777 dir
23945chmod 700 dir
23946find dir
23947)
23948) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23949at_status=$? at_failed=false
23950$at_check_filter
23951at_fn_diff_devnull "$at_stderr" || at_failed=:
23952echo >>"$at_stdout"; $as_echo "777
23953400
23954dir
23955dir/file
23956" | \
23957  $at_diff - "$at_stdout" || at_failed=:
23958at_fn_check_status 0 $at_status "$at_srcdir/extrac23.at:32"
23959$at_failed && at_fn_log_failure
23960$at_traceon; }
23961
23962              { set +x
23963$as_echo "$at_srcdir/extrac23.at:32:
23964mkdir oldgnu
23965(cd oldgnu
23966TEST_TAR_FORMAT=oldgnu
23967export TEST_TAR_FORMAT
23968TAR_OPTIONS=\"-H oldgnu\"
23969export TAR_OPTIONS
23970rm -rf *
23971
23972# Test if the directory permissions are restored properly.
23973mkdir dir
23974chmod 755 dir
23975tar cf a.tar dir
23976chmod 777 dir
23977tar -xf a.tar --no-overwrite-dir
23978genfile --stat=mode.777 dir
23979
23980# Test if temprorary permissions are set correctly to allow the owner
23981# to write to the directory.
23982genfile --file dir/file
23983tar cf a.tar dir
23984rm dir/file
23985chmod 400 dir
23986tar -xf a.tar --no-overwrite-dir
23987genfile --stat=mode.777 dir
23988chmod 700 dir
23989find dir
23990)"
23991at_fn_check_prepare_notrace 'an embedded newline' "extrac23.at:32"
23992( $at_check_trace;
23993mkdir oldgnu
23994(cd oldgnu
23995TEST_TAR_FORMAT=oldgnu
23996export TEST_TAR_FORMAT
23997TAR_OPTIONS="-H oldgnu"
23998export TAR_OPTIONS
23999rm -rf *
24000
24001# Test if the directory permissions are restored properly.
24002mkdir dir
24003chmod 755 dir
24004tar cf a.tar dir
24005chmod 777 dir
24006tar -xf a.tar --no-overwrite-dir
24007genfile --stat=mode.777 dir
24008
24009# Test if temprorary permissions are set correctly to allow the owner
24010# to write to the directory.
24011genfile --file dir/file
24012tar cf a.tar dir
24013rm dir/file
24014chmod 400 dir
24015tar -xf a.tar --no-overwrite-dir
24016genfile --stat=mode.777 dir
24017chmod 700 dir
24018find dir
24019)
24020) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24021at_status=$? at_failed=false
24022$at_check_filter
24023at_fn_diff_devnull "$at_stderr" || at_failed=:
24024echo >>"$at_stdout"; $as_echo "777
24025400
24026dir
24027dir/file
24028" | \
24029  $at_diff - "$at_stdout" || at_failed=:
24030at_fn_check_status 0 $at_status "$at_srcdir/extrac23.at:32"
24031$at_failed && at_fn_log_failure
24032$at_traceon; }
24033
24034              { set +x
24035$as_echo "$at_srcdir/extrac23.at:32:
24036mkdir ustar
24037(cd ustar
24038TEST_TAR_FORMAT=ustar
24039export TEST_TAR_FORMAT
24040TAR_OPTIONS=\"-H ustar\"
24041export TAR_OPTIONS
24042rm -rf *
24043
24044# Test if the directory permissions are restored properly.
24045mkdir dir
24046chmod 755 dir
24047tar cf a.tar dir
24048chmod 777 dir
24049tar -xf a.tar --no-overwrite-dir
24050genfile --stat=mode.777 dir
24051
24052# Test if temprorary permissions are set correctly to allow the owner
24053# to write to the directory.
24054genfile --file dir/file
24055tar cf a.tar dir
24056rm dir/file
24057chmod 400 dir
24058tar -xf a.tar --no-overwrite-dir
24059genfile --stat=mode.777 dir
24060chmod 700 dir
24061find dir
24062)"
24063at_fn_check_prepare_notrace 'an embedded newline' "extrac23.at:32"
24064( $at_check_trace;
24065mkdir ustar
24066(cd ustar
24067TEST_TAR_FORMAT=ustar
24068export TEST_TAR_FORMAT
24069TAR_OPTIONS="-H ustar"
24070export TAR_OPTIONS
24071rm -rf *
24072
24073# Test if the directory permissions are restored properly.
24074mkdir dir
24075chmod 755 dir
24076tar cf a.tar dir
24077chmod 777 dir
24078tar -xf a.tar --no-overwrite-dir
24079genfile --stat=mode.777 dir
24080
24081# Test if temprorary permissions are set correctly to allow the owner
24082# to write to the directory.
24083genfile --file dir/file
24084tar cf a.tar dir
24085rm dir/file
24086chmod 400 dir
24087tar -xf a.tar --no-overwrite-dir
24088genfile --stat=mode.777 dir
24089chmod 700 dir
24090find dir
24091)
24092) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24093at_status=$? at_failed=false
24094$at_check_filter
24095at_fn_diff_devnull "$at_stderr" || at_failed=:
24096echo >>"$at_stdout"; $as_echo "777
24097400
24098dir
24099dir/file
24100" | \
24101  $at_diff - "$at_stdout" || at_failed=:
24102at_fn_check_status 0 $at_status "$at_srcdir/extrac23.at:32"
24103$at_failed && at_fn_log_failure
24104$at_traceon; }
24105
24106              { set +x
24107$as_echo "$at_srcdir/extrac23.at:32:
24108mkdir posix
24109(cd posix
24110TEST_TAR_FORMAT=posix
24111export TEST_TAR_FORMAT
24112TAR_OPTIONS=\"-H posix\"
24113export TAR_OPTIONS
24114rm -rf *
24115
24116# Test if the directory permissions are restored properly.
24117mkdir dir
24118chmod 755 dir
24119tar cf a.tar dir
24120chmod 777 dir
24121tar -xf a.tar --no-overwrite-dir
24122genfile --stat=mode.777 dir
24123
24124# Test if temprorary permissions are set correctly to allow the owner
24125# to write to the directory.
24126genfile --file dir/file
24127tar cf a.tar dir
24128rm dir/file
24129chmod 400 dir
24130tar -xf a.tar --no-overwrite-dir
24131genfile --stat=mode.777 dir
24132chmod 700 dir
24133find dir
24134)"
24135at_fn_check_prepare_notrace 'an embedded newline' "extrac23.at:32"
24136( $at_check_trace;
24137mkdir posix
24138(cd posix
24139TEST_TAR_FORMAT=posix
24140export TEST_TAR_FORMAT
24141TAR_OPTIONS="-H posix"
24142export TAR_OPTIONS
24143rm -rf *
24144
24145# Test if the directory permissions are restored properly.
24146mkdir dir
24147chmod 755 dir
24148tar cf a.tar dir
24149chmod 777 dir
24150tar -xf a.tar --no-overwrite-dir
24151genfile --stat=mode.777 dir
24152
24153# Test if temprorary permissions are set correctly to allow the owner
24154# to write to the directory.
24155genfile --file dir/file
24156tar cf a.tar dir
24157rm dir/file
24158chmod 400 dir
24159tar -xf a.tar --no-overwrite-dir
24160genfile --stat=mode.777 dir
24161chmod 700 dir
24162find dir
24163)
24164) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24165at_status=$? at_failed=false
24166$at_check_filter
24167at_fn_diff_devnull "$at_stderr" || at_failed=:
24168echo >>"$at_stdout"; $as_echo "777
24169400
24170dir
24171dir/file
24172" | \
24173  $at_diff - "$at_stdout" || at_failed=:
24174at_fn_check_status 0 $at_status "$at_srcdir/extrac23.at:32"
24175$at_failed && at_fn_log_failure
24176$at_traceon; }
24177
24178              { set +x
24179$as_echo "$at_srcdir/extrac23.at:32:
24180mkdir gnu
24181(cd gnu
24182TEST_TAR_FORMAT=gnu
24183export TEST_TAR_FORMAT
24184TAR_OPTIONS=\"-H gnu\"
24185export TAR_OPTIONS
24186rm -rf *
24187
24188# Test if the directory permissions are restored properly.
24189mkdir dir
24190chmod 755 dir
24191tar cf a.tar dir
24192chmod 777 dir
24193tar -xf a.tar --no-overwrite-dir
24194genfile --stat=mode.777 dir
24195
24196# Test if temprorary permissions are set correctly to allow the owner
24197# to write to the directory.
24198genfile --file dir/file
24199tar cf a.tar dir
24200rm dir/file
24201chmod 400 dir
24202tar -xf a.tar --no-overwrite-dir
24203genfile --stat=mode.777 dir
24204chmod 700 dir
24205find dir
24206)"
24207at_fn_check_prepare_notrace 'an embedded newline' "extrac23.at:32"
24208( $at_check_trace;
24209mkdir gnu
24210(cd gnu
24211TEST_TAR_FORMAT=gnu
24212export TEST_TAR_FORMAT
24213TAR_OPTIONS="-H gnu"
24214export TAR_OPTIONS
24215rm -rf *
24216
24217# Test if the directory permissions are restored properly.
24218mkdir dir
24219chmod 755 dir
24220tar cf a.tar dir
24221chmod 777 dir
24222tar -xf a.tar --no-overwrite-dir
24223genfile --stat=mode.777 dir
24224
24225# Test if temprorary permissions are set correctly to allow the owner
24226# to write to the directory.
24227genfile --file dir/file
24228tar cf a.tar dir
24229rm dir/file
24230chmod 400 dir
24231tar -xf a.tar --no-overwrite-dir
24232genfile --stat=mode.777 dir
24233chmod 700 dir
24234find dir
24235)
24236) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24237at_status=$? at_failed=false
24238$at_check_filter
24239at_fn_diff_devnull "$at_stderr" || at_failed=:
24240echo >>"$at_stdout"; $as_echo "777
24241400
24242dir
24243dir/file
24244" | \
24245  $at_diff - "$at_stdout" || at_failed=:
24246at_fn_check_status 0 $at_status "$at_srcdir/extrac23.at:32"
24247$at_failed && at_fn_log_failure
24248$at_traceon; }
24249
24250
24251
24252  set +x
24253  $at_times_p && times >"$at_times_file"
24254) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24255read at_status <"$at_status_file"
24256#AT_STOP_103
24257#AT_START_104
24258at_fn_group_banner 104 'extrac24.at:18' \
24259  "--to-stdout" "                                    " 13
24260at_xfail=no
24261      test -f $XFAILFILE && at_xfail=yes
24262(
24263  $as_echo "104. $at_setup_line: testing $at_desc ..."
24264  $at_traceon
24265
24266
24267
24268# Description: When extracting over pipe, only regular files should be
24269# extracted.  In tar 1.33 this was broken, so that members of other types
24270# (in particular, directories) were extracted as usual.  This test ensures
24271# that this is no longer the case.
24272#
24273# References: https://bugs.archlinux.org/task/69373,
24274#             https://savannah.gnu.org/bugs/?60002
24275
24276
24277
24278  { set +x
24279$as_echo "$at_srcdir/extrac24.at:29:
24280mkdir v7
24281(cd v7
24282TEST_TAR_FORMAT=v7
24283export TEST_TAR_FORMAT
24284TAR_OPTIONS=\"-H v7\"
24285export TAR_OPTIONS
24286rm -rf *
24287
24288mkdir dir/
24289echo TEXT > dir/file
24290tar cf a.tar dir
24291rm -r dir
24292tar --extract --to-stdout --file a.tar
24293test -d dir
24294)"
24295at_fn_check_prepare_notrace 'an embedded newline' "extrac24.at:29"
24296( $at_check_trace;
24297mkdir v7
24298(cd v7
24299TEST_TAR_FORMAT=v7
24300export TEST_TAR_FORMAT
24301TAR_OPTIONS="-H v7"
24302export TAR_OPTIONS
24303rm -rf *
24304
24305mkdir dir/
24306echo TEXT > dir/file
24307tar cf a.tar dir
24308rm -r dir
24309tar --extract --to-stdout --file a.tar
24310test -d dir
24311)
24312) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24313at_status=$? at_failed=false
24314$at_check_filter
24315at_fn_diff_devnull "$at_stderr" || at_failed=:
24316echo >>"$at_stdout"; $as_echo "TEXT
24317" | \
24318  $at_diff - "$at_stdout" || at_failed=:
24319at_fn_check_status 1 $at_status "$at_srcdir/extrac24.at:29"
24320$at_failed && at_fn_log_failure
24321$at_traceon; }
24322
24323              { set +x
24324$as_echo "$at_srcdir/extrac24.at:29:
24325mkdir oldgnu
24326(cd oldgnu
24327TEST_TAR_FORMAT=oldgnu
24328export TEST_TAR_FORMAT
24329TAR_OPTIONS=\"-H oldgnu\"
24330export TAR_OPTIONS
24331rm -rf *
24332
24333mkdir dir/
24334echo TEXT > dir/file
24335tar cf a.tar dir
24336rm -r dir
24337tar --extract --to-stdout --file a.tar
24338test -d dir
24339)"
24340at_fn_check_prepare_notrace 'an embedded newline' "extrac24.at:29"
24341( $at_check_trace;
24342mkdir oldgnu
24343(cd oldgnu
24344TEST_TAR_FORMAT=oldgnu
24345export TEST_TAR_FORMAT
24346TAR_OPTIONS="-H oldgnu"
24347export TAR_OPTIONS
24348rm -rf *
24349
24350mkdir dir/
24351echo TEXT > dir/file
24352tar cf a.tar dir
24353rm -r dir
24354tar --extract --to-stdout --file a.tar
24355test -d dir
24356)
24357) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24358at_status=$? at_failed=false
24359$at_check_filter
24360at_fn_diff_devnull "$at_stderr" || at_failed=:
24361echo >>"$at_stdout"; $as_echo "TEXT
24362" | \
24363  $at_diff - "$at_stdout" || at_failed=:
24364at_fn_check_status 1 $at_status "$at_srcdir/extrac24.at:29"
24365$at_failed && at_fn_log_failure
24366$at_traceon; }
24367
24368              { set +x
24369$as_echo "$at_srcdir/extrac24.at:29:
24370mkdir ustar
24371(cd ustar
24372TEST_TAR_FORMAT=ustar
24373export TEST_TAR_FORMAT
24374TAR_OPTIONS=\"-H ustar\"
24375export TAR_OPTIONS
24376rm -rf *
24377
24378mkdir dir/
24379echo TEXT > dir/file
24380tar cf a.tar dir
24381rm -r dir
24382tar --extract --to-stdout --file a.tar
24383test -d dir
24384)"
24385at_fn_check_prepare_notrace 'an embedded newline' "extrac24.at:29"
24386( $at_check_trace;
24387mkdir ustar
24388(cd ustar
24389TEST_TAR_FORMAT=ustar
24390export TEST_TAR_FORMAT
24391TAR_OPTIONS="-H ustar"
24392export TAR_OPTIONS
24393rm -rf *
24394
24395mkdir dir/
24396echo TEXT > dir/file
24397tar cf a.tar dir
24398rm -r dir
24399tar --extract --to-stdout --file a.tar
24400test -d dir
24401)
24402) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24403at_status=$? at_failed=false
24404$at_check_filter
24405at_fn_diff_devnull "$at_stderr" || at_failed=:
24406echo >>"$at_stdout"; $as_echo "TEXT
24407" | \
24408  $at_diff - "$at_stdout" || at_failed=:
24409at_fn_check_status 1 $at_status "$at_srcdir/extrac24.at:29"
24410$at_failed && at_fn_log_failure
24411$at_traceon; }
24412
24413              { set +x
24414$as_echo "$at_srcdir/extrac24.at:29:
24415mkdir posix
24416(cd posix
24417TEST_TAR_FORMAT=posix
24418export TEST_TAR_FORMAT
24419TAR_OPTIONS=\"-H posix\"
24420export TAR_OPTIONS
24421rm -rf *
24422
24423mkdir dir/
24424echo TEXT > dir/file
24425tar cf a.tar dir
24426rm -r dir
24427tar --extract --to-stdout --file a.tar
24428test -d dir
24429)"
24430at_fn_check_prepare_notrace 'an embedded newline' "extrac24.at:29"
24431( $at_check_trace;
24432mkdir posix
24433(cd posix
24434TEST_TAR_FORMAT=posix
24435export TEST_TAR_FORMAT
24436TAR_OPTIONS="-H posix"
24437export TAR_OPTIONS
24438rm -rf *
24439
24440mkdir dir/
24441echo TEXT > dir/file
24442tar cf a.tar dir
24443rm -r dir
24444tar --extract --to-stdout --file a.tar
24445test -d dir
24446)
24447) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24448at_status=$? at_failed=false
24449$at_check_filter
24450at_fn_diff_devnull "$at_stderr" || at_failed=:
24451echo >>"$at_stdout"; $as_echo "TEXT
24452" | \
24453  $at_diff - "$at_stdout" || at_failed=:
24454at_fn_check_status 1 $at_status "$at_srcdir/extrac24.at:29"
24455$at_failed && at_fn_log_failure
24456$at_traceon; }
24457
24458              { set +x
24459$as_echo "$at_srcdir/extrac24.at:29:
24460mkdir gnu
24461(cd gnu
24462TEST_TAR_FORMAT=gnu
24463export TEST_TAR_FORMAT
24464TAR_OPTIONS=\"-H gnu\"
24465export TAR_OPTIONS
24466rm -rf *
24467
24468mkdir dir/
24469echo TEXT > dir/file
24470tar cf a.tar dir
24471rm -r dir
24472tar --extract --to-stdout --file a.tar
24473test -d dir
24474)"
24475at_fn_check_prepare_notrace 'an embedded newline' "extrac24.at:29"
24476( $at_check_trace;
24477mkdir gnu
24478(cd gnu
24479TEST_TAR_FORMAT=gnu
24480export TEST_TAR_FORMAT
24481TAR_OPTIONS="-H gnu"
24482export TAR_OPTIONS
24483rm -rf *
24484
24485mkdir dir/
24486echo TEXT > dir/file
24487tar cf a.tar dir
24488rm -r dir
24489tar --extract --to-stdout --file a.tar
24490test -d dir
24491)
24492) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24493at_status=$? at_failed=false
24494$at_check_filter
24495at_fn_diff_devnull "$at_stderr" || at_failed=:
24496echo >>"$at_stdout"; $as_echo "TEXT
24497" | \
24498  $at_diff - "$at_stdout" || at_failed=:
24499at_fn_check_status 1 $at_status "$at_srcdir/extrac24.at:29"
24500$at_failed && at_fn_log_failure
24501$at_traceon; }
24502
24503
24504
24505
24506  set +x
24507  $at_times_p && times >"$at_times_file"
24508) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24509read at_status <"$at_status_file"
24510#AT_STOP_104
24511#AT_START_105
24512at_fn_group_banner 105 'backup01.at:33' \
24513  "extracting existing dir with --backup" "          " 13
24514at_xfail=no
24515      test -f $XFAILFILE && at_xfail=yes
24516(
24517  $as_echo "105. $at_setup_line: testing $at_desc ..."
24518  $at_traceon
24519
24520
24521
24522
24523
24524  { set +x
24525$as_echo "$at_srcdir/backup01.at:36:
24526mkdir v7
24527(cd v7
24528TEST_TAR_FORMAT=v7
24529export TEST_TAR_FORMAT
24530TAR_OPTIONS=\"-H v7\"
24531export TAR_OPTIONS
24532rm -rf *
24533
24534unset VERSION_CONTROL
24535mkdir dir1 dir2
24536echo bla > dir1/file1
24537tar cf test.tar dir1 dir2
24538tar xfv test.tar --backup --warning=no-timestamp
24539)"
24540at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
24541( $at_check_trace;
24542mkdir v7
24543(cd v7
24544TEST_TAR_FORMAT=v7
24545export TEST_TAR_FORMAT
24546TAR_OPTIONS="-H v7"
24547export TAR_OPTIONS
24548rm -rf *
24549
24550unset VERSION_CONTROL
24551mkdir dir1 dir2
24552echo bla > dir1/file1
24553tar cf test.tar dir1 dir2
24554tar xfv test.tar --backup --warning=no-timestamp
24555)
24556) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24557at_status=$? at_failed=false
24558$at_check_filter
24559at_fn_diff_devnull "$at_stderr" || at_failed=:
24560echo >>"$at_stdout"; $as_echo "dir1/
24561dir1/file1
24562Renaming 'dir1/file1' to 'dir1/file1~'
24563dir2/
24564" | \
24565  $at_diff - "$at_stdout" || at_failed=:
24566at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
24567$at_failed && at_fn_log_failure
24568$at_traceon; }
24569
24570              { set +x
24571$as_echo "$at_srcdir/backup01.at:36:
24572mkdir oldgnu
24573(cd oldgnu
24574TEST_TAR_FORMAT=oldgnu
24575export TEST_TAR_FORMAT
24576TAR_OPTIONS=\"-H oldgnu\"
24577export TAR_OPTIONS
24578rm -rf *
24579
24580unset VERSION_CONTROL
24581mkdir dir1 dir2
24582echo bla > dir1/file1
24583tar cf test.tar dir1 dir2
24584tar xfv test.tar --backup --warning=no-timestamp
24585)"
24586at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
24587( $at_check_trace;
24588mkdir oldgnu
24589(cd oldgnu
24590TEST_TAR_FORMAT=oldgnu
24591export TEST_TAR_FORMAT
24592TAR_OPTIONS="-H oldgnu"
24593export TAR_OPTIONS
24594rm -rf *
24595
24596unset VERSION_CONTROL
24597mkdir dir1 dir2
24598echo bla > dir1/file1
24599tar cf test.tar dir1 dir2
24600tar xfv test.tar --backup --warning=no-timestamp
24601)
24602) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24603at_status=$? at_failed=false
24604$at_check_filter
24605at_fn_diff_devnull "$at_stderr" || at_failed=:
24606echo >>"$at_stdout"; $as_echo "dir1/
24607dir1/file1
24608Renaming 'dir1/file1' to 'dir1/file1~'
24609dir2/
24610" | \
24611  $at_diff - "$at_stdout" || at_failed=:
24612at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
24613$at_failed && at_fn_log_failure
24614$at_traceon; }
24615
24616              { set +x
24617$as_echo "$at_srcdir/backup01.at:36:
24618mkdir ustar
24619(cd ustar
24620TEST_TAR_FORMAT=ustar
24621export TEST_TAR_FORMAT
24622TAR_OPTIONS=\"-H ustar\"
24623export TAR_OPTIONS
24624rm -rf *
24625
24626unset VERSION_CONTROL
24627mkdir dir1 dir2
24628echo bla > dir1/file1
24629tar cf test.tar dir1 dir2
24630tar xfv test.tar --backup --warning=no-timestamp
24631)"
24632at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
24633( $at_check_trace;
24634mkdir ustar
24635(cd ustar
24636TEST_TAR_FORMAT=ustar
24637export TEST_TAR_FORMAT
24638TAR_OPTIONS="-H ustar"
24639export TAR_OPTIONS
24640rm -rf *
24641
24642unset VERSION_CONTROL
24643mkdir dir1 dir2
24644echo bla > dir1/file1
24645tar cf test.tar dir1 dir2
24646tar xfv test.tar --backup --warning=no-timestamp
24647)
24648) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24649at_status=$? at_failed=false
24650$at_check_filter
24651at_fn_diff_devnull "$at_stderr" || at_failed=:
24652echo >>"$at_stdout"; $as_echo "dir1/
24653dir1/file1
24654Renaming 'dir1/file1' to 'dir1/file1~'
24655dir2/
24656" | \
24657  $at_diff - "$at_stdout" || at_failed=:
24658at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
24659$at_failed && at_fn_log_failure
24660$at_traceon; }
24661
24662              { set +x
24663$as_echo "$at_srcdir/backup01.at:36:
24664mkdir posix
24665(cd posix
24666TEST_TAR_FORMAT=posix
24667export TEST_TAR_FORMAT
24668TAR_OPTIONS=\"-H posix\"
24669export TAR_OPTIONS
24670rm -rf *
24671
24672unset VERSION_CONTROL
24673mkdir dir1 dir2
24674echo bla > dir1/file1
24675tar cf test.tar dir1 dir2
24676tar xfv test.tar --backup --warning=no-timestamp
24677)"
24678at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
24679( $at_check_trace;
24680mkdir posix
24681(cd posix
24682TEST_TAR_FORMAT=posix
24683export TEST_TAR_FORMAT
24684TAR_OPTIONS="-H posix"
24685export TAR_OPTIONS
24686rm -rf *
24687
24688unset VERSION_CONTROL
24689mkdir dir1 dir2
24690echo bla > dir1/file1
24691tar cf test.tar dir1 dir2
24692tar xfv test.tar --backup --warning=no-timestamp
24693)
24694) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24695at_status=$? at_failed=false
24696$at_check_filter
24697at_fn_diff_devnull "$at_stderr" || at_failed=:
24698echo >>"$at_stdout"; $as_echo "dir1/
24699dir1/file1
24700Renaming 'dir1/file1' to 'dir1/file1~'
24701dir2/
24702" | \
24703  $at_diff - "$at_stdout" || at_failed=:
24704at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
24705$at_failed && at_fn_log_failure
24706$at_traceon; }
24707
24708              { set +x
24709$as_echo "$at_srcdir/backup01.at:36:
24710mkdir gnu
24711(cd gnu
24712TEST_TAR_FORMAT=gnu
24713export TEST_TAR_FORMAT
24714TAR_OPTIONS=\"-H gnu\"
24715export TAR_OPTIONS
24716rm -rf *
24717
24718unset VERSION_CONTROL
24719mkdir dir1 dir2
24720echo bla > dir1/file1
24721tar cf test.tar dir1 dir2
24722tar xfv test.tar --backup --warning=no-timestamp
24723)"
24724at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
24725( $at_check_trace;
24726mkdir gnu
24727(cd gnu
24728TEST_TAR_FORMAT=gnu
24729export TEST_TAR_FORMAT
24730TAR_OPTIONS="-H gnu"
24731export TAR_OPTIONS
24732rm -rf *
24733
24734unset VERSION_CONTROL
24735mkdir dir1 dir2
24736echo bla > dir1/file1
24737tar cf test.tar dir1 dir2
24738tar xfv test.tar --backup --warning=no-timestamp
24739)
24740) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24741at_status=$? at_failed=false
24742$at_check_filter
24743at_fn_diff_devnull "$at_stderr" || at_failed=:
24744echo >>"$at_stdout"; $as_echo "dir1/
24745dir1/file1
24746Renaming 'dir1/file1' to 'dir1/file1~'
24747dir2/
24748" | \
24749  $at_diff - "$at_stdout" || at_failed=:
24750at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
24751$at_failed && at_fn_log_failure
24752$at_traceon; }
24753
24754
24755
24756
24757  set +x
24758  $at_times_p && times >"$at_times_file"
24759) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24760read at_status <"$at_status_file"
24761#AT_STOP_105
24762#AT_START_106
24763at_fn_group_banner 106 'difflink.at:17' \
24764  "link mismatch" "                                  " 14
24765at_xfail=no
24766      test -f $XFAILFILE && at_xfail=yes
24767(
24768  $as_echo "106. $at_setup_line: testing $at_desc ..."
24769  $at_traceon
24770
24771
24772
24773
24774  { set +x
24775$as_echo "$at_srcdir/difflink.at:19:
24776mkdir ustar
24777(cd ustar
24778TEST_TAR_FORMAT=ustar
24779export TEST_TAR_FORMAT
24780TAR_OPTIONS=\"-H ustar\"
24781export TAR_OPTIONS
24782rm -rf *
24783
24784mkdir a
24785genfile -f a/x
24786ln -s x a/y
24787ln a/x a/z
24788tar cf a.tar a/x a/y a/z
24789rm a/z
24790ln -s x a/z
24791tar df a.tar
24792)"
24793at_fn_check_prepare_notrace 'an embedded newline' "difflink.at:19"
24794( $at_check_trace;
24795mkdir ustar
24796(cd ustar
24797TEST_TAR_FORMAT=ustar
24798export TEST_TAR_FORMAT
24799TAR_OPTIONS="-H ustar"
24800export TAR_OPTIONS
24801rm -rf *
24802
24803mkdir a
24804genfile -f a/x
24805ln -s x a/y
24806ln a/x a/z
24807tar cf a.tar a/x a/y a/z
24808rm a/z
24809ln -s x a/z
24810tar df a.tar
24811)
24812) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24813at_status=$? at_failed=false
24814$at_check_filter
24815at_fn_diff_devnull "$at_stderr" || at_failed=:
24816echo >>"$at_stdout"; $as_echo "a/z: Not linked to a/x
24817" | \
24818  $at_diff - "$at_stdout" || at_failed=:
24819at_fn_check_status 1 $at_status "$at_srcdir/difflink.at:19"
24820$at_failed && at_fn_log_failure
24821$at_traceon; }
24822
24823
24824 # Testing one format is enough
24825  set +x
24826  $at_times_p && times >"$at_times_file"
24827) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24828read at_status <"$at_status_file"
24829#AT_STOP_106
24830#AT_START_107
24831at_fn_group_banner 107 'label01.at:21' \
24832  "single-volume label" "                            " 15
24833at_xfail=no
24834      test -f $XFAILFILE && at_xfail=yes
24835(
24836  $as_echo "107. $at_setup_line: testing $at_desc ..."
24837  $at_traceon
24838
24839
24840
24841
24842
24843  { set +x
24844$as_echo "$at_srcdir/label01.at:24:
24845mkdir gnu
24846(cd gnu
24847TEST_TAR_FORMAT=gnu
24848export TEST_TAR_FORMAT
24849TAR_OPTIONS=\"-H gnu\"
24850export TAR_OPTIONS
24851rm -rf *
24852
24853genfile --file foo
24854genfile --file bar
24855tar -cf archive --label=Test foo bar
24856tar tf archive
24857)"
24858at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
24859( $at_check_trace;
24860mkdir gnu
24861(cd gnu
24862TEST_TAR_FORMAT=gnu
24863export TEST_TAR_FORMAT
24864TAR_OPTIONS="-H gnu"
24865export TAR_OPTIONS
24866rm -rf *
24867
24868genfile --file foo
24869genfile --file bar
24870tar -cf archive --label=Test foo bar
24871tar tf archive
24872)
24873) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24874at_status=$? at_failed=false
24875$at_check_filter
24876at_fn_diff_devnull "$at_stderr" || at_failed=:
24877echo >>"$at_stdout"; $as_echo "Test
24878foo
24879bar
24880" | \
24881  $at_diff - "$at_stdout" || at_failed=:
24882at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
24883$at_failed && at_fn_log_failure
24884$at_traceon; }
24885
24886              { set +x
24887$as_echo "$at_srcdir/label01.at:24:
24888mkdir oldgnu
24889(cd oldgnu
24890TEST_TAR_FORMAT=oldgnu
24891export TEST_TAR_FORMAT
24892TAR_OPTIONS=\"-H oldgnu\"
24893export TAR_OPTIONS
24894rm -rf *
24895
24896genfile --file foo
24897genfile --file bar
24898tar -cf archive --label=Test foo bar
24899tar tf archive
24900)"
24901at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
24902( $at_check_trace;
24903mkdir oldgnu
24904(cd oldgnu
24905TEST_TAR_FORMAT=oldgnu
24906export TEST_TAR_FORMAT
24907TAR_OPTIONS="-H oldgnu"
24908export TAR_OPTIONS
24909rm -rf *
24910
24911genfile --file foo
24912genfile --file bar
24913tar -cf archive --label=Test foo bar
24914tar tf archive
24915)
24916) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24917at_status=$? at_failed=false
24918$at_check_filter
24919at_fn_diff_devnull "$at_stderr" || at_failed=:
24920echo >>"$at_stdout"; $as_echo "Test
24921foo
24922bar
24923" | \
24924  $at_diff - "$at_stdout" || at_failed=:
24925at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
24926$at_failed && at_fn_log_failure
24927$at_traceon; }
24928
24929              { set +x
24930$as_echo "$at_srcdir/label01.at:24:
24931mkdir posix
24932(cd posix
24933TEST_TAR_FORMAT=posix
24934export TEST_TAR_FORMAT
24935TAR_OPTIONS=\"-H posix\"
24936export TAR_OPTIONS
24937rm -rf *
24938
24939genfile --file foo
24940genfile --file bar
24941tar -cf archive --label=Test foo bar
24942tar tf archive
24943)"
24944at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
24945( $at_check_trace;
24946mkdir posix
24947(cd posix
24948TEST_TAR_FORMAT=posix
24949export TEST_TAR_FORMAT
24950TAR_OPTIONS="-H posix"
24951export TAR_OPTIONS
24952rm -rf *
24953
24954genfile --file foo
24955genfile --file bar
24956tar -cf archive --label=Test foo bar
24957tar tf archive
24958)
24959) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24960at_status=$? at_failed=false
24961$at_check_filter
24962at_fn_diff_devnull "$at_stderr" || at_failed=:
24963echo >>"$at_stdout"; $as_echo "Test
24964foo
24965bar
24966" | \
24967  $at_diff - "$at_stdout" || at_failed=:
24968at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
24969$at_failed && at_fn_log_failure
24970$at_traceon; }
24971
24972
24973
24974
24975  set +x
24976  $at_times_p && times >"$at_times_file"
24977) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24978read at_status <"$at_status_file"
24979#AT_STOP_107
24980#AT_START_108
24981at_fn_group_banner 108 'label02.at:21' \
24982  "multi-volume label" "                             " 15
24983at_xfail=no
24984      test -f $XFAILFILE && at_xfail=yes
24985(
24986  $as_echo "108. $at_setup_line: testing $at_desc ..."
24987  $at_traceon
24988
24989
24990
24991
24992
24993  { set +x
24994$as_echo "$at_srcdir/label02.at:24:
24995mkdir gnu
24996(cd gnu
24997TEST_TAR_FORMAT=gnu
24998export TEST_TAR_FORMAT
24999TAR_OPTIONS=\"-H gnu\"
25000export TAR_OPTIONS
25001rm -rf *
25002
25003exec <&-
25004genfile --length 0 --file foo
25005genfile --length 12288 --file bar
25006genfile --length 12288 --file baz
25007tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
25008tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
25009)"
25010at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
25011( $at_check_trace;
25012mkdir gnu
25013(cd gnu
25014TEST_TAR_FORMAT=gnu
25015export TEST_TAR_FORMAT
25016TAR_OPTIONS="-H gnu"
25017export TAR_OPTIONS
25018rm -rf *
25019
25020exec <&-
25021genfile --length 0 --file foo
25022genfile --length 12288 --file bar
25023genfile --length 12288 --file baz
25024tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
25025tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
25026)
25027) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25028at_status=$? at_failed=false
25029$at_check_filter
25030at_fn_diff_devnull "$at_stderr" || at_failed=:
25031echo >>"$at_stdout"; $as_echo "Test Volume 1
25032foo
25033bar
25034baz
25035" | \
25036  $at_diff - "$at_stdout" || at_failed=:
25037at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
25038$at_failed && at_fn_log_failure
25039$at_traceon; }
25040
25041              { set +x
25042$as_echo "$at_srcdir/label02.at:24:
25043mkdir oldgnu
25044(cd oldgnu
25045TEST_TAR_FORMAT=oldgnu
25046export TEST_TAR_FORMAT
25047TAR_OPTIONS=\"-H oldgnu\"
25048export TAR_OPTIONS
25049rm -rf *
25050
25051exec <&-
25052genfile --length 0 --file foo
25053genfile --length 12288 --file bar
25054genfile --length 12288 --file baz
25055tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
25056tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
25057)"
25058at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
25059( $at_check_trace;
25060mkdir oldgnu
25061(cd oldgnu
25062TEST_TAR_FORMAT=oldgnu
25063export TEST_TAR_FORMAT
25064TAR_OPTIONS="-H oldgnu"
25065export TAR_OPTIONS
25066rm -rf *
25067
25068exec <&-
25069genfile --length 0 --file foo
25070genfile --length 12288 --file bar
25071genfile --length 12288 --file baz
25072tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
25073tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
25074)
25075) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25076at_status=$? at_failed=false
25077$at_check_filter
25078at_fn_diff_devnull "$at_stderr" || at_failed=:
25079echo >>"$at_stdout"; $as_echo "Test Volume 1
25080foo
25081bar
25082baz
25083" | \
25084  $at_diff - "$at_stdout" || at_failed=:
25085at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
25086$at_failed && at_fn_log_failure
25087$at_traceon; }
25088
25089              { set +x
25090$as_echo "$at_srcdir/label02.at:24:
25091mkdir posix
25092(cd posix
25093TEST_TAR_FORMAT=posix
25094export TEST_TAR_FORMAT
25095TAR_OPTIONS=\"-H posix\"
25096export TAR_OPTIONS
25097rm -rf *
25098
25099exec <&-
25100genfile --length 0 --file foo
25101genfile --length 12288 --file bar
25102genfile --length 12288 --file baz
25103tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
25104tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
25105)"
25106at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
25107( $at_check_trace;
25108mkdir posix
25109(cd posix
25110TEST_TAR_FORMAT=posix
25111export TEST_TAR_FORMAT
25112TAR_OPTIONS="-H posix"
25113export TAR_OPTIONS
25114rm -rf *
25115
25116exec <&-
25117genfile --length 0 --file foo
25118genfile --length 12288 --file bar
25119genfile --length 12288 --file baz
25120tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
25121tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
25122)
25123) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25124at_status=$? at_failed=false
25125$at_check_filter
25126at_fn_diff_devnull "$at_stderr" || at_failed=:
25127echo >>"$at_stdout"; $as_echo "Test Volume 1
25128foo
25129bar
25130baz
25131" | \
25132  $at_diff - "$at_stdout" || at_failed=:
25133at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
25134$at_failed && at_fn_log_failure
25135$at_traceon; }
25136
25137
25138
25139
25140  set +x
25141  $at_times_p && times >"$at_times_file"
25142) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25143read at_status <"$at_status_file"
25144#AT_STOP_108
25145#AT_START_109
25146at_fn_group_banner 109 'label03.at:27' \
25147  "test-label option" "                              " 15
25148at_xfail=no
25149      test -f $XFAILFILE && at_xfail=yes
25150(
25151  $as_echo "109. $at_setup_line: testing $at_desc ..."
25152  $at_traceon
25153
25154
25155
25156
25157
25158  { set +x
25159$as_echo "$at_srcdir/label03.at:30:
25160mkdir gnu
25161(cd gnu
25162TEST_TAR_FORMAT=gnu
25163export TEST_TAR_FORMAT
25164TAR_OPTIONS=\"-H gnu\"
25165export TAR_OPTIONS
25166rm -rf *
25167
25168exec <&-
25169genfile --file file
25170tar -c --label='iamalabel' --file iamanarchive file
25171tar -c --file unlabeled.tar file
25172decho \"# Display label\"
25173tar --test-label --file=iamanarchive; echo \$?
25174decho \"# Display label: unlabeled\"
25175tar --test-label --file=unlabeled.tar; echo \$?
25176decho \"# Test label: success\"
25177tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
25178decho \"# Test label: failure\"
25179tar --test-label --file=iamanarchive 'amalabel'; echo \$?
25180decho \"# Test label: unlabeled\"
25181tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
25182decho \"# Test label, verbose: success\"
25183tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
25184decho \"# Test label, verbose: failure\"
25185tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
25186decho \"# Test label: multiple arguments\"
25187tar --test-label --file=iamanarchive a iamalabel b; echo \$?
25188decho \"# Test label: wildcards\"
25189tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
25190)"
25191at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
25192( $at_check_trace;
25193mkdir gnu
25194(cd gnu
25195TEST_TAR_FORMAT=gnu
25196export TEST_TAR_FORMAT
25197TAR_OPTIONS="-H gnu"
25198export TAR_OPTIONS
25199rm -rf *
25200
25201exec <&-
25202genfile --file file
25203tar -c --label='iamalabel' --file iamanarchive file
25204tar -c --file unlabeled.tar file
25205decho "# Display label"
25206tar --test-label --file=iamanarchive; echo $?
25207decho "# Display label: unlabeled"
25208tar --test-label --file=unlabeled.tar; echo $?
25209decho "# Test label: success"
25210tar --test-label --file=iamanarchive 'iamalabel'; echo $?
25211decho "# Test label: failure"
25212tar --test-label --file=iamanarchive 'amalabel'; echo $?
25213decho "# Test label: unlabeled"
25214tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
25215decho "# Test label, verbose: success"
25216tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
25217decho "# Test label, verbose: failure"
25218tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
25219decho "# Test label: multiple arguments"
25220tar --test-label --file=iamanarchive a iamalabel b; echo $?
25221decho "# Test label: wildcards"
25222tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
25223)
25224) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25225at_status=$? at_failed=false
25226$at_check_filter
25227echo >>"$at_stderr"; $as_echo "# Display label
25228# Display label: unlabeled
25229# Test label: success
25230# Test label: failure
25231# Test label: unlabeled
25232# Test label, verbose: success
25233# Test label, verbose: failure
25234tar: Archive label mismatch
25235# Test label: multiple arguments
25236# Test label: wildcards
25237" | \
25238  $at_diff - "$at_stderr" || at_failed=:
25239echo >>"$at_stdout"; $as_echo "# Display label
25240iamalabel
252410
25242# Display label: unlabeled
252430
25244# Test label: success
252450
25246# Test label: failure
252471
25248# Test label: unlabeled
252491
25250# Test label, verbose: success
25251iamalabel
252520
25253# Test label, verbose: failure
25254iamalabel
252551
25256# Test label: multiple arguments
252570
25258# Test label: wildcards
252590
25260" | \
25261  $at_diff - "$at_stdout" || at_failed=:
25262at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
25263$at_failed && at_fn_log_failure
25264$at_traceon; }
25265
25266              { set +x
25267$as_echo "$at_srcdir/label03.at:30:
25268mkdir oldgnu
25269(cd oldgnu
25270TEST_TAR_FORMAT=oldgnu
25271export TEST_TAR_FORMAT
25272TAR_OPTIONS=\"-H oldgnu\"
25273export TAR_OPTIONS
25274rm -rf *
25275
25276exec <&-
25277genfile --file file
25278tar -c --label='iamalabel' --file iamanarchive file
25279tar -c --file unlabeled.tar file
25280decho \"# Display label\"
25281tar --test-label --file=iamanarchive; echo \$?
25282decho \"# Display label: unlabeled\"
25283tar --test-label --file=unlabeled.tar; echo \$?
25284decho \"# Test label: success\"
25285tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
25286decho \"# Test label: failure\"
25287tar --test-label --file=iamanarchive 'amalabel'; echo \$?
25288decho \"# Test label: unlabeled\"
25289tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
25290decho \"# Test label, verbose: success\"
25291tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
25292decho \"# Test label, verbose: failure\"
25293tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
25294decho \"# Test label: multiple arguments\"
25295tar --test-label --file=iamanarchive a iamalabel b; echo \$?
25296decho \"# Test label: wildcards\"
25297tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
25298)"
25299at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
25300( $at_check_trace;
25301mkdir oldgnu
25302(cd oldgnu
25303TEST_TAR_FORMAT=oldgnu
25304export TEST_TAR_FORMAT
25305TAR_OPTIONS="-H oldgnu"
25306export TAR_OPTIONS
25307rm -rf *
25308
25309exec <&-
25310genfile --file file
25311tar -c --label='iamalabel' --file iamanarchive file
25312tar -c --file unlabeled.tar file
25313decho "# Display label"
25314tar --test-label --file=iamanarchive; echo $?
25315decho "# Display label: unlabeled"
25316tar --test-label --file=unlabeled.tar; echo $?
25317decho "# Test label: success"
25318tar --test-label --file=iamanarchive 'iamalabel'; echo $?
25319decho "# Test label: failure"
25320tar --test-label --file=iamanarchive 'amalabel'; echo $?
25321decho "# Test label: unlabeled"
25322tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
25323decho "# Test label, verbose: success"
25324tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
25325decho "# Test label, verbose: failure"
25326tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
25327decho "# Test label: multiple arguments"
25328tar --test-label --file=iamanarchive a iamalabel b; echo $?
25329decho "# Test label: wildcards"
25330tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
25331)
25332) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25333at_status=$? at_failed=false
25334$at_check_filter
25335echo >>"$at_stderr"; $as_echo "# Display label
25336# Display label: unlabeled
25337# Test label: success
25338# Test label: failure
25339# Test label: unlabeled
25340# Test label, verbose: success
25341# Test label, verbose: failure
25342tar: Archive label mismatch
25343# Test label: multiple arguments
25344# Test label: wildcards
25345" | \
25346  $at_diff - "$at_stderr" || at_failed=:
25347echo >>"$at_stdout"; $as_echo "# Display label
25348iamalabel
253490
25350# Display label: unlabeled
253510
25352# Test label: success
253530
25354# Test label: failure
253551
25356# Test label: unlabeled
253571
25358# Test label, verbose: success
25359iamalabel
253600
25361# Test label, verbose: failure
25362iamalabel
253631
25364# Test label: multiple arguments
253650
25366# Test label: wildcards
253670
25368" | \
25369  $at_diff - "$at_stdout" || at_failed=:
25370at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
25371$at_failed && at_fn_log_failure
25372$at_traceon; }
25373
25374              { set +x
25375$as_echo "$at_srcdir/label03.at:30:
25376mkdir posix
25377(cd posix
25378TEST_TAR_FORMAT=posix
25379export TEST_TAR_FORMAT
25380TAR_OPTIONS=\"-H posix\"
25381export TAR_OPTIONS
25382rm -rf *
25383
25384exec <&-
25385genfile --file file
25386tar -c --label='iamalabel' --file iamanarchive file
25387tar -c --file unlabeled.tar file
25388decho \"# Display label\"
25389tar --test-label --file=iamanarchive; echo \$?
25390decho \"# Display label: unlabeled\"
25391tar --test-label --file=unlabeled.tar; echo \$?
25392decho \"# Test label: success\"
25393tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
25394decho \"# Test label: failure\"
25395tar --test-label --file=iamanarchive 'amalabel'; echo \$?
25396decho \"# Test label: unlabeled\"
25397tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
25398decho \"# Test label, verbose: success\"
25399tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
25400decho \"# Test label, verbose: failure\"
25401tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
25402decho \"# Test label: multiple arguments\"
25403tar --test-label --file=iamanarchive a iamalabel b; echo \$?
25404decho \"# Test label: wildcards\"
25405tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
25406)"
25407at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
25408( $at_check_trace;
25409mkdir posix
25410(cd posix
25411TEST_TAR_FORMAT=posix
25412export TEST_TAR_FORMAT
25413TAR_OPTIONS="-H posix"
25414export TAR_OPTIONS
25415rm -rf *
25416
25417exec <&-
25418genfile --file file
25419tar -c --label='iamalabel' --file iamanarchive file
25420tar -c --file unlabeled.tar file
25421decho "# Display label"
25422tar --test-label --file=iamanarchive; echo $?
25423decho "# Display label: unlabeled"
25424tar --test-label --file=unlabeled.tar; echo $?
25425decho "# Test label: success"
25426tar --test-label --file=iamanarchive 'iamalabel'; echo $?
25427decho "# Test label: failure"
25428tar --test-label --file=iamanarchive 'amalabel'; echo $?
25429decho "# Test label: unlabeled"
25430tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
25431decho "# Test label, verbose: success"
25432tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
25433decho "# Test label, verbose: failure"
25434tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
25435decho "# Test label: multiple arguments"
25436tar --test-label --file=iamanarchive a iamalabel b; echo $?
25437decho "# Test label: wildcards"
25438tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
25439)
25440) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25441at_status=$? at_failed=false
25442$at_check_filter
25443echo >>"$at_stderr"; $as_echo "# Display label
25444# Display label: unlabeled
25445# Test label: success
25446# Test label: failure
25447# Test label: unlabeled
25448# Test label, verbose: success
25449# Test label, verbose: failure
25450tar: Archive label mismatch
25451# Test label: multiple arguments
25452# Test label: wildcards
25453" | \
25454  $at_diff - "$at_stderr" || at_failed=:
25455echo >>"$at_stdout"; $as_echo "# Display label
25456iamalabel
254570
25458# Display label: unlabeled
254590
25460# Test label: success
254610
25462# Test label: failure
254631
25464# Test label: unlabeled
254651
25466# Test label, verbose: success
25467iamalabel
254680
25469# Test label, verbose: failure
25470iamalabel
254711
25472# Test label: multiple arguments
254730
25474# Test label: wildcards
254750
25476" | \
25477  $at_diff - "$at_stdout" || at_failed=:
25478at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
25479$at_failed && at_fn_log_failure
25480$at_traceon; }
25481
25482
25483
25484
25485  set +x
25486  $at_times_p && times >"$at_times_file"
25487) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25488read at_status <"$at_status_file"
25489#AT_STOP_109
25490#AT_START_110
25491at_fn_group_banner 110 'label04.at:27' \
25492  "label with non-create option" "                   " 15
25493at_xfail=no
25494      test -f $XFAILFILE && at_xfail=yes
25495(
25496  $as_echo "110. $at_setup_line: testing $at_desc ..."
25497  $at_traceon
25498
25499
25500
25501
25502
25503  { set +x
25504$as_echo "$at_srcdir/label04.at:30:
25505mkdir gnu
25506(cd gnu
25507TEST_TAR_FORMAT=gnu
25508export TEST_TAR_FORMAT
25509TAR_OPTIONS=\"-H gnu\"
25510export TAR_OPTIONS
25511rm -rf *
25512
25513exec <&-
25514genfile --file file
25515decho \"# Create volume\"
25516tar -c -f archive --label='New volume' file
25517decho \"# Update: wrong label\"
25518tar -rf archive --label='My volume' file; echo \$?
25519decho \"# Update: right label\"
25520tar -rf archive --label='New volume' file
25521)"
25522at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
25523( $at_check_trace;
25524mkdir gnu
25525(cd gnu
25526TEST_TAR_FORMAT=gnu
25527export TEST_TAR_FORMAT
25528TAR_OPTIONS="-H gnu"
25529export TAR_OPTIONS
25530rm -rf *
25531
25532exec <&-
25533genfile --file file
25534decho "# Create volume"
25535tar -c -f archive --label='New volume' file
25536decho "# Update: wrong label"
25537tar -rf archive --label='My volume' file; echo $?
25538decho "# Update: right label"
25539tar -rf archive --label='New volume' file
25540)
25541) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25542at_status=$? at_failed=false
25543$at_check_filter
25544echo >>"$at_stderr"; $as_echo "# Create volume
25545# Update: wrong label
25546tar: Volume 'New volume' does not match 'My volume'
25547tar: Error is not recoverable: exiting now
25548# Update: right label
25549" | \
25550  $at_diff - "$at_stderr" || at_failed=:
25551echo >>"$at_stdout"; $as_echo "# Create volume
25552# Update: wrong label
255532
25554# Update: right label
25555" | \
25556  $at_diff - "$at_stdout" || at_failed=:
25557at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
25558$at_failed && at_fn_log_failure
25559$at_traceon; }
25560
25561              { set +x
25562$as_echo "$at_srcdir/label04.at:30:
25563mkdir oldgnu
25564(cd oldgnu
25565TEST_TAR_FORMAT=oldgnu
25566export TEST_TAR_FORMAT
25567TAR_OPTIONS=\"-H oldgnu\"
25568export TAR_OPTIONS
25569rm -rf *
25570
25571exec <&-
25572genfile --file file
25573decho \"# Create volume\"
25574tar -c -f archive --label='New volume' file
25575decho \"# Update: wrong label\"
25576tar -rf archive --label='My volume' file; echo \$?
25577decho \"# Update: right label\"
25578tar -rf archive --label='New volume' file
25579)"
25580at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
25581( $at_check_trace;
25582mkdir oldgnu
25583(cd oldgnu
25584TEST_TAR_FORMAT=oldgnu
25585export TEST_TAR_FORMAT
25586TAR_OPTIONS="-H oldgnu"
25587export TAR_OPTIONS
25588rm -rf *
25589
25590exec <&-
25591genfile --file file
25592decho "# Create volume"
25593tar -c -f archive --label='New volume' file
25594decho "# Update: wrong label"
25595tar -rf archive --label='My volume' file; echo $?
25596decho "# Update: right label"
25597tar -rf archive --label='New volume' file
25598)
25599) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25600at_status=$? at_failed=false
25601$at_check_filter
25602echo >>"$at_stderr"; $as_echo "# Create volume
25603# Update: wrong label
25604tar: Volume 'New volume' does not match 'My volume'
25605tar: Error is not recoverable: exiting now
25606# Update: right label
25607" | \
25608  $at_diff - "$at_stderr" || at_failed=:
25609echo >>"$at_stdout"; $as_echo "# Create volume
25610# Update: wrong label
256112
25612# Update: right label
25613" | \
25614  $at_diff - "$at_stdout" || at_failed=:
25615at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
25616$at_failed && at_fn_log_failure
25617$at_traceon; }
25618
25619              { set +x
25620$as_echo "$at_srcdir/label04.at:30:
25621mkdir posix
25622(cd posix
25623TEST_TAR_FORMAT=posix
25624export TEST_TAR_FORMAT
25625TAR_OPTIONS=\"-H posix\"
25626export TAR_OPTIONS
25627rm -rf *
25628
25629exec <&-
25630genfile --file file
25631decho \"# Create volume\"
25632tar -c -f archive --label='New volume' file
25633decho \"# Update: wrong label\"
25634tar -rf archive --label='My volume' file; echo \$?
25635decho \"# Update: right label\"
25636tar -rf archive --label='New volume' file
25637)"
25638at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
25639( $at_check_trace;
25640mkdir posix
25641(cd posix
25642TEST_TAR_FORMAT=posix
25643export TEST_TAR_FORMAT
25644TAR_OPTIONS="-H posix"
25645export TAR_OPTIONS
25646rm -rf *
25647
25648exec <&-
25649genfile --file file
25650decho "# Create volume"
25651tar -c -f archive --label='New volume' file
25652decho "# Update: wrong label"
25653tar -rf archive --label='My volume' file; echo $?
25654decho "# Update: right label"
25655tar -rf archive --label='New volume' file
25656)
25657) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25658at_status=$? at_failed=false
25659$at_check_filter
25660echo >>"$at_stderr"; $as_echo "# Create volume
25661# Update: wrong label
25662tar: Volume 'New volume' does not match 'My volume'
25663tar: Error is not recoverable: exiting now
25664# Update: right label
25665" | \
25666  $at_diff - "$at_stderr" || at_failed=:
25667echo >>"$at_stdout"; $as_echo "# Create volume
25668# Update: wrong label
256692
25670# Update: right label
25671" | \
25672  $at_diff - "$at_stdout" || at_failed=:
25673at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
25674$at_failed && at_fn_log_failure
25675$at_traceon; }
25676
25677
25678
25679
25680  set +x
25681  $at_times_p && times >"$at_times_file"
25682) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25683read at_status <"$at_status_file"
25684#AT_STOP_110
25685#AT_START_111
25686at_fn_group_banner 111 'label05.at:24' \
25687  "label with non-create option" "                   " 15
25688at_xfail=no
25689      test -f $XFAILFILE && at_xfail=yes
25690(
25691  $as_echo "111. $at_setup_line: testing $at_desc ..."
25692  $at_traceon
25693
25694
25695
25696
25697
25698  { set +x
25699$as_echo "$at_srcdir/label05.at:27:
25700mkdir gnu
25701(cd gnu
25702TEST_TAR_FORMAT=gnu
25703export TEST_TAR_FORMAT
25704TAR_OPTIONS=\"-H gnu\"
25705export TAR_OPTIONS
25706rm -rf *
25707
25708exec <&-
25709genfile --file file
25710decho \"# Create volume\"
25711tar -c -f archive file
25712decho \"# Update: wrong label\"
25713tar -rf archive --label='My volume' file; echo \$?
25714decho \"# Update: right label\"
25715tar -rf archive file
25716)"
25717at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
25718( $at_check_trace;
25719mkdir gnu
25720(cd gnu
25721TEST_TAR_FORMAT=gnu
25722export TEST_TAR_FORMAT
25723TAR_OPTIONS="-H gnu"
25724export TAR_OPTIONS
25725rm -rf *
25726
25727exec <&-
25728genfile --file file
25729decho "# Create volume"
25730tar -c -f archive file
25731decho "# Update: wrong label"
25732tar -rf archive --label='My volume' file; echo $?
25733decho "# Update: right label"
25734tar -rf archive file
25735)
25736) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25737at_status=$? at_failed=false
25738$at_check_filter
25739echo >>"$at_stderr"; $as_echo "# Create volume
25740# Update: wrong label
25741tar: Archive not labeled to match 'My volume'
25742tar: Error is not recoverable: exiting now
25743# Update: right label
25744" | \
25745  $at_diff - "$at_stderr" || at_failed=:
25746echo >>"$at_stdout"; $as_echo "# Create volume
25747# Update: wrong label
257482
25749# Update: right label
25750" | \
25751  $at_diff - "$at_stdout" || at_failed=:
25752at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
25753$at_failed && at_fn_log_failure
25754$at_traceon; }
25755
25756              { set +x
25757$as_echo "$at_srcdir/label05.at:27:
25758mkdir oldgnu
25759(cd oldgnu
25760TEST_TAR_FORMAT=oldgnu
25761export TEST_TAR_FORMAT
25762TAR_OPTIONS=\"-H oldgnu\"
25763export TAR_OPTIONS
25764rm -rf *
25765
25766exec <&-
25767genfile --file file
25768decho \"# Create volume\"
25769tar -c -f archive file
25770decho \"# Update: wrong label\"
25771tar -rf archive --label='My volume' file; echo \$?
25772decho \"# Update: right label\"
25773tar -rf archive file
25774)"
25775at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
25776( $at_check_trace;
25777mkdir oldgnu
25778(cd oldgnu
25779TEST_TAR_FORMAT=oldgnu
25780export TEST_TAR_FORMAT
25781TAR_OPTIONS="-H oldgnu"
25782export TAR_OPTIONS
25783rm -rf *
25784
25785exec <&-
25786genfile --file file
25787decho "# Create volume"
25788tar -c -f archive file
25789decho "# Update: wrong label"
25790tar -rf archive --label='My volume' file; echo $?
25791decho "# Update: right label"
25792tar -rf archive file
25793)
25794) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25795at_status=$? at_failed=false
25796$at_check_filter
25797echo >>"$at_stderr"; $as_echo "# Create volume
25798# Update: wrong label
25799tar: Archive not labeled to match 'My volume'
25800tar: Error is not recoverable: exiting now
25801# Update: right label
25802" | \
25803  $at_diff - "$at_stderr" || at_failed=:
25804echo >>"$at_stdout"; $as_echo "# Create volume
25805# Update: wrong label
258062
25807# Update: right label
25808" | \
25809  $at_diff - "$at_stdout" || at_failed=:
25810at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
25811$at_failed && at_fn_log_failure
25812$at_traceon; }
25813
25814              { set +x
25815$as_echo "$at_srcdir/label05.at:27:
25816mkdir posix
25817(cd posix
25818TEST_TAR_FORMAT=posix
25819export TEST_TAR_FORMAT
25820TAR_OPTIONS=\"-H posix\"
25821export TAR_OPTIONS
25822rm -rf *
25823
25824exec <&-
25825genfile --file file
25826decho \"# Create volume\"
25827tar -c -f archive file
25828decho \"# Update: wrong label\"
25829tar -rf archive --label='My volume' file; echo \$?
25830decho \"# Update: right label\"
25831tar -rf archive file
25832)"
25833at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
25834( $at_check_trace;
25835mkdir posix
25836(cd posix
25837TEST_TAR_FORMAT=posix
25838export TEST_TAR_FORMAT
25839TAR_OPTIONS="-H posix"
25840export TAR_OPTIONS
25841rm -rf *
25842
25843exec <&-
25844genfile --file file
25845decho "# Create volume"
25846tar -c -f archive file
25847decho "# Update: wrong label"
25848tar -rf archive --label='My volume' file; echo $?
25849decho "# Update: right label"
25850tar -rf archive file
25851)
25852) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25853at_status=$? at_failed=false
25854$at_check_filter
25855echo >>"$at_stderr"; $as_echo "# Create volume
25856# Update: wrong label
25857tar: Archive not labeled to match 'My volume'
25858tar: Error is not recoverable: exiting now
25859# Update: right label
25860" | \
25861  $at_diff - "$at_stderr" || at_failed=:
25862echo >>"$at_stdout"; $as_echo "# Create volume
25863# Update: wrong label
258642
25865# Update: right label
25866" | \
25867  $at_diff - "$at_stdout" || at_failed=:
25868at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
25869$at_failed && at_fn_log_failure
25870$at_traceon; }
25871
25872
25873
25874
25875  set +x
25876  $at_times_p && times >"$at_times_file"
25877) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25878read at_status <"$at_status_file"
25879#AT_STOP_111
25880#AT_START_112
25881at_fn_group_banner 112 'incremental.at:23' \
25882  "incremental" "                                    " 16
25883at_xfail=no
25884      test -f $XFAILFILE && at_xfail=yes
25885(
25886  $as_echo "112. $at_setup_line: testing $at_desc ..."
25887  $at_traceon
25888
25889
25890
25891
25892
25893  { set +x
25894$as_echo "$at_srcdir/incremental.at:26:
25895mkdir gnu
25896(cd gnu
25897TEST_TAR_FORMAT=gnu
25898export TEST_TAR_FORMAT
25899TAR_OPTIONS=\"-H gnu\"
25900export TAR_OPTIONS
25901rm -rf *
25902
25903ckmtime || exit 77
25904
25905mkdir structure
25906echo x >structure/file
25907
25908# On Nextstep (and perhaps other 4.3BSD systems),
25909# a newly created file's ctime isn't updated
25910# until the next sync or stat operation on the file.
25911ls -l structure/file >/dev/null
25912
25913# If the time of an initial backup and the creation time of a file contained
25914# in that backup are the same, the file will be backed up again when an
25915# incremental backup is done, because the incremental backup backs up
25916# files created \"on or after\" the initial backup time.  Without the sleep
25917# command, behaviour of tar becomes variable, depending whether the system
25918# clock ticked over to the next second between creating the file and
25919# backing it up.
25920sleep 1
25921
25922tar cf archive --listed=list structure
25923tar cfv archive --listed=list structure
25924echo separator
25925# ReiserFS often offsets the timestamps of newly created files
25926# 1 second to the past.  Try to compensate for it, until a better
25927# solution is found.
25928sleep 2
25929echo y >structure/file
25930tar cfv archive --listed=list structure
25931)"
25932at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
25933( $at_check_trace;
25934mkdir gnu
25935(cd gnu
25936TEST_TAR_FORMAT=gnu
25937export TEST_TAR_FORMAT
25938TAR_OPTIONS="-H gnu"
25939export TAR_OPTIONS
25940rm -rf *
25941
25942ckmtime || exit 77
25943
25944mkdir structure
25945echo x >structure/file
25946
25947# On Nextstep (and perhaps other 4.3BSD systems),
25948# a newly created file's ctime isn't updated
25949# until the next sync or stat operation on the file.
25950ls -l structure/file >/dev/null
25951
25952# If the time of an initial backup and the creation time of a file contained
25953# in that backup are the same, the file will be backed up again when an
25954# incremental backup is done, because the incremental backup backs up
25955# files created "on or after" the initial backup time.  Without the sleep
25956# command, behaviour of tar becomes variable, depending whether the system
25957# clock ticked over to the next second between creating the file and
25958# backing it up.
25959sleep 1
25960
25961tar cf archive --listed=list structure
25962tar cfv archive --listed=list structure
25963echo separator
25964# ReiserFS often offsets the timestamps of newly created files
25965# 1 second to the past.  Try to compensate for it, until a better
25966# solution is found.
25967sleep 2
25968echo y >structure/file
25969tar cfv archive --listed=list structure
25970)
25971) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25972at_status=$? at_failed=false
25973$at_check_filter
25974at_fn_diff_devnull "$at_stderr" || at_failed=:
25975echo >>"$at_stdout"; $as_echo "structure/
25976separator
25977structure/
25978structure/file
25979" | \
25980  $at_diff - "$at_stdout" || at_failed=:
25981at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
25982$at_failed && at_fn_log_failure
25983$at_traceon; }
25984
25985              { set +x
25986$as_echo "$at_srcdir/incremental.at:26:
25987mkdir oldgnu
25988(cd oldgnu
25989TEST_TAR_FORMAT=oldgnu
25990export TEST_TAR_FORMAT
25991TAR_OPTIONS=\"-H oldgnu\"
25992export TAR_OPTIONS
25993rm -rf *
25994
25995ckmtime || exit 77
25996
25997mkdir structure
25998echo x >structure/file
25999
26000# On Nextstep (and perhaps other 4.3BSD systems),
26001# a newly created file's ctime isn't updated
26002# until the next sync or stat operation on the file.
26003ls -l structure/file >/dev/null
26004
26005# If the time of an initial backup and the creation time of a file contained
26006# in that backup are the same, the file will be backed up again when an
26007# incremental backup is done, because the incremental backup backs up
26008# files created \"on or after\" the initial backup time.  Without the sleep
26009# command, behaviour of tar becomes variable, depending whether the system
26010# clock ticked over to the next second between creating the file and
26011# backing it up.
26012sleep 1
26013
26014tar cf archive --listed=list structure
26015tar cfv archive --listed=list structure
26016echo separator
26017# ReiserFS often offsets the timestamps of newly created files
26018# 1 second to the past.  Try to compensate for it, until a better
26019# solution is found.
26020sleep 2
26021echo y >structure/file
26022tar cfv archive --listed=list structure
26023)"
26024at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
26025( $at_check_trace;
26026mkdir oldgnu
26027(cd oldgnu
26028TEST_TAR_FORMAT=oldgnu
26029export TEST_TAR_FORMAT
26030TAR_OPTIONS="-H oldgnu"
26031export TAR_OPTIONS
26032rm -rf *
26033
26034ckmtime || exit 77
26035
26036mkdir structure
26037echo x >structure/file
26038
26039# On Nextstep (and perhaps other 4.3BSD systems),
26040# a newly created file's ctime isn't updated
26041# until the next sync or stat operation on the file.
26042ls -l structure/file >/dev/null
26043
26044# If the time of an initial backup and the creation time of a file contained
26045# in that backup are the same, the file will be backed up again when an
26046# incremental backup is done, because the incremental backup backs up
26047# files created "on or after" the initial backup time.  Without the sleep
26048# command, behaviour of tar becomes variable, depending whether the system
26049# clock ticked over to the next second between creating the file and
26050# backing it up.
26051sleep 1
26052
26053tar cf archive --listed=list structure
26054tar cfv archive --listed=list structure
26055echo separator
26056# ReiserFS often offsets the timestamps of newly created files
26057# 1 second to the past.  Try to compensate for it, until a better
26058# solution is found.
26059sleep 2
26060echo y >structure/file
26061tar cfv archive --listed=list structure
26062)
26063) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26064at_status=$? at_failed=false
26065$at_check_filter
26066at_fn_diff_devnull "$at_stderr" || at_failed=:
26067echo >>"$at_stdout"; $as_echo "structure/
26068separator
26069structure/
26070structure/file
26071" | \
26072  $at_diff - "$at_stdout" || at_failed=:
26073at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
26074$at_failed && at_fn_log_failure
26075$at_traceon; }
26076
26077              { set +x
26078$as_echo "$at_srcdir/incremental.at:26:
26079mkdir posix
26080(cd posix
26081TEST_TAR_FORMAT=posix
26082export TEST_TAR_FORMAT
26083TAR_OPTIONS=\"-H posix\"
26084export TAR_OPTIONS
26085rm -rf *
26086
26087ckmtime || exit 77
26088
26089mkdir structure
26090echo x >structure/file
26091
26092# On Nextstep (and perhaps other 4.3BSD systems),
26093# a newly created file's ctime isn't updated
26094# until the next sync or stat operation on the file.
26095ls -l structure/file >/dev/null
26096
26097# If the time of an initial backup and the creation time of a file contained
26098# in that backup are the same, the file will be backed up again when an
26099# incremental backup is done, because the incremental backup backs up
26100# files created \"on or after\" the initial backup time.  Without the sleep
26101# command, behaviour of tar becomes variable, depending whether the system
26102# clock ticked over to the next second between creating the file and
26103# backing it up.
26104sleep 1
26105
26106tar cf archive --listed=list structure
26107tar cfv archive --listed=list structure
26108echo separator
26109# ReiserFS often offsets the timestamps of newly created files
26110# 1 second to the past.  Try to compensate for it, until a better
26111# solution is found.
26112sleep 2
26113echo y >structure/file
26114tar cfv archive --listed=list structure
26115)"
26116at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
26117( $at_check_trace;
26118mkdir posix
26119(cd posix
26120TEST_TAR_FORMAT=posix
26121export TEST_TAR_FORMAT
26122TAR_OPTIONS="-H posix"
26123export TAR_OPTIONS
26124rm -rf *
26125
26126ckmtime || exit 77
26127
26128mkdir structure
26129echo x >structure/file
26130
26131# On Nextstep (and perhaps other 4.3BSD systems),
26132# a newly created file's ctime isn't updated
26133# until the next sync or stat operation on the file.
26134ls -l structure/file >/dev/null
26135
26136# If the time of an initial backup and the creation time of a file contained
26137# in that backup are the same, the file will be backed up again when an
26138# incremental backup is done, because the incremental backup backs up
26139# files created "on or after" the initial backup time.  Without the sleep
26140# command, behaviour of tar becomes variable, depending whether the system
26141# clock ticked over to the next second between creating the file and
26142# backing it up.
26143sleep 1
26144
26145tar cf archive --listed=list structure
26146tar cfv archive --listed=list structure
26147echo separator
26148# ReiserFS often offsets the timestamps of newly created files
26149# 1 second to the past.  Try to compensate for it, until a better
26150# solution is found.
26151sleep 2
26152echo y >structure/file
26153tar cfv archive --listed=list structure
26154)
26155) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26156at_status=$? at_failed=false
26157$at_check_filter
26158at_fn_diff_devnull "$at_stderr" || at_failed=:
26159echo >>"$at_stdout"; $as_echo "structure/
26160separator
26161structure/
26162structure/file
26163" | \
26164  $at_diff - "$at_stdout" || at_failed=:
26165at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
26166$at_failed && at_fn_log_failure
26167$at_traceon; }
26168
26169
26170
26171
26172  set +x
26173  $at_times_p && times >"$at_times_file"
26174) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26175read at_status <"$at_status_file"
26176#AT_STOP_112
26177#AT_START_113
26178at_fn_group_banner 113 'incr01.at:27' \
26179  "restore broken symlinks from incremental" "       " 16
26180at_xfail=no
26181      test -f $XFAILFILE && at_xfail=yes
26182(
26183  $as_echo "113. $at_setup_line: testing $at_desc ..."
26184  $at_traceon
26185
26186
26187
26188
26189
26190  { set +x
26191$as_echo "$at_srcdir/incr01.at:30:
26192mkdir gnu
26193(cd gnu
26194TEST_TAR_FORMAT=gnu
26195export TEST_TAR_FORMAT
26196TAR_OPTIONS=\"-H gnu\"
26197export TAR_OPTIONS
26198rm -rf *
26199
26200ckmtime || exit 77
26201
26202mkdir directory
26203\$as_ln_s foo directory/bar
26204
26205tar -cf archive.0 -g db directory
26206rm directory/bar
26207tar -cf archive.1 -g db directory
26208
26209mv directory orig
26210
26211tar xvfg archive.0 /dev/null --warning=no-timestamp
26212echo separator
26213tar xvfg archive.1 /dev/null --warning=no-timestamp
26214)"
26215at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
26216( $at_check_trace;
26217mkdir gnu
26218(cd gnu
26219TEST_TAR_FORMAT=gnu
26220export TEST_TAR_FORMAT
26221TAR_OPTIONS="-H gnu"
26222export TAR_OPTIONS
26223rm -rf *
26224
26225ckmtime || exit 77
26226
26227mkdir directory
26228$as_ln_s foo directory/bar
26229
26230tar -cf archive.0 -g db directory
26231rm directory/bar
26232tar -cf archive.1 -g db directory
26233
26234mv directory orig
26235
26236tar xvfg archive.0 /dev/null --warning=no-timestamp
26237echo separator
26238tar xvfg archive.1 /dev/null --warning=no-timestamp
26239)
26240) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26241at_status=$? at_failed=false
26242$at_check_filter
26243at_fn_diff_devnull "$at_stderr" || at_failed=:
26244echo >>"$at_stdout"; $as_echo "directory/
26245directory/bar
26246separator
26247directory/
26248tar: Deleting 'directory/bar'
26249" | \
26250  $at_diff - "$at_stdout" || at_failed=:
26251at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
26252$at_failed && at_fn_log_failure
26253$at_traceon; }
26254
26255              { set +x
26256$as_echo "$at_srcdir/incr01.at:30:
26257mkdir oldgnu
26258(cd oldgnu
26259TEST_TAR_FORMAT=oldgnu
26260export TEST_TAR_FORMAT
26261TAR_OPTIONS=\"-H oldgnu\"
26262export TAR_OPTIONS
26263rm -rf *
26264
26265ckmtime || exit 77
26266
26267mkdir directory
26268\$as_ln_s foo directory/bar
26269
26270tar -cf archive.0 -g db directory
26271rm directory/bar
26272tar -cf archive.1 -g db directory
26273
26274mv directory orig
26275
26276tar xvfg archive.0 /dev/null --warning=no-timestamp
26277echo separator
26278tar xvfg archive.1 /dev/null --warning=no-timestamp
26279)"
26280at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
26281( $at_check_trace;
26282mkdir oldgnu
26283(cd oldgnu
26284TEST_TAR_FORMAT=oldgnu
26285export TEST_TAR_FORMAT
26286TAR_OPTIONS="-H oldgnu"
26287export TAR_OPTIONS
26288rm -rf *
26289
26290ckmtime || exit 77
26291
26292mkdir directory
26293$as_ln_s foo directory/bar
26294
26295tar -cf archive.0 -g db directory
26296rm directory/bar
26297tar -cf archive.1 -g db directory
26298
26299mv directory orig
26300
26301tar xvfg archive.0 /dev/null --warning=no-timestamp
26302echo separator
26303tar xvfg archive.1 /dev/null --warning=no-timestamp
26304)
26305) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26306at_status=$? at_failed=false
26307$at_check_filter
26308at_fn_diff_devnull "$at_stderr" || at_failed=:
26309echo >>"$at_stdout"; $as_echo "directory/
26310directory/bar
26311separator
26312directory/
26313tar: Deleting 'directory/bar'
26314" | \
26315  $at_diff - "$at_stdout" || at_failed=:
26316at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
26317$at_failed && at_fn_log_failure
26318$at_traceon; }
26319
26320              { set +x
26321$as_echo "$at_srcdir/incr01.at:30:
26322mkdir posix
26323(cd posix
26324TEST_TAR_FORMAT=posix
26325export TEST_TAR_FORMAT
26326TAR_OPTIONS=\"-H posix\"
26327export TAR_OPTIONS
26328rm -rf *
26329
26330ckmtime || exit 77
26331
26332mkdir directory
26333\$as_ln_s foo directory/bar
26334
26335tar -cf archive.0 -g db directory
26336rm directory/bar
26337tar -cf archive.1 -g db directory
26338
26339mv directory orig
26340
26341tar xvfg archive.0 /dev/null --warning=no-timestamp
26342echo separator
26343tar xvfg archive.1 /dev/null --warning=no-timestamp
26344)"
26345at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
26346( $at_check_trace;
26347mkdir posix
26348(cd posix
26349TEST_TAR_FORMAT=posix
26350export TEST_TAR_FORMAT
26351TAR_OPTIONS="-H posix"
26352export TAR_OPTIONS
26353rm -rf *
26354
26355ckmtime || exit 77
26356
26357mkdir directory
26358$as_ln_s foo directory/bar
26359
26360tar -cf archive.0 -g db directory
26361rm directory/bar
26362tar -cf archive.1 -g db directory
26363
26364mv directory orig
26365
26366tar xvfg archive.0 /dev/null --warning=no-timestamp
26367echo separator
26368tar xvfg archive.1 /dev/null --warning=no-timestamp
26369)
26370) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26371at_status=$? at_failed=false
26372$at_check_filter
26373at_fn_diff_devnull "$at_stderr" || at_failed=:
26374echo >>"$at_stdout"; $as_echo "directory/
26375directory/bar
26376separator
26377directory/
26378tar: Deleting 'directory/bar'
26379" | \
26380  $at_diff - "$at_stdout" || at_failed=:
26381at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
26382$at_failed && at_fn_log_failure
26383$at_traceon; }
26384
26385
26386
26387
26388  set +x
26389  $at_times_p && times >"$at_times_file"
26390) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26391read at_status <"$at_status_file"
26392#AT_STOP_113
26393#AT_START_114
26394at_fn_group_banner 114 'incr02.at:32' \
26395  "restoring timestamps from incremental" "          " 16
26396at_xfail=no
26397      test -f $XFAILFILE && at_xfail=yes
26398(
26399  $as_echo "114. $at_setup_line: testing $at_desc ..."
26400  $at_traceon
26401
26402
26403
26404
26405
26406  { set +x
26407$as_echo "$at_srcdir/incr02.at:35:
26408mkdir gnu
26409(cd gnu
26410TEST_TAR_FORMAT=gnu
26411export TEST_TAR_FORMAT
26412TAR_OPTIONS=\"-H gnu\"
26413export TAR_OPTIONS
26414rm -rf *
26415
26416ckmtime || exit 77
26417# Create directory structure
26418mkdir dir
26419mkdir dir/subdir1
26420mkdir dir/subdir2
26421genfile --length 10 --file dir/subdir1/file
26422
26423# Save mtime for later comparison
26424genfile --stat=mtime dir/subdir1 > ts
26425
26426# Create an archive. Using incremental mode makes sure the
26427# archive will have a directory-first member ordering,
26428# i.e.:
26429# dir/
26430# dir/subdir1/
26431# dir/subdir2/
26432# dir/subdir1/foofile
26433#
26434# When restoring from this directory structure, 'dir/subdir2/' used to
26435# trigger apply_nonancestor_delayed_set_stat() which restored stats for
26436# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
26437# latter clobbered the directory timestamp.
26438
26439tar -cf archive -g db dir
26440
26441# Move away the directory
26442mv dir orig
26443
26444# Wait enough time for timestamps to differ in case of failure.
26445sleep 5
26446
26447# Restore the directory
26448tar -xf archive dir
26449
26450# Check the timestamp
26451genfile --stat=mtime dir/subdir1 | diff ts -
26452)"
26453at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
26454( $at_check_trace;
26455mkdir gnu
26456(cd gnu
26457TEST_TAR_FORMAT=gnu
26458export TEST_TAR_FORMAT
26459TAR_OPTIONS="-H gnu"
26460export TAR_OPTIONS
26461rm -rf *
26462
26463ckmtime || exit 77
26464# Create directory structure
26465mkdir dir
26466mkdir dir/subdir1
26467mkdir dir/subdir2
26468genfile --length 10 --file dir/subdir1/file
26469
26470# Save mtime for later comparison
26471genfile --stat=mtime dir/subdir1 > ts
26472
26473# Create an archive. Using incremental mode makes sure the
26474# archive will have a directory-first member ordering,
26475# i.e.:
26476# dir/
26477# dir/subdir1/
26478# dir/subdir2/
26479# dir/subdir1/foofile
26480#
26481# When restoring from this directory structure, 'dir/subdir2/' used to
26482# trigger apply_nonancestor_delayed_set_stat() which restored stats for
26483# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
26484# latter clobbered the directory timestamp.
26485
26486tar -cf archive -g db dir
26487
26488# Move away the directory
26489mv dir orig
26490
26491# Wait enough time for timestamps to differ in case of failure.
26492sleep 5
26493
26494# Restore the directory
26495tar -xf archive dir
26496
26497# Check the timestamp
26498genfile --stat=mtime dir/subdir1 | diff ts -
26499)
26500) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26501at_status=$? at_failed=false
26502$at_check_filter
26503at_fn_diff_devnull "$at_stderr" || at_failed=:
26504at_fn_diff_devnull "$at_stdout" || at_failed=:
26505at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
26506$at_failed && at_fn_log_failure
26507$at_traceon; }
26508
26509              { set +x
26510$as_echo "$at_srcdir/incr02.at:35:
26511mkdir oldgnu
26512(cd oldgnu
26513TEST_TAR_FORMAT=oldgnu
26514export TEST_TAR_FORMAT
26515TAR_OPTIONS=\"-H oldgnu\"
26516export TAR_OPTIONS
26517rm -rf *
26518
26519ckmtime || exit 77
26520# Create directory structure
26521mkdir dir
26522mkdir dir/subdir1
26523mkdir dir/subdir2
26524genfile --length 10 --file dir/subdir1/file
26525
26526# Save mtime for later comparison
26527genfile --stat=mtime dir/subdir1 > ts
26528
26529# Create an archive. Using incremental mode makes sure the
26530# archive will have a directory-first member ordering,
26531# i.e.:
26532# dir/
26533# dir/subdir1/
26534# dir/subdir2/
26535# dir/subdir1/foofile
26536#
26537# When restoring from this directory structure, 'dir/subdir2/' used to
26538# trigger apply_nonancestor_delayed_set_stat() which restored stats for
26539# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
26540# latter clobbered the directory timestamp.
26541
26542tar -cf archive -g db dir
26543
26544# Move away the directory
26545mv dir orig
26546
26547# Wait enough time for timestamps to differ in case of failure.
26548sleep 5
26549
26550# Restore the directory
26551tar -xf archive dir
26552
26553# Check the timestamp
26554genfile --stat=mtime dir/subdir1 | diff ts -
26555)"
26556at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
26557( $at_check_trace;
26558mkdir oldgnu
26559(cd oldgnu
26560TEST_TAR_FORMAT=oldgnu
26561export TEST_TAR_FORMAT
26562TAR_OPTIONS="-H oldgnu"
26563export TAR_OPTIONS
26564rm -rf *
26565
26566ckmtime || exit 77
26567# Create directory structure
26568mkdir dir
26569mkdir dir/subdir1
26570mkdir dir/subdir2
26571genfile --length 10 --file dir/subdir1/file
26572
26573# Save mtime for later comparison
26574genfile --stat=mtime dir/subdir1 > ts
26575
26576# Create an archive. Using incremental mode makes sure the
26577# archive will have a directory-first member ordering,
26578# i.e.:
26579# dir/
26580# dir/subdir1/
26581# dir/subdir2/
26582# dir/subdir1/foofile
26583#
26584# When restoring from this directory structure, 'dir/subdir2/' used to
26585# trigger apply_nonancestor_delayed_set_stat() which restored stats for
26586# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
26587# latter clobbered the directory timestamp.
26588
26589tar -cf archive -g db dir
26590
26591# Move away the directory
26592mv dir orig
26593
26594# Wait enough time for timestamps to differ in case of failure.
26595sleep 5
26596
26597# Restore the directory
26598tar -xf archive dir
26599
26600# Check the timestamp
26601genfile --stat=mtime dir/subdir1 | diff ts -
26602)
26603) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26604at_status=$? at_failed=false
26605$at_check_filter
26606at_fn_diff_devnull "$at_stderr" || at_failed=:
26607at_fn_diff_devnull "$at_stdout" || at_failed=:
26608at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
26609$at_failed && at_fn_log_failure
26610$at_traceon; }
26611
26612              { set +x
26613$as_echo "$at_srcdir/incr02.at:35:
26614mkdir posix
26615(cd posix
26616TEST_TAR_FORMAT=posix
26617export TEST_TAR_FORMAT
26618TAR_OPTIONS=\"-H posix\"
26619export TAR_OPTIONS
26620rm -rf *
26621
26622ckmtime || exit 77
26623# Create directory structure
26624mkdir dir
26625mkdir dir/subdir1
26626mkdir dir/subdir2
26627genfile --length 10 --file dir/subdir1/file
26628
26629# Save mtime for later comparison
26630genfile --stat=mtime dir/subdir1 > ts
26631
26632# Create an archive. Using incremental mode makes sure the
26633# archive will have a directory-first member ordering,
26634# i.e.:
26635# dir/
26636# dir/subdir1/
26637# dir/subdir2/
26638# dir/subdir1/foofile
26639#
26640# When restoring from this directory structure, 'dir/subdir2/' used to
26641# trigger apply_nonancestor_delayed_set_stat() which restored stats for
26642# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
26643# latter clobbered the directory timestamp.
26644
26645tar -cf archive -g db dir
26646
26647# Move away the directory
26648mv dir orig
26649
26650# Wait enough time for timestamps to differ in case of failure.
26651sleep 5
26652
26653# Restore the directory
26654tar -xf archive dir
26655
26656# Check the timestamp
26657genfile --stat=mtime dir/subdir1 | diff ts -
26658)"
26659at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
26660( $at_check_trace;
26661mkdir posix
26662(cd posix
26663TEST_TAR_FORMAT=posix
26664export TEST_TAR_FORMAT
26665TAR_OPTIONS="-H posix"
26666export TAR_OPTIONS
26667rm -rf *
26668
26669ckmtime || exit 77
26670# Create directory structure
26671mkdir dir
26672mkdir dir/subdir1
26673mkdir dir/subdir2
26674genfile --length 10 --file dir/subdir1/file
26675
26676# Save mtime for later comparison
26677genfile --stat=mtime dir/subdir1 > ts
26678
26679# Create an archive. Using incremental mode makes sure the
26680# archive will have a directory-first member ordering,
26681# i.e.:
26682# dir/
26683# dir/subdir1/
26684# dir/subdir2/
26685# dir/subdir1/foofile
26686#
26687# When restoring from this directory structure, 'dir/subdir2/' used to
26688# trigger apply_nonancestor_delayed_set_stat() which restored stats for
26689# 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
26690# latter clobbered the directory timestamp.
26691
26692tar -cf archive -g db dir
26693
26694# Move away the directory
26695mv dir orig
26696
26697# Wait enough time for timestamps to differ in case of failure.
26698sleep 5
26699
26700# Restore the directory
26701tar -xf archive dir
26702
26703# Check the timestamp
26704genfile --stat=mtime dir/subdir1 | diff ts -
26705)
26706) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26707at_status=$? at_failed=false
26708$at_check_filter
26709at_fn_diff_devnull "$at_stderr" || at_failed=:
26710at_fn_diff_devnull "$at_stdout" || at_failed=:
26711at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
26712$at_failed && at_fn_log_failure
26713$at_traceon; }
26714
26715
26716
26717
26718  set +x
26719  $at_times_p && times >"$at_times_file"
26720) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26721read at_status <"$at_status_file"
26722#AT_STOP_114
26723#AT_START_115
26724at_fn_group_banner 115 'listed01.at:26' \
26725  "--listed for individual files" "                  " 16
26726at_xfail=no
26727      test -f $XFAILFILE && at_xfail=yes
26728(
26729  $as_echo "115. $at_setup_line: testing $at_desc ..."
26730  $at_traceon
26731
26732
26733
26734
26735
26736  { set +x
26737$as_echo "$at_srcdir/listed01.at:29:
26738mkdir gnu
26739(cd gnu
26740TEST_TAR_FORMAT=gnu
26741export TEST_TAR_FORMAT
26742TAR_OPTIONS=\"-H gnu\"
26743export TAR_OPTIONS
26744rm -rf *
26745
26746ckmtime || exit 77
26747
26748mkdir directory
26749genfile --length 10240 --pattern zeros --file directory/file1
26750# Let the things settle
26751sleep 1
26752
26753tar --create \\
26754    --file=archive.1 \\
26755    --listed-incremental=listing \\
26756    directory/file*
26757
26758tar tf archive.1 || exit 1
26759
26760sleep 2
26761
26762genfile --length 10240 --pattern zeros --file directory/file2
26763
26764echo \"separator\"
26765cp listing listing.old
26766tar --create \\
26767    --file=archive.2 \\
26768    --listed-incremental=listing \\
26769    directory/file* || exit 1
26770
26771tar tf archive.2 || exit 1
26772)"
26773at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:29"
26774( $at_check_trace;
26775mkdir gnu
26776(cd gnu
26777TEST_TAR_FORMAT=gnu
26778export TEST_TAR_FORMAT
26779TAR_OPTIONS="-H gnu"
26780export TAR_OPTIONS
26781rm -rf *
26782
26783ckmtime || exit 77
26784
26785mkdir directory
26786genfile --length 10240 --pattern zeros --file directory/file1
26787# Let the things settle
26788sleep 1
26789
26790tar --create \
26791    --file=archive.1 \
26792    --listed-incremental=listing \
26793    directory/file*
26794
26795tar tf archive.1 || exit 1
26796
26797sleep 2
26798
26799genfile --length 10240 --pattern zeros --file directory/file2
26800
26801echo "separator"
26802cp listing listing.old
26803tar --create \
26804    --file=archive.2 \
26805    --listed-incremental=listing \
26806    directory/file* || exit 1
26807
26808tar tf archive.2 || exit 1
26809)
26810) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26811at_status=$? at_failed=false
26812$at_check_filter
26813at_fn_diff_devnull "$at_stderr" || at_failed=:
26814echo >>"$at_stdout"; $as_echo "directory/file1
26815separator
26816directory/file2
26817" | \
26818  $at_diff - "$at_stdout" || at_failed=:
26819at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:29"
26820$at_failed && at_fn_log_failure
26821$at_traceon; }
26822
26823              { set +x
26824$as_echo "$at_srcdir/listed01.at:29:
26825mkdir oldgnu
26826(cd oldgnu
26827TEST_TAR_FORMAT=oldgnu
26828export TEST_TAR_FORMAT
26829TAR_OPTIONS=\"-H oldgnu\"
26830export TAR_OPTIONS
26831rm -rf *
26832
26833ckmtime || exit 77
26834
26835mkdir directory
26836genfile --length 10240 --pattern zeros --file directory/file1
26837# Let the things settle
26838sleep 1
26839
26840tar --create \\
26841    --file=archive.1 \\
26842    --listed-incremental=listing \\
26843    directory/file*
26844
26845tar tf archive.1 || exit 1
26846
26847sleep 2
26848
26849genfile --length 10240 --pattern zeros --file directory/file2
26850
26851echo \"separator\"
26852cp listing listing.old
26853tar --create \\
26854    --file=archive.2 \\
26855    --listed-incremental=listing \\
26856    directory/file* || exit 1
26857
26858tar tf archive.2 || exit 1
26859)"
26860at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:29"
26861( $at_check_trace;
26862mkdir oldgnu
26863(cd oldgnu
26864TEST_TAR_FORMAT=oldgnu
26865export TEST_TAR_FORMAT
26866TAR_OPTIONS="-H oldgnu"
26867export TAR_OPTIONS
26868rm -rf *
26869
26870ckmtime || exit 77
26871
26872mkdir directory
26873genfile --length 10240 --pattern zeros --file directory/file1
26874# Let the things settle
26875sleep 1
26876
26877tar --create \
26878    --file=archive.1 \
26879    --listed-incremental=listing \
26880    directory/file*
26881
26882tar tf archive.1 || exit 1
26883
26884sleep 2
26885
26886genfile --length 10240 --pattern zeros --file directory/file2
26887
26888echo "separator"
26889cp listing listing.old
26890tar --create \
26891    --file=archive.2 \
26892    --listed-incremental=listing \
26893    directory/file* || exit 1
26894
26895tar tf archive.2 || exit 1
26896)
26897) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26898at_status=$? at_failed=false
26899$at_check_filter
26900at_fn_diff_devnull "$at_stderr" || at_failed=:
26901echo >>"$at_stdout"; $as_echo "directory/file1
26902separator
26903directory/file2
26904" | \
26905  $at_diff - "$at_stdout" || at_failed=:
26906at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:29"
26907$at_failed && at_fn_log_failure
26908$at_traceon; }
26909
26910
26911
26912
26913  set +x
26914  $at_times_p && times >"$at_times_file"
26915) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26916read at_status <"$at_status_file"
26917#AT_STOP_115
26918#AT_START_116
26919at_fn_group_banner 116 'listed02.at:28' \
26920  "working --listed" "                               " 16
26921at_xfail=no
26922      test -f $XFAILFILE && at_xfail=yes
26923(
26924  $as_echo "116. $at_setup_line: testing $at_desc ..."
26925  $at_traceon
26926
26927
26928
26929
26930
26931  { set +x
26932$as_echo "$at_srcdir/listed02.at:31:
26933mkdir gnu
26934(cd gnu
26935TEST_TAR_FORMAT=gnu
26936export TEST_TAR_FORMAT
26937TAR_OPTIONS=\"-H gnu\"
26938export TAR_OPTIONS
26939rm -rf *
26940
26941ckmtime || exit 77
26942
26943test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
26944
26945echo Create directories
26946
26947mkdir tart
26948sleep 1
26949mkdir tart/c0
26950sleep 1
26951mkdir tart/c1
26952sleep 1
26953
26954for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
26955do
26956  echo File \$file > \$file
26957  sleep 1
26958done
26959
26960sleep 1
26961echo Creating main archive
26962echo >&2 \"Creating main archive\"
26963tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
26964
26965# The above prints two lines to stderr announcing the new directories c0 and c1.
26966# Ensure that they appear in this script's stderr in sorted order.
26967sort err 1>&2; rm -f err
26968
26969sleep 1
26970echo Modifying filesystem
26971rm tart/a1
26972
26973mv tart/b1 tart/b2
26974mv tart/c1 tart/c2
26975touch tart/c2/ca3
26976
26977echo Directory contents
26978find tart -print | sort 2>/dev/null
26979
26980sleep 1
26981echo Creating incremental archive
26982echo >&2 \"Creating incremental archive\"
26983cp -p tart.incr1 tart.incr2
26984tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
26985
26986sleep 1
26987
26988rm -rf tart/*
26989echo Extracting main archive
26990echo >&2 \"Extracting main archive\"
26991tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
26992echo Extracting incremental archive
26993# This command should produce three messages about deletion
26994# of the existing files, that may appear in any order. Piping
26995# to sort makes sure we don't depend on any particular ordering.
26996tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
26997
26998echo Final files:
26999find tart -print | sort 2>/dev/null
27000)"
27001at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:31"
27002( $at_check_trace;
27003mkdir gnu
27004(cd gnu
27005TEST_TAR_FORMAT=gnu
27006export TEST_TAR_FORMAT
27007TAR_OPTIONS="-H gnu"
27008export TAR_OPTIONS
27009rm -rf *
27010
27011ckmtime || exit 77
27012
27013test -z "`sort < /dev/null 2>&1`" || exit 77
27014
27015echo Create directories
27016
27017mkdir tart
27018sleep 1
27019mkdir tart/c0
27020sleep 1
27021mkdir tart/c1
27022sleep 1
27023
27024for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
27025do
27026  echo File $file > $file
27027  sleep 1
27028done
27029
27030sleep 1
27031echo Creating main archive
27032echo >&2 "Creating main archive"
27033tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
27034
27035# The above prints two lines to stderr announcing the new directories c0 and c1.
27036# Ensure that they appear in this script's stderr in sorted order.
27037sort err 1>&2; rm -f err
27038
27039sleep 1
27040echo Modifying filesystem
27041rm tart/a1
27042
27043mv tart/b1 tart/b2
27044mv tart/c1 tart/c2
27045touch tart/c2/ca3
27046
27047echo Directory contents
27048find tart -print | sort 2>/dev/null
27049
27050sleep 1
27051echo Creating incremental archive
27052echo >&2 "Creating incremental archive"
27053cp -p tart.incr1 tart.incr2
27054tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
27055
27056sleep 1
27057
27058rm -rf tart/*
27059echo Extracting main archive
27060echo >&2 "Extracting main archive"
27061tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
27062echo Extracting incremental archive
27063# This command should produce three messages about deletion
27064# of the existing files, that may appear in any order. Piping
27065# to sort makes sure we don't depend on any particular ordering.
27066tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
27067
27068echo Final files:
27069find tart -print | sort 2>/dev/null
27070)
27071) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27072at_status=$? at_failed=false
27073$at_check_filter
27074echo >>"$at_stderr"; $as_echo "Creating main archive
27075tar: tart/c0: Directory is new
27076tar: tart/c1: Directory is new
27077tar: tart: Directory is new
27078Creating incremental archive
27079tar: tart/c2: Directory has been renamed from 'tart/c1'
27080Extracting main archive
27081" | \
27082  $at_diff - "$at_stderr" || at_failed=:
27083echo >>"$at_stdout"; $as_echo "Create directories
27084Creating main archive
27085tart/
27086tart/c0/
27087tart/c1/
27088tart/a1
27089tart/b1
27090tart/c0/cq1
27091tart/c0/cq2
27092tart/c1/ca1
27093tart/c1/ca2
27094Modifying filesystem
27095Directory contents
27096tart
27097tart/b2
27098tart/c0
27099tart/c0/cq1
27100tart/c0/cq2
27101tart/c2
27102tart/c2/ca1
27103tart/c2/ca2
27104tart/c2/ca3
27105Creating incremental archive
27106tart/
27107tart/c0/
27108tart/c2/
27109tart/b2
27110tart/c2/ca3
27111Extracting main archive
27112tart/
27113tart/c0/
27114tart/c1/
27115tart/a1
27116tart/b1
27117tart/c0/cq1
27118tart/c0/cq2
27119tart/c1/ca1
27120tart/c1/ca2
27121Extracting incremental archive
27122tar: Deleting 'tart/a1'
27123tar: Deleting 'tart/b1'
27124tart/
27125tart/b2
27126tart/c0/
27127tart/c2/
27128tart/c2/ca3
27129Final files:
27130tart
27131tart/b2
27132tart/c0
27133tart/c0/cq1
27134tart/c0/cq2
27135tart/c2
27136tart/c2/ca1
27137tart/c2/ca2
27138tart/c2/ca3
27139" | \
27140  $at_diff - "$at_stdout" || at_failed=:
27141at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:31"
27142$at_failed && at_fn_log_failure
27143$at_traceon; }
27144
27145              { set +x
27146$as_echo "$at_srcdir/listed02.at:31:
27147mkdir oldgnu
27148(cd oldgnu
27149TEST_TAR_FORMAT=oldgnu
27150export TEST_TAR_FORMAT
27151TAR_OPTIONS=\"-H oldgnu\"
27152export TAR_OPTIONS
27153rm -rf *
27154
27155ckmtime || exit 77
27156
27157test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27158
27159echo Create directories
27160
27161mkdir tart
27162sleep 1
27163mkdir tart/c0
27164sleep 1
27165mkdir tart/c1
27166sleep 1
27167
27168for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
27169do
27170  echo File \$file > \$file
27171  sleep 1
27172done
27173
27174sleep 1
27175echo Creating main archive
27176echo >&2 \"Creating main archive\"
27177tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
27178
27179# The above prints two lines to stderr announcing the new directories c0 and c1.
27180# Ensure that they appear in this script's stderr in sorted order.
27181sort err 1>&2; rm -f err
27182
27183sleep 1
27184echo Modifying filesystem
27185rm tart/a1
27186
27187mv tart/b1 tart/b2
27188mv tart/c1 tart/c2
27189touch tart/c2/ca3
27190
27191echo Directory contents
27192find tart -print | sort 2>/dev/null
27193
27194sleep 1
27195echo Creating incremental archive
27196echo >&2 \"Creating incremental archive\"
27197cp -p tart.incr1 tart.incr2
27198tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
27199
27200sleep 1
27201
27202rm -rf tart/*
27203echo Extracting main archive
27204echo >&2 \"Extracting main archive\"
27205tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
27206echo Extracting incremental archive
27207# This command should produce three messages about deletion
27208# of the existing files, that may appear in any order. Piping
27209# to sort makes sure we don't depend on any particular ordering.
27210tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
27211
27212echo Final files:
27213find tart -print | sort 2>/dev/null
27214)"
27215at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:31"
27216( $at_check_trace;
27217mkdir oldgnu
27218(cd oldgnu
27219TEST_TAR_FORMAT=oldgnu
27220export TEST_TAR_FORMAT
27221TAR_OPTIONS="-H oldgnu"
27222export TAR_OPTIONS
27223rm -rf *
27224
27225ckmtime || exit 77
27226
27227test -z "`sort < /dev/null 2>&1`" || exit 77
27228
27229echo Create directories
27230
27231mkdir tart
27232sleep 1
27233mkdir tart/c0
27234sleep 1
27235mkdir tart/c1
27236sleep 1
27237
27238for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
27239do
27240  echo File $file > $file
27241  sleep 1
27242done
27243
27244sleep 1
27245echo Creating main archive
27246echo >&2 "Creating main archive"
27247tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
27248
27249# The above prints two lines to stderr announcing the new directories c0 and c1.
27250# Ensure that they appear in this script's stderr in sorted order.
27251sort err 1>&2; rm -f err
27252
27253sleep 1
27254echo Modifying filesystem
27255rm tart/a1
27256
27257mv tart/b1 tart/b2
27258mv tart/c1 tart/c2
27259touch tart/c2/ca3
27260
27261echo Directory contents
27262find tart -print | sort 2>/dev/null
27263
27264sleep 1
27265echo Creating incremental archive
27266echo >&2 "Creating incremental archive"
27267cp -p tart.incr1 tart.incr2
27268tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
27269
27270sleep 1
27271
27272rm -rf tart/*
27273echo Extracting main archive
27274echo >&2 "Extracting main archive"
27275tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
27276echo Extracting incremental archive
27277# This command should produce three messages about deletion
27278# of the existing files, that may appear in any order. Piping
27279# to sort makes sure we don't depend on any particular ordering.
27280tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
27281
27282echo Final files:
27283find tart -print | sort 2>/dev/null
27284)
27285) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27286at_status=$? at_failed=false
27287$at_check_filter
27288echo >>"$at_stderr"; $as_echo "Creating main archive
27289tar: tart/c0: Directory is new
27290tar: tart/c1: Directory is new
27291tar: tart: Directory is new
27292Creating incremental archive
27293tar: tart/c2: Directory has been renamed from 'tart/c1'
27294Extracting main archive
27295" | \
27296  $at_diff - "$at_stderr" || at_failed=:
27297echo >>"$at_stdout"; $as_echo "Create directories
27298Creating main archive
27299tart/
27300tart/c0/
27301tart/c1/
27302tart/a1
27303tart/b1
27304tart/c0/cq1
27305tart/c0/cq2
27306tart/c1/ca1
27307tart/c1/ca2
27308Modifying filesystem
27309Directory contents
27310tart
27311tart/b2
27312tart/c0
27313tart/c0/cq1
27314tart/c0/cq2
27315tart/c2
27316tart/c2/ca1
27317tart/c2/ca2
27318tart/c2/ca3
27319Creating incremental archive
27320tart/
27321tart/c0/
27322tart/c2/
27323tart/b2
27324tart/c2/ca3
27325Extracting main archive
27326tart/
27327tart/c0/
27328tart/c1/
27329tart/a1
27330tart/b1
27331tart/c0/cq1
27332tart/c0/cq2
27333tart/c1/ca1
27334tart/c1/ca2
27335Extracting incremental archive
27336tar: Deleting 'tart/a1'
27337tar: Deleting 'tart/b1'
27338tart/
27339tart/b2
27340tart/c0/
27341tart/c2/
27342tart/c2/ca3
27343Final files:
27344tart
27345tart/b2
27346tart/c0
27347tart/c0/cq1
27348tart/c0/cq2
27349tart/c2
27350tart/c2/ca1
27351tart/c2/ca2
27352tart/c2/ca3
27353" | \
27354  $at_diff - "$at_stdout" || at_failed=:
27355at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:31"
27356$at_failed && at_fn_log_failure
27357$at_traceon; }
27358
27359
27360
27361
27362  set +x
27363  $at_times_p && times >"$at_times_file"
27364) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27365read at_status <"$at_status_file"
27366#AT_STOP_116
27367#AT_START_117
27368at_fn_group_banner 117 'listed03.at:24' \
27369  "incremental dump when the parent directory is unreadable" "" 16
27370at_xfail=no
27371      test -f $XFAILFILE && at_xfail=yes
27372(
27373  $as_echo "117. $at_setup_line: testing $at_desc ..."
27374  $at_traceon
27375
27376
27377
27378
27379
27380  { set +x
27381$as_echo "$at_srcdir/listed03.at:27:
27382mkdir gnu
27383(cd gnu
27384TEST_TAR_FORMAT=gnu
27385export TEST_TAR_FORMAT
27386TAR_OPTIONS=\"-H gnu\"
27387export TAR_OPTIONS
27388rm -rf *
27389
27390ckmtime || exit 77
27391
27392echo \"test\" > \$\$
27393chmod 0 \$\$
27394cat \$\$ > /dev/null 2>&1
27395result=\$?
27396rm -f \$\$
27397test \$result -eq 0 && exit 77
27398
27399
27400mkdir dir
27401mkdir dir/sub
27402mkdir dir/sub/a
27403genfile --file dir/sub/a/file
27404cd dir/sub
27405
27406chmod a-r ..
27407tar -c -f archive.tar --listed-incremental=db.1 -v a 2>err
27408status=\$?
27409chmod a+r ..
27410if test \$status -eq 2; then
27411  grep '^tar: \\.: Cannot getcwd' err >/dev/null 2>&1 && exit 77
27412fi
27413cat err >&2
27414exit \$status
27415)"
27416at_fn_check_prepare_notrace 'an embedded newline' "listed03.at:27"
27417( $at_check_trace;
27418mkdir gnu
27419(cd gnu
27420TEST_TAR_FORMAT=gnu
27421export TEST_TAR_FORMAT
27422TAR_OPTIONS="-H gnu"
27423export TAR_OPTIONS
27424rm -rf *
27425
27426ckmtime || exit 77
27427
27428echo "test" > $$
27429chmod 0 $$
27430cat $$ > /dev/null 2>&1
27431result=$?
27432rm -f $$
27433test $result -eq 0 && exit 77
27434
27435
27436mkdir dir
27437mkdir dir/sub
27438mkdir dir/sub/a
27439genfile --file dir/sub/a/file
27440cd dir/sub
27441
27442chmod a-r ..
27443tar -c -f archive.tar --listed-incremental=db.1 -v a 2>err
27444status=$?
27445chmod a+r ..
27446if test $status -eq 2; then
27447  grep '^tar: \.: Cannot getcwd' err >/dev/null 2>&1 && exit 77
27448fi
27449cat err >&2
27450exit $status
27451)
27452) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27453at_status=$? at_failed=false
27454$at_check_filter
27455echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
27456" | \
27457  $at_diff - "$at_stderr" || at_failed=:
27458echo >>"$at_stdout"; $as_echo "a/
27459a/file
27460" | \
27461  $at_diff - "$at_stdout" || at_failed=:
27462at_fn_check_status 0 $at_status "$at_srcdir/listed03.at:27"
27463$at_failed && at_fn_log_failure
27464$at_traceon; }
27465
27466
27467
27468
27469  set +x
27470  $at_times_p && times >"$at_times_file"
27471) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27472read at_status <"$at_status_file"
27473#AT_STOP_117
27474#AT_START_118
27475at_fn_group_banner 118 'listed04.at:26' \
27476  "--listed-incremental and --one-file-system" "     " 16
27477at_xfail=no
27478      test -f $XFAILFILE && at_xfail=yes
27479(
27480  $as_echo "118. $at_setup_line: testing $at_desc ..."
27481  $at_traceon
27482
27483
27484
27485
27486
27487  { set +x
27488$as_echo "$at_srcdir/listed04.at:29:
27489mkdir gnu
27490(cd gnu
27491TEST_TAR_FORMAT=gnu
27492export TEST_TAR_FORMAT
27493TAR_OPTIONS=\"-H gnu\"
27494export TAR_OPTIONS
27495rm -rf *
27496
27497ckmtime || exit 77
27498mkdir dir
27499echo a >dir/a
27500echo b >dir/b
27501
27502tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
27503tar -tf archive.tar || exit
27504)"
27505at_fn_check_prepare_notrace 'an embedded newline' "listed04.at:29"
27506( $at_check_trace;
27507mkdir gnu
27508(cd gnu
27509TEST_TAR_FORMAT=gnu
27510export TEST_TAR_FORMAT
27511TAR_OPTIONS="-H gnu"
27512export TAR_OPTIONS
27513rm -rf *
27514
27515ckmtime || exit 77
27516mkdir dir
27517echo a >dir/a
27518echo b >dir/b
27519
27520tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
27521tar -tf archive.tar || exit
27522)
27523) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27524at_status=$? at_failed=false
27525$at_check_filter
27526echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
27527" | \
27528  $at_diff - "$at_stderr" || at_failed=:
27529echo >>"$at_stdout"; $as_echo "dir/
27530dir/a
27531dir/b
27532dir/
27533dir/a
27534dir/b
27535" | \
27536  $at_diff - "$at_stdout" || at_failed=:
27537at_fn_check_status 0 $at_status "$at_srcdir/listed04.at:29"
27538$at_failed && at_fn_log_failure
27539$at_traceon; }
27540
27541
27542
27543
27544  set +x
27545  $at_times_p && times >"$at_times_file"
27546) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27547read at_status <"$at_status_file"
27548#AT_STOP_118
27549#AT_START_119
27550at_fn_group_banner 119 'listed05.at:33' \
27551  "--listed-incremental and remounted directories" " " 16
27552at_xfail=no
27553      test -f $XFAILFILE && at_xfail=yes
27554(
27555  $as_echo "119. $at_setup_line: testing $at_desc ..."
27556  $at_traceon
27557
27558
27559
27560
27561
27562  { set +x
27563$as_echo "$at_srcdir/listed05.at:36:
27564mkdir gnu
27565(cd gnu
27566TEST_TAR_FORMAT=gnu
27567export TEST_TAR_FORMAT
27568TAR_OPTIONS=\"-H gnu\"
27569export TAR_OPTIONS
27570rm -rf *
27571
27572ckmtime || exit 77
27573
27574echo \"test\" > \$\$
27575chmod 0 \$\$
27576cat \$\$ > /dev/null 2>&1
27577result=\$?
27578rm -f \$\$
27579test \$result -eq 0 || exit 77
27580
27581options=\"-C tartest --create --one-file-system --verbose\"
27582rm -rf archive-01.snar archive-01.tar tartest subdir
27583
27584# Create initial structure
27585mkdir tartest
27586echo \"hi\" > tartest/top-level-file
27587mkdir tartest/subdir
27588echo \"hi\" > tartest/subdir/subdir-file
27589
27590echo \"# Level 0\"
27591tar \$options --file archive-0.tar --listed-incremental=archive-0.snar .
27592
27593echo \"# Remount\"
27594mv tartest/subdir .
27595mkdir tartest/subdir
27596mount -t ramfs none tartest/subdir || exit 77
27597tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
27598
27599echo \"# Level 1\"
27600cp archive-0.snar archive-1.snar
27601tar \$options --file archive-1.tar --listed-incremental=archive-1.snar .
27602
27603umount tartest/subdir
27604)"
27605at_fn_check_prepare_notrace 'an embedded newline' "listed05.at:36"
27606( $at_check_trace;
27607mkdir gnu
27608(cd gnu
27609TEST_TAR_FORMAT=gnu
27610export TEST_TAR_FORMAT
27611TAR_OPTIONS="-H gnu"
27612export TAR_OPTIONS
27613rm -rf *
27614
27615ckmtime || exit 77
27616
27617echo "test" > $$
27618chmod 0 $$
27619cat $$ > /dev/null 2>&1
27620result=$?
27621rm -f $$
27622test $result -eq 0 || exit 77
27623
27624options="-C tartest --create --one-file-system --verbose"
27625rm -rf archive-01.snar archive-01.tar tartest subdir
27626
27627# Create initial structure
27628mkdir tartest
27629echo "hi" > tartest/top-level-file
27630mkdir tartest/subdir
27631echo "hi" > tartest/subdir/subdir-file
27632
27633echo "# Level 0"
27634tar $options --file archive-0.tar --listed-incremental=archive-0.snar .
27635
27636echo "# Remount"
27637mv tartest/subdir .
27638mkdir tartest/subdir
27639mount -t ramfs none tartest/subdir || exit 77
27640tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
27641
27642echo "# Level 1"
27643cp archive-0.snar archive-1.snar
27644tar $options --file archive-1.tar --listed-incremental=archive-1.snar .
27645
27646umount tartest/subdir
27647)
27648) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27649at_status=$? at_failed=false
27650$at_check_filter
27651echo >>"$at_stderr"; $as_echo "tar: .: Directory is new
27652tar: ./subdir: Directory is new
27653tar: ./subdir: directory is on a different filesystem; not dumped
27654" | \
27655  $at_diff - "$at_stderr" || at_failed=:
27656echo >>"$at_stdout"; $as_echo "# Level 0
27657./
27658./subdir/
27659./top-level-file
27660./subdir/subdir-file
27661# Remount
27662# Level 1
27663./
27664./subdir/
27665" | \
27666  $at_diff - "$at_stdout" || at_failed=:
27667at_fn_check_status 0 $at_status "$at_srcdir/listed05.at:36"
27668$at_failed && at_fn_log_failure
27669$at_traceon; }
27670
27671
27672
27673
27674  set +x
27675  $at_times_p && times >"$at_times_file"
27676) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27677read at_status <"$at_status_file"
27678#AT_STOP_119
27679#AT_START_120
27680at_fn_group_banner 120 'incr03.at:28' \
27681  "renamed files in incrementals" "                  " 16
27682at_xfail=no
27683      test -f $XFAILFILE && at_xfail=yes
27684(
27685  $as_echo "120. $at_setup_line: testing $at_desc ..."
27686  $at_traceon
27687
27688
27689
27690
27691
27692  { set +x
27693$as_echo "$at_srcdir/incr03.at:31:
27694mkdir gnu
27695(cd gnu
27696TEST_TAR_FORMAT=gnu
27697export TEST_TAR_FORMAT
27698TAR_OPTIONS=\"-H gnu\"
27699export TAR_OPTIONS
27700rm -rf *
27701
27702ckmtime || exit 77
27703
27704test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27705
27706mkdir directory
27707genfile --file=directory/x
27708genfile --file=directory/y
27709
27710sleep 1
27711
27712tar -cf archive.1 -g db directory
27713
27714mv directory/x directory/z
27715cp db db.old
27716tar -cf archive.2 -g db directory
27717
27718mv directory orig
27719
27720echo Listing of archive.1
27721tar -tf archive.1 | sort
27722echo Listing of archive.2
27723tar -tf archive.2 | sort
27724
27725echo Directory after first restore
27726tar -xf archive.1 -g db --warning=no-timestamp
27727find directory | sort
27728
27729echo Directory after second restore
27730tar -xf archive.2 -g db --warning=no-timestamp
27731find directory | sort
27732)"
27733at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
27734( $at_check_trace;
27735mkdir gnu
27736(cd gnu
27737TEST_TAR_FORMAT=gnu
27738export TEST_TAR_FORMAT
27739TAR_OPTIONS="-H gnu"
27740export TAR_OPTIONS
27741rm -rf *
27742
27743ckmtime || exit 77
27744
27745test -z "`sort < /dev/null 2>&1`" || exit 77
27746
27747mkdir directory
27748genfile --file=directory/x
27749genfile --file=directory/y
27750
27751sleep 1
27752
27753tar -cf archive.1 -g db directory
27754
27755mv directory/x directory/z
27756cp db db.old
27757tar -cf archive.2 -g db directory
27758
27759mv directory orig
27760
27761echo Listing of archive.1
27762tar -tf archive.1 | sort
27763echo Listing of archive.2
27764tar -tf archive.2 | sort
27765
27766echo Directory after first restore
27767tar -xf archive.1 -g db --warning=no-timestamp
27768find directory | sort
27769
27770echo Directory after second restore
27771tar -xf archive.2 -g db --warning=no-timestamp
27772find directory | sort
27773)
27774) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27775at_status=$? at_failed=false
27776$at_check_filter
27777at_fn_diff_devnull "$at_stderr" || at_failed=:
27778echo >>"$at_stdout"; $as_echo "Listing of archive.1
27779directory/
27780directory/x
27781directory/y
27782Listing of archive.2
27783directory/
27784directory/z
27785Directory after first restore
27786directory
27787directory/x
27788directory/y
27789Directory after second restore
27790directory
27791directory/y
27792directory/z
27793" | \
27794  $at_diff - "$at_stdout" || at_failed=:
27795at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
27796$at_failed && at_fn_log_failure
27797$at_traceon; }
27798
27799              { set +x
27800$as_echo "$at_srcdir/incr03.at:31:
27801mkdir oldgnu
27802(cd oldgnu
27803TEST_TAR_FORMAT=oldgnu
27804export TEST_TAR_FORMAT
27805TAR_OPTIONS=\"-H oldgnu\"
27806export TAR_OPTIONS
27807rm -rf *
27808
27809ckmtime || exit 77
27810
27811test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27812
27813mkdir directory
27814genfile --file=directory/x
27815genfile --file=directory/y
27816
27817sleep 1
27818
27819tar -cf archive.1 -g db directory
27820
27821mv directory/x directory/z
27822cp db db.old
27823tar -cf archive.2 -g db directory
27824
27825mv directory orig
27826
27827echo Listing of archive.1
27828tar -tf archive.1 | sort
27829echo Listing of archive.2
27830tar -tf archive.2 | sort
27831
27832echo Directory after first restore
27833tar -xf archive.1 -g db --warning=no-timestamp
27834find directory | sort
27835
27836echo Directory after second restore
27837tar -xf archive.2 -g db --warning=no-timestamp
27838find directory | sort
27839)"
27840at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
27841( $at_check_trace;
27842mkdir oldgnu
27843(cd oldgnu
27844TEST_TAR_FORMAT=oldgnu
27845export TEST_TAR_FORMAT
27846TAR_OPTIONS="-H oldgnu"
27847export TAR_OPTIONS
27848rm -rf *
27849
27850ckmtime || exit 77
27851
27852test -z "`sort < /dev/null 2>&1`" || exit 77
27853
27854mkdir directory
27855genfile --file=directory/x
27856genfile --file=directory/y
27857
27858sleep 1
27859
27860tar -cf archive.1 -g db directory
27861
27862mv directory/x directory/z
27863cp db db.old
27864tar -cf archive.2 -g db directory
27865
27866mv directory orig
27867
27868echo Listing of archive.1
27869tar -tf archive.1 | sort
27870echo Listing of archive.2
27871tar -tf archive.2 | sort
27872
27873echo Directory after first restore
27874tar -xf archive.1 -g db --warning=no-timestamp
27875find directory | sort
27876
27877echo Directory after second restore
27878tar -xf archive.2 -g db --warning=no-timestamp
27879find directory | sort
27880)
27881) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27882at_status=$? at_failed=false
27883$at_check_filter
27884at_fn_diff_devnull "$at_stderr" || at_failed=:
27885echo >>"$at_stdout"; $as_echo "Listing of archive.1
27886directory/
27887directory/x
27888directory/y
27889Listing of archive.2
27890directory/
27891directory/z
27892Directory after first restore
27893directory
27894directory/x
27895directory/y
27896Directory after second restore
27897directory
27898directory/y
27899directory/z
27900" | \
27901  $at_diff - "$at_stdout" || at_failed=:
27902at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
27903$at_failed && at_fn_log_failure
27904$at_traceon; }
27905
27906              { set +x
27907$as_echo "$at_srcdir/incr03.at:31:
27908mkdir posix
27909(cd posix
27910TEST_TAR_FORMAT=posix
27911export TEST_TAR_FORMAT
27912TAR_OPTIONS=\"-H posix\"
27913export TAR_OPTIONS
27914rm -rf *
27915
27916ckmtime || exit 77
27917
27918test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27919
27920mkdir directory
27921genfile --file=directory/x
27922genfile --file=directory/y
27923
27924sleep 1
27925
27926tar -cf archive.1 -g db directory
27927
27928mv directory/x directory/z
27929cp db db.old
27930tar -cf archive.2 -g db directory
27931
27932mv directory orig
27933
27934echo Listing of archive.1
27935tar -tf archive.1 | sort
27936echo Listing of archive.2
27937tar -tf archive.2 | sort
27938
27939echo Directory after first restore
27940tar -xf archive.1 -g db --warning=no-timestamp
27941find directory | sort
27942
27943echo Directory after second restore
27944tar -xf archive.2 -g db --warning=no-timestamp
27945find directory | sort
27946)"
27947at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
27948( $at_check_trace;
27949mkdir posix
27950(cd posix
27951TEST_TAR_FORMAT=posix
27952export TEST_TAR_FORMAT
27953TAR_OPTIONS="-H posix"
27954export TAR_OPTIONS
27955rm -rf *
27956
27957ckmtime || exit 77
27958
27959test -z "`sort < /dev/null 2>&1`" || exit 77
27960
27961mkdir directory
27962genfile --file=directory/x
27963genfile --file=directory/y
27964
27965sleep 1
27966
27967tar -cf archive.1 -g db directory
27968
27969mv directory/x directory/z
27970cp db db.old
27971tar -cf archive.2 -g db directory
27972
27973mv directory orig
27974
27975echo Listing of archive.1
27976tar -tf archive.1 | sort
27977echo Listing of archive.2
27978tar -tf archive.2 | sort
27979
27980echo Directory after first restore
27981tar -xf archive.1 -g db --warning=no-timestamp
27982find directory | sort
27983
27984echo Directory after second restore
27985tar -xf archive.2 -g db --warning=no-timestamp
27986find directory | sort
27987)
27988) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27989at_status=$? at_failed=false
27990$at_check_filter
27991at_fn_diff_devnull "$at_stderr" || at_failed=:
27992echo >>"$at_stdout"; $as_echo "Listing of archive.1
27993directory/
27994directory/x
27995directory/y
27996Listing of archive.2
27997directory/
27998directory/z
27999Directory after first restore
28000directory
28001directory/x
28002directory/y
28003Directory after second restore
28004directory
28005directory/y
28006directory/z
28007" | \
28008  $at_diff - "$at_stdout" || at_failed=:
28009at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
28010$at_failed && at_fn_log_failure
28011$at_traceon; }
28012
28013
28014
28015
28016  set +x
28017  $at_times_p && times >"$at_times_file"
28018) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28019read at_status <"$at_status_file"
28020#AT_STOP_120
28021#AT_START_121
28022at_fn_group_banner 121 'incr04.at:29' \
28023  "proper icontents initialization" "                " 16
28024at_xfail=no
28025      test -f $XFAILFILE && at_xfail=yes
28026(
28027  $as_echo "121. $at_setup_line: testing $at_desc ..."
28028  $at_traceon
28029
28030
28031
28032
28033
28034
28035
28036  { set +x
28037$as_echo "$at_srcdir/incr04.at:34:
28038mkdir gnu
28039(cd gnu
28040TEST_TAR_FORMAT=gnu
28041export TEST_TAR_FORMAT
28042TAR_OPTIONS=\"-H gnu\"
28043export TAR_OPTIONS
28044rm -rf *
28045
28046ckmtime || exit 77
28047
28048install-sh -d a/b >/dev/null  || exit 77
28049awk 'BEGIN {
28050  for (i=1;i<=142;i++)
28051    printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
28052  }' < /dev/null | genfile --files-from -
28053
28054sleep 1
28055
28056echo \"Initial dump\"
28057tar cvf a0.tar -g a.sna a
28058mv a/b a/c
28059echo \"Incremental dump\"
28060tar cvf a1.tar -g a.sna a
28061)"
28062at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
28063( $at_check_trace;
28064mkdir gnu
28065(cd gnu
28066TEST_TAR_FORMAT=gnu
28067export TEST_TAR_FORMAT
28068TAR_OPTIONS="-H gnu"
28069export TAR_OPTIONS
28070rm -rf *
28071
28072ckmtime || exit 77
28073
28074install-sh -d a/b >/dev/null  || exit 77
28075awk 'BEGIN {
28076  for (i=1;i<=142;i++)
28077    printf("a/b/one_31_chars_long_file_name_%03d\n", i);
28078  }' < /dev/null | genfile --files-from -
28079
28080sleep 1
28081
28082echo "Initial dump"
28083tar cvf a0.tar -g a.sna a
28084mv a/b a/c
28085echo "Incremental dump"
28086tar cvf a1.tar -g a.sna a
28087)
28088) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28089at_status=$? at_failed=false
28090$at_check_filter
28091echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
28092tar: a/b: Directory is new
28093tar: a/c: Directory has been renamed from 'a/b'
28094" | \
28095  $at_diff - "$at_stderr" || at_failed=:
28096echo >>"$at_stdout"; $as_echo "Initial dump
28097a/
28098a/b/
28099a/b/one_31_chars_long_file_name_001
28100a/b/one_31_chars_long_file_name_002
28101a/b/one_31_chars_long_file_name_003
28102a/b/one_31_chars_long_file_name_004
28103a/b/one_31_chars_long_file_name_005
28104a/b/one_31_chars_long_file_name_006
28105a/b/one_31_chars_long_file_name_007
28106a/b/one_31_chars_long_file_name_008
28107a/b/one_31_chars_long_file_name_009
28108a/b/one_31_chars_long_file_name_010
28109a/b/one_31_chars_long_file_name_011
28110a/b/one_31_chars_long_file_name_012
28111a/b/one_31_chars_long_file_name_013
28112a/b/one_31_chars_long_file_name_014
28113a/b/one_31_chars_long_file_name_015
28114a/b/one_31_chars_long_file_name_016
28115a/b/one_31_chars_long_file_name_017
28116a/b/one_31_chars_long_file_name_018
28117a/b/one_31_chars_long_file_name_019
28118a/b/one_31_chars_long_file_name_020
28119a/b/one_31_chars_long_file_name_021
28120a/b/one_31_chars_long_file_name_022
28121a/b/one_31_chars_long_file_name_023
28122a/b/one_31_chars_long_file_name_024
28123a/b/one_31_chars_long_file_name_025
28124a/b/one_31_chars_long_file_name_026
28125a/b/one_31_chars_long_file_name_027
28126a/b/one_31_chars_long_file_name_028
28127a/b/one_31_chars_long_file_name_029
28128a/b/one_31_chars_long_file_name_030
28129a/b/one_31_chars_long_file_name_031
28130a/b/one_31_chars_long_file_name_032
28131a/b/one_31_chars_long_file_name_033
28132a/b/one_31_chars_long_file_name_034
28133a/b/one_31_chars_long_file_name_035
28134a/b/one_31_chars_long_file_name_036
28135a/b/one_31_chars_long_file_name_037
28136a/b/one_31_chars_long_file_name_038
28137a/b/one_31_chars_long_file_name_039
28138a/b/one_31_chars_long_file_name_040
28139a/b/one_31_chars_long_file_name_041
28140a/b/one_31_chars_long_file_name_042
28141a/b/one_31_chars_long_file_name_043
28142a/b/one_31_chars_long_file_name_044
28143a/b/one_31_chars_long_file_name_045
28144a/b/one_31_chars_long_file_name_046
28145a/b/one_31_chars_long_file_name_047
28146a/b/one_31_chars_long_file_name_048
28147a/b/one_31_chars_long_file_name_049
28148a/b/one_31_chars_long_file_name_050
28149a/b/one_31_chars_long_file_name_051
28150a/b/one_31_chars_long_file_name_052
28151a/b/one_31_chars_long_file_name_053
28152a/b/one_31_chars_long_file_name_054
28153a/b/one_31_chars_long_file_name_055
28154a/b/one_31_chars_long_file_name_056
28155a/b/one_31_chars_long_file_name_057
28156a/b/one_31_chars_long_file_name_058
28157a/b/one_31_chars_long_file_name_059
28158a/b/one_31_chars_long_file_name_060
28159a/b/one_31_chars_long_file_name_061
28160a/b/one_31_chars_long_file_name_062
28161a/b/one_31_chars_long_file_name_063
28162a/b/one_31_chars_long_file_name_064
28163a/b/one_31_chars_long_file_name_065
28164a/b/one_31_chars_long_file_name_066
28165a/b/one_31_chars_long_file_name_067
28166a/b/one_31_chars_long_file_name_068
28167a/b/one_31_chars_long_file_name_069
28168a/b/one_31_chars_long_file_name_070
28169a/b/one_31_chars_long_file_name_071
28170a/b/one_31_chars_long_file_name_072
28171a/b/one_31_chars_long_file_name_073
28172a/b/one_31_chars_long_file_name_074
28173a/b/one_31_chars_long_file_name_075
28174a/b/one_31_chars_long_file_name_076
28175a/b/one_31_chars_long_file_name_077
28176a/b/one_31_chars_long_file_name_078
28177a/b/one_31_chars_long_file_name_079
28178a/b/one_31_chars_long_file_name_080
28179a/b/one_31_chars_long_file_name_081
28180a/b/one_31_chars_long_file_name_082
28181a/b/one_31_chars_long_file_name_083
28182a/b/one_31_chars_long_file_name_084
28183a/b/one_31_chars_long_file_name_085
28184a/b/one_31_chars_long_file_name_086
28185a/b/one_31_chars_long_file_name_087
28186a/b/one_31_chars_long_file_name_088
28187a/b/one_31_chars_long_file_name_089
28188a/b/one_31_chars_long_file_name_090
28189a/b/one_31_chars_long_file_name_091
28190a/b/one_31_chars_long_file_name_092
28191a/b/one_31_chars_long_file_name_093
28192a/b/one_31_chars_long_file_name_094
28193a/b/one_31_chars_long_file_name_095
28194a/b/one_31_chars_long_file_name_096
28195a/b/one_31_chars_long_file_name_097
28196a/b/one_31_chars_long_file_name_098
28197a/b/one_31_chars_long_file_name_099
28198a/b/one_31_chars_long_file_name_100
28199a/b/one_31_chars_long_file_name_101
28200a/b/one_31_chars_long_file_name_102
28201a/b/one_31_chars_long_file_name_103
28202a/b/one_31_chars_long_file_name_104
28203a/b/one_31_chars_long_file_name_105
28204a/b/one_31_chars_long_file_name_106
28205a/b/one_31_chars_long_file_name_107
28206a/b/one_31_chars_long_file_name_108
28207a/b/one_31_chars_long_file_name_109
28208a/b/one_31_chars_long_file_name_110
28209a/b/one_31_chars_long_file_name_111
28210a/b/one_31_chars_long_file_name_112
28211a/b/one_31_chars_long_file_name_113
28212a/b/one_31_chars_long_file_name_114
28213a/b/one_31_chars_long_file_name_115
28214a/b/one_31_chars_long_file_name_116
28215a/b/one_31_chars_long_file_name_117
28216a/b/one_31_chars_long_file_name_118
28217a/b/one_31_chars_long_file_name_119
28218a/b/one_31_chars_long_file_name_120
28219a/b/one_31_chars_long_file_name_121
28220a/b/one_31_chars_long_file_name_122
28221a/b/one_31_chars_long_file_name_123
28222a/b/one_31_chars_long_file_name_124
28223a/b/one_31_chars_long_file_name_125
28224a/b/one_31_chars_long_file_name_126
28225a/b/one_31_chars_long_file_name_127
28226a/b/one_31_chars_long_file_name_128
28227a/b/one_31_chars_long_file_name_129
28228a/b/one_31_chars_long_file_name_130
28229a/b/one_31_chars_long_file_name_131
28230a/b/one_31_chars_long_file_name_132
28231a/b/one_31_chars_long_file_name_133
28232a/b/one_31_chars_long_file_name_134
28233a/b/one_31_chars_long_file_name_135
28234a/b/one_31_chars_long_file_name_136
28235a/b/one_31_chars_long_file_name_137
28236a/b/one_31_chars_long_file_name_138
28237a/b/one_31_chars_long_file_name_139
28238a/b/one_31_chars_long_file_name_140
28239a/b/one_31_chars_long_file_name_141
28240a/b/one_31_chars_long_file_name_142
28241Incremental dump
28242a/
28243a/c/
28244" | \
28245  $at_diff - "$at_stdout" || at_failed=:
28246at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
28247$at_failed && at_fn_log_failure
28248$at_traceon; }
28249
28250              { set +x
28251$as_echo "$at_srcdir/incr04.at:34:
28252mkdir oldgnu
28253(cd oldgnu
28254TEST_TAR_FORMAT=oldgnu
28255export TEST_TAR_FORMAT
28256TAR_OPTIONS=\"-H oldgnu\"
28257export TAR_OPTIONS
28258rm -rf *
28259
28260ckmtime || exit 77
28261
28262install-sh -d a/b >/dev/null  || exit 77
28263awk 'BEGIN {
28264  for (i=1;i<=142;i++)
28265    printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
28266  }' < /dev/null | genfile --files-from -
28267
28268sleep 1
28269
28270echo \"Initial dump\"
28271tar cvf a0.tar -g a.sna a
28272mv a/b a/c
28273echo \"Incremental dump\"
28274tar cvf a1.tar -g a.sna a
28275)"
28276at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
28277( $at_check_trace;
28278mkdir oldgnu
28279(cd oldgnu
28280TEST_TAR_FORMAT=oldgnu
28281export TEST_TAR_FORMAT
28282TAR_OPTIONS="-H oldgnu"
28283export TAR_OPTIONS
28284rm -rf *
28285
28286ckmtime || exit 77
28287
28288install-sh -d a/b >/dev/null  || exit 77
28289awk 'BEGIN {
28290  for (i=1;i<=142;i++)
28291    printf("a/b/one_31_chars_long_file_name_%03d\n", i);
28292  }' < /dev/null | genfile --files-from -
28293
28294sleep 1
28295
28296echo "Initial dump"
28297tar cvf a0.tar -g a.sna a
28298mv a/b a/c
28299echo "Incremental dump"
28300tar cvf a1.tar -g a.sna a
28301)
28302) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28303at_status=$? at_failed=false
28304$at_check_filter
28305echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
28306tar: a/b: Directory is new
28307tar: a/c: Directory has been renamed from 'a/b'
28308" | \
28309  $at_diff - "$at_stderr" || at_failed=:
28310echo >>"$at_stdout"; $as_echo "Initial dump
28311a/
28312a/b/
28313a/b/one_31_chars_long_file_name_001
28314a/b/one_31_chars_long_file_name_002
28315a/b/one_31_chars_long_file_name_003
28316a/b/one_31_chars_long_file_name_004
28317a/b/one_31_chars_long_file_name_005
28318a/b/one_31_chars_long_file_name_006
28319a/b/one_31_chars_long_file_name_007
28320a/b/one_31_chars_long_file_name_008
28321a/b/one_31_chars_long_file_name_009
28322a/b/one_31_chars_long_file_name_010
28323a/b/one_31_chars_long_file_name_011
28324a/b/one_31_chars_long_file_name_012
28325a/b/one_31_chars_long_file_name_013
28326a/b/one_31_chars_long_file_name_014
28327a/b/one_31_chars_long_file_name_015
28328a/b/one_31_chars_long_file_name_016
28329a/b/one_31_chars_long_file_name_017
28330a/b/one_31_chars_long_file_name_018
28331a/b/one_31_chars_long_file_name_019
28332a/b/one_31_chars_long_file_name_020
28333a/b/one_31_chars_long_file_name_021
28334a/b/one_31_chars_long_file_name_022
28335a/b/one_31_chars_long_file_name_023
28336a/b/one_31_chars_long_file_name_024
28337a/b/one_31_chars_long_file_name_025
28338a/b/one_31_chars_long_file_name_026
28339a/b/one_31_chars_long_file_name_027
28340a/b/one_31_chars_long_file_name_028
28341a/b/one_31_chars_long_file_name_029
28342a/b/one_31_chars_long_file_name_030
28343a/b/one_31_chars_long_file_name_031
28344a/b/one_31_chars_long_file_name_032
28345a/b/one_31_chars_long_file_name_033
28346a/b/one_31_chars_long_file_name_034
28347a/b/one_31_chars_long_file_name_035
28348a/b/one_31_chars_long_file_name_036
28349a/b/one_31_chars_long_file_name_037
28350a/b/one_31_chars_long_file_name_038
28351a/b/one_31_chars_long_file_name_039
28352a/b/one_31_chars_long_file_name_040
28353a/b/one_31_chars_long_file_name_041
28354a/b/one_31_chars_long_file_name_042
28355a/b/one_31_chars_long_file_name_043
28356a/b/one_31_chars_long_file_name_044
28357a/b/one_31_chars_long_file_name_045
28358a/b/one_31_chars_long_file_name_046
28359a/b/one_31_chars_long_file_name_047
28360a/b/one_31_chars_long_file_name_048
28361a/b/one_31_chars_long_file_name_049
28362a/b/one_31_chars_long_file_name_050
28363a/b/one_31_chars_long_file_name_051
28364a/b/one_31_chars_long_file_name_052
28365a/b/one_31_chars_long_file_name_053
28366a/b/one_31_chars_long_file_name_054
28367a/b/one_31_chars_long_file_name_055
28368a/b/one_31_chars_long_file_name_056
28369a/b/one_31_chars_long_file_name_057
28370a/b/one_31_chars_long_file_name_058
28371a/b/one_31_chars_long_file_name_059
28372a/b/one_31_chars_long_file_name_060
28373a/b/one_31_chars_long_file_name_061
28374a/b/one_31_chars_long_file_name_062
28375a/b/one_31_chars_long_file_name_063
28376a/b/one_31_chars_long_file_name_064
28377a/b/one_31_chars_long_file_name_065
28378a/b/one_31_chars_long_file_name_066
28379a/b/one_31_chars_long_file_name_067
28380a/b/one_31_chars_long_file_name_068
28381a/b/one_31_chars_long_file_name_069
28382a/b/one_31_chars_long_file_name_070
28383a/b/one_31_chars_long_file_name_071
28384a/b/one_31_chars_long_file_name_072
28385a/b/one_31_chars_long_file_name_073
28386a/b/one_31_chars_long_file_name_074
28387a/b/one_31_chars_long_file_name_075
28388a/b/one_31_chars_long_file_name_076
28389a/b/one_31_chars_long_file_name_077
28390a/b/one_31_chars_long_file_name_078
28391a/b/one_31_chars_long_file_name_079
28392a/b/one_31_chars_long_file_name_080
28393a/b/one_31_chars_long_file_name_081
28394a/b/one_31_chars_long_file_name_082
28395a/b/one_31_chars_long_file_name_083
28396a/b/one_31_chars_long_file_name_084
28397a/b/one_31_chars_long_file_name_085
28398a/b/one_31_chars_long_file_name_086
28399a/b/one_31_chars_long_file_name_087
28400a/b/one_31_chars_long_file_name_088
28401a/b/one_31_chars_long_file_name_089
28402a/b/one_31_chars_long_file_name_090
28403a/b/one_31_chars_long_file_name_091
28404a/b/one_31_chars_long_file_name_092
28405a/b/one_31_chars_long_file_name_093
28406a/b/one_31_chars_long_file_name_094
28407a/b/one_31_chars_long_file_name_095
28408a/b/one_31_chars_long_file_name_096
28409a/b/one_31_chars_long_file_name_097
28410a/b/one_31_chars_long_file_name_098
28411a/b/one_31_chars_long_file_name_099
28412a/b/one_31_chars_long_file_name_100
28413a/b/one_31_chars_long_file_name_101
28414a/b/one_31_chars_long_file_name_102
28415a/b/one_31_chars_long_file_name_103
28416a/b/one_31_chars_long_file_name_104
28417a/b/one_31_chars_long_file_name_105
28418a/b/one_31_chars_long_file_name_106
28419a/b/one_31_chars_long_file_name_107
28420a/b/one_31_chars_long_file_name_108
28421a/b/one_31_chars_long_file_name_109
28422a/b/one_31_chars_long_file_name_110
28423a/b/one_31_chars_long_file_name_111
28424a/b/one_31_chars_long_file_name_112
28425a/b/one_31_chars_long_file_name_113
28426a/b/one_31_chars_long_file_name_114
28427a/b/one_31_chars_long_file_name_115
28428a/b/one_31_chars_long_file_name_116
28429a/b/one_31_chars_long_file_name_117
28430a/b/one_31_chars_long_file_name_118
28431a/b/one_31_chars_long_file_name_119
28432a/b/one_31_chars_long_file_name_120
28433a/b/one_31_chars_long_file_name_121
28434a/b/one_31_chars_long_file_name_122
28435a/b/one_31_chars_long_file_name_123
28436a/b/one_31_chars_long_file_name_124
28437a/b/one_31_chars_long_file_name_125
28438a/b/one_31_chars_long_file_name_126
28439a/b/one_31_chars_long_file_name_127
28440a/b/one_31_chars_long_file_name_128
28441a/b/one_31_chars_long_file_name_129
28442a/b/one_31_chars_long_file_name_130
28443a/b/one_31_chars_long_file_name_131
28444a/b/one_31_chars_long_file_name_132
28445a/b/one_31_chars_long_file_name_133
28446a/b/one_31_chars_long_file_name_134
28447a/b/one_31_chars_long_file_name_135
28448a/b/one_31_chars_long_file_name_136
28449a/b/one_31_chars_long_file_name_137
28450a/b/one_31_chars_long_file_name_138
28451a/b/one_31_chars_long_file_name_139
28452a/b/one_31_chars_long_file_name_140
28453a/b/one_31_chars_long_file_name_141
28454a/b/one_31_chars_long_file_name_142
28455Incremental dump
28456a/
28457a/c/
28458" | \
28459  $at_diff - "$at_stdout" || at_failed=:
28460at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
28461$at_failed && at_fn_log_failure
28462$at_traceon; }
28463
28464              { set +x
28465$as_echo "$at_srcdir/incr04.at:34:
28466mkdir posix
28467(cd posix
28468TEST_TAR_FORMAT=posix
28469export TEST_TAR_FORMAT
28470TAR_OPTIONS=\"-H posix\"
28471export TAR_OPTIONS
28472rm -rf *
28473
28474ckmtime || exit 77
28475
28476install-sh -d a/b >/dev/null  || exit 77
28477awk 'BEGIN {
28478  for (i=1;i<=142;i++)
28479    printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
28480  }' < /dev/null | genfile --files-from -
28481
28482sleep 1
28483
28484echo \"Initial dump\"
28485tar cvf a0.tar -g a.sna a
28486mv a/b a/c
28487echo \"Incremental dump\"
28488tar cvf a1.tar -g a.sna a
28489)"
28490at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
28491( $at_check_trace;
28492mkdir posix
28493(cd posix
28494TEST_TAR_FORMAT=posix
28495export TEST_TAR_FORMAT
28496TAR_OPTIONS="-H posix"
28497export TAR_OPTIONS
28498rm -rf *
28499
28500ckmtime || exit 77
28501
28502install-sh -d a/b >/dev/null  || exit 77
28503awk 'BEGIN {
28504  for (i=1;i<=142;i++)
28505    printf("a/b/one_31_chars_long_file_name_%03d\n", i);
28506  }' < /dev/null | genfile --files-from -
28507
28508sleep 1
28509
28510echo "Initial dump"
28511tar cvf a0.tar -g a.sna a
28512mv a/b a/c
28513echo "Incremental dump"
28514tar cvf a1.tar -g a.sna a
28515)
28516) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28517at_status=$? at_failed=false
28518$at_check_filter
28519echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
28520tar: a/b: Directory is new
28521tar: a/c: Directory has been renamed from 'a/b'
28522" | \
28523  $at_diff - "$at_stderr" || at_failed=:
28524echo >>"$at_stdout"; $as_echo "Initial dump
28525a/
28526a/b/
28527a/b/one_31_chars_long_file_name_001
28528a/b/one_31_chars_long_file_name_002
28529a/b/one_31_chars_long_file_name_003
28530a/b/one_31_chars_long_file_name_004
28531a/b/one_31_chars_long_file_name_005
28532a/b/one_31_chars_long_file_name_006
28533a/b/one_31_chars_long_file_name_007
28534a/b/one_31_chars_long_file_name_008
28535a/b/one_31_chars_long_file_name_009
28536a/b/one_31_chars_long_file_name_010
28537a/b/one_31_chars_long_file_name_011
28538a/b/one_31_chars_long_file_name_012
28539a/b/one_31_chars_long_file_name_013
28540a/b/one_31_chars_long_file_name_014
28541a/b/one_31_chars_long_file_name_015
28542a/b/one_31_chars_long_file_name_016
28543a/b/one_31_chars_long_file_name_017
28544a/b/one_31_chars_long_file_name_018
28545a/b/one_31_chars_long_file_name_019
28546a/b/one_31_chars_long_file_name_020
28547a/b/one_31_chars_long_file_name_021
28548a/b/one_31_chars_long_file_name_022
28549a/b/one_31_chars_long_file_name_023
28550a/b/one_31_chars_long_file_name_024
28551a/b/one_31_chars_long_file_name_025
28552a/b/one_31_chars_long_file_name_026
28553a/b/one_31_chars_long_file_name_027
28554a/b/one_31_chars_long_file_name_028
28555a/b/one_31_chars_long_file_name_029
28556a/b/one_31_chars_long_file_name_030
28557a/b/one_31_chars_long_file_name_031
28558a/b/one_31_chars_long_file_name_032
28559a/b/one_31_chars_long_file_name_033
28560a/b/one_31_chars_long_file_name_034
28561a/b/one_31_chars_long_file_name_035
28562a/b/one_31_chars_long_file_name_036
28563a/b/one_31_chars_long_file_name_037
28564a/b/one_31_chars_long_file_name_038
28565a/b/one_31_chars_long_file_name_039
28566a/b/one_31_chars_long_file_name_040
28567a/b/one_31_chars_long_file_name_041
28568a/b/one_31_chars_long_file_name_042
28569a/b/one_31_chars_long_file_name_043
28570a/b/one_31_chars_long_file_name_044
28571a/b/one_31_chars_long_file_name_045
28572a/b/one_31_chars_long_file_name_046
28573a/b/one_31_chars_long_file_name_047
28574a/b/one_31_chars_long_file_name_048
28575a/b/one_31_chars_long_file_name_049
28576a/b/one_31_chars_long_file_name_050
28577a/b/one_31_chars_long_file_name_051
28578a/b/one_31_chars_long_file_name_052
28579a/b/one_31_chars_long_file_name_053
28580a/b/one_31_chars_long_file_name_054
28581a/b/one_31_chars_long_file_name_055
28582a/b/one_31_chars_long_file_name_056
28583a/b/one_31_chars_long_file_name_057
28584a/b/one_31_chars_long_file_name_058
28585a/b/one_31_chars_long_file_name_059
28586a/b/one_31_chars_long_file_name_060
28587a/b/one_31_chars_long_file_name_061
28588a/b/one_31_chars_long_file_name_062
28589a/b/one_31_chars_long_file_name_063
28590a/b/one_31_chars_long_file_name_064
28591a/b/one_31_chars_long_file_name_065
28592a/b/one_31_chars_long_file_name_066
28593a/b/one_31_chars_long_file_name_067
28594a/b/one_31_chars_long_file_name_068
28595a/b/one_31_chars_long_file_name_069
28596a/b/one_31_chars_long_file_name_070
28597a/b/one_31_chars_long_file_name_071
28598a/b/one_31_chars_long_file_name_072
28599a/b/one_31_chars_long_file_name_073
28600a/b/one_31_chars_long_file_name_074
28601a/b/one_31_chars_long_file_name_075
28602a/b/one_31_chars_long_file_name_076
28603a/b/one_31_chars_long_file_name_077
28604a/b/one_31_chars_long_file_name_078
28605a/b/one_31_chars_long_file_name_079
28606a/b/one_31_chars_long_file_name_080
28607a/b/one_31_chars_long_file_name_081
28608a/b/one_31_chars_long_file_name_082
28609a/b/one_31_chars_long_file_name_083
28610a/b/one_31_chars_long_file_name_084
28611a/b/one_31_chars_long_file_name_085
28612a/b/one_31_chars_long_file_name_086
28613a/b/one_31_chars_long_file_name_087
28614a/b/one_31_chars_long_file_name_088
28615a/b/one_31_chars_long_file_name_089
28616a/b/one_31_chars_long_file_name_090
28617a/b/one_31_chars_long_file_name_091
28618a/b/one_31_chars_long_file_name_092
28619a/b/one_31_chars_long_file_name_093
28620a/b/one_31_chars_long_file_name_094
28621a/b/one_31_chars_long_file_name_095
28622a/b/one_31_chars_long_file_name_096
28623a/b/one_31_chars_long_file_name_097
28624a/b/one_31_chars_long_file_name_098
28625a/b/one_31_chars_long_file_name_099
28626a/b/one_31_chars_long_file_name_100
28627a/b/one_31_chars_long_file_name_101
28628a/b/one_31_chars_long_file_name_102
28629a/b/one_31_chars_long_file_name_103
28630a/b/one_31_chars_long_file_name_104
28631a/b/one_31_chars_long_file_name_105
28632a/b/one_31_chars_long_file_name_106
28633a/b/one_31_chars_long_file_name_107
28634a/b/one_31_chars_long_file_name_108
28635a/b/one_31_chars_long_file_name_109
28636a/b/one_31_chars_long_file_name_110
28637a/b/one_31_chars_long_file_name_111
28638a/b/one_31_chars_long_file_name_112
28639a/b/one_31_chars_long_file_name_113
28640a/b/one_31_chars_long_file_name_114
28641a/b/one_31_chars_long_file_name_115
28642a/b/one_31_chars_long_file_name_116
28643a/b/one_31_chars_long_file_name_117
28644a/b/one_31_chars_long_file_name_118
28645a/b/one_31_chars_long_file_name_119
28646a/b/one_31_chars_long_file_name_120
28647a/b/one_31_chars_long_file_name_121
28648a/b/one_31_chars_long_file_name_122
28649a/b/one_31_chars_long_file_name_123
28650a/b/one_31_chars_long_file_name_124
28651a/b/one_31_chars_long_file_name_125
28652a/b/one_31_chars_long_file_name_126
28653a/b/one_31_chars_long_file_name_127
28654a/b/one_31_chars_long_file_name_128
28655a/b/one_31_chars_long_file_name_129
28656a/b/one_31_chars_long_file_name_130
28657a/b/one_31_chars_long_file_name_131
28658a/b/one_31_chars_long_file_name_132
28659a/b/one_31_chars_long_file_name_133
28660a/b/one_31_chars_long_file_name_134
28661a/b/one_31_chars_long_file_name_135
28662a/b/one_31_chars_long_file_name_136
28663a/b/one_31_chars_long_file_name_137
28664a/b/one_31_chars_long_file_name_138
28665a/b/one_31_chars_long_file_name_139
28666a/b/one_31_chars_long_file_name_140
28667a/b/one_31_chars_long_file_name_141
28668a/b/one_31_chars_long_file_name_142
28669Incremental dump
28670a/
28671a/c/
28672" | \
28673  $at_diff - "$at_stdout" || at_failed=:
28674at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
28675$at_failed && at_fn_log_failure
28676$at_traceon; }
28677
28678
28679
28680
28681
28682  set +x
28683  $at_times_p && times >"$at_times_file"
28684) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28685read at_status <"$at_status_file"
28686#AT_STOP_121
28687#AT_START_122
28688at_fn_group_banner 122 'incr05.at:21' \
28689  "incremental dumps with -C" "                      " 16
28690at_xfail=no
28691      test -f $XFAILFILE && at_xfail=yes
28692(
28693  $as_echo "122. $at_setup_line: testing $at_desc ..."
28694  $at_traceon
28695
28696
28697
28698
28699
28700  { set +x
28701$as_echo "$at_srcdir/incr05.at:24:
28702mkdir gnu
28703(cd gnu
28704TEST_TAR_FORMAT=gnu
28705export TEST_TAR_FORMAT
28706TAR_OPTIONS=\"-H gnu\"
28707export TAR_OPTIONS
28708rm -rf *
28709
28710ckmtime || exit 77
28711mkdir dir
28712mkdir dir/sub
28713genfile --file dir/file1
28714genfile --file dir/sub/file2
28715
28716echo Level 0
28717tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28718
28719genfile --file dir/file3
28720echo Level 1
28721tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28722)"
28723at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
28724( $at_check_trace;
28725mkdir gnu
28726(cd gnu
28727TEST_TAR_FORMAT=gnu
28728export TEST_TAR_FORMAT
28729TAR_OPTIONS="-H gnu"
28730export TAR_OPTIONS
28731rm -rf *
28732
28733ckmtime || exit 77
28734mkdir dir
28735mkdir dir/sub
28736genfile --file dir/file1
28737genfile --file dir/sub/file2
28738
28739echo Level 0
28740tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28741
28742genfile --file dir/file3
28743echo Level 1
28744tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28745)
28746) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28747at_status=$? at_failed=false
28748$at_check_filter
28749at_fn_diff_devnull "$at_stderr" || at_failed=:
28750echo >>"$at_stdout"; $as_echo "Level 0
28751./
28752./sub/
28753./file1
28754./sub/file2
28755Level 1
28756./
28757./sub/
28758./file3
28759" | \
28760  $at_diff - "$at_stdout" || at_failed=:
28761at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
28762$at_failed && at_fn_log_failure
28763$at_traceon; }
28764
28765              { set +x
28766$as_echo "$at_srcdir/incr05.at:24:
28767mkdir oldgnu
28768(cd oldgnu
28769TEST_TAR_FORMAT=oldgnu
28770export TEST_TAR_FORMAT
28771TAR_OPTIONS=\"-H oldgnu\"
28772export TAR_OPTIONS
28773rm -rf *
28774
28775ckmtime || exit 77
28776mkdir dir
28777mkdir dir/sub
28778genfile --file dir/file1
28779genfile --file dir/sub/file2
28780
28781echo Level 0
28782tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28783
28784genfile --file dir/file3
28785echo Level 1
28786tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28787)"
28788at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
28789( $at_check_trace;
28790mkdir oldgnu
28791(cd oldgnu
28792TEST_TAR_FORMAT=oldgnu
28793export TEST_TAR_FORMAT
28794TAR_OPTIONS="-H oldgnu"
28795export TAR_OPTIONS
28796rm -rf *
28797
28798ckmtime || exit 77
28799mkdir dir
28800mkdir dir/sub
28801genfile --file dir/file1
28802genfile --file dir/sub/file2
28803
28804echo Level 0
28805tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28806
28807genfile --file dir/file3
28808echo Level 1
28809tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28810)
28811) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28812at_status=$? at_failed=false
28813$at_check_filter
28814at_fn_diff_devnull "$at_stderr" || at_failed=:
28815echo >>"$at_stdout"; $as_echo "Level 0
28816./
28817./sub/
28818./file1
28819./sub/file2
28820Level 1
28821./
28822./sub/
28823./file3
28824" | \
28825  $at_diff - "$at_stdout" || at_failed=:
28826at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
28827$at_failed && at_fn_log_failure
28828$at_traceon; }
28829
28830              { set +x
28831$as_echo "$at_srcdir/incr05.at:24:
28832mkdir posix
28833(cd posix
28834TEST_TAR_FORMAT=posix
28835export TEST_TAR_FORMAT
28836TAR_OPTIONS=\"-H posix\"
28837export TAR_OPTIONS
28838rm -rf *
28839
28840ckmtime || exit 77
28841mkdir dir
28842mkdir dir/sub
28843genfile --file dir/file1
28844genfile --file dir/sub/file2
28845
28846echo Level 0
28847tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28848
28849genfile --file dir/file3
28850echo Level 1
28851tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28852)"
28853at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
28854( $at_check_trace;
28855mkdir posix
28856(cd posix
28857TEST_TAR_FORMAT=posix
28858export TEST_TAR_FORMAT
28859TAR_OPTIONS="-H posix"
28860export TAR_OPTIONS
28861rm -rf *
28862
28863ckmtime || exit 77
28864mkdir dir
28865mkdir dir/sub
28866genfile --file dir/file1
28867genfile --file dir/sub/file2
28868
28869echo Level 0
28870tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28871
28872genfile --file dir/file3
28873echo Level 1
28874tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
28875)
28876) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28877at_status=$? at_failed=false
28878$at_check_filter
28879at_fn_diff_devnull "$at_stderr" || at_failed=:
28880echo >>"$at_stdout"; $as_echo "Level 0
28881./
28882./sub/
28883./file1
28884./sub/file2
28885Level 1
28886./
28887./sub/
28888./file3
28889" | \
28890  $at_diff - "$at_stdout" || at_failed=:
28891at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
28892$at_failed && at_fn_log_failure
28893$at_traceon; }
28894
28895
28896
28897
28898  set +x
28899  $at_times_p && times >"$at_times_file"
28900) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28901read at_status <"$at_status_file"
28902#AT_STOP_122
28903#AT_START_123
28904at_fn_group_banner 123 'incr06.at:21' \
28905  "incremental dumps of nested directories" "        " 16
28906at_xfail=no
28907      test -f $XFAILFILE && at_xfail=yes
28908(
28909  $as_echo "123. $at_setup_line: testing $at_desc ..."
28910  $at_traceon
28911
28912
28913
28914
28915
28916  { set +x
28917$as_echo "$at_srcdir/incr06.at:24:
28918mkdir gnu
28919(cd gnu
28920TEST_TAR_FORMAT=gnu
28921export TEST_TAR_FORMAT
28922TAR_OPTIONS=\"-H gnu\"
28923export TAR_OPTIONS
28924rm -rf *
28925
28926ckmtime || exit 77
28927mkdir dir
28928mkdir dir/sub
28929mkdir dir/sub/a
28930mkdir dir/sub/b
28931genfile --file dir/file1
28932genfile --file dir/sub/file2
28933genfile --file dir/sub/a/file3
28934
28935echo Level 0 . sub
28936tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
28937echo Level 0 sub .
28938tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
28939
28940mkdir dir/c
28941genfile --file dir/sub/b/file4
28942
28943echo Level 1 . sub
28944tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
28945echo Level 1 sub .
28946tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
28947)"
28948at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
28949( $at_check_trace;
28950mkdir gnu
28951(cd gnu
28952TEST_TAR_FORMAT=gnu
28953export TEST_TAR_FORMAT
28954TAR_OPTIONS="-H gnu"
28955export TAR_OPTIONS
28956rm -rf *
28957
28958ckmtime || exit 77
28959mkdir dir
28960mkdir dir/sub
28961mkdir dir/sub/a
28962mkdir dir/sub/b
28963genfile --file dir/file1
28964genfile --file dir/sub/file2
28965genfile --file dir/sub/a/file3
28966
28967echo Level 0 . sub
28968tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
28969echo Level 0 sub .
28970tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
28971
28972mkdir dir/c
28973genfile --file dir/sub/b/file4
28974
28975echo Level 1 . sub
28976tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
28977echo Level 1 sub .
28978tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
28979)
28980) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28981at_status=$? at_failed=false
28982$at_check_filter
28983at_fn_diff_devnull "$at_stderr" || at_failed=:
28984echo >>"$at_stdout"; $as_echo "Level 0 . sub
28985./
28986sub/
28987sub/a/
28988sub/b/
28989./file1
28990sub/file2
28991sub/a/file3
28992Level 0 sub .
28993./
28994sub/
28995sub/a/
28996sub/b/
28997./file1
28998sub/file2
28999sub/a/file3
29000Level 1 . sub
29001./
29002./c/
29003sub/
29004sub/a/
29005sub/b/
29006sub/b/file4
29007Level 1 sub .
29008./
29009./c/
29010sub/
29011sub/a/
29012sub/b/
29013sub/b/file4
29014" | \
29015  $at_diff - "$at_stdout" || at_failed=:
29016at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
29017$at_failed && at_fn_log_failure
29018$at_traceon; }
29019
29020              { set +x
29021$as_echo "$at_srcdir/incr06.at:24:
29022mkdir oldgnu
29023(cd oldgnu
29024TEST_TAR_FORMAT=oldgnu
29025export TEST_TAR_FORMAT
29026TAR_OPTIONS=\"-H oldgnu\"
29027export TAR_OPTIONS
29028rm -rf *
29029
29030ckmtime || exit 77
29031mkdir dir
29032mkdir dir/sub
29033mkdir dir/sub/a
29034mkdir dir/sub/b
29035genfile --file dir/file1
29036genfile --file dir/sub/file2
29037genfile --file dir/sub/a/file3
29038
29039echo Level 0 . sub
29040tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
29041echo Level 0 sub .
29042tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
29043
29044mkdir dir/c
29045genfile --file dir/sub/b/file4
29046
29047echo Level 1 . sub
29048tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
29049echo Level 1 sub .
29050tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
29051)"
29052at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
29053( $at_check_trace;
29054mkdir oldgnu
29055(cd oldgnu
29056TEST_TAR_FORMAT=oldgnu
29057export TEST_TAR_FORMAT
29058TAR_OPTIONS="-H oldgnu"
29059export TAR_OPTIONS
29060rm -rf *
29061
29062ckmtime || exit 77
29063mkdir dir
29064mkdir dir/sub
29065mkdir dir/sub/a
29066mkdir dir/sub/b
29067genfile --file dir/file1
29068genfile --file dir/sub/file2
29069genfile --file dir/sub/a/file3
29070
29071echo Level 0 . sub
29072tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
29073echo Level 0 sub .
29074tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
29075
29076mkdir dir/c
29077genfile --file dir/sub/b/file4
29078
29079echo Level 1 . sub
29080tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
29081echo Level 1 sub .
29082tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
29083)
29084) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29085at_status=$? at_failed=false
29086$at_check_filter
29087at_fn_diff_devnull "$at_stderr" || at_failed=:
29088echo >>"$at_stdout"; $as_echo "Level 0 . sub
29089./
29090sub/
29091sub/a/
29092sub/b/
29093./file1
29094sub/file2
29095sub/a/file3
29096Level 0 sub .
29097./
29098sub/
29099sub/a/
29100sub/b/
29101./file1
29102sub/file2
29103sub/a/file3
29104Level 1 . sub
29105./
29106./c/
29107sub/
29108sub/a/
29109sub/b/
29110sub/b/file4
29111Level 1 sub .
29112./
29113./c/
29114sub/
29115sub/a/
29116sub/b/
29117sub/b/file4
29118" | \
29119  $at_diff - "$at_stdout" || at_failed=:
29120at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
29121$at_failed && at_fn_log_failure
29122$at_traceon; }
29123
29124              { set +x
29125$as_echo "$at_srcdir/incr06.at:24:
29126mkdir posix
29127(cd posix
29128TEST_TAR_FORMAT=posix
29129export TEST_TAR_FORMAT
29130TAR_OPTIONS=\"-H posix\"
29131export TAR_OPTIONS
29132rm -rf *
29133
29134ckmtime || exit 77
29135mkdir dir
29136mkdir dir/sub
29137mkdir dir/sub/a
29138mkdir dir/sub/b
29139genfile --file dir/file1
29140genfile --file dir/sub/file2
29141genfile --file dir/sub/a/file3
29142
29143echo Level 0 . sub
29144tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
29145echo Level 0 sub .
29146tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
29147
29148mkdir dir/c
29149genfile --file dir/sub/b/file4
29150
29151echo Level 1 . sub
29152tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
29153echo Level 1 sub .
29154tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
29155)"
29156at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
29157( $at_check_trace;
29158mkdir posix
29159(cd posix
29160TEST_TAR_FORMAT=posix
29161export TEST_TAR_FORMAT
29162TAR_OPTIONS="-H posix"
29163export TAR_OPTIONS
29164rm -rf *
29165
29166ckmtime || exit 77
29167mkdir dir
29168mkdir dir/sub
29169mkdir dir/sub/a
29170mkdir dir/sub/b
29171genfile --file dir/file1
29172genfile --file dir/sub/file2
29173genfile --file dir/sub/a/file3
29174
29175echo Level 0 . sub
29176tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
29177echo Level 0 sub .
29178tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
29179
29180mkdir dir/c
29181genfile --file dir/sub/b/file4
29182
29183echo Level 1 . sub
29184tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
29185echo Level 1 sub .
29186tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
29187)
29188) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29189at_status=$? at_failed=false
29190$at_check_filter
29191at_fn_diff_devnull "$at_stderr" || at_failed=:
29192echo >>"$at_stdout"; $as_echo "Level 0 . sub
29193./
29194sub/
29195sub/a/
29196sub/b/
29197./file1
29198sub/file2
29199sub/a/file3
29200Level 0 sub .
29201./
29202sub/
29203sub/a/
29204sub/b/
29205./file1
29206sub/file2
29207sub/a/file3
29208Level 1 . sub
29209./
29210./c/
29211sub/
29212sub/a/
29213sub/b/
29214sub/b/file4
29215Level 1 sub .
29216./
29217./c/
29218sub/
29219sub/a/
29220sub/b/
29221sub/b/file4
29222" | \
29223  $at_diff - "$at_stdout" || at_failed=:
29224at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
29225$at_failed && at_fn_log_failure
29226$at_traceon; }
29227
29228
29229
29230
29231  set +x
29232  $at_times_p && times >"$at_times_file"
29233) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29234read at_status <"$at_status_file"
29235#AT_STOP_123
29236#AT_START_124
29237at_fn_group_banner 124 'incr07.at:18' \
29238  "incremental restores with -C" "                   " 16
29239at_xfail=no
29240      test -f $XFAILFILE && at_xfail=yes
29241(
29242  $as_echo "124. $at_setup_line: testing $at_desc ..."
29243  $at_traceon
29244
29245
29246
29247# Tar 1.26 had problems extracting from incremental restores when given
29248# the -C option.  The code in incremen.c:try_purge_directory and
29249# misc.c:remove_any_file was using savedir(), which ignored eventual changes
29250# in the current working directory and caused the malfunctioning.
29251#
29252# The problem was reported by Piotr Rotter on 2013-03-22.
29253#
29254# This testcase is based on scripts provided by Piotr Rotter and Nathan
29255# Stratton Treadway.
29256#
29257# References: <514C8F56.90900@active24.pl>,
29258#             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00036.html,
29259#             <20130326181922.GZ3732@shire.ontko.com>,
29260#             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00042.html,
29261#             <20130327051828.GA3732@shire.ontko.com>,
29262#             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00043.html,
29263#             <20130327054957.GB3732@shire.ontko.com>,
29264#             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00044.html
29265
29266
29267
29268  { set +x
29269$as_echo "$at_srcdir/incr07.at:40:
29270mkdir gnu
29271(cd gnu
29272TEST_TAR_FORMAT=gnu
29273export TEST_TAR_FORMAT
29274TAR_OPTIONS=\"-H gnu\"
29275export TAR_OPTIONS
29276rm -rf *
29277
29278ckmtime || exit 77
29279mkdir dirA
29280echo 'a' > dirA/a
29281echo 'a' > dirA/b
29282
29283decho C0
29284tar -g test.snar -vcf test.0.tar dirA
29285
29286echo 'a' > dirA/c
29287decho C1
29288tar -g test.snar -vcf test.1.tar dirA
29289
29290rm -f dirA/a
29291decho C2
29292tar -g test.snar -vcf test.2.tar dirA
29293
29294mkdir ext
29295rm -rf dirA
29296
29297decho E0
29298tar -g test.snar -vxf test.0.tar -C ext/
29299decho E1
29300tar -g test.snar -vxf test.1.tar -C ext/
29301
29302decho E2
29303tar -g test.snar -vxf test.2.tar -C ext/
29304
29305mkdir ext/dirA/dirB
29306touch ext/dirA/dirB/file
29307
29308decho E3
29309tar -g test.snar -vxf test.2.tar -C ext/
29310
29311echo FIN
29312test -d dirA && echo >&2 \"toplevel dirA exists\"
29313exit 0
29314)"
29315at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
29316( $at_check_trace;
29317mkdir gnu
29318(cd gnu
29319TEST_TAR_FORMAT=gnu
29320export TEST_TAR_FORMAT
29321TAR_OPTIONS="-H gnu"
29322export TAR_OPTIONS
29323rm -rf *
29324
29325ckmtime || exit 77
29326mkdir dirA
29327echo 'a' > dirA/a
29328echo 'a' > dirA/b
29329
29330decho C0
29331tar -g test.snar -vcf test.0.tar dirA
29332
29333echo 'a' > dirA/c
29334decho C1
29335tar -g test.snar -vcf test.1.tar dirA
29336
29337rm -f dirA/a
29338decho C2
29339tar -g test.snar -vcf test.2.tar dirA
29340
29341mkdir ext
29342rm -rf dirA
29343
29344decho E0
29345tar -g test.snar -vxf test.0.tar -C ext/
29346decho E1
29347tar -g test.snar -vxf test.1.tar -C ext/
29348
29349decho E2
29350tar -g test.snar -vxf test.2.tar -C ext/
29351
29352mkdir ext/dirA/dirB
29353touch ext/dirA/dirB/file
29354
29355decho E3
29356tar -g test.snar -vxf test.2.tar -C ext/
29357
29358echo FIN
29359test -d dirA && echo >&2 "toplevel dirA exists"
29360exit 0
29361)
29362) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29363at_status=$? at_failed=false
29364$at_check_filter
29365echo >>"$at_stderr"; $as_echo "C0
29366tar: dirA: Directory is new
29367C1
29368C2
29369E0
29370E1
29371E2
29372E3
29373" | \
29374  $at_diff - "$at_stderr" || at_failed=:
29375echo >>"$at_stdout"; $as_echo "C0
29376dirA/
29377dirA/a
29378dirA/b
29379C1
29380dirA/
29381dirA/c
29382C2
29383dirA/
29384E0
29385dirA/
29386dirA/a
29387dirA/b
29388E1
29389dirA/
29390dirA/c
29391E2
29392dirA/
29393tar: Deleting 'dirA/a'
29394E3
29395dirA/
29396tar: Deleting 'dirA/dirB'
29397FIN
29398" | \
29399  $at_diff - "$at_stdout" || at_failed=:
29400at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
29401$at_failed && at_fn_log_failure
29402$at_traceon; }
29403
29404              { set +x
29405$as_echo "$at_srcdir/incr07.at:40:
29406mkdir oldgnu
29407(cd oldgnu
29408TEST_TAR_FORMAT=oldgnu
29409export TEST_TAR_FORMAT
29410TAR_OPTIONS=\"-H oldgnu\"
29411export TAR_OPTIONS
29412rm -rf *
29413
29414ckmtime || exit 77
29415mkdir dirA
29416echo 'a' > dirA/a
29417echo 'a' > dirA/b
29418
29419decho C0
29420tar -g test.snar -vcf test.0.tar dirA
29421
29422echo 'a' > dirA/c
29423decho C1
29424tar -g test.snar -vcf test.1.tar dirA
29425
29426rm -f dirA/a
29427decho C2
29428tar -g test.snar -vcf test.2.tar dirA
29429
29430mkdir ext
29431rm -rf dirA
29432
29433decho E0
29434tar -g test.snar -vxf test.0.tar -C ext/
29435decho E1
29436tar -g test.snar -vxf test.1.tar -C ext/
29437
29438decho E2
29439tar -g test.snar -vxf test.2.tar -C ext/
29440
29441mkdir ext/dirA/dirB
29442touch ext/dirA/dirB/file
29443
29444decho E3
29445tar -g test.snar -vxf test.2.tar -C ext/
29446
29447echo FIN
29448test -d dirA && echo >&2 \"toplevel dirA exists\"
29449exit 0
29450)"
29451at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
29452( $at_check_trace;
29453mkdir oldgnu
29454(cd oldgnu
29455TEST_TAR_FORMAT=oldgnu
29456export TEST_TAR_FORMAT
29457TAR_OPTIONS="-H oldgnu"
29458export TAR_OPTIONS
29459rm -rf *
29460
29461ckmtime || exit 77
29462mkdir dirA
29463echo 'a' > dirA/a
29464echo 'a' > dirA/b
29465
29466decho C0
29467tar -g test.snar -vcf test.0.tar dirA
29468
29469echo 'a' > dirA/c
29470decho C1
29471tar -g test.snar -vcf test.1.tar dirA
29472
29473rm -f dirA/a
29474decho C2
29475tar -g test.snar -vcf test.2.tar dirA
29476
29477mkdir ext
29478rm -rf dirA
29479
29480decho E0
29481tar -g test.snar -vxf test.0.tar -C ext/
29482decho E1
29483tar -g test.snar -vxf test.1.tar -C ext/
29484
29485decho E2
29486tar -g test.snar -vxf test.2.tar -C ext/
29487
29488mkdir ext/dirA/dirB
29489touch ext/dirA/dirB/file
29490
29491decho E3
29492tar -g test.snar -vxf test.2.tar -C ext/
29493
29494echo FIN
29495test -d dirA && echo >&2 "toplevel dirA exists"
29496exit 0
29497)
29498) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29499at_status=$? at_failed=false
29500$at_check_filter
29501echo >>"$at_stderr"; $as_echo "C0
29502tar: dirA: Directory is new
29503C1
29504C2
29505E0
29506E1
29507E2
29508E3
29509" | \
29510  $at_diff - "$at_stderr" || at_failed=:
29511echo >>"$at_stdout"; $as_echo "C0
29512dirA/
29513dirA/a
29514dirA/b
29515C1
29516dirA/
29517dirA/c
29518C2
29519dirA/
29520E0
29521dirA/
29522dirA/a
29523dirA/b
29524E1
29525dirA/
29526dirA/c
29527E2
29528dirA/
29529tar: Deleting 'dirA/a'
29530E3
29531dirA/
29532tar: Deleting 'dirA/dirB'
29533FIN
29534" | \
29535  $at_diff - "$at_stdout" || at_failed=:
29536at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
29537$at_failed && at_fn_log_failure
29538$at_traceon; }
29539
29540              { set +x
29541$as_echo "$at_srcdir/incr07.at:40:
29542mkdir posix
29543(cd posix
29544TEST_TAR_FORMAT=posix
29545export TEST_TAR_FORMAT
29546TAR_OPTIONS=\"-H posix\"
29547export TAR_OPTIONS
29548rm -rf *
29549
29550ckmtime || exit 77
29551mkdir dirA
29552echo 'a' > dirA/a
29553echo 'a' > dirA/b
29554
29555decho C0
29556tar -g test.snar -vcf test.0.tar dirA
29557
29558echo 'a' > dirA/c
29559decho C1
29560tar -g test.snar -vcf test.1.tar dirA
29561
29562rm -f dirA/a
29563decho C2
29564tar -g test.snar -vcf test.2.tar dirA
29565
29566mkdir ext
29567rm -rf dirA
29568
29569decho E0
29570tar -g test.snar -vxf test.0.tar -C ext/
29571decho E1
29572tar -g test.snar -vxf test.1.tar -C ext/
29573
29574decho E2
29575tar -g test.snar -vxf test.2.tar -C ext/
29576
29577mkdir ext/dirA/dirB
29578touch ext/dirA/dirB/file
29579
29580decho E3
29581tar -g test.snar -vxf test.2.tar -C ext/
29582
29583echo FIN
29584test -d dirA && echo >&2 \"toplevel dirA exists\"
29585exit 0
29586)"
29587at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
29588( $at_check_trace;
29589mkdir posix
29590(cd posix
29591TEST_TAR_FORMAT=posix
29592export TEST_TAR_FORMAT
29593TAR_OPTIONS="-H posix"
29594export TAR_OPTIONS
29595rm -rf *
29596
29597ckmtime || exit 77
29598mkdir dirA
29599echo 'a' > dirA/a
29600echo 'a' > dirA/b
29601
29602decho C0
29603tar -g test.snar -vcf test.0.tar dirA
29604
29605echo 'a' > dirA/c
29606decho C1
29607tar -g test.snar -vcf test.1.tar dirA
29608
29609rm -f dirA/a
29610decho C2
29611tar -g test.snar -vcf test.2.tar dirA
29612
29613mkdir ext
29614rm -rf dirA
29615
29616decho E0
29617tar -g test.snar -vxf test.0.tar -C ext/
29618decho E1
29619tar -g test.snar -vxf test.1.tar -C ext/
29620
29621decho E2
29622tar -g test.snar -vxf test.2.tar -C ext/
29623
29624mkdir ext/dirA/dirB
29625touch ext/dirA/dirB/file
29626
29627decho E3
29628tar -g test.snar -vxf test.2.tar -C ext/
29629
29630echo FIN
29631test -d dirA && echo >&2 "toplevel dirA exists"
29632exit 0
29633)
29634) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29635at_status=$? at_failed=false
29636$at_check_filter
29637echo >>"$at_stderr"; $as_echo "C0
29638tar: dirA: Directory is new
29639C1
29640C2
29641E0
29642E1
29643E2
29644E3
29645" | \
29646  $at_diff - "$at_stderr" || at_failed=:
29647echo >>"$at_stdout"; $as_echo "C0
29648dirA/
29649dirA/a
29650dirA/b
29651C1
29652dirA/
29653dirA/c
29654C2
29655dirA/
29656E0
29657dirA/
29658dirA/a
29659dirA/b
29660E1
29661dirA/
29662dirA/c
29663E2
29664dirA/
29665tar: Deleting 'dirA/a'
29666E3
29667dirA/
29668tar: Deleting 'dirA/dirB'
29669FIN
29670" | \
29671  $at_diff - "$at_stdout" || at_failed=:
29672at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
29673$at_failed && at_fn_log_failure
29674$at_traceon; }
29675
29676
29677
29678
29679  set +x
29680  $at_times_p && times >"$at_times_file"
29681) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29682read at_status <"$at_status_file"
29683#AT_STOP_124
29684#AT_START_125
29685at_fn_group_banner 125 'incr08.at:38' \
29686  "filename normalization" "                         " 16
29687at_xfail=no
29688      test -f $XFAILFILE && at_xfail=yes
29689(
29690  $as_echo "125. $at_setup_line: testing $at_desc ..."
29691  $at_traceon
29692
29693
29694
29695
29696
29697
29698
29699  { set +x
29700$as_echo "$at_srcdir/incr08.at:41:
29701mkdir gnu
29702(cd gnu
29703TEST_TAR_FORMAT=gnu
29704export TEST_TAR_FORMAT
29705TAR_OPTIONS=\"-H gnu\"
29706export TAR_OPTIONS
29707rm -rf *
29708
29709ckmtime || exit 77
29710
29711test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
29712
29713mkdir tartest
29714cd tartest
29715mkdir foo
29716mkdir foo/subdir
29717mkdir foo/subdir/dir1
29718mkdir subdir
29719mkdir subdir/dir2
29720decho A
29721find .|sort
29722
29723decho B
29724DIR=\`pwd\`
29725tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . \$DIR
29726)"
29727at_fn_check_prepare_notrace 'a `...` command substitution' "incr08.at:41"
29728( $at_check_trace;
29729mkdir gnu
29730(cd gnu
29731TEST_TAR_FORMAT=gnu
29732export TEST_TAR_FORMAT
29733TAR_OPTIONS="-H gnu"
29734export TAR_OPTIONS
29735rm -rf *
29736
29737ckmtime || exit 77
29738
29739test -z "`sort < /dev/null 2>&1`" || exit 77
29740
29741mkdir tartest
29742cd tartest
29743mkdir foo
29744mkdir foo/subdir
29745mkdir foo/subdir/dir1
29746mkdir subdir
29747mkdir subdir/dir2
29748decho A
29749find .|sort
29750
29751decho B
29752DIR=`pwd`
29753tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . $DIR
29754)
29755) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29756at_status=$? at_failed=false
29757$at_check_filter
29758echo stderr:; tee stderr <"$at_stderr"
29759echo stdout:; tee stdout <"$at_stdout"
29760at_fn_check_status 0 $at_status "$at_srcdir/incr08.at:41"
29761$at_failed && at_fn_log_failure
29762$at_traceon; }
29763
29764              { set +x
29765$as_echo "$at_srcdir/incr08.at:41:
29766DIR=\`pwd\`/gnu/tartest
29767sed \"s|\$DIR|ABSPATH|\" stdout
29768"
29769at_fn_check_prepare_notrace 'a `...` command substitution' "incr08.at:41"
29770( $at_check_trace;
29771DIR=`pwd`/gnu/tartest
29772sed "s|$DIR|ABSPATH|" stdout
29773
29774) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29775at_status=$? at_failed=false
29776$at_check_filter
29777at_fn_diff_devnull "$at_stderr" || at_failed=:
29778echo >>"$at_stdout"; $as_echo "A
29779.
29780./foo
29781./foo/subdir
29782./foo/subdir/dir1
29783./subdir
29784./subdir/dir2
29785B
29786./
29787./subdir/
29788./subdir/dir1/
29789ABSPATH/
29790ABSPATH/subdir/
29791ABSPATH/subdir/dir2/
29792" | \
29793  $at_diff - "$at_stdout" || at_failed=:
29794at_fn_check_status 0 $at_status "$at_srcdir/incr08.at:41"
29795$at_failed && at_fn_log_failure
29796$at_traceon; }
29797
29798
29799{ set +x
29800$as_echo "$at_srcdir/incr08.at:41:
29801DIR=\`pwd\`/gnu/tartest
29802sed \"/tar: Removing leading \\\`\\/*\\/' from/d;s|\$DIR|ABSPATH|\" stderr"
29803at_fn_check_prepare_notrace 'a `...` command substitution' "incr08.at:41"
29804( $at_check_trace;
29805DIR=`pwd`/gnu/tartest
29806sed "/tar: Removing leading \`\/*\/' from/d;s|$DIR|ABSPATH|" stderr
29807) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29808at_status=$? at_failed=false
29809$at_check_filter
29810at_fn_diff_devnull "$at_stderr" || at_failed=:
29811echo >>"$at_stdout"; $as_echo "A
29812B
29813tar: .: Directory is new
29814tar: ./subdir: Directory is new
29815tar: ./subdir/dir1: Directory is new
29816tar: ABSPATH: Directory is new
29817tar: ABSPATH/subdir: Directory is new
29818tar: ABSPATH/subdir/dir2: Directory is new
29819" | \
29820  $at_diff - "$at_stdout" || at_failed=:
29821at_fn_check_status 0 $at_status "$at_srcdir/incr08.at:41"
29822$at_failed && at_fn_log_failure
29823$at_traceon; }
29824
29825
29826
29827
29828
29829  set +x
29830  $at_times_p && times >"$at_times_file"
29831) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29832read at_status <"$at_status_file"
29833#AT_STOP_125
29834#AT_START_126
29835at_fn_group_banner 126 'incr09.at:26' \
29836  "incremental with alternating -C" "                " 16
29837at_xfail=no
29838      test -f $XFAILFILE && at_xfail=yes
29839(
29840  $as_echo "126. $at_setup_line: testing $at_desc ..."
29841  $at_traceon
29842
29843
29844
29845
29846
29847  { set +x
29848$as_echo "$at_srcdir/incr09.at:29:
29849mkdir gnu
29850(cd gnu
29851TEST_TAR_FORMAT=gnu
29852export TEST_TAR_FORMAT
29853TAR_OPTIONS=\"-H gnu\"
29854export TAR_OPTIONS
29855rm -rf *
29856
29857ckmtime || exit 77
29858
29859test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
29860
29861mkdir foo bar middle
29862echo foo/foo_file > foo/foo_file
29863echo bar/bar_file > bar/bar_file
29864echo middle/file > middle/middle_file
29865decho A
29866tar -cvf foo.tar --incremental -C foo . -C \`pwd\` middle  -C bar .
29867
29868rm foo.tar
29869>toplevel_file
29870decho B
29871tar -cvf foo.tar --incremental -C foo . -C \`pwd\` toplevel_file  -C bar .
29872)"
29873at_fn_check_prepare_notrace 'a `...` command substitution' "incr09.at:29"
29874( $at_check_trace;
29875mkdir gnu
29876(cd gnu
29877TEST_TAR_FORMAT=gnu
29878export TEST_TAR_FORMAT
29879TAR_OPTIONS="-H gnu"
29880export TAR_OPTIONS
29881rm -rf *
29882
29883ckmtime || exit 77
29884
29885test -z "`sort < /dev/null 2>&1`" || exit 77
29886
29887mkdir foo bar middle
29888echo foo/foo_file > foo/foo_file
29889echo bar/bar_file > bar/bar_file
29890echo middle/file > middle/middle_file
29891decho A
29892tar -cvf foo.tar --incremental -C foo . -C `pwd` middle  -C bar .
29893
29894rm foo.tar
29895>toplevel_file
29896decho B
29897tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file  -C bar .
29898)
29899) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29900at_status=$? at_failed=false
29901$at_check_filter
29902echo >>"$at_stderr"; $as_echo "A
29903tar: .: Directory is new
29904tar: middle: Directory is new
29905tar: .: Directory is new
29906B
29907tar: .: Directory is new
29908tar: .: Directory is new
29909" | \
29910  $at_diff - "$at_stderr" || at_failed=:
29911echo >>"$at_stdout"; $as_echo "A
29912./
29913./
29914middle/
29915./bar_file
29916./foo_file
29917middle/middle_file
29918B
29919./
29920./
29921toplevel_file
29922./bar_file
29923./foo_file
29924" | \
29925  $at_diff - "$at_stdout" || at_failed=:
29926at_fn_check_status 0 $at_status "$at_srcdir/incr09.at:29"
29927$at_failed && at_fn_log_failure
29928$at_traceon; }
29929
29930
29931
29932
29933  set +x
29934  $at_times_p && times >"$at_times_file"
29935) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29936read at_status <"$at_status_file"
29937#AT_STOP_126
29938#AT_START_127
29939at_fn_group_banner 127 'incr10.at:18' \
29940  "concatenated incremental archives (deletes)" "    " 16
29941at_xfail=no
29942      test -f $XFAILFILE && at_xfail=yes
29943(
29944  $as_echo "127. $at_setup_line: testing $at_desc ..."
29945  $at_traceon
29946
29947
29948
29949# Description: Extraction from concatenated incremental archives
29950# produced spurious error messages when trying to set file ownership
29951# and permissions on deleted directories.
29952# Reported by: Alex Efros <powerman@powerman.name>
29953# References: <20150411224008.GO24600@home.power>
29954#             http://lists.gnu.org/archive/html/bug-tar/2015-04/msg00003.html
29955
29956
29957
29958  { set +x
29959$as_echo "$at_srcdir/incr10.at:28:
29960mkdir gnu
29961(cd gnu
29962TEST_TAR_FORMAT=gnu
29963export TEST_TAR_FORMAT
29964TAR_OPTIONS=\"-H gnu\"
29965export TAR_OPTIONS
29966rm -rf *
29967
29968ckmtime || exit 77
29969mkdir in
29970mkdir in/dir
29971decho Level 0
29972tar -cvf 1.tar -g snap -C in .
29973rmdir in/dir
29974decho Level 1
29975tar -cvf 2.tar -g snap -C in .
29976cp 1.tar full.tar
29977decho Concat
29978tar -A 2.tar -f full.tar -g /dev/null
29979decho Extract
29980mkdir out
29981tar -xvf full.tar -g /dev/null -C out
29982)"
29983at_fn_check_prepare_notrace 'an embedded newline' "incr10.at:28"
29984( $at_check_trace;
29985mkdir gnu
29986(cd gnu
29987TEST_TAR_FORMAT=gnu
29988export TEST_TAR_FORMAT
29989TAR_OPTIONS="-H gnu"
29990export TAR_OPTIONS
29991rm -rf *
29992
29993ckmtime || exit 77
29994mkdir in
29995mkdir in/dir
29996decho Level 0
29997tar -cvf 1.tar -g snap -C in .
29998rmdir in/dir
29999decho Level 1
30000tar -cvf 2.tar -g snap -C in .
30001cp 1.tar full.tar
30002decho Concat
30003tar -A 2.tar -f full.tar -g /dev/null
30004decho Extract
30005mkdir out
30006tar -xvf full.tar -g /dev/null -C out
30007)
30008) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30009at_status=$? at_failed=false
30010$at_check_filter
30011echo >>"$at_stderr"; $as_echo "Level 0
30012tar: .: Directory is new
30013tar: ./dir: Directory is new
30014Level 1
30015Concat
30016Extract
30017" | \
30018  $at_diff - "$at_stderr" || at_failed=:
30019echo >>"$at_stdout"; $as_echo "Level 0
30020./
30021./dir/
30022Level 1
30023./
30024Concat
30025Extract
30026./
30027./dir/
30028./
30029tar: Deleting './dir'
30030" | \
30031  $at_diff - "$at_stdout" || at_failed=:
30032at_fn_check_status 0 $at_status "$at_srcdir/incr10.at:28"
30033$at_failed && at_fn_log_failure
30034$at_traceon; }
30035
30036
30037
30038
30039  set +x
30040  $at_times_p && times >"$at_times_file"
30041) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30042read at_status <"$at_status_file"
30043#AT_STOP_127
30044#AT_START_128
30045at_fn_group_banner 128 'incr11.at:25' \
30046  "concatenated incremental archives (renames)" "    " 16
30047at_xfail=no
30048      test -f $XFAILFILE && at_xfail=yes
30049(
30050  $as_echo "128. $at_setup_line: testing $at_desc ..."
30051  $at_traceon
30052
30053
30054
30055
30056
30057  { set +x
30058$as_echo "$at_srcdir/incr11.at:28:
30059mkdir gnu
30060(cd gnu
30061TEST_TAR_FORMAT=gnu
30062export TEST_TAR_FORMAT
30063TAR_OPTIONS=\"-H gnu\"
30064export TAR_OPTIONS
30065rm -rf *
30066
30067ckmtime || exit 77
30068
30069test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30070
30071
30072install-sh -d data/dir >/dev/null && genfile --file data/dir/file || exit 77
30073decho Level 0
30074tar -cvf full.tar -g snap -C data .
30075decho Level 1
30076mv data/dir data/dir2
30077tar -cvf incr.tar -g snap -C data .
30078decho Concat
30079cp full.tar full2.tar
30080tar -A -f full2.tar incr.tar
30081decho Extract
30082mkdir out
30083tar -xvf full2.tar -g /dev/null -C out
30084decho List
30085find out | sort
30086)"
30087at_fn_check_prepare_notrace 'a `...` command substitution' "incr11.at:28"
30088( $at_check_trace;
30089mkdir gnu
30090(cd gnu
30091TEST_TAR_FORMAT=gnu
30092export TEST_TAR_FORMAT
30093TAR_OPTIONS="-H gnu"
30094export TAR_OPTIONS
30095rm -rf *
30096
30097ckmtime || exit 77
30098
30099test -z "`sort < /dev/null 2>&1`" || exit 77
30100
30101
30102install-sh -d data/dir >/dev/null && genfile --file data/dir/file || exit 77
30103decho Level 0
30104tar -cvf full.tar -g snap -C data .
30105decho Level 1
30106mv data/dir data/dir2
30107tar -cvf incr.tar -g snap -C data .
30108decho Concat
30109cp full.tar full2.tar
30110tar -A -f full2.tar incr.tar
30111decho Extract
30112mkdir out
30113tar -xvf full2.tar -g /dev/null -C out
30114decho List
30115find out | sort
30116)
30117) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30118at_status=$? at_failed=false
30119$at_check_filter
30120echo >>"$at_stderr"; $as_echo "Level 0
30121tar: .: Directory is new
30122tar: ./dir: Directory is new
30123Level 1
30124tar: ./dir2: Directory has been renamed from './dir'
30125Concat
30126Extract
30127List
30128" | \
30129  $at_diff - "$at_stderr" || at_failed=:
30130echo >>"$at_stdout"; $as_echo "Level 0
30131./
30132./dir/
30133./dir/file
30134Level 1
30135./
30136./dir2/
30137Concat
30138Extract
30139./
30140./dir/
30141./dir/file
30142./
30143./dir2/
30144List
30145out
30146out/dir2
30147out/dir2/file
30148" | \
30149  $at_diff - "$at_stdout" || at_failed=:
30150at_fn_check_status 0 $at_status "$at_srcdir/incr11.at:28"
30151$at_failed && at_fn_log_failure
30152$at_traceon; }
30153
30154
30155
30156
30157  set +x
30158  $at_times_p && times >"$at_times_file"
30159) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30160read at_status <"$at_status_file"
30161#AT_STOP_128
30162#AT_START_129
30163at_fn_group_banner 129 'filerem01.at:36' \
30164  "file removed as we read it" "                     " 17
30165at_xfail=no
30166      test -f $XFAILFILE && at_xfail=yes
30167(
30168  $as_echo "129. $at_setup_line: testing $at_desc ..."
30169  $at_traceon
30170
30171
30172
30173
30174
30175  { set +x
30176$as_echo "$at_srcdir/filerem01.at:39:
30177mkdir gnu
30178(cd gnu
30179TEST_TAR_FORMAT=gnu
30180export TEST_TAR_FORMAT
30181TAR_OPTIONS=\"-H gnu\"
30182export TAR_OPTIONS
30183rm -rf *
30184
30185mkdir dir
30186mkdir dir/sub
30187genfile --file dir/file1
30188genfile --file dir/sub/file2
30189
30190genfile --run --checkpoint=3 --unlink dir/file1 -- \\
30191       tar --blocking-factor=1 -c -f archive.tar \\
30192       --listed-incremental db -v dir >/dev/null
30193)"
30194at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
30195( $at_check_trace;
30196mkdir gnu
30197(cd gnu
30198TEST_TAR_FORMAT=gnu
30199export TEST_TAR_FORMAT
30200TAR_OPTIONS="-H gnu"
30201export TAR_OPTIONS
30202rm -rf *
30203
30204mkdir dir
30205mkdir dir/sub
30206genfile --file dir/file1
30207genfile --file dir/sub/file2
30208
30209genfile --run --checkpoint=3 --unlink dir/file1 -- \
30210       tar --blocking-factor=1 -c -f archive.tar \
30211       --listed-incremental db -v dir >/dev/null
30212)
30213) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30214at_status=$? at_failed=false
30215$at_check_filter
30216echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
30217tar: dir/sub: Directory is new
30218tar: dir/file1: File removed before we read it
30219" | \
30220  $at_diff - "$at_stderr" || at_failed=:
30221echo stdout:; cat "$at_stdout"
30222at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
30223$at_failed && at_fn_log_failure
30224$at_traceon; }
30225
30226              { set +x
30227$as_echo "$at_srcdir/filerem01.at:39:
30228mkdir posix
30229(cd posix
30230TEST_TAR_FORMAT=posix
30231export TEST_TAR_FORMAT
30232TAR_OPTIONS=\"-H posix\"
30233export TAR_OPTIONS
30234rm -rf *
30235
30236mkdir dir
30237mkdir dir/sub
30238genfile --file dir/file1
30239genfile --file dir/sub/file2
30240
30241genfile --run --checkpoint=3 --unlink dir/file1 -- \\
30242       tar --blocking-factor=1 -c -f archive.tar \\
30243       --listed-incremental db -v dir >/dev/null
30244)"
30245at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
30246( $at_check_trace;
30247mkdir posix
30248(cd posix
30249TEST_TAR_FORMAT=posix
30250export TEST_TAR_FORMAT
30251TAR_OPTIONS="-H posix"
30252export TAR_OPTIONS
30253rm -rf *
30254
30255mkdir dir
30256mkdir dir/sub
30257genfile --file dir/file1
30258genfile --file dir/sub/file2
30259
30260genfile --run --checkpoint=3 --unlink dir/file1 -- \
30261       tar --blocking-factor=1 -c -f archive.tar \
30262       --listed-incremental db -v dir >/dev/null
30263)
30264) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30265at_status=$? at_failed=false
30266$at_check_filter
30267echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
30268tar: dir/sub: Directory is new
30269tar: dir/file1: File removed before we read it
30270" | \
30271  $at_diff - "$at_stderr" || at_failed=:
30272echo stdout:; cat "$at_stdout"
30273at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
30274$at_failed && at_fn_log_failure
30275$at_traceon; }
30276
30277
30278
30279
30280# Timing information:
30281#
30282# For -Hgnu the above command line takes about 8 seconds to execute and
30283# produces:
30284#
30285# tar: dir: Directory is new
30286# tar: dir/sub: Directory is new
30287# dir/
30288# tar: Write checkpoint 1
30289# tar: Write checkpoint 2
30290# dir/sub/
30291# tar: Write checkpoint 3
30292# tar: Write checkpoint 4
30293# dir/file1
30294# tar: Write checkpoint 5
30295# dir/sub/file2
30296# tar: Write checkpoint 6
30297# tar: Write checkpoint 7
30298# tar: Write checkpoint 8
30299#
30300# For -Hposix the above command line takes about 14 seconds to execute and
30301# produces:
30302#
30303# ./tar: dir: Directory is new
30304# ./tar: dir/sub: Directory is new
30305# dir/
30306# ./tar: Write checkpoint 1
30307# ./tar: Write checkpoint 2
30308# ./tar: Write checkpoint 3
30309# dir/sub/
30310# ./tar: Write checkpoint 4
30311# ./tar: Write checkpoint 5
30312# ./tar: Write checkpoint 6
30313# dir/file1
30314# ./tar: Write checkpoint 7
30315# ./tar: Write checkpoint 8
30316# ./tar: Write checkpoint 9
30317# dir/sub/file2
30318# ./tar: Write checkpoint 10
30319# ./tar: Write checkpoint 11
30320# ./tar: Write checkpoint 12
30321# ./tar: Write checkpoint 13
30322# ./tar: Write checkpoint 14
30323
30324
30325  set +x
30326  $at_times_p && times >"$at_times_file"
30327) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30328read at_status <"$at_status_file"
30329#AT_STOP_129
30330#AT_START_130
30331at_fn_group_banner 130 'filerem02.at:26' \
30332  "toplevel file removed" "                          " 17
30333at_xfail=no
30334      test -f $XFAILFILE && at_xfail=yes
30335(
30336  $as_echo "130. $at_setup_line: testing $at_desc ..."
30337  $at_traceon
30338
30339
30340
30341
30342
30343  { set +x
30344$as_echo "$at_srcdir/filerem02.at:29:
30345mkdir gnu
30346(cd gnu
30347TEST_TAR_FORMAT=gnu
30348export TEST_TAR_FORMAT
30349TAR_OPTIONS=\"-H gnu\"
30350export TAR_OPTIONS
30351rm -rf *
30352
30353mkdir dir
30354mkdir dir/sub
30355genfile --file dir/file1
30356genfile --file dir/sub/file2
30357mkdir dir2
30358genfile --file dir2/file1
30359
30360genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
30361       tar --blocking-factor=1 -c -f archive.tar \\
30362       --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
30363)"
30364at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
30365( $at_check_trace;
30366mkdir gnu
30367(cd gnu
30368TEST_TAR_FORMAT=gnu
30369export TEST_TAR_FORMAT
30370TAR_OPTIONS="-H gnu"
30371export TAR_OPTIONS
30372rm -rf *
30373
30374mkdir dir
30375mkdir dir/sub
30376genfile --file dir/file1
30377genfile --file dir/sub/file2
30378mkdir dir2
30379genfile --file dir2/file1
30380
30381genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
30382       tar --blocking-factor=1 -c -f archive.tar \
30383       --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
30384)
30385) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30386at_status=$? at_failed=false
30387$at_check_filter
30388echo stderr:; cat "$at_stderr"
30389echo stdout:; cat "$at_stdout"
30390at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
30391$at_failed && at_fn_log_failure
30392$at_traceon; }
30393
30394              { set +x
30395$as_echo "$at_srcdir/filerem02.at:29:
30396mkdir posix
30397(cd posix
30398TEST_TAR_FORMAT=posix
30399export TEST_TAR_FORMAT
30400TAR_OPTIONS=\"-H posix\"
30401export TAR_OPTIONS
30402rm -rf *
30403
30404mkdir dir
30405mkdir dir/sub
30406genfile --file dir/file1
30407genfile --file dir/sub/file2
30408mkdir dir2
30409genfile --file dir2/file1
30410
30411genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
30412       tar --blocking-factor=1 -c -f archive.tar \\
30413       --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
30414)"
30415at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
30416( $at_check_trace;
30417mkdir posix
30418(cd posix
30419TEST_TAR_FORMAT=posix
30420export TEST_TAR_FORMAT
30421TAR_OPTIONS="-H posix"
30422export TAR_OPTIONS
30423rm -rf *
30424
30425mkdir dir
30426mkdir dir/sub
30427genfile --file dir/file1
30428genfile --file dir/sub/file2
30429mkdir dir2
30430genfile --file dir2/file1
30431
30432genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
30433       tar --blocking-factor=1 -c -f archive.tar \
30434       --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
30435)
30436) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30437at_status=$? at_failed=false
30438$at_check_filter
30439echo stderr:; cat "$at_stderr"
30440echo stdout:; cat "$at_stdout"
30441at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
30442$at_failed && at_fn_log_failure
30443$at_traceon; }
30444
30445
30446
30447
30448# Ignore stdout and stderr because their contents depend on
30449# the file system implementation.
30450
30451# Timing information: see filerem01.at
30452
30453  set +x
30454  $at_times_p && times >"$at_times_file"
30455) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30456read at_status <"$at_status_file"
30457#AT_STOP_130
30458#AT_START_131
30459at_fn_group_banner 131 'dirrem01.at:38' \
30460  "directory removed before reading" "               " 18
30461at_xfail=no
30462      test -f $XFAILFILE && at_xfail=yes
30463(
30464  $as_echo "131. $at_setup_line: testing $at_desc ..."
30465  $at_traceon
30466
30467
30468
30469
30470
30471  { set +x
30472$as_echo "$at_srcdir/dirrem01.at:41:
30473mkdir gnu
30474(cd gnu
30475TEST_TAR_FORMAT=gnu
30476export TEST_TAR_FORMAT
30477TAR_OPTIONS=\"-H gnu\"
30478export TAR_OPTIONS
30479rm -rf *
30480
30481mkdir dir
30482mkdir dir/sub
30483genfile --file dir/file1
30484genfile --file dir/sub/file2
30485
30486case \"\$TEST_TAR_FORMAT\" in
30487posix) CPT=5;;
30488gnu)   CPT=3;;
30489*)     exit 77
30490esac
30491
30492genfile --run --checkpoint=\$CPT --unlink dir/sub/file2 --unlink dir/sub -- \\
30493       tar --blocking-factor=1 -c -f archive.tar \\
30494       --listed-incremental db \\
30495       --warning=no-file-changed \\
30496       -v dir >/dev/null
30497)"
30498at_fn_check_prepare_notrace 'an embedded newline' "dirrem01.at:41"
30499( $at_check_trace;
30500mkdir gnu
30501(cd gnu
30502TEST_TAR_FORMAT=gnu
30503export TEST_TAR_FORMAT
30504TAR_OPTIONS="-H gnu"
30505export TAR_OPTIONS
30506rm -rf *
30507
30508mkdir dir
30509mkdir dir/sub
30510genfile --file dir/file1
30511genfile --file dir/sub/file2
30512
30513case "$TEST_TAR_FORMAT" in
30514posix) CPT=5;;
30515gnu)   CPT=3;;
30516*)     exit 77
30517esac
30518
30519genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
30520       tar --blocking-factor=1 -c -f archive.tar \
30521       --listed-incremental db \
30522       --warning=no-file-changed \
30523       -v dir >/dev/null
30524)
30525) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30526at_status=$? at_failed=false
30527$at_check_filter
30528echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
30529tar: dir/sub: Directory is new
30530tar: dir/sub: File removed before we read it
30531" | \
30532  $at_diff - "$at_stderr" || at_failed=:
30533echo stdout:; cat "$at_stdout"
30534at_fn_check_status 1 $at_status "$at_srcdir/dirrem01.at:41"
30535$at_failed && at_fn_log_failure
30536$at_traceon; }
30537
30538              { set +x
30539$as_echo "$at_srcdir/dirrem01.at:41:
30540mkdir posix
30541(cd posix
30542TEST_TAR_FORMAT=posix
30543export TEST_TAR_FORMAT
30544TAR_OPTIONS=\"-H posix\"
30545export TAR_OPTIONS
30546rm -rf *
30547
30548mkdir dir
30549mkdir dir/sub
30550genfile --file dir/file1
30551genfile --file dir/sub/file2
30552
30553case \"\$TEST_TAR_FORMAT\" in
30554posix) CPT=5;;
30555gnu)   CPT=3;;
30556*)     exit 77
30557esac
30558
30559genfile --run --checkpoint=\$CPT --unlink dir/sub/file2 --unlink dir/sub -- \\
30560       tar --blocking-factor=1 -c -f archive.tar \\
30561       --listed-incremental db \\
30562       --warning=no-file-changed \\
30563       -v dir >/dev/null
30564)"
30565at_fn_check_prepare_notrace 'an embedded newline' "dirrem01.at:41"
30566( $at_check_trace;
30567mkdir posix
30568(cd posix
30569TEST_TAR_FORMAT=posix
30570export TEST_TAR_FORMAT
30571TAR_OPTIONS="-H posix"
30572export TAR_OPTIONS
30573rm -rf *
30574
30575mkdir dir
30576mkdir dir/sub
30577genfile --file dir/file1
30578genfile --file dir/sub/file2
30579
30580case "$TEST_TAR_FORMAT" in
30581posix) CPT=5;;
30582gnu)   CPT=3;;
30583*)     exit 77
30584esac
30585
30586genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
30587       tar --blocking-factor=1 -c -f archive.tar \
30588       --listed-incremental db \
30589       --warning=no-file-changed \
30590       -v dir >/dev/null
30591)
30592) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30593at_status=$? at_failed=false
30594$at_check_filter
30595echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
30596tar: dir/sub: Directory is new
30597tar: dir/sub: File removed before we read it
30598" | \
30599  $at_diff - "$at_stderr" || at_failed=:
30600echo stdout:; cat "$at_stdout"
30601at_fn_check_status 1 $at_status "$at_srcdir/dirrem01.at:41"
30602$at_failed && at_fn_log_failure
30603$at_traceon; }
30604
30605
30606
30607
30608  set +x
30609  $at_times_p && times >"$at_times_file"
30610) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30611read at_status <"$at_status_file"
30612#AT_STOP_131
30613#AT_START_132
30614at_fn_group_banner 132 'dirrem02.at:31' \
30615  "explicitly named directory removed before reading" "" 18
30616at_xfail=no
30617      test -f $XFAILFILE && at_xfail=yes
30618(
30619  $as_echo "132. $at_setup_line: testing $at_desc ..."
30620  $at_traceon
30621
30622
30623
30624
30625
30626  { set +x
30627$as_echo "$at_srcdir/dirrem02.at:34:
30628mkdir gnu
30629(cd gnu
30630TEST_TAR_FORMAT=gnu
30631export TEST_TAR_FORMAT
30632TAR_OPTIONS=\"-H gnu\"
30633export TAR_OPTIONS
30634rm -rf *
30635
30636mkdir dir
30637mkdir dir/sub
30638genfile --file dir/file1
30639genfile --file dir/sub/file2
30640
30641case \"\$TEST_TAR_FORMAT\" in
30642posix) CPT=5;;
30643gnu)   CPT=3;;
30644*)     exit 77
30645esac
30646
30647genfile --run --checkpoint=\$CPT --unlink dir/sub/file2 --unlink dir/sub -- \\
30648       tar --blocking-factor=1 -c -f archive.tar \\
30649       --listed-incremental db \\
30650       --warning=no-file-changed \\
30651       -v dir dir/sub >/dev/null
30652)"
30653at_fn_check_prepare_notrace 'an embedded newline' "dirrem02.at:34"
30654( $at_check_trace;
30655mkdir gnu
30656(cd gnu
30657TEST_TAR_FORMAT=gnu
30658export TEST_TAR_FORMAT
30659TAR_OPTIONS="-H gnu"
30660export TAR_OPTIONS
30661rm -rf *
30662
30663mkdir dir
30664mkdir dir/sub
30665genfile --file dir/file1
30666genfile --file dir/sub/file2
30667
30668case "$TEST_TAR_FORMAT" in
30669posix) CPT=5;;
30670gnu)   CPT=3;;
30671*)     exit 77
30672esac
30673
30674genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
30675       tar --blocking-factor=1 -c -f archive.tar \
30676       --listed-incremental db \
30677       --warning=no-file-changed \
30678       -v dir dir/sub >/dev/null
30679)
30680) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30681at_status=$? at_failed=false
30682$at_check_filter
30683echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
30684tar: dir/sub: Directory is new
30685tar: dir/sub: Cannot open: No such file or directory
30686tar: Exiting with failure status due to previous errors
30687" | \
30688  $at_diff - "$at_stderr" || at_failed=:
30689echo stdout:; cat "$at_stdout"
30690at_fn_check_status 2 $at_status "$at_srcdir/dirrem02.at:34"
30691$at_failed && at_fn_log_failure
30692$at_traceon; }
30693
30694              { set +x
30695$as_echo "$at_srcdir/dirrem02.at:34:
30696mkdir posix
30697(cd posix
30698TEST_TAR_FORMAT=posix
30699export TEST_TAR_FORMAT
30700TAR_OPTIONS=\"-H posix\"
30701export TAR_OPTIONS
30702rm -rf *
30703
30704mkdir dir
30705mkdir dir/sub
30706genfile --file dir/file1
30707genfile --file dir/sub/file2
30708
30709case \"\$TEST_TAR_FORMAT\" in
30710posix) CPT=5;;
30711gnu)   CPT=3;;
30712*)     exit 77
30713esac
30714
30715genfile --run --checkpoint=\$CPT --unlink dir/sub/file2 --unlink dir/sub -- \\
30716       tar --blocking-factor=1 -c -f archive.tar \\
30717       --listed-incremental db \\
30718       --warning=no-file-changed \\
30719       -v dir dir/sub >/dev/null
30720)"
30721at_fn_check_prepare_notrace 'an embedded newline' "dirrem02.at:34"
30722( $at_check_trace;
30723mkdir posix
30724(cd posix
30725TEST_TAR_FORMAT=posix
30726export TEST_TAR_FORMAT
30727TAR_OPTIONS="-H posix"
30728export TAR_OPTIONS
30729rm -rf *
30730
30731mkdir dir
30732mkdir dir/sub
30733genfile --file dir/file1
30734genfile --file dir/sub/file2
30735
30736case "$TEST_TAR_FORMAT" in
30737posix) CPT=5;;
30738gnu)   CPT=3;;
30739*)     exit 77
30740esac
30741
30742genfile --run --checkpoint=$CPT --unlink dir/sub/file2 --unlink dir/sub -- \
30743       tar --blocking-factor=1 -c -f archive.tar \
30744       --listed-incremental db \
30745       --warning=no-file-changed \
30746       -v dir dir/sub >/dev/null
30747)
30748) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30749at_status=$? at_failed=false
30750$at_check_filter
30751echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
30752tar: dir/sub: Directory is new
30753tar: dir/sub: Cannot open: No such file or directory
30754tar: Exiting with failure status due to previous errors
30755" | \
30756  $at_diff - "$at_stderr" || at_failed=:
30757echo stdout:; cat "$at_stdout"
30758at_fn_check_status 2 $at_status "$at_srcdir/dirrem02.at:34"
30759$at_failed && at_fn_log_failure
30760$at_traceon; }
30761
30762
30763
30764
30765  set +x
30766  $at_times_p && times >"$at_times_file"
30767) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30768read at_status <"$at_status_file"
30769#AT_STOP_132
30770#AT_START_133
30771at_fn_group_banner 133 'rename01.at:24' \
30772  "renamed dirs in incrementals" "                   " 19
30773at_xfail=no
30774      test -f $XFAILFILE && at_xfail=yes
30775(
30776  $as_echo "133. $at_setup_line: testing $at_desc ..."
30777  $at_traceon
30778
30779
30780
30781
30782
30783  { set +x
30784$as_echo "$at_srcdir/rename01.at:27:
30785mkdir gnu
30786(cd gnu
30787TEST_TAR_FORMAT=gnu
30788export TEST_TAR_FORMAT
30789TAR_OPTIONS=\"-H gnu\"
30790export TAR_OPTIONS
30791rm -rf *
30792
30793
30794test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30795
30796
30797mkdir foo
30798genfile --file foo/file1
30799genfile --file foo/file2
30800mkdir foo/bar
30801genfile --file foo/bar/file
30802
30803echo \"Creating base archive\"
30804tar -g incr -cf arch.1 -v foo
30805
30806mv foo/bar foo/baz
30807
30808echo \"Creating incremental archive\"
30809tar -g incr -cf arch.2 -v foo
30810
30811mv foo old
30812
30813tar xfg arch.1 /dev/null
30814
30815echo \"Begin directory listing 1\"
30816find foo | sort
30817echo \"End directory listing 1\"
30818
30819tar xfg arch.2 /dev/null
30820echo Begin directory listing 2
30821find foo | sort
30822echo End directory listing 2
30823)"
30824at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
30825( $at_check_trace;
30826mkdir gnu
30827(cd gnu
30828TEST_TAR_FORMAT=gnu
30829export TEST_TAR_FORMAT
30830TAR_OPTIONS="-H gnu"
30831export TAR_OPTIONS
30832rm -rf *
30833
30834
30835test -z "`sort < /dev/null 2>&1`" || exit 77
30836
30837
30838mkdir foo
30839genfile --file foo/file1
30840genfile --file foo/file2
30841mkdir foo/bar
30842genfile --file foo/bar/file
30843
30844echo "Creating base archive"
30845tar -g incr -cf arch.1 -v foo
30846
30847mv foo/bar foo/baz
30848
30849echo "Creating incremental archive"
30850tar -g incr -cf arch.2 -v foo
30851
30852mv foo old
30853
30854tar xfg arch.1 /dev/null
30855
30856echo "Begin directory listing 1"
30857find foo | sort
30858echo "End directory listing 1"
30859
30860tar xfg arch.2 /dev/null
30861echo Begin directory listing 2
30862find foo | sort
30863echo End directory listing 2
30864)
30865) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30866at_status=$? at_failed=false
30867$at_check_filter
30868echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
30869tar: foo/bar: Directory is new
30870tar: foo/baz: Directory has been renamed from 'foo/bar'
30871" | \
30872  $at_diff - "$at_stderr" || at_failed=:
30873echo >>"$at_stdout"; $as_echo "Creating base archive
30874foo/
30875foo/bar/
30876foo/file1
30877foo/file2
30878foo/bar/file
30879Creating incremental archive
30880foo/
30881foo/baz/
30882Begin directory listing 1
30883foo
30884foo/bar
30885foo/bar/file
30886foo/file1
30887foo/file2
30888End directory listing 1
30889Begin directory listing 2
30890foo
30891foo/baz
30892foo/baz/file
30893foo/file1
30894foo/file2
30895End directory listing 2
30896" | \
30897  $at_diff - "$at_stdout" || at_failed=:
30898at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
30899$at_failed && at_fn_log_failure
30900$at_traceon; }
30901
30902              { set +x
30903$as_echo "$at_srcdir/rename01.at:27:
30904mkdir oldgnu
30905(cd oldgnu
30906TEST_TAR_FORMAT=oldgnu
30907export TEST_TAR_FORMAT
30908TAR_OPTIONS=\"-H oldgnu\"
30909export TAR_OPTIONS
30910rm -rf *
30911
30912
30913test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30914
30915
30916mkdir foo
30917genfile --file foo/file1
30918genfile --file foo/file2
30919mkdir foo/bar
30920genfile --file foo/bar/file
30921
30922echo \"Creating base archive\"
30923tar -g incr -cf arch.1 -v foo
30924
30925mv foo/bar foo/baz
30926
30927echo \"Creating incremental archive\"
30928tar -g incr -cf arch.2 -v foo
30929
30930mv foo old
30931
30932tar xfg arch.1 /dev/null
30933
30934echo \"Begin directory listing 1\"
30935find foo | sort
30936echo \"End directory listing 1\"
30937
30938tar xfg arch.2 /dev/null
30939echo Begin directory listing 2
30940find foo | sort
30941echo End directory listing 2
30942)"
30943at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
30944( $at_check_trace;
30945mkdir oldgnu
30946(cd oldgnu
30947TEST_TAR_FORMAT=oldgnu
30948export TEST_TAR_FORMAT
30949TAR_OPTIONS="-H oldgnu"
30950export TAR_OPTIONS
30951rm -rf *
30952
30953
30954test -z "`sort < /dev/null 2>&1`" || exit 77
30955
30956
30957mkdir foo
30958genfile --file foo/file1
30959genfile --file foo/file2
30960mkdir foo/bar
30961genfile --file foo/bar/file
30962
30963echo "Creating base archive"
30964tar -g incr -cf arch.1 -v foo
30965
30966mv foo/bar foo/baz
30967
30968echo "Creating incremental archive"
30969tar -g incr -cf arch.2 -v foo
30970
30971mv foo old
30972
30973tar xfg arch.1 /dev/null
30974
30975echo "Begin directory listing 1"
30976find foo | sort
30977echo "End directory listing 1"
30978
30979tar xfg arch.2 /dev/null
30980echo Begin directory listing 2
30981find foo | sort
30982echo End directory listing 2
30983)
30984) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30985at_status=$? at_failed=false
30986$at_check_filter
30987echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
30988tar: foo/bar: Directory is new
30989tar: foo/baz: Directory has been renamed from 'foo/bar'
30990" | \
30991  $at_diff - "$at_stderr" || at_failed=:
30992echo >>"$at_stdout"; $as_echo "Creating base archive
30993foo/
30994foo/bar/
30995foo/file1
30996foo/file2
30997foo/bar/file
30998Creating incremental archive
30999foo/
31000foo/baz/
31001Begin directory listing 1
31002foo
31003foo/bar
31004foo/bar/file
31005foo/file1
31006foo/file2
31007End directory listing 1
31008Begin directory listing 2
31009foo
31010foo/baz
31011foo/baz/file
31012foo/file1
31013foo/file2
31014End directory listing 2
31015" | \
31016  $at_diff - "$at_stdout" || at_failed=:
31017at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
31018$at_failed && at_fn_log_failure
31019$at_traceon; }
31020
31021              { set +x
31022$as_echo "$at_srcdir/rename01.at:27:
31023mkdir posix
31024(cd posix
31025TEST_TAR_FORMAT=posix
31026export TEST_TAR_FORMAT
31027TAR_OPTIONS=\"-H posix\"
31028export TAR_OPTIONS
31029rm -rf *
31030
31031
31032test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31033
31034
31035mkdir foo
31036genfile --file foo/file1
31037genfile --file foo/file2
31038mkdir foo/bar
31039genfile --file foo/bar/file
31040
31041echo \"Creating base archive\"
31042tar -g incr -cf arch.1 -v foo
31043
31044mv foo/bar foo/baz
31045
31046echo \"Creating incremental archive\"
31047tar -g incr -cf arch.2 -v foo
31048
31049mv foo old
31050
31051tar xfg arch.1 /dev/null
31052
31053echo \"Begin directory listing 1\"
31054find foo | sort
31055echo \"End directory listing 1\"
31056
31057tar xfg arch.2 /dev/null
31058echo Begin directory listing 2
31059find foo | sort
31060echo End directory listing 2
31061)"
31062at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
31063( $at_check_trace;
31064mkdir posix
31065(cd posix
31066TEST_TAR_FORMAT=posix
31067export TEST_TAR_FORMAT
31068TAR_OPTIONS="-H posix"
31069export TAR_OPTIONS
31070rm -rf *
31071
31072
31073test -z "`sort < /dev/null 2>&1`" || exit 77
31074
31075
31076mkdir foo
31077genfile --file foo/file1
31078genfile --file foo/file2
31079mkdir foo/bar
31080genfile --file foo/bar/file
31081
31082echo "Creating base archive"
31083tar -g incr -cf arch.1 -v foo
31084
31085mv foo/bar foo/baz
31086
31087echo "Creating incremental archive"
31088tar -g incr -cf arch.2 -v foo
31089
31090mv foo old
31091
31092tar xfg arch.1 /dev/null
31093
31094echo "Begin directory listing 1"
31095find foo | sort
31096echo "End directory listing 1"
31097
31098tar xfg arch.2 /dev/null
31099echo Begin directory listing 2
31100find foo | sort
31101echo End directory listing 2
31102)
31103) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31104at_status=$? at_failed=false
31105$at_check_filter
31106echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
31107tar: foo/bar: Directory is new
31108tar: foo/baz: Directory has been renamed from 'foo/bar'
31109" | \
31110  $at_diff - "$at_stderr" || at_failed=:
31111echo >>"$at_stdout"; $as_echo "Creating base archive
31112foo/
31113foo/bar/
31114foo/file1
31115foo/file2
31116foo/bar/file
31117Creating incremental archive
31118foo/
31119foo/baz/
31120Begin directory listing 1
31121foo
31122foo/bar
31123foo/bar/file
31124foo/file1
31125foo/file2
31126End directory listing 1
31127Begin directory listing 2
31128foo
31129foo/baz
31130foo/baz/file
31131foo/file1
31132foo/file2
31133End directory listing 2
31134" | \
31135  $at_diff - "$at_stdout" || at_failed=:
31136at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
31137$at_failed && at_fn_log_failure
31138$at_traceon; }
31139
31140
31141
31142
31143  set +x
31144  $at_times_p && times >"$at_times_file"
31145) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31146read at_status <"$at_status_file"
31147#AT_STOP_133
31148#AT_START_134
31149at_fn_group_banner 134 'rename02.at:24' \
31150  "move between hierarchies" "                       " 19
31151at_xfail=no
31152      test -f $XFAILFILE && at_xfail=yes
31153(
31154  $as_echo "134. $at_setup_line: testing $at_desc ..."
31155  $at_traceon
31156
31157
31158
31159
31160
31161  { set +x
31162$as_echo "$at_srcdir/rename02.at:27:
31163mkdir gnu
31164(cd gnu
31165TEST_TAR_FORMAT=gnu
31166export TEST_TAR_FORMAT
31167TAR_OPTIONS=\"-H gnu\"
31168export TAR_OPTIONS
31169rm -rf *
31170
31171
31172test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31173
31174mkdir foo
31175genfile --file foo/file1
31176genfile --file foo/file2
31177mkdir foo/bar
31178genfile --file foo/bar/file.r
31179mkdir foo/bar/baz
31180genfile --file foo/bar/baz/file.z
31181
31182sleep 1
31183
31184echo \"Creating base archive\"
31185tar -g incr -cf arch.1 -v foo
31186
31187mv foo/bar/baz foo
31188
31189echo \"Creating incremental archive\"
31190tar -g incr -cf arch.2 -v foo
31191
31192mv foo old
31193
31194tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
31195sort tmperr >&2
31196
31197echo \"Begin directory listing 1\"
31198find foo | sort
31199echo \"End directory listing 1\"
31200
31201tar xfgv arch.2 /dev/null --warning=no-timestamp
31202echo Begin directory listing 2
31203find foo | sort
31204echo End directory listing 2
31205)"
31206at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
31207( $at_check_trace;
31208mkdir gnu
31209(cd gnu
31210TEST_TAR_FORMAT=gnu
31211export TEST_TAR_FORMAT
31212TAR_OPTIONS="-H gnu"
31213export TAR_OPTIONS
31214rm -rf *
31215
31216
31217test -z "`sort < /dev/null 2>&1`" || exit 77
31218
31219mkdir foo
31220genfile --file foo/file1
31221genfile --file foo/file2
31222mkdir foo/bar
31223genfile --file foo/bar/file.r
31224mkdir foo/bar/baz
31225genfile --file foo/bar/baz/file.z
31226
31227sleep 1
31228
31229echo "Creating base archive"
31230tar -g incr -cf arch.1 -v foo
31231
31232mv foo/bar/baz foo
31233
31234echo "Creating incremental archive"
31235tar -g incr -cf arch.2 -v foo
31236
31237mv foo old
31238
31239tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
31240sort tmperr >&2
31241
31242echo "Begin directory listing 1"
31243find foo | sort
31244echo "End directory listing 1"
31245
31246tar xfgv arch.2 /dev/null --warning=no-timestamp
31247echo Begin directory listing 2
31248find foo | sort
31249echo End directory listing 2
31250)
31251) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31252at_status=$? at_failed=false
31253$at_check_filter
31254echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
31255tar: foo/bar: Directory is new
31256tar: foo/bar/baz: Directory is new
31257tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
31258" | \
31259  $at_diff - "$at_stderr" || at_failed=:
31260echo >>"$at_stdout"; $as_echo "Creating base archive
31261foo/
31262foo/bar/
31263foo/bar/baz/
31264foo/file1
31265foo/file2
31266foo/bar/file.r
31267foo/bar/baz/file.z
31268Creating incremental archive
31269foo/
31270foo/bar/
31271foo/baz/
31272Begin directory listing 1
31273foo
31274foo/bar
31275foo/bar/baz
31276foo/bar/baz/file.z
31277foo/bar/file.r
31278foo/file1
31279foo/file2
31280End directory listing 1
31281foo/
31282foo/bar/
31283foo/baz/
31284Begin directory listing 2
31285foo
31286foo/bar
31287foo/bar/file.r
31288foo/baz
31289foo/baz/file.z
31290foo/file1
31291foo/file2
31292End directory listing 2
31293" | \
31294  $at_diff - "$at_stdout" || at_failed=:
31295at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
31296$at_failed && at_fn_log_failure
31297$at_traceon; }
31298
31299              { set +x
31300$as_echo "$at_srcdir/rename02.at:27:
31301mkdir oldgnu
31302(cd oldgnu
31303TEST_TAR_FORMAT=oldgnu
31304export TEST_TAR_FORMAT
31305TAR_OPTIONS=\"-H oldgnu\"
31306export TAR_OPTIONS
31307rm -rf *
31308
31309
31310test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31311
31312mkdir foo
31313genfile --file foo/file1
31314genfile --file foo/file2
31315mkdir foo/bar
31316genfile --file foo/bar/file.r
31317mkdir foo/bar/baz
31318genfile --file foo/bar/baz/file.z
31319
31320sleep 1
31321
31322echo \"Creating base archive\"
31323tar -g incr -cf arch.1 -v foo
31324
31325mv foo/bar/baz foo
31326
31327echo \"Creating incremental archive\"
31328tar -g incr -cf arch.2 -v foo
31329
31330mv foo old
31331
31332tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
31333sort tmperr >&2
31334
31335echo \"Begin directory listing 1\"
31336find foo | sort
31337echo \"End directory listing 1\"
31338
31339tar xfgv arch.2 /dev/null --warning=no-timestamp
31340echo Begin directory listing 2
31341find foo | sort
31342echo End directory listing 2
31343)"
31344at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
31345( $at_check_trace;
31346mkdir oldgnu
31347(cd oldgnu
31348TEST_TAR_FORMAT=oldgnu
31349export TEST_TAR_FORMAT
31350TAR_OPTIONS="-H oldgnu"
31351export TAR_OPTIONS
31352rm -rf *
31353
31354
31355test -z "`sort < /dev/null 2>&1`" || exit 77
31356
31357mkdir foo
31358genfile --file foo/file1
31359genfile --file foo/file2
31360mkdir foo/bar
31361genfile --file foo/bar/file.r
31362mkdir foo/bar/baz
31363genfile --file foo/bar/baz/file.z
31364
31365sleep 1
31366
31367echo "Creating base archive"
31368tar -g incr -cf arch.1 -v foo
31369
31370mv foo/bar/baz foo
31371
31372echo "Creating incremental archive"
31373tar -g incr -cf arch.2 -v foo
31374
31375mv foo old
31376
31377tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
31378sort tmperr >&2
31379
31380echo "Begin directory listing 1"
31381find foo | sort
31382echo "End directory listing 1"
31383
31384tar xfgv arch.2 /dev/null --warning=no-timestamp
31385echo Begin directory listing 2
31386find foo | sort
31387echo End directory listing 2
31388)
31389) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31390at_status=$? at_failed=false
31391$at_check_filter
31392echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
31393tar: foo/bar: Directory is new
31394tar: foo/bar/baz: Directory is new
31395tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
31396" | \
31397  $at_diff - "$at_stderr" || at_failed=:
31398echo >>"$at_stdout"; $as_echo "Creating base archive
31399foo/
31400foo/bar/
31401foo/bar/baz/
31402foo/file1
31403foo/file2
31404foo/bar/file.r
31405foo/bar/baz/file.z
31406Creating incremental archive
31407foo/
31408foo/bar/
31409foo/baz/
31410Begin directory listing 1
31411foo
31412foo/bar
31413foo/bar/baz
31414foo/bar/baz/file.z
31415foo/bar/file.r
31416foo/file1
31417foo/file2
31418End directory listing 1
31419foo/
31420foo/bar/
31421foo/baz/
31422Begin directory listing 2
31423foo
31424foo/bar
31425foo/bar/file.r
31426foo/baz
31427foo/baz/file.z
31428foo/file1
31429foo/file2
31430End directory listing 2
31431" | \
31432  $at_diff - "$at_stdout" || at_failed=:
31433at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
31434$at_failed && at_fn_log_failure
31435$at_traceon; }
31436
31437              { set +x
31438$as_echo "$at_srcdir/rename02.at:27:
31439mkdir posix
31440(cd posix
31441TEST_TAR_FORMAT=posix
31442export TEST_TAR_FORMAT
31443TAR_OPTIONS=\"-H posix\"
31444export TAR_OPTIONS
31445rm -rf *
31446
31447
31448test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31449
31450mkdir foo
31451genfile --file foo/file1
31452genfile --file foo/file2
31453mkdir foo/bar
31454genfile --file foo/bar/file.r
31455mkdir foo/bar/baz
31456genfile --file foo/bar/baz/file.z
31457
31458sleep 1
31459
31460echo \"Creating base archive\"
31461tar -g incr -cf arch.1 -v foo
31462
31463mv foo/bar/baz foo
31464
31465echo \"Creating incremental archive\"
31466tar -g incr -cf arch.2 -v foo
31467
31468mv foo old
31469
31470tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
31471sort tmperr >&2
31472
31473echo \"Begin directory listing 1\"
31474find foo | sort
31475echo \"End directory listing 1\"
31476
31477tar xfgv arch.2 /dev/null --warning=no-timestamp
31478echo Begin directory listing 2
31479find foo | sort
31480echo End directory listing 2
31481)"
31482at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
31483( $at_check_trace;
31484mkdir posix
31485(cd posix
31486TEST_TAR_FORMAT=posix
31487export TEST_TAR_FORMAT
31488TAR_OPTIONS="-H posix"
31489export TAR_OPTIONS
31490rm -rf *
31491
31492
31493test -z "`sort < /dev/null 2>&1`" || exit 77
31494
31495mkdir foo
31496genfile --file foo/file1
31497genfile --file foo/file2
31498mkdir foo/bar
31499genfile --file foo/bar/file.r
31500mkdir foo/bar/baz
31501genfile --file foo/bar/baz/file.z
31502
31503sleep 1
31504
31505echo "Creating base archive"
31506tar -g incr -cf arch.1 -v foo
31507
31508mv foo/bar/baz foo
31509
31510echo "Creating incremental archive"
31511tar -g incr -cf arch.2 -v foo
31512
31513mv foo old
31514
31515tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
31516sort tmperr >&2
31517
31518echo "Begin directory listing 1"
31519find foo | sort
31520echo "End directory listing 1"
31521
31522tar xfgv arch.2 /dev/null --warning=no-timestamp
31523echo Begin directory listing 2
31524find foo | sort
31525echo End directory listing 2
31526)
31527) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31528at_status=$? at_failed=false
31529$at_check_filter
31530echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
31531tar: foo/bar: Directory is new
31532tar: foo/bar/baz: Directory is new
31533tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
31534" | \
31535  $at_diff - "$at_stderr" || at_failed=:
31536echo >>"$at_stdout"; $as_echo "Creating base archive
31537foo/
31538foo/bar/
31539foo/bar/baz/
31540foo/file1
31541foo/file2
31542foo/bar/file.r
31543foo/bar/baz/file.z
31544Creating incremental archive
31545foo/
31546foo/bar/
31547foo/baz/
31548Begin directory listing 1
31549foo
31550foo/bar
31551foo/bar/baz
31552foo/bar/baz/file.z
31553foo/bar/file.r
31554foo/file1
31555foo/file2
31556End directory listing 1
31557foo/
31558foo/bar/
31559foo/baz/
31560Begin directory listing 2
31561foo
31562foo/bar
31563foo/bar/file.r
31564foo/baz
31565foo/baz/file.z
31566foo/file1
31567foo/file2
31568End directory listing 2
31569" | \
31570  $at_diff - "$at_stdout" || at_failed=:
31571at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
31572$at_failed && at_fn_log_failure
31573$at_traceon; }
31574
31575
31576
31577
31578  set +x
31579  $at_times_p && times >"$at_times_file"
31580) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31581read at_status <"$at_status_file"
31582#AT_STOP_134
31583#AT_START_135
31584at_fn_group_banner 135 'rename03.at:23' \
31585  "cyclic renames" "                                 " 19
31586at_xfail=no
31587      test -f $XFAILFILE && at_xfail=yes
31588(
31589  $as_echo "135. $at_setup_line: testing $at_desc ..."
31590  $at_traceon
31591
31592
31593
31594
31595
31596  { set +x
31597$as_echo "$at_srcdir/rename03.at:26:
31598mkdir gnu
31599(cd gnu
31600TEST_TAR_FORMAT=gnu
31601export TEST_TAR_FORMAT
31602TAR_OPTIONS=\"-H gnu\"
31603export TAR_OPTIONS
31604rm -rf *
31605
31606
31607test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31608
31609
31610mkdir foo
31611genfile --file foo/file1
31612genfile --file foo/file2
31613
31614mkdir foo/a
31615genfile --file foo/a/filea
31616
31617mkdir foo/b
31618genfile --file foo/b/fileb
31619
31620mkdir foo/c
31621genfile --file foo/c/filec
31622
31623sleep 1
31624
31625echo \"First dump\"
31626echo \"First dump\">&2
31627tar -g incr -cf arch.1 -v foo 2>tmperr
31628sort tmperr >&2
31629
31630# Shuffle directories:
31631(cd foo
31632mv a \$\$
31633mv c a
31634mv b c
31635mv \$\$ b)
31636
31637echo \"Second dump\"
31638echo \"Second dump\" >&2
31639tar -g incr -cf arch.2 -v foo 2>tmperr
31640sort tmperr >&2
31641
31642tar xfg arch.1 /dev/null --warning=no-timestamp
31643
31644echo \"Begin directory listing 1\"
31645find foo | sort
31646echo \"End directory listing 1\"
31647
31648tar xfgv arch.2 /dev/null --warning=no-timestamp
31649echo Begin directory listing 2
31650find foo | sort
31651echo End directory listing 2
31652)"
31653at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
31654( $at_check_trace;
31655mkdir gnu
31656(cd gnu
31657TEST_TAR_FORMAT=gnu
31658export TEST_TAR_FORMAT
31659TAR_OPTIONS="-H gnu"
31660export TAR_OPTIONS
31661rm -rf *
31662
31663
31664test -z "`sort < /dev/null 2>&1`" || exit 77
31665
31666
31667mkdir foo
31668genfile --file foo/file1
31669genfile --file foo/file2
31670
31671mkdir foo/a
31672genfile --file foo/a/filea
31673
31674mkdir foo/b
31675genfile --file foo/b/fileb
31676
31677mkdir foo/c
31678genfile --file foo/c/filec
31679
31680sleep 1
31681
31682echo "First dump"
31683echo "First dump">&2
31684tar -g incr -cf arch.1 -v foo 2>tmperr
31685sort tmperr >&2
31686
31687# Shuffle directories:
31688(cd foo
31689mv a $$
31690mv c a
31691mv b c
31692mv $$ b)
31693
31694echo "Second dump"
31695echo "Second dump" >&2
31696tar -g incr -cf arch.2 -v foo 2>tmperr
31697sort tmperr >&2
31698
31699tar xfg arch.1 /dev/null --warning=no-timestamp
31700
31701echo "Begin directory listing 1"
31702find foo | sort
31703echo "End directory listing 1"
31704
31705tar xfgv arch.2 /dev/null --warning=no-timestamp
31706echo Begin directory listing 2
31707find foo | sort
31708echo End directory listing 2
31709)
31710) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31711at_status=$? at_failed=false
31712$at_check_filter
31713echo >>"$at_stderr"; $as_echo "First dump
31714tar: foo/a: Directory is new
31715tar: foo/b: Directory is new
31716tar: foo/c: Directory is new
31717tar: foo: Directory is new
31718Second dump
31719tar: foo/a: Directory has been renamed from 'foo/c'
31720tar: foo/b: Directory has been renamed from 'foo/a'
31721tar: foo/c: Directory has been renamed from 'foo/b'
31722" | \
31723  $at_diff - "$at_stderr" || at_failed=:
31724echo >>"$at_stdout"; $as_echo "First dump
31725foo/
31726foo/a/
31727foo/b/
31728foo/c/
31729foo/file1
31730foo/file2
31731foo/a/filea
31732foo/b/fileb
31733foo/c/filec
31734Second dump
31735foo/
31736foo/a/
31737foo/b/
31738foo/c/
31739Begin directory listing 1
31740foo
31741foo/a
31742foo/a/filea
31743foo/b
31744foo/b/fileb
31745foo/c
31746foo/c/filec
31747foo/file1
31748foo/file2
31749End directory listing 1
31750foo/
31751foo/a/
31752foo/b/
31753foo/c/
31754Begin directory listing 2
31755foo
31756foo/a
31757foo/a/filec
31758foo/b
31759foo/b/filea
31760foo/c
31761foo/c/fileb
31762foo/file1
31763foo/file2
31764End directory listing 2
31765" | \
31766  $at_diff - "$at_stdout" || at_failed=:
31767at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
31768$at_failed && at_fn_log_failure
31769$at_traceon; }
31770
31771              { set +x
31772$as_echo "$at_srcdir/rename03.at:26:
31773mkdir oldgnu
31774(cd oldgnu
31775TEST_TAR_FORMAT=oldgnu
31776export TEST_TAR_FORMAT
31777TAR_OPTIONS=\"-H oldgnu\"
31778export TAR_OPTIONS
31779rm -rf *
31780
31781
31782test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31783
31784
31785mkdir foo
31786genfile --file foo/file1
31787genfile --file foo/file2
31788
31789mkdir foo/a
31790genfile --file foo/a/filea
31791
31792mkdir foo/b
31793genfile --file foo/b/fileb
31794
31795mkdir foo/c
31796genfile --file foo/c/filec
31797
31798sleep 1
31799
31800echo \"First dump\"
31801echo \"First dump\">&2
31802tar -g incr -cf arch.1 -v foo 2>tmperr
31803sort tmperr >&2
31804
31805# Shuffle directories:
31806(cd foo
31807mv a \$\$
31808mv c a
31809mv b c
31810mv \$\$ b)
31811
31812echo \"Second dump\"
31813echo \"Second dump\" >&2
31814tar -g incr -cf arch.2 -v foo 2>tmperr
31815sort tmperr >&2
31816
31817tar xfg arch.1 /dev/null --warning=no-timestamp
31818
31819echo \"Begin directory listing 1\"
31820find foo | sort
31821echo \"End directory listing 1\"
31822
31823tar xfgv arch.2 /dev/null --warning=no-timestamp
31824echo Begin directory listing 2
31825find foo | sort
31826echo End directory listing 2
31827)"
31828at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
31829( $at_check_trace;
31830mkdir oldgnu
31831(cd oldgnu
31832TEST_TAR_FORMAT=oldgnu
31833export TEST_TAR_FORMAT
31834TAR_OPTIONS="-H oldgnu"
31835export TAR_OPTIONS
31836rm -rf *
31837
31838
31839test -z "`sort < /dev/null 2>&1`" || exit 77
31840
31841
31842mkdir foo
31843genfile --file foo/file1
31844genfile --file foo/file2
31845
31846mkdir foo/a
31847genfile --file foo/a/filea
31848
31849mkdir foo/b
31850genfile --file foo/b/fileb
31851
31852mkdir foo/c
31853genfile --file foo/c/filec
31854
31855sleep 1
31856
31857echo "First dump"
31858echo "First dump">&2
31859tar -g incr -cf arch.1 -v foo 2>tmperr
31860sort tmperr >&2
31861
31862# Shuffle directories:
31863(cd foo
31864mv a $$
31865mv c a
31866mv b c
31867mv $$ b)
31868
31869echo "Second dump"
31870echo "Second dump" >&2
31871tar -g incr -cf arch.2 -v foo 2>tmperr
31872sort tmperr >&2
31873
31874tar xfg arch.1 /dev/null --warning=no-timestamp
31875
31876echo "Begin directory listing 1"
31877find foo | sort
31878echo "End directory listing 1"
31879
31880tar xfgv arch.2 /dev/null --warning=no-timestamp
31881echo Begin directory listing 2
31882find foo | sort
31883echo End directory listing 2
31884)
31885) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31886at_status=$? at_failed=false
31887$at_check_filter
31888echo >>"$at_stderr"; $as_echo "First dump
31889tar: foo/a: Directory is new
31890tar: foo/b: Directory is new
31891tar: foo/c: Directory is new
31892tar: foo: Directory is new
31893Second dump
31894tar: foo/a: Directory has been renamed from 'foo/c'
31895tar: foo/b: Directory has been renamed from 'foo/a'
31896tar: foo/c: Directory has been renamed from 'foo/b'
31897" | \
31898  $at_diff - "$at_stderr" || at_failed=:
31899echo >>"$at_stdout"; $as_echo "First dump
31900foo/
31901foo/a/
31902foo/b/
31903foo/c/
31904foo/file1
31905foo/file2
31906foo/a/filea
31907foo/b/fileb
31908foo/c/filec
31909Second dump
31910foo/
31911foo/a/
31912foo/b/
31913foo/c/
31914Begin directory listing 1
31915foo
31916foo/a
31917foo/a/filea
31918foo/b
31919foo/b/fileb
31920foo/c
31921foo/c/filec
31922foo/file1
31923foo/file2
31924End directory listing 1
31925foo/
31926foo/a/
31927foo/b/
31928foo/c/
31929Begin directory listing 2
31930foo
31931foo/a
31932foo/a/filec
31933foo/b
31934foo/b/filea
31935foo/c
31936foo/c/fileb
31937foo/file1
31938foo/file2
31939End directory listing 2
31940" | \
31941  $at_diff - "$at_stdout" || at_failed=:
31942at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
31943$at_failed && at_fn_log_failure
31944$at_traceon; }
31945
31946              { set +x
31947$as_echo "$at_srcdir/rename03.at:26:
31948mkdir posix
31949(cd posix
31950TEST_TAR_FORMAT=posix
31951export TEST_TAR_FORMAT
31952TAR_OPTIONS=\"-H posix\"
31953export TAR_OPTIONS
31954rm -rf *
31955
31956
31957test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31958
31959
31960mkdir foo
31961genfile --file foo/file1
31962genfile --file foo/file2
31963
31964mkdir foo/a
31965genfile --file foo/a/filea
31966
31967mkdir foo/b
31968genfile --file foo/b/fileb
31969
31970mkdir foo/c
31971genfile --file foo/c/filec
31972
31973sleep 1
31974
31975echo \"First dump\"
31976echo \"First dump\">&2
31977tar -g incr -cf arch.1 -v foo 2>tmperr
31978sort tmperr >&2
31979
31980# Shuffle directories:
31981(cd foo
31982mv a \$\$
31983mv c a
31984mv b c
31985mv \$\$ b)
31986
31987echo \"Second dump\"
31988echo \"Second dump\" >&2
31989tar -g incr -cf arch.2 -v foo 2>tmperr
31990sort tmperr >&2
31991
31992tar xfg arch.1 /dev/null --warning=no-timestamp
31993
31994echo \"Begin directory listing 1\"
31995find foo | sort
31996echo \"End directory listing 1\"
31997
31998tar xfgv arch.2 /dev/null --warning=no-timestamp
31999echo Begin directory listing 2
32000find foo | sort
32001echo End directory listing 2
32002)"
32003at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
32004( $at_check_trace;
32005mkdir posix
32006(cd posix
32007TEST_TAR_FORMAT=posix
32008export TEST_TAR_FORMAT
32009TAR_OPTIONS="-H posix"
32010export TAR_OPTIONS
32011rm -rf *
32012
32013
32014test -z "`sort < /dev/null 2>&1`" || exit 77
32015
32016
32017mkdir foo
32018genfile --file foo/file1
32019genfile --file foo/file2
32020
32021mkdir foo/a
32022genfile --file foo/a/filea
32023
32024mkdir foo/b
32025genfile --file foo/b/fileb
32026
32027mkdir foo/c
32028genfile --file foo/c/filec
32029
32030sleep 1
32031
32032echo "First dump"
32033echo "First dump">&2
32034tar -g incr -cf arch.1 -v foo 2>tmperr
32035sort tmperr >&2
32036
32037# Shuffle directories:
32038(cd foo
32039mv a $$
32040mv c a
32041mv b c
32042mv $$ b)
32043
32044echo "Second dump"
32045echo "Second dump" >&2
32046tar -g incr -cf arch.2 -v foo 2>tmperr
32047sort tmperr >&2
32048
32049tar xfg arch.1 /dev/null --warning=no-timestamp
32050
32051echo "Begin directory listing 1"
32052find foo | sort
32053echo "End directory listing 1"
32054
32055tar xfgv arch.2 /dev/null --warning=no-timestamp
32056echo Begin directory listing 2
32057find foo | sort
32058echo End directory listing 2
32059)
32060) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32061at_status=$? at_failed=false
32062$at_check_filter
32063echo >>"$at_stderr"; $as_echo "First dump
32064tar: foo/a: Directory is new
32065tar: foo/b: Directory is new
32066tar: foo/c: Directory is new
32067tar: foo: Directory is new
32068Second dump
32069tar: foo/a: Directory has been renamed from 'foo/c'
32070tar: foo/b: Directory has been renamed from 'foo/a'
32071tar: foo/c: Directory has been renamed from 'foo/b'
32072" | \
32073  $at_diff - "$at_stderr" || at_failed=:
32074echo >>"$at_stdout"; $as_echo "First dump
32075foo/
32076foo/a/
32077foo/b/
32078foo/c/
32079foo/file1
32080foo/file2
32081foo/a/filea
32082foo/b/fileb
32083foo/c/filec
32084Second dump
32085foo/
32086foo/a/
32087foo/b/
32088foo/c/
32089Begin directory listing 1
32090foo
32091foo/a
32092foo/a/filea
32093foo/b
32094foo/b/fileb
32095foo/c
32096foo/c/filec
32097foo/file1
32098foo/file2
32099End directory listing 1
32100foo/
32101foo/a/
32102foo/b/
32103foo/c/
32104Begin directory listing 2
32105foo
32106foo/a
32107foo/a/filec
32108foo/b
32109foo/b/filea
32110foo/c
32111foo/c/fileb
32112foo/file1
32113foo/file2
32114End directory listing 2
32115" | \
32116  $at_diff - "$at_stdout" || at_failed=:
32117at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
32118$at_failed && at_fn_log_failure
32119$at_traceon; }
32120
32121
32122
32123
32124  set +x
32125  $at_times_p && times >"$at_times_file"
32126) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32127read at_status <"$at_status_file"
32128#AT_STOP_135
32129#AT_START_136
32130at_fn_group_banner 136 'rename04.at:27' \
32131  "renamed directory containing subdirectories" "    " 19
32132at_xfail=no
32133      test -f $XFAILFILE && at_xfail=yes
32134(
32135  $as_echo "136. $at_setup_line: testing $at_desc ..."
32136  $at_traceon
32137
32138
32139
32140
32141
32142  { set +x
32143$as_echo "$at_srcdir/rename04.at:30:
32144mkdir gnu
32145(cd gnu
32146TEST_TAR_FORMAT=gnu
32147export TEST_TAR_FORMAT
32148TAR_OPTIONS=\"-H gnu\"
32149export TAR_OPTIONS
32150rm -rf *
32151
32152
32153test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32154
32155
32156decho Creating directory structure
32157mkdir directory
32158mkdir directory/subdir
32159genfile --file=directory/file
32160
32161decho Creating initial archive
32162tar -cf archive.1 -g db.1 directory
32163
32164decho Renaming
32165mv directory dir
32166
32167decho Creating incremental archive
32168cp db.1 db.2
32169tar -cf archive.2 -g db.2 dir
32170
32171mv dir orig
32172
32173decho First restore
32174tar -xf archive.1 -g db.1
32175find directory | sort
32176
32177decho Second restore
32178tar -xf archive.2 -g db.2
32179find dir | sort
32180)"
32181at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
32182( $at_check_trace;
32183mkdir gnu
32184(cd gnu
32185TEST_TAR_FORMAT=gnu
32186export TEST_TAR_FORMAT
32187TAR_OPTIONS="-H gnu"
32188export TAR_OPTIONS
32189rm -rf *
32190
32191
32192test -z "`sort < /dev/null 2>&1`" || exit 77
32193
32194
32195decho Creating directory structure
32196mkdir directory
32197mkdir directory/subdir
32198genfile --file=directory/file
32199
32200decho Creating initial archive
32201tar -cf archive.1 -g db.1 directory
32202
32203decho Renaming
32204mv directory dir
32205
32206decho Creating incremental archive
32207cp db.1 db.2
32208tar -cf archive.2 -g db.2 dir
32209
32210mv dir orig
32211
32212decho First restore
32213tar -xf archive.1 -g db.1
32214find directory | sort
32215
32216decho Second restore
32217tar -xf archive.2 -g db.2
32218find dir | sort
32219)
32220) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32221at_status=$? at_failed=false
32222$at_check_filter
32223echo >>"$at_stderr"; $as_echo "Creating directory structure
32224Creating initial archive
32225Renaming
32226Creating incremental archive
32227First restore
32228Second restore
32229" | \
32230  $at_diff - "$at_stderr" || at_failed=:
32231echo >>"$at_stdout"; $as_echo "Creating directory structure
32232Creating initial archive
32233Renaming
32234Creating incremental archive
32235First restore
32236directory
32237directory/file
32238directory/subdir
32239Second restore
32240dir
32241dir/subdir
32242" | \
32243  $at_diff - "$at_stdout" || at_failed=:
32244at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
32245$at_failed && at_fn_log_failure
32246$at_traceon; }
32247
32248              { set +x
32249$as_echo "$at_srcdir/rename04.at:30:
32250mkdir oldgnu
32251(cd oldgnu
32252TEST_TAR_FORMAT=oldgnu
32253export TEST_TAR_FORMAT
32254TAR_OPTIONS=\"-H oldgnu\"
32255export TAR_OPTIONS
32256rm -rf *
32257
32258
32259test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32260
32261
32262decho Creating directory structure
32263mkdir directory
32264mkdir directory/subdir
32265genfile --file=directory/file
32266
32267decho Creating initial archive
32268tar -cf archive.1 -g db.1 directory
32269
32270decho Renaming
32271mv directory dir
32272
32273decho Creating incremental archive
32274cp db.1 db.2
32275tar -cf archive.2 -g db.2 dir
32276
32277mv dir orig
32278
32279decho First restore
32280tar -xf archive.1 -g db.1
32281find directory | sort
32282
32283decho Second restore
32284tar -xf archive.2 -g db.2
32285find dir | sort
32286)"
32287at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
32288( $at_check_trace;
32289mkdir oldgnu
32290(cd oldgnu
32291TEST_TAR_FORMAT=oldgnu
32292export TEST_TAR_FORMAT
32293TAR_OPTIONS="-H oldgnu"
32294export TAR_OPTIONS
32295rm -rf *
32296
32297
32298test -z "`sort < /dev/null 2>&1`" || exit 77
32299
32300
32301decho Creating directory structure
32302mkdir directory
32303mkdir directory/subdir
32304genfile --file=directory/file
32305
32306decho Creating initial archive
32307tar -cf archive.1 -g db.1 directory
32308
32309decho Renaming
32310mv directory dir
32311
32312decho Creating incremental archive
32313cp db.1 db.2
32314tar -cf archive.2 -g db.2 dir
32315
32316mv dir orig
32317
32318decho First restore
32319tar -xf archive.1 -g db.1
32320find directory | sort
32321
32322decho Second restore
32323tar -xf archive.2 -g db.2
32324find dir | sort
32325)
32326) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32327at_status=$? at_failed=false
32328$at_check_filter
32329echo >>"$at_stderr"; $as_echo "Creating directory structure
32330Creating initial archive
32331Renaming
32332Creating incremental archive
32333First restore
32334Second restore
32335" | \
32336  $at_diff - "$at_stderr" || at_failed=:
32337echo >>"$at_stdout"; $as_echo "Creating directory structure
32338Creating initial archive
32339Renaming
32340Creating incremental archive
32341First restore
32342directory
32343directory/file
32344directory/subdir
32345Second restore
32346dir
32347dir/subdir
32348" | \
32349  $at_diff - "$at_stdout" || at_failed=:
32350at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
32351$at_failed && at_fn_log_failure
32352$at_traceon; }
32353
32354              { set +x
32355$as_echo "$at_srcdir/rename04.at:30:
32356mkdir posix
32357(cd posix
32358TEST_TAR_FORMAT=posix
32359export TEST_TAR_FORMAT
32360TAR_OPTIONS=\"-H posix\"
32361export TAR_OPTIONS
32362rm -rf *
32363
32364
32365test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32366
32367
32368decho Creating directory structure
32369mkdir directory
32370mkdir directory/subdir
32371genfile --file=directory/file
32372
32373decho Creating initial archive
32374tar -cf archive.1 -g db.1 directory
32375
32376decho Renaming
32377mv directory dir
32378
32379decho Creating incremental archive
32380cp db.1 db.2
32381tar -cf archive.2 -g db.2 dir
32382
32383mv dir orig
32384
32385decho First restore
32386tar -xf archive.1 -g db.1
32387find directory | sort
32388
32389decho Second restore
32390tar -xf archive.2 -g db.2
32391find dir | sort
32392)"
32393at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
32394( $at_check_trace;
32395mkdir posix
32396(cd posix
32397TEST_TAR_FORMAT=posix
32398export TEST_TAR_FORMAT
32399TAR_OPTIONS="-H posix"
32400export TAR_OPTIONS
32401rm -rf *
32402
32403
32404test -z "`sort < /dev/null 2>&1`" || exit 77
32405
32406
32407decho Creating directory structure
32408mkdir directory
32409mkdir directory/subdir
32410genfile --file=directory/file
32411
32412decho Creating initial archive
32413tar -cf archive.1 -g db.1 directory
32414
32415decho Renaming
32416mv directory dir
32417
32418decho Creating incremental archive
32419cp db.1 db.2
32420tar -cf archive.2 -g db.2 dir
32421
32422mv dir orig
32423
32424decho First restore
32425tar -xf archive.1 -g db.1
32426find directory | sort
32427
32428decho Second restore
32429tar -xf archive.2 -g db.2
32430find dir | sort
32431)
32432) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32433at_status=$? at_failed=false
32434$at_check_filter
32435echo >>"$at_stderr"; $as_echo "Creating directory structure
32436Creating initial archive
32437Renaming
32438Creating incremental archive
32439First restore
32440Second restore
32441" | \
32442  $at_diff - "$at_stderr" || at_failed=:
32443echo >>"$at_stdout"; $as_echo "Creating directory structure
32444Creating initial archive
32445Renaming
32446Creating incremental archive
32447First restore
32448directory
32449directory/file
32450directory/subdir
32451Second restore
32452dir
32453dir/subdir
32454" | \
32455  $at_diff - "$at_stdout" || at_failed=:
32456at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
32457$at_failed && at_fn_log_failure
32458$at_traceon; }
32459
32460
32461
32462
32463  set +x
32464  $at_times_p && times >"$at_times_file"
32465) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32466read at_status <"$at_status_file"
32467#AT_STOP_136
32468#AT_START_137
32469at_fn_group_banner 137 'rename05.at:24' \
32470  "renamed subdirectories" "                         " 19
32471at_xfail=no
32472      test -f $XFAILFILE && at_xfail=yes
32473(
32474  $as_echo "137. $at_setup_line: testing $at_desc ..."
32475  $at_traceon
32476
32477
32478
32479
32480
32481  { set +x
32482$as_echo "$at_srcdir/rename05.at:27:
32483mkdir gnu
32484(cd gnu
32485TEST_TAR_FORMAT=gnu
32486export TEST_TAR_FORMAT
32487TAR_OPTIONS=\"-H gnu\"
32488export TAR_OPTIONS
32489rm -rf *
32490
32491
32492test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32493
32494
32495decho Creating directory structure
32496mkdir directory
32497mkdir directory/subdir
32498genfile --file=directory/file
32499
32500decho Creating initial archive
32501tar -cf archive.1 -g db.1 directory
32502
32503decho Renaming
32504mv directory/subdir directory/subdir.0
32505mv directory dir
32506
32507decho Creating incremental archive
32508cp db.1 db.2
32509tar -cf archive.2 -g db.2 dir
32510
32511mv dir orig
32512
32513decho First restore
32514tar -xf archive.1 -g db.1 --warning=no-timestamp
32515find directory | sort
32516
32517decho Second restore
32518tar -xf archive.2 -g db.2 --warning=no-timestamp
32519find dir | sort
32520)"
32521at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
32522( $at_check_trace;
32523mkdir gnu
32524(cd gnu
32525TEST_TAR_FORMAT=gnu
32526export TEST_TAR_FORMAT
32527TAR_OPTIONS="-H gnu"
32528export TAR_OPTIONS
32529rm -rf *
32530
32531
32532test -z "`sort < /dev/null 2>&1`" || exit 77
32533
32534
32535decho Creating directory structure
32536mkdir directory
32537mkdir directory/subdir
32538genfile --file=directory/file
32539
32540decho Creating initial archive
32541tar -cf archive.1 -g db.1 directory
32542
32543decho Renaming
32544mv directory/subdir directory/subdir.0
32545mv directory dir
32546
32547decho Creating incremental archive
32548cp db.1 db.2
32549tar -cf archive.2 -g db.2 dir
32550
32551mv dir orig
32552
32553decho First restore
32554tar -xf archive.1 -g db.1 --warning=no-timestamp
32555find directory | sort
32556
32557decho Second restore
32558tar -xf archive.2 -g db.2 --warning=no-timestamp
32559find dir | sort
32560)
32561) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32562at_status=$? at_failed=false
32563$at_check_filter
32564echo >>"$at_stderr"; $as_echo "Creating directory structure
32565Creating initial archive
32566Renaming
32567Creating incremental archive
32568First restore
32569Second restore
32570" | \
32571  $at_diff - "$at_stderr" || at_failed=:
32572echo >>"$at_stdout"; $as_echo "Creating directory structure
32573Creating initial archive
32574Renaming
32575Creating incremental archive
32576First restore
32577directory
32578directory/file
32579directory/subdir
32580Second restore
32581dir
32582dir/subdir.0
32583" | \
32584  $at_diff - "$at_stdout" || at_failed=:
32585at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
32586$at_failed && at_fn_log_failure
32587$at_traceon; }
32588
32589              { set +x
32590$as_echo "$at_srcdir/rename05.at:27:
32591mkdir oldgnu
32592(cd oldgnu
32593TEST_TAR_FORMAT=oldgnu
32594export TEST_TAR_FORMAT
32595TAR_OPTIONS=\"-H oldgnu\"
32596export TAR_OPTIONS
32597rm -rf *
32598
32599
32600test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32601
32602
32603decho Creating directory structure
32604mkdir directory
32605mkdir directory/subdir
32606genfile --file=directory/file
32607
32608decho Creating initial archive
32609tar -cf archive.1 -g db.1 directory
32610
32611decho Renaming
32612mv directory/subdir directory/subdir.0
32613mv directory dir
32614
32615decho Creating incremental archive
32616cp db.1 db.2
32617tar -cf archive.2 -g db.2 dir
32618
32619mv dir orig
32620
32621decho First restore
32622tar -xf archive.1 -g db.1 --warning=no-timestamp
32623find directory | sort
32624
32625decho Second restore
32626tar -xf archive.2 -g db.2 --warning=no-timestamp
32627find dir | sort
32628)"
32629at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
32630( $at_check_trace;
32631mkdir oldgnu
32632(cd oldgnu
32633TEST_TAR_FORMAT=oldgnu
32634export TEST_TAR_FORMAT
32635TAR_OPTIONS="-H oldgnu"
32636export TAR_OPTIONS
32637rm -rf *
32638
32639
32640test -z "`sort < /dev/null 2>&1`" || exit 77
32641
32642
32643decho Creating directory structure
32644mkdir directory
32645mkdir directory/subdir
32646genfile --file=directory/file
32647
32648decho Creating initial archive
32649tar -cf archive.1 -g db.1 directory
32650
32651decho Renaming
32652mv directory/subdir directory/subdir.0
32653mv directory dir
32654
32655decho Creating incremental archive
32656cp db.1 db.2
32657tar -cf archive.2 -g db.2 dir
32658
32659mv dir orig
32660
32661decho First restore
32662tar -xf archive.1 -g db.1 --warning=no-timestamp
32663find directory | sort
32664
32665decho Second restore
32666tar -xf archive.2 -g db.2 --warning=no-timestamp
32667find dir | sort
32668)
32669) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32670at_status=$? at_failed=false
32671$at_check_filter
32672echo >>"$at_stderr"; $as_echo "Creating directory structure
32673Creating initial archive
32674Renaming
32675Creating incremental archive
32676First restore
32677Second restore
32678" | \
32679  $at_diff - "$at_stderr" || at_failed=:
32680echo >>"$at_stdout"; $as_echo "Creating directory structure
32681Creating initial archive
32682Renaming
32683Creating incremental archive
32684First restore
32685directory
32686directory/file
32687directory/subdir
32688Second restore
32689dir
32690dir/subdir.0
32691" | \
32692  $at_diff - "$at_stdout" || at_failed=:
32693at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
32694$at_failed && at_fn_log_failure
32695$at_traceon; }
32696
32697              { set +x
32698$as_echo "$at_srcdir/rename05.at:27:
32699mkdir posix
32700(cd posix
32701TEST_TAR_FORMAT=posix
32702export TEST_TAR_FORMAT
32703TAR_OPTIONS=\"-H posix\"
32704export TAR_OPTIONS
32705rm -rf *
32706
32707
32708test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32709
32710
32711decho Creating directory structure
32712mkdir directory
32713mkdir directory/subdir
32714genfile --file=directory/file
32715
32716decho Creating initial archive
32717tar -cf archive.1 -g db.1 directory
32718
32719decho Renaming
32720mv directory/subdir directory/subdir.0
32721mv directory dir
32722
32723decho Creating incremental archive
32724cp db.1 db.2
32725tar -cf archive.2 -g db.2 dir
32726
32727mv dir orig
32728
32729decho First restore
32730tar -xf archive.1 -g db.1 --warning=no-timestamp
32731find directory | sort
32732
32733decho Second restore
32734tar -xf archive.2 -g db.2 --warning=no-timestamp
32735find dir | sort
32736)"
32737at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
32738( $at_check_trace;
32739mkdir posix
32740(cd posix
32741TEST_TAR_FORMAT=posix
32742export TEST_TAR_FORMAT
32743TAR_OPTIONS="-H posix"
32744export TAR_OPTIONS
32745rm -rf *
32746
32747
32748test -z "`sort < /dev/null 2>&1`" || exit 77
32749
32750
32751decho Creating directory structure
32752mkdir directory
32753mkdir directory/subdir
32754genfile --file=directory/file
32755
32756decho Creating initial archive
32757tar -cf archive.1 -g db.1 directory
32758
32759decho Renaming
32760mv directory/subdir directory/subdir.0
32761mv directory dir
32762
32763decho Creating incremental archive
32764cp db.1 db.2
32765tar -cf archive.2 -g db.2 dir
32766
32767mv dir orig
32768
32769decho First restore
32770tar -xf archive.1 -g db.1 --warning=no-timestamp
32771find directory | sort
32772
32773decho Second restore
32774tar -xf archive.2 -g db.2 --warning=no-timestamp
32775find dir | sort
32776)
32777) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32778at_status=$? at_failed=false
32779$at_check_filter
32780echo >>"$at_stderr"; $as_echo "Creating directory structure
32781Creating initial archive
32782Renaming
32783Creating incremental archive
32784First restore
32785Second restore
32786" | \
32787  $at_diff - "$at_stderr" || at_failed=:
32788echo >>"$at_stdout"; $as_echo "Creating directory structure
32789Creating initial archive
32790Renaming
32791Creating incremental archive
32792First restore
32793directory
32794directory/file
32795directory/subdir
32796Second restore
32797dir
32798dir/subdir.0
32799" | \
32800  $at_diff - "$at_stdout" || at_failed=:
32801at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
32802$at_failed && at_fn_log_failure
32803$at_traceon; }
32804
32805
32806
32807
32808  set +x
32809  $at_times_p && times >"$at_times_file"
32810) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32811read at_status <"$at_status_file"
32812#AT_STOP_137
32813#AT_START_138
32814at_fn_group_banner 138 'rename06.at:19' \
32815  "chained renames" "                                " 19
32816at_xfail=no
32817      test -f $XFAILFILE && at_xfail=yes
32818(
32819  $as_echo "138. $at_setup_line: testing $at_desc ..."
32820  $at_traceon
32821
32822
32823
32824# Description: test whether chained renames are processed correctly
32825# during the incremental archive creation.  Tar 1.32.90 failed to
32826# encode them.
32827# Reported by: Deweloper <deweloper@wp.pl>
32828# References: <20200214100922.44c43334@amazur-u.kat.adbgroup.pl>,
32829#   https://lists.gnu.org/archive/html/bug-tar/2020-02/msg00008.html
32830
32831
32832
32833  { set +x
32834$as_echo "$at_srcdir/rename06.at:29:
32835mkdir gnu
32836(cd gnu
32837TEST_TAR_FORMAT=gnu
32838export TEST_TAR_FORMAT
32839TAR_OPTIONS=\"-H gnu\"
32840export TAR_OPTIONS
32841rm -rf *
32842
32843
32844test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32845
32846decho Creating directory structure
32847mkdir test test/d1 test/d2
32848genfile --file test/d1/file1
32849genfile --file test/d2/file2
32850
32851decho First dump
32852tar -c -g 0.snar -C test -f backup0.tar .
32853
32854decho Altering directory structure
32855genfile --file test/d2/file3
32856mv test/d1 test/d3
32857mv test/d2 test/d1
32858
32859decho Second dump
32860cp 0.snar 1.snar
32861tar -vc -g 1.snar -C test -f backup1.tar .
32862
32863mkdir test1
32864
32865decho First extract
32866tar -C test1 -x -g /dev/null -f backup0.tar
32867
32868decho Second extract
32869tar -C test1 -x -g /dev/null -f backup1.tar
32870
32871decho Resulting directory
32872find test1 | sort
32873)"
32874at_fn_check_prepare_notrace 'a `...` command substitution' "rename06.at:29"
32875( $at_check_trace;
32876mkdir gnu
32877(cd gnu
32878TEST_TAR_FORMAT=gnu
32879export TEST_TAR_FORMAT
32880TAR_OPTIONS="-H gnu"
32881export TAR_OPTIONS
32882rm -rf *
32883
32884
32885test -z "`sort < /dev/null 2>&1`" || exit 77
32886
32887decho Creating directory structure
32888mkdir test test/d1 test/d2
32889genfile --file test/d1/file1
32890genfile --file test/d2/file2
32891
32892decho First dump
32893tar -c -g 0.snar -C test -f backup0.tar .
32894
32895decho Altering directory structure
32896genfile --file test/d2/file3
32897mv test/d1 test/d3
32898mv test/d2 test/d1
32899
32900decho Second dump
32901cp 0.snar 1.snar
32902tar -vc -g 1.snar -C test -f backup1.tar .
32903
32904mkdir test1
32905
32906decho First extract
32907tar -C test1 -x -g /dev/null -f backup0.tar
32908
32909decho Second extract
32910tar -C test1 -x -g /dev/null -f backup1.tar
32911
32912decho Resulting directory
32913find test1 | sort
32914)
32915) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32916at_status=$? at_failed=false
32917$at_check_filter
32918echo >>"$at_stderr"; $as_echo "Creating directory structure
32919First dump
32920Altering directory structure
32921Second dump
32922tar: ./d1: Directory has been renamed from './d2'
32923tar: ./d3: Directory has been renamed from './d1'
32924First extract
32925Second extract
32926Resulting directory
32927" | \
32928  $at_diff - "$at_stderr" || at_failed=:
32929echo >>"$at_stdout"; $as_echo "Creating directory structure
32930First dump
32931Altering directory structure
32932Second dump
32933./
32934./d1/
32935./d3/
32936./d1/file3
32937First extract
32938Second extract
32939Resulting directory
32940test1
32941test1/d1
32942test1/d1/file2
32943test1/d1/file3
32944test1/d3
32945test1/d3/file1
32946" | \
32947  $at_diff - "$at_stdout" || at_failed=:
32948at_fn_check_status 0 $at_status "$at_srcdir/rename06.at:29"
32949$at_failed && at_fn_log_failure
32950$at_traceon; }
32951
32952              { set +x
32953$as_echo "$at_srcdir/rename06.at:29:
32954mkdir oldgnu
32955(cd oldgnu
32956TEST_TAR_FORMAT=oldgnu
32957export TEST_TAR_FORMAT
32958TAR_OPTIONS=\"-H oldgnu\"
32959export TAR_OPTIONS
32960rm -rf *
32961
32962
32963test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32964
32965decho Creating directory structure
32966mkdir test test/d1 test/d2
32967genfile --file test/d1/file1
32968genfile --file test/d2/file2
32969
32970decho First dump
32971tar -c -g 0.snar -C test -f backup0.tar .
32972
32973decho Altering directory structure
32974genfile --file test/d2/file3
32975mv test/d1 test/d3
32976mv test/d2 test/d1
32977
32978decho Second dump
32979cp 0.snar 1.snar
32980tar -vc -g 1.snar -C test -f backup1.tar .
32981
32982mkdir test1
32983
32984decho First extract
32985tar -C test1 -x -g /dev/null -f backup0.tar
32986
32987decho Second extract
32988tar -C test1 -x -g /dev/null -f backup1.tar
32989
32990decho Resulting directory
32991find test1 | sort
32992)"
32993at_fn_check_prepare_notrace 'a `...` command substitution' "rename06.at:29"
32994( $at_check_trace;
32995mkdir oldgnu
32996(cd oldgnu
32997TEST_TAR_FORMAT=oldgnu
32998export TEST_TAR_FORMAT
32999TAR_OPTIONS="-H oldgnu"
33000export TAR_OPTIONS
33001rm -rf *
33002
33003
33004test -z "`sort < /dev/null 2>&1`" || exit 77
33005
33006decho Creating directory structure
33007mkdir test test/d1 test/d2
33008genfile --file test/d1/file1
33009genfile --file test/d2/file2
33010
33011decho First dump
33012tar -c -g 0.snar -C test -f backup0.tar .
33013
33014decho Altering directory structure
33015genfile --file test/d2/file3
33016mv test/d1 test/d3
33017mv test/d2 test/d1
33018
33019decho Second dump
33020cp 0.snar 1.snar
33021tar -vc -g 1.snar -C test -f backup1.tar .
33022
33023mkdir test1
33024
33025decho First extract
33026tar -C test1 -x -g /dev/null -f backup0.tar
33027
33028decho Second extract
33029tar -C test1 -x -g /dev/null -f backup1.tar
33030
33031decho Resulting directory
33032find test1 | sort
33033)
33034) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33035at_status=$? at_failed=false
33036$at_check_filter
33037echo >>"$at_stderr"; $as_echo "Creating directory structure
33038First dump
33039Altering directory structure
33040Second dump
33041tar: ./d1: Directory has been renamed from './d2'
33042tar: ./d3: Directory has been renamed from './d1'
33043First extract
33044Second extract
33045Resulting directory
33046" | \
33047  $at_diff - "$at_stderr" || at_failed=:
33048echo >>"$at_stdout"; $as_echo "Creating directory structure
33049First dump
33050Altering directory structure
33051Second dump
33052./
33053./d1/
33054./d3/
33055./d1/file3
33056First extract
33057Second extract
33058Resulting directory
33059test1
33060test1/d1
33061test1/d1/file2
33062test1/d1/file3
33063test1/d3
33064test1/d3/file1
33065" | \
33066  $at_diff - "$at_stdout" || at_failed=:
33067at_fn_check_status 0 $at_status "$at_srcdir/rename06.at:29"
33068$at_failed && at_fn_log_failure
33069$at_traceon; }
33070
33071              { set +x
33072$as_echo "$at_srcdir/rename06.at:29:
33073mkdir posix
33074(cd posix
33075TEST_TAR_FORMAT=posix
33076export TEST_TAR_FORMAT
33077TAR_OPTIONS=\"-H posix\"
33078export TAR_OPTIONS
33079rm -rf *
33080
33081
33082test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33083
33084decho Creating directory structure
33085mkdir test test/d1 test/d2
33086genfile --file test/d1/file1
33087genfile --file test/d2/file2
33088
33089decho First dump
33090tar -c -g 0.snar -C test -f backup0.tar .
33091
33092decho Altering directory structure
33093genfile --file test/d2/file3
33094mv test/d1 test/d3
33095mv test/d2 test/d1
33096
33097decho Second dump
33098cp 0.snar 1.snar
33099tar -vc -g 1.snar -C test -f backup1.tar .
33100
33101mkdir test1
33102
33103decho First extract
33104tar -C test1 -x -g /dev/null -f backup0.tar
33105
33106decho Second extract
33107tar -C test1 -x -g /dev/null -f backup1.tar
33108
33109decho Resulting directory
33110find test1 | sort
33111)"
33112at_fn_check_prepare_notrace 'a `...` command substitution' "rename06.at:29"
33113( $at_check_trace;
33114mkdir posix
33115(cd posix
33116TEST_TAR_FORMAT=posix
33117export TEST_TAR_FORMAT
33118TAR_OPTIONS="-H posix"
33119export TAR_OPTIONS
33120rm -rf *
33121
33122
33123test -z "`sort < /dev/null 2>&1`" || exit 77
33124
33125decho Creating directory structure
33126mkdir test test/d1 test/d2
33127genfile --file test/d1/file1
33128genfile --file test/d2/file2
33129
33130decho First dump
33131tar -c -g 0.snar -C test -f backup0.tar .
33132
33133decho Altering directory structure
33134genfile --file test/d2/file3
33135mv test/d1 test/d3
33136mv test/d2 test/d1
33137
33138decho Second dump
33139cp 0.snar 1.snar
33140tar -vc -g 1.snar -C test -f backup1.tar .
33141
33142mkdir test1
33143
33144decho First extract
33145tar -C test1 -x -g /dev/null -f backup0.tar
33146
33147decho Second extract
33148tar -C test1 -x -g /dev/null -f backup1.tar
33149
33150decho Resulting directory
33151find test1 | sort
33152)
33153) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33154at_status=$? at_failed=false
33155$at_check_filter
33156echo >>"$at_stderr"; $as_echo "Creating directory structure
33157First dump
33158Altering directory structure
33159Second dump
33160tar: ./d1: Directory has been renamed from './d2'
33161tar: ./d3: Directory has been renamed from './d1'
33162First extract
33163Second extract
33164Resulting directory
33165" | \
33166  $at_diff - "$at_stderr" || at_failed=:
33167echo >>"$at_stdout"; $as_echo "Creating directory structure
33168First dump
33169Altering directory structure
33170Second dump
33171./
33172./d1/
33173./d3/
33174./d1/file3
33175First extract
33176Second extract
33177Resulting directory
33178test1
33179test1/d1
33180test1/d1/file2
33181test1/d1/file3
33182test1/d3
33183test1/d3/file1
33184" | \
33185  $at_diff - "$at_stdout" || at_failed=:
33186at_fn_check_status 0 $at_status "$at_srcdir/rename06.at:29"
33187$at_failed && at_fn_log_failure
33188$at_traceon; }
33189
33190
33191
33192  set +x
33193  $at_times_p && times >"$at_times_file"
33194) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33195read at_status <"$at_status_file"
33196#AT_STOP_138
33197#AT_START_139
33198at_fn_group_banner 139 'chtype.at:27' \
33199  "changed file types in incrementals" "             " 19
33200at_xfail=no
33201      test -f $XFAILFILE && at_xfail=yes
33202(
33203  $as_echo "139. $at_setup_line: testing $at_desc ..."
33204  $at_traceon
33205
33206
33207
33208
33209
33210  { set +x
33211$as_echo "$at_srcdir/chtype.at:30:
33212mkdir gnu
33213(cd gnu
33214TEST_TAR_FORMAT=gnu
33215export TEST_TAR_FORMAT
33216TAR_OPTIONS=\"-H gnu\"
33217export TAR_OPTIONS
33218rm -rf *
33219
33220
33221test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33222
33223
33224install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
33225mkdir directory/a
33226genfile --file directory/a/a
33227
33228echo First backup
33229tar --create --file=archive.1 --listed-incremental=db.1 directory
33230
33231sleep 2
33232
33233# Remove directory b and create a file with this name.
33234# Previous versions were not able to restore over this file.
33235rm -r directory/b
33236genfile --file directory/b
33237genfile --file directory/a/b
33238
33239echo Second backup
33240tar --create --file=archive.2 --listed-incremental=db.2 directory
33241
33242# Delete a
33243rm -r directory
33244
33245echo Restore archive.1
33246tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
33247echo Restore archive.2
33248tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
33249find directory | sort
33250)"
33251at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
33252( $at_check_trace;
33253mkdir gnu
33254(cd gnu
33255TEST_TAR_FORMAT=gnu
33256export TEST_TAR_FORMAT
33257TAR_OPTIONS="-H gnu"
33258export TAR_OPTIONS
33259rm -rf *
33260
33261
33262test -z "`sort < /dev/null 2>&1`" || exit 77
33263
33264
33265install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
33266mkdir directory/a
33267genfile --file directory/a/a
33268
33269echo First backup
33270tar --create --file=archive.1 --listed-incremental=db.1 directory
33271
33272sleep 2
33273
33274# Remove directory b and create a file with this name.
33275# Previous versions were not able to restore over this file.
33276rm -r directory/b
33277genfile --file directory/b
33278genfile --file directory/a/b
33279
33280echo Second backup
33281tar --create --file=archive.2 --listed-incremental=db.2 directory
33282
33283# Delete a
33284rm -r directory
33285
33286echo Restore archive.1
33287tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
33288echo Restore archive.2
33289tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
33290find directory | sort
33291)
33292) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33293at_status=$? at_failed=false
33294$at_check_filter
33295at_fn_diff_devnull "$at_stderr" || at_failed=:
33296echo >>"$at_stdout"; $as_echo "First backup
33297Second backup
33298Restore archive.1
33299Restore archive.2
33300directory
33301directory/a
33302directory/a/a
33303directory/a/b
33304directory/b
33305" | \
33306  $at_diff - "$at_stdout" || at_failed=:
33307at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
33308$at_failed && at_fn_log_failure
33309$at_traceon; }
33310
33311              { set +x
33312$as_echo "$at_srcdir/chtype.at:30:
33313mkdir oldgnu
33314(cd oldgnu
33315TEST_TAR_FORMAT=oldgnu
33316export TEST_TAR_FORMAT
33317TAR_OPTIONS=\"-H oldgnu\"
33318export TAR_OPTIONS
33319rm -rf *
33320
33321
33322test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33323
33324
33325install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
33326mkdir directory/a
33327genfile --file directory/a/a
33328
33329echo First backup
33330tar --create --file=archive.1 --listed-incremental=db.1 directory
33331
33332sleep 2
33333
33334# Remove directory b and create a file with this name.
33335# Previous versions were not able to restore over this file.
33336rm -r directory/b
33337genfile --file directory/b
33338genfile --file directory/a/b
33339
33340echo Second backup
33341tar --create --file=archive.2 --listed-incremental=db.2 directory
33342
33343# Delete a
33344rm -r directory
33345
33346echo Restore archive.1
33347tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
33348echo Restore archive.2
33349tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
33350find directory | sort
33351)"
33352at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
33353( $at_check_trace;
33354mkdir oldgnu
33355(cd oldgnu
33356TEST_TAR_FORMAT=oldgnu
33357export TEST_TAR_FORMAT
33358TAR_OPTIONS="-H oldgnu"
33359export TAR_OPTIONS
33360rm -rf *
33361
33362
33363test -z "`sort < /dev/null 2>&1`" || exit 77
33364
33365
33366install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
33367mkdir directory/a
33368genfile --file directory/a/a
33369
33370echo First backup
33371tar --create --file=archive.1 --listed-incremental=db.1 directory
33372
33373sleep 2
33374
33375# Remove directory b and create a file with this name.
33376# Previous versions were not able to restore over this file.
33377rm -r directory/b
33378genfile --file directory/b
33379genfile --file directory/a/b
33380
33381echo Second backup
33382tar --create --file=archive.2 --listed-incremental=db.2 directory
33383
33384# Delete a
33385rm -r directory
33386
33387echo Restore archive.1
33388tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
33389echo Restore archive.2
33390tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
33391find directory | sort
33392)
33393) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33394at_status=$? at_failed=false
33395$at_check_filter
33396at_fn_diff_devnull "$at_stderr" || at_failed=:
33397echo >>"$at_stdout"; $as_echo "First backup
33398Second backup
33399Restore archive.1
33400Restore archive.2
33401directory
33402directory/a
33403directory/a/a
33404directory/a/b
33405directory/b
33406" | \
33407  $at_diff - "$at_stdout" || at_failed=:
33408at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
33409$at_failed && at_fn_log_failure
33410$at_traceon; }
33411
33412              { set +x
33413$as_echo "$at_srcdir/chtype.at:30:
33414mkdir posix
33415(cd posix
33416TEST_TAR_FORMAT=posix
33417export TEST_TAR_FORMAT
33418TAR_OPTIONS=\"-H posix\"
33419export TAR_OPTIONS
33420rm -rf *
33421
33422
33423test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33424
33425
33426install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
33427mkdir directory/a
33428genfile --file directory/a/a
33429
33430echo First backup
33431tar --create --file=archive.1 --listed-incremental=db.1 directory
33432
33433sleep 2
33434
33435# Remove directory b and create a file with this name.
33436# Previous versions were not able to restore over this file.
33437rm -r directory/b
33438genfile --file directory/b
33439genfile --file directory/a/b
33440
33441echo Second backup
33442tar --create --file=archive.2 --listed-incremental=db.2 directory
33443
33444# Delete a
33445rm -r directory
33446
33447echo Restore archive.1
33448tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
33449echo Restore archive.2
33450tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
33451find directory | sort
33452)"
33453at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
33454( $at_check_trace;
33455mkdir posix
33456(cd posix
33457TEST_TAR_FORMAT=posix
33458export TEST_TAR_FORMAT
33459TAR_OPTIONS="-H posix"
33460export TAR_OPTIONS
33461rm -rf *
33462
33463
33464test -z "`sort < /dev/null 2>&1`" || exit 77
33465
33466
33467install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
33468mkdir directory/a
33469genfile --file directory/a/a
33470
33471echo First backup
33472tar --create --file=archive.1 --listed-incremental=db.1 directory
33473
33474sleep 2
33475
33476# Remove directory b and create a file with this name.
33477# Previous versions were not able to restore over this file.
33478rm -r directory/b
33479genfile --file directory/b
33480genfile --file directory/a/b
33481
33482echo Second backup
33483tar --create --file=archive.2 --listed-incremental=db.2 directory
33484
33485# Delete a
33486rm -r directory
33487
33488echo Restore archive.1
33489tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
33490echo Restore archive.2
33491tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
33492find directory | sort
33493)
33494) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33495at_status=$? at_failed=false
33496$at_check_filter
33497at_fn_diff_devnull "$at_stderr" || at_failed=:
33498echo >>"$at_stdout"; $as_echo "First backup
33499Second backup
33500Restore archive.1
33501Restore archive.2
33502directory
33503directory/a
33504directory/a/a
33505directory/a/b
33506directory/b
33507" | \
33508  $at_diff - "$at_stdout" || at_failed=:
33509at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
33510$at_failed && at_fn_log_failure
33511$at_traceon; }
33512
33513
33514
33515
33516  set +x
33517  $at_times_p && times >"$at_times_file"
33518) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33519read at_status <"$at_status_file"
33520#AT_STOP_139
33521#AT_START_140
33522at_fn_group_banner 140 'ignfail.at:23' \
33523  "ignfail" "                                        " 20
33524at_xfail=no
33525      test -f $XFAILFILE && at_xfail=yes
33526(
33527  $as_echo "140. $at_setup_line: testing $at_desc ..."
33528  $at_traceon
33529
33530
33531
33532
33533
33534  { set +x
33535$as_echo "$at_srcdir/ignfail.at:26:
33536mkdir v7
33537(cd v7
33538TEST_TAR_FORMAT=v7
33539export TEST_TAR_FORMAT
33540TAR_OPTIONS=\"-H v7\"
33541export TAR_OPTIONS
33542rm -rf *
33543
33544# The test is meaningless for super-user.
33545
33546echo \"test\" > \$\$
33547chmod 0 \$\$
33548cat \$\$ > /dev/null 2>&1
33549result=\$?
33550rm -f \$\$
33551test \$result -eq 0 && exit 77
33552
33553
33554touch file
33555mkdir directory
33556touch directory/file
33557
33558echo 1>&2 -----
33559chmod 000 file
33560tar cf archive file
33561status=\$?
33562chmod 600 file
33563test \$status = 2 || exit 1
33564
33565echo 1>&2 -----
33566chmod 000 file
33567tar cf archive --ignore-failed-read file || exit 1
33568status=\$?
33569chmod 600 file
33570test \$status = 0 || exit 1
33571
33572echo 1>&2 -----
33573chmod 000 directory
33574tar cf archive directory
33575status=\$?
33576chmod 700 directory
33577test \$status = 2 || exit 1
33578
33579echo 1>&2 -----
33580chmod 000 directory
33581tar cf archive --ignore-failed-read directory || exit 1
33582status=\$?
33583chmod 700 directory
33584test \$status = 0
33585)"
33586at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
33587( $at_check_trace;
33588mkdir v7
33589(cd v7
33590TEST_TAR_FORMAT=v7
33591export TEST_TAR_FORMAT
33592TAR_OPTIONS="-H v7"
33593export TAR_OPTIONS
33594rm -rf *
33595
33596# The test is meaningless for super-user.
33597
33598echo "test" > $$
33599chmod 0 $$
33600cat $$ > /dev/null 2>&1
33601result=$?
33602rm -f $$
33603test $result -eq 0 && exit 77
33604
33605
33606touch file
33607mkdir directory
33608touch directory/file
33609
33610echo 1>&2 -----
33611chmod 000 file
33612tar cf archive file
33613status=$?
33614chmod 600 file
33615test $status = 2 || exit 1
33616
33617echo 1>&2 -----
33618chmod 000 file
33619tar cf archive --ignore-failed-read file || exit 1
33620status=$?
33621chmod 600 file
33622test $status = 0 || exit 1
33623
33624echo 1>&2 -----
33625chmod 000 directory
33626tar cf archive directory
33627status=$?
33628chmod 700 directory
33629test $status = 2 || exit 1
33630
33631echo 1>&2 -----
33632chmod 000 directory
33633tar cf archive --ignore-failed-read directory || exit 1
33634status=$?
33635chmod 700 directory
33636test $status = 0
33637)
33638) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33639at_status=$? at_failed=false
33640$at_check_filter
33641echo >>"$at_stderr"; $as_echo "-----
33642tar: file: Cannot open: Permission denied
33643tar: Exiting with failure status due to previous errors
33644-----
33645tar: file: Warning: Cannot open: Permission denied
33646-----
33647tar: directory: Cannot open: Permission denied
33648tar: Exiting with failure status due to previous errors
33649-----
33650tar: directory: Warning: Cannot open: Permission denied
33651" | \
33652  $at_diff - "$at_stderr" || at_failed=:
33653at_fn_diff_devnull "$at_stdout" || at_failed=:
33654at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
33655$at_failed && at_fn_log_failure
33656$at_traceon; }
33657
33658              { set +x
33659$as_echo "$at_srcdir/ignfail.at:26:
33660mkdir oldgnu
33661(cd oldgnu
33662TEST_TAR_FORMAT=oldgnu
33663export TEST_TAR_FORMAT
33664TAR_OPTIONS=\"-H oldgnu\"
33665export TAR_OPTIONS
33666rm -rf *
33667
33668# The test is meaningless for super-user.
33669
33670echo \"test\" > \$\$
33671chmod 0 \$\$
33672cat \$\$ > /dev/null 2>&1
33673result=\$?
33674rm -f \$\$
33675test \$result -eq 0 && exit 77
33676
33677
33678touch file
33679mkdir directory
33680touch directory/file
33681
33682echo 1>&2 -----
33683chmod 000 file
33684tar cf archive file
33685status=\$?
33686chmod 600 file
33687test \$status = 2 || exit 1
33688
33689echo 1>&2 -----
33690chmod 000 file
33691tar cf archive --ignore-failed-read file || exit 1
33692status=\$?
33693chmod 600 file
33694test \$status = 0 || exit 1
33695
33696echo 1>&2 -----
33697chmod 000 directory
33698tar cf archive directory
33699status=\$?
33700chmod 700 directory
33701test \$status = 2 || exit 1
33702
33703echo 1>&2 -----
33704chmod 000 directory
33705tar cf archive --ignore-failed-read directory || exit 1
33706status=\$?
33707chmod 700 directory
33708test \$status = 0
33709)"
33710at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
33711( $at_check_trace;
33712mkdir oldgnu
33713(cd oldgnu
33714TEST_TAR_FORMAT=oldgnu
33715export TEST_TAR_FORMAT
33716TAR_OPTIONS="-H oldgnu"
33717export TAR_OPTIONS
33718rm -rf *
33719
33720# The test is meaningless for super-user.
33721
33722echo "test" > $$
33723chmod 0 $$
33724cat $$ > /dev/null 2>&1
33725result=$?
33726rm -f $$
33727test $result -eq 0 && exit 77
33728
33729
33730touch file
33731mkdir directory
33732touch directory/file
33733
33734echo 1>&2 -----
33735chmod 000 file
33736tar cf archive file
33737status=$?
33738chmod 600 file
33739test $status = 2 || exit 1
33740
33741echo 1>&2 -----
33742chmod 000 file
33743tar cf archive --ignore-failed-read file || exit 1
33744status=$?
33745chmod 600 file
33746test $status = 0 || exit 1
33747
33748echo 1>&2 -----
33749chmod 000 directory
33750tar cf archive directory
33751status=$?
33752chmod 700 directory
33753test $status = 2 || exit 1
33754
33755echo 1>&2 -----
33756chmod 000 directory
33757tar cf archive --ignore-failed-read directory || exit 1
33758status=$?
33759chmod 700 directory
33760test $status = 0
33761)
33762) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33763at_status=$? at_failed=false
33764$at_check_filter
33765echo >>"$at_stderr"; $as_echo "-----
33766tar: file: Cannot open: Permission denied
33767tar: Exiting with failure status due to previous errors
33768-----
33769tar: file: Warning: Cannot open: Permission denied
33770-----
33771tar: directory: Cannot open: Permission denied
33772tar: Exiting with failure status due to previous errors
33773-----
33774tar: directory: Warning: Cannot open: Permission denied
33775" | \
33776  $at_diff - "$at_stderr" || at_failed=:
33777at_fn_diff_devnull "$at_stdout" || at_failed=:
33778at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
33779$at_failed && at_fn_log_failure
33780$at_traceon; }
33781
33782              { set +x
33783$as_echo "$at_srcdir/ignfail.at:26:
33784mkdir ustar
33785(cd ustar
33786TEST_TAR_FORMAT=ustar
33787export TEST_TAR_FORMAT
33788TAR_OPTIONS=\"-H ustar\"
33789export TAR_OPTIONS
33790rm -rf *
33791
33792# The test is meaningless for super-user.
33793
33794echo \"test\" > \$\$
33795chmod 0 \$\$
33796cat \$\$ > /dev/null 2>&1
33797result=\$?
33798rm -f \$\$
33799test \$result -eq 0 && exit 77
33800
33801
33802touch file
33803mkdir directory
33804touch directory/file
33805
33806echo 1>&2 -----
33807chmod 000 file
33808tar cf archive file
33809status=\$?
33810chmod 600 file
33811test \$status = 2 || exit 1
33812
33813echo 1>&2 -----
33814chmod 000 file
33815tar cf archive --ignore-failed-read file || exit 1
33816status=\$?
33817chmod 600 file
33818test \$status = 0 || exit 1
33819
33820echo 1>&2 -----
33821chmod 000 directory
33822tar cf archive directory
33823status=\$?
33824chmod 700 directory
33825test \$status = 2 || exit 1
33826
33827echo 1>&2 -----
33828chmod 000 directory
33829tar cf archive --ignore-failed-read directory || exit 1
33830status=\$?
33831chmod 700 directory
33832test \$status = 0
33833)"
33834at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
33835( $at_check_trace;
33836mkdir ustar
33837(cd ustar
33838TEST_TAR_FORMAT=ustar
33839export TEST_TAR_FORMAT
33840TAR_OPTIONS="-H ustar"
33841export TAR_OPTIONS
33842rm -rf *
33843
33844# The test is meaningless for super-user.
33845
33846echo "test" > $$
33847chmod 0 $$
33848cat $$ > /dev/null 2>&1
33849result=$?
33850rm -f $$
33851test $result -eq 0 && exit 77
33852
33853
33854touch file
33855mkdir directory
33856touch directory/file
33857
33858echo 1>&2 -----
33859chmod 000 file
33860tar cf archive file
33861status=$?
33862chmod 600 file
33863test $status = 2 || exit 1
33864
33865echo 1>&2 -----
33866chmod 000 file
33867tar cf archive --ignore-failed-read file || exit 1
33868status=$?
33869chmod 600 file
33870test $status = 0 || exit 1
33871
33872echo 1>&2 -----
33873chmod 000 directory
33874tar cf archive directory
33875status=$?
33876chmod 700 directory
33877test $status = 2 || exit 1
33878
33879echo 1>&2 -----
33880chmod 000 directory
33881tar cf archive --ignore-failed-read directory || exit 1
33882status=$?
33883chmod 700 directory
33884test $status = 0
33885)
33886) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33887at_status=$? at_failed=false
33888$at_check_filter
33889echo >>"$at_stderr"; $as_echo "-----
33890tar: file: Cannot open: Permission denied
33891tar: Exiting with failure status due to previous errors
33892-----
33893tar: file: Warning: Cannot open: Permission denied
33894-----
33895tar: directory: Cannot open: Permission denied
33896tar: Exiting with failure status due to previous errors
33897-----
33898tar: directory: Warning: Cannot open: Permission denied
33899" | \
33900  $at_diff - "$at_stderr" || at_failed=:
33901at_fn_diff_devnull "$at_stdout" || at_failed=:
33902at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
33903$at_failed && at_fn_log_failure
33904$at_traceon; }
33905
33906              { set +x
33907$as_echo "$at_srcdir/ignfail.at:26:
33908mkdir posix
33909(cd posix
33910TEST_TAR_FORMAT=posix
33911export TEST_TAR_FORMAT
33912TAR_OPTIONS=\"-H posix\"
33913export TAR_OPTIONS
33914rm -rf *
33915
33916# The test is meaningless for super-user.
33917
33918echo \"test\" > \$\$
33919chmod 0 \$\$
33920cat \$\$ > /dev/null 2>&1
33921result=\$?
33922rm -f \$\$
33923test \$result -eq 0 && exit 77
33924
33925
33926touch file
33927mkdir directory
33928touch directory/file
33929
33930echo 1>&2 -----
33931chmod 000 file
33932tar cf archive file
33933status=\$?
33934chmod 600 file
33935test \$status = 2 || exit 1
33936
33937echo 1>&2 -----
33938chmod 000 file
33939tar cf archive --ignore-failed-read file || exit 1
33940status=\$?
33941chmod 600 file
33942test \$status = 0 || exit 1
33943
33944echo 1>&2 -----
33945chmod 000 directory
33946tar cf archive directory
33947status=\$?
33948chmod 700 directory
33949test \$status = 2 || exit 1
33950
33951echo 1>&2 -----
33952chmod 000 directory
33953tar cf archive --ignore-failed-read directory || exit 1
33954status=\$?
33955chmod 700 directory
33956test \$status = 0
33957)"
33958at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
33959( $at_check_trace;
33960mkdir posix
33961(cd posix
33962TEST_TAR_FORMAT=posix
33963export TEST_TAR_FORMAT
33964TAR_OPTIONS="-H posix"
33965export TAR_OPTIONS
33966rm -rf *
33967
33968# The test is meaningless for super-user.
33969
33970echo "test" > $$
33971chmod 0 $$
33972cat $$ > /dev/null 2>&1
33973result=$?
33974rm -f $$
33975test $result -eq 0 && exit 77
33976
33977
33978touch file
33979mkdir directory
33980touch directory/file
33981
33982echo 1>&2 -----
33983chmod 000 file
33984tar cf archive file
33985status=$?
33986chmod 600 file
33987test $status = 2 || exit 1
33988
33989echo 1>&2 -----
33990chmod 000 file
33991tar cf archive --ignore-failed-read file || exit 1
33992status=$?
33993chmod 600 file
33994test $status = 0 || exit 1
33995
33996echo 1>&2 -----
33997chmod 000 directory
33998tar cf archive directory
33999status=$?
34000chmod 700 directory
34001test $status = 2 || exit 1
34002
34003echo 1>&2 -----
34004chmod 000 directory
34005tar cf archive --ignore-failed-read directory || exit 1
34006status=$?
34007chmod 700 directory
34008test $status = 0
34009)
34010) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34011at_status=$? at_failed=false
34012$at_check_filter
34013echo >>"$at_stderr"; $as_echo "-----
34014tar: file: Cannot open: Permission denied
34015tar: Exiting with failure status due to previous errors
34016-----
34017tar: file: Warning: Cannot open: Permission denied
34018-----
34019tar: directory: Cannot open: Permission denied
34020tar: Exiting with failure status due to previous errors
34021-----
34022tar: directory: Warning: Cannot open: Permission denied
34023" | \
34024  $at_diff - "$at_stderr" || at_failed=:
34025at_fn_diff_devnull "$at_stdout" || at_failed=:
34026at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
34027$at_failed && at_fn_log_failure
34028$at_traceon; }
34029
34030              { set +x
34031$as_echo "$at_srcdir/ignfail.at:26:
34032mkdir gnu
34033(cd gnu
34034TEST_TAR_FORMAT=gnu
34035export TEST_TAR_FORMAT
34036TAR_OPTIONS=\"-H gnu\"
34037export TAR_OPTIONS
34038rm -rf *
34039
34040# The test is meaningless for super-user.
34041
34042echo \"test\" > \$\$
34043chmod 0 \$\$
34044cat \$\$ > /dev/null 2>&1
34045result=\$?
34046rm -f \$\$
34047test \$result -eq 0 && exit 77
34048
34049
34050touch file
34051mkdir directory
34052touch directory/file
34053
34054echo 1>&2 -----
34055chmod 000 file
34056tar cf archive file
34057status=\$?
34058chmod 600 file
34059test \$status = 2 || exit 1
34060
34061echo 1>&2 -----
34062chmod 000 file
34063tar cf archive --ignore-failed-read file || exit 1
34064status=\$?
34065chmod 600 file
34066test \$status = 0 || exit 1
34067
34068echo 1>&2 -----
34069chmod 000 directory
34070tar cf archive directory
34071status=\$?
34072chmod 700 directory
34073test \$status = 2 || exit 1
34074
34075echo 1>&2 -----
34076chmod 000 directory
34077tar cf archive --ignore-failed-read directory || exit 1
34078status=\$?
34079chmod 700 directory
34080test \$status = 0
34081)"
34082at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
34083( $at_check_trace;
34084mkdir gnu
34085(cd gnu
34086TEST_TAR_FORMAT=gnu
34087export TEST_TAR_FORMAT
34088TAR_OPTIONS="-H gnu"
34089export TAR_OPTIONS
34090rm -rf *
34091
34092# The test is meaningless for super-user.
34093
34094echo "test" > $$
34095chmod 0 $$
34096cat $$ > /dev/null 2>&1
34097result=$?
34098rm -f $$
34099test $result -eq 0 && exit 77
34100
34101
34102touch file
34103mkdir directory
34104touch directory/file
34105
34106echo 1>&2 -----
34107chmod 000 file
34108tar cf archive file
34109status=$?
34110chmod 600 file
34111test $status = 2 || exit 1
34112
34113echo 1>&2 -----
34114chmod 000 file
34115tar cf archive --ignore-failed-read file || exit 1
34116status=$?
34117chmod 600 file
34118test $status = 0 || exit 1
34119
34120echo 1>&2 -----
34121chmod 000 directory
34122tar cf archive directory
34123status=$?
34124chmod 700 directory
34125test $status = 2 || exit 1
34126
34127echo 1>&2 -----
34128chmod 000 directory
34129tar cf archive --ignore-failed-read directory || exit 1
34130status=$?
34131chmod 700 directory
34132test $status = 0
34133)
34134) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34135at_status=$? at_failed=false
34136$at_check_filter
34137echo >>"$at_stderr"; $as_echo "-----
34138tar: file: Cannot open: Permission denied
34139tar: Exiting with failure status due to previous errors
34140-----
34141tar: file: Warning: Cannot open: Permission denied
34142-----
34143tar: directory: Cannot open: Permission denied
34144tar: Exiting with failure status due to previous errors
34145-----
34146tar: directory: Warning: Cannot open: Permission denied
34147" | \
34148  $at_diff - "$at_stderr" || at_failed=:
34149at_fn_diff_devnull "$at_stdout" || at_failed=:
34150at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
34151$at_failed && at_fn_log_failure
34152$at_traceon; }
34153
34154
34155
34156
34157  set +x
34158  $at_times_p && times >"$at_times_file"
34159) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34160read at_status <"$at_status_file"
34161#AT_STOP_140
34162#AT_START_141
34163at_fn_group_banner 141 'link01.at:33' \
34164  "link count gt 2" "                                " 21
34165at_xfail=no
34166      test -f $XFAILFILE && at_xfail=yes
34167(
34168  $as_echo "141. $at_setup_line: testing $at_desc ..."
34169  $at_traceon
34170
34171
34172
34173
34174
34175  { set +x
34176$as_echo "$at_srcdir/link01.at:36:
34177mkdir v7
34178(cd v7
34179TEST_TAR_FORMAT=v7
34180export TEST_TAR_FORMAT
34181TAR_OPTIONS=\"-H v7\"
34182export TAR_OPTIONS
34183rm -rf *
34184
34185mkdir directory
34186mkdir directory/test1
34187mkdir directory/test2
34188
34189echo TEST > directory/test1/test.txt
34190ln directory/test1/test.txt directory/test2/test.txt || exit 77
34191
34192tar cf archive directory/test1/test.txt directory/test1/test.txt
34193
34194rm -r directory
34195tar xf archive --warning=no-timestamp
34196
34197ls directory/test1
34198)"
34199at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
34200( $at_check_trace;
34201mkdir v7
34202(cd v7
34203TEST_TAR_FORMAT=v7
34204export TEST_TAR_FORMAT
34205TAR_OPTIONS="-H v7"
34206export TAR_OPTIONS
34207rm -rf *
34208
34209mkdir directory
34210mkdir directory/test1
34211mkdir directory/test2
34212
34213echo TEST > directory/test1/test.txt
34214ln directory/test1/test.txt directory/test2/test.txt || exit 77
34215
34216tar cf archive directory/test1/test.txt directory/test1/test.txt
34217
34218rm -r directory
34219tar xf archive --warning=no-timestamp
34220
34221ls directory/test1
34222)
34223) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34224at_status=$? at_failed=false
34225$at_check_filter
34226at_fn_diff_devnull "$at_stderr" || at_failed=:
34227echo >>"$at_stdout"; $as_echo "test.txt
34228" | \
34229  $at_diff - "$at_stdout" || at_failed=:
34230at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
34231$at_failed && at_fn_log_failure
34232$at_traceon; }
34233
34234              { set +x
34235$as_echo "$at_srcdir/link01.at:36:
34236mkdir oldgnu
34237(cd oldgnu
34238TEST_TAR_FORMAT=oldgnu
34239export TEST_TAR_FORMAT
34240TAR_OPTIONS=\"-H oldgnu\"
34241export TAR_OPTIONS
34242rm -rf *
34243
34244mkdir directory
34245mkdir directory/test1
34246mkdir directory/test2
34247
34248echo TEST > directory/test1/test.txt
34249ln directory/test1/test.txt directory/test2/test.txt || exit 77
34250
34251tar cf archive directory/test1/test.txt directory/test1/test.txt
34252
34253rm -r directory
34254tar xf archive --warning=no-timestamp
34255
34256ls directory/test1
34257)"
34258at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
34259( $at_check_trace;
34260mkdir oldgnu
34261(cd oldgnu
34262TEST_TAR_FORMAT=oldgnu
34263export TEST_TAR_FORMAT
34264TAR_OPTIONS="-H oldgnu"
34265export TAR_OPTIONS
34266rm -rf *
34267
34268mkdir directory
34269mkdir directory/test1
34270mkdir directory/test2
34271
34272echo TEST > directory/test1/test.txt
34273ln directory/test1/test.txt directory/test2/test.txt || exit 77
34274
34275tar cf archive directory/test1/test.txt directory/test1/test.txt
34276
34277rm -r directory
34278tar xf archive --warning=no-timestamp
34279
34280ls directory/test1
34281)
34282) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34283at_status=$? at_failed=false
34284$at_check_filter
34285at_fn_diff_devnull "$at_stderr" || at_failed=:
34286echo >>"$at_stdout"; $as_echo "test.txt
34287" | \
34288  $at_diff - "$at_stdout" || at_failed=:
34289at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
34290$at_failed && at_fn_log_failure
34291$at_traceon; }
34292
34293              { set +x
34294$as_echo "$at_srcdir/link01.at:36:
34295mkdir ustar
34296(cd ustar
34297TEST_TAR_FORMAT=ustar
34298export TEST_TAR_FORMAT
34299TAR_OPTIONS=\"-H ustar\"
34300export TAR_OPTIONS
34301rm -rf *
34302
34303mkdir directory
34304mkdir directory/test1
34305mkdir directory/test2
34306
34307echo TEST > directory/test1/test.txt
34308ln directory/test1/test.txt directory/test2/test.txt || exit 77
34309
34310tar cf archive directory/test1/test.txt directory/test1/test.txt
34311
34312rm -r directory
34313tar xf archive --warning=no-timestamp
34314
34315ls directory/test1
34316)"
34317at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
34318( $at_check_trace;
34319mkdir ustar
34320(cd ustar
34321TEST_TAR_FORMAT=ustar
34322export TEST_TAR_FORMAT
34323TAR_OPTIONS="-H ustar"
34324export TAR_OPTIONS
34325rm -rf *
34326
34327mkdir directory
34328mkdir directory/test1
34329mkdir directory/test2
34330
34331echo TEST > directory/test1/test.txt
34332ln directory/test1/test.txt directory/test2/test.txt || exit 77
34333
34334tar cf archive directory/test1/test.txt directory/test1/test.txt
34335
34336rm -r directory
34337tar xf archive --warning=no-timestamp
34338
34339ls directory/test1
34340)
34341) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34342at_status=$? at_failed=false
34343$at_check_filter
34344at_fn_diff_devnull "$at_stderr" || at_failed=:
34345echo >>"$at_stdout"; $as_echo "test.txt
34346" | \
34347  $at_diff - "$at_stdout" || at_failed=:
34348at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
34349$at_failed && at_fn_log_failure
34350$at_traceon; }
34351
34352              { set +x
34353$as_echo "$at_srcdir/link01.at:36:
34354mkdir posix
34355(cd posix
34356TEST_TAR_FORMAT=posix
34357export TEST_TAR_FORMAT
34358TAR_OPTIONS=\"-H posix\"
34359export TAR_OPTIONS
34360rm -rf *
34361
34362mkdir directory
34363mkdir directory/test1
34364mkdir directory/test2
34365
34366echo TEST > directory/test1/test.txt
34367ln directory/test1/test.txt directory/test2/test.txt || exit 77
34368
34369tar cf archive directory/test1/test.txt directory/test1/test.txt
34370
34371rm -r directory
34372tar xf archive --warning=no-timestamp
34373
34374ls directory/test1
34375)"
34376at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
34377( $at_check_trace;
34378mkdir posix
34379(cd posix
34380TEST_TAR_FORMAT=posix
34381export TEST_TAR_FORMAT
34382TAR_OPTIONS="-H posix"
34383export TAR_OPTIONS
34384rm -rf *
34385
34386mkdir directory
34387mkdir directory/test1
34388mkdir directory/test2
34389
34390echo TEST > directory/test1/test.txt
34391ln directory/test1/test.txt directory/test2/test.txt || exit 77
34392
34393tar cf archive directory/test1/test.txt directory/test1/test.txt
34394
34395rm -r directory
34396tar xf archive --warning=no-timestamp
34397
34398ls directory/test1
34399)
34400) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34401at_status=$? at_failed=false
34402$at_check_filter
34403at_fn_diff_devnull "$at_stderr" || at_failed=:
34404echo >>"$at_stdout"; $as_echo "test.txt
34405" | \
34406  $at_diff - "$at_stdout" || at_failed=:
34407at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
34408$at_failed && at_fn_log_failure
34409$at_traceon; }
34410
34411              { set +x
34412$as_echo "$at_srcdir/link01.at:36:
34413mkdir gnu
34414(cd gnu
34415TEST_TAR_FORMAT=gnu
34416export TEST_TAR_FORMAT
34417TAR_OPTIONS=\"-H gnu\"
34418export TAR_OPTIONS
34419rm -rf *
34420
34421mkdir directory
34422mkdir directory/test1
34423mkdir directory/test2
34424
34425echo TEST > directory/test1/test.txt
34426ln directory/test1/test.txt directory/test2/test.txt || exit 77
34427
34428tar cf archive directory/test1/test.txt directory/test1/test.txt
34429
34430rm -r directory
34431tar xf archive --warning=no-timestamp
34432
34433ls directory/test1
34434)"
34435at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
34436( $at_check_trace;
34437mkdir gnu
34438(cd gnu
34439TEST_TAR_FORMAT=gnu
34440export TEST_TAR_FORMAT
34441TAR_OPTIONS="-H gnu"
34442export TAR_OPTIONS
34443rm -rf *
34444
34445mkdir directory
34446mkdir directory/test1
34447mkdir directory/test2
34448
34449echo TEST > directory/test1/test.txt
34450ln directory/test1/test.txt directory/test2/test.txt || exit 77
34451
34452tar cf archive directory/test1/test.txt directory/test1/test.txt
34453
34454rm -r directory
34455tar xf archive --warning=no-timestamp
34456
34457ls directory/test1
34458)
34459) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34460at_status=$? at_failed=false
34461$at_check_filter
34462at_fn_diff_devnull "$at_stderr" || at_failed=:
34463echo >>"$at_stdout"; $as_echo "test.txt
34464" | \
34465  $at_diff - "$at_stdout" || at_failed=:
34466at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
34467$at_failed && at_fn_log_failure
34468$at_traceon; }
34469
34470
34471
34472
34473  set +x
34474  $at_times_p && times >"$at_times_file"
34475) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34476read at_status <"$at_status_file"
34477#AT_STOP_141
34478#AT_START_142
34479at_fn_group_banner 142 'link02.at:32' \
34480  "preserve hard links with --remove-files" "        " 21
34481at_xfail=no
34482      test -f $XFAILFILE && at_xfail=yes
34483(
34484  $as_echo "142. $at_setup_line: testing $at_desc ..."
34485  $at_traceon
34486
34487
34488
34489
34490
34491  { set +x
34492$as_echo "$at_srcdir/link02.at:35:
34493mkdir v7
34494(cd v7
34495TEST_TAR_FORMAT=v7
34496export TEST_TAR_FORMAT
34497TAR_OPTIONS=\"-H v7\"
34498export TAR_OPTIONS
34499rm -rf *
34500
34501genfile -l 64 -f file1
34502ln file1 file2
34503ln file2 file3
34504ln file3 file4
34505tar -c -f archive --remove-files file1 file2 file3 file4
34506tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34507)"
34508at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
34509( $at_check_trace;
34510mkdir v7
34511(cd v7
34512TEST_TAR_FORMAT=v7
34513export TEST_TAR_FORMAT
34514TAR_OPTIONS="-H v7"
34515export TAR_OPTIONS
34516rm -rf *
34517
34518genfile -l 64 -f file1
34519ln file1 file2
34520ln file2 file3
34521ln file3 file4
34522tar -c -f archive --remove-files file1 file2 file3 file4
34523tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34524)
34525) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34526at_status=$? at_failed=false
34527$at_check_filter
34528at_fn_diff_devnull "$at_stderr" || at_failed=:
34529echo >>"$at_stdout"; $as_echo "file1
34530file1
34531file1
34532" | \
34533  $at_diff - "$at_stdout" || at_failed=:
34534at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
34535$at_failed && at_fn_log_failure
34536$at_traceon; }
34537
34538              { set +x
34539$as_echo "$at_srcdir/link02.at:35:
34540mkdir oldgnu
34541(cd oldgnu
34542TEST_TAR_FORMAT=oldgnu
34543export TEST_TAR_FORMAT
34544TAR_OPTIONS=\"-H oldgnu\"
34545export TAR_OPTIONS
34546rm -rf *
34547
34548genfile -l 64 -f file1
34549ln file1 file2
34550ln file2 file3
34551ln file3 file4
34552tar -c -f archive --remove-files file1 file2 file3 file4
34553tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34554)"
34555at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
34556( $at_check_trace;
34557mkdir oldgnu
34558(cd oldgnu
34559TEST_TAR_FORMAT=oldgnu
34560export TEST_TAR_FORMAT
34561TAR_OPTIONS="-H oldgnu"
34562export TAR_OPTIONS
34563rm -rf *
34564
34565genfile -l 64 -f file1
34566ln file1 file2
34567ln file2 file3
34568ln file3 file4
34569tar -c -f archive --remove-files file1 file2 file3 file4
34570tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34571)
34572) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34573at_status=$? at_failed=false
34574$at_check_filter
34575at_fn_diff_devnull "$at_stderr" || at_failed=:
34576echo >>"$at_stdout"; $as_echo "file1
34577file1
34578file1
34579" | \
34580  $at_diff - "$at_stdout" || at_failed=:
34581at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
34582$at_failed && at_fn_log_failure
34583$at_traceon; }
34584
34585              { set +x
34586$as_echo "$at_srcdir/link02.at:35:
34587mkdir ustar
34588(cd ustar
34589TEST_TAR_FORMAT=ustar
34590export TEST_TAR_FORMAT
34591TAR_OPTIONS=\"-H ustar\"
34592export TAR_OPTIONS
34593rm -rf *
34594
34595genfile -l 64 -f file1
34596ln file1 file2
34597ln file2 file3
34598ln file3 file4
34599tar -c -f archive --remove-files file1 file2 file3 file4
34600tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34601)"
34602at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
34603( $at_check_trace;
34604mkdir ustar
34605(cd ustar
34606TEST_TAR_FORMAT=ustar
34607export TEST_TAR_FORMAT
34608TAR_OPTIONS="-H ustar"
34609export TAR_OPTIONS
34610rm -rf *
34611
34612genfile -l 64 -f file1
34613ln file1 file2
34614ln file2 file3
34615ln file3 file4
34616tar -c -f archive --remove-files file1 file2 file3 file4
34617tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34618)
34619) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34620at_status=$? at_failed=false
34621$at_check_filter
34622at_fn_diff_devnull "$at_stderr" || at_failed=:
34623echo >>"$at_stdout"; $as_echo "file1
34624file1
34625file1
34626" | \
34627  $at_diff - "$at_stdout" || at_failed=:
34628at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
34629$at_failed && at_fn_log_failure
34630$at_traceon; }
34631
34632              { set +x
34633$as_echo "$at_srcdir/link02.at:35:
34634mkdir posix
34635(cd posix
34636TEST_TAR_FORMAT=posix
34637export TEST_TAR_FORMAT
34638TAR_OPTIONS=\"-H posix\"
34639export TAR_OPTIONS
34640rm -rf *
34641
34642genfile -l 64 -f file1
34643ln file1 file2
34644ln file2 file3
34645ln file3 file4
34646tar -c -f archive --remove-files file1 file2 file3 file4
34647tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34648)"
34649at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
34650( $at_check_trace;
34651mkdir posix
34652(cd posix
34653TEST_TAR_FORMAT=posix
34654export TEST_TAR_FORMAT
34655TAR_OPTIONS="-H posix"
34656export TAR_OPTIONS
34657rm -rf *
34658
34659genfile -l 64 -f file1
34660ln file1 file2
34661ln file2 file3
34662ln file3 file4
34663tar -c -f archive --remove-files file1 file2 file3 file4
34664tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34665)
34666) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34667at_status=$? at_failed=false
34668$at_check_filter
34669at_fn_diff_devnull "$at_stderr" || at_failed=:
34670echo >>"$at_stdout"; $as_echo "file1
34671file1
34672file1
34673" | \
34674  $at_diff - "$at_stdout" || at_failed=:
34675at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
34676$at_failed && at_fn_log_failure
34677$at_traceon; }
34678
34679              { set +x
34680$as_echo "$at_srcdir/link02.at:35:
34681mkdir gnu
34682(cd gnu
34683TEST_TAR_FORMAT=gnu
34684export TEST_TAR_FORMAT
34685TAR_OPTIONS=\"-H gnu\"
34686export TAR_OPTIONS
34687rm -rf *
34688
34689genfile -l 64 -f file1
34690ln file1 file2
34691ln file2 file3
34692ln file3 file4
34693tar -c -f archive --remove-files file1 file2 file3 file4
34694tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34695)"
34696at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
34697( $at_check_trace;
34698mkdir gnu
34699(cd gnu
34700TEST_TAR_FORMAT=gnu
34701export TEST_TAR_FORMAT
34702TAR_OPTIONS="-H gnu"
34703export TAR_OPTIONS
34704rm -rf *
34705
34706genfile -l 64 -f file1
34707ln file1 file2
34708ln file2 file3
34709ln file3 file4
34710tar -c -f archive --remove-files file1 file2 file3 file4
34711tar tfv archive | sed -n 's/.*file[2-4] link to //p'
34712)
34713) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34714at_status=$? at_failed=false
34715$at_check_filter
34716at_fn_diff_devnull "$at_stderr" || at_failed=:
34717echo >>"$at_stdout"; $as_echo "file1
34718file1
34719file1
34720" | \
34721  $at_diff - "$at_stdout" || at_failed=:
34722at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
34723$at_failed && at_fn_log_failure
34724$at_traceon; }
34725
34726
34727
34728
34729  set +x
34730  $at_times_p && times >"$at_times_file"
34731) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34732read at_status <"$at_status_file"
34733#AT_STOP_142
34734#AT_START_143
34735at_fn_group_banner 143 'link03.at:24' \
34736  "working -l with --remove-files" "                 " 21
34737at_xfail=no
34738      test -f $XFAILFILE && at_xfail=yes
34739(
34740  $as_echo "143. $at_setup_line: testing $at_desc ..."
34741  $at_traceon
34742
34743
34744
34745
34746
34747
34748
34749  { set +x
34750$as_echo "$at_srcdir/link03.at:34:
34751mkdir v7
34752(cd v7
34753TEST_TAR_FORMAT=v7
34754export TEST_TAR_FORMAT
34755TAR_OPTIONS=\"-H v7\"
34756export TAR_OPTIONS
34757rm -rf *
34758
34759
34760genfile -l 64 -f file1
34761ln file1 file2
34762ln file2 file3
34763ln file3 file4
34764
34765echo archive.1
34766tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
34767
34768genfile -l 64 -f file1
34769ln file1 file2
34770ln file2 file3
34771ln file3 file4
34772
34773echo archive.2
34774tar -c -f archive.2 -l --remove-files file1 file2 file3
34775echo testing archive.2
34776tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
34777)"
34778at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
34779( $at_check_trace;
34780mkdir v7
34781(cd v7
34782TEST_TAR_FORMAT=v7
34783export TEST_TAR_FORMAT
34784TAR_OPTIONS="-H v7"
34785export TAR_OPTIONS
34786rm -rf *
34787
34788
34789genfile -l 64 -f file1
34790ln file1 file2
34791ln file2 file3
34792ln file3 file4
34793
34794echo archive.1
34795tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
34796
34797genfile -l 64 -f file1
34798ln file1 file2
34799ln file2 file3
34800ln file3 file4
34801
34802echo archive.2
34803tar -c -f archive.2 -l --remove-files file1 file2 file3
34804echo testing archive.2
34805tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
34806)
34807) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34808at_status=$? at_failed=false
34809$at_check_filter
34810echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
34811" | \
34812  $at_diff - "$at_stderr" || at_failed=:
34813echo >>"$at_stdout"; $as_echo "archive.1
34814archive.2
34815testing archive.2
34816file1
34817file1
34818" | \
34819  $at_diff - "$at_stdout" || at_failed=:
34820at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
34821$at_failed && at_fn_log_failure
34822$at_traceon; }
34823
34824              { set +x
34825$as_echo "$at_srcdir/link03.at:34:
34826mkdir oldgnu
34827(cd oldgnu
34828TEST_TAR_FORMAT=oldgnu
34829export TEST_TAR_FORMAT
34830TAR_OPTIONS=\"-H oldgnu\"
34831export TAR_OPTIONS
34832rm -rf *
34833
34834
34835genfile -l 64 -f file1
34836ln file1 file2
34837ln file2 file3
34838ln file3 file4
34839
34840echo archive.1
34841tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
34842
34843genfile -l 64 -f file1
34844ln file1 file2
34845ln file2 file3
34846ln file3 file4
34847
34848echo archive.2
34849tar -c -f archive.2 -l --remove-files file1 file2 file3
34850echo testing archive.2
34851tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
34852)"
34853at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
34854( $at_check_trace;
34855mkdir oldgnu
34856(cd oldgnu
34857TEST_TAR_FORMAT=oldgnu
34858export TEST_TAR_FORMAT
34859TAR_OPTIONS="-H oldgnu"
34860export TAR_OPTIONS
34861rm -rf *
34862
34863
34864genfile -l 64 -f file1
34865ln file1 file2
34866ln file2 file3
34867ln file3 file4
34868
34869echo archive.1
34870tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
34871
34872genfile -l 64 -f file1
34873ln file1 file2
34874ln file2 file3
34875ln file3 file4
34876
34877echo archive.2
34878tar -c -f archive.2 -l --remove-files file1 file2 file3
34879echo testing archive.2
34880tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
34881)
34882) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34883at_status=$? at_failed=false
34884$at_check_filter
34885echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
34886" | \
34887  $at_diff - "$at_stderr" || at_failed=:
34888echo >>"$at_stdout"; $as_echo "archive.1
34889archive.2
34890testing archive.2
34891file1
34892file1
34893" | \
34894  $at_diff - "$at_stdout" || at_failed=:
34895at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
34896$at_failed && at_fn_log_failure
34897$at_traceon; }
34898
34899              { set +x
34900$as_echo "$at_srcdir/link03.at:34:
34901mkdir ustar
34902(cd ustar
34903TEST_TAR_FORMAT=ustar
34904export TEST_TAR_FORMAT
34905TAR_OPTIONS=\"-H ustar\"
34906export TAR_OPTIONS
34907rm -rf *
34908
34909
34910genfile -l 64 -f file1
34911ln file1 file2
34912ln file2 file3
34913ln file3 file4
34914
34915echo archive.1
34916tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
34917
34918genfile -l 64 -f file1
34919ln file1 file2
34920ln file2 file3
34921ln file3 file4
34922
34923echo archive.2
34924tar -c -f archive.2 -l --remove-files file1 file2 file3
34925echo testing archive.2
34926tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
34927)"
34928at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
34929( $at_check_trace;
34930mkdir ustar
34931(cd ustar
34932TEST_TAR_FORMAT=ustar
34933export TEST_TAR_FORMAT
34934TAR_OPTIONS="-H ustar"
34935export TAR_OPTIONS
34936rm -rf *
34937
34938
34939genfile -l 64 -f file1
34940ln file1 file2
34941ln file2 file3
34942ln file3 file4
34943
34944echo archive.1
34945tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
34946
34947genfile -l 64 -f file1
34948ln file1 file2
34949ln file2 file3
34950ln file3 file4
34951
34952echo archive.2
34953tar -c -f archive.2 -l --remove-files file1 file2 file3
34954echo testing archive.2
34955tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
34956)
34957) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34958at_status=$? at_failed=false
34959$at_check_filter
34960echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
34961" | \
34962  $at_diff - "$at_stderr" || at_failed=:
34963echo >>"$at_stdout"; $as_echo "archive.1
34964archive.2
34965testing archive.2
34966file1
34967file1
34968" | \
34969  $at_diff - "$at_stdout" || at_failed=:
34970at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
34971$at_failed && at_fn_log_failure
34972$at_traceon; }
34973
34974              { set +x
34975$as_echo "$at_srcdir/link03.at:34:
34976mkdir posix
34977(cd posix
34978TEST_TAR_FORMAT=posix
34979export TEST_TAR_FORMAT
34980TAR_OPTIONS=\"-H posix\"
34981export TAR_OPTIONS
34982rm -rf *
34983
34984
34985genfile -l 64 -f file1
34986ln file1 file2
34987ln file2 file3
34988ln file3 file4
34989
34990echo archive.1
34991tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
34992
34993genfile -l 64 -f file1
34994ln file1 file2
34995ln file2 file3
34996ln file3 file4
34997
34998echo archive.2
34999tar -c -f archive.2 -l --remove-files file1 file2 file3
35000echo testing archive.2
35001tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
35002)"
35003at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
35004( $at_check_trace;
35005mkdir posix
35006(cd posix
35007TEST_TAR_FORMAT=posix
35008export TEST_TAR_FORMAT
35009TAR_OPTIONS="-H posix"
35010export TAR_OPTIONS
35011rm -rf *
35012
35013
35014genfile -l 64 -f file1
35015ln file1 file2
35016ln file2 file3
35017ln file3 file4
35018
35019echo archive.1
35020tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
35021
35022genfile -l 64 -f file1
35023ln file1 file2
35024ln file2 file3
35025ln file3 file4
35026
35027echo archive.2
35028tar -c -f archive.2 -l --remove-files file1 file2 file3
35029echo testing archive.2
35030tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
35031)
35032) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35033at_status=$? at_failed=false
35034$at_check_filter
35035echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
35036" | \
35037  $at_diff - "$at_stderr" || at_failed=:
35038echo >>"$at_stdout"; $as_echo "archive.1
35039archive.2
35040testing archive.2
35041file1
35042file1
35043" | \
35044  $at_diff - "$at_stdout" || at_failed=:
35045at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
35046$at_failed && at_fn_log_failure
35047$at_traceon; }
35048
35049              { set +x
35050$as_echo "$at_srcdir/link03.at:34:
35051mkdir gnu
35052(cd gnu
35053TEST_TAR_FORMAT=gnu
35054export TEST_TAR_FORMAT
35055TAR_OPTIONS=\"-H gnu\"
35056export TAR_OPTIONS
35057rm -rf *
35058
35059
35060genfile -l 64 -f file1
35061ln file1 file2
35062ln file2 file3
35063ln file3 file4
35064
35065echo archive.1
35066tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
35067
35068genfile -l 64 -f file1
35069ln file1 file2
35070ln file2 file3
35071ln file3 file4
35072
35073echo archive.2
35074tar -c -f archive.2 -l --remove-files file1 file2 file3
35075echo testing archive.2
35076tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
35077)"
35078at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
35079( $at_check_trace;
35080mkdir gnu
35081(cd gnu
35082TEST_TAR_FORMAT=gnu
35083export TEST_TAR_FORMAT
35084TAR_OPTIONS="-H gnu"
35085export TAR_OPTIONS
35086rm -rf *
35087
35088
35089genfile -l 64 -f file1
35090ln file1 file2
35091ln file2 file3
35092ln file3 file4
35093
35094echo archive.1
35095tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
35096
35097genfile -l 64 -f file1
35098ln file1 file2
35099ln file2 file3
35100ln file3 file4
35101
35102echo archive.2
35103tar -c -f archive.2 -l --remove-files file1 file2 file3
35104echo testing archive.2
35105tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
35106)
35107) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35108at_status=$? at_failed=false
35109$at_check_filter
35110echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
35111" | \
35112  $at_diff - "$at_stderr" || at_failed=:
35113echo >>"$at_stdout"; $as_echo "archive.1
35114archive.2
35115testing archive.2
35116file1
35117file1
35118" | \
35119  $at_diff - "$at_stdout" || at_failed=:
35120at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
35121$at_failed && at_fn_log_failure
35122$at_traceon; }
35123
35124
35125
35126
35127
35128  set +x
35129  $at_times_p && times >"$at_times_file"
35130) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35131read at_status <"$at_status_file"
35132#AT_STOP_143
35133#AT_START_144
35134at_fn_group_banner 144 'link04.at:29' \
35135  "link count is 1 but multiple occurrences" "       " 21
35136at_xfail=no
35137      test -f $XFAILFILE && at_xfail=yes
35138(
35139  $as_echo "144. $at_setup_line: testing $at_desc ..."
35140  $at_traceon
35141
35142
35143
35144
35145
35146  { set +x
35147$as_echo "$at_srcdir/link04.at:32:
35148mkdir v7
35149(cd v7
35150TEST_TAR_FORMAT=v7
35151export TEST_TAR_FORMAT
35152TAR_OPTIONS=\"-H v7\"
35153export TAR_OPTIONS
35154rm -rf *
35155
35156mkdir dir
35157echo TEST > dir/file
35158ln -s file dir/symlink || exit 77
35159
35160tar cf archive dir dir
35161tar tvf archive | sed '
35162  s,.*[0-9] dir/,dir/,
35163' | sort
35164
35165echo --
35166
35167tar cfl archive dir dir
35168
35169echo ==
35170
35171tar chf archive dir
35172tar tvf archive | sed '
35173  s,.*[0-9] dir/,dir/,
35174  s,file,FOO,g
35175  s,symlink,FOO,g
35176' | sort
35177)"
35178at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
35179( $at_check_trace;
35180mkdir v7
35181(cd v7
35182TEST_TAR_FORMAT=v7
35183export TEST_TAR_FORMAT
35184TAR_OPTIONS="-H v7"
35185export TAR_OPTIONS
35186rm -rf *
35187
35188mkdir dir
35189echo TEST > dir/file
35190ln -s file dir/symlink || exit 77
35191
35192tar cf archive dir dir
35193tar tvf archive | sed '
35194  s,.*[0-9] dir/,dir/,
35195' | sort
35196
35197echo --
35198
35199tar cfl archive dir dir
35200
35201echo ==
35202
35203tar chf archive dir
35204tar tvf archive | sed '
35205  s,.*[0-9] dir/,dir/,
35206  s,file,FOO,g
35207  s,symlink,FOO,g
35208' | sort
35209)
35210) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35211at_status=$? at_failed=false
35212$at_check_filter
35213at_fn_diff_devnull "$at_stderr" || at_failed=:
35214echo >>"$at_stdout"; $as_echo "dir/
35215dir/
35216dir/file
35217dir/file link to dir/file
35218dir/symlink -> file
35219dir/symlink link to dir/symlink
35220--
35221==
35222dir/
35223dir/FOO
35224dir/FOO link to dir/FOO
35225" | \
35226  $at_diff - "$at_stdout" || at_failed=:
35227at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
35228$at_failed && at_fn_log_failure
35229$at_traceon; }
35230
35231              { set +x
35232$as_echo "$at_srcdir/link04.at:32:
35233mkdir oldgnu
35234(cd oldgnu
35235TEST_TAR_FORMAT=oldgnu
35236export TEST_TAR_FORMAT
35237TAR_OPTIONS=\"-H oldgnu\"
35238export TAR_OPTIONS
35239rm -rf *
35240
35241mkdir dir
35242echo TEST > dir/file
35243ln -s file dir/symlink || exit 77
35244
35245tar cf archive dir dir
35246tar tvf archive | sed '
35247  s,.*[0-9] dir/,dir/,
35248' | sort
35249
35250echo --
35251
35252tar cfl archive dir dir
35253
35254echo ==
35255
35256tar chf archive dir
35257tar tvf archive | sed '
35258  s,.*[0-9] dir/,dir/,
35259  s,file,FOO,g
35260  s,symlink,FOO,g
35261' | sort
35262)"
35263at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
35264( $at_check_trace;
35265mkdir oldgnu
35266(cd oldgnu
35267TEST_TAR_FORMAT=oldgnu
35268export TEST_TAR_FORMAT
35269TAR_OPTIONS="-H oldgnu"
35270export TAR_OPTIONS
35271rm -rf *
35272
35273mkdir dir
35274echo TEST > dir/file
35275ln -s file dir/symlink || exit 77
35276
35277tar cf archive dir dir
35278tar tvf archive | sed '
35279  s,.*[0-9] dir/,dir/,
35280' | sort
35281
35282echo --
35283
35284tar cfl archive dir dir
35285
35286echo ==
35287
35288tar chf archive dir
35289tar tvf archive | sed '
35290  s,.*[0-9] dir/,dir/,
35291  s,file,FOO,g
35292  s,symlink,FOO,g
35293' | sort
35294)
35295) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35296at_status=$? at_failed=false
35297$at_check_filter
35298at_fn_diff_devnull "$at_stderr" || at_failed=:
35299echo >>"$at_stdout"; $as_echo "dir/
35300dir/
35301dir/file
35302dir/file link to dir/file
35303dir/symlink -> file
35304dir/symlink link to dir/symlink
35305--
35306==
35307dir/
35308dir/FOO
35309dir/FOO link to dir/FOO
35310" | \
35311  $at_diff - "$at_stdout" || at_failed=:
35312at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
35313$at_failed && at_fn_log_failure
35314$at_traceon; }
35315
35316              { set +x
35317$as_echo "$at_srcdir/link04.at:32:
35318mkdir ustar
35319(cd ustar
35320TEST_TAR_FORMAT=ustar
35321export TEST_TAR_FORMAT
35322TAR_OPTIONS=\"-H ustar\"
35323export TAR_OPTIONS
35324rm -rf *
35325
35326mkdir dir
35327echo TEST > dir/file
35328ln -s file dir/symlink || exit 77
35329
35330tar cf archive dir dir
35331tar tvf archive | sed '
35332  s,.*[0-9] dir/,dir/,
35333' | sort
35334
35335echo --
35336
35337tar cfl archive dir dir
35338
35339echo ==
35340
35341tar chf archive dir
35342tar tvf archive | sed '
35343  s,.*[0-9] dir/,dir/,
35344  s,file,FOO,g
35345  s,symlink,FOO,g
35346' | sort
35347)"
35348at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
35349( $at_check_trace;
35350mkdir ustar
35351(cd ustar
35352TEST_TAR_FORMAT=ustar
35353export TEST_TAR_FORMAT
35354TAR_OPTIONS="-H ustar"
35355export TAR_OPTIONS
35356rm -rf *
35357
35358mkdir dir
35359echo TEST > dir/file
35360ln -s file dir/symlink || exit 77
35361
35362tar cf archive dir dir
35363tar tvf archive | sed '
35364  s,.*[0-9] dir/,dir/,
35365' | sort
35366
35367echo --
35368
35369tar cfl archive dir dir
35370
35371echo ==
35372
35373tar chf archive dir
35374tar tvf archive | sed '
35375  s,.*[0-9] dir/,dir/,
35376  s,file,FOO,g
35377  s,symlink,FOO,g
35378' | sort
35379)
35380) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35381at_status=$? at_failed=false
35382$at_check_filter
35383at_fn_diff_devnull "$at_stderr" || at_failed=:
35384echo >>"$at_stdout"; $as_echo "dir/
35385dir/
35386dir/file
35387dir/file link to dir/file
35388dir/symlink -> file
35389dir/symlink link to dir/symlink
35390--
35391==
35392dir/
35393dir/FOO
35394dir/FOO link to dir/FOO
35395" | \
35396  $at_diff - "$at_stdout" || at_failed=:
35397at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
35398$at_failed && at_fn_log_failure
35399$at_traceon; }
35400
35401              { set +x
35402$as_echo "$at_srcdir/link04.at:32:
35403mkdir posix
35404(cd posix
35405TEST_TAR_FORMAT=posix
35406export TEST_TAR_FORMAT
35407TAR_OPTIONS=\"-H posix\"
35408export TAR_OPTIONS
35409rm -rf *
35410
35411mkdir dir
35412echo TEST > dir/file
35413ln -s file dir/symlink || exit 77
35414
35415tar cf archive dir dir
35416tar tvf archive | sed '
35417  s,.*[0-9] dir/,dir/,
35418' | sort
35419
35420echo --
35421
35422tar cfl archive dir dir
35423
35424echo ==
35425
35426tar chf archive dir
35427tar tvf archive | sed '
35428  s,.*[0-9] dir/,dir/,
35429  s,file,FOO,g
35430  s,symlink,FOO,g
35431' | sort
35432)"
35433at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
35434( $at_check_trace;
35435mkdir posix
35436(cd posix
35437TEST_TAR_FORMAT=posix
35438export TEST_TAR_FORMAT
35439TAR_OPTIONS="-H posix"
35440export TAR_OPTIONS
35441rm -rf *
35442
35443mkdir dir
35444echo TEST > dir/file
35445ln -s file dir/symlink || exit 77
35446
35447tar cf archive dir dir
35448tar tvf archive | sed '
35449  s,.*[0-9] dir/,dir/,
35450' | sort
35451
35452echo --
35453
35454tar cfl archive dir dir
35455
35456echo ==
35457
35458tar chf archive dir
35459tar tvf archive | sed '
35460  s,.*[0-9] dir/,dir/,
35461  s,file,FOO,g
35462  s,symlink,FOO,g
35463' | sort
35464)
35465) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35466at_status=$? at_failed=false
35467$at_check_filter
35468at_fn_diff_devnull "$at_stderr" || at_failed=:
35469echo >>"$at_stdout"; $as_echo "dir/
35470dir/
35471dir/file
35472dir/file link to dir/file
35473dir/symlink -> file
35474dir/symlink link to dir/symlink
35475--
35476==
35477dir/
35478dir/FOO
35479dir/FOO link to dir/FOO
35480" | \
35481  $at_diff - "$at_stdout" || at_failed=:
35482at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
35483$at_failed && at_fn_log_failure
35484$at_traceon; }
35485
35486              { set +x
35487$as_echo "$at_srcdir/link04.at:32:
35488mkdir gnu
35489(cd gnu
35490TEST_TAR_FORMAT=gnu
35491export TEST_TAR_FORMAT
35492TAR_OPTIONS=\"-H gnu\"
35493export TAR_OPTIONS
35494rm -rf *
35495
35496mkdir dir
35497echo TEST > dir/file
35498ln -s file dir/symlink || exit 77
35499
35500tar cf archive dir dir
35501tar tvf archive | sed '
35502  s,.*[0-9] dir/,dir/,
35503' | sort
35504
35505echo --
35506
35507tar cfl archive dir dir
35508
35509echo ==
35510
35511tar chf archive dir
35512tar tvf archive | sed '
35513  s,.*[0-9] dir/,dir/,
35514  s,file,FOO,g
35515  s,symlink,FOO,g
35516' | sort
35517)"
35518at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
35519( $at_check_trace;
35520mkdir gnu
35521(cd gnu
35522TEST_TAR_FORMAT=gnu
35523export TEST_TAR_FORMAT
35524TAR_OPTIONS="-H gnu"
35525export TAR_OPTIONS
35526rm -rf *
35527
35528mkdir dir
35529echo TEST > dir/file
35530ln -s file dir/symlink || exit 77
35531
35532tar cf archive dir dir
35533tar tvf archive | sed '
35534  s,.*[0-9] dir/,dir/,
35535' | sort
35536
35537echo --
35538
35539tar cfl archive dir dir
35540
35541echo ==
35542
35543tar chf archive dir
35544tar tvf archive | sed '
35545  s,.*[0-9] dir/,dir/,
35546  s,file,FOO,g
35547  s,symlink,FOO,g
35548' | sort
35549)
35550) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35551at_status=$? at_failed=false
35552$at_check_filter
35553at_fn_diff_devnull "$at_stderr" || at_failed=:
35554echo >>"$at_stdout"; $as_echo "dir/
35555dir/
35556dir/file
35557dir/file link to dir/file
35558dir/symlink -> file
35559dir/symlink link to dir/symlink
35560--
35561==
35562dir/
35563dir/FOO
35564dir/FOO link to dir/FOO
35565" | \
35566  $at_diff - "$at_stdout" || at_failed=:
35567at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
35568$at_failed && at_fn_log_failure
35569$at_traceon; }
35570
35571
35572
35573
35574  set +x
35575  $at_times_p && times >"$at_times_file"
35576) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35577read at_status <"$at_status_file"
35578#AT_STOP_144
35579#AT_START_145
35580at_fn_group_banner 145 'longv7.at:24' \
35581  "long names in V7 archives" "                      " 22
35582at_xfail=no
35583      test -f $XFAILFILE && at_xfail=yes
35584(
35585  $as_echo "145. $at_setup_line: testing $at_desc ..."
35586  $at_traceon
35587
35588
35589
35590
35591
35592
35593
35594
35595  { set +x
35596$as_echo "$at_srcdir/longv7.at:30:
35597mkdir v7
35598(cd v7
35599TEST_TAR_FORMAT=v7
35600export TEST_TAR_FORMAT
35601TAR_OPTIONS=\"-H v7\"
35602export TAR_OPTIONS
35603rm -rf *
35604
35605mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
35606touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
35607
35608tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
35609echo separator
35610tar tf archive
35611)"
35612at_fn_check_prepare_notrace 'an embedded newline' "longv7.at:30"
35613( $at_check_trace;
35614mkdir v7
35615(cd v7
35616TEST_TAR_FORMAT=v7
35617export TEST_TAR_FORMAT
35618TAR_OPTIONS="-H v7"
35619export TAR_OPTIONS
35620rm -rf *
35621
35622mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
35623touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
35624
35625tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
35626echo separator
35627tar tf archive
35628)
35629) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35630at_status=$? at_failed=false
35631$at_check_filter
35632echo >>"$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
35633tar: Exiting with failure status due to previous errors
35634" | \
35635  $at_diff - "$at_stderr" || at_failed=:
35636echo >>"$at_stdout"; $as_echo "separator
35637this_is_a_very_long_name_for_a_directory_which_causes_problems/
35638" | \
35639  $at_diff - "$at_stdout" || at_failed=:
35640at_fn_check_status 0 $at_status "$at_srcdir/longv7.at:30"
35641$at_failed && at_fn_log_failure
35642$at_traceon; }
35643
35644
35645
35646
35647
35648
35649  set +x
35650  $at_times_p && times >"$at_times_file"
35651) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35652read at_status <"$at_status_file"
35653#AT_STOP_145
35654#AT_START_146
35655at_fn_group_banner 146 'long01.at:28' \
35656  "long file names divisible by block size" "        " 22
35657at_xfail=no
35658      test -f $XFAILFILE && at_xfail=yes
35659(
35660  $as_echo "146. $at_setup_line: testing $at_desc ..."
35661  $at_traceon
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671  { set +x
35672$as_echo "$at_srcdir/long01.at:36:
35673mkdir gnu
35674(cd gnu
35675TEST_TAR_FORMAT=gnu
35676export TEST_TAR_FORMAT
35677TAR_OPTIONS=\"-H gnu\"
35678export TAR_OPTIONS
35679rm -rf *
35680
35681
35682install-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
35683echo test > endfile
35684
35685tar 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
35686tar tf archive)"
35687at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
35688( $at_check_trace;
35689mkdir gnu
35690(cd gnu
35691TEST_TAR_FORMAT=gnu
35692export TEST_TAR_FORMAT
35693TAR_OPTIONS="-H gnu"
35694export TAR_OPTIONS
35695rm -rf *
35696
35697
35698install-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
35699echo test > endfile
35700
35701tar 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
35702tar tf archive)
35703) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35704at_status=$? at_failed=false
35705$at_check_filter
35706at_fn_diff_devnull "$at_stderr" || at_failed=:
35707echo >>"$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
35708endfile
35709" | \
35710  $at_diff - "$at_stdout" || at_failed=:
35711at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
35712$at_failed && at_fn_log_failure
35713$at_traceon; }
35714
35715              { set +x
35716$as_echo "$at_srcdir/long01.at:36:
35717mkdir oldgnu
35718(cd oldgnu
35719TEST_TAR_FORMAT=oldgnu
35720export TEST_TAR_FORMAT
35721TAR_OPTIONS=\"-H oldgnu\"
35722export TAR_OPTIONS
35723rm -rf *
35724
35725
35726install-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
35727echo test > endfile
35728
35729tar 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
35730tar tf archive)"
35731at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
35732( $at_check_trace;
35733mkdir oldgnu
35734(cd oldgnu
35735TEST_TAR_FORMAT=oldgnu
35736export TEST_TAR_FORMAT
35737TAR_OPTIONS="-H oldgnu"
35738export TAR_OPTIONS
35739rm -rf *
35740
35741
35742install-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
35743echo test > endfile
35744
35745tar 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
35746tar tf archive)
35747) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35748at_status=$? at_failed=false
35749$at_check_filter
35750at_fn_diff_devnull "$at_stderr" || at_failed=:
35751echo >>"$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
35752endfile
35753" | \
35754  $at_diff - "$at_stdout" || at_failed=:
35755at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
35756$at_failed && at_fn_log_failure
35757$at_traceon; }
35758
35759
35760
35761
35762
35763
35764  set +x
35765  $at_times_p && times >"$at_times_file"
35766) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35767read at_status <"$at_status_file"
35768#AT_STOP_146
35769#AT_START_147
35770at_fn_group_banner 147 'lustar01.at:21' \
35771  "ustar: unsplittable file name" "                  " 22
35772at_xfail=no
35773      test -f $XFAILFILE && at_xfail=yes
35774(
35775  $as_echo "147. $at_setup_line: testing $at_desc ..."
35776  $at_traceon
35777
35778
35779
35780
35781
35782
35783
35784  { set +x
35785$as_echo "$at_srcdir/lustar01.at:27:
35786mkdir ustar
35787(cd ustar
35788TEST_TAR_FORMAT=ustar
35789export TEST_TAR_FORMAT
35790TAR_OPTIONS=\"-H ustar\"
35791export TAR_OPTIONS
35792rm -rf *
35793
35794genfile --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
35795tar 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
35796)"
35797at_fn_check_prepare_notrace 'an embedded newline' "lustar01.at:27"
35798( $at_check_trace;
35799mkdir ustar
35800(cd ustar
35801TEST_TAR_FORMAT=ustar
35802export TEST_TAR_FORMAT
35803TAR_OPTIONS="-H ustar"
35804export TAR_OPTIONS
35805rm -rf *
35806
35807genfile --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
35808tar 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
35809)
35810) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35811at_status=$? at_failed=false
35812$at_check_filter
35813echo >>"$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
35814tar: Exiting with failure status due to previous errors
35815" | \
35816  $at_diff - "$at_stderr" || at_failed=:
35817at_fn_diff_devnull "$at_stdout" || at_failed=:
35818at_fn_check_status 2 $at_status "$at_srcdir/lustar01.at:27"
35819$at_failed && at_fn_log_failure
35820$at_traceon; }
35821
35822
35823
35824
35825
35826  set +x
35827  $at_times_p && times >"$at_times_file"
35828) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35829read at_status <"$at_status_file"
35830#AT_STOP_147
35831#AT_START_148
35832at_fn_group_banner 148 'lustar02.at:21' \
35833  "ustar: unsplittable path name" "                  " 22
35834at_xfail=no
35835      test -f $XFAILFILE && at_xfail=yes
35836(
35837  $as_echo "148. $at_setup_line: testing $at_desc ..."
35838  $at_traceon
35839
35840
35841
35842
35843
35844
35845
35846
35847
35848
35849
35850  { set +x
35851$as_echo "$at_srcdir/lustar02.at:32:
35852mkdir ustar
35853(cd ustar
35854TEST_TAR_FORMAT=ustar
35855export TEST_TAR_FORMAT
35856TAR_OPTIONS=\"-H ustar\"
35857export TAR_OPTIONS
35858rm -rf *
35859
35860
35861install-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
35862tar 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
35863)"
35864at_fn_check_prepare_notrace 'an embedded newline' "lustar02.at:32"
35865( $at_check_trace;
35866mkdir ustar
35867(cd ustar
35868TEST_TAR_FORMAT=ustar
35869export TEST_TAR_FORMAT
35870TAR_OPTIONS="-H ustar"
35871export TAR_OPTIONS
35872rm -rf *
35873
35874
35875install-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
35876tar 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
35877)
35878) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35879at_status=$? at_failed=false
35880$at_check_filter
35881echo >>"$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
35882tar: Exiting with failure status due to previous errors
35883" | \
35884  $at_diff - "$at_stderr" || at_failed=:
35885at_fn_diff_devnull "$at_stdout" || at_failed=:
35886at_fn_check_status 2 $at_status "$at_srcdir/lustar02.at:32"
35887$at_failed && at_fn_log_failure
35888$at_traceon; }
35889
35890
35891
35892
35893
35894
35895
35896
35897  set +x
35898  $at_times_p && times >"$at_times_file"
35899) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35900read at_status <"$at_status_file"
35901#AT_STOP_148
35902#AT_START_149
35903at_fn_group_banner 149 'lustar03.at:21' \
35904  "ustar: splitting long names" "                    " 22
35905at_xfail=no
35906      test -f $XFAILFILE && at_xfail=yes
35907(
35908  $as_echo "149. $at_setup_line: testing $at_desc ..."
35909  $at_traceon
35910
35911
35912
35913
35914
35915
35916
35917
35918
35919  { set +x
35920$as_echo "$at_srcdir/lustar03.at:29:
35921mkdir ustar
35922(cd ustar
35923TEST_TAR_FORMAT=ustar
35924export TEST_TAR_FORMAT
35925TAR_OPTIONS=\"-H ustar\"
35926export TAR_OPTIONS
35927rm -rf *
35928
35929
35930install-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
35931echo \"Create archive\"
35932tar 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
35933echo \"List archive\"
35934tar tf archive)"
35935at_fn_check_prepare_notrace 'an embedded newline' "lustar03.at:29"
35936( $at_check_trace;
35937mkdir ustar
35938(cd ustar
35939TEST_TAR_FORMAT=ustar
35940export TEST_TAR_FORMAT
35941TAR_OPTIONS="-H ustar"
35942export TAR_OPTIONS
35943rm -rf *
35944
35945
35946install-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
35947echo "Create archive"
35948tar 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
35949echo "List archive"
35950tar tf archive)
35951) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35952at_status=$? at_failed=false
35953$at_check_filter
35954at_fn_diff_devnull "$at_stderr" || at_failed=:
35955echo >>"$at_stdout"; $as_echo "Create archive
35956List archive
35957this_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/
35958this_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
35959" | \
35960  $at_diff - "$at_stdout" || at_failed=:
35961at_fn_check_status 0 $at_status "$at_srcdir/lustar03.at:29"
35962$at_failed && at_fn_log_failure
35963$at_traceon; }
35964
35965
35966
35967
35968
35969
35970  set +x
35971  $at_times_p && times >"$at_times_file"
35972) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35973read at_status <"$at_status_file"
35974#AT_STOP_149
35975#AT_START_150
35976at_fn_group_banner 150 'old.at:23' \
35977  "old archives" "                                   " 22
35978at_xfail=no
35979(
35980  $as_echo "150. $at_setup_line: testing $at_desc ..."
35981  $at_traceon
35982
35983
35984
35985unset TAR_OPTIONS
35986{ set +x
35987$as_echo "$at_srcdir/old.at:27:
35988mkdir directory
35989tar cfvo archive directory || exit 1
35990tar tf archive
35991"
35992at_fn_check_prepare_notrace 'an embedded newline' "old.at:27"
35993( $at_check_trace;
35994mkdir directory
35995tar cfvo archive directory || exit 1
35996tar tf archive
35997
35998) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35999at_status=$? at_failed=false
36000$at_check_filter
36001at_fn_diff_devnull "$at_stderr" || at_failed=:
36002echo >>"$at_stdout"; $as_echo "directory/
36003directory/
36004" | \
36005  $at_diff - "$at_stdout" || at_failed=:
36006at_fn_check_status 0 $at_status "$at_srcdir/old.at:27"
36007$at_failed && at_fn_log_failure
36008$at_traceon; }
36009
36010
36011  set +x
36012  $at_times_p && times >"$at_times_file"
36013) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36014read at_status <"$at_status_file"
36015#AT_STOP_150
36016#AT_START_151
36017at_fn_group_banner 151 'time01.at:20' \
36018  "time: tricky time stamps" "                       " 22
36019at_xfail=no
36020      test -f $XFAILFILE && at_xfail=yes
36021(
36022  $as_echo "151. $at_setup_line: testing $at_desc ..."
36023  $at_traceon
36024
36025
36026
36027
36028
36029  { set +x
36030$as_echo "$at_srcdir/time01.at:23:
36031mkdir pax
36032(cd pax
36033TEST_TAR_FORMAT=pax
36034export TEST_TAR_FORMAT
36035TAR_OPTIONS=\"-H pax\"
36036export TAR_OPTIONS
36037rm -rf *
36038
36039export TZ=UTC0
36040mkdir dir
36041
36042# Test files with time stamps that are near common sources of error,
36043# typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
36044# Use GNU-style @ notation for very large time stamps, since they
36045# typically don't render into years correctly due to int overflow.
36046for s in \\
36047  @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \\
36048  0000-01-01T00:00:00 0000-01-01T00:00:01 \\
36049  0000-01-02T00:00:00 \\
36050  1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \\
36051  1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \\
36052  1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \\
36053  1901-12-14T20:45:51 \\
36054  1969-12-31T23:59:58 1969-12-31T23:59:59 \\
36055  1970-01-01T00:00:00 1970-01-01T00:00:01 \\
36056  2038-01-18T03:14:07 \\
36057  2038-01-19T03:14:07 2038-01-19T03:14:08 \\
36058  2106-02-07T06:28:15 2106-02-07T06:28:16 \\
36059  2242-03-16T12:56:31 2242-03-16T12:56:32 \\
36060  9999-12-31T23:59:58 9999-12-31T23:59:59 \\
36061  @9223372036854775807 @9223372036854775808
36062do
36063  # Skip a time stamp \$s if it's out of range for this platform,
36064  # of if it uses a notation that this platform does not recognize.
36065  touch -d \$s dir/f\$s >/dev/null 2>&1 || continue
36066
36067  # Likewise for \$s.1.  If \$s is the most negative time stamp and
36068  # time stamps are signed, then \$s.1 is out of range.
36069  touch -d \$s.1 dir/f\$s.\$ns >/dev/null 2>&1 || continue
36070
36071  for frac in   01 001 00001 000001 0000001 00000001 000000001 0000000001 \\
36072	      9 99 999 99999 999999 9999999 99999999 999999999 9999999999
36073  do
36074    touch -d \$s.\$frac dir/f\$s.\$frac
36075  done
36076done
36077
36078tar -c -f archive.tar dir
36079tar -d -f archive.tar dir
36080)"
36081at_fn_check_prepare_notrace 'an embedded newline' "time01.at:23"
36082( $at_check_trace;
36083mkdir pax
36084(cd pax
36085TEST_TAR_FORMAT=pax
36086export TEST_TAR_FORMAT
36087TAR_OPTIONS="-H pax"
36088export TAR_OPTIONS
36089rm -rf *
36090
36091export TZ=UTC0
36092mkdir dir
36093
36094# Test files with time stamps that are near common sources of error,
36095# typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
36096# Use GNU-style @ notation for very large time stamps, since they
36097# typically don't render into years correctly due to int overflow.
36098for s in \
36099  @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \
36100  0000-01-01T00:00:00 0000-01-01T00:00:01 \
36101  0000-01-02T00:00:00 \
36102  1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \
36103  1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \
36104  1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \
36105  1901-12-14T20:45:51 \
36106  1969-12-31T23:59:58 1969-12-31T23:59:59 \
36107  1970-01-01T00:00:00 1970-01-01T00:00:01 \
36108  2038-01-18T03:14:07 \
36109  2038-01-19T03:14:07 2038-01-19T03:14:08 \
36110  2106-02-07T06:28:15 2106-02-07T06:28:16 \
36111  2242-03-16T12:56:31 2242-03-16T12:56:32 \
36112  9999-12-31T23:59:58 9999-12-31T23:59:59 \
36113  @9223372036854775807 @9223372036854775808
36114do
36115  # Skip a time stamp $s if it's out of range for this platform,
36116  # of if it uses a notation that this platform does not recognize.
36117  touch -d $s dir/f$s >/dev/null 2>&1 || continue
36118
36119  # Likewise for $s.1.  If $s is the most negative time stamp and
36120  # time stamps are signed, then $s.1 is out of range.
36121  touch -d $s.1 dir/f$s.$ns >/dev/null 2>&1 || continue
36122
36123  for frac in   01 001 00001 000001 0000001 00000001 000000001 0000000001 \
36124	      9 99 999 99999 999999 9999999 99999999 999999999 9999999999
36125  do
36126    touch -d $s.$frac dir/f$s.$frac
36127  done
36128done
36129
36130tar -c -f archive.tar dir
36131tar -d -f archive.tar dir
36132)
36133) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36134at_status=$? at_failed=false
36135$at_check_filter
36136at_fn_diff_devnull "$at_stderr" || at_failed=:
36137at_fn_diff_devnull "$at_stdout" || at_failed=:
36138at_fn_check_status 0 $at_status "$at_srcdir/time01.at:23"
36139$at_failed && at_fn_log_failure
36140$at_traceon; }
36141
36142
36143
36144
36145  set +x
36146  $at_times_p && times >"$at_times_file"
36147) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36148read at_status <"$at_status_file"
36149#AT_STOP_151
36150#AT_START_152
36151at_fn_group_banner 152 'time02.at:20' \
36152  "time: clamping mtime" "                           " 22
36153at_xfail=no
36154      test -f $XFAILFILE && at_xfail=yes
36155(
36156  $as_echo "152. $at_setup_line: testing $at_desc ..."
36157  $at_traceon
36158
36159
36160
36161
36162
36163  { set +x
36164$as_echo "$at_srcdir/time02.at:23:
36165mkdir pax
36166(cd pax
36167TEST_TAR_FORMAT=pax
36168export TEST_TAR_FORMAT
36169TAR_OPTIONS=\"-H pax\"
36170export TAR_OPTIONS
36171rm -rf *
36172
36173
36174test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36175
36176export TZ=UTC0
36177mkdir dir
36178
36179touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || exit 77
36180touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || exit 77
36181touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || exit 77
36182touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || exit 77
36183
36184tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir
36185tar -d -f archive.tar dir|sort
36186)"
36187at_fn_check_prepare_notrace 'a `...` command substitution' "time02.at:23"
36188( $at_check_trace;
36189mkdir pax
36190(cd pax
36191TEST_TAR_FORMAT=pax
36192export TEST_TAR_FORMAT
36193TAR_OPTIONS="-H pax"
36194export TAR_OPTIONS
36195rm -rf *
36196
36197
36198test -z "`sort < /dev/null 2>&1`" || exit 77
36199
36200export TZ=UTC0
36201mkdir dir
36202
36203touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || exit 77
36204touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || exit 77
36205touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || exit 77
36206touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || exit 77
36207
36208tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir
36209tar -d -f archive.tar dir|sort
36210)
36211) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36212at_status=$? at_failed=false
36213$at_check_filter
36214at_fn_diff_devnull "$at_stderr" || at_failed=:
36215echo >>"$at_stdout"; $as_echo "dir/c: Mod time differs
36216dir/d: Mod time differs
36217" | \
36218  $at_diff - "$at_stdout" || at_failed=:
36219at_fn_check_status 0 $at_status "$at_srcdir/time02.at:23"
36220$at_failed && at_fn_log_failure
36221$at_traceon; }
36222
36223
36224
36225
36226  set +x
36227  $at_times_p && times >"$at_times_file"
36228) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36229read at_status <"$at_status_file"
36230#AT_STOP_152
36231#AT_START_153
36232at_fn_group_banner 153 'multiv01.at:23' \
36233  "multivolume dumps from pipes" "                   " 23
36234at_xfail=no
36235      test -f $XFAILFILE && at_xfail=yes
36236(
36237  $as_echo "153. $at_setup_line: testing $at_desc ..."
36238  $at_traceon
36239
36240
36241
36242# Fixme: should be configurable
36243#  TRUSS=truss -o /tmp/tr
36244#  TRUSS=strace
36245
36246
36247
36248  { set +x
36249$as_echo "$at_srcdir/multiv01.at:30:
36250mkdir gnu
36251(cd gnu
36252TEST_TAR_FORMAT=gnu
36253export TEST_TAR_FORMAT
36254TAR_OPTIONS=\"-H gnu\"
36255export TAR_OPTIONS
36256rm -rf *
36257
36258exec <&-
36259genfile --length 7168 --file file1
36260
36261for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
36262              \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
36263  echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
36264  for count in 2 3 4 5 6 7 8 ; do
36265    echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
36266  done
36267done >file2
36268
36269if test \$TEST_TAR_FORMAT = pax; then
36270  TAPE_LENGTH=11
36271else
36272  TAPE_LENGTH=10
36273fi
36274
36275tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
36276  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
36277
36278mkdir extract-dir-pipe
36279dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
36280PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
36281      -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
36282      --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
36283
36284cmp file1 extract-dir-pipe/file1
36285cmp file2 extract-dir-pipe/file2
36286)"
36287at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30"
36288( $at_check_trace;
36289mkdir gnu
36290(cd gnu
36291TEST_TAR_FORMAT=gnu
36292export TEST_TAR_FORMAT
36293TAR_OPTIONS="-H gnu"
36294export TAR_OPTIONS
36295rm -rf *
36296
36297exec <&-
36298genfile --length 7168 --file file1
36299
36300for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
36301              " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
36302  echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
36303  for count in 2 3 4 5 6 7 8 ; do
36304    echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
36305  done
36306done >file2
36307
36308if test $TEST_TAR_FORMAT = pax; then
36309  TAPE_LENGTH=11
36310else
36311  TAPE_LENGTH=10
36312fi
36313
36314tar -c --multi-volume --tape-length=$TAPE_LENGTH \
36315  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
36316
36317mkdir extract-dir-pipe
36318dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
36319PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
36320      -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
36321      --tape-length=$TAPE_LENGTH --read-full-records || exit 1
36322
36323cmp file1 extract-dir-pipe/file1
36324cmp file2 extract-dir-pipe/file2
36325)
36326) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36327at_status=$? at_failed=false
36328$at_check_filter
36329at_fn_diff_devnull "$at_stderr" || at_failed=:
36330at_fn_diff_devnull "$at_stdout" || at_failed=:
36331at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30"
36332$at_failed && at_fn_log_failure
36333$at_traceon; }
36334
36335              { set +x
36336$as_echo "$at_srcdir/multiv01.at:30:
36337mkdir oldgnu
36338(cd oldgnu
36339TEST_TAR_FORMAT=oldgnu
36340export TEST_TAR_FORMAT
36341TAR_OPTIONS=\"-H oldgnu\"
36342export TAR_OPTIONS
36343rm -rf *
36344
36345exec <&-
36346genfile --length 7168 --file file1
36347
36348for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
36349              \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
36350  echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
36351  for count in 2 3 4 5 6 7 8 ; do
36352    echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
36353  done
36354done >file2
36355
36356if test \$TEST_TAR_FORMAT = pax; then
36357  TAPE_LENGTH=11
36358else
36359  TAPE_LENGTH=10
36360fi
36361
36362tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
36363  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
36364
36365mkdir extract-dir-pipe
36366dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
36367PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
36368      -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
36369      --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
36370
36371cmp file1 extract-dir-pipe/file1
36372cmp file2 extract-dir-pipe/file2
36373)"
36374at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30"
36375( $at_check_trace;
36376mkdir oldgnu
36377(cd oldgnu
36378TEST_TAR_FORMAT=oldgnu
36379export TEST_TAR_FORMAT
36380TAR_OPTIONS="-H oldgnu"
36381export TAR_OPTIONS
36382rm -rf *
36383
36384exec <&-
36385genfile --length 7168 --file file1
36386
36387for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
36388              " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
36389  echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
36390  for count in 2 3 4 5 6 7 8 ; do
36391    echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
36392  done
36393done >file2
36394
36395if test $TEST_TAR_FORMAT = pax; then
36396  TAPE_LENGTH=11
36397else
36398  TAPE_LENGTH=10
36399fi
36400
36401tar -c --multi-volume --tape-length=$TAPE_LENGTH \
36402  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
36403
36404mkdir extract-dir-pipe
36405dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
36406PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
36407      -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
36408      --tape-length=$TAPE_LENGTH --read-full-records || exit 1
36409
36410cmp file1 extract-dir-pipe/file1
36411cmp file2 extract-dir-pipe/file2
36412)
36413) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36414at_status=$? at_failed=false
36415$at_check_filter
36416at_fn_diff_devnull "$at_stderr" || at_failed=:
36417at_fn_diff_devnull "$at_stdout" || at_failed=:
36418at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30"
36419$at_failed && at_fn_log_failure
36420$at_traceon; }
36421
36422              { set +x
36423$as_echo "$at_srcdir/multiv01.at:30:
36424mkdir pax
36425(cd pax
36426TEST_TAR_FORMAT=pax
36427export TEST_TAR_FORMAT
36428TAR_OPTIONS=\"-H pax\"
36429export TAR_OPTIONS
36430rm -rf *
36431
36432exec <&-
36433genfile --length 7168 --file file1
36434
36435for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
36436              \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
36437  echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
36438  for count in 2 3 4 5 6 7 8 ; do
36439    echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
36440  done
36441done >file2
36442
36443if test \$TEST_TAR_FORMAT = pax; then
36444  TAPE_LENGTH=11
36445else
36446  TAPE_LENGTH=10
36447fi
36448
36449tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
36450  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
36451
36452mkdir extract-dir-pipe
36453dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
36454PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
36455      -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
36456      --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
36457
36458cmp file1 extract-dir-pipe/file1
36459cmp file2 extract-dir-pipe/file2
36460)"
36461at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30"
36462( $at_check_trace;
36463mkdir pax
36464(cd pax
36465TEST_TAR_FORMAT=pax
36466export TEST_TAR_FORMAT
36467TAR_OPTIONS="-H pax"
36468export TAR_OPTIONS
36469rm -rf *
36470
36471exec <&-
36472genfile --length 7168 --file file1
36473
36474for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
36475              " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
36476  echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
36477  for count in 2 3 4 5 6 7 8 ; do
36478    echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
36479  done
36480done >file2
36481
36482if test $TEST_TAR_FORMAT = pax; then
36483  TAPE_LENGTH=11
36484else
36485  TAPE_LENGTH=10
36486fi
36487
36488tar -c --multi-volume --tape-length=$TAPE_LENGTH \
36489  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
36490
36491mkdir extract-dir-pipe
36492dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
36493PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
36494      -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
36495      --tape-length=$TAPE_LENGTH --read-full-records || exit 1
36496
36497cmp file1 extract-dir-pipe/file1
36498cmp file2 extract-dir-pipe/file2
36499)
36500) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36501at_status=$? at_failed=false
36502$at_check_filter
36503at_fn_diff_devnull "$at_stderr" || at_failed=:
36504at_fn_diff_devnull "$at_stdout" || at_failed=:
36505at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30"
36506$at_failed && at_fn_log_failure
36507$at_traceon; }
36508
36509
36510
36511
36512  set +x
36513  $at_times_p && times >"$at_times_file"
36514) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36515read at_status <"$at_status_file"
36516#AT_STOP_153
36517#AT_START_154
36518at_fn_group_banner 154 'multiv02.at:28' \
36519  "skipping a straddling member" "                   " 23
36520at_xfail=no
36521      test -f $XFAILFILE && at_xfail=yes
36522(
36523  $as_echo "154. $at_setup_line: testing $at_desc ..."
36524  $at_traceon
36525
36526
36527
36528
36529
36530  { set +x
36531$as_echo "$at_srcdir/multiv02.at:31:
36532mkdir gnu
36533(cd gnu
36534TEST_TAR_FORMAT=gnu
36535export TEST_TAR_FORMAT
36536TAR_OPTIONS=\"-H gnu\"
36537export TAR_OPTIONS
36538rm -rf *
36539
36540genfile --length 10240 --file en
36541genfile --length 20000 --file to
36542genfile --length 20000 --file tre
36543genfile --length 10240 --file fire
36544
36545exec <&-
36546
36547tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
36548echo separator
36549tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
36550)"
36551at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
36552( $at_check_trace;
36553mkdir gnu
36554(cd gnu
36555TEST_TAR_FORMAT=gnu
36556export TEST_TAR_FORMAT
36557TAR_OPTIONS="-H gnu"
36558export TAR_OPTIONS
36559rm -rf *
36560
36561genfile --length 10240 --file en
36562genfile --length 20000 --file to
36563genfile --length 20000 --file tre
36564genfile --length 10240 --file fire
36565
36566exec <&-
36567
36568tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
36569echo separator
36570tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
36571)
36572) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36573at_status=$? at_failed=false
36574$at_check_filter
36575at_fn_diff_devnull "$at_stderr" || at_failed=:
36576echo >>"$at_stdout"; $as_echo "separator
36577en
36578" | \
36579  $at_diff - "$at_stdout" || at_failed=:
36580at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
36581$at_failed && at_fn_log_failure
36582$at_traceon; }
36583
36584              { set +x
36585$as_echo "$at_srcdir/multiv02.at:31:
36586mkdir oldgnu
36587(cd oldgnu
36588TEST_TAR_FORMAT=oldgnu
36589export TEST_TAR_FORMAT
36590TAR_OPTIONS=\"-H oldgnu\"
36591export TAR_OPTIONS
36592rm -rf *
36593
36594genfile --length 10240 --file en
36595genfile --length 20000 --file to
36596genfile --length 20000 --file tre
36597genfile --length 10240 --file fire
36598
36599exec <&-
36600
36601tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
36602echo separator
36603tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
36604)"
36605at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
36606( $at_check_trace;
36607mkdir oldgnu
36608(cd oldgnu
36609TEST_TAR_FORMAT=oldgnu
36610export TEST_TAR_FORMAT
36611TAR_OPTIONS="-H oldgnu"
36612export TAR_OPTIONS
36613rm -rf *
36614
36615genfile --length 10240 --file en
36616genfile --length 20000 --file to
36617genfile --length 20000 --file tre
36618genfile --length 10240 --file fire
36619
36620exec <&-
36621
36622tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
36623echo separator
36624tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
36625)
36626) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36627at_status=$? at_failed=false
36628$at_check_filter
36629at_fn_diff_devnull "$at_stderr" || at_failed=:
36630echo >>"$at_stdout"; $as_echo "separator
36631en
36632" | \
36633  $at_diff - "$at_stdout" || at_failed=:
36634at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
36635$at_failed && at_fn_log_failure
36636$at_traceon; }
36637
36638              { set +x
36639$as_echo "$at_srcdir/multiv02.at:31:
36640mkdir pax
36641(cd pax
36642TEST_TAR_FORMAT=pax
36643export TEST_TAR_FORMAT
36644TAR_OPTIONS=\"-H pax\"
36645export TAR_OPTIONS
36646rm -rf *
36647
36648genfile --length 10240 --file en
36649genfile --length 20000 --file to
36650genfile --length 20000 --file tre
36651genfile --length 10240 --file fire
36652
36653exec <&-
36654
36655tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
36656echo separator
36657tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
36658)"
36659at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
36660( $at_check_trace;
36661mkdir pax
36662(cd pax
36663TEST_TAR_FORMAT=pax
36664export TEST_TAR_FORMAT
36665TAR_OPTIONS="-H pax"
36666export TAR_OPTIONS
36667rm -rf *
36668
36669genfile --length 10240 --file en
36670genfile --length 20000 --file to
36671genfile --length 20000 --file tre
36672genfile --length 10240 --file fire
36673
36674exec <&-
36675
36676tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
36677echo separator
36678tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
36679)
36680) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36681at_status=$? at_failed=false
36682$at_check_filter
36683at_fn_diff_devnull "$at_stderr" || at_failed=:
36684echo >>"$at_stdout"; $as_echo "separator
36685en
36686" | \
36687  $at_diff - "$at_stdout" || at_failed=:
36688at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
36689$at_failed && at_fn_log_failure
36690$at_traceon; }
36691
36692
36693
36694
36695  set +x
36696  $at_times_p && times >"$at_times_file"
36697) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36698read at_status <"$at_status_file"
36699#AT_STOP_154
36700#AT_START_155
36701at_fn_group_banner 155 'multiv03.at:30' \
36702  "MV archive & long filenames" "                    " 23
36703at_xfail=no
36704      test -f $XFAILFILE && at_xfail=yes
36705(
36706  $as_echo "155. $at_setup_line: testing $at_desc ..."
36707  $at_traceon
36708
36709
36710
36711
36712
36713  { set +x
36714$as_echo "$at_srcdir/multiv03.at:33:
36715mkdir gnu
36716(cd gnu
36717TEST_TAR_FORMAT=gnu
36718export TEST_TAR_FORMAT
36719TAR_OPTIONS=\"-H gnu\"
36720export TAR_OPTIONS
36721rm -rf *
36722
36723AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
36724BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
36725
36726cat > ../experr <<EOF
36727tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
36728tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
36729EOF
36730
36731cat > ../expout <<EOF
36732\$AFILE
36733separator-1
36734separator-2
36735EOF
36736
36737genfile --length 15360 --file \$AFILE
36738
36739exec <&-
36740
36741tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
36742tar -tM -f arch.1 -f arch.2 || exit 1
36743
36744echo separator-1
36745
36746genfile --length 15360 --file \$BFILE
36747tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
36748
36749echo separator-2
36750mv \$BFILE bfile
36751tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
36752cmp \$BFILE bfile
36753)"
36754at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
36755( $at_check_trace;
36756mkdir gnu
36757(cd gnu
36758TEST_TAR_FORMAT=gnu
36759export TEST_TAR_FORMAT
36760TAR_OPTIONS="-H gnu"
36761export TAR_OPTIONS
36762rm -rf *
36763
36764AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
36765BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
36766
36767cat > ../experr <<EOF
36768tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
36769tar: '$BFILE' is possibly continued on this volume: header contains truncated name
36770EOF
36771
36772cat > ../expout <<EOF
36773$AFILE
36774separator-1
36775separator-2
36776EOF
36777
36778genfile --length 15360 --file $AFILE
36779
36780exec <&-
36781
36782tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
36783tar -tM -f arch.1 -f arch.2 || exit 1
36784
36785echo separator-1
36786
36787genfile --length 15360 --file $BFILE
36788tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
36789
36790echo separator-2
36791mv $BFILE bfile
36792tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
36793cmp $BFILE bfile
36794)
36795) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36796at_status=$? at_failed=false
36797$at_check_filter
36798$at_diff experr "$at_stderr" || at_failed=:
36799$at_diff expout "$at_stdout" || at_failed=:
36800at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
36801$at_failed && at_fn_log_failure
36802$at_traceon; }
36803
36804              { set +x
36805$as_echo "$at_srcdir/multiv03.at:33:
36806mkdir oldgnu
36807(cd oldgnu
36808TEST_TAR_FORMAT=oldgnu
36809export TEST_TAR_FORMAT
36810TAR_OPTIONS=\"-H oldgnu\"
36811export TAR_OPTIONS
36812rm -rf *
36813
36814AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
36815BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
36816
36817cat > ../experr <<EOF
36818tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
36819tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
36820EOF
36821
36822cat > ../expout <<EOF
36823\$AFILE
36824separator-1
36825separator-2
36826EOF
36827
36828genfile --length 15360 --file \$AFILE
36829
36830exec <&-
36831
36832tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
36833tar -tM -f arch.1 -f arch.2 || exit 1
36834
36835echo separator-1
36836
36837genfile --length 15360 --file \$BFILE
36838tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
36839
36840echo separator-2
36841mv \$BFILE bfile
36842tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
36843cmp \$BFILE bfile
36844)"
36845at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
36846( $at_check_trace;
36847mkdir oldgnu
36848(cd oldgnu
36849TEST_TAR_FORMAT=oldgnu
36850export TEST_TAR_FORMAT
36851TAR_OPTIONS="-H oldgnu"
36852export TAR_OPTIONS
36853rm -rf *
36854
36855AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
36856BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
36857
36858cat > ../experr <<EOF
36859tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
36860tar: '$BFILE' is possibly continued on this volume: header contains truncated name
36861EOF
36862
36863cat > ../expout <<EOF
36864$AFILE
36865separator-1
36866separator-2
36867EOF
36868
36869genfile --length 15360 --file $AFILE
36870
36871exec <&-
36872
36873tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
36874tar -tM -f arch.1 -f arch.2 || exit 1
36875
36876echo separator-1
36877
36878genfile --length 15360 --file $BFILE
36879tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
36880
36881echo separator-2
36882mv $BFILE bfile
36883tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
36884cmp $BFILE bfile
36885)
36886) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36887at_status=$? at_failed=false
36888$at_check_filter
36889$at_diff experr "$at_stderr" || at_failed=:
36890$at_diff expout "$at_stdout" || at_failed=:
36891at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
36892$at_failed && at_fn_log_failure
36893$at_traceon; }
36894
36895
36896
36897
36898  set +x
36899  $at_times_p && times >"$at_times_file"
36900) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36901read at_status <"$at_status_file"
36902#AT_STOP_155
36903#AT_START_156
36904at_fn_group_banner 156 'multiv04.at:36' \
36905  "split directory members in a MV archive" "        " 23
36906at_xfail=no
36907      test -f $XFAILFILE && at_xfail=yes
36908(
36909  $as_echo "156. $at_setup_line: testing $at_desc ..."
36910  $at_traceon
36911
36912
36913
36914
36915
36916  { set +x
36917$as_echo "$at_srcdir/multiv04.at:39:
36918mkdir gnu
36919(cd gnu
36920TEST_TAR_FORMAT=gnu
36921export TEST_TAR_FORMAT
36922TAR_OPTIONS=\"-H gnu\"
36923export TAR_OPTIONS
36924rm -rf *
36925
36926
36927mkdir directory
36928awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
36929
36930exec <&-
36931
36932sleep 2
36933
36934tar --listed-incremental=list -c -f archive.a directory
36935
36936sleep 2
36937
36938tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
36939
36940echo separator
36941
36942tar -MRt -f arc.1 -f arc.2)"
36943at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
36944( $at_check_trace;
36945mkdir gnu
36946(cd gnu
36947TEST_TAR_FORMAT=gnu
36948export TEST_TAR_FORMAT
36949TAR_OPTIONS="-H gnu"
36950export TAR_OPTIONS
36951rm -rf *
36952
36953
36954mkdir directory
36955awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
36956
36957exec <&-
36958
36959sleep 2
36960
36961tar --listed-incremental=list -c -f archive.a directory
36962
36963sleep 2
36964
36965tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
36966
36967echo separator
36968
36969tar -MRt -f arc.1 -f arc.2)
36970) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36971at_status=$? at_failed=false
36972$at_check_filter
36973at_fn_diff_devnull "$at_stderr" || at_failed=:
36974echo >>"$at_stdout"; $as_echo "directory/
36975separator
36976block 0: directory/
36977block 35: ** Block of NULs **
36978" | \
36979  $at_diff - "$at_stdout" || at_failed=:
36980at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
36981$at_failed && at_fn_log_failure
36982$at_traceon; }
36983
36984              { set +x
36985$as_echo "$at_srcdir/multiv04.at:39:
36986mkdir oldgnu
36987(cd oldgnu
36988TEST_TAR_FORMAT=oldgnu
36989export TEST_TAR_FORMAT
36990TAR_OPTIONS=\"-H oldgnu\"
36991export TAR_OPTIONS
36992rm -rf *
36993
36994
36995mkdir directory
36996awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
36997
36998exec <&-
36999
37000sleep 2
37001
37002tar --listed-incremental=list -c -f archive.a directory
37003
37004sleep 2
37005
37006tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
37007
37008echo separator
37009
37010tar -MRt -f arc.1 -f arc.2)"
37011at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
37012( $at_check_trace;
37013mkdir oldgnu
37014(cd oldgnu
37015TEST_TAR_FORMAT=oldgnu
37016export TEST_TAR_FORMAT
37017TAR_OPTIONS="-H oldgnu"
37018export TAR_OPTIONS
37019rm -rf *
37020
37021
37022mkdir directory
37023awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
37024
37025exec <&-
37026
37027sleep 2
37028
37029tar --listed-incremental=list -c -f archive.a directory
37030
37031sleep 2
37032
37033tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
37034
37035echo separator
37036
37037tar -MRt -f arc.1 -f arc.2)
37038) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37039at_status=$? at_failed=false
37040$at_check_filter
37041at_fn_diff_devnull "$at_stderr" || at_failed=:
37042echo >>"$at_stdout"; $as_echo "directory/
37043separator
37044block 0: directory/
37045block 35: ** Block of NULs **
37046" | \
37047  $at_diff - "$at_stdout" || at_failed=:
37048at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
37049$at_failed && at_fn_log_failure
37050$at_traceon; }
37051
37052
37053
37054
37055  set +x
37056  $at_times_p && times >"$at_times_file"
37057) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37058read at_status <"$at_status_file"
37059#AT_STOP_156
37060#AT_START_157
37061at_fn_group_banner 157 'multiv05.at:26' \
37062  "Restoring after an out of sync volume" "          " 23
37063at_xfail=no
37064      test -f $XFAILFILE && at_xfail=yes
37065(
37066  $as_echo "157. $at_setup_line: testing $at_desc ..."
37067  $at_traceon
37068
37069
37070
37071
37072
37073
37074  { set +x
37075$as_echo "$at_srcdir/multiv05.at:30:
37076mkdir gnu
37077(cd gnu
37078TEST_TAR_FORMAT=gnu
37079export TEST_TAR_FORMAT
37080TAR_OPTIONS=\"-H gnu\"
37081export TAR_OPTIONS
37082rm -rf *
37083
37084exec <&-
37085
37086genfile --length 250k --file jeden
37087genfile --length 250k --file dwa
37088genfile --length 250k --file trzy
37089genfile --length 250k --file cztery
37090genfile --length 250k --file piec
37091genfile --length 250k --file szesc
37092
37093
37094echo Creating archive
37095tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
37096echo separator
37097mkdir bak
37098mv jeden dwa trzy cztery piec szesc bak
37099tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
37100echo Diffing jeden
37101   cmp bak/jeden jeden || exit 1
37102echo Diffing dwa
37103   cmp bak/dwa dwa || exit 1
37104echo Diffing trzy
37105   cmp bak/trzy trzy || exit 1
37106echo Diffing cztery
37107   cmp bak/cztery cztery || exit 1
37108echo Diffing piec
37109   cmp bak/piec piec || exit 1
37110echo Diffing szesc
37111   cmp bak/szesc szesc || exit 1
37112)"
37113at_fn_check_prepare_notrace 'an embedded newline' "multiv05.at:30"
37114( $at_check_trace;
37115mkdir gnu
37116(cd gnu
37117TEST_TAR_FORMAT=gnu
37118export TEST_TAR_FORMAT
37119TAR_OPTIONS="-H gnu"
37120export TAR_OPTIONS
37121rm -rf *
37122
37123exec <&-
37124
37125genfile --length 250k --file jeden
37126genfile --length 250k --file dwa
37127genfile --length 250k --file trzy
37128genfile --length 250k --file cztery
37129genfile --length 250k --file piec
37130genfile --length 250k --file szesc
37131
37132
37133echo Creating archive
37134tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
37135echo separator
37136mkdir bak
37137mv jeden dwa trzy cztery piec szesc bak
37138tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
37139echo Diffing jeden
37140   cmp bak/jeden jeden || exit 1
37141echo Diffing dwa
37142   cmp bak/dwa dwa || exit 1
37143echo Diffing trzy
37144   cmp bak/trzy trzy || exit 1
37145echo Diffing cztery
37146   cmp bak/cztery cztery || exit 1
37147echo Diffing piec
37148   cmp bak/piec piec || exit 1
37149echo Diffing szesc
37150   cmp bak/szesc szesc || exit 1
37151)
37152) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37153at_status=$? at_failed=false
37154$at_check_filter
37155echo >>"$at_stderr"; $as_echo "tar: 'trzy' is not continued on this volume
37156" | \
37157  $at_diff - "$at_stderr" || at_failed=:
37158echo >>"$at_stdout"; $as_echo "Creating archive
37159separator
37160jeden
37161dwa
37162trzy
37163cztery
37164piec
37165szesc
37166Diffing jeden
37167Diffing dwa
37168Diffing trzy
37169Diffing cztery
37170Diffing piec
37171Diffing szesc
37172" | \
37173  $at_diff - "$at_stdout" || at_failed=:
37174at_fn_check_status 0 $at_status "$at_srcdir/multiv05.at:30"
37175$at_failed && at_fn_log_failure
37176$at_traceon; }
37177
37178
37179
37180
37181
37182  set +x
37183  $at_times_p && times >"$at_times_file"
37184) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37185read at_status <"$at_status_file"
37186#AT_STOP_157
37187#AT_START_158
37188at_fn_group_banner 158 'multiv06.at:27' \
37189  "Multivolumes with L=record_size" "                " 23
37190at_xfail=no
37191      test -f $XFAILFILE && at_xfail=yes
37192(
37193  $as_echo "158. $at_setup_line: testing $at_desc ..."
37194  $at_traceon
37195
37196
37197
37198
37199
37200  { set +x
37201$as_echo "$at_srcdir/multiv06.at:30:
37202mkdir gnu
37203(cd gnu
37204TEST_TAR_FORMAT=gnu
37205export TEST_TAR_FORMAT
37206TAR_OPTIONS=\"-H gnu\"
37207export TAR_OPTIONS
37208rm -rf *
37209
37210exec <&-
37211decho Creating file
37212genfile --length 20139 --file file
37213decho Creating archive
37214tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
37215decho Testing archive
37216tar -t -M -farc.1 -farc.2 -farc.3)"
37217at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
37218( $at_check_trace;
37219mkdir gnu
37220(cd gnu
37221TEST_TAR_FORMAT=gnu
37222export TEST_TAR_FORMAT
37223TAR_OPTIONS="-H gnu"
37224export TAR_OPTIONS
37225rm -rf *
37226
37227exec <&-
37228decho Creating file
37229genfile --length 20139 --file file
37230decho Creating archive
37231tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
37232decho Testing archive
37233tar -t -M -farc.1 -farc.2 -farc.3)
37234) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37235at_status=$? at_failed=false
37236$at_check_filter
37237echo >>"$at_stderr"; $as_echo "Creating file
37238Creating archive
37239Testing archive
37240" | \
37241  $at_diff - "$at_stderr" || at_failed=:
37242echo >>"$at_stdout"; $as_echo "Creating file
37243Creating archive
37244Testing archive
37245file
37246" | \
37247  $at_diff - "$at_stdout" || at_failed=:
37248at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
37249$at_failed && at_fn_log_failure
37250$at_traceon; }
37251
37252              { set +x
37253$as_echo "$at_srcdir/multiv06.at:30:
37254mkdir pax
37255(cd pax
37256TEST_TAR_FORMAT=pax
37257export TEST_TAR_FORMAT
37258TAR_OPTIONS=\"-H pax\"
37259export TAR_OPTIONS
37260rm -rf *
37261
37262exec <&-
37263decho Creating file
37264genfile --length 20139 --file file
37265decho Creating archive
37266tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
37267decho Testing archive
37268tar -t -M -farc.1 -farc.2 -farc.3)"
37269at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
37270( $at_check_trace;
37271mkdir pax
37272(cd pax
37273TEST_TAR_FORMAT=pax
37274export TEST_TAR_FORMAT
37275TAR_OPTIONS="-H pax"
37276export TAR_OPTIONS
37277rm -rf *
37278
37279exec <&-
37280decho Creating file
37281genfile --length 20139 --file file
37282decho Creating archive
37283tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
37284decho Testing archive
37285tar -t -M -farc.1 -farc.2 -farc.3)
37286) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37287at_status=$? at_failed=false
37288$at_check_filter
37289echo >>"$at_stderr"; $as_echo "Creating file
37290Creating archive
37291Testing archive
37292" | \
37293  $at_diff - "$at_stderr" || at_failed=:
37294echo >>"$at_stdout"; $as_echo "Creating file
37295Creating archive
37296Testing archive
37297file
37298" | \
37299  $at_diff - "$at_stdout" || at_failed=:
37300at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
37301$at_failed && at_fn_log_failure
37302$at_traceon; }
37303
37304
37305
37306
37307  set +x
37308  $at_times_p && times >"$at_times_file"
37309) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37310read at_status <"$at_status_file"
37311#AT_STOP_158
37312#AT_START_159
37313at_fn_group_banner 159 'multiv07.at:28' \
37314  "volumes split at an extended header" "            " 23
37315at_xfail=no
37316      test -f $XFAILFILE && at_xfail=yes
37317(
37318  $as_echo "159. $at_setup_line: testing $at_desc ..."
37319  $at_traceon
37320
37321
37322
37323{ set +x
37324$as_echo "$at_srcdir/multiv07.at:31:
37325
37326
37327test -z \"\$TEST_DATA_DIR\" && exit 77
37328tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
37329
37330test -z \"\$TEST_DATA_DIR\" && exit 77
37331tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
37332
37333exec <&-
37334
37335cd \$TEST_DATA_DIR
37336tar -t -M -fxsplit-1.tar -fxsplit-2.tar
37337"
37338at_fn_check_prepare_notrace 'an embedded newline' "multiv07.at:31"
37339( $at_check_trace;
37340
37341
37342test -z "$TEST_DATA_DIR" && exit 77
37343tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
37344
37345test -z "$TEST_DATA_DIR" && exit 77
37346tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
37347
37348exec <&-
37349
37350cd $TEST_DATA_DIR
37351tar -t -M -fxsplit-1.tar -fxsplit-2.tar
37352
37353) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37354at_status=$? at_failed=false
37355$at_check_filter
37356at_fn_diff_devnull "$at_stderr" || at_failed=:
37357echo >>"$at_stdout"; $as_echo "Archive volumes split at an extended header Volume 1
37358foo
37359bar
37360" | \
37361  $at_diff - "$at_stdout" || at_failed=:
37362at_fn_check_status 0 $at_status "$at_srcdir/multiv07.at:31"
37363$at_failed && at_fn_log_failure
37364$at_traceon; }
37365
37366
37367  set +x
37368  $at_times_p && times >"$at_times_file"
37369) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37370read at_status <"$at_status_file"
37371#AT_STOP_159
37372#AT_START_160
37373at_fn_group_banner 160 'multiv08.at:25' \
37374  "multivolume header creation" "                    " 23
37375at_xfail=no
37376      test -f $XFAILFILE && at_xfail=yes
37377(
37378  $as_echo "160. $at_setup_line: testing $at_desc ..."
37379  $at_traceon
37380
37381
37382
37383
37384
37385  { set +x
37386$as_echo "$at_srcdir/multiv08.at:28:
37387mkdir gnu
37388(cd gnu
37389TEST_TAR_FORMAT=gnu
37390export TEST_TAR_FORMAT
37391TAR_OPTIONS=\"-H gnu\"
37392export TAR_OPTIONS
37393rm -rf *
37394
37395genfile --length 9472 --file a
37396genfile --length 9984 --file b
37397decho Creating
37398tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
37399decho Testing
37400tar -tMR -f A.tar -f B.tar -f C.tar
37401)"
37402at_fn_check_prepare_notrace 'an embedded newline' "multiv08.at:28"
37403( $at_check_trace;
37404mkdir gnu
37405(cd gnu
37406TEST_TAR_FORMAT=gnu
37407export TEST_TAR_FORMAT
37408TAR_OPTIONS="-H gnu"
37409export TAR_OPTIONS
37410rm -rf *
37411
37412genfile --length 9472 --file a
37413genfile --length 9984 --file b
37414decho Creating
37415tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
37416decho Testing
37417tar -tMR -f A.tar -f B.tar -f C.tar
37418)
37419) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37420at_status=$? at_failed=false
37421$at_check_filter
37422echo >>"$at_stderr"; $as_echo "Creating
37423Testing
37424" | \
37425  $at_diff - "$at_stderr" || at_failed=:
37426echo >>"$at_stdout"; $as_echo "Creating
37427Testing
37428block 0: a
37429block 21: b
37430block 43: ** Block of NULs **
37431" | \
37432  $at_diff - "$at_stdout" || at_failed=:
37433at_fn_check_status 0 $at_status "$at_srcdir/multiv08.at:28"
37434$at_failed && at_fn_log_failure
37435$at_traceon; }
37436
37437
37438
37439
37440  set +x
37441  $at_times_p && times >"$at_times_file"
37442) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37443read at_status <"$at_status_file"
37444#AT_STOP_160
37445#AT_START_161
37446at_fn_group_banner 161 'multiv09.at:26' \
37447  "bad next volume" "                                " 23
37448at_xfail=no
37449      test -f $XFAILFILE && at_xfail=yes
37450(
37451  $as_echo "161. $at_setup_line: testing $at_desc ..."
37452  $at_traceon
37453
37454
37455
37456# filename of length 100 characters
37457
37458
37459
37460
37461  { set +x
37462$as_echo "$at_srcdir/multiv09.at:33:
37463mkdir v7
37464(cd v7
37465TEST_TAR_FORMAT=v7
37466export TEST_TAR_FORMAT
37467TAR_OPTIONS=\"-H v7\"
37468export TAR_OPTIONS
37469rm -rf *
37470
37471genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37472tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
37473echo \"created\"
37474tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37475y
37476q
37477EOF
37478)"
37479at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
37480( $at_check_trace;
37481mkdir v7
37482(cd v7
37483TEST_TAR_FORMAT=v7
37484export TEST_TAR_FORMAT
37485TAR_OPTIONS="-H v7"
37486export TAR_OPTIONS
37487rm -rf *
37488
37489genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37490tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
37491echo "created"
37492tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37493y
37494q
37495EOF
37496)
37497) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37498at_status=$? at_failed=false
37499$at_check_filter
37500at_fn_diff_devnull "$at_stderr" || at_failed=:
37501echo >>"$at_stdout"; $as_echo "created
37502" | \
37503  $at_diff - "$at_stdout" || at_failed=:
37504at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
37505$at_failed && at_fn_log_failure
37506$at_traceon; }
37507
37508              { set +x
37509$as_echo "$at_srcdir/multiv09.at:33:
37510mkdir oldgnu
37511(cd oldgnu
37512TEST_TAR_FORMAT=oldgnu
37513export TEST_TAR_FORMAT
37514TAR_OPTIONS=\"-H oldgnu\"
37515export TAR_OPTIONS
37516rm -rf *
37517
37518genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37519tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
37520echo \"created\"
37521tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37522y
37523q
37524EOF
37525)"
37526at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
37527( $at_check_trace;
37528mkdir oldgnu
37529(cd oldgnu
37530TEST_TAR_FORMAT=oldgnu
37531export TEST_TAR_FORMAT
37532TAR_OPTIONS="-H oldgnu"
37533export TAR_OPTIONS
37534rm -rf *
37535
37536genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37537tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
37538echo "created"
37539tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37540y
37541q
37542EOF
37543)
37544) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37545at_status=$? at_failed=false
37546$at_check_filter
37547at_fn_diff_devnull "$at_stderr" || at_failed=:
37548echo >>"$at_stdout"; $as_echo "created
37549" | \
37550  $at_diff - "$at_stdout" || at_failed=:
37551at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
37552$at_failed && at_fn_log_failure
37553$at_traceon; }
37554
37555              { set +x
37556$as_echo "$at_srcdir/multiv09.at:33:
37557mkdir ustar
37558(cd ustar
37559TEST_TAR_FORMAT=ustar
37560export TEST_TAR_FORMAT
37561TAR_OPTIONS=\"-H ustar\"
37562export TAR_OPTIONS
37563rm -rf *
37564
37565genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37566tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
37567echo \"created\"
37568tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37569y
37570q
37571EOF
37572)"
37573at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
37574( $at_check_trace;
37575mkdir ustar
37576(cd ustar
37577TEST_TAR_FORMAT=ustar
37578export TEST_TAR_FORMAT
37579TAR_OPTIONS="-H ustar"
37580export TAR_OPTIONS
37581rm -rf *
37582
37583genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37584tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
37585echo "created"
37586tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37587y
37588q
37589EOF
37590)
37591) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37592at_status=$? at_failed=false
37593$at_check_filter
37594at_fn_diff_devnull "$at_stderr" || at_failed=:
37595echo >>"$at_stdout"; $as_echo "created
37596" | \
37597  $at_diff - "$at_stdout" || at_failed=:
37598at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
37599$at_failed && at_fn_log_failure
37600$at_traceon; }
37601
37602              { set +x
37603$as_echo "$at_srcdir/multiv09.at:33:
37604mkdir posix
37605(cd posix
37606TEST_TAR_FORMAT=posix
37607export TEST_TAR_FORMAT
37608TAR_OPTIONS=\"-H posix\"
37609export TAR_OPTIONS
37610rm -rf *
37611
37612genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37613tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
37614echo \"created\"
37615tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37616y
37617q
37618EOF
37619)"
37620at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
37621( $at_check_trace;
37622mkdir posix
37623(cd posix
37624TEST_TAR_FORMAT=posix
37625export TEST_TAR_FORMAT
37626TAR_OPTIONS="-H posix"
37627export TAR_OPTIONS
37628rm -rf *
37629
37630genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37631tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
37632echo "created"
37633tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37634y
37635q
37636EOF
37637)
37638) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37639at_status=$? at_failed=false
37640$at_check_filter
37641at_fn_diff_devnull "$at_stderr" || at_failed=:
37642echo >>"$at_stdout"; $as_echo "created
37643" | \
37644  $at_diff - "$at_stdout" || at_failed=:
37645at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
37646$at_failed && at_fn_log_failure
37647$at_traceon; }
37648
37649              { set +x
37650$as_echo "$at_srcdir/multiv09.at:33:
37651mkdir gnu
37652(cd gnu
37653TEST_TAR_FORMAT=gnu
37654export TEST_TAR_FORMAT
37655TAR_OPTIONS=\"-H gnu\"
37656export TAR_OPTIONS
37657rm -rf *
37658
37659genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37660tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
37661echo \"created\"
37662tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37663y
37664q
37665EOF
37666)"
37667at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
37668( $at_check_trace;
37669mkdir gnu
37670(cd gnu
37671TEST_TAR_FORMAT=gnu
37672export TEST_TAR_FORMAT
37673TAR_OPTIONS="-H gnu"
37674export TAR_OPTIONS
37675rm -rf *
37676
37677genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
37678tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
37679echo "created"
37680tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
37681y
37682q
37683EOF
37684)
37685) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37686at_status=$? at_failed=false
37687$at_check_filter
37688at_fn_diff_devnull "$at_stderr" || at_failed=:
37689echo >>"$at_stdout"; $as_echo "created
37690" | \
37691  $at_diff - "$at_stdout" || at_failed=:
37692at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
37693$at_failed && at_fn_log_failure
37694$at_traceon; }
37695
37696
37697
37698
37699  set +x
37700  $at_times_p && times >"$at_times_file"
37701) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37702read at_status <"$at_status_file"
37703#AT_STOP_161
37704#AT_START_162
37705at_fn_group_banner 162 'multiv10.at:37' \
37706  "file start at the beginning of a posix volume" "  " 23
37707at_xfail=no
37708      test -f $XFAILFILE && at_xfail=yes
37709(
37710  $as_echo "162. $at_setup_line: testing $at_desc ..."
37711  $at_traceon
37712
37713
37714
37715
37716
37717  { set +x
37718$as_echo "$at_srcdir/multiv10.at:40:
37719mkdir posix
37720(cd posix
37721TEST_TAR_FORMAT=posix
37722export TEST_TAR_FORMAT
37723TAR_OPTIONS=\"-H posix\"
37724export TAR_OPTIONS
37725rm -rf *
37726
37727set -e
37728genfile --length=15360 --file data1
37729genfile --length=15360 --file data2
37730tar -v -c -L 10 -M -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar data1 data2
37731tar -M -t -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar
37732mkdir out
37733tar -C out -M -x -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar
37734cmp data1 out/data1
37735cmp data2 out/data2
37736)"
37737at_fn_check_prepare_notrace 'an embedded newline' "multiv10.at:40"
37738( $at_check_trace;
37739mkdir posix
37740(cd posix
37741TEST_TAR_FORMAT=posix
37742export TEST_TAR_FORMAT
37743TAR_OPTIONS="-H posix"
37744export TAR_OPTIONS
37745rm -rf *
37746
37747set -e
37748genfile --length=15360 --file data1
37749genfile --length=15360 --file data2
37750tar -v -c -L 10 -M -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar data1 data2
37751tar -M -t -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar
37752mkdir out
37753tar -C out -M -x -f 1.tar -f 2.tar -f 3.tar -f 4.tar -f 5.tar
37754cmp data1 out/data1
37755cmp data2 out/data2
37756)
37757) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37758at_status=$? at_failed=false
37759$at_check_filter
37760at_fn_diff_devnull "$at_stderr" || at_failed=:
37761echo >>"$at_stdout"; $as_echo "data1
37762data2
37763data1
37764data2
37765" | \
37766  $at_diff - "$at_stdout" || at_failed=:
37767at_fn_check_status 0 $at_status "$at_srcdir/multiv10.at:40"
37768$at_failed && at_fn_log_failure
37769$at_traceon; }
37770
37771
37772
37773
37774  set +x
37775  $at_times_p && times >"$at_times_file"
37776) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37777read at_status <"$at_status_file"
37778#AT_STOP_162
37779#AT_START_163
37780at_fn_group_banner 163 'owner.at:21' \
37781  "--owner and --group" "                            " 24
37782at_xfail=no
37783      test -f $XFAILFILE && at_xfail=yes
37784(
37785  $as_echo "163. $at_setup_line: testing $at_desc ..."
37786  $at_traceon
37787
37788
37789
37790
37791
37792  { set +x
37793$as_echo "$at_srcdir/owner.at:24:
37794mkdir gnu
37795(cd gnu
37796TEST_TAR_FORMAT=gnu
37797export TEST_TAR_FORMAT
37798TAR_OPTIONS=\"-H gnu\"
37799export TAR_OPTIONS
37800rm -rf *
37801
37802export TZ=UTC0
37803
37804genfile --file a
37805
37806tar --owner=\"Joe the Plumber:1234\" \\
37807    --group=\"Plumber's Union:5678\" \\
37808    --mtime='@0' \\
37809    --mode='u=rw,go=r' \\
37810    -cf arc a
37811
37812tar -tvf arc
37813tar --numeric-owner -tvf arc
37814)"
37815at_fn_check_prepare_notrace 'an embedded newline' "owner.at:24"
37816( $at_check_trace;
37817mkdir gnu
37818(cd gnu
37819TEST_TAR_FORMAT=gnu
37820export TEST_TAR_FORMAT
37821TAR_OPTIONS="-H gnu"
37822export TAR_OPTIONS
37823rm -rf *
37824
37825export TZ=UTC0
37826
37827genfile --file a
37828
37829tar --owner="Joe the Plumber:1234" \
37830    --group="Plumber's Union:5678" \
37831    --mtime='@0' \
37832    --mode='u=rw,go=r' \
37833    -cf arc a
37834
37835tar -tvf arc
37836tar --numeric-owner -tvf arc
37837)
37838) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37839at_status=$? at_failed=false
37840$at_check_filter
37841at_fn_diff_devnull "$at_stderr" || at_failed=:
37842echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
37843-rw-r--r-- 1234/5678         0 1970-01-01 00:00 a
37844" | \
37845  $at_diff - "$at_stdout" || at_failed=:
37846at_fn_check_status 0 $at_status "$at_srcdir/owner.at:24"
37847$at_failed && at_fn_log_failure
37848$at_traceon; }
37849
37850
37851
37852
37853  set +x
37854  $at_times_p && times >"$at_times_file"
37855) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37856read at_status <"$at_status_file"
37857#AT_STOP_163
37858#AT_START_164
37859at_fn_group_banner 164 'map.at:21' \
37860  "--owner-map and --group-map" "                    " 24
37861at_xfail=no
37862      test -f $XFAILFILE && at_xfail=yes
37863(
37864  $as_echo "164. $at_setup_line: testing $at_desc ..."
37865  $at_traceon
37866
37867
37868
37869
37870
37871  { set +x
37872$as_echo "$at_srcdir/map.at:24:
37873mkdir gnu
37874(cd gnu
37875TEST_TAR_FORMAT=gnu
37876export TEST_TAR_FORMAT
37877TAR_OPTIONS=\"-H gnu\"
37878export TAR_OPTIONS
37879rm -rf *
37880
37881export TZ=UTC0
37882
37883genfile --file a
37884set -- \`genfile --stat=uid,gid a\`
37885cat > uid.map <<EOT
37886# Owner mapping
37887+\$1	\"Joe the Plumber:1234\"
37888EOT
37889# Group mapping
37890cat > gid.map <<EOT
37891+\$2	\"Plumber's Union:5678\"
37892EOT
37893
37894tar --owner-map=uid.map\\
37895    --group-map=gid.map\\
37896    --owner=\"Fallback Owner:4321\" \\
37897    --group=\"Fallback Group:8765\" \\
37898    --mtime='@0' \\
37899    --mode='u=rw,go=r' \\
37900    -cf 1.tar a
37901
37902tar -tvf 1.tar
37903tar --numeric-owner -tvf 1.tar
37904
37905> uid.map
37906> gid.map
37907
37908tar --owner-map=uid.map\\
37909    --group-map=gid.map\\
37910    --owner=\"Fallback Owner:4321\" \\
37911    --group=\"Fallback Group:8765\" \\
37912    --mtime='@0' \\
37913    --mode='u=rw,go=r' \\
37914    -cf 2.tar a
37915
37916tar -tvf 2.tar
37917tar --numeric-owner -tvf 2.tar
37918)"
37919at_fn_check_prepare_notrace 'a `...` command substitution' "map.at:24"
37920( $at_check_trace;
37921mkdir gnu
37922(cd gnu
37923TEST_TAR_FORMAT=gnu
37924export TEST_TAR_FORMAT
37925TAR_OPTIONS="-H gnu"
37926export TAR_OPTIONS
37927rm -rf *
37928
37929export TZ=UTC0
37930
37931genfile --file a
37932set -- `genfile --stat=uid,gid a`
37933cat > uid.map <<EOT
37934# Owner mapping
37935+$1	"Joe the Plumber:1234"
37936EOT
37937# Group mapping
37938cat > gid.map <<EOT
37939+$2	"Plumber's Union:5678"
37940EOT
37941
37942tar --owner-map=uid.map\
37943    --group-map=gid.map\
37944    --owner="Fallback Owner:4321" \
37945    --group="Fallback Group:8765" \
37946    --mtime='@0' \
37947    --mode='u=rw,go=r' \
37948    -cf 1.tar a
37949
37950tar -tvf 1.tar
37951tar --numeric-owner -tvf 1.tar
37952
37953> uid.map
37954> gid.map
37955
37956tar --owner-map=uid.map\
37957    --group-map=gid.map\
37958    --owner="Fallback Owner:4321" \
37959    --group="Fallback Group:8765" \
37960    --mtime='@0' \
37961    --mode='u=rw,go=r' \
37962    -cf 2.tar a
37963
37964tar -tvf 2.tar
37965tar --numeric-owner -tvf 2.tar
37966)
37967) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37968at_status=$? at_failed=false
37969$at_check_filter
37970at_fn_diff_devnull "$at_stderr" || at_failed=:
37971echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
37972-rw-r--r-- 1234/5678         0 1970-01-01 00:00 a
37973-rw-r--r-- Fallback Owner/Fallback Group 0 1970-01-01 00:00 a
37974-rw-r--r-- 4321/8765         0 1970-01-01 00:00 a
37975" | \
37976  $at_diff - "$at_stdout" || at_failed=:
37977at_fn_check_status 0 $at_status "$at_srcdir/map.at:24"
37978$at_failed && at_fn_log_failure
37979$at_traceon; }
37980
37981
37982
37983
37984  set +x
37985  $at_times_p && times >"$at_times_file"
37986) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37987read at_status <"$at_status_file"
37988#AT_STOP_164
37989#AT_START_165
37990at_fn_group_banner 165 'sparse01.at:21' \
37991  "sparse files" "                                   " 25
37992at_xfail=no
37993      test -f $XFAILFILE && at_xfail=yes
37994(
37995  $as_echo "165. $at_setup_line: testing $at_desc ..."
37996  $at_traceon
37997
37998
37999
38000
38001
38002  { set +x
38003$as_echo "$at_srcdir/sparse01.at:24:
38004mkdir posix
38005(cd posix
38006TEST_TAR_FORMAT=posix
38007export TEST_TAR_FORMAT
38008TAR_OPTIONS=\"-H posix\"
38009export TAR_OPTIONS
38010rm -rf *
38011
38012genfile --length 1000 -f begin
38013genfile --length 1000 -f end
38014genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38015tar -c -f archive --sparse begin sparsefile end || exit 1
38016echo separator
38017
38018tar tfv archive
38019echo separator
38020mkdir directory
38021tar Cxf directory archive --warning=no-timestamp
38022genfile --stat=name,size sparsefile
38023cmp sparsefile directory/sparsefile
38024)"
38025at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
38026( $at_check_trace;
38027mkdir posix
38028(cd posix
38029TEST_TAR_FORMAT=posix
38030export TEST_TAR_FORMAT
38031TAR_OPTIONS="-H posix"
38032export TAR_OPTIONS
38033rm -rf *
38034
38035genfile --length 1000 -f begin
38036genfile --length 1000 -f end
38037genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38038tar -c -f archive --sparse begin sparsefile end || exit 1
38039echo separator
38040
38041tar tfv archive
38042echo separator
38043mkdir directory
38044tar Cxf directory archive --warning=no-timestamp
38045genfile --stat=name,size sparsefile
38046cmp sparsefile directory/sparsefile
38047)
38048) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38049at_status=$? at_failed=false
38050$at_check_filter
38051at_fn_diff_devnull "$at_stderr" || at_failed=:
38052echo stdout:; tee stdout <"$at_stdout"
38053at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
38054$at_failed && at_fn_log_failure
38055$at_traceon; }
38056
38057              { set +x
38058$as_echo "$at_srcdir/sparse01.at:24:
38059mkdir gnu
38060(cd gnu
38061TEST_TAR_FORMAT=gnu
38062export TEST_TAR_FORMAT
38063TAR_OPTIONS=\"-H gnu\"
38064export TAR_OPTIONS
38065rm -rf *
38066
38067genfile --length 1000 -f begin
38068genfile --length 1000 -f end
38069genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38070tar -c -f archive --sparse begin sparsefile end || exit 1
38071echo separator
38072
38073tar tfv archive
38074echo separator
38075mkdir directory
38076tar Cxf directory archive --warning=no-timestamp
38077genfile --stat=name,size sparsefile
38078cmp sparsefile directory/sparsefile
38079)"
38080at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
38081( $at_check_trace;
38082mkdir gnu
38083(cd gnu
38084TEST_TAR_FORMAT=gnu
38085export TEST_TAR_FORMAT
38086TAR_OPTIONS="-H gnu"
38087export TAR_OPTIONS
38088rm -rf *
38089
38090genfile --length 1000 -f begin
38091genfile --length 1000 -f end
38092genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38093tar -c -f archive --sparse begin sparsefile end || exit 1
38094echo separator
38095
38096tar tfv archive
38097echo separator
38098mkdir directory
38099tar Cxf directory archive --warning=no-timestamp
38100genfile --stat=name,size sparsefile
38101cmp sparsefile directory/sparsefile
38102)
38103) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38104at_status=$? at_failed=false
38105$at_check_filter
38106at_fn_diff_devnull "$at_stderr" || at_failed=:
38107echo stdout:; tee stdout <"$at_stdout"
38108at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
38109$at_failed && at_fn_log_failure
38110$at_traceon; }
38111
38112              { set +x
38113$as_echo "$at_srcdir/sparse01.at:24:
38114mkdir oldgnu
38115(cd oldgnu
38116TEST_TAR_FORMAT=oldgnu
38117export TEST_TAR_FORMAT
38118TAR_OPTIONS=\"-H oldgnu\"
38119export TAR_OPTIONS
38120rm -rf *
38121
38122genfile --length 1000 -f begin
38123genfile --length 1000 -f end
38124genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38125tar -c -f archive --sparse begin sparsefile end || exit 1
38126echo separator
38127
38128tar tfv archive
38129echo separator
38130mkdir directory
38131tar Cxf directory archive --warning=no-timestamp
38132genfile --stat=name,size sparsefile
38133cmp sparsefile directory/sparsefile
38134)"
38135at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
38136( $at_check_trace;
38137mkdir oldgnu
38138(cd oldgnu
38139TEST_TAR_FORMAT=oldgnu
38140export TEST_TAR_FORMAT
38141TAR_OPTIONS="-H oldgnu"
38142export TAR_OPTIONS
38143rm -rf *
38144
38145genfile --length 1000 -f begin
38146genfile --length 1000 -f end
38147genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38148tar -c -f archive --sparse begin sparsefile end || exit 1
38149echo separator
38150
38151tar tfv archive
38152echo separator
38153mkdir directory
38154tar Cxf directory archive --warning=no-timestamp
38155genfile --stat=name,size sparsefile
38156cmp sparsefile directory/sparsefile
38157)
38158) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38159at_status=$? at_failed=false
38160$at_check_filter
38161at_fn_diff_devnull "$at_stderr" || at_failed=:
38162echo stdout:; tee stdout <"$at_stdout"
38163at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
38164$at_failed && at_fn_log_failure
38165$at_traceon; }
38166
38167
38168
38169
38170
38171cat >stdout.re <<'_ATEOF'
38172separator
38173-rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
38174-rw-r--r-- ^ ^ *  *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
38175-rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
38176separator
38177sparsefile 10344448
38178_ATEOF
38179
38180awk '{print NR " " $0}' stdout > $$.1
38181awk '{print NR " " $0}' stdout.re | join - $$.1 |
38182while read NUM RE LINE
38183do
38184  echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
38185done
38186
38187
38188  set +x
38189  $at_times_p && times >"$at_times_file"
38190) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38191read at_status <"$at_status_file"
38192#AT_STOP_165
38193#AT_START_166
38194at_fn_group_banner 166 'sparse02.at:21' \
38195  "extracting sparse file over a pipe" "             " 25
38196at_xfail=no
38197      test -f $XFAILFILE && at_xfail=yes
38198(
38199  $as_echo "166. $at_setup_line: testing $at_desc ..."
38200  $at_traceon
38201
38202
38203
38204# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
38205# References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
38206# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
38207
38208
38209
38210  { set +x
38211$as_echo "$at_srcdir/sparse02.at:28:
38212mkdir posix
38213(cd posix
38214TEST_TAR_FORMAT=posix
38215export TEST_TAR_FORMAT
38216TAR_OPTIONS=\"-H posix\"
38217export TAR_OPTIONS
38218rm -rf *
38219
38220genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38221tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
38222echo separator
38223
38224tar xfO archive | cat - > sparsecopy || exit 1
38225cmp sparsefile sparsecopy
38226)"
38227at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
38228( $at_check_trace;
38229mkdir posix
38230(cd posix
38231TEST_TAR_FORMAT=posix
38232export TEST_TAR_FORMAT
38233TAR_OPTIONS="-H posix"
38234export TAR_OPTIONS
38235rm -rf *
38236
38237genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38238tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
38239echo separator
38240
38241tar xfO archive | cat - > sparsecopy || exit 1
38242cmp sparsefile sparsecopy
38243)
38244) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38245at_status=$? at_failed=false
38246$at_check_filter
38247at_fn_diff_devnull "$at_stderr" || at_failed=:
38248echo >>"$at_stdout"; $as_echo "separator
38249" | \
38250  $at_diff - "$at_stdout" || at_failed=:
38251at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
38252$at_failed && at_fn_log_failure
38253$at_traceon; }
38254
38255              { set +x
38256$as_echo "$at_srcdir/sparse02.at:28:
38257mkdir gnu
38258(cd gnu
38259TEST_TAR_FORMAT=gnu
38260export TEST_TAR_FORMAT
38261TAR_OPTIONS=\"-H gnu\"
38262export TAR_OPTIONS
38263rm -rf *
38264
38265genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38266tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
38267echo separator
38268
38269tar xfO archive | cat - > sparsecopy || exit 1
38270cmp sparsefile sparsecopy
38271)"
38272at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
38273( $at_check_trace;
38274mkdir gnu
38275(cd gnu
38276TEST_TAR_FORMAT=gnu
38277export TEST_TAR_FORMAT
38278TAR_OPTIONS="-H gnu"
38279export TAR_OPTIONS
38280rm -rf *
38281
38282genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38283tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
38284echo separator
38285
38286tar xfO archive | cat - > sparsecopy || exit 1
38287cmp sparsefile sparsecopy
38288)
38289) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38290at_status=$? at_failed=false
38291$at_check_filter
38292at_fn_diff_devnull "$at_stderr" || at_failed=:
38293echo >>"$at_stdout"; $as_echo "separator
38294" | \
38295  $at_diff - "$at_stdout" || at_failed=:
38296at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
38297$at_failed && at_fn_log_failure
38298$at_traceon; }
38299
38300              { set +x
38301$as_echo "$at_srcdir/sparse02.at:28:
38302mkdir oldgnu
38303(cd oldgnu
38304TEST_TAR_FORMAT=oldgnu
38305export TEST_TAR_FORMAT
38306TAR_OPTIONS=\"-H oldgnu\"
38307export TAR_OPTIONS
38308rm -rf *
38309
38310genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38311tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
38312echo separator
38313
38314tar xfO archive | cat - > sparsecopy || exit 1
38315cmp sparsefile sparsecopy
38316)"
38317at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
38318( $at_check_trace;
38319mkdir oldgnu
38320(cd oldgnu
38321TEST_TAR_FORMAT=oldgnu
38322export TEST_TAR_FORMAT
38323TAR_OPTIONS="-H oldgnu"
38324export TAR_OPTIONS
38325rm -rf *
38326
38327genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
38328tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
38329echo separator
38330
38331tar xfO archive | cat - > sparsecopy || exit 1
38332cmp sparsefile sparsecopy
38333)
38334) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38335at_status=$? at_failed=false
38336$at_check_filter
38337at_fn_diff_devnull "$at_stderr" || at_failed=:
38338echo >>"$at_stdout"; $as_echo "separator
38339" | \
38340  $at_diff - "$at_stdout" || at_failed=:
38341at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
38342$at_failed && at_fn_log_failure
38343$at_traceon; }
38344
38345
38346
38347
38348  set +x
38349  $at_times_p && times >"$at_times_file"
38350) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38351read at_status <"$at_status_file"
38352#AT_STOP_166
38353#AT_START_167
38354at_fn_group_banner 167 'sparse03.at:21' \
38355  "storing sparse files > 8G" "                      " 25
38356at_xfail=no
38357      test -f $XFAILFILE && at_xfail=yes
38358(
38359  $as_echo "167. $at_setup_line: testing $at_desc ..."
38360  $at_traceon
38361
38362
38363
38364# Tar 1.15.1 incorrectly computed sparse member size if the extended
38365# PAX header contained size keyword.
38366# References: <87vf46nb36.fsf@penguin.cs.ucla.edu>
38367# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
38368
38369
38370
38371  { set +x
38372$as_echo "$at_srcdir/sparse03.at:29:
38373mkdir posix
38374(cd posix
38375TEST_TAR_FORMAT=posix
38376export TEST_TAR_FORMAT
38377TAR_OPTIONS=\"-H posix\"
38378export TAR_OPTIONS
38379rm -rf *
38380
38381test \"\${TARTEST_SKIP_LARGE_FILES:-0}\" != 0 && exit 77
38382genfile --length 1000 --file begin
38383genfile --length 1000 --file end
38384genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
38385tar -c -f archive --sparse begin sparsefile end || exit 1
38386echo separator
38387
38388tar tfv archive
38389echo separator
38390mkdir directory
38391tar Cxf directory archive
38392genfile --stat=name,size sparsefile
38393cmp sparsefile directory/sparsefile
38394)"
38395at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sparse03.at:29"
38396( $at_check_trace;
38397mkdir posix
38398(cd posix
38399TEST_TAR_FORMAT=posix
38400export TEST_TAR_FORMAT
38401TAR_OPTIONS="-H posix"
38402export TAR_OPTIONS
38403rm -rf *
38404
38405test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && exit 77
38406genfile --length 1000 --file begin
38407genfile --length 1000 --file end
38408genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
38409tar -c -f archive --sparse begin sparsefile end || exit 1
38410echo separator
38411
38412tar tfv archive
38413echo separator
38414mkdir directory
38415tar Cxf directory archive
38416genfile --stat=name,size sparsefile
38417cmp sparsefile directory/sparsefile
38418)
38419) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38420at_status=$? at_failed=false
38421$at_check_filter
38422at_fn_diff_devnull "$at_stderr" || at_failed=:
38423echo stdout:; tee stdout <"$at_stdout"
38424at_fn_check_status 0 $at_status "$at_srcdir/sparse03.at:29"
38425$at_failed && at_fn_log_failure
38426$at_traceon; }
38427
38428
38429
38430
38431
38432cat >stdout.re <<'_ATEOF'
38433separator
38434-rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
38435-rw-r--r-- ^ ^ *  *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
38436-rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
38437separator
38438sparsefile 8589935104
38439_ATEOF
38440
38441awk '{print NR " " $0}' stdout > $$.1
38442awk '{print NR " " $0}' stdout.re | join - $$.1 |
38443while read NUM RE LINE
38444do
38445  echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
38446done
38447
38448
38449  set +x
38450  $at_times_p && times >"$at_times_file"
38451) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38452read at_status <"$at_status_file"
38453#AT_STOP_167
38454#AT_START_168
38455at_fn_group_banner 168 'sparse04.at:21' \
38456  "storing long sparse file names" "                 " 25
38457at_xfail=no
38458      test -f $XFAILFILE && at_xfail=yes
38459(
38460  $as_echo "168. $at_setup_line: testing $at_desc ..."
38461  $at_traceon
38462
38463
38464
38465# Description: Tar versions from 1.15.92 to 1.25 would incorrectly
38466# store sparse file names longer than 100 characters in pax mode.
38467# Namely, the 'path' keyword of the produced PAX header would contain the
38468# crafted name of the header itself, instead of that of the file.
38469# Reported by: Kamil Dudka <kdudka@redhat.com>
38470# References: <201011250026.44908.kdudka@redhat.com>,
38471#             http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html
38472
38473
38474
38475
38476
38477  { set +x
38478$as_echo "$at_srcdir/sparse04.at:35:
38479mkdir pax
38480(cd pax
38481TEST_TAR_FORMAT=pax
38482export TEST_TAR_FORMAT
38483TAR_OPTIONS=\"-H pax\"
38484export TAR_OPTIONS
38485rm -rf *
38486
38487genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
38488tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
38489)"
38490at_fn_check_prepare_notrace 'an embedded newline' "sparse04.at:35"
38491( $at_check_trace;
38492mkdir pax
38493(cd pax
38494TEST_TAR_FORMAT=pax
38495export TEST_TAR_FORMAT
38496TAR_OPTIONS="-H pax"
38497export TAR_OPTIONS
38498rm -rf *
38499
38500genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
38501tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
38502)
38503) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38504at_status=$? at_failed=false
38505$at_check_filter
38506at_fn_diff_devnull "$at_stderr" || at_failed=:
38507echo >>"$at_stdout"; $as_echo "123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
38508" | \
38509  $at_diff - "$at_stdout" || at_failed=:
38510at_fn_check_status 0 $at_status "$at_srcdir/sparse04.at:35"
38511$at_failed && at_fn_log_failure
38512$at_traceon; }
38513
38514
38515
38516
38517
38518  set +x
38519  $at_times_p && times >"$at_times_file"
38520) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38521read at_status <"$at_status_file"
38522#AT_STOP_168
38523#AT_START_169
38524at_fn_group_banner 169 'sparse05.at:21' \
38525  "listing sparse files bigger than 2^33 B" "        " 25
38526at_xfail=no
38527      test -f $XFAILFILE && at_xfail=yes
38528(
38529  $as_echo "169. $at_setup_line: testing $at_desc ..."
38530  $at_traceon
38531
38532
38533
38534# Description: If an archive in POSIX.1-2001 archive contained a sparse file
38535# member whose real size (excluding zero blocks) is bigger than 2^33 bytes,
38536# tar 1.28 would incorrectly list the real member size.
38537# Reported by: Pavel Raiskup <praiskup@redhat.com>
38538# References: <1359119879.15037.4.camel@raiskup>,
38539#             http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html
38540
38541
38542
38543  { set +x
38544$as_echo "$at_srcdir/sparse05.at:31:
38545mkdir pax
38546(cd pax
38547TEST_TAR_FORMAT=pax
38548export TEST_TAR_FORMAT
38549TAR_OPTIONS=\"-H pax\"
38550export TAR_OPTIONS
38551rm -rf *
38552
38553test \"\${TARTEST_SKIP_LARGE_FILES:-0}\" != 0 && exit 77
38554cat >mapfile <<'_ATEOF'
385550 =2560
3855610M =2560
3855710M =2560
3855810M =2560
3855910M =2560
3856010M =2560
3856110M =2560
3856210M =2560
3856310M =2560
3856410M =2560
3856510M =2560
3856610M =2560
3856710M =2560
3856810M =2560
3856910M =2560
3857010M =2560
3857110M =2560
3857210M =2560
3857310M =2560
3857410M =2560
3857510M =2560
3857610M =2560
3857710M =2560
3857810M =2560
3857910M =2560
3858010M =2560
3858110M =2560
3858210M =2560
3858310M =2560
3858410M =2560
3858510M =2560
3858610M =2560
3858710M =2560
3858810M =2560
3858910M =2560
3859010M =2560
3859110M =2560
3859210M =2560
3859310M =2560
3859410M =2560
3859510M =2560
3859610M =2560
3859710M =2560
3859810M =2560
3859910M =2560
3860010M =2560
3860110M =2560
3860210M =2560
3860310M =2560
3860410M =2560
3860510M =2560
3860610M =2560
3860710M =2560
3860810M =2560
3860910M =2560
3861010M =2560
3861110M =2560
3861210M =2560
3861310M =2560
3861410M =2560
3861510M =2560
3861610M =2560
3861710M =2560
3861810M =2560
3861910M =2560
3862010M =2560
3862110M =2560
3862210M =2560
3862310M =2560
3862410M =2560
3862510M =2560
3862610M =2560
3862710M =2560
3862810M =2560
3862910M =2560
3863010M =2560
3863110M =2560
3863210M =2560
3863310M =2560
3863410M =2560
3863510M =2560
3863610M =2560
3863710M =2560
3863810M =2560
3863910M =2560
3864010M =2560
3864110M =2560
3864210M =2560
3864310M =2560
3864410M =2560
3864510M =2560
3864610M =2560
3864710M =2560
3864810M =2560
3864910M =2560
3865010M =2560
3865110M =2560
3865210M =2560
3865310M =2560
3865410M =2560
3865510M =2560
3865610M =2560
3865710M =2560
3865810M =2560
3865910M =2560
3866010M =2560
3866110M =2560
3866210M =2560
3866310M =2560
3866410M =2560
3866510M =2560
3866610M =2560
3866710M =2560
3866810M =2560
3866910M =2560
3867010M =2560
3867110M =2560
3867210M =2560
3867310M =2560
3867410M =2560
3867510M =2560
3867610M =2560
3867710M =2560
3867810M =2560
3867910M =2560
3868010M =2560
3868110M =2560
3868210M =2560
3868310M =2560
3868410M =2560
3868510M =2560
3868610M =2560
3868710M =2560
3868810M =2560
3868910M =2560
3869010M =2560
3869110M =2560
3869210M =2560
3869310M =2560
3869410M =2560
3869510M =2560
3869610M =2560
3869710M =2560
3869810M =2560
3869910M =2560
3870010M =2560
3870110M =2560
3870210M =2560
3870310M =2560
3870410M =2560
3870510M =2560
3870610M =2560
3870710M =2560
3870810M =2560
3870910M =2560
3871010M =2560
3871110M =2560
3871210M =2560
3871310M =2560
3871410M =2560
3871510M =2560
3871610M =2560
3871710M =2560
3871810M =2560
3871910M =2560
3872010M =2560
3872110M =2560
3872210M =2560
3872310M =2560
3872410M =2560
3872510M =2560
3872610M =2560
3872710M =2560
3872810M =2560
3872910M =2560
3873010M =2560
3873110M =2560
3873210M =2560
3873310M =2560
3873410M =2560
3873510M =2560
3873610M =2560
3873710M =2560
3873810M =2560
3873910M =2560
3874010M =2560
3874110M =2560
3874210M =2560
3874310M =2560
3874410M =2560
3874510M =2560
3874610M =2560
3874710M =2560
3874810M =2560
3874910M =2560
3875010M =2560
3875110M =2560
3875210M =2560
3875310M =2560
3875410M =2560
3875510M =2560
3875610M =2560
3875710M =2560
3875810M =2560
3875910M =2560
3876010M =2560
3876110M =2560
3876210M =2560
3876310M =2560
3876410M =2560
3876510M =2560
3876610M =2560
3876710M =2560
3876810M =2560
3876910M =2560
3877010M =2560
3877110M =2560
3877210M =2560
3877310M =2560
3877410M =2560
3877510M =2560
3877610M =2560
3877710M =2560
3877810M =2560
3877910M =2560
3878010M =2560
3878110M =2560
3878210M =2560
3878310M =2560
3878410M =2560
3878510M =2560
3878610M =2560
3878710M =2560
3878810M =2560
3878910M =2560
3879010M =2560
3879110M =2560
3879210M =2560
3879310M =2560
3879410M =2560
3879510M =2560
3879610M =2560
3879710M =2560
3879810M =2560
3879910M =2560
3880010M =2560
3880110M =2560
3880210M =2560
3880310M =2560
3880410M =2560
3880510M =2560
3880610M =2560
3880710M =2560
3880810M =2560
3880910M =2560
3881010M =2560
3881110M =2560
3881210M =2560
3881310M =2560
3881410M =2560
3881510M =2560
3881610M =2560
3881710M =2560
3881810M =2560
3881910M =2560
3882010M =2560
3882110M =2560
3882210M =2560
3882310M =2560
3882410M =2560
3882510M =2560
3882610M =2560
3882710M =2560
3882810M =2560
3882910M =2560
3883010M =2560
3883110M =2560
3883210M =2560
3883310M =2560
3883410M =2560
3883510M =2560
3883610M =2560
3883710M =2560
3883810M =2560
3883910M =2560
3884010M =2560
3884110M =2560
3884210M =2560
3884310M =2560
3884410M =2560
3884510M =2560
3884610M =2560
3884710M =2560
3884810M =2560
3884910M =2560
3885010M =2560
3885110M =2560
3885210M =2560
3885310M =2560
3885410M =2560
3885510M =2560
3885610M =2560
3885710M =2560
3885810M =2560
3885910M =2560
3886010M =2560
3886110M =2560
3886210M =2560
3886310M =2560
3886410M =2560
3886510M =2560
3886610M =2560
3886710M =2560
3886810M =2560
3886910M =2560
3887010M =2560
3887110M =2560
3887210M =2560
3887310M =2560
3887410M =2560
3887510M =2560
3887610M =2560
3887710M =2560
3887810M =2560
3887910M =2560
3888010M =2560
3888110M =2560
3888210M =2560
3888310M =2560
3888410M =2560
3888510M =2560
3888610M =2560
3888710M =2560
3888810M =2560
3888910M =2560
3889010M =2560
3889110M =2560
3889210M =2560
3889310M =2560
3889410M =2560
3889510M =2560
3889610M =2560
3889710M =2560
3889810M =2560
3889910M =2560
3890010M =2560
3890110M =2560
3890210M =2560
3890310M =2560
3890410M =2560
3890510M =2560
3890610M =2560
3890710M =2560
3890810M =2560
3890910M =2560
3891010M =2560
3891110M =2560
3891210M =2560
3891310M =2560
3891410M =2560
3891510M =2560
3891610M =2560
3891710M =2560
3891810M =2560
3891910M =2560
3892010M =2560
3892110M =2560
3892210M =2560
3892310M =2560
3892410M =2560
3892510M =2560
3892610M =2560
3892710M =2560
3892810M =2560
3892910M =2560
3893010M =2560
3893110M =2560
3893210M =2560
3893310M =2560
3893410M =2560
3893510M =2560
3893610M =2560
3893710M =2560
3893810M =2560
3893910M =2560
3894010M =2560
3894110M =2560
3894210M =2560
3894310M =2560
3894410M =2560
3894510M =2560
3894610M =2560
3894710M =2560
3894810M =2560
3894910M =2560
3895010M =2560
3895110M =2560
3895210M =2560
3895310M =2560
3895410M =2560
3895510M =2560
3895610M =2560
3895710M =2560
3895810M =2560
3895910M =2560
3896010M =2560
3896110M =2560
3896210M =2560
3896310M =2560
3896410M =2560
3896510M =2560
3896610M =2560
3896710M =2560
3896810M =2560
3896910M =2560
3897010M =2560
3897110M =2560
3897210M =2560
3897310M =2560
3897410M =2560
3897510M =2560
3897610M =2560
3897710M =2560
3897810M =2560
3897910M =2560
3898010M =2560
3898110M =2560
3898210M =2560
3898310M =2560
3898410M =2560
3898510M =2560
3898610M =2560
3898710M =2560
3898810M =2560
3898910M =2560
3899010M =2560
3899110M =2560
3899210M =2560
3899310M =2560
3899410M =2560
3899510M =2560
3899610M =2560
3899710M =2560
3899810M =2560
3899910M =2560
3900010M =2560
3900110M =2560
3900210M =2560
3900310M =2560
3900410M =2560
3900510M =2560
3900610M =2560
3900710M =2560
3900810M =2560
3900910M =2560
3901010M =2560
3901110M =2560
3901210M =2560
3901310M =2560
3901410M =2560
3901510M =2560
3901610M =2560
3901710M =2560
3901810M =2560
3901910M =2560
3902010M =2560
3902110M =2560
3902210M =2560
3902310M =2560
3902410M =2560
3902510M =2560
3902610M =2560
3902710M =2560
3902810M =2560
3902910M =2560
3903010M =2560
3903110M =2560
3903210M =2560
3903310M =2560
3903410M =2560
3903510M =2560
3903610M =2560
3903710M =2560
3903810M =2560
3903910M =2560
3904010M =2560
3904110M =2560
3904210M =2560
3904310M =2560
3904410M =2560
3904510M =2560
3904610M =2560
3904710M =2560
3904810M =2560
3904910M =2560
3905010M =2560
3905110M =2560
3905210M =2560
3905310M =2560
3905410M =2560
3905510M =2560
3905610M =2560
3905710M =2560
3905810M =2560
3905910M =2560
3906010M =2560
3906110M =2560
3906210M =2560
3906310M =2560
3906410M =2560
3906510M =2560
3906610M =2560
3906710M =2560
3906810M =2560
3906910M =2560
3907010M =2560
3907110M =2560
3907210M =2560
3907310M =2560
3907410M =2560
3907510M =2560
3907610M =2560
3907710M =2560
3907810M =2560
3907910M =2560
3908010M =2560
3908110M =2560
3908210M =2560
3908310M =2560
3908410M =2560
3908510M =2560
3908610M =2560
3908710M =2560
3908810M =2560
3908910M =2560
3909010M =2560
3909110M =2560
3909210M =2560
3909310M =2560
3909410M =2560
3909510M =2560
3909610M =2560
3909710M =2560
3909810M =2560
3909910M =2560
3910010M =2560
3910110M =2560
3910210M =2560
3910310M =2560
3910410M =2560
3910510M =2560
3910610M =2560
3910710M =2560
3910810M =2560
3910910M =2560
3911010M =2560
3911110M =2560
3911210M =2560
3911310M =2560
3911410M =2560
3911510M =2560
3911610M =2560
3911710M =2560
3911810M =2560
3911910M =2560
3912010M =2560
3912110M =2560
3912210M =2560
3912310M =2560
3912410M =2560
3912510M =2560
3912610M =2560
3912710M =2560
3912810M =2560
3912910M =2560
3913010M =2560
3913110M =2560
3913210M =2560
3913310M =2560
3913410M =2560
3913510M =2560
3913610M =2560
3913710M =2560
3913810M =2560
3913910M =2560
3914010M =2560
3914110M =2560
3914210M =2560
3914310M =2560
3914410M =2560
3914510M =2560
3914610M =2560
3914710M =2560
3914810M =2560
3914910M =2560
3915010M =2560
3915110M =2560
3915210M =2560
3915310M =2560
3915410M =2560
3915510M =2560
3915610M =2560
3915710M =2560
3915810M =2560
3915910M =2560
3916010M =2560
3916110M =2560
3916210M =2560
3916310M =2560
3916410M =2560
3916510M =2560
3916610M =2560
3916710M =2560
3916810M =2560
3916910M =2560
3917010M =2560
3917110M =2560
3917210M =2560
3917310M =2560
3917410M =2560
3917510M =2560
3917610M =2560
3917710M =2560
3917810M =2560
3917910M =2560
3918010M =2560
3918110M =2560
3918210M =2560
3918310M =2560
3918410M =2560
3918510M =2560
3918610M =2560
3918710M =2560
3918810M =2560
3918910M =2560
3919010M =2560
3919110M =2560
3919210M =2560
3919310M =2560
3919410M =2560
3919510M =2560
3919610M =2560
3919710M =2560
3919810M =2560
3919910M =2560
3920010M =2560
3920110M =2560
3920210M =2560
3920310M =2560
3920410M =2560
3920510M =2560
3920610M =2560
3920710M =2560
3920810M =2560
3920910M =2560
3921010M =2560
3921110M =2560
3921210M =2560
3921310M =2560
3921410M =2560
3921510M =2560
3921610M =2560
3921710M =2560
3921810M =2560
3921910M =2560
3922010M =2560
3922110M =2560
3922210M =2560
3922310M =2560
3922410M =2560
3922510M =2560
3922610M =2560
3922710M =2560
3922810M =2560
3922910M =2560
3923010M =2560
3923110M =2560
3923210M =2560
3923310M =2560
3923410M =2560
3923510M =2560
3923610M =2560
3923710M =2560
3923810M =2560
3923910M =2560
3924010M =2560
3924110M =2560
3924210M =2560
3924310M =2560
3924410M =2560
3924510M =2560
3924610M =2560
3924710M =2560
3924810M =2560
3924910M =2560
3925010M =2560
3925110M =2560
3925210M =2560
3925310M =2560
3925410M =2560
3925510M =2560
3925610M =2560
3925710M =2560
3925810M =2560
3925910M =2560
3926010M =2560
3926110M =2560
3926210M =2560
3926310M =2560
3926410M =2560
3926510M =2560
3926610M =2560
3926710M =2560
3926810M =2560
3926910M =2560
3927010M =2560
3927110M =2560
3927210M =2560
3927310M =2560
3927410M =2560
3927510M =2560
3927610M =2560
3927710M =2560
3927810M =2560
3927910M =2560
3928010M =2560
3928110M =2560
3928210M =2560
3928310M =2560
3928410M =2560
3928510M =2560
3928610M =2560
3928710M =2560
3928810M =2560
3928910M =2560
3929010M =2560
3929110M =2560
3929210M =2560
3929310M =2560
3929410M =2560
3929510M =2560
3929610M =2560
3929710M =2560
3929810M =2560
3929910M =2560
3930010M =2560
3930110M =2560
3930210M =2560
3930310M =2560
3930410M =2560
3930510M =2560
3930610M =2560
3930710M =2560
3930810M =2560
3930910M =2560
3931010M =2560
3931110M =2560
3931210M =2560
3931310M =2560
3931410M =2560
3931510M =2560
3931610M =2560
3931710M =2560
3931810M =2560
3931910M =2560
3932010M =2560
3932110M =2560
3932210M =2560
3932310M =2560
3932410M =2560
3932510M =2560
3932610M =2560
3932710M =2560
3932810M =2560
3932910M =2560
3933010M =2560
3933110M =2560
3933210M =2560
3933310M =2560
3933410M =2560
3933510M =2560
3933610M =2560
3933710M =2560
3933810M =2560
3933910M =2560
3934010M =2560
3934110M =2560
3934210M =2560
3934310M =2560
3934410M =2560
3934510M =2560
3934610M =2560
3934710M =2560
3934810M =2560
3934910M =2560
3935010M =2560
3935110M =2560
3935210M =2560
3935310M =2560
3935410M =2560
3935510M =2560
3935610M =2560
3935710M =2560
3935810M =2560
3935910M =2560
3936010M =2560
3936110M =2560
3936210M =2560
3936310M =2560
3936410M =2560
3936510M =2560
3936610M =2560
3936710M =2560
3936810M =2560
3936910M =2560
3937010M =2560
3937110M =2560
3937210M =2560
3937310M =2560
3937410M =2560
3937510M =2560
3937610M =2560
3937710M =2560
3937810M =2560
3937910M =2560
3938010M =2560
3938110M =2560
3938210M =2560
3938310M =2560
3938410M =2560
3938510M =2560
3938610M =2560
3938710M =2560
3938810M =2560
3938910M =2560
3939010M =2560
3939110M =2560
3939210M =2560
3939310M =2560
3939410M =2560
3939510M =2560
3939610M =2560
3939710M =2560
3939810M =2560
3939910M =2560
3940010M =2560
3940110M =2560
3940210M =2560
3940310M =2560
3940410M =2560
3940510M =2560
3940610M =2560
3940710M =2560
3940810M =2560
3940910M =2560
3941010M =2560
3941110M =2560
3941210M =2560
3941310M =2560
3941410M =2560
3941510M =2560
3941610M =2560
3941710M =2560
3941810M =2560
3941910M =2560
3942010M =2560
3942110M =2560
3942210M =2560
3942310M =2560
3942410M =2560
3942510M =2560
3942610M =2560
3942710M =2560
3942810M =2560
3942910M =2560
3943010M =2560
3943110M =2560
3943210M =2560
3943310M =2560
3943410M =2560
3943510M =2560
3943610M =2560
3943710M =2560
3943810M =2560
3943910M =2560
3944010M =2560
3944110M =2560
3944210M =2560
3944310M =2560
3944410M =2560
3944510M =2560
3944610M =2560
3944710M =2560
3944810M =2560
3944910M =2560
3945010M =2560
3945110M =2560
3945210M =2560
3945310M =2560
3945410M =2560
3945510M =2560
3945610M =2560
3945710M =2560
3945810M =2560
3945910M =2560
3946010M =2560
3946110M =2560
3946210M =2560
3946310M =2560
3946410M =2560
3946510M =2560
3946610M =2560
3946710M =2560
3946810M =2560
3946910M =2560
3947010M =2560
3947110M =2560
3947210M =2560
3947310M =2560
3947410M =2560
3947510M =2560
3947610M =2560
3947710M =2560
3947810M =2560
3947910M =2560
3948010M =2560
3948110M =2560
3948210M =2560
3948310M =2560
3948410M =2560
3948510M =2560
3948610M =2560
3948710M =2560
3948810M =2560
3948910M =2560
3949010M =2560
3949110M =2560
3949210M =2560
3949310M =2560
3949410M =2560
3949510M =2560
3949610M =2560
3949710M =2560
3949810M =2560
3949910M =2560
3950010M =2560
3950110M =2560
3950210M =2560
3950310M =2560
3950410M =2560
3950510M =2560
3950610M =2560
3950710M =2560
3950810M =2560
3950910M =2560
3951010M =2560
3951110M =2560
3951210M =2560
3951310M =2560
3951410M =2560
3951510M =2560
3951610M =2560
3951710M =2560
3951810M =2560
3951910M =2560
3952010M =2560
3952110M =2560
3952210M =2560
3952310M =2560
3952410M =2560
3952510M =2560
3952610M =2560
3952710M =2560
3952810M =2560
3952910M =2560
3953010M =2560
3953110M =2560
3953210M =2560
3953310M =2560
3953410M =2560
3953510M =2560
3953610M =2560
3953710M =2560
3953810M =2560
3953910M =2560
3954010M =2560
3954110M =2560
3954210M =2560
3954310M =2560
3954410M =2560
3954510M =2560
3954610M =2560
3954710M =2560
3954810M =2560
3954910M =2560
3955010M =2560
3955110M =2560
3955210M =2560
3955310M =2560
3955410M =2560
39555_ATEOF
39556
39557genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77
39558tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print \$3, \$(NF) }'
39559)"
39560at_fn_check_prepare_notrace 'a $(...) command substitution' "sparse05.at:31"
39561( $at_check_trace;
39562mkdir pax
39563(cd pax
39564TEST_TAR_FORMAT=pax
39565export TEST_TAR_FORMAT
39566TAR_OPTIONS="-H pax"
39567export TAR_OPTIONS
39568rm -rf *
39569
39570test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && exit 77
39571cat >mapfile <<'_ATEOF'
395720 =2560
3957310M =2560
3957410M =2560
3957510M =2560
3957610M =2560
3957710M =2560
3957810M =2560
3957910M =2560
3958010M =2560
3958110M =2560
3958210M =2560
3958310M =2560
3958410M =2560
3958510M =2560
3958610M =2560
3958710M =2560
3958810M =2560
3958910M =2560
3959010M =2560
3959110M =2560
3959210M =2560
3959310M =2560
3959410M =2560
3959510M =2560
3959610M =2560
3959710M =2560
3959810M =2560
3959910M =2560
3960010M =2560
3960110M =2560
3960210M =2560
3960310M =2560
3960410M =2560
3960510M =2560
3960610M =2560
3960710M =2560
3960810M =2560
3960910M =2560
3961010M =2560
3961110M =2560
3961210M =2560
3961310M =2560
3961410M =2560
3961510M =2560
3961610M =2560
3961710M =2560
3961810M =2560
3961910M =2560
3962010M =2560
3962110M =2560
3962210M =2560
3962310M =2560
3962410M =2560
3962510M =2560
3962610M =2560
3962710M =2560
3962810M =2560
3962910M =2560
3963010M =2560
3963110M =2560
3963210M =2560
3963310M =2560
3963410M =2560
3963510M =2560
3963610M =2560
3963710M =2560
3963810M =2560
3963910M =2560
3964010M =2560
3964110M =2560
3964210M =2560
3964310M =2560
3964410M =2560
3964510M =2560
3964610M =2560
3964710M =2560
3964810M =2560
3964910M =2560
3965010M =2560
3965110M =2560
3965210M =2560
3965310M =2560
3965410M =2560
3965510M =2560
3965610M =2560
3965710M =2560
3965810M =2560
3965910M =2560
3966010M =2560
3966110M =2560
3966210M =2560
3966310M =2560
3966410M =2560
3966510M =2560
3966610M =2560
3966710M =2560
3966810M =2560
3966910M =2560
3967010M =2560
3967110M =2560
3967210M =2560
3967310M =2560
3967410M =2560
3967510M =2560
3967610M =2560
3967710M =2560
3967810M =2560
3967910M =2560
3968010M =2560
3968110M =2560
3968210M =2560
3968310M =2560
3968410M =2560
3968510M =2560
3968610M =2560
3968710M =2560
3968810M =2560
3968910M =2560
3969010M =2560
3969110M =2560
3969210M =2560
3969310M =2560
3969410M =2560
3969510M =2560
3969610M =2560
3969710M =2560
3969810M =2560
3969910M =2560
3970010M =2560
3970110M =2560
3970210M =2560
3970310M =2560
3970410M =2560
3970510M =2560
3970610M =2560
3970710M =2560
3970810M =2560
3970910M =2560
3971010M =2560
3971110M =2560
3971210M =2560
3971310M =2560
3971410M =2560
3971510M =2560
3971610M =2560
3971710M =2560
3971810M =2560
3971910M =2560
3972010M =2560
3972110M =2560
3972210M =2560
3972310M =2560
3972410M =2560
3972510M =2560
3972610M =2560
3972710M =2560
3972810M =2560
3972910M =2560
3973010M =2560
3973110M =2560
3973210M =2560
3973310M =2560
3973410M =2560
3973510M =2560
3973610M =2560
3973710M =2560
3973810M =2560
3973910M =2560
3974010M =2560
3974110M =2560
3974210M =2560
3974310M =2560
3974410M =2560
3974510M =2560
3974610M =2560
3974710M =2560
3974810M =2560
3974910M =2560
3975010M =2560
3975110M =2560
3975210M =2560
3975310M =2560
3975410M =2560
3975510M =2560
3975610M =2560
3975710M =2560
3975810M =2560
3975910M =2560
3976010M =2560
3976110M =2560
3976210M =2560
3976310M =2560
3976410M =2560
3976510M =2560
3976610M =2560
3976710M =2560
3976810M =2560
3976910M =2560
3977010M =2560
3977110M =2560
3977210M =2560
3977310M =2560
3977410M =2560
3977510M =2560
3977610M =2560
3977710M =2560
3977810M =2560
3977910M =2560
3978010M =2560
3978110M =2560
3978210M =2560
3978310M =2560
3978410M =2560
3978510M =2560
3978610M =2560
3978710M =2560
3978810M =2560
3978910M =2560
3979010M =2560
3979110M =2560
3979210M =2560
3979310M =2560
3979410M =2560
3979510M =2560
3979610M =2560
3979710M =2560
3979810M =2560
3979910M =2560
3980010M =2560
3980110M =2560
3980210M =2560
3980310M =2560
3980410M =2560
3980510M =2560
3980610M =2560
3980710M =2560
3980810M =2560
3980910M =2560
3981010M =2560
3981110M =2560
3981210M =2560
3981310M =2560
3981410M =2560
3981510M =2560
3981610M =2560
3981710M =2560
3981810M =2560
3981910M =2560
3982010M =2560
3982110M =2560
3982210M =2560
3982310M =2560
3982410M =2560
3982510M =2560
3982610M =2560
3982710M =2560
3982810M =2560
3982910M =2560
3983010M =2560
3983110M =2560
3983210M =2560
3983310M =2560
3983410M =2560
3983510M =2560
3983610M =2560
3983710M =2560
3983810M =2560
3983910M =2560
3984010M =2560
3984110M =2560
3984210M =2560
3984310M =2560
3984410M =2560
3984510M =2560
3984610M =2560
3984710M =2560
3984810M =2560
3984910M =2560
3985010M =2560
3985110M =2560
3985210M =2560
3985310M =2560
3985410M =2560
3985510M =2560
3985610M =2560
3985710M =2560
3985810M =2560
3985910M =2560
3986010M =2560
3986110M =2560
3986210M =2560
3986310M =2560
3986410M =2560
3986510M =2560
3986610M =2560
3986710M =2560
3986810M =2560
3986910M =2560
3987010M =2560
3987110M =2560
3987210M =2560
3987310M =2560
3987410M =2560
3987510M =2560
3987610M =2560
3987710M =2560
3987810M =2560
3987910M =2560
3988010M =2560
3988110M =2560
3988210M =2560
3988310M =2560
3988410M =2560
3988510M =2560
3988610M =2560
3988710M =2560
3988810M =2560
3988910M =2560
3989010M =2560
3989110M =2560
3989210M =2560
3989310M =2560
3989410M =2560
3989510M =2560
3989610M =2560
3989710M =2560
3989810M =2560
3989910M =2560
3990010M =2560
3990110M =2560
3990210M =2560
3990310M =2560
3990410M =2560
3990510M =2560
3990610M =2560
3990710M =2560
3990810M =2560
3990910M =2560
3991010M =2560
3991110M =2560
3991210M =2560
3991310M =2560
3991410M =2560
3991510M =2560
3991610M =2560
3991710M =2560
3991810M =2560
3991910M =2560
3992010M =2560
3992110M =2560
3992210M =2560
3992310M =2560
3992410M =2560
3992510M =2560
3992610M =2560
3992710M =2560
3992810M =2560
3992910M =2560
3993010M =2560
3993110M =2560
3993210M =2560
3993310M =2560
3993410M =2560
3993510M =2560
3993610M =2560
3993710M =2560
3993810M =2560
3993910M =2560
3994010M =2560
3994110M =2560
3994210M =2560
3994310M =2560
3994410M =2560
3994510M =2560
3994610M =2560
3994710M =2560
3994810M =2560
3994910M =2560
3995010M =2560
3995110M =2560
3995210M =2560
3995310M =2560
3995410M =2560
3995510M =2560
3995610M =2560
3995710M =2560
3995810M =2560
3995910M =2560
3996010M =2560
3996110M =2560
3996210M =2560
3996310M =2560
3996410M =2560
3996510M =2560
3996610M =2560
3996710M =2560
3996810M =2560
3996910M =2560
3997010M =2560
3997110M =2560
3997210M =2560
3997310M =2560
3997410M =2560
3997510M =2560
3997610M =2560
3997710M =2560
3997810M =2560
3997910M =2560
3998010M =2560
3998110M =2560
3998210M =2560
3998310M =2560
3998410M =2560
3998510M =2560
3998610M =2560
3998710M =2560
3998810M =2560
3998910M =2560
3999010M =2560
3999110M =2560
3999210M =2560
3999310M =2560
3999410M =2560
3999510M =2560
3999610M =2560
3999710M =2560
3999810M =2560
3999910M =2560
4000010M =2560
4000110M =2560
4000210M =2560
4000310M =2560
4000410M =2560
4000510M =2560
4000610M =2560
4000710M =2560
4000810M =2560
4000910M =2560
4001010M =2560
4001110M =2560
4001210M =2560
4001310M =2560
4001410M =2560
4001510M =2560
4001610M =2560
4001710M =2560
4001810M =2560
4001910M =2560
4002010M =2560
4002110M =2560
4002210M =2560
4002310M =2560
4002410M =2560
4002510M =2560
4002610M =2560
4002710M =2560
4002810M =2560
4002910M =2560
4003010M =2560
4003110M =2560
4003210M =2560
4003310M =2560
4003410M =2560
4003510M =2560
4003610M =2560
4003710M =2560
4003810M =2560
4003910M =2560
4004010M =2560
4004110M =2560
4004210M =2560
4004310M =2560
4004410M =2560
4004510M =2560
4004610M =2560
4004710M =2560
4004810M =2560
4004910M =2560
4005010M =2560
4005110M =2560
4005210M =2560
4005310M =2560
4005410M =2560
4005510M =2560
4005610M =2560
4005710M =2560
4005810M =2560
4005910M =2560
4006010M =2560
4006110M =2560
4006210M =2560
4006310M =2560
4006410M =2560
4006510M =2560
4006610M =2560
4006710M =2560
4006810M =2560
4006910M =2560
4007010M =2560
4007110M =2560
4007210M =2560
4007310M =2560
4007410M =2560
4007510M =2560
4007610M =2560
4007710M =2560
4007810M =2560
4007910M =2560
4008010M =2560
4008110M =2560
4008210M =2560
4008310M =2560
4008410M =2560
4008510M =2560
4008610M =2560
4008710M =2560
4008810M =2560
4008910M =2560
4009010M =2560
4009110M =2560
4009210M =2560
4009310M =2560
4009410M =2560
4009510M =2560
4009610M =2560
4009710M =2560
4009810M =2560
4009910M =2560
4010010M =2560
4010110M =2560
4010210M =2560
4010310M =2560
4010410M =2560
4010510M =2560
4010610M =2560
4010710M =2560
4010810M =2560
4010910M =2560
4011010M =2560
4011110M =2560
4011210M =2560
4011310M =2560
4011410M =2560
4011510M =2560
4011610M =2560
4011710M =2560
4011810M =2560
4011910M =2560
4012010M =2560
4012110M =2560
4012210M =2560
4012310M =2560
4012410M =2560
4012510M =2560
4012610M =2560
4012710M =2560
4012810M =2560
4012910M =2560
4013010M =2560
4013110M =2560
4013210M =2560
4013310M =2560
4013410M =2560
4013510M =2560
4013610M =2560
4013710M =2560
4013810M =2560
4013910M =2560
4014010M =2560
4014110M =2560
4014210M =2560
4014310M =2560
4014410M =2560
4014510M =2560
4014610M =2560
4014710M =2560
4014810M =2560
4014910M =2560
4015010M =2560
4015110M =2560
4015210M =2560
4015310M =2560
4015410M =2560
4015510M =2560
4015610M =2560
4015710M =2560
4015810M =2560
4015910M =2560
4016010M =2560
4016110M =2560
4016210M =2560
4016310M =2560
4016410M =2560
4016510M =2560
4016610M =2560
4016710M =2560
4016810M =2560
4016910M =2560
4017010M =2560
4017110M =2560
4017210M =2560
4017310M =2560
4017410M =2560
4017510M =2560
4017610M =2560
4017710M =2560
4017810M =2560
4017910M =2560
4018010M =2560
4018110M =2560
4018210M =2560
4018310M =2560
4018410M =2560
4018510M =2560
4018610M =2560
4018710M =2560
4018810M =2560
4018910M =2560
4019010M =2560
4019110M =2560
4019210M =2560
4019310M =2560
4019410M =2560
4019510M =2560
4019610M =2560
4019710M =2560
4019810M =2560
4019910M =2560
4020010M =2560
4020110M =2560
4020210M =2560
4020310M =2560
4020410M =2560
4020510M =2560
4020610M =2560
4020710M =2560
4020810M =2560
4020910M =2560
4021010M =2560
4021110M =2560
4021210M =2560
4021310M =2560
4021410M =2560
4021510M =2560
4021610M =2560
4021710M =2560
4021810M =2560
4021910M =2560
4022010M =2560
4022110M =2560
4022210M =2560
4022310M =2560
4022410M =2560
4022510M =2560
4022610M =2560
4022710M =2560
4022810M =2560
4022910M =2560
4023010M =2560
4023110M =2560
4023210M =2560
4023310M =2560
4023410M =2560
4023510M =2560
4023610M =2560
4023710M =2560
4023810M =2560
4023910M =2560
4024010M =2560
4024110M =2560
4024210M =2560
4024310M =2560
4024410M =2560
4024510M =2560
4024610M =2560
4024710M =2560
4024810M =2560
4024910M =2560
4025010M =2560
4025110M =2560
4025210M =2560
4025310M =2560
4025410M =2560
4025510M =2560
4025610M =2560
4025710M =2560
4025810M =2560
4025910M =2560
4026010M =2560
4026110M =2560
4026210M =2560
4026310M =2560
4026410M =2560
4026510M =2560
4026610M =2560
4026710M =2560
4026810M =2560
4026910M =2560
4027010M =2560
4027110M =2560
4027210M =2560
4027310M =2560
4027410M =2560
4027510M =2560
4027610M =2560
4027710M =2560
4027810M =2560
4027910M =2560
4028010M =2560
4028110M =2560
4028210M =2560
4028310M =2560
4028410M =2560
4028510M =2560
4028610M =2560
4028710M =2560
4028810M =2560
4028910M =2560
4029010M =2560
4029110M =2560
4029210M =2560
4029310M =2560
4029410M =2560
4029510M =2560
4029610M =2560
4029710M =2560
4029810M =2560
4029910M =2560
4030010M =2560
4030110M =2560
4030210M =2560
4030310M =2560
4030410M =2560
4030510M =2560
4030610M =2560
4030710M =2560
4030810M =2560
4030910M =2560
4031010M =2560
4031110M =2560
4031210M =2560
4031310M =2560
4031410M =2560
4031510M =2560
4031610M =2560
4031710M =2560
4031810M =2560
4031910M =2560
4032010M =2560
4032110M =2560
4032210M =2560
4032310M =2560
4032410M =2560
4032510M =2560
4032610M =2560
4032710M =2560
4032810M =2560
4032910M =2560
4033010M =2560
4033110M =2560
4033210M =2560
4033310M =2560
4033410M =2560
4033510M =2560
4033610M =2560
4033710M =2560
4033810M =2560
4033910M =2560
4034010M =2560
4034110M =2560
4034210M =2560
4034310M =2560
4034410M =2560
4034510M =2560
4034610M =2560
4034710M =2560
4034810M =2560
4034910M =2560
4035010M =2560
4035110M =2560
4035210M =2560
4035310M =2560
4035410M =2560
4035510M =2560
4035610M =2560
4035710M =2560
4035810M =2560
4035910M =2560
4036010M =2560
4036110M =2560
4036210M =2560
4036310M =2560
4036410M =2560
4036510M =2560
4036610M =2560
4036710M =2560
4036810M =2560
4036910M =2560
4037010M =2560
4037110M =2560
4037210M =2560
4037310M =2560
4037410M =2560
4037510M =2560
4037610M =2560
4037710M =2560
4037810M =2560
4037910M =2560
4038010M =2560
4038110M =2560
4038210M =2560
4038310M =2560
4038410M =2560
4038510M =2560
4038610M =2560
4038710M =2560
4038810M =2560
4038910M =2560
4039010M =2560
4039110M =2560
4039210M =2560
4039310M =2560
4039410M =2560
4039510M =2560
4039610M =2560
4039710M =2560
4039810M =2560
4039910M =2560
4040010M =2560
4040110M =2560
4040210M =2560
4040310M =2560
4040410M =2560
4040510M =2560
4040610M =2560
4040710M =2560
4040810M =2560
4040910M =2560
4041010M =2560
4041110M =2560
4041210M =2560
4041310M =2560
4041410M =2560
4041510M =2560
4041610M =2560
4041710M =2560
4041810M =2560
4041910M =2560
4042010M =2560
4042110M =2560
4042210M =2560
4042310M =2560
4042410M =2560
4042510M =2560
4042610M =2560
4042710M =2560
4042810M =2560
4042910M =2560
4043010M =2560
4043110M =2560
4043210M =2560
4043310M =2560
4043410M =2560
4043510M =2560
4043610M =2560
4043710M =2560
4043810M =2560
4043910M =2560
4044010M =2560
4044110M =2560
4044210M =2560
4044310M =2560
4044410M =2560
4044510M =2560
4044610M =2560
4044710M =2560
4044810M =2560
4044910M =2560
4045010M =2560
4045110M =2560
4045210M =2560
4045310M =2560
4045410M =2560
4045510M =2560
4045610M =2560
4045710M =2560
4045810M =2560
4045910M =2560
4046010M =2560
4046110M =2560
4046210M =2560
4046310M =2560
4046410M =2560
4046510M =2560
4046610M =2560
4046710M =2560
4046810M =2560
4046910M =2560
4047010M =2560
4047110M =2560
4047210M =2560
4047310M =2560
4047410M =2560
4047510M =2560
4047610M =2560
4047710M =2560
4047810M =2560
4047910M =2560
4048010M =2560
4048110M =2560
4048210M =2560
4048310M =2560
4048410M =2560
4048510M =2560
4048610M =2560
4048710M =2560
4048810M =2560
4048910M =2560
4049010M =2560
4049110M =2560
4049210M =2560
4049310M =2560
4049410M =2560
4049510M =2560
4049610M =2560
4049710M =2560
4049810M =2560
4049910M =2560
4050010M =2560
4050110M =2560
4050210M =2560
4050310M =2560
4050410M =2560
4050510M =2560
4050610M =2560
4050710M =2560
4050810M =2560
4050910M =2560
4051010M =2560
4051110M =2560
4051210M =2560
4051310M =2560
4051410M =2560
4051510M =2560
4051610M =2560
4051710M =2560
4051810M =2560
4051910M =2560
4052010M =2560
4052110M =2560
4052210M =2560
4052310M =2560
4052410M =2560
4052510M =2560
4052610M =2560
4052710M =2560
4052810M =2560
4052910M =2560
4053010M =2560
4053110M =2560
4053210M =2560
4053310M =2560
4053410M =2560
4053510M =2560
4053610M =2560
4053710M =2560
4053810M =2560
4053910M =2560
4054010M =2560
4054110M =2560
4054210M =2560
4054310M =2560
4054410M =2560
4054510M =2560
4054610M =2560
4054710M =2560
4054810M =2560
4054910M =2560
4055010M =2560
4055110M =2560
4055210M =2560
4055310M =2560
4055410M =2560
4055510M =2560
4055610M =2560
4055710M =2560
4055810M =2560
4055910M =2560
4056010M =2560
4056110M =2560
4056210M =2560
4056310M =2560
4056410M =2560
4056510M =2560
4056610M =2560
4056710M =2560
4056810M =2560
4056910M =2560
4057010M =2560
4057110M =2560
40572_ATEOF
40573
40574genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77
40575tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print $3, $(NF) }'
40576)
40577) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40578at_status=$? at_failed=false
40579$at_check_filter
40580at_fn_diff_devnull "$at_stderr" || at_failed=:
40581echo >>"$at_stdout"; $as_echo "20961034240 BIGFILE
40582" | \
40583  $at_diff - "$at_stdout" || at_failed=:
40584at_fn_check_status 0 $at_status "$at_srcdir/sparse05.at:31"
40585$at_failed && at_fn_log_failure
40586$at_traceon; }
40587
40588
40589
40590
40591  set +x
40592  $at_times_p && times >"$at_times_file"
40593) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40594read at_status <"$at_status_file"
40595#AT_STOP_169
40596#AT_START_170
40597at_fn_group_banner 170 'sparse06.at:21' \
40598  "storing sparse file using seek method" "          " 25
40599at_xfail=no
40600      test -f $XFAILFILE && at_xfail=yes
40601(
40602  $as_echo "170. $at_setup_line: testing $at_desc ..."
40603  $at_traceon
40604
40605
40606
40607
40608
40609
40610
40611  { set +x
40612$as_echo "$at_srcdir/sparse06.at:32:
40613mkdir posix
40614(cd posix
40615TEST_TAR_FORMAT=posix
40616export TEST_TAR_FORMAT
40617TAR_OPTIONS=\"-H posix\"
40618export TAR_OPTIONS
40619rm -rf *
40620
40621
40622checkseekhole || exit 77
40623
40624
40625TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=seek\"
40626genfile --sparse --file bigsparse 0 ABC 8G DEF || exit 77
40627tar -cSf a bigsparse
40628test \$? -eq 0 || exit 1
40629
40630
40631rm -rf out archive.tar smallsparse && mkdir out
40632genfile --sparse --quiet --file smallsparse 0 ABC || exit 77
40633tar -cSf archive.tar smallsparse
40634tar -xf archive.tar -C out
40635cmp smallsparse out/smallsparse
40636
40637
40638rm -rf out archive.tar smallsparse && mkdir out
40639genfile --sparse --quiet --file smallsparse 0 ABC 10M || exit 77
40640tar -cSf archive.tar smallsparse
40641tar -xf archive.tar -C out
40642cmp smallsparse out/smallsparse
40643
40644
40645rm -rf out archive.tar smallsparse && mkdir out
40646genfile --sparse --quiet --file smallsparse 0 ABC 10M DEF || exit 77
40647tar -cSf archive.tar smallsparse
40648tar -xf archive.tar -C out
40649cmp smallsparse out/smallsparse
40650
40651
40652
40653rm -rf out archive.tar smallsparse && mkdir out
40654genfile --sparse --quiet --file smallsparse 10M || exit 77
40655tar -cSf archive.tar smallsparse
40656tar -xf archive.tar -C out
40657cmp smallsparse out/smallsparse
40658
40659
40660rm -rf out archive.tar smallsparse && mkdir out
40661genfile --sparse --quiet --file smallsparse 10M ABC || exit 77
40662tar -cSf archive.tar smallsparse
40663tar -xf archive.tar -C out
40664cmp smallsparse out/smallsparse
40665
40666
40667rm -rf out archive.tar smallsparse && mkdir out
40668genfile --sparse --quiet --file smallsparse 10M ABC 20M || exit 77
40669tar -cSf archive.tar smallsparse
40670tar -xf archive.tar -C out
40671cmp smallsparse out/smallsparse
40672
40673
40674
40675rm -rf out archive.tar smallsparse && mkdir out
40676genfile --sparse --quiet --file smallsparse 10M DEF 20M GHI 30M JKL 40M || exit 77
40677tar -cSf archive.tar smallsparse
40678tar -xf archive.tar -C out
40679cmp smallsparse out/smallsparse
40680
40681
40682)"
40683at_fn_check_prepare_notrace 'an embedded newline' "sparse06.at:32"
40684( $at_check_trace;
40685mkdir posix
40686(cd posix
40687TEST_TAR_FORMAT=posix
40688export TEST_TAR_FORMAT
40689TAR_OPTIONS="-H posix"
40690export TAR_OPTIONS
40691rm -rf *
40692
40693
40694checkseekhole || exit 77
40695
40696
40697TAR_OPTIONS="$TAR_OPTIONS --hole-detection=seek"
40698genfile --sparse --file bigsparse 0 ABC 8G DEF || exit 77
40699tar -cSf a bigsparse
40700test $? -eq 0 || exit 1
40701
40702
40703rm -rf out archive.tar smallsparse && mkdir out
40704genfile --sparse --quiet --file smallsparse 0 ABC || exit 77
40705tar -cSf archive.tar smallsparse
40706tar -xf archive.tar -C out
40707cmp smallsparse out/smallsparse
40708
40709
40710rm -rf out archive.tar smallsparse && mkdir out
40711genfile --sparse --quiet --file smallsparse 0 ABC 10M || exit 77
40712tar -cSf archive.tar smallsparse
40713tar -xf archive.tar -C out
40714cmp smallsparse out/smallsparse
40715
40716
40717rm -rf out archive.tar smallsparse && mkdir out
40718genfile --sparse --quiet --file smallsparse 0 ABC 10M DEF || exit 77
40719tar -cSf archive.tar smallsparse
40720tar -xf archive.tar -C out
40721cmp smallsparse out/smallsparse
40722
40723
40724
40725rm -rf out archive.tar smallsparse && mkdir out
40726genfile --sparse --quiet --file smallsparse 10M || exit 77
40727tar -cSf archive.tar smallsparse
40728tar -xf archive.tar -C out
40729cmp smallsparse out/smallsparse
40730
40731
40732rm -rf out archive.tar smallsparse && mkdir out
40733genfile --sparse --quiet --file smallsparse 10M ABC || exit 77
40734tar -cSf archive.tar smallsparse
40735tar -xf archive.tar -C out
40736cmp smallsparse out/smallsparse
40737
40738
40739rm -rf out archive.tar smallsparse && mkdir out
40740genfile --sparse --quiet --file smallsparse 10M ABC 20M || exit 77
40741tar -cSf archive.tar smallsparse
40742tar -xf archive.tar -C out
40743cmp smallsparse out/smallsparse
40744
40745
40746
40747rm -rf out archive.tar smallsparse && mkdir out
40748genfile --sparse --quiet --file smallsparse 10M DEF 20M GHI 30M JKL 40M || exit 77
40749tar -cSf archive.tar smallsparse
40750tar -xf archive.tar -C out
40751cmp smallsparse out/smallsparse
40752
40753
40754)
40755) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40756at_status=$? at_failed=false
40757$at_check_filter
40758at_fn_diff_devnull "$at_stderr" || at_failed=:
40759at_fn_diff_devnull "$at_stdout" || at_failed=:
40760at_fn_check_status 0 $at_status "$at_srcdir/sparse06.at:32"
40761$at_failed && at_fn_log_failure
40762$at_traceon; }
40763
40764
40765
40766
40767  set +x
40768  $at_times_p && times >"$at_times_file"
40769) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40770read at_status <"$at_status_file"
40771#AT_STOP_170
40772#AT_START_171
40773at_fn_group_banner 171 'sparse07.at:21' \
40774  "sparse files with unicode names" "                " 25
40775at_xfail=no
40776      test -f $XFAILFILE && at_xfail=yes
40777(
40778  $as_echo "171. $at_setup_line: testing $at_desc ..."
40779  $at_traceon
40780
40781
40782
40783
40784
40785  { set +x
40786$as_echo "$at_srcdir/sparse07.at:24:
40787mkdir posix
40788(cd posix
40789TEST_TAR_FORMAT=posix
40790export TEST_TAR_FORMAT
40791TAR_OPTIONS=\"-H posix\"
40792export TAR_OPTIONS
40793rm -rf *
40794
40795genfile --sparse --file žluť --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
40796tar -c -f archive --sparse žluť || exit 1
40797
40798tar tf archive
40799)"
40800at_fn_check_prepare_notrace 'an embedded newline' "sparse07.at:24"
40801( $at_check_trace;
40802mkdir posix
40803(cd posix
40804TEST_TAR_FORMAT=posix
40805export TEST_TAR_FORMAT
40806TAR_OPTIONS="-H posix"
40807export TAR_OPTIONS
40808rm -rf *
40809
40810genfile --sparse --file žluť --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
40811tar -c -f archive --sparse žluť || exit 1
40812
40813tar tf archive
40814)
40815) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40816at_status=$? at_failed=false
40817$at_check_filter
40818at_fn_diff_devnull "$at_stderr" || at_failed=:
40819echo >>"$at_stdout"; $as_echo "\\305\\276lu\\305\\245
40820" | \
40821  $at_diff - "$at_stdout" || at_failed=:
40822at_fn_check_status 0 $at_status "$at_srcdir/sparse07.at:24"
40823$at_failed && at_fn_log_failure
40824$at_traceon; }
40825
40826              { set +x
40827$as_echo "$at_srcdir/sparse07.at:24:
40828mkdir gnu
40829(cd gnu
40830TEST_TAR_FORMAT=gnu
40831export TEST_TAR_FORMAT
40832TAR_OPTIONS=\"-H gnu\"
40833export TAR_OPTIONS
40834rm -rf *
40835
40836genfile --sparse --file žluť --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
40837tar -c -f archive --sparse žluť || exit 1
40838
40839tar tf archive
40840)"
40841at_fn_check_prepare_notrace 'an embedded newline' "sparse07.at:24"
40842( $at_check_trace;
40843mkdir gnu
40844(cd gnu
40845TEST_TAR_FORMAT=gnu
40846export TEST_TAR_FORMAT
40847TAR_OPTIONS="-H gnu"
40848export TAR_OPTIONS
40849rm -rf *
40850
40851genfile --sparse --file žluť --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
40852tar -c -f archive --sparse žluť || exit 1
40853
40854tar tf archive
40855)
40856) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40857at_status=$? at_failed=false
40858$at_check_filter
40859at_fn_diff_devnull "$at_stderr" || at_failed=:
40860echo >>"$at_stdout"; $as_echo "\\305\\276lu\\305\\245
40861" | \
40862  $at_diff - "$at_stdout" || at_failed=:
40863at_fn_check_status 0 $at_status "$at_srcdir/sparse07.at:24"
40864$at_failed && at_fn_log_failure
40865$at_traceon; }
40866
40867              { set +x
40868$as_echo "$at_srcdir/sparse07.at:24:
40869mkdir oldgnu
40870(cd oldgnu
40871TEST_TAR_FORMAT=oldgnu
40872export TEST_TAR_FORMAT
40873TAR_OPTIONS=\"-H oldgnu\"
40874export TAR_OPTIONS
40875rm -rf *
40876
40877genfile --sparse --file žluť --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
40878tar -c -f archive --sparse žluť || exit 1
40879
40880tar tf archive
40881)"
40882at_fn_check_prepare_notrace 'an embedded newline' "sparse07.at:24"
40883( $at_check_trace;
40884mkdir oldgnu
40885(cd oldgnu
40886TEST_TAR_FORMAT=oldgnu
40887export TEST_TAR_FORMAT
40888TAR_OPTIONS="-H oldgnu"
40889export TAR_OPTIONS
40890rm -rf *
40891
40892genfile --sparse --file žluť --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
40893tar -c -f archive --sparse žluť || exit 1
40894
40895tar tf archive
40896)
40897) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40898at_status=$? at_failed=false
40899$at_check_filter
40900at_fn_diff_devnull "$at_stderr" || at_failed=:
40901echo >>"$at_stdout"; $as_echo "\\305\\276lu\\305\\245
40902" | \
40903  $at_diff - "$at_stdout" || at_failed=:
40904at_fn_check_status 0 $at_status "$at_srcdir/sparse07.at:24"
40905$at_failed && at_fn_log_failure
40906$at_traceon; }
40907
40908
40909
40910
40911  set +x
40912  $at_times_p && times >"$at_times_file"
40913) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40914read at_status <"$at_status_file"
40915#AT_STOP_171
40916#AT_START_172
40917at_fn_group_banner 172 'sparsemv.at:21' \
40918  "sparse files in MV archives" "                    " 25
40919at_xfail=no
40920      test -f $XFAILFILE && at_xfail=yes
40921(
40922  $as_echo "172. $at_setup_line: testing $at_desc ..."
40923  $at_traceon
40924
40925
40926
40927# Check if sparse files are correctly split between GNU multi-volume
40928# archives.
40929# There are two cases: the file can be split within an empty (null) block,
40930# or within a data block. Since null blocks are not archived, the first
40931# case means the file is split between two consecutive data blocks.
40932#
40933
40934
40935
40936  { set +x
40937$as_echo "$at_srcdir/sparsemv.at:31:
40938mkdir gnu
40939(cd gnu
40940TEST_TAR_FORMAT=gnu
40941export TEST_TAR_FORMAT
40942TAR_OPTIONS=\"-H gnu\"
40943export TAR_OPTIONS
40944rm -rf *
40945
40946exec <&-
40947TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
40948genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
40949echo \"Pass 1: Split between data blocks\"
40950echo \"Create archive\"
40951tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
40952echo \"Test archive\"
40953tar --record-size=512 -t -M -f arc.1 -f arc.2
40954echo \"Compare archive\"
40955tar --record-size=512 -d -M -f arc.1 -f arc.2
40956
40957echo \"Pass 2: Split within a data block\"
40958genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
40959echo \"Create archive\"
40960tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
40961echo \"Test archive\"
40962tar --record-size=512 -t -M -f arc.1 -f arc.2
40963echo \"Compare archive\"
40964tar --record-size=512 -d -M -f arc.1 -f arc.2
40965)"
40966at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
40967( $at_check_trace;
40968mkdir gnu
40969(cd gnu
40970TEST_TAR_FORMAT=gnu
40971export TEST_TAR_FORMAT
40972TAR_OPTIONS="-H gnu"
40973export TAR_OPTIONS
40974rm -rf *
40975
40976exec <&-
40977TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
40978genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
40979echo "Pass 1: Split between data blocks"
40980echo "Create archive"
40981tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
40982echo "Test archive"
40983tar --record-size=512 -t -M -f arc.1 -f arc.2
40984echo "Compare archive"
40985tar --record-size=512 -d -M -f arc.1 -f arc.2
40986
40987echo "Pass 2: Split within a data block"
40988genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
40989echo "Create archive"
40990tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
40991echo "Test archive"
40992tar --record-size=512 -t -M -f arc.1 -f arc.2
40993echo "Compare archive"
40994tar --record-size=512 -d -M -f arc.1 -f arc.2
40995)
40996) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40997at_status=$? at_failed=false
40998$at_check_filter
40999at_fn_diff_devnull "$at_stderr" || at_failed=:
41000echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
41001Create archive
41002Test archive
41003sparsefile
41004Compare archive
41005Pass 2: Split within a data block
41006Create archive
41007Test archive
41008sparsefile
41009Compare archive
41010" | \
41011  $at_diff - "$at_stdout" || at_failed=:
41012at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
41013$at_failed && at_fn_log_failure
41014$at_traceon; }
41015
41016              { set +x
41017$as_echo "$at_srcdir/sparsemv.at:31:
41018mkdir oldgnu
41019(cd oldgnu
41020TEST_TAR_FORMAT=oldgnu
41021export TEST_TAR_FORMAT
41022TAR_OPTIONS=\"-H oldgnu\"
41023export TAR_OPTIONS
41024rm -rf *
41025
41026exec <&-
41027TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
41028genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
41029echo \"Pass 1: Split between data blocks\"
41030echo \"Create archive\"
41031tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
41032echo \"Test archive\"
41033tar --record-size=512 -t -M -f arc.1 -f arc.2
41034echo \"Compare archive\"
41035tar --record-size=512 -d -M -f arc.1 -f arc.2
41036
41037echo \"Pass 2: Split within a data block\"
41038genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
41039echo \"Create archive\"
41040tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
41041echo \"Test archive\"
41042tar --record-size=512 -t -M -f arc.1 -f arc.2
41043echo \"Compare archive\"
41044tar --record-size=512 -d -M -f arc.1 -f arc.2
41045)"
41046at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
41047( $at_check_trace;
41048mkdir oldgnu
41049(cd oldgnu
41050TEST_TAR_FORMAT=oldgnu
41051export TEST_TAR_FORMAT
41052TAR_OPTIONS="-H oldgnu"
41053export TAR_OPTIONS
41054rm -rf *
41055
41056exec <&-
41057TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
41058genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
41059echo "Pass 1: Split between data blocks"
41060echo "Create archive"
41061tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
41062echo "Test archive"
41063tar --record-size=512 -t -M -f arc.1 -f arc.2
41064echo "Compare archive"
41065tar --record-size=512 -d -M -f arc.1 -f arc.2
41066
41067echo "Pass 2: Split within a data block"
41068genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
41069echo "Create archive"
41070tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
41071echo "Test archive"
41072tar --record-size=512 -t -M -f arc.1 -f arc.2
41073echo "Compare archive"
41074tar --record-size=512 -d -M -f arc.1 -f arc.2
41075)
41076) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41077at_status=$? at_failed=false
41078$at_check_filter
41079at_fn_diff_devnull "$at_stderr" || at_failed=:
41080echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
41081Create archive
41082Test archive
41083sparsefile
41084Compare archive
41085Pass 2: Split within a data block
41086Create archive
41087Test archive
41088sparsefile
41089Compare archive
41090" | \
41091  $at_diff - "$at_stdout" || at_failed=:
41092at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
41093$at_failed && at_fn_log_failure
41094$at_traceon; }
41095
41096
41097
41098
41099  set +x
41100  $at_times_p && times >"$at_times_file"
41101) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41102read at_status <"$at_status_file"
41103#AT_STOP_172
41104#AT_START_173
41105at_fn_group_banner 173 'spmvp00.at:21' \
41106  "sparse files in PAX MV archives, v.0.0" "         " 25
41107at_xfail=no
41108      test -f $XFAILFILE && at_xfail=yes
41109(
41110  $as_echo "173. $at_setup_line: testing $at_desc ..."
41111  $at_traceon
41112
41113
41114
41115
41116
41117
41118  { set +x
41119$as_echo "$at_srcdir/spmvp00.at:24:
41120mkdir pax
41121(cd pax
41122TEST_TAR_FORMAT=pax
41123export TEST_TAR_FORMAT
41124TAR_OPTIONS=\"-H pax\"
41125export TAR_OPTIONS
41126rm -rf *
41127
41128exec <&-
41129TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
41130genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
41131echo \"Pass 1: Split between data blocks\"
41132echo \"Create archive\"
41133tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41134echo \"Test archive\"
41135tar -t -M -f arc.1 -f arc.2 -f arc.3
41136echo \"Compare archive\"
41137tar -d -M -f arc.1 -f arc.2 -f arc.3
41138
41139echo \"Pass 2: Split within a data block\"
41140genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
41141echo \"Create archive\"
41142tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41143echo \"Test archive\"
41144tar -t -M -f arc.1 -f arc.2 -f arc.3
41145echo \"Compare archive\"
41146tar -d -M -f arc.1 -f arc.2 -f arc.3
41147)"
41148at_fn_check_prepare_notrace 'an embedded newline' "spmvp00.at:24"
41149( $at_check_trace;
41150mkdir pax
41151(cd pax
41152TEST_TAR_FORMAT=pax
41153export TEST_TAR_FORMAT
41154TAR_OPTIONS="-H pax"
41155export TAR_OPTIONS
41156rm -rf *
41157
41158exec <&-
41159TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
41160genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
41161echo "Pass 1: Split between data blocks"
41162echo "Create archive"
41163tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41164echo "Test archive"
41165tar -t -M -f arc.1 -f arc.2 -f arc.3
41166echo "Compare archive"
41167tar -d -M -f arc.1 -f arc.2 -f arc.3
41168
41169echo "Pass 2: Split within a data block"
41170genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
41171echo "Create archive"
41172tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41173echo "Test archive"
41174tar -t -M -f arc.1 -f arc.2 -f arc.3
41175echo "Compare archive"
41176tar -d -M -f arc.1 -f arc.2 -f arc.3
41177)
41178) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41179at_status=$? at_failed=false
41180$at_check_filter
41181at_fn_diff_devnull "$at_stderr" || at_failed=:
41182echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
41183Create archive
41184Test archive
41185sparsefile
41186Compare archive
41187Pass 2: Split within a data block
41188Create archive
41189Test archive
41190sparsefile
41191Compare archive
41192" | \
41193  $at_diff - "$at_stdout" || at_failed=:
41194at_fn_check_status 0 $at_status "$at_srcdir/spmvp00.at:24"
41195$at_failed && at_fn_log_failure
41196$at_traceon; }
41197
41198
41199
41200
41201  set +x
41202  $at_times_p && times >"$at_times_file"
41203) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41204read at_status <"$at_status_file"
41205#AT_STOP_173
41206#AT_START_174
41207at_fn_group_banner 174 'spmvp01.at:21' \
41208  "sparse files in PAX MV archives, v.0.1" "         " 25
41209at_xfail=no
41210      test -f $XFAILFILE && at_xfail=yes
41211(
41212  $as_echo "174. $at_setup_line: testing $at_desc ..."
41213  $at_traceon
41214
41215
41216
41217
41218
41219
41220  { set +x
41221$as_echo "$at_srcdir/spmvp01.at:24:
41222mkdir pax
41223(cd pax
41224TEST_TAR_FORMAT=pax
41225export TEST_TAR_FORMAT
41226TAR_OPTIONS=\"-H pax\"
41227export TAR_OPTIONS
41228rm -rf *
41229
41230exec <&-
41231TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
41232genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
41233echo \"Pass 1: Split between data blocks\"
41234echo \"Create archive\"
41235tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41236echo \"Test archive\"
41237tar -t -M -f arc.1 -f arc.2 -f arc.3
41238echo \"Compare archive\"
41239tar -d -M -f arc.1 -f arc.2 -f arc.3
41240
41241echo \"Pass 2: Split within a data block\"
41242genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
41243echo \"Create archive\"
41244tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41245echo \"Test archive\"
41246tar -t -M -f arc.1 -f arc.2 -f arc.3
41247echo \"Compare archive\"
41248tar -d -M -f arc.1 -f arc.2 -f arc.3
41249)"
41250at_fn_check_prepare_notrace 'an embedded newline' "spmvp01.at:24"
41251( $at_check_trace;
41252mkdir pax
41253(cd pax
41254TEST_TAR_FORMAT=pax
41255export TEST_TAR_FORMAT
41256TAR_OPTIONS="-H pax"
41257export TAR_OPTIONS
41258rm -rf *
41259
41260exec <&-
41261TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
41262genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
41263echo "Pass 1: Split between data blocks"
41264echo "Create archive"
41265tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41266echo "Test archive"
41267tar -t -M -f arc.1 -f arc.2 -f arc.3
41268echo "Compare archive"
41269tar -d -M -f arc.1 -f arc.2 -f arc.3
41270
41271echo "Pass 2: Split within a data block"
41272genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
41273echo "Create archive"
41274tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41275echo "Test archive"
41276tar -t -M -f arc.1 -f arc.2 -f arc.3
41277echo "Compare archive"
41278tar -d -M -f arc.1 -f arc.2 -f arc.3
41279)
41280) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41281at_status=$? at_failed=false
41282$at_check_filter
41283at_fn_diff_devnull "$at_stderr" || at_failed=:
41284echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
41285Create archive
41286Test archive
41287sparsefile
41288Compare archive
41289Pass 2: Split within a data block
41290Create archive
41291Test archive
41292sparsefile
41293Compare archive
41294" | \
41295  $at_diff - "$at_stdout" || at_failed=:
41296at_fn_check_status 0 $at_status "$at_srcdir/spmvp01.at:24"
41297$at_failed && at_fn_log_failure
41298$at_traceon; }
41299
41300
41301
41302
41303  set +x
41304  $at_times_p && times >"$at_times_file"
41305) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41306read at_status <"$at_status_file"
41307#AT_STOP_174
41308#AT_START_175
41309at_fn_group_banner 175 'spmvp10.at:21' \
41310  "sparse files in PAX MV archives, v.1.0" "         " 25
41311at_xfail=no
41312      test -f $XFAILFILE && at_xfail=yes
41313(
41314  $as_echo "175. $at_setup_line: testing $at_desc ..."
41315  $at_traceon
41316
41317
41318
41319
41320
41321
41322  { set +x
41323$as_echo "$at_srcdir/spmvp10.at:24:
41324mkdir pax
41325(cd pax
41326TEST_TAR_FORMAT=pax
41327export TEST_TAR_FORMAT
41328TAR_OPTIONS=\"-H pax\"
41329export TAR_OPTIONS
41330rm -rf *
41331
41332exec <&-
41333TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
41334genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
41335echo \"Pass 1: Split between data blocks\"
41336echo \"Create archive\"
41337tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41338echo \"Test archive\"
41339tar -t -M -f arc.1 -f arc.2 -f arc.3
41340echo \"Compare archive\"
41341tar -d -M -f arc.1 -f arc.2 -f arc.3
41342
41343echo \"Pass 2: Split within a data block\"
41344genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
41345echo \"Create archive\"
41346tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41347echo \"Test archive\"
41348tar -t -M -f arc.1 -f arc.2 -f arc.3
41349echo \"Compare archive\"
41350tar -d -M -f arc.1 -f arc.2 -f arc.3
41351)"
41352at_fn_check_prepare_notrace 'an embedded newline' "spmvp10.at:24"
41353( $at_check_trace;
41354mkdir pax
41355(cd pax
41356TEST_TAR_FORMAT=pax
41357export TEST_TAR_FORMAT
41358TAR_OPTIONS="-H pax"
41359export TAR_OPTIONS
41360rm -rf *
41361
41362exec <&-
41363TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
41364genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
41365echo "Pass 1: Split between data blocks"
41366echo "Create archive"
41367tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41368echo "Test archive"
41369tar -t -M -f arc.1 -f arc.2 -f arc.3
41370echo "Compare archive"
41371tar -d -M -f arc.1 -f arc.2 -f arc.3
41372
41373echo "Pass 2: Split within a data block"
41374genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
41375echo "Create archive"
41376tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
41377echo "Test archive"
41378tar -t -M -f arc.1 -f arc.2 -f arc.3
41379echo "Compare archive"
41380tar -d -M -f arc.1 -f arc.2 -f arc.3
41381)
41382) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41383at_status=$? at_failed=false
41384$at_check_filter
41385at_fn_diff_devnull "$at_stderr" || at_failed=:
41386echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
41387Create archive
41388Test archive
41389sparsefile
41390Compare archive
41391Pass 2: Split within a data block
41392Create archive
41393Test archive
41394sparsefile
41395Compare archive
41396" | \
41397  $at_diff - "$at_stdout" || at_failed=:
41398at_fn_check_status 0 $at_status "$at_srcdir/spmvp10.at:24"
41399$at_failed && at_fn_log_failure
41400$at_traceon; }
41401
41402
41403
41404
41405  set +x
41406  $at_times_p && times >"$at_times_file"
41407) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41408read at_status <"$at_status_file"
41409#AT_STOP_175
41410#AT_START_176
41411at_fn_group_banner 176 'sptrcreat.at:33' \
41412  "sparse file truncated while archiving" "          " 25
41413at_xfail=no
41414      test -f $XFAILFILE && at_xfail=yes
41415(
41416  $as_echo "176. $at_setup_line: testing $at_desc ..."
41417  $at_traceon
41418
41419
41420
41421
41422
41423  { set +x
41424$as_echo "$at_srcdir/sptrcreat.at:36:
41425mkdir posix
41426(cd posix
41427TEST_TAR_FORMAT=posix
41428export TEST_TAR_FORMAT
41429TAR_OPTIONS=\"-H posix\"
41430export TAR_OPTIONS
41431rm -rf *
41432
41433genfile --sparse --block-size=1024 --file foo \\
41434  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41435genfile --file baz
41436genfile --run --checkpoint 3 --length 200m --truncate foo -- \\
41437 tar --sparse -vcf bar foo baz
41438echo Exit status: \$?
41439echo separator
41440genfile --file foo --seek 200m --length 11575296 --pattern=zeros
41441tar dvf bar | sed '/foo: Mod time differs/d')"
41442at_fn_check_prepare_notrace 'an embedded newline' "sptrcreat.at:36"
41443( $at_check_trace;
41444mkdir posix
41445(cd posix
41446TEST_TAR_FORMAT=posix
41447export TEST_TAR_FORMAT
41448TAR_OPTIONS="-H posix"
41449export TAR_OPTIONS
41450rm -rf *
41451
41452genfile --sparse --block-size=1024 --file foo \
41453  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41454genfile --file baz
41455genfile --run --checkpoint 3 --length 200m --truncate foo -- \
41456 tar --sparse -vcf bar foo baz
41457echo Exit status: $?
41458echo separator
41459genfile --file foo --seek 200m --length 11575296 --pattern=zeros
41460tar dvf bar | sed '/foo: Mod time differs/d')
41461) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41462at_status=$? at_failed=false
41463$at_check_filter
41464echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 11575296 bytes; padding with zeros
41465" | \
41466  $at_diff - "$at_stderr" || at_failed=:
41467echo >>"$at_stdout"; $as_echo "foo
41468baz
41469Exit status: 1
41470separator
41471foo
41472baz
41473" | \
41474  $at_diff - "$at_stdout" || at_failed=:
41475at_fn_check_status 0 $at_status "$at_srcdir/sptrcreat.at:36"
41476$at_failed && at_fn_log_failure
41477$at_traceon; }
41478
41479              { set +x
41480$as_echo "$at_srcdir/sptrcreat.at:36:
41481mkdir gnu
41482(cd gnu
41483TEST_TAR_FORMAT=gnu
41484export TEST_TAR_FORMAT
41485TAR_OPTIONS=\"-H gnu\"
41486export TAR_OPTIONS
41487rm -rf *
41488
41489genfile --sparse --block-size=1024 --file foo \\
41490  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41491genfile --file baz
41492genfile --run --checkpoint 3 --length 200m --truncate foo -- \\
41493 tar --sparse -vcf bar foo baz
41494echo Exit status: \$?
41495echo separator
41496genfile --file foo --seek 200m --length 11575296 --pattern=zeros
41497tar dvf bar | sed '/foo: Mod time differs/d')"
41498at_fn_check_prepare_notrace 'an embedded newline' "sptrcreat.at:36"
41499( $at_check_trace;
41500mkdir gnu
41501(cd gnu
41502TEST_TAR_FORMAT=gnu
41503export TEST_TAR_FORMAT
41504TAR_OPTIONS="-H gnu"
41505export TAR_OPTIONS
41506rm -rf *
41507
41508genfile --sparse --block-size=1024 --file foo \
41509  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41510genfile --file baz
41511genfile --run --checkpoint 3 --length 200m --truncate foo -- \
41512 tar --sparse -vcf bar foo baz
41513echo Exit status: $?
41514echo separator
41515genfile --file foo --seek 200m --length 11575296 --pattern=zeros
41516tar dvf bar | sed '/foo: Mod time differs/d')
41517) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41518at_status=$? at_failed=false
41519$at_check_filter
41520echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 11575296 bytes; padding with zeros
41521" | \
41522  $at_diff - "$at_stderr" || at_failed=:
41523echo >>"$at_stdout"; $as_echo "foo
41524baz
41525Exit status: 1
41526separator
41527foo
41528baz
41529" | \
41530  $at_diff - "$at_stdout" || at_failed=:
41531at_fn_check_status 0 $at_status "$at_srcdir/sptrcreat.at:36"
41532$at_failed && at_fn_log_failure
41533$at_traceon; }
41534
41535              { set +x
41536$as_echo "$at_srcdir/sptrcreat.at:36:
41537mkdir oldgnu
41538(cd oldgnu
41539TEST_TAR_FORMAT=oldgnu
41540export TEST_TAR_FORMAT
41541TAR_OPTIONS=\"-H oldgnu\"
41542export TAR_OPTIONS
41543rm -rf *
41544
41545genfile --sparse --block-size=1024 --file foo \\
41546  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41547genfile --file baz
41548genfile --run --checkpoint 3 --length 200m --truncate foo -- \\
41549 tar --sparse -vcf bar foo baz
41550echo Exit status: \$?
41551echo separator
41552genfile --file foo --seek 200m --length 11575296 --pattern=zeros
41553tar dvf bar | sed '/foo: Mod time differs/d')"
41554at_fn_check_prepare_notrace 'an embedded newline' "sptrcreat.at:36"
41555( $at_check_trace;
41556mkdir oldgnu
41557(cd oldgnu
41558TEST_TAR_FORMAT=oldgnu
41559export TEST_TAR_FORMAT
41560TAR_OPTIONS="-H oldgnu"
41561export TAR_OPTIONS
41562rm -rf *
41563
41564genfile --sparse --block-size=1024 --file foo \
41565  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41566genfile --file baz
41567genfile --run --checkpoint 3 --length 200m --truncate foo -- \
41568 tar --sparse -vcf bar foo baz
41569echo Exit status: $?
41570echo separator
41571genfile --file foo --seek 200m --length 11575296 --pattern=zeros
41572tar dvf bar | sed '/foo: Mod time differs/d')
41573) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41574at_status=$? at_failed=false
41575$at_check_filter
41576echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 11575296 bytes; padding with zeros
41577" | \
41578  $at_diff - "$at_stderr" || at_failed=:
41579echo >>"$at_stdout"; $as_echo "foo
41580baz
41581Exit status: 1
41582separator
41583foo
41584baz
41585" | \
41586  $at_diff - "$at_stdout" || at_failed=:
41587at_fn_check_status 0 $at_status "$at_srcdir/sptrcreat.at:36"
41588$at_failed && at_fn_log_failure
41589$at_traceon; }
41590
41591
41592
41593
41594  set +x
41595  $at_times_p && times >"$at_times_file"
41596) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41597read at_status <"$at_status_file"
41598#AT_STOP_176
41599#AT_START_177
41600at_fn_group_banner 177 'sptrdiff00.at:26' \
41601  "file truncated in sparse region while comparing" "" 25
41602at_xfail=no
41603      test -f $XFAILFILE && at_xfail=yes
41604(
41605  $as_echo "177. $at_setup_line: testing $at_desc ..."
41606  $at_traceon
41607
41608
41609
41610# This triggers short read in check_sparse_region.
41611
41612
41613  { set +x
41614$as_echo "$at_srcdir/sptrdiff00.at:30:
41615mkdir posix
41616(cd posix
41617TEST_TAR_FORMAT=posix
41618export TEST_TAR_FORMAT
41619TAR_OPTIONS=\"-H posix\"
41620export TAR_OPTIONS
41621rm -rf *
41622
41623genfile --sparse --block-size=1024 --file foo \\
41624  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41625genfile --file baz
41626echo creating
41627tar --sparse -vcf bar foo baz
41628echo comparing
41629genfile --run --checkpoint 3 --length 200m --truncate foo -- \\
41630 tar --sparse -vdf bar
41631)"
41632at_fn_check_prepare_notrace 'an embedded newline' "sptrdiff00.at:30"
41633( $at_check_trace;
41634mkdir posix
41635(cd posix
41636TEST_TAR_FORMAT=posix
41637export TEST_TAR_FORMAT
41638TAR_OPTIONS="-H posix"
41639export TAR_OPTIONS
41640rm -rf *
41641
41642genfile --sparse --block-size=1024 --file foo \
41643  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41644genfile --file baz
41645echo creating
41646tar --sparse -vcf bar foo baz
41647echo comparing
41648genfile --run --checkpoint 3 --length 200m --truncate foo -- \
41649 tar --sparse -vdf bar
41650)
41651) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41652at_status=$? at_failed=false
41653$at_check_filter
41654at_fn_diff_devnull "$at_stderr" || at_failed=:
41655echo >>"$at_stdout"; $as_echo "creating
41656foo
41657baz
41658comparing
41659foo
41660foo: Size differs
41661baz
41662" | \
41663  $at_diff - "$at_stdout" || at_failed=:
41664at_fn_check_status 1 $at_status "$at_srcdir/sptrdiff00.at:30"
41665$at_failed && at_fn_log_failure
41666$at_traceon; }
41667
41668              { set +x
41669$as_echo "$at_srcdir/sptrdiff00.at:30:
41670mkdir gnu
41671(cd gnu
41672TEST_TAR_FORMAT=gnu
41673export TEST_TAR_FORMAT
41674TAR_OPTIONS=\"-H gnu\"
41675export TAR_OPTIONS
41676rm -rf *
41677
41678genfile --sparse --block-size=1024 --file foo \\
41679  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41680genfile --file baz
41681echo creating
41682tar --sparse -vcf bar foo baz
41683echo comparing
41684genfile --run --checkpoint 3 --length 200m --truncate foo -- \\
41685 tar --sparse -vdf bar
41686)"
41687at_fn_check_prepare_notrace 'an embedded newline' "sptrdiff00.at:30"
41688( $at_check_trace;
41689mkdir gnu
41690(cd gnu
41691TEST_TAR_FORMAT=gnu
41692export TEST_TAR_FORMAT
41693TAR_OPTIONS="-H gnu"
41694export TAR_OPTIONS
41695rm -rf *
41696
41697genfile --sparse --block-size=1024 --file foo \
41698  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41699genfile --file baz
41700echo creating
41701tar --sparse -vcf bar foo baz
41702echo comparing
41703genfile --run --checkpoint 3 --length 200m --truncate foo -- \
41704 tar --sparse -vdf bar
41705)
41706) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41707at_status=$? at_failed=false
41708$at_check_filter
41709at_fn_diff_devnull "$at_stderr" || at_failed=:
41710echo >>"$at_stdout"; $as_echo "creating
41711foo
41712baz
41713comparing
41714foo
41715foo: Size differs
41716baz
41717" | \
41718  $at_diff - "$at_stdout" || at_failed=:
41719at_fn_check_status 1 $at_status "$at_srcdir/sptrdiff00.at:30"
41720$at_failed && at_fn_log_failure
41721$at_traceon; }
41722
41723              { set +x
41724$as_echo "$at_srcdir/sptrdiff00.at:30:
41725mkdir oldgnu
41726(cd oldgnu
41727TEST_TAR_FORMAT=oldgnu
41728export TEST_TAR_FORMAT
41729TAR_OPTIONS=\"-H oldgnu\"
41730export TAR_OPTIONS
41731rm -rf *
41732
41733genfile --sparse --block-size=1024 --file foo \\
41734  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41735genfile --file baz
41736echo creating
41737tar --sparse -vcf bar foo baz
41738echo comparing
41739genfile --run --checkpoint 3 --length 200m --truncate foo -- \\
41740 tar --sparse -vdf bar
41741)"
41742at_fn_check_prepare_notrace 'an embedded newline' "sptrdiff00.at:30"
41743( $at_check_trace;
41744mkdir oldgnu
41745(cd oldgnu
41746TEST_TAR_FORMAT=oldgnu
41747export TEST_TAR_FORMAT
41748TAR_OPTIONS="-H oldgnu"
41749export TAR_OPTIONS
41750rm -rf *
41751
41752genfile --sparse --block-size=1024 --file foo \
41753  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41754genfile --file baz
41755echo creating
41756tar --sparse -vcf bar foo baz
41757echo comparing
41758genfile --run --checkpoint 3 --length 200m --truncate foo -- \
41759 tar --sparse -vdf bar
41760)
41761) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41762at_status=$? at_failed=false
41763$at_check_filter
41764at_fn_diff_devnull "$at_stderr" || at_failed=:
41765echo >>"$at_stdout"; $as_echo "creating
41766foo
41767baz
41768comparing
41769foo
41770foo: Size differs
41771baz
41772" | \
41773  $at_diff - "$at_stdout" || at_failed=:
41774at_fn_check_status 1 $at_status "$at_srcdir/sptrdiff00.at:30"
41775$at_failed && at_fn_log_failure
41776$at_traceon; }
41777
41778
41779
41780
41781  set +x
41782  $at_times_p && times >"$at_times_file"
41783) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41784read at_status <"$at_status_file"
41785#AT_STOP_177
41786#AT_START_178
41787at_fn_group_banner 178 'sptrdiff01.at:26' \
41788  "file truncated in data region while comparing" "  " 25
41789at_xfail=no
41790      test -f $XFAILFILE && at_xfail=yes
41791(
41792  $as_echo "178. $at_setup_line: testing $at_desc ..."
41793  $at_traceon
41794
41795
41796
41797# This triggers short read in check_data_region.
41798
41799
41800  { set +x
41801$as_echo "$at_srcdir/sptrdiff01.at:30:
41802mkdir posix
41803(cd posix
41804TEST_TAR_FORMAT=posix
41805export TEST_TAR_FORMAT
41806TAR_OPTIONS=\"-H posix\"
41807export TAR_OPTIONS
41808rm -rf *
41809
41810genfile --sparse --block-size=1024 --file foo \\
41811  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41812genfile --file baz
41813echo creating
41814tar --sparse -vcf bar foo baz
41815echo comparing
41816genfile --run --checkpoint 5 --length 221278210 --truncate foo -- \\
41817 tar --sparse -vdf bar
41818)"
41819at_fn_check_prepare_notrace 'an embedded newline' "sptrdiff01.at:30"
41820( $at_check_trace;
41821mkdir posix
41822(cd posix
41823TEST_TAR_FORMAT=posix
41824export TEST_TAR_FORMAT
41825TAR_OPTIONS="-H posix"
41826export TAR_OPTIONS
41827rm -rf *
41828
41829genfile --sparse --block-size=1024 --file foo \
41830  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41831genfile --file baz
41832echo creating
41833tar --sparse -vcf bar foo baz
41834echo comparing
41835genfile --run --checkpoint 5 --length 221278210 --truncate foo -- \
41836 tar --sparse -vdf bar
41837)
41838) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41839at_status=$? at_failed=false
41840$at_check_filter
41841at_fn_diff_devnull "$at_stderr" || at_failed=:
41842echo >>"$at_stdout"; $as_echo "creating
41843foo
41844baz
41845comparing
41846foo
41847foo: Size differs
41848baz
41849" | \
41850  $at_diff - "$at_stdout" || at_failed=:
41851at_fn_check_status 1 $at_status "$at_srcdir/sptrdiff01.at:30"
41852$at_failed && at_fn_log_failure
41853$at_traceon; }
41854
41855              { set +x
41856$as_echo "$at_srcdir/sptrdiff01.at:30:
41857mkdir gnu
41858(cd gnu
41859TEST_TAR_FORMAT=gnu
41860export TEST_TAR_FORMAT
41861TAR_OPTIONS=\"-H gnu\"
41862export TAR_OPTIONS
41863rm -rf *
41864
41865genfile --sparse --block-size=1024 --file foo \\
41866  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41867genfile --file baz
41868echo creating
41869tar --sparse -vcf bar foo baz
41870echo comparing
41871genfile --run --checkpoint 5 --length 221278210 --truncate foo -- \\
41872 tar --sparse -vdf bar
41873)"
41874at_fn_check_prepare_notrace 'an embedded newline' "sptrdiff01.at:30"
41875( $at_check_trace;
41876mkdir gnu
41877(cd gnu
41878TEST_TAR_FORMAT=gnu
41879export TEST_TAR_FORMAT
41880TAR_OPTIONS="-H gnu"
41881export TAR_OPTIONS
41882rm -rf *
41883
41884genfile --sparse --block-size=1024 --file foo \
41885  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41886genfile --file baz
41887echo creating
41888tar --sparse -vcf bar foo baz
41889echo comparing
41890genfile --run --checkpoint 5 --length 221278210 --truncate foo -- \
41891 tar --sparse -vdf bar
41892)
41893) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41894at_status=$? at_failed=false
41895$at_check_filter
41896at_fn_diff_devnull "$at_stderr" || at_failed=:
41897echo >>"$at_stdout"; $as_echo "creating
41898foo
41899baz
41900comparing
41901foo
41902foo: Size differs
41903baz
41904" | \
41905  $at_diff - "$at_stdout" || at_failed=:
41906at_fn_check_status 1 $at_status "$at_srcdir/sptrdiff01.at:30"
41907$at_failed && at_fn_log_failure
41908$at_traceon; }
41909
41910              { set +x
41911$as_echo "$at_srcdir/sptrdiff01.at:30:
41912mkdir oldgnu
41913(cd oldgnu
41914TEST_TAR_FORMAT=oldgnu
41915export TEST_TAR_FORMAT
41916TAR_OPTIONS=\"-H oldgnu\"
41917export TAR_OPTIONS
41918rm -rf *
41919
41920genfile --sparse --block-size=1024 --file foo \\
41921  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41922genfile --file baz
41923echo creating
41924tar --sparse -vcf bar foo baz
41925echo comparing
41926genfile --run --checkpoint 5 --length 221278210 --truncate foo -- \\
41927 tar --sparse -vdf bar
41928)"
41929at_fn_check_prepare_notrace 'an embedded newline' "sptrdiff01.at:30"
41930( $at_check_trace;
41931mkdir oldgnu
41932(cd oldgnu
41933TEST_TAR_FORMAT=oldgnu
41934export TEST_TAR_FORMAT
41935TAR_OPTIONS="-H oldgnu"
41936export TAR_OPTIONS
41937rm -rf *
41938
41939genfile --sparse --block-size=1024 --file foo \
41940  0 ABCDEFGHIJ 1M ABCDEFGHIJ 10M ABCDEFGHIJ 200M ABCDEFGHIJ || exit 77
41941genfile --file baz
41942echo creating
41943tar --sparse -vcf bar foo baz
41944echo comparing
41945genfile --run --checkpoint 5 --length 221278210 --truncate foo -- \
41946 tar --sparse -vdf bar
41947)
41948) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41949at_status=$? at_failed=false
41950$at_check_filter
41951at_fn_diff_devnull "$at_stderr" || at_failed=:
41952echo >>"$at_stdout"; $as_echo "creating
41953foo
41954baz
41955comparing
41956foo
41957foo: Size differs
41958baz
41959" | \
41960  $at_diff - "$at_stdout" || at_failed=:
41961at_fn_check_status 1 $at_status "$at_srcdir/sptrdiff01.at:30"
41962$at_failed && at_fn_log_failure
41963$at_traceon; }
41964
41965
41966
41967
41968  set +x
41969  $at_times_p && times >"$at_times_file"
41970) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41971read at_status <"$at_status_file"
41972#AT_STOP_178
41973#AT_START_179
41974at_fn_group_banner 179 'update.at:28' \
41975  "update unchanged directories" "                   " 26
41976at_xfail=no
41977      test -f $XFAILFILE && at_xfail=yes
41978(
41979  $as_echo "179. $at_setup_line: testing $at_desc ..."
41980  $at_traceon
41981
41982
41983
41984
41985
41986  { set +x
41987$as_echo "$at_srcdir/update.at:31:
41988mkdir v7
41989(cd v7
41990TEST_TAR_FORMAT=v7
41991export TEST_TAR_FORMAT
41992TAR_OPTIONS=\"-H v7\"
41993export TAR_OPTIONS
41994rm -rf *
41995
41996
41997test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
41998
41999mkdir directory
42000genfile --length 10240 --pattern zeros --file directory/file1
42001genfile --length 10240 --pattern default --file directory/file2
42002
42003tar cf archive directory || exit 1
42004echo separator
42005tar uf archive directory || exit 1
42006echo separator
42007tar tf archive | sort || exit 1
42008)"
42009at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
42010( $at_check_trace;
42011mkdir v7
42012(cd v7
42013TEST_TAR_FORMAT=v7
42014export TEST_TAR_FORMAT
42015TAR_OPTIONS="-H v7"
42016export TAR_OPTIONS
42017rm -rf *
42018
42019
42020test -z "`sort < /dev/null 2>&1`" || exit 77
42021
42022mkdir directory
42023genfile --length 10240 --pattern zeros --file directory/file1
42024genfile --length 10240 --pattern default --file directory/file2
42025
42026tar cf archive directory || exit 1
42027echo separator
42028tar uf archive directory || exit 1
42029echo separator
42030tar tf archive | sort || exit 1
42031)
42032) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42033at_status=$? at_failed=false
42034$at_check_filter
42035at_fn_diff_devnull "$at_stderr" || at_failed=:
42036echo >>"$at_stdout"; $as_echo "separator
42037separator
42038directory/
42039directory/file1
42040directory/file2
42041" | \
42042  $at_diff - "$at_stdout" || at_failed=:
42043at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
42044$at_failed && at_fn_log_failure
42045$at_traceon; }
42046
42047              { set +x
42048$as_echo "$at_srcdir/update.at:31:
42049mkdir oldgnu
42050(cd oldgnu
42051TEST_TAR_FORMAT=oldgnu
42052export TEST_TAR_FORMAT
42053TAR_OPTIONS=\"-H oldgnu\"
42054export TAR_OPTIONS
42055rm -rf *
42056
42057
42058test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42059
42060mkdir directory
42061genfile --length 10240 --pattern zeros --file directory/file1
42062genfile --length 10240 --pattern default --file directory/file2
42063
42064tar cf archive directory || exit 1
42065echo separator
42066tar uf archive directory || exit 1
42067echo separator
42068tar tf archive | sort || exit 1
42069)"
42070at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
42071( $at_check_trace;
42072mkdir oldgnu
42073(cd oldgnu
42074TEST_TAR_FORMAT=oldgnu
42075export TEST_TAR_FORMAT
42076TAR_OPTIONS="-H oldgnu"
42077export TAR_OPTIONS
42078rm -rf *
42079
42080
42081test -z "`sort < /dev/null 2>&1`" || exit 77
42082
42083mkdir directory
42084genfile --length 10240 --pattern zeros --file directory/file1
42085genfile --length 10240 --pattern default --file directory/file2
42086
42087tar cf archive directory || exit 1
42088echo separator
42089tar uf archive directory || exit 1
42090echo separator
42091tar tf archive | sort || exit 1
42092)
42093) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42094at_status=$? at_failed=false
42095$at_check_filter
42096at_fn_diff_devnull "$at_stderr" || at_failed=:
42097echo >>"$at_stdout"; $as_echo "separator
42098separator
42099directory/
42100directory/file1
42101directory/file2
42102" | \
42103  $at_diff - "$at_stdout" || at_failed=:
42104at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
42105$at_failed && at_fn_log_failure
42106$at_traceon; }
42107
42108              { set +x
42109$as_echo "$at_srcdir/update.at:31:
42110mkdir ustar
42111(cd ustar
42112TEST_TAR_FORMAT=ustar
42113export TEST_TAR_FORMAT
42114TAR_OPTIONS=\"-H ustar\"
42115export TAR_OPTIONS
42116rm -rf *
42117
42118
42119test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42120
42121mkdir directory
42122genfile --length 10240 --pattern zeros --file directory/file1
42123genfile --length 10240 --pattern default --file directory/file2
42124
42125tar cf archive directory || exit 1
42126echo separator
42127tar uf archive directory || exit 1
42128echo separator
42129tar tf archive | sort || exit 1
42130)"
42131at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
42132( $at_check_trace;
42133mkdir ustar
42134(cd ustar
42135TEST_TAR_FORMAT=ustar
42136export TEST_TAR_FORMAT
42137TAR_OPTIONS="-H ustar"
42138export TAR_OPTIONS
42139rm -rf *
42140
42141
42142test -z "`sort < /dev/null 2>&1`" || exit 77
42143
42144mkdir directory
42145genfile --length 10240 --pattern zeros --file directory/file1
42146genfile --length 10240 --pattern default --file directory/file2
42147
42148tar cf archive directory || exit 1
42149echo separator
42150tar uf archive directory || exit 1
42151echo separator
42152tar tf archive | sort || exit 1
42153)
42154) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42155at_status=$? at_failed=false
42156$at_check_filter
42157at_fn_diff_devnull "$at_stderr" || at_failed=:
42158echo >>"$at_stdout"; $as_echo "separator
42159separator
42160directory/
42161directory/file1
42162directory/file2
42163" | \
42164  $at_diff - "$at_stdout" || at_failed=:
42165at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
42166$at_failed && at_fn_log_failure
42167$at_traceon; }
42168
42169              { set +x
42170$as_echo "$at_srcdir/update.at:31:
42171mkdir posix
42172(cd posix
42173TEST_TAR_FORMAT=posix
42174export TEST_TAR_FORMAT
42175TAR_OPTIONS=\"-H posix\"
42176export TAR_OPTIONS
42177rm -rf *
42178
42179
42180test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42181
42182mkdir directory
42183genfile --length 10240 --pattern zeros --file directory/file1
42184genfile --length 10240 --pattern default --file directory/file2
42185
42186tar cf archive directory || exit 1
42187echo separator
42188tar uf archive directory || exit 1
42189echo separator
42190tar tf archive | sort || exit 1
42191)"
42192at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
42193( $at_check_trace;
42194mkdir posix
42195(cd posix
42196TEST_TAR_FORMAT=posix
42197export TEST_TAR_FORMAT
42198TAR_OPTIONS="-H posix"
42199export TAR_OPTIONS
42200rm -rf *
42201
42202
42203test -z "`sort < /dev/null 2>&1`" || exit 77
42204
42205mkdir directory
42206genfile --length 10240 --pattern zeros --file directory/file1
42207genfile --length 10240 --pattern default --file directory/file2
42208
42209tar cf archive directory || exit 1
42210echo separator
42211tar uf archive directory || exit 1
42212echo separator
42213tar tf archive | sort || exit 1
42214)
42215) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42216at_status=$? at_failed=false
42217$at_check_filter
42218at_fn_diff_devnull "$at_stderr" || at_failed=:
42219echo >>"$at_stdout"; $as_echo "separator
42220separator
42221directory/
42222directory/file1
42223directory/file2
42224" | \
42225  $at_diff - "$at_stdout" || at_failed=:
42226at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
42227$at_failed && at_fn_log_failure
42228$at_traceon; }
42229
42230              { set +x
42231$as_echo "$at_srcdir/update.at:31:
42232mkdir gnu
42233(cd gnu
42234TEST_TAR_FORMAT=gnu
42235export TEST_TAR_FORMAT
42236TAR_OPTIONS=\"-H gnu\"
42237export TAR_OPTIONS
42238rm -rf *
42239
42240
42241test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42242
42243mkdir directory
42244genfile --length 10240 --pattern zeros --file directory/file1
42245genfile --length 10240 --pattern default --file directory/file2
42246
42247tar cf archive directory || exit 1
42248echo separator
42249tar uf archive directory || exit 1
42250echo separator
42251tar tf archive | sort || exit 1
42252)"
42253at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
42254( $at_check_trace;
42255mkdir gnu
42256(cd gnu
42257TEST_TAR_FORMAT=gnu
42258export TEST_TAR_FORMAT
42259TAR_OPTIONS="-H gnu"
42260export TAR_OPTIONS
42261rm -rf *
42262
42263
42264test -z "`sort < /dev/null 2>&1`" || exit 77
42265
42266mkdir directory
42267genfile --length 10240 --pattern zeros --file directory/file1
42268genfile --length 10240 --pattern default --file directory/file2
42269
42270tar cf archive directory || exit 1
42271echo separator
42272tar uf archive directory || exit 1
42273echo separator
42274tar tf archive | sort || exit 1
42275)
42276) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42277at_status=$? at_failed=false
42278$at_check_filter
42279at_fn_diff_devnull "$at_stderr" || at_failed=:
42280echo >>"$at_stdout"; $as_echo "separator
42281separator
42282directory/
42283directory/file1
42284directory/file2
42285" | \
42286  $at_diff - "$at_stdout" || at_failed=:
42287at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
42288$at_failed && at_fn_log_failure
42289$at_traceon; }
42290
42291
42292
42293
42294  set +x
42295  $at_times_p && times >"$at_times_file"
42296) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42297read at_status <"$at_status_file"
42298#AT_STOP_179
42299#AT_START_180
42300at_fn_group_banner 180 'update01.at:29' \
42301  "update directories" "                             " 26
42302at_xfail=no
42303      test -f $XFAILFILE && at_xfail=yes
42304(
42305  $as_echo "180. $at_setup_line: testing $at_desc ..."
42306  $at_traceon
42307
42308
42309
42310
42311
42312  { set +x
42313$as_echo "$at_srcdir/update01.at:32:
42314mkdir v7
42315(cd v7
42316TEST_TAR_FORMAT=v7
42317export TEST_TAR_FORMAT
42318TAR_OPTIONS=\"-H v7\"
42319export TAR_OPTIONS
42320rm -rf *
42321
42322
42323test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42324
42325mkdir a
42326genfile --file a/b
42327
42328tar cf arc a
42329
42330echo \"separator\"
42331
42332sleep 2
42333genfile --file a/c
42334
42335tar ufv arc a
42336echo \"separator\"
42337tar tf arc | sort || exit 1
42338)"
42339at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
42340( $at_check_trace;
42341mkdir v7
42342(cd v7
42343TEST_TAR_FORMAT=v7
42344export TEST_TAR_FORMAT
42345TAR_OPTIONS="-H v7"
42346export TAR_OPTIONS
42347rm -rf *
42348
42349
42350test -z "`sort < /dev/null 2>&1`" || exit 77
42351
42352mkdir a
42353genfile --file a/b
42354
42355tar cf arc a
42356
42357echo "separator"
42358
42359sleep 2
42360genfile --file a/c
42361
42362tar ufv arc a
42363echo "separator"
42364tar tf arc | sort || exit 1
42365)
42366) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42367at_status=$? at_failed=false
42368$at_check_filter
42369at_fn_diff_devnull "$at_stderr" || at_failed=:
42370echo >>"$at_stdout"; $as_echo "separator
42371a/c
42372separator
42373a/
42374a/b
42375a/c
42376" | \
42377  $at_diff - "$at_stdout" || at_failed=:
42378at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
42379$at_failed && at_fn_log_failure
42380$at_traceon; }
42381
42382              { set +x
42383$as_echo "$at_srcdir/update01.at:32:
42384mkdir oldgnu
42385(cd oldgnu
42386TEST_TAR_FORMAT=oldgnu
42387export TEST_TAR_FORMAT
42388TAR_OPTIONS=\"-H oldgnu\"
42389export TAR_OPTIONS
42390rm -rf *
42391
42392
42393test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42394
42395mkdir a
42396genfile --file a/b
42397
42398tar cf arc a
42399
42400echo \"separator\"
42401
42402sleep 2
42403genfile --file a/c
42404
42405tar ufv arc a
42406echo \"separator\"
42407tar tf arc | sort || exit 1
42408)"
42409at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
42410( $at_check_trace;
42411mkdir oldgnu
42412(cd oldgnu
42413TEST_TAR_FORMAT=oldgnu
42414export TEST_TAR_FORMAT
42415TAR_OPTIONS="-H oldgnu"
42416export TAR_OPTIONS
42417rm -rf *
42418
42419
42420test -z "`sort < /dev/null 2>&1`" || exit 77
42421
42422mkdir a
42423genfile --file a/b
42424
42425tar cf arc a
42426
42427echo "separator"
42428
42429sleep 2
42430genfile --file a/c
42431
42432tar ufv arc a
42433echo "separator"
42434tar tf arc | sort || exit 1
42435)
42436) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42437at_status=$? at_failed=false
42438$at_check_filter
42439at_fn_diff_devnull "$at_stderr" || at_failed=:
42440echo >>"$at_stdout"; $as_echo "separator
42441a/c
42442separator
42443a/
42444a/b
42445a/c
42446" | \
42447  $at_diff - "$at_stdout" || at_failed=:
42448at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
42449$at_failed && at_fn_log_failure
42450$at_traceon; }
42451
42452              { set +x
42453$as_echo "$at_srcdir/update01.at:32:
42454mkdir ustar
42455(cd ustar
42456TEST_TAR_FORMAT=ustar
42457export TEST_TAR_FORMAT
42458TAR_OPTIONS=\"-H ustar\"
42459export TAR_OPTIONS
42460rm -rf *
42461
42462
42463test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42464
42465mkdir a
42466genfile --file a/b
42467
42468tar cf arc a
42469
42470echo \"separator\"
42471
42472sleep 2
42473genfile --file a/c
42474
42475tar ufv arc a
42476echo \"separator\"
42477tar tf arc | sort || exit 1
42478)"
42479at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
42480( $at_check_trace;
42481mkdir ustar
42482(cd ustar
42483TEST_TAR_FORMAT=ustar
42484export TEST_TAR_FORMAT
42485TAR_OPTIONS="-H ustar"
42486export TAR_OPTIONS
42487rm -rf *
42488
42489
42490test -z "`sort < /dev/null 2>&1`" || exit 77
42491
42492mkdir a
42493genfile --file a/b
42494
42495tar cf arc a
42496
42497echo "separator"
42498
42499sleep 2
42500genfile --file a/c
42501
42502tar ufv arc a
42503echo "separator"
42504tar tf arc | sort || exit 1
42505)
42506) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42507at_status=$? at_failed=false
42508$at_check_filter
42509at_fn_diff_devnull "$at_stderr" || at_failed=:
42510echo >>"$at_stdout"; $as_echo "separator
42511a/c
42512separator
42513a/
42514a/b
42515a/c
42516" | \
42517  $at_diff - "$at_stdout" || at_failed=:
42518at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
42519$at_failed && at_fn_log_failure
42520$at_traceon; }
42521
42522              { set +x
42523$as_echo "$at_srcdir/update01.at:32:
42524mkdir posix
42525(cd posix
42526TEST_TAR_FORMAT=posix
42527export TEST_TAR_FORMAT
42528TAR_OPTIONS=\"-H posix\"
42529export TAR_OPTIONS
42530rm -rf *
42531
42532
42533test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42534
42535mkdir a
42536genfile --file a/b
42537
42538tar cf arc a
42539
42540echo \"separator\"
42541
42542sleep 2
42543genfile --file a/c
42544
42545tar ufv arc a
42546echo \"separator\"
42547tar tf arc | sort || exit 1
42548)"
42549at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
42550( $at_check_trace;
42551mkdir posix
42552(cd posix
42553TEST_TAR_FORMAT=posix
42554export TEST_TAR_FORMAT
42555TAR_OPTIONS="-H posix"
42556export TAR_OPTIONS
42557rm -rf *
42558
42559
42560test -z "`sort < /dev/null 2>&1`" || exit 77
42561
42562mkdir a
42563genfile --file a/b
42564
42565tar cf arc a
42566
42567echo "separator"
42568
42569sleep 2
42570genfile --file a/c
42571
42572tar ufv arc a
42573echo "separator"
42574tar tf arc | sort || exit 1
42575)
42576) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42577at_status=$? at_failed=false
42578$at_check_filter
42579at_fn_diff_devnull "$at_stderr" || at_failed=:
42580echo >>"$at_stdout"; $as_echo "separator
42581a/c
42582separator
42583a/
42584a/b
42585a/c
42586" | \
42587  $at_diff - "$at_stdout" || at_failed=:
42588at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
42589$at_failed && at_fn_log_failure
42590$at_traceon; }
42591
42592              { set +x
42593$as_echo "$at_srcdir/update01.at:32:
42594mkdir gnu
42595(cd gnu
42596TEST_TAR_FORMAT=gnu
42597export TEST_TAR_FORMAT
42598TAR_OPTIONS=\"-H gnu\"
42599export TAR_OPTIONS
42600rm -rf *
42601
42602
42603test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42604
42605mkdir a
42606genfile --file a/b
42607
42608tar cf arc a
42609
42610echo \"separator\"
42611
42612sleep 2
42613genfile --file a/c
42614
42615tar ufv arc a
42616echo \"separator\"
42617tar tf arc | sort || exit 1
42618)"
42619at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
42620( $at_check_trace;
42621mkdir gnu
42622(cd gnu
42623TEST_TAR_FORMAT=gnu
42624export TEST_TAR_FORMAT
42625TAR_OPTIONS="-H gnu"
42626export TAR_OPTIONS
42627rm -rf *
42628
42629
42630test -z "`sort < /dev/null 2>&1`" || exit 77
42631
42632mkdir a
42633genfile --file a/b
42634
42635tar cf arc a
42636
42637echo "separator"
42638
42639sleep 2
42640genfile --file a/c
42641
42642tar ufv arc a
42643echo "separator"
42644tar tf arc | sort || exit 1
42645)
42646) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42647at_status=$? at_failed=false
42648$at_check_filter
42649at_fn_diff_devnull "$at_stderr" || at_failed=:
42650echo >>"$at_stdout"; $as_echo "separator
42651a/c
42652separator
42653a/
42654a/b
42655a/c
42656" | \
42657  $at_diff - "$at_stdout" || at_failed=:
42658at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
42659$at_failed && at_fn_log_failure
42660$at_traceon; }
42661
42662
42663
42664
42665  set +x
42666  $at_times_p && times >"$at_times_file"
42667) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42668read at_status <"$at_status_file"
42669#AT_STOP_180
42670#AT_START_181
42671at_fn_group_banner 181 'update02.at:26' \
42672  "update changed files" "                           " 26
42673at_xfail=no
42674      test -f $XFAILFILE && at_xfail=yes
42675(
42676  $as_echo "181. $at_setup_line: testing $at_desc ..."
42677  $at_traceon
42678
42679
42680
42681
42682
42683  { set +x
42684$as_echo "$at_srcdir/update02.at:29:
42685mkdir v7
42686(cd v7
42687TEST_TAR_FORMAT=v7
42688export TEST_TAR_FORMAT
42689TAR_OPTIONS=\"-H v7\"
42690export TAR_OPTIONS
42691rm -rf *
42692
42693
42694test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42695
42696mkdir a
42697genfile --file a/b
42698
42699tar cf arc a
42700
42701echo \"separator\"
42702
42703sleep 2
42704touch a/b
42705
42706tar ufv arc a
42707echo \"separator\"
42708tar tf arc | sort || exit 1
42709)"
42710at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
42711( $at_check_trace;
42712mkdir v7
42713(cd v7
42714TEST_TAR_FORMAT=v7
42715export TEST_TAR_FORMAT
42716TAR_OPTIONS="-H v7"
42717export TAR_OPTIONS
42718rm -rf *
42719
42720
42721test -z "`sort < /dev/null 2>&1`" || exit 77
42722
42723mkdir a
42724genfile --file a/b
42725
42726tar cf arc a
42727
42728echo "separator"
42729
42730sleep 2
42731touch a/b
42732
42733tar ufv arc a
42734echo "separator"
42735tar tf arc | sort || exit 1
42736)
42737) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42738at_status=$? at_failed=false
42739$at_check_filter
42740at_fn_diff_devnull "$at_stderr" || at_failed=:
42741echo >>"$at_stdout"; $as_echo "separator
42742a/b
42743separator
42744a/
42745a/b
42746a/b
42747" | \
42748  $at_diff - "$at_stdout" || at_failed=:
42749at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
42750$at_failed && at_fn_log_failure
42751$at_traceon; }
42752
42753              { set +x
42754$as_echo "$at_srcdir/update02.at:29:
42755mkdir oldgnu
42756(cd oldgnu
42757TEST_TAR_FORMAT=oldgnu
42758export TEST_TAR_FORMAT
42759TAR_OPTIONS=\"-H oldgnu\"
42760export TAR_OPTIONS
42761rm -rf *
42762
42763
42764test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42765
42766mkdir a
42767genfile --file a/b
42768
42769tar cf arc a
42770
42771echo \"separator\"
42772
42773sleep 2
42774touch a/b
42775
42776tar ufv arc a
42777echo \"separator\"
42778tar tf arc | sort || exit 1
42779)"
42780at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
42781( $at_check_trace;
42782mkdir oldgnu
42783(cd oldgnu
42784TEST_TAR_FORMAT=oldgnu
42785export TEST_TAR_FORMAT
42786TAR_OPTIONS="-H oldgnu"
42787export TAR_OPTIONS
42788rm -rf *
42789
42790
42791test -z "`sort < /dev/null 2>&1`" || exit 77
42792
42793mkdir a
42794genfile --file a/b
42795
42796tar cf arc a
42797
42798echo "separator"
42799
42800sleep 2
42801touch a/b
42802
42803tar ufv arc a
42804echo "separator"
42805tar tf arc | sort || exit 1
42806)
42807) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42808at_status=$? at_failed=false
42809$at_check_filter
42810at_fn_diff_devnull "$at_stderr" || at_failed=:
42811echo >>"$at_stdout"; $as_echo "separator
42812a/b
42813separator
42814a/
42815a/b
42816a/b
42817" | \
42818  $at_diff - "$at_stdout" || at_failed=:
42819at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
42820$at_failed && at_fn_log_failure
42821$at_traceon; }
42822
42823              { set +x
42824$as_echo "$at_srcdir/update02.at:29:
42825mkdir ustar
42826(cd ustar
42827TEST_TAR_FORMAT=ustar
42828export TEST_TAR_FORMAT
42829TAR_OPTIONS=\"-H ustar\"
42830export TAR_OPTIONS
42831rm -rf *
42832
42833
42834test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42835
42836mkdir a
42837genfile --file a/b
42838
42839tar cf arc a
42840
42841echo \"separator\"
42842
42843sleep 2
42844touch a/b
42845
42846tar ufv arc a
42847echo \"separator\"
42848tar tf arc | sort || exit 1
42849)"
42850at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
42851( $at_check_trace;
42852mkdir ustar
42853(cd ustar
42854TEST_TAR_FORMAT=ustar
42855export TEST_TAR_FORMAT
42856TAR_OPTIONS="-H ustar"
42857export TAR_OPTIONS
42858rm -rf *
42859
42860
42861test -z "`sort < /dev/null 2>&1`" || exit 77
42862
42863mkdir a
42864genfile --file a/b
42865
42866tar cf arc a
42867
42868echo "separator"
42869
42870sleep 2
42871touch a/b
42872
42873tar ufv arc a
42874echo "separator"
42875tar tf arc | sort || exit 1
42876)
42877) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42878at_status=$? at_failed=false
42879$at_check_filter
42880at_fn_diff_devnull "$at_stderr" || at_failed=:
42881echo >>"$at_stdout"; $as_echo "separator
42882a/b
42883separator
42884a/
42885a/b
42886a/b
42887" | \
42888  $at_diff - "$at_stdout" || at_failed=:
42889at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
42890$at_failed && at_fn_log_failure
42891$at_traceon; }
42892
42893              { set +x
42894$as_echo "$at_srcdir/update02.at:29:
42895mkdir posix
42896(cd posix
42897TEST_TAR_FORMAT=posix
42898export TEST_TAR_FORMAT
42899TAR_OPTIONS=\"-H posix\"
42900export TAR_OPTIONS
42901rm -rf *
42902
42903
42904test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42905
42906mkdir a
42907genfile --file a/b
42908
42909tar cf arc a
42910
42911echo \"separator\"
42912
42913sleep 2
42914touch a/b
42915
42916tar ufv arc a
42917echo \"separator\"
42918tar tf arc | sort || exit 1
42919)"
42920at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
42921( $at_check_trace;
42922mkdir posix
42923(cd posix
42924TEST_TAR_FORMAT=posix
42925export TEST_TAR_FORMAT
42926TAR_OPTIONS="-H posix"
42927export TAR_OPTIONS
42928rm -rf *
42929
42930
42931test -z "`sort < /dev/null 2>&1`" || exit 77
42932
42933mkdir a
42934genfile --file a/b
42935
42936tar cf arc a
42937
42938echo "separator"
42939
42940sleep 2
42941touch a/b
42942
42943tar ufv arc a
42944echo "separator"
42945tar tf arc | sort || exit 1
42946)
42947) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42948at_status=$? at_failed=false
42949$at_check_filter
42950at_fn_diff_devnull "$at_stderr" || at_failed=:
42951echo >>"$at_stdout"; $as_echo "separator
42952a/b
42953separator
42954a/
42955a/b
42956a/b
42957" | \
42958  $at_diff - "$at_stdout" || at_failed=:
42959at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
42960$at_failed && at_fn_log_failure
42961$at_traceon; }
42962
42963              { set +x
42964$as_echo "$at_srcdir/update02.at:29:
42965mkdir gnu
42966(cd gnu
42967TEST_TAR_FORMAT=gnu
42968export TEST_TAR_FORMAT
42969TAR_OPTIONS=\"-H gnu\"
42970export TAR_OPTIONS
42971rm -rf *
42972
42973
42974test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
42975
42976mkdir a
42977genfile --file a/b
42978
42979tar cf arc a
42980
42981echo \"separator\"
42982
42983sleep 2
42984touch a/b
42985
42986tar ufv arc a
42987echo \"separator\"
42988tar tf arc | sort || exit 1
42989)"
42990at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
42991( $at_check_trace;
42992mkdir gnu
42993(cd gnu
42994TEST_TAR_FORMAT=gnu
42995export TEST_TAR_FORMAT
42996TAR_OPTIONS="-H gnu"
42997export TAR_OPTIONS
42998rm -rf *
42999
43000
43001test -z "`sort < /dev/null 2>&1`" || exit 77
43002
43003mkdir a
43004genfile --file a/b
43005
43006tar cf arc a
43007
43008echo "separator"
43009
43010sleep 2
43011touch a/b
43012
43013tar ufv arc a
43014echo "separator"
43015tar tf arc | sort || exit 1
43016)
43017) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43018at_status=$? at_failed=false
43019$at_check_filter
43020at_fn_diff_devnull "$at_stderr" || at_failed=:
43021echo >>"$at_stdout"; $as_echo "separator
43022a/b
43023separator
43024a/
43025a/b
43026a/b
43027" | \
43028  $at_diff - "$at_stdout" || at_failed=:
43029at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
43030$at_failed && at_fn_log_failure
43031$at_traceon; }
43032
43033
43034
43035
43036  set +x
43037  $at_times_p && times >"$at_times_file"
43038) 5>&1 2>&1 7>&- | eval $at_tee_pipe
43039read at_status <"$at_status_file"
43040#AT_STOP_181
43041#AT_START_182
43042at_fn_group_banner 182 'update03.at:20' \
43043  "update with chdir" "                              " 26
43044at_xfail=no
43045      test -f $XFAILFILE && at_xfail=yes
43046(
43047  $as_echo "182. $at_setup_line: testing $at_desc ..."
43048  $at_traceon
43049
43050
43051
43052# Tar <=1.29 failed to chdir when -u was used with -C
43053# Reported by: Ivan Kalvachev <ikalvachev@gmail.com>
43054# References: <CABA=pqfSq-4PJYp7W2ezGOz+fR2uh74AyA7kOeXJBzg2o-oQBA@mail.gmail.com>,
43055#             http://lists.gnu.org/archive/html/bug-tar/2016-08/msg00003.html
43056
43057
43058  { set +x
43059$as_echo "$at_srcdir/update03.at:27:
43060mkdir v7
43061(cd v7
43062TEST_TAR_FORMAT=v7
43063export TEST_TAR_FORMAT
43064TAR_OPTIONS=\"-H v7\"
43065export TAR_OPTIONS
43066rm -rf *
43067
43068mkdir dir1
43069mkdir dir2
43070mkdir dir1/subdir1 dir2/subdir2
43071genfile --file dir1/subdir1/a
43072genfile --file dir2/subdir2/a
43073echo Create
43074tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43075genfile --file dir1/subdir1/b
43076genfile --file dir2/subdir2/c
43077echo Update
43078tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43079)"
43080at_fn_check_prepare_notrace 'an embedded newline' "update03.at:27"
43081( $at_check_trace;
43082mkdir v7
43083(cd v7
43084TEST_TAR_FORMAT=v7
43085export TEST_TAR_FORMAT
43086TAR_OPTIONS="-H v7"
43087export TAR_OPTIONS
43088rm -rf *
43089
43090mkdir dir1
43091mkdir dir2
43092mkdir dir1/subdir1 dir2/subdir2
43093genfile --file dir1/subdir1/a
43094genfile --file dir2/subdir2/a
43095echo Create
43096tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43097genfile --file dir1/subdir1/b
43098genfile --file dir2/subdir2/c
43099echo Update
43100tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43101)
43102) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43103at_status=$? at_failed=false
43104$at_check_filter
43105at_fn_diff_devnull "$at_stderr" || at_failed=:
43106echo >>"$at_stdout"; $as_echo "Create
43107subdir1/
43108subdir1/a
43109subdir2/
43110subdir2/a
43111Update
43112subdir1/b
43113subdir2/c
43114" | \
43115  $at_diff - "$at_stdout" || at_failed=:
43116at_fn_check_status 0 $at_status "$at_srcdir/update03.at:27"
43117$at_failed && at_fn_log_failure
43118$at_traceon; }
43119
43120              { set +x
43121$as_echo "$at_srcdir/update03.at:27:
43122mkdir oldgnu
43123(cd oldgnu
43124TEST_TAR_FORMAT=oldgnu
43125export TEST_TAR_FORMAT
43126TAR_OPTIONS=\"-H oldgnu\"
43127export TAR_OPTIONS
43128rm -rf *
43129
43130mkdir dir1
43131mkdir dir2
43132mkdir dir1/subdir1 dir2/subdir2
43133genfile --file dir1/subdir1/a
43134genfile --file dir2/subdir2/a
43135echo Create
43136tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43137genfile --file dir1/subdir1/b
43138genfile --file dir2/subdir2/c
43139echo Update
43140tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43141)"
43142at_fn_check_prepare_notrace 'an embedded newline' "update03.at:27"
43143( $at_check_trace;
43144mkdir oldgnu
43145(cd oldgnu
43146TEST_TAR_FORMAT=oldgnu
43147export TEST_TAR_FORMAT
43148TAR_OPTIONS="-H oldgnu"
43149export TAR_OPTIONS
43150rm -rf *
43151
43152mkdir dir1
43153mkdir dir2
43154mkdir dir1/subdir1 dir2/subdir2
43155genfile --file dir1/subdir1/a
43156genfile --file dir2/subdir2/a
43157echo Create
43158tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43159genfile --file dir1/subdir1/b
43160genfile --file dir2/subdir2/c
43161echo Update
43162tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43163)
43164) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43165at_status=$? at_failed=false
43166$at_check_filter
43167at_fn_diff_devnull "$at_stderr" || at_failed=:
43168echo >>"$at_stdout"; $as_echo "Create
43169subdir1/
43170subdir1/a
43171subdir2/
43172subdir2/a
43173Update
43174subdir1/b
43175subdir2/c
43176" | \
43177  $at_diff - "$at_stdout" || at_failed=:
43178at_fn_check_status 0 $at_status "$at_srcdir/update03.at:27"
43179$at_failed && at_fn_log_failure
43180$at_traceon; }
43181
43182              { set +x
43183$as_echo "$at_srcdir/update03.at:27:
43184mkdir ustar
43185(cd ustar
43186TEST_TAR_FORMAT=ustar
43187export TEST_TAR_FORMAT
43188TAR_OPTIONS=\"-H ustar\"
43189export TAR_OPTIONS
43190rm -rf *
43191
43192mkdir dir1
43193mkdir dir2
43194mkdir dir1/subdir1 dir2/subdir2
43195genfile --file dir1/subdir1/a
43196genfile --file dir2/subdir2/a
43197echo Create
43198tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43199genfile --file dir1/subdir1/b
43200genfile --file dir2/subdir2/c
43201echo Update
43202tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43203)"
43204at_fn_check_prepare_notrace 'an embedded newline' "update03.at:27"
43205( $at_check_trace;
43206mkdir ustar
43207(cd ustar
43208TEST_TAR_FORMAT=ustar
43209export TEST_TAR_FORMAT
43210TAR_OPTIONS="-H ustar"
43211export TAR_OPTIONS
43212rm -rf *
43213
43214mkdir dir1
43215mkdir dir2
43216mkdir dir1/subdir1 dir2/subdir2
43217genfile --file dir1/subdir1/a
43218genfile --file dir2/subdir2/a
43219echo Create
43220tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43221genfile --file dir1/subdir1/b
43222genfile --file dir2/subdir2/c
43223echo Update
43224tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43225)
43226) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43227at_status=$? at_failed=false
43228$at_check_filter
43229at_fn_diff_devnull "$at_stderr" || at_failed=:
43230echo >>"$at_stdout"; $as_echo "Create
43231subdir1/
43232subdir1/a
43233subdir2/
43234subdir2/a
43235Update
43236subdir1/b
43237subdir2/c
43238" | \
43239  $at_diff - "$at_stdout" || at_failed=:
43240at_fn_check_status 0 $at_status "$at_srcdir/update03.at:27"
43241$at_failed && at_fn_log_failure
43242$at_traceon; }
43243
43244              { set +x
43245$as_echo "$at_srcdir/update03.at:27:
43246mkdir posix
43247(cd posix
43248TEST_TAR_FORMAT=posix
43249export TEST_TAR_FORMAT
43250TAR_OPTIONS=\"-H posix\"
43251export TAR_OPTIONS
43252rm -rf *
43253
43254mkdir dir1
43255mkdir dir2
43256mkdir dir1/subdir1 dir2/subdir2
43257genfile --file dir1/subdir1/a
43258genfile --file dir2/subdir2/a
43259echo Create
43260tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43261genfile --file dir1/subdir1/b
43262genfile --file dir2/subdir2/c
43263echo Update
43264tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43265)"
43266at_fn_check_prepare_notrace 'an embedded newline' "update03.at:27"
43267( $at_check_trace;
43268mkdir posix
43269(cd posix
43270TEST_TAR_FORMAT=posix
43271export TEST_TAR_FORMAT
43272TAR_OPTIONS="-H posix"
43273export TAR_OPTIONS
43274rm -rf *
43275
43276mkdir dir1
43277mkdir dir2
43278mkdir dir1/subdir1 dir2/subdir2
43279genfile --file dir1/subdir1/a
43280genfile --file dir2/subdir2/a
43281echo Create
43282tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43283genfile --file dir1/subdir1/b
43284genfile --file dir2/subdir2/c
43285echo Update
43286tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43287)
43288) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43289at_status=$? at_failed=false
43290$at_check_filter
43291at_fn_diff_devnull "$at_stderr" || at_failed=:
43292echo >>"$at_stdout"; $as_echo "Create
43293subdir1/
43294subdir1/a
43295subdir2/
43296subdir2/a
43297Update
43298subdir1/b
43299subdir2/c
43300" | \
43301  $at_diff - "$at_stdout" || at_failed=:
43302at_fn_check_status 0 $at_status "$at_srcdir/update03.at:27"
43303$at_failed && at_fn_log_failure
43304$at_traceon; }
43305
43306              { set +x
43307$as_echo "$at_srcdir/update03.at:27:
43308mkdir gnu
43309(cd gnu
43310TEST_TAR_FORMAT=gnu
43311export TEST_TAR_FORMAT
43312TAR_OPTIONS=\"-H gnu\"
43313export TAR_OPTIONS
43314rm -rf *
43315
43316mkdir dir1
43317mkdir dir2
43318mkdir dir1/subdir1 dir2/subdir2
43319genfile --file dir1/subdir1/a
43320genfile --file dir2/subdir2/a
43321echo Create
43322tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43323genfile --file dir1/subdir1/b
43324genfile --file dir2/subdir2/c
43325echo Update
43326tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43327)"
43328at_fn_check_prepare_notrace 'an embedded newline' "update03.at:27"
43329( $at_check_trace;
43330mkdir gnu
43331(cd gnu
43332TEST_TAR_FORMAT=gnu
43333export TEST_TAR_FORMAT
43334TAR_OPTIONS="-H gnu"
43335export TAR_OPTIONS
43336rm -rf *
43337
43338mkdir dir1
43339mkdir dir2
43340mkdir dir1/subdir1 dir2/subdir2
43341genfile --file dir1/subdir1/a
43342genfile --file dir2/subdir2/a
43343echo Create
43344tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43345genfile --file dir1/subdir1/b
43346genfile --file dir2/subdir2/c
43347echo Update
43348tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
43349)
43350) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43351at_status=$? at_failed=false
43352$at_check_filter
43353at_fn_diff_devnull "$at_stderr" || at_failed=:
43354echo >>"$at_stdout"; $as_echo "Create
43355subdir1/
43356subdir1/a
43357subdir2/
43358subdir2/a
43359Update
43360subdir1/b
43361subdir2/c
43362" | \
43363  $at_diff - "$at_stdout" || at_failed=:
43364at_fn_check_status 0 $at_status "$at_srcdir/update03.at:27"
43365$at_failed && at_fn_log_failure
43366$at_traceon; }
43367
43368
43369
43370
43371  set +x
43372  $at_times_p && times >"$at_times_file"
43373) 5>&1 2>&1 7>&- | eval $at_tee_pipe
43374read at_status <"$at_status_file"
43375#AT_STOP_182
43376#AT_START_183
43377at_fn_group_banner 183 'verify.at:25' \
43378  "verify" "                                         " 27
43379at_xfail=no
43380      test -f $XFAILFILE && at_xfail=yes
43381(
43382  $as_echo "183. $at_setup_line: testing $at_desc ..."
43383  $at_traceon
43384
43385
43386
43387
43388
43389  { set +x
43390$as_echo "$at_srcdir/verify.at:28:
43391mkdir v7
43392(cd v7
43393TEST_TAR_FORMAT=v7
43394export TEST_TAR_FORMAT
43395TAR_OPTIONS=\"-H v7\"
43396export TAR_OPTIONS
43397rm -rf *
43398
43399touch foo
43400tar -cvf archive.tar --verify foo
43401)"
43402at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
43403( $at_check_trace;
43404mkdir v7
43405(cd v7
43406TEST_TAR_FORMAT=v7
43407export TEST_TAR_FORMAT
43408TAR_OPTIONS="-H v7"
43409export TAR_OPTIONS
43410rm -rf *
43411
43412touch foo
43413tar -cvf archive.tar --verify foo
43414)
43415) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43416at_status=$? at_failed=false
43417$at_check_filter
43418at_fn_diff_devnull "$at_stderr" || at_failed=:
43419echo >>"$at_stdout"; $as_echo "foo
43420Verify foo
43421" | \
43422  $at_diff - "$at_stdout" || at_failed=:
43423at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
43424$at_failed && at_fn_log_failure
43425$at_traceon; }
43426
43427              { set +x
43428$as_echo "$at_srcdir/verify.at:28:
43429mkdir oldgnu
43430(cd oldgnu
43431TEST_TAR_FORMAT=oldgnu
43432export TEST_TAR_FORMAT
43433TAR_OPTIONS=\"-H oldgnu\"
43434export TAR_OPTIONS
43435rm -rf *
43436
43437touch foo
43438tar -cvf archive.tar --verify foo
43439)"
43440at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
43441( $at_check_trace;
43442mkdir oldgnu
43443(cd oldgnu
43444TEST_TAR_FORMAT=oldgnu
43445export TEST_TAR_FORMAT
43446TAR_OPTIONS="-H oldgnu"
43447export TAR_OPTIONS
43448rm -rf *
43449
43450touch foo
43451tar -cvf archive.tar --verify foo
43452)
43453) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43454at_status=$? at_failed=false
43455$at_check_filter
43456at_fn_diff_devnull "$at_stderr" || at_failed=:
43457echo >>"$at_stdout"; $as_echo "foo
43458Verify foo
43459" | \
43460  $at_diff - "$at_stdout" || at_failed=:
43461at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
43462$at_failed && at_fn_log_failure
43463$at_traceon; }
43464
43465              { set +x
43466$as_echo "$at_srcdir/verify.at:28:
43467mkdir ustar
43468(cd ustar
43469TEST_TAR_FORMAT=ustar
43470export TEST_TAR_FORMAT
43471TAR_OPTIONS=\"-H ustar\"
43472export TAR_OPTIONS
43473rm -rf *
43474
43475touch foo
43476tar -cvf archive.tar --verify foo
43477)"
43478at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
43479( $at_check_trace;
43480mkdir ustar
43481(cd ustar
43482TEST_TAR_FORMAT=ustar
43483export TEST_TAR_FORMAT
43484TAR_OPTIONS="-H ustar"
43485export TAR_OPTIONS
43486rm -rf *
43487
43488touch foo
43489tar -cvf archive.tar --verify foo
43490)
43491) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43492at_status=$? at_failed=false
43493$at_check_filter
43494at_fn_diff_devnull "$at_stderr" || at_failed=:
43495echo >>"$at_stdout"; $as_echo "foo
43496Verify foo
43497" | \
43498  $at_diff - "$at_stdout" || at_failed=:
43499at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
43500$at_failed && at_fn_log_failure
43501$at_traceon; }
43502
43503              { set +x
43504$as_echo "$at_srcdir/verify.at:28:
43505mkdir posix
43506(cd posix
43507TEST_TAR_FORMAT=posix
43508export TEST_TAR_FORMAT
43509TAR_OPTIONS=\"-H posix\"
43510export TAR_OPTIONS
43511rm -rf *
43512
43513touch foo
43514tar -cvf archive.tar --verify foo
43515)"
43516at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
43517( $at_check_trace;
43518mkdir posix
43519(cd posix
43520TEST_TAR_FORMAT=posix
43521export TEST_TAR_FORMAT
43522TAR_OPTIONS="-H posix"
43523export TAR_OPTIONS
43524rm -rf *
43525
43526touch foo
43527tar -cvf archive.tar --verify foo
43528)
43529) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43530at_status=$? at_failed=false
43531$at_check_filter
43532at_fn_diff_devnull "$at_stderr" || at_failed=:
43533echo >>"$at_stdout"; $as_echo "foo
43534Verify foo
43535" | \
43536  $at_diff - "$at_stdout" || at_failed=:
43537at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
43538$at_failed && at_fn_log_failure
43539$at_traceon; }
43540
43541              { set +x
43542$as_echo "$at_srcdir/verify.at:28:
43543mkdir gnu
43544(cd gnu
43545TEST_TAR_FORMAT=gnu
43546export TEST_TAR_FORMAT
43547TAR_OPTIONS=\"-H gnu\"
43548export TAR_OPTIONS
43549rm -rf *
43550
43551touch foo
43552tar -cvf archive.tar --verify foo
43553)"
43554at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
43555( $at_check_trace;
43556mkdir gnu
43557(cd gnu
43558TEST_TAR_FORMAT=gnu
43559export TEST_TAR_FORMAT
43560TAR_OPTIONS="-H gnu"
43561export TAR_OPTIONS
43562rm -rf *
43563
43564touch foo
43565tar -cvf archive.tar --verify foo
43566)
43567) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43568at_status=$? at_failed=false
43569$at_check_filter
43570at_fn_diff_devnull "$at_stderr" || at_failed=:
43571echo >>"$at_stdout"; $as_echo "foo
43572Verify foo
43573" | \
43574  $at_diff - "$at_stdout" || at_failed=:
43575at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
43576$at_failed && at_fn_log_failure
43577$at_traceon; }
43578
43579
43580
43581
43582  set +x
43583  $at_times_p && times >"$at_times_file"
43584) 5>&1 2>&1 7>&- | eval $at_tee_pipe
43585read at_status <"$at_status_file"
43586#AT_STOP_183
43587#AT_START_184
43588at_fn_group_banner 184 'volume.at:23' \
43589  "volume" "                                         " 28
43590at_xfail=no
43591      test -f $XFAILFILE && at_xfail=yes
43592(
43593  $as_echo "184. $at_setup_line: testing $at_desc ..."
43594  $at_traceon
43595
43596
43597
43598
43599
43600  { set +x
43601$as_echo "$at_srcdir/volume.at:26:
43602mkdir gnu
43603(cd gnu
43604TEST_TAR_FORMAT=gnu
43605export TEST_TAR_FORMAT
43606TAR_OPTIONS=\"-H gnu\"
43607export TAR_OPTIONS
43608rm -rf *
43609
43610tar -cf archive -V label -T /dev/null || exit 1
43611
43612tar xfV archive label || exit 1
43613tar xfV archive 'la?el' || exit 1
43614tar xfV archive 'l*l' || exit 1
43615
43616echo 1>&2 -----
43617tar xfV archive lab
43618test \$? = 2 || exit 1
43619echo 1>&2 -----
43620tar xfV archive bel
43621test \$? = 2 || exit 1
43622echo 1>&2 -----
43623tar xfV archive babel
43624test \$? = 2
43625)"
43626at_fn_check_prepare_notrace 'an embedded newline' "volume.at:26"
43627( $at_check_trace;
43628mkdir gnu
43629(cd gnu
43630TEST_TAR_FORMAT=gnu
43631export TEST_TAR_FORMAT
43632TAR_OPTIONS="-H gnu"
43633export TAR_OPTIONS
43634rm -rf *
43635
43636tar -cf archive -V label -T /dev/null || exit 1
43637
43638tar xfV archive label || exit 1
43639tar xfV archive 'la?el' || exit 1
43640tar xfV archive 'l*l' || exit 1
43641
43642echo 1>&2 -----
43643tar xfV archive lab
43644test $? = 2 || exit 1
43645echo 1>&2 -----
43646tar xfV archive bel
43647test $? = 2 || exit 1
43648echo 1>&2 -----
43649tar xfV archive babel
43650test $? = 2
43651)
43652) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43653at_status=$? at_failed=false
43654$at_check_filter
43655echo >>"$at_stderr"; $as_echo "-----
43656tar: Volume 'label' does not match 'lab'
43657tar: Error is not recoverable: exiting now
43658-----
43659tar: Volume 'label' does not match 'bel'
43660tar: Error is not recoverable: exiting now
43661-----
43662tar: Volume 'label' does not match 'babel'
43663tar: Error is not recoverable: exiting now
43664" | \
43665  $at_diff - "$at_stderr" || at_failed=:
43666at_fn_diff_devnull "$at_stdout" || at_failed=:
43667at_fn_check_status 0 $at_status "$at_srcdir/volume.at:26"
43668$at_failed && at_fn_log_failure
43669$at_traceon; }
43670
43671              { set +x
43672$as_echo "$at_srcdir/volume.at:26:
43673mkdir oldgnu
43674(cd oldgnu
43675TEST_TAR_FORMAT=oldgnu
43676export TEST_TAR_FORMAT
43677TAR_OPTIONS=\"-H oldgnu\"
43678export TAR_OPTIONS
43679rm -rf *
43680
43681tar -cf archive -V label -T /dev/null || exit 1
43682
43683tar xfV archive label || exit 1
43684tar xfV archive 'la?el' || exit 1
43685tar xfV archive 'l*l' || exit 1
43686
43687echo 1>&2 -----
43688tar xfV archive lab
43689test \$? = 2 || exit 1
43690echo 1>&2 -----
43691tar xfV archive bel
43692test \$? = 2 || exit 1
43693echo 1>&2 -----
43694tar xfV archive babel
43695test \$? = 2
43696)"
43697at_fn_check_prepare_notrace 'an embedded newline' "volume.at:26"
43698( $at_check_trace;
43699mkdir oldgnu
43700(cd oldgnu
43701TEST_TAR_FORMAT=oldgnu
43702export TEST_TAR_FORMAT
43703TAR_OPTIONS="-H oldgnu"
43704export TAR_OPTIONS
43705rm -rf *
43706
43707tar -cf archive -V label -T /dev/null || exit 1
43708
43709tar xfV archive label || exit 1
43710tar xfV archive 'la?el' || exit 1
43711tar xfV archive 'l*l' || exit 1
43712
43713echo 1>&2 -----
43714tar xfV archive lab
43715test $? = 2 || exit 1
43716echo 1>&2 -----
43717tar xfV archive bel
43718test $? = 2 || exit 1
43719echo 1>&2 -----
43720tar xfV archive babel
43721test $? = 2
43722)
43723) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43724at_status=$? at_failed=false
43725$at_check_filter
43726echo >>"$at_stderr"; $as_echo "-----
43727tar: Volume 'label' does not match 'lab'
43728tar: Error is not recoverable: exiting now
43729-----
43730tar: Volume 'label' does not match 'bel'
43731tar: Error is not recoverable: exiting now
43732-----
43733tar: Volume 'label' does not match 'babel'
43734tar: Error is not recoverable: exiting now
43735" | \
43736  $at_diff - "$at_stderr" || at_failed=:
43737at_fn_diff_devnull "$at_stdout" || at_failed=:
43738at_fn_check_status 0 $at_status "$at_srcdir/volume.at:26"
43739$at_failed && at_fn_log_failure
43740$at_traceon; }
43741
43742
43743
43744
43745  set +x
43746  $at_times_p && times >"$at_times_file"
43747) 5>&1 2>&1 7>&- | eval $at_tee_pipe
43748read at_status <"$at_status_file"
43749#AT_STOP_184
43750#AT_START_185
43751at_fn_group_banner 185 'volsize.at:29' \
43752  "volume header size" "                             " 28
43753at_xfail=no
43754      test -f $XFAILFILE && at_xfail=yes
43755(
43756  $as_echo "185. $at_setup_line: testing $at_desc ..."
43757  $at_traceon
43758
43759
43760
43761
43762
43763  { set +x
43764$as_echo "$at_srcdir/volsize.at:32:
43765mkdir v7
43766(cd v7
43767TEST_TAR_FORMAT=v7
43768export TEST_TAR_FORMAT
43769TAR_OPTIONS=\"-H v7\"
43770export TAR_OPTIONS
43771rm -rf *
43772
43773
43774test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
43775
43776
43777test -z \"\$TEST_DATA_DIR\" && exit 77
43778tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
43779
43780echo Short Listing
43781tar tf \$TEST_DATA_DIR/abc.tar
43782echo Verbose Listing
43783tar --utc -tvf \$TEST_DATA_DIR/abc.tar
43784echo Extracted directory
43785tar xf \$TEST_DATA_DIR/abc.tar
43786find abc|sort
43787)"
43788at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
43789( $at_check_trace;
43790mkdir v7
43791(cd v7
43792TEST_TAR_FORMAT=v7
43793export TEST_TAR_FORMAT
43794TAR_OPTIONS="-H v7"
43795export TAR_OPTIONS
43796rm -rf *
43797
43798
43799test -z "`sort < /dev/null 2>&1`" || exit 77
43800
43801
43802test -z "$TEST_DATA_DIR" && exit 77
43803tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
43804
43805echo Short Listing
43806tar tf $TEST_DATA_DIR/abc.tar
43807echo Verbose Listing
43808tar --utc -tvf $TEST_DATA_DIR/abc.tar
43809echo Extracted directory
43810tar xf $TEST_DATA_DIR/abc.tar
43811find abc|sort
43812)
43813) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43814at_status=$? at_failed=false
43815$at_check_filter
43816at_fn_diff_devnull "$at_stderr" || at_failed=:
43817echo >>"$at_stdout"; $as_echo "Short Listing
43818abc/not-a-file.gif
43819abc/CCC
43820Verbose Listing
43821V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
43822-rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
43823Extracted directory
43824abc
43825abc/CCC
43826" | \
43827  $at_diff - "$at_stdout" || at_failed=:
43828at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
43829$at_failed && at_fn_log_failure
43830$at_traceon; }
43831
43832              { set +x
43833$as_echo "$at_srcdir/volsize.at:32:
43834mkdir oldgnu
43835(cd oldgnu
43836TEST_TAR_FORMAT=oldgnu
43837export TEST_TAR_FORMAT
43838TAR_OPTIONS=\"-H oldgnu\"
43839export TAR_OPTIONS
43840rm -rf *
43841
43842
43843test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
43844
43845
43846test -z \"\$TEST_DATA_DIR\" && exit 77
43847tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
43848
43849echo Short Listing
43850tar tf \$TEST_DATA_DIR/abc.tar
43851echo Verbose Listing
43852tar --utc -tvf \$TEST_DATA_DIR/abc.tar
43853echo Extracted directory
43854tar xf \$TEST_DATA_DIR/abc.tar
43855find abc|sort
43856)"
43857at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
43858( $at_check_trace;
43859mkdir oldgnu
43860(cd oldgnu
43861TEST_TAR_FORMAT=oldgnu
43862export TEST_TAR_FORMAT
43863TAR_OPTIONS="-H oldgnu"
43864export TAR_OPTIONS
43865rm -rf *
43866
43867
43868test -z "`sort < /dev/null 2>&1`" || exit 77
43869
43870
43871test -z "$TEST_DATA_DIR" && exit 77
43872tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
43873
43874echo Short Listing
43875tar tf $TEST_DATA_DIR/abc.tar
43876echo Verbose Listing
43877tar --utc -tvf $TEST_DATA_DIR/abc.tar
43878echo Extracted directory
43879tar xf $TEST_DATA_DIR/abc.tar
43880find abc|sort
43881)
43882) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43883at_status=$? at_failed=false
43884$at_check_filter
43885at_fn_diff_devnull "$at_stderr" || at_failed=:
43886echo >>"$at_stdout"; $as_echo "Short Listing
43887abc/not-a-file.gif
43888abc/CCC
43889Verbose Listing
43890V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
43891-rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
43892Extracted directory
43893abc
43894abc/CCC
43895" | \
43896  $at_diff - "$at_stdout" || at_failed=:
43897at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
43898$at_failed && at_fn_log_failure
43899$at_traceon; }
43900
43901              { set +x
43902$as_echo "$at_srcdir/volsize.at:32:
43903mkdir ustar
43904(cd ustar
43905TEST_TAR_FORMAT=ustar
43906export TEST_TAR_FORMAT
43907TAR_OPTIONS=\"-H ustar\"
43908export TAR_OPTIONS
43909rm -rf *
43910
43911
43912test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
43913
43914
43915test -z \"\$TEST_DATA_DIR\" && exit 77
43916tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
43917
43918echo Short Listing
43919tar tf \$TEST_DATA_DIR/abc.tar
43920echo Verbose Listing
43921tar --utc -tvf \$TEST_DATA_DIR/abc.tar
43922echo Extracted directory
43923tar xf \$TEST_DATA_DIR/abc.tar
43924find abc|sort
43925)"
43926at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
43927( $at_check_trace;
43928mkdir ustar
43929(cd ustar
43930TEST_TAR_FORMAT=ustar
43931export TEST_TAR_FORMAT
43932TAR_OPTIONS="-H ustar"
43933export TAR_OPTIONS
43934rm -rf *
43935
43936
43937test -z "`sort < /dev/null 2>&1`" || exit 77
43938
43939
43940test -z "$TEST_DATA_DIR" && exit 77
43941tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
43942
43943echo Short Listing
43944tar tf $TEST_DATA_DIR/abc.tar
43945echo Verbose Listing
43946tar --utc -tvf $TEST_DATA_DIR/abc.tar
43947echo Extracted directory
43948tar xf $TEST_DATA_DIR/abc.tar
43949find abc|sort
43950)
43951) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43952at_status=$? at_failed=false
43953$at_check_filter
43954at_fn_diff_devnull "$at_stderr" || at_failed=:
43955echo >>"$at_stdout"; $as_echo "Short Listing
43956abc/not-a-file.gif
43957abc/CCC
43958Verbose Listing
43959V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
43960-rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
43961Extracted directory
43962abc
43963abc/CCC
43964" | \
43965  $at_diff - "$at_stdout" || at_failed=:
43966at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
43967$at_failed && at_fn_log_failure
43968$at_traceon; }
43969
43970              { set +x
43971$as_echo "$at_srcdir/volsize.at:32:
43972mkdir posix
43973(cd posix
43974TEST_TAR_FORMAT=posix
43975export TEST_TAR_FORMAT
43976TAR_OPTIONS=\"-H posix\"
43977export TAR_OPTIONS
43978rm -rf *
43979
43980
43981test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
43982
43983
43984test -z \"\$TEST_DATA_DIR\" && exit 77
43985tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
43986
43987echo Short Listing
43988tar tf \$TEST_DATA_DIR/abc.tar
43989echo Verbose Listing
43990tar --utc -tvf \$TEST_DATA_DIR/abc.tar
43991echo Extracted directory
43992tar xf \$TEST_DATA_DIR/abc.tar
43993find abc|sort
43994)"
43995at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
43996( $at_check_trace;
43997mkdir posix
43998(cd posix
43999TEST_TAR_FORMAT=posix
44000export TEST_TAR_FORMAT
44001TAR_OPTIONS="-H posix"
44002export TAR_OPTIONS
44003rm -rf *
44004
44005
44006test -z "`sort < /dev/null 2>&1`" || exit 77
44007
44008
44009test -z "$TEST_DATA_DIR" && exit 77
44010tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
44011
44012echo Short Listing
44013tar tf $TEST_DATA_DIR/abc.tar
44014echo Verbose Listing
44015tar --utc -tvf $TEST_DATA_DIR/abc.tar
44016echo Extracted directory
44017tar xf $TEST_DATA_DIR/abc.tar
44018find abc|sort
44019)
44020) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44021at_status=$? at_failed=false
44022$at_check_filter
44023at_fn_diff_devnull "$at_stderr" || at_failed=:
44024echo >>"$at_stdout"; $as_echo "Short Listing
44025abc/not-a-file.gif
44026abc/CCC
44027Verbose Listing
44028V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
44029-rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
44030Extracted directory
44031abc
44032abc/CCC
44033" | \
44034  $at_diff - "$at_stdout" || at_failed=:
44035at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
44036$at_failed && at_fn_log_failure
44037$at_traceon; }
44038
44039              { set +x
44040$as_echo "$at_srcdir/volsize.at:32:
44041mkdir gnu
44042(cd gnu
44043TEST_TAR_FORMAT=gnu
44044export TEST_TAR_FORMAT
44045TAR_OPTIONS=\"-H gnu\"
44046export TAR_OPTIONS
44047rm -rf *
44048
44049
44050test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
44051
44052
44053test -z \"\$TEST_DATA_DIR\" && exit 77
44054tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
44055
44056echo Short Listing
44057tar tf \$TEST_DATA_DIR/abc.tar
44058echo Verbose Listing
44059tar --utc -tvf \$TEST_DATA_DIR/abc.tar
44060echo Extracted directory
44061tar xf \$TEST_DATA_DIR/abc.tar
44062find abc|sort
44063)"
44064at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
44065( $at_check_trace;
44066mkdir gnu
44067(cd gnu
44068TEST_TAR_FORMAT=gnu
44069export TEST_TAR_FORMAT
44070TAR_OPTIONS="-H gnu"
44071export TAR_OPTIONS
44072rm -rf *
44073
44074
44075test -z "`sort < /dev/null 2>&1`" || exit 77
44076
44077
44078test -z "$TEST_DATA_DIR" && exit 77
44079tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
44080
44081echo Short Listing
44082tar tf $TEST_DATA_DIR/abc.tar
44083echo Verbose Listing
44084tar --utc -tvf $TEST_DATA_DIR/abc.tar
44085echo Extracted directory
44086tar xf $TEST_DATA_DIR/abc.tar
44087find abc|sort
44088)
44089) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44090at_status=$? at_failed=false
44091$at_check_filter
44092at_fn_diff_devnull "$at_stderr" || at_failed=:
44093echo >>"$at_stdout"; $as_echo "Short Listing
44094abc/not-a-file.gif
44095abc/CCC
44096Verbose Listing
44097V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
44098-rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
44099Extracted directory
44100abc
44101abc/CCC
44102" | \
44103  $at_diff - "$at_stdout" || at_failed=:
44104at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
44105$at_failed && at_fn_log_failure
44106$at_traceon; }
44107
44108
44109
44110
44111  set +x
44112  $at_times_p && times >"$at_times_file"
44113) 5>&1 2>&1 7>&- | eval $at_tee_pipe
44114read at_status <"$at_status_file"
44115#AT_STOP_185
44116#AT_START_186
44117at_fn_group_banner 186 'comprec.at:21' \
44118  "compressed format recognition" "                  " 29
44119at_xfail=no
44120      test -f $XFAILFILE && at_xfail=yes
44121(
44122  $as_echo "186. $at_setup_line: testing $at_desc ..."
44123  $at_traceon
44124
44125
44126
44127
44128
44129
44130  { set +x
44131$as_echo "$at_srcdir/comprec.at:25:
44132mkdir v7
44133(cd v7
44134TEST_TAR_FORMAT=v7
44135export TEST_TAR_FORMAT
44136TAR_OPTIONS=\"-H v7\"
44137export TAR_OPTIONS
44138rm -rf *
44139
44140
44141cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44142
44143genfile --length 10240 --file file1
44144echo \"separator\"
44145tar cfz archive file1
44146echo \"separator\"
44147mv file1 orig
44148tar xfv archive --warning=no-timestamp
44149cmp orig file1
44150)"
44151at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
44152( $at_check_trace;
44153mkdir v7
44154(cd v7
44155TEST_TAR_FORMAT=v7
44156export TEST_TAR_FORMAT
44157TAR_OPTIONS="-H v7"
44158export TAR_OPTIONS
44159rm -rf *
44160
44161
44162cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44163
44164genfile --length 10240 --file file1
44165echo "separator"
44166tar cfz archive file1
44167echo "separator"
44168mv file1 orig
44169tar xfv archive --warning=no-timestamp
44170cmp orig file1
44171)
44172) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44173at_status=$? at_failed=false
44174$at_check_filter
44175at_fn_diff_devnull "$at_stderr" || at_failed=:
44176echo >>"$at_stdout"; $as_echo "separator
44177separator
44178file1
44179" | \
44180  $at_diff - "$at_stdout" || at_failed=:
44181at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
44182$at_failed && at_fn_log_failure
44183$at_traceon; }
44184
44185              { set +x
44186$as_echo "$at_srcdir/comprec.at:25:
44187mkdir oldgnu
44188(cd oldgnu
44189TEST_TAR_FORMAT=oldgnu
44190export TEST_TAR_FORMAT
44191TAR_OPTIONS=\"-H oldgnu\"
44192export TAR_OPTIONS
44193rm -rf *
44194
44195
44196cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44197
44198genfile --length 10240 --file file1
44199echo \"separator\"
44200tar cfz archive file1
44201echo \"separator\"
44202mv file1 orig
44203tar xfv archive --warning=no-timestamp
44204cmp orig file1
44205)"
44206at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
44207( $at_check_trace;
44208mkdir oldgnu
44209(cd oldgnu
44210TEST_TAR_FORMAT=oldgnu
44211export TEST_TAR_FORMAT
44212TAR_OPTIONS="-H oldgnu"
44213export TAR_OPTIONS
44214rm -rf *
44215
44216
44217cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44218
44219genfile --length 10240 --file file1
44220echo "separator"
44221tar cfz archive file1
44222echo "separator"
44223mv file1 orig
44224tar xfv archive --warning=no-timestamp
44225cmp orig file1
44226)
44227) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44228at_status=$? at_failed=false
44229$at_check_filter
44230at_fn_diff_devnull "$at_stderr" || at_failed=:
44231echo >>"$at_stdout"; $as_echo "separator
44232separator
44233file1
44234" | \
44235  $at_diff - "$at_stdout" || at_failed=:
44236at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
44237$at_failed && at_fn_log_failure
44238$at_traceon; }
44239
44240              { set +x
44241$as_echo "$at_srcdir/comprec.at:25:
44242mkdir ustar
44243(cd ustar
44244TEST_TAR_FORMAT=ustar
44245export TEST_TAR_FORMAT
44246TAR_OPTIONS=\"-H ustar\"
44247export TAR_OPTIONS
44248rm -rf *
44249
44250
44251cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44252
44253genfile --length 10240 --file file1
44254echo \"separator\"
44255tar cfz archive file1
44256echo \"separator\"
44257mv file1 orig
44258tar xfv archive --warning=no-timestamp
44259cmp orig file1
44260)"
44261at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
44262( $at_check_trace;
44263mkdir ustar
44264(cd ustar
44265TEST_TAR_FORMAT=ustar
44266export TEST_TAR_FORMAT
44267TAR_OPTIONS="-H ustar"
44268export TAR_OPTIONS
44269rm -rf *
44270
44271
44272cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44273
44274genfile --length 10240 --file file1
44275echo "separator"
44276tar cfz archive file1
44277echo "separator"
44278mv file1 orig
44279tar xfv archive --warning=no-timestamp
44280cmp orig file1
44281)
44282) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44283at_status=$? at_failed=false
44284$at_check_filter
44285at_fn_diff_devnull "$at_stderr" || at_failed=:
44286echo >>"$at_stdout"; $as_echo "separator
44287separator
44288file1
44289" | \
44290  $at_diff - "$at_stdout" || at_failed=:
44291at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
44292$at_failed && at_fn_log_failure
44293$at_traceon; }
44294
44295              { set +x
44296$as_echo "$at_srcdir/comprec.at:25:
44297mkdir posix
44298(cd posix
44299TEST_TAR_FORMAT=posix
44300export TEST_TAR_FORMAT
44301TAR_OPTIONS=\"-H posix\"
44302export TAR_OPTIONS
44303rm -rf *
44304
44305
44306cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44307
44308genfile --length 10240 --file file1
44309echo \"separator\"
44310tar cfz archive file1
44311echo \"separator\"
44312mv file1 orig
44313tar xfv archive --warning=no-timestamp
44314cmp orig file1
44315)"
44316at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
44317( $at_check_trace;
44318mkdir posix
44319(cd posix
44320TEST_TAR_FORMAT=posix
44321export TEST_TAR_FORMAT
44322TAR_OPTIONS="-H posix"
44323export TAR_OPTIONS
44324rm -rf *
44325
44326
44327cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44328
44329genfile --length 10240 --file file1
44330echo "separator"
44331tar cfz archive file1
44332echo "separator"
44333mv file1 orig
44334tar xfv archive --warning=no-timestamp
44335cmp orig file1
44336)
44337) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44338at_status=$? at_failed=false
44339$at_check_filter
44340at_fn_diff_devnull "$at_stderr" || at_failed=:
44341echo >>"$at_stdout"; $as_echo "separator
44342separator
44343file1
44344" | \
44345  $at_diff - "$at_stdout" || at_failed=:
44346at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
44347$at_failed && at_fn_log_failure
44348$at_traceon; }
44349
44350              { set +x
44351$as_echo "$at_srcdir/comprec.at:25:
44352mkdir gnu
44353(cd gnu
44354TEST_TAR_FORMAT=gnu
44355export TEST_TAR_FORMAT
44356TAR_OPTIONS=\"-H gnu\"
44357export TAR_OPTIONS
44358rm -rf *
44359
44360
44361cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44362
44363genfile --length 10240 --file file1
44364echo \"separator\"
44365tar cfz archive file1
44366echo \"separator\"
44367mv file1 orig
44368tar xfv archive --warning=no-timestamp
44369cmp orig file1
44370)"
44371at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
44372( $at_check_trace;
44373mkdir gnu
44374(cd gnu
44375TEST_TAR_FORMAT=gnu
44376export TEST_TAR_FORMAT
44377TAR_OPTIONS="-H gnu"
44378export TAR_OPTIONS
44379rm -rf *
44380
44381
44382cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
44383
44384genfile --length 10240 --file file1
44385echo "separator"
44386tar cfz archive file1
44387echo "separator"
44388mv file1 orig
44389tar xfv archive --warning=no-timestamp
44390cmp orig file1
44391)
44392) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44393at_status=$? at_failed=false
44394$at_check_filter
44395at_fn_diff_devnull "$at_stderr" || at_failed=:
44396echo >>"$at_stdout"; $as_echo "separator
44397separator
44398file1
44399" | \
44400  $at_diff - "$at_stdout" || at_failed=:
44401at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
44402$at_failed && at_fn_log_failure
44403$at_traceon; }
44404
44405
44406
44407
44408  set +x
44409  $at_times_p && times >"$at_times_file"
44410) 5>&1 2>&1 7>&- | eval $at_tee_pipe
44411read at_status <"$at_status_file"
44412#AT_STOP_186
44413#AT_START_187
44414at_fn_group_banner 187 'shortfile.at:26' \
44415  "short input files" "                              " 29
44416at_xfail=no
44417      test -f $XFAILFILE && at_xfail=yes
44418(
44419  $as_echo "187. $at_setup_line: testing $at_desc ..."
44420  $at_traceon
44421
44422
44423
44424
44425
44426  { set +x
44427$as_echo "$at_srcdir/shortfile.at:29:
44428mkdir gnu
44429(cd gnu
44430TEST_TAR_FORMAT=gnu
44431export TEST_TAR_FORMAT
44432TAR_OPTIONS=\"-H gnu\"
44433export TAR_OPTIONS
44434rm -rf *
44435
44436genfile --length 511 --file foo || exit 5
44437tar tf foo
44438)"
44439at_fn_check_prepare_notrace 'an embedded newline' "shortfile.at:29"
44440( $at_check_trace;
44441mkdir gnu
44442(cd gnu
44443TEST_TAR_FORMAT=gnu
44444export TEST_TAR_FORMAT
44445TAR_OPTIONS="-H gnu"
44446export TAR_OPTIONS
44447rm -rf *
44448
44449genfile --length 511 --file foo || exit 5
44450tar tf foo
44451)
44452) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44453at_status=$? at_failed=false
44454$at_check_filter
44455echo >>"$at_stderr"; $as_echo "tar: This does not look like a tar archive
44456tar: Exiting with failure status due to previous errors
44457" | \
44458  $at_diff - "$at_stderr" || at_failed=:
44459at_fn_diff_devnull "$at_stdout" || at_failed=:
44460at_fn_check_status 2 $at_status "$at_srcdir/shortfile.at:29"
44461$at_failed && at_fn_log_failure
44462$at_traceon; }
44463
44464
44465
44466
44467  set +x
44468  $at_times_p && times >"$at_times_file"
44469) 5>&1 2>&1 7>&- | eval $at_tee_pipe
44470read at_status <"$at_status_file"
44471#AT_STOP_187
44472#AT_START_188
44473at_fn_group_banner 188 'shortupd.at:31' \
44474  "updating short archives" "                        " 29
44475at_xfail=no
44476      test -f $XFAILFILE && at_xfail=yes
44477(
44478  $as_echo "188. $at_setup_line: testing $at_desc ..."
44479  $at_traceon
44480
44481
44482
44483
44484
44485  { set +x
44486$as_echo "$at_srcdir/shortupd.at:34:
44487mkdir v7
44488(cd v7
44489TEST_TAR_FORMAT=v7
44490export TEST_TAR_FORMAT
44491TAR_OPTIONS=\"-H v7\"
44492export TAR_OPTIONS
44493rm -rf *
44494
44495touch foo
44496tar uf archive foo
44497)"
44498at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
44499( $at_check_trace;
44500mkdir v7
44501(cd v7
44502TEST_TAR_FORMAT=v7
44503export TEST_TAR_FORMAT
44504TAR_OPTIONS="-H v7"
44505export TAR_OPTIONS
44506rm -rf *
44507
44508touch foo
44509tar uf archive foo
44510)
44511) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44512at_status=$? at_failed=false
44513$at_check_filter
44514at_fn_diff_devnull "$at_stderr" || at_failed=:
44515at_fn_diff_devnull "$at_stdout" || at_failed=:
44516at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
44517$at_failed && at_fn_log_failure
44518$at_traceon; }
44519
44520              { set +x
44521$as_echo "$at_srcdir/shortupd.at:34:
44522mkdir oldgnu
44523(cd oldgnu
44524TEST_TAR_FORMAT=oldgnu
44525export TEST_TAR_FORMAT
44526TAR_OPTIONS=\"-H oldgnu\"
44527export TAR_OPTIONS
44528rm -rf *
44529
44530touch foo
44531tar uf archive foo
44532)"
44533at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
44534( $at_check_trace;
44535mkdir oldgnu
44536(cd oldgnu
44537TEST_TAR_FORMAT=oldgnu
44538export TEST_TAR_FORMAT
44539TAR_OPTIONS="-H oldgnu"
44540export TAR_OPTIONS
44541rm -rf *
44542
44543touch foo
44544tar uf archive foo
44545)
44546) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44547at_status=$? at_failed=false
44548$at_check_filter
44549at_fn_diff_devnull "$at_stderr" || at_failed=:
44550at_fn_diff_devnull "$at_stdout" || at_failed=:
44551at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
44552$at_failed && at_fn_log_failure
44553$at_traceon; }
44554
44555              { set +x
44556$as_echo "$at_srcdir/shortupd.at:34:
44557mkdir ustar
44558(cd ustar
44559TEST_TAR_FORMAT=ustar
44560export TEST_TAR_FORMAT
44561TAR_OPTIONS=\"-H ustar\"
44562export TAR_OPTIONS
44563rm -rf *
44564
44565touch foo
44566tar uf archive foo
44567)"
44568at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
44569( $at_check_trace;
44570mkdir ustar
44571(cd ustar
44572TEST_TAR_FORMAT=ustar
44573export TEST_TAR_FORMAT
44574TAR_OPTIONS="-H ustar"
44575export TAR_OPTIONS
44576rm -rf *
44577
44578touch foo
44579tar uf archive foo
44580)
44581) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44582at_status=$? at_failed=false
44583$at_check_filter
44584at_fn_diff_devnull "$at_stderr" || at_failed=:
44585at_fn_diff_devnull "$at_stdout" || at_failed=:
44586at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
44587$at_failed && at_fn_log_failure
44588$at_traceon; }
44589
44590              { set +x
44591$as_echo "$at_srcdir/shortupd.at:34:
44592mkdir posix
44593(cd posix
44594TEST_TAR_FORMAT=posix
44595export TEST_TAR_FORMAT
44596TAR_OPTIONS=\"-H posix\"
44597export TAR_OPTIONS
44598rm -rf *
44599
44600touch foo
44601tar uf archive foo
44602)"
44603at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
44604( $at_check_trace;
44605mkdir posix
44606(cd posix
44607TEST_TAR_FORMAT=posix
44608export TEST_TAR_FORMAT
44609TAR_OPTIONS="-H posix"
44610export TAR_OPTIONS
44611rm -rf *
44612
44613touch foo
44614tar uf archive foo
44615)
44616) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44617at_status=$? at_failed=false
44618$at_check_filter
44619at_fn_diff_devnull "$at_stderr" || at_failed=:
44620at_fn_diff_devnull "$at_stdout" || at_failed=:
44621at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
44622$at_failed && at_fn_log_failure
44623$at_traceon; }
44624
44625              { set +x
44626$as_echo "$at_srcdir/shortupd.at:34:
44627mkdir gnu
44628(cd gnu
44629TEST_TAR_FORMAT=gnu
44630export TEST_TAR_FORMAT
44631TAR_OPTIONS=\"-H gnu\"
44632export TAR_OPTIONS
44633rm -rf *
44634
44635touch foo
44636tar uf archive foo
44637)"
44638at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
44639( $at_check_trace;
44640mkdir gnu
44641(cd gnu
44642TEST_TAR_FORMAT=gnu
44643export TEST_TAR_FORMAT
44644TAR_OPTIONS="-H gnu"
44645export TAR_OPTIONS
44646rm -rf *
44647
44648touch foo
44649tar uf archive foo
44650)
44651) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44652at_status=$? at_failed=false
44653$at_check_filter
44654at_fn_diff_devnull "$at_stderr" || at_failed=:
44655at_fn_diff_devnull "$at_stdout" || at_failed=:
44656at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
44657$at_failed && at_fn_log_failure
44658$at_traceon; }
44659
44660
44661
44662
44663  set +x
44664  $at_times_p && times >"$at_times_file"
44665) 5>&1 2>&1 7>&- | eval $at_tee_pipe
44666read at_status <"$at_status_file"
44667#AT_STOP_188
44668#AT_START_189
44669at_fn_group_banner 189 'truncate.at:29' \
44670  "truncate" "                                       " 29
44671at_xfail=no
44672      test -f $XFAILFILE && at_xfail=yes
44673(
44674  $as_echo "189. $at_setup_line: testing $at_desc ..."
44675  $at_traceon
44676
44677
44678
44679
44680
44681  { set +x
44682$as_echo "$at_srcdir/truncate.at:32:
44683mkdir v7
44684(cd v7
44685TEST_TAR_FORMAT=v7
44686export TEST_TAR_FORMAT
44687TAR_OPTIONS=\"-H v7\"
44688export TAR_OPTIONS
44689rm -rf *
44690
44691genfile --file foo --length 200k
44692genfile --file baz
44693genfile --run --checkpoint 10 --length 195k --truncate foo -- \\
44694  tar -vcf bar foo baz
44695echo Exit status: \$?
44696echo separator
44697genfile --file foo --seek 195k --length 5k --pattern=zeros
44698tar dvf bar|sed '/foo: Mod time differs/d')"
44699at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
44700( $at_check_trace;
44701mkdir v7
44702(cd v7
44703TEST_TAR_FORMAT=v7
44704export TEST_TAR_FORMAT
44705TAR_OPTIONS="-H v7"
44706export TAR_OPTIONS
44707rm -rf *
44708
44709genfile --file foo --length 200k
44710genfile --file baz
44711genfile --run --checkpoint 10 --length 195k --truncate foo -- \
44712  tar -vcf bar foo baz
44713echo Exit status: $?
44714echo separator
44715genfile --file foo --seek 195k --length 5k --pattern=zeros
44716tar dvf bar|sed '/foo: Mod time differs/d')
44717) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44718at_status=$? at_failed=false
44719$at_check_filter
44720echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
44721" | \
44722  $at_diff - "$at_stderr" || at_failed=:
44723echo >>"$at_stdout"; $as_echo "foo
44724baz
44725Exit status: 1
44726separator
44727foo
44728baz
44729" | \
44730  $at_diff - "$at_stdout" || at_failed=:
44731at_fn_check_status 0 $at_status "$at_srcdir/truncate.at:32"
44732$at_failed && at_fn_log_failure
44733$at_traceon; }
44734
44735              { set +x
44736$as_echo "$at_srcdir/truncate.at:32:
44737mkdir oldgnu
44738(cd oldgnu
44739TEST_TAR_FORMAT=oldgnu
44740export TEST_TAR_FORMAT
44741TAR_OPTIONS=\"-H oldgnu\"
44742export TAR_OPTIONS
44743rm -rf *
44744
44745genfile --file foo --length 200k
44746genfile --file baz
44747genfile --run --checkpoint 10 --length 195k --truncate foo -- \\
44748  tar -vcf bar foo baz
44749echo Exit status: \$?
44750echo separator
44751genfile --file foo --seek 195k --length 5k --pattern=zeros
44752tar dvf bar|sed '/foo: Mod time differs/d')"
44753at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
44754( $at_check_trace;
44755mkdir oldgnu
44756(cd oldgnu
44757TEST_TAR_FORMAT=oldgnu
44758export TEST_TAR_FORMAT
44759TAR_OPTIONS="-H oldgnu"
44760export TAR_OPTIONS
44761rm -rf *
44762
44763genfile --file foo --length 200k
44764genfile --file baz
44765genfile --run --checkpoint 10 --length 195k --truncate foo -- \
44766  tar -vcf bar foo baz
44767echo Exit status: $?
44768echo separator
44769genfile --file foo --seek 195k --length 5k --pattern=zeros
44770tar dvf bar|sed '/foo: Mod time differs/d')
44771) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44772at_status=$? at_failed=false
44773$at_check_filter
44774echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
44775" | \
44776  $at_diff - "$at_stderr" || at_failed=:
44777echo >>"$at_stdout"; $as_echo "foo
44778baz
44779Exit status: 1
44780separator
44781foo
44782baz
44783" | \
44784  $at_diff - "$at_stdout" || at_failed=:
44785at_fn_check_status 0 $at_status "$at_srcdir/truncate.at:32"
44786$at_failed && at_fn_log_failure
44787$at_traceon; }
44788
44789              { set +x
44790$as_echo "$at_srcdir/truncate.at:32:
44791mkdir ustar
44792(cd ustar
44793TEST_TAR_FORMAT=ustar
44794export TEST_TAR_FORMAT
44795TAR_OPTIONS=\"-H ustar\"
44796export TAR_OPTIONS
44797rm -rf *
44798
44799genfile --file foo --length 200k
44800genfile --file baz
44801genfile --run --checkpoint 10 --length 195k --truncate foo -- \\
44802  tar -vcf bar foo baz
44803echo Exit status: \$?
44804echo separator
44805genfile --file foo --seek 195k --length 5k --pattern=zeros
44806tar dvf bar|sed '/foo: Mod time differs/d')"
44807at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
44808( $at_check_trace;
44809mkdir ustar
44810(cd ustar
44811TEST_TAR_FORMAT=ustar
44812export TEST_TAR_FORMAT
44813TAR_OPTIONS="-H ustar"
44814export TAR_OPTIONS
44815rm -rf *
44816
44817genfile --file foo --length 200k
44818genfile --file baz
44819genfile --run --checkpoint 10 --length 195k --truncate foo -- \
44820  tar -vcf bar foo baz
44821echo Exit status: $?
44822echo separator
44823genfile --file foo --seek 195k --length 5k --pattern=zeros
44824tar dvf bar|sed '/foo: Mod time differs/d')
44825) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44826at_status=$? at_failed=false
44827$at_check_filter
44828echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
44829" | \
44830  $at_diff - "$at_stderr" || at_failed=:
44831echo >>"$at_stdout"; $as_echo "foo
44832baz
44833Exit status: 1
44834separator
44835foo
44836baz
44837" | \
44838  $at_diff - "$at_stdout" || at_failed=:
44839at_fn_check_status 0 $at_status "$at_srcdir/truncate.at:32"
44840$at_failed && at_fn_log_failure
44841$at_traceon; }
44842
44843              { set +x
44844$as_echo "$at_srcdir/truncate.at:32:
44845mkdir posix
44846(cd posix
44847TEST_TAR_FORMAT=posix
44848export TEST_TAR_FORMAT
44849TAR_OPTIONS=\"-H posix\"
44850export TAR_OPTIONS
44851rm -rf *
44852
44853genfile --file foo --length 200k
44854genfile --file baz
44855genfile --run --checkpoint 10 --length 195k --truncate foo -- \\
44856  tar -vcf bar foo baz
44857echo Exit status: \$?
44858echo separator
44859genfile --file foo --seek 195k --length 5k --pattern=zeros
44860tar dvf bar|sed '/foo: Mod time differs/d')"
44861at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
44862( $at_check_trace;
44863mkdir posix
44864(cd posix
44865TEST_TAR_FORMAT=posix
44866export TEST_TAR_FORMAT
44867TAR_OPTIONS="-H posix"
44868export TAR_OPTIONS
44869rm -rf *
44870
44871genfile --file foo --length 200k
44872genfile --file baz
44873genfile --run --checkpoint 10 --length 195k --truncate foo -- \
44874  tar -vcf bar foo baz
44875echo Exit status: $?
44876echo separator
44877genfile --file foo --seek 195k --length 5k --pattern=zeros
44878tar dvf bar|sed '/foo: Mod time differs/d')
44879) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44880at_status=$? at_failed=false
44881$at_check_filter
44882echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
44883" | \
44884  $at_diff - "$at_stderr" || at_failed=:
44885echo >>"$at_stdout"; $as_echo "foo
44886baz
44887Exit status: 1
44888separator
44889foo
44890baz
44891" | \
44892  $at_diff - "$at_stdout" || at_failed=:
44893at_fn_check_status 0 $at_status "$at_srcdir/truncate.at:32"
44894$at_failed && at_fn_log_failure
44895$at_traceon; }
44896
44897              { set +x
44898$as_echo "$at_srcdir/truncate.at:32:
44899mkdir gnu
44900(cd gnu
44901TEST_TAR_FORMAT=gnu
44902export TEST_TAR_FORMAT
44903TAR_OPTIONS=\"-H gnu\"
44904export TAR_OPTIONS
44905rm -rf *
44906
44907genfile --file foo --length 200k
44908genfile --file baz
44909genfile --run --checkpoint 10 --length 195k --truncate foo -- \\
44910  tar -vcf bar foo baz
44911echo Exit status: \$?
44912echo separator
44913genfile --file foo --seek 195k --length 5k --pattern=zeros
44914tar dvf bar|sed '/foo: Mod time differs/d')"
44915at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
44916( $at_check_trace;
44917mkdir gnu
44918(cd gnu
44919TEST_TAR_FORMAT=gnu
44920export TEST_TAR_FORMAT
44921TAR_OPTIONS="-H gnu"
44922export TAR_OPTIONS
44923rm -rf *
44924
44925genfile --file foo --length 200k
44926genfile --file baz
44927genfile --run --checkpoint 10 --length 195k --truncate foo -- \
44928  tar -vcf bar foo baz
44929echo Exit status: $?
44930echo separator
44931genfile --file foo --seek 195k --length 5k --pattern=zeros
44932tar dvf bar|sed '/foo: Mod time differs/d')
44933) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44934at_status=$? at_failed=false
44935$at_check_filter
44936echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
44937" | \
44938  $at_diff - "$at_stderr" || at_failed=:
44939echo >>"$at_stdout"; $as_echo "foo
44940baz
44941Exit status: 1
44942separator
44943foo
44944baz
44945" | \
44946  $at_diff - "$at_stdout" || at_failed=:
44947at_fn_check_status 0 $at_status "$at_srcdir/truncate.at:32"
44948$at_failed && at_fn_log_failure
44949$at_traceon; }
44950
44951
44952
44953
44954  set +x
44955  $at_times_p && times >"$at_times_file"
44956) 5>&1 2>&1 7>&- | eval $at_tee_pipe
44957read at_status <"$at_status_file"
44958#AT_STOP_189
44959#AT_START_190
44960at_fn_group_banner 190 'grow.at:24' \
44961  "grow" "                                           " 29
44962at_xfail=no
44963      test -f $XFAILFILE && at_xfail=yes
44964(
44965  $as_echo "190. $at_setup_line: testing $at_desc ..."
44966  $at_traceon
44967
44968
44969
44970
44971
44972  { set +x
44973$as_echo "$at_srcdir/grow.at:27:
44974mkdir v7
44975(cd v7
44976TEST_TAR_FORMAT=v7
44977export TEST_TAR_FORMAT
44978TAR_OPTIONS=\"-H v7\"
44979export TAR_OPTIONS
44980rm -rf *
44981
44982genfile --file foo --length 50000k
44983genfile --file baz
44984genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
44985)"
44986at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
44987( $at_check_trace;
44988mkdir v7
44989(cd v7
44990TEST_TAR_FORMAT=v7
44991export TEST_TAR_FORMAT
44992TAR_OPTIONS="-H v7"
44993export TAR_OPTIONS
44994rm -rf *
44995
44996genfile --file foo --length 50000k
44997genfile --file baz
44998genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
44999)
45000) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45001at_status=$? at_failed=false
45002$at_check_filter
45003echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
45004" | \
45005  $at_diff - "$at_stderr" || at_failed=:
45006echo >>"$at_stdout"; $as_echo "foo
45007baz
45008" | \
45009  $at_diff - "$at_stdout" || at_failed=:
45010at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
45011$at_failed && at_fn_log_failure
45012$at_traceon; }
45013
45014              { set +x
45015$as_echo "$at_srcdir/grow.at:27:
45016mkdir oldgnu
45017(cd oldgnu
45018TEST_TAR_FORMAT=oldgnu
45019export TEST_TAR_FORMAT
45020TAR_OPTIONS=\"-H oldgnu\"
45021export TAR_OPTIONS
45022rm -rf *
45023
45024genfile --file foo --length 50000k
45025genfile --file baz
45026genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
45027)"
45028at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
45029( $at_check_trace;
45030mkdir oldgnu
45031(cd oldgnu
45032TEST_TAR_FORMAT=oldgnu
45033export TEST_TAR_FORMAT
45034TAR_OPTIONS="-H oldgnu"
45035export TAR_OPTIONS
45036rm -rf *
45037
45038genfile --file foo --length 50000k
45039genfile --file baz
45040genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
45041)
45042) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45043at_status=$? at_failed=false
45044$at_check_filter
45045echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
45046" | \
45047  $at_diff - "$at_stderr" || at_failed=:
45048echo >>"$at_stdout"; $as_echo "foo
45049baz
45050" | \
45051  $at_diff - "$at_stdout" || at_failed=:
45052at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
45053$at_failed && at_fn_log_failure
45054$at_traceon; }
45055
45056              { set +x
45057$as_echo "$at_srcdir/grow.at:27:
45058mkdir ustar
45059(cd ustar
45060TEST_TAR_FORMAT=ustar
45061export TEST_TAR_FORMAT
45062TAR_OPTIONS=\"-H ustar\"
45063export TAR_OPTIONS
45064rm -rf *
45065
45066genfile --file foo --length 50000k
45067genfile --file baz
45068genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
45069)"
45070at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
45071( $at_check_trace;
45072mkdir ustar
45073(cd ustar
45074TEST_TAR_FORMAT=ustar
45075export TEST_TAR_FORMAT
45076TAR_OPTIONS="-H ustar"
45077export TAR_OPTIONS
45078rm -rf *
45079
45080genfile --file foo --length 50000k
45081genfile --file baz
45082genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
45083)
45084) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45085at_status=$? at_failed=false
45086$at_check_filter
45087echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
45088" | \
45089  $at_diff - "$at_stderr" || at_failed=:
45090echo >>"$at_stdout"; $as_echo "foo
45091baz
45092" | \
45093  $at_diff - "$at_stdout" || at_failed=:
45094at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
45095$at_failed && at_fn_log_failure
45096$at_traceon; }
45097
45098              { set +x
45099$as_echo "$at_srcdir/grow.at:27:
45100mkdir posix
45101(cd posix
45102TEST_TAR_FORMAT=posix
45103export TEST_TAR_FORMAT
45104TAR_OPTIONS=\"-H posix\"
45105export TAR_OPTIONS
45106rm -rf *
45107
45108genfile --file foo --length 50000k
45109genfile --file baz
45110genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
45111)"
45112at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
45113( $at_check_trace;
45114mkdir posix
45115(cd posix
45116TEST_TAR_FORMAT=posix
45117export TEST_TAR_FORMAT
45118TAR_OPTIONS="-H posix"
45119export TAR_OPTIONS
45120rm -rf *
45121
45122genfile --file foo --length 50000k
45123genfile --file baz
45124genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
45125)
45126) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45127at_status=$? at_failed=false
45128$at_check_filter
45129echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
45130" | \
45131  $at_diff - "$at_stderr" || at_failed=:
45132echo >>"$at_stdout"; $as_echo "foo
45133baz
45134" | \
45135  $at_diff - "$at_stdout" || at_failed=:
45136at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
45137$at_failed && at_fn_log_failure
45138$at_traceon; }
45139
45140              { set +x
45141$as_echo "$at_srcdir/grow.at:27:
45142mkdir gnu
45143(cd gnu
45144TEST_TAR_FORMAT=gnu
45145export TEST_TAR_FORMAT
45146TAR_OPTIONS=\"-H gnu\"
45147export TAR_OPTIONS
45148rm -rf *
45149
45150genfile --file foo --length 50000k
45151genfile --file baz
45152genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
45153)"
45154at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
45155( $at_check_trace;
45156mkdir gnu
45157(cd gnu
45158TEST_TAR_FORMAT=gnu
45159export TEST_TAR_FORMAT
45160TAR_OPTIONS="-H gnu"
45161export TAR_OPTIONS
45162rm -rf *
45163
45164genfile --file foo --length 50000k
45165genfile --file baz
45166genfile --run=10 --checkpoint 10 --length 1024 --append foo -- tar -vcf bar foo baz
45167)
45168) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45169at_status=$? at_failed=false
45170$at_check_filter
45171echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
45172" | \
45173  $at_diff - "$at_stderr" || at_failed=:
45174echo >>"$at_stdout"; $as_echo "foo
45175baz
45176" | \
45177  $at_diff - "$at_stdout" || at_failed=:
45178at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
45179$at_failed && at_fn_log_failure
45180$at_traceon; }
45181
45182
45183
45184
45185  set +x
45186  $at_times_p && times >"$at_times_file"
45187) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45188read at_status <"$at_status_file"
45189#AT_STOP_190
45190#AT_START_191
45191at_fn_group_banner 191 'sigpipe.at:21' \
45192  "sigpipe handling" "                               " 29
45193at_xfail=no
45194(
45195  $as_echo "191. $at_setup_line: testing $at_desc ..."
45196  $at_traceon
45197
45198
45199
45200# Description: Tar 1.23 ignored sigpipe which lead to spurious "write
45201# error" diagnostics when piping output to another programs.
45202# Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
45203# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html
45204#             <20100319184141.GC30047@wo.int.altlinux.org>
45205
45206{ set +x
45207$as_echo "$at_srcdir/sigpipe.at:30:
45208
45209case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
45210?*) exit 77;;
45211esac
45212
45213
45214genfile --length 2048 --file first
45215genfile --length 2048 --file second
45216genfile --length 2049 --file third
45217
45218tar cf archive first second third
45219
45220# Discard diagnostics that some shells generate about broken pipes.
45221(tar tf archive 2>&3 | :) 3>&2 2>/dev/null
45222"
45223at_fn_check_prepare_notrace 'a `...` command substitution' "sigpipe.at:30"
45224( $at_check_trace;
45225
45226case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
45227?*) exit 77;;
45228esac
45229
45230
45231genfile --length 2048 --file first
45232genfile --length 2048 --file second
45233genfile --length 2049 --file third
45234
45235tar cf archive first second third
45236
45237# Discard diagnostics that some shells generate about broken pipes.
45238(tar tf archive 2>&3 | :) 3>&2 2>/dev/null
45239
45240) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45241at_status=$? at_failed=false
45242$at_check_filter
45243at_fn_diff_devnull "$at_stderr" || at_failed=:
45244at_fn_diff_devnull "$at_stdout" || at_failed=:
45245at_fn_check_status 0 $at_status "$at_srcdir/sigpipe.at:30"
45246$at_failed && at_fn_log_failure
45247$at_traceon; }
45248
45249
45250  set +x
45251  $at_times_p && times >"$at_times_file"
45252) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45253read at_status <"$at_status_file"
45254#AT_STOP_191
45255#AT_START_192
45256at_fn_group_banner 192 'comperr.at:18' \
45257  "compressor program failure" "                     " 29
45258at_xfail=no
45259      test -f $XFAILFILE && at_xfail=yes
45260(
45261  $as_echo "192. $at_setup_line: testing $at_desc ..."
45262  $at_traceon
45263
45264
45265
45266# Description: If the --use-compress-program fails, then it is unsafe
45267# to assume that the created archive is OK.  Tar should fail with a
45268# prominent error message.
45269# Reported by: Ole Tange <tange@gnu.org>
45270# References: <CA+4vN7wLZ-+LK1t7WMkM_b9f3mV9JTnSuPamPn2ciX5PTN=9Xw@mail.gmail.com>,
45271#        http://lists.gnu.org/archive/html/bug-tar/2015-03/msg00002.html
45272
45273
45274
45275  { set +x
45276$as_echo "$at_srcdir/comperr.at:28:
45277mkdir v7
45278(cd v7
45279TEST_TAR_FORMAT=v7
45280export TEST_TAR_FORMAT
45281TAR_OPTIONS=\"-H v7\"
45282export TAR_OPTIONS
45283rm -rf *
45284
45285tar --use-compress-program false -cf a.tar . 2>err
45286rc=\$?
45287sed -n '\$p' err
45288exit \$rc
45289)"
45290at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
45291( $at_check_trace;
45292mkdir v7
45293(cd v7
45294TEST_TAR_FORMAT=v7
45295export TEST_TAR_FORMAT
45296TAR_OPTIONS="-H v7"
45297export TAR_OPTIONS
45298rm -rf *
45299
45300tar --use-compress-program false -cf a.tar . 2>err
45301rc=$?
45302sed -n '$p' err
45303exit $rc
45304)
45305) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45306at_status=$? at_failed=false
45307$at_check_filter
45308at_fn_diff_devnull "$at_stderr" || at_failed=:
45309echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
45310" | \
45311  $at_diff - "$at_stdout" || at_failed=:
45312at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
45313$at_failed && at_fn_log_failure
45314$at_traceon; }
45315
45316              { set +x
45317$as_echo "$at_srcdir/comperr.at:28:
45318mkdir oldgnu
45319(cd oldgnu
45320TEST_TAR_FORMAT=oldgnu
45321export TEST_TAR_FORMAT
45322TAR_OPTIONS=\"-H oldgnu\"
45323export TAR_OPTIONS
45324rm -rf *
45325
45326tar --use-compress-program false -cf a.tar . 2>err
45327rc=\$?
45328sed -n '\$p' err
45329exit \$rc
45330)"
45331at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
45332( $at_check_trace;
45333mkdir oldgnu
45334(cd oldgnu
45335TEST_TAR_FORMAT=oldgnu
45336export TEST_TAR_FORMAT
45337TAR_OPTIONS="-H oldgnu"
45338export TAR_OPTIONS
45339rm -rf *
45340
45341tar --use-compress-program false -cf a.tar . 2>err
45342rc=$?
45343sed -n '$p' err
45344exit $rc
45345)
45346) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45347at_status=$? at_failed=false
45348$at_check_filter
45349at_fn_diff_devnull "$at_stderr" || at_failed=:
45350echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
45351" | \
45352  $at_diff - "$at_stdout" || at_failed=:
45353at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
45354$at_failed && at_fn_log_failure
45355$at_traceon; }
45356
45357              { set +x
45358$as_echo "$at_srcdir/comperr.at:28:
45359mkdir ustar
45360(cd ustar
45361TEST_TAR_FORMAT=ustar
45362export TEST_TAR_FORMAT
45363TAR_OPTIONS=\"-H ustar\"
45364export TAR_OPTIONS
45365rm -rf *
45366
45367tar --use-compress-program false -cf a.tar . 2>err
45368rc=\$?
45369sed -n '\$p' err
45370exit \$rc
45371)"
45372at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
45373( $at_check_trace;
45374mkdir ustar
45375(cd ustar
45376TEST_TAR_FORMAT=ustar
45377export TEST_TAR_FORMAT
45378TAR_OPTIONS="-H ustar"
45379export TAR_OPTIONS
45380rm -rf *
45381
45382tar --use-compress-program false -cf a.tar . 2>err
45383rc=$?
45384sed -n '$p' err
45385exit $rc
45386)
45387) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45388at_status=$? at_failed=false
45389$at_check_filter
45390at_fn_diff_devnull "$at_stderr" || at_failed=:
45391echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
45392" | \
45393  $at_diff - "$at_stdout" || at_failed=:
45394at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
45395$at_failed && at_fn_log_failure
45396$at_traceon; }
45397
45398              { set +x
45399$as_echo "$at_srcdir/comperr.at:28:
45400mkdir posix
45401(cd posix
45402TEST_TAR_FORMAT=posix
45403export TEST_TAR_FORMAT
45404TAR_OPTIONS=\"-H posix\"
45405export TAR_OPTIONS
45406rm -rf *
45407
45408tar --use-compress-program false -cf a.tar . 2>err
45409rc=\$?
45410sed -n '\$p' err
45411exit \$rc
45412)"
45413at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
45414( $at_check_trace;
45415mkdir posix
45416(cd posix
45417TEST_TAR_FORMAT=posix
45418export TEST_TAR_FORMAT
45419TAR_OPTIONS="-H posix"
45420export TAR_OPTIONS
45421rm -rf *
45422
45423tar --use-compress-program false -cf a.tar . 2>err
45424rc=$?
45425sed -n '$p' err
45426exit $rc
45427)
45428) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45429at_status=$? at_failed=false
45430$at_check_filter
45431at_fn_diff_devnull "$at_stderr" || at_failed=:
45432echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
45433" | \
45434  $at_diff - "$at_stdout" || at_failed=:
45435at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
45436$at_failed && at_fn_log_failure
45437$at_traceon; }
45438
45439              { set +x
45440$as_echo "$at_srcdir/comperr.at:28:
45441mkdir gnu
45442(cd gnu
45443TEST_TAR_FORMAT=gnu
45444export TEST_TAR_FORMAT
45445TAR_OPTIONS=\"-H gnu\"
45446export TAR_OPTIONS
45447rm -rf *
45448
45449tar --use-compress-program false -cf a.tar . 2>err
45450rc=\$?
45451sed -n '\$p' err
45452exit \$rc
45453)"
45454at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
45455( $at_check_trace;
45456mkdir gnu
45457(cd gnu
45458TEST_TAR_FORMAT=gnu
45459export TEST_TAR_FORMAT
45460TAR_OPTIONS="-H gnu"
45461export TAR_OPTIONS
45462rm -rf *
45463
45464tar --use-compress-program false -cf a.tar . 2>err
45465rc=$?
45466sed -n '$p' err
45467exit $rc
45468)
45469) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45470at_status=$? at_failed=false
45471$at_check_filter
45472at_fn_diff_devnull "$at_stderr" || at_failed=:
45473echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
45474" | \
45475  $at_diff - "$at_stdout" || at_failed=:
45476at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
45477$at_failed && at_fn_log_failure
45478$at_traceon; }
45479
45480
45481
45482
45483  set +x
45484  $at_times_p && times >"$at_times_file"
45485) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45486read at_status <"$at_status_file"
45487#AT_STOP_192
45488#AT_START_193
45489at_fn_group_banner 193 'remfiles01.at:28' \
45490  "remove-files with compression" "                  " 30
45491at_xfail=no
45492(
45493  $as_echo "193. $at_setup_line: testing $at_desc ..."
45494  $at_traceon
45495
45496
45497
45498unset TAR_OPTIONS
45499{ set +x
45500$as_echo "$at_srcdir/remfiles01.at:32:
45501
45502echo \"test\" > \$\$
45503chmod 0 \$\$
45504cat \$\$ > /dev/null 2>&1
45505result=\$?
45506rm -f \$\$
45507test \$result -eq 0 && exit 77
45508
45509
45510cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
45511
45512
45513case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
45514?*) exit 77;;
45515esac
45516
45517
45518test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45519
45520
45521mkdir dir
45522cd dir
45523genfile --file a --length 0
45524chmod 0 a
45525genfile --file b
45526mkdir c
45527
45528# Depending on when the SIGPIPE gets delivered, the invocation below
45529# may finish with either
45530#  tar: a: Cannot write: Broken pipe
45531# or
45532#  tar: Child returned status 2
45533
45534# Discard diagnostics that some shells generate about broken pipes,
45535# and discard all of tar's diagnostics except for the ones saying \"(child)\".
45536# Gzip's exit code is propagated to the shell.  Usually it is 141.
45537# Convert all non-zero exits to 2 to make it predictable.
45538(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
45539EC=\$?
45540sed -n '/(child)/p' err >&2
45541rm err
45542find . | sort
45543exit \$EC
45544"
45545at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles01.at:32"
45546( $at_check_trace;
45547
45548echo "test" > $$
45549chmod 0 $$
45550cat $$ > /dev/null 2>&1
45551result=$?
45552rm -f $$
45553test $result -eq 0 && exit 77
45554
45555
45556cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
45557
45558
45559case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
45560?*) exit 77;;
45561esac
45562
45563
45564test -z "`sort < /dev/null 2>&1`" || exit 77
45565
45566
45567mkdir dir
45568cd dir
45569genfile --file a --length 0
45570chmod 0 a
45571genfile --file b
45572mkdir c
45573
45574# Depending on when the SIGPIPE gets delivered, the invocation below
45575# may finish with either
45576#  tar: a: Cannot write: Broken pipe
45577# or
45578#  tar: Child returned status 2
45579
45580# Discard diagnostics that some shells generate about broken pipes,
45581# and discard all of tar's diagnostics except for the ones saying "(child)".
45582# Gzip's exit code is propagated to the shell.  Usually it is 141.
45583# Convert all non-zero exits to 2 to make it predictable.
45584(tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
45585EC=$?
45586sed -n '/(child)/p' err >&2
45587rm err
45588find . | sort
45589exit $EC
45590
45591) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45592at_status=$? at_failed=false
45593$at_check_filter
45594echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Permission denied
45595tar (child): Error is not recoverable: exiting now
45596" | \
45597  $at_diff - "$at_stderr" || at_failed=:
45598echo >>"$at_stdout"; $as_echo ".
45599./a
45600./b
45601./c
45602" | \
45603  $at_diff - "$at_stdout" || at_failed=:
45604at_fn_check_status 2 $at_status "$at_srcdir/remfiles01.at:32"
45605$at_failed && at_fn_log_failure
45606$at_traceon; }
45607
45608
45609  set +x
45610  $at_times_p && times >"$at_times_file"
45611) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45612read at_status <"$at_status_file"
45613#AT_STOP_193
45614#AT_START_194
45615at_fn_group_banner 194 'remfiles02.at:28' \
45616  "remove-files with compression: grand-child" "     " 30
45617at_xfail=no
45618(
45619  $as_echo "194. $at_setup_line: testing $at_desc ..."
45620  $at_traceon
45621
45622
45623
45624unset TAR_OPTIONS
45625{ set +x
45626$as_echo "$at_srcdir/remfiles02.at:32:
45627
45628cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
45629
45630
45631test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45632
45633
45634mkdir dir
45635cd dir
45636mkdir a
45637genfile --file b
45638mkdir c
45639
45640tar -c -f a -z --remove-files b c 2>err
45641EC=\$?
45642sed -n '/(child)/p' err >&2
45643rm err
45644find . | sort
45645exit \$EC
45646"
45647at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles02.at:32"
45648( $at_check_trace;
45649
45650cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
45651
45652
45653test -z "`sort < /dev/null 2>&1`" || exit 77
45654
45655
45656mkdir dir
45657cd dir
45658mkdir a
45659genfile --file b
45660mkdir c
45661
45662tar -c -f a -z --remove-files b c 2>err
45663EC=$?
45664sed -n '/(child)/p' err >&2
45665rm err
45666find . | sort
45667exit $EC
45668
45669) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45670at_status=$? at_failed=false
45671$at_check_filter
45672echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Is a directory
45673tar (child): Error is not recoverable: exiting now
45674" | \
45675  $at_diff - "$at_stderr" || at_failed=:
45676echo >>"$at_stdout"; $as_echo ".
45677./a
45678./b
45679./c
45680" | \
45681  $at_diff - "$at_stdout" || at_failed=:
45682at_fn_check_status 2 $at_status "$at_srcdir/remfiles02.at:32"
45683$at_failed && at_fn_log_failure
45684$at_traceon; }
45685
45686
45687  set +x
45688  $at_times_p && times >"$at_times_file"
45689) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45690read at_status <"$at_status_file"
45691#AT_STOP_194
45692#AT_START_195
45693at_fn_group_banner 195 'remfiles03.at:28' \
45694  "remove-files with symbolic links" "               " 30
45695at_xfail=no
45696(
45697  $as_echo "195. $at_setup_line: testing $at_desc ..."
45698  $at_traceon
45699
45700
45701
45702{ set +x
45703$as_echo "$at_srcdir/remfiles03.at:31:
45704mkdir a
45705mkdir a/b
45706ln -s b a/c || exit 77
45707tar --remove-files -cf a.tar a
45708genfile --stat a
45709"
45710at_fn_check_prepare_notrace 'an embedded newline' "remfiles03.at:31"
45711( $at_check_trace;
45712mkdir a
45713mkdir a/b
45714ln -s b a/c || exit 77
45715tar --remove-files -cf a.tar a
45716genfile --stat a
45717
45718) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45719at_status=$? at_failed=false
45720$at_check_filter
45721echo >>"$at_stderr"; $as_echo "genfile: stat(a) failed: No such file or directory
45722" | \
45723  $at_diff - "$at_stderr" || at_failed=:
45724at_fn_diff_devnull "$at_stdout" || at_failed=:
45725at_fn_check_status 0 $at_status "$at_srcdir/remfiles03.at:31"
45726$at_failed && at_fn_log_failure
45727$at_traceon; }
45728
45729
45730  set +x
45731  $at_times_p && times >"$at_times_file"
45732) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45733read at_status <"$at_status_file"
45734#AT_STOP_195
45735#AT_START_196
45736at_fn_group_banner 196 'remfiles04a.at:25' \
45737  "remove-files with -C:rel in -c/non-incr. mode" "  " 30
45738at_xfail=no
45739      test -f $XFAILFILE && at_xfail=yes
45740(
45741  $as_echo "196. $at_setup_line: testing $at_desc ..."
45742  $at_traceon
45743
45744
45745
45746
45747
45748  { set +x
45749$as_echo "$at_srcdir/remfiles04a.at:28:
45750mkdir gnu
45751(cd gnu
45752TEST_TAR_FORMAT=gnu
45753export TEST_TAR_FORMAT
45754TAR_OPTIONS=\"-H gnu\"
45755export TAR_OPTIONS
45756rm -rf *
45757
45758
45759test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45760
45761mkdir foo
45762echo bar > bar
45763echo foobar > foo/bar
45764tar -cf foo.tar --remove-files -C foo bar
45765echo A
45766find . | sort
45767)"
45768at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04a.at:28"
45769( $at_check_trace;
45770mkdir gnu
45771(cd gnu
45772TEST_TAR_FORMAT=gnu
45773export TEST_TAR_FORMAT
45774TAR_OPTIONS="-H gnu"
45775export TAR_OPTIONS
45776rm -rf *
45777
45778
45779test -z "`sort < /dev/null 2>&1`" || exit 77
45780
45781mkdir foo
45782echo bar > bar
45783echo foobar > foo/bar
45784tar -cf foo.tar --remove-files -C foo bar
45785echo A
45786find . | sort
45787)
45788) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45789at_status=$? at_failed=false
45790$at_check_filter
45791at_fn_diff_devnull "$at_stderr" || at_failed=:
45792echo >>"$at_stdout"; $as_echo "A
45793.
45794./bar
45795./foo
45796./foo.tar
45797" | \
45798  $at_diff - "$at_stdout" || at_failed=:
45799at_fn_check_status 0 $at_status "$at_srcdir/remfiles04a.at:28"
45800$at_failed && at_fn_log_failure
45801$at_traceon; }
45802
45803
45804
45805
45806  set +x
45807  $at_times_p && times >"$at_times_file"
45808) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45809read at_status <"$at_status_file"
45810#AT_STOP_196
45811#AT_START_197
45812at_fn_group_banner 197 'remfiles04b.at:33' \
45813  "remove-files with -C:rel in -c/incr. mode" "      " 30
45814at_xfail=no
45815      test -f $XFAILFILE && at_xfail=yes
45816(
45817  $as_echo "197. $at_setup_line: testing $at_desc ..."
45818  $at_traceon
45819
45820
45821
45822
45823
45824  { set +x
45825$as_echo "$at_srcdir/remfiles04b.at:36:
45826mkdir gnu
45827(cd gnu
45828TEST_TAR_FORMAT=gnu
45829export TEST_TAR_FORMAT
45830TAR_OPTIONS=\"-H gnu\"
45831export TAR_OPTIONS
45832rm -rf *
45833
45834
45835test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45836
45837mkdir foo
45838echo bar > bar
45839echo foobar > foo/bar
45840tar -cf foo.tar --incremental --remove-files -C foo bar
45841echo A
45842find . | sort
45843)"
45844at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04b.at:36"
45845( $at_check_trace;
45846mkdir gnu
45847(cd gnu
45848TEST_TAR_FORMAT=gnu
45849export TEST_TAR_FORMAT
45850TAR_OPTIONS="-H gnu"
45851export TAR_OPTIONS
45852rm -rf *
45853
45854
45855test -z "`sort < /dev/null 2>&1`" || exit 77
45856
45857mkdir foo
45858echo bar > bar
45859echo foobar > foo/bar
45860tar -cf foo.tar --incremental --remove-files -C foo bar
45861echo A
45862find . | sort
45863)
45864) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45865at_status=$? at_failed=false
45866$at_check_filter
45867at_fn_diff_devnull "$at_stderr" || at_failed=:
45868echo >>"$at_stdout"; $as_echo "A
45869.
45870./bar
45871./foo
45872./foo.tar
45873" | \
45874  $at_diff - "$at_stdout" || at_failed=:
45875at_fn_check_status 0 $at_status "$at_srcdir/remfiles04b.at:36"
45876$at_failed && at_fn_log_failure
45877$at_traceon; }
45878
45879
45880
45881
45882  set +x
45883  $at_times_p && times >"$at_times_file"
45884) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45885read at_status <"$at_status_file"
45886#AT_STOP_197
45887#AT_START_198
45888at_fn_group_banner 198 'remfiles04c.at:33' \
45889  "remove-files with -C:rel in -r mode" "            " 30
45890at_xfail=no
45891      test -f $XFAILFILE && at_xfail=yes
45892(
45893  $as_echo "198. $at_setup_line: testing $at_desc ..."
45894  $at_traceon
45895
45896
45897
45898
45899
45900  { set +x
45901$as_echo "$at_srcdir/remfiles04c.at:36:
45902mkdir gnu
45903(cd gnu
45904TEST_TAR_FORMAT=gnu
45905export TEST_TAR_FORMAT
45906TAR_OPTIONS=\"-H gnu\"
45907export TAR_OPTIONS
45908rm -rf *
45909
45910
45911test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45912
45913mkdir foo
45914echo bar > bar
45915echo foobar > foo/bar
45916tar -cf foo.tar -C foo bar
45917echo A
45918find . | sort
45919tar -rf foo.tar --remove-files -C foo bar
45920echo B
45921find . | sort
45922)"
45923at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04c.at:36"
45924( $at_check_trace;
45925mkdir gnu
45926(cd gnu
45927TEST_TAR_FORMAT=gnu
45928export TEST_TAR_FORMAT
45929TAR_OPTIONS="-H gnu"
45930export TAR_OPTIONS
45931rm -rf *
45932
45933
45934test -z "`sort < /dev/null 2>&1`" || exit 77
45935
45936mkdir foo
45937echo bar > bar
45938echo foobar > foo/bar
45939tar -cf foo.tar -C foo bar
45940echo A
45941find . | sort
45942tar -rf foo.tar --remove-files -C foo bar
45943echo B
45944find . | sort
45945)
45946) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45947at_status=$? at_failed=false
45948$at_check_filter
45949at_fn_diff_devnull "$at_stderr" || at_failed=:
45950echo >>"$at_stdout"; $as_echo "A
45951.
45952./bar
45953./foo
45954./foo.tar
45955./foo/bar
45956B
45957.
45958./bar
45959./foo
45960./foo.tar
45961" | \
45962  $at_diff - "$at_stdout" || at_failed=:
45963at_fn_check_status 0 $at_status "$at_srcdir/remfiles04c.at:36"
45964$at_failed && at_fn_log_failure
45965$at_traceon; }
45966
45967
45968
45969
45970  set +x
45971  $at_times_p && times >"$at_times_file"
45972) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45973read at_status <"$at_status_file"
45974#AT_STOP_198
45975#AT_START_199
45976at_fn_group_banner 199 'remfiles05a.at:34' \
45977  "remove-files with -C:rel,rel in -c/non-incr. mode" "" 30
45978at_xfail=no
45979      test -f $XFAILFILE && at_xfail=yes
45980(
45981  $as_echo "199. $at_setup_line: testing $at_desc ..."
45982  $at_traceon
45983
45984
45985
45986
45987
45988  { set +x
45989$as_echo "$at_srcdir/remfiles05a.at:37:
45990mkdir gnu
45991(cd gnu
45992TEST_TAR_FORMAT=gnu
45993export TEST_TAR_FORMAT
45994TAR_OPTIONS=\"-H gnu\"
45995export TAR_OPTIONS
45996rm -rf *
45997
45998
45999test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46000
46001mkdir foo
46002mkdir bar
46003echo file > file
46004echo foo/file > foo/file
46005echo bar/file > bar/file
46006decho A
46007tar -cvf foo.tar --remove-files -C foo file -C ../bar file
46008decho B
46009find . | sort
46010)"
46011at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05a.at:37"
46012( $at_check_trace;
46013mkdir gnu
46014(cd gnu
46015TEST_TAR_FORMAT=gnu
46016export TEST_TAR_FORMAT
46017TAR_OPTIONS="-H gnu"
46018export TAR_OPTIONS
46019rm -rf *
46020
46021
46022test -z "`sort < /dev/null 2>&1`" || exit 77
46023
46024mkdir foo
46025mkdir bar
46026echo file > file
46027echo foo/file > foo/file
46028echo bar/file > bar/file
46029decho A
46030tar -cvf foo.tar --remove-files -C foo file -C ../bar file
46031decho B
46032find . | sort
46033)
46034) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46035at_status=$? at_failed=false
46036$at_check_filter
46037echo >>"$at_stderr"; $as_echo "A
46038B
46039" | \
46040  $at_diff - "$at_stderr" || at_failed=:
46041echo >>"$at_stdout"; $as_echo "A
46042file
46043file
46044B
46045.
46046./bar
46047./file
46048./foo
46049./foo.tar
46050" | \
46051  $at_diff - "$at_stdout" || at_failed=:
46052at_fn_check_status 0 $at_status "$at_srcdir/remfiles05a.at:37"
46053$at_failed && at_fn_log_failure
46054$at_traceon; }
46055
46056
46057
46058
46059  set +x
46060  $at_times_p && times >"$at_times_file"
46061) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46062read at_status <"$at_status_file"
46063#AT_STOP_199
46064#AT_START_200
46065at_fn_group_banner 200 'remfiles05b.at:25' \
46066  "remove-files with -C:rel,rel in -c/incr. mode" "  " 30
46067at_xfail=no
46068      test -f $XFAILFILE && at_xfail=yes
46069(
46070  $as_echo "200. $at_setup_line: testing $at_desc ..."
46071  $at_traceon
46072
46073
46074
46075
46076
46077  { set +x
46078$as_echo "$at_srcdir/remfiles05b.at:28:
46079mkdir gnu
46080(cd gnu
46081TEST_TAR_FORMAT=gnu
46082export TEST_TAR_FORMAT
46083TAR_OPTIONS=\"-H gnu\"
46084export TAR_OPTIONS
46085rm -rf *
46086
46087
46088test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46089
46090mkdir foo
46091mkdir bar
46092echo file > file
46093echo foo/file > foo/file
46094echo bar/file > bar/file
46095decho A
46096tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
46097decho B
46098find . | sort
46099)"
46100at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05b.at:28"
46101( $at_check_trace;
46102mkdir gnu
46103(cd gnu
46104TEST_TAR_FORMAT=gnu
46105export TEST_TAR_FORMAT
46106TAR_OPTIONS="-H gnu"
46107export TAR_OPTIONS
46108rm -rf *
46109
46110
46111test -z "`sort < /dev/null 2>&1`" || exit 77
46112
46113mkdir foo
46114mkdir bar
46115echo file > file
46116echo foo/file > foo/file
46117echo bar/file > bar/file
46118decho A
46119tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
46120decho B
46121find . | sort
46122)
46123) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46124at_status=$? at_failed=false
46125$at_check_filter
46126echo >>"$at_stderr"; $as_echo "A
46127B
46128" | \
46129  $at_diff - "$at_stderr" || at_failed=:
46130echo >>"$at_stdout"; $as_echo "A
46131file
46132file
46133B
46134.
46135./bar
46136./file
46137./foo
46138./foo.tar
46139" | \
46140  $at_diff - "$at_stdout" || at_failed=:
46141at_fn_check_status 0 $at_status "$at_srcdir/remfiles05b.at:28"
46142$at_failed && at_fn_log_failure
46143$at_traceon; }
46144
46145
46146
46147
46148  set +x
46149  $at_times_p && times >"$at_times_file"
46150) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46151read at_status <"$at_status_file"
46152#AT_STOP_200
46153#AT_START_201
46154at_fn_group_banner 201 'remfiles05c.at:25' \
46155  "remove-files with -C:rel,rel in -r mode" "        " 30
46156at_xfail=no
46157      test -f $XFAILFILE && at_xfail=yes
46158(
46159  $as_echo "201. $at_setup_line: testing $at_desc ..."
46160  $at_traceon
46161
46162
46163
46164
46165
46166  { set +x
46167$as_echo "$at_srcdir/remfiles05c.at:28:
46168mkdir gnu
46169(cd gnu
46170TEST_TAR_FORMAT=gnu
46171export TEST_TAR_FORMAT
46172TAR_OPTIONS=\"-H gnu\"
46173export TAR_OPTIONS
46174rm -rf *
46175
46176
46177test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46178
46179mkdir foo
46180mkdir bar
46181echo file > file
46182echo foo/file > foo/file
46183echo bar/file > bar/file
46184tar -cf foo.tar -C foo file -C ../bar file
46185decho A
46186find . | sort
46187decho B
46188tar -rvf foo.tar --remove-files -C foo file -C ../bar file
46189decho C
46190find . | sort
46191)"
46192at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05c.at:28"
46193( $at_check_trace;
46194mkdir gnu
46195(cd gnu
46196TEST_TAR_FORMAT=gnu
46197export TEST_TAR_FORMAT
46198TAR_OPTIONS="-H gnu"
46199export TAR_OPTIONS
46200rm -rf *
46201
46202
46203test -z "`sort < /dev/null 2>&1`" || exit 77
46204
46205mkdir foo
46206mkdir bar
46207echo file > file
46208echo foo/file > foo/file
46209echo bar/file > bar/file
46210tar -cf foo.tar -C foo file -C ../bar file
46211decho A
46212find . | sort
46213decho B
46214tar -rvf foo.tar --remove-files -C foo file -C ../bar file
46215decho C
46216find . | sort
46217)
46218) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46219at_status=$? at_failed=false
46220$at_check_filter
46221echo >>"$at_stderr"; $as_echo "A
46222B
46223C
46224" | \
46225  $at_diff - "$at_stderr" || at_failed=:
46226echo >>"$at_stdout"; $as_echo "A
46227.
46228./bar
46229./bar/file
46230./file
46231./foo
46232./foo.tar
46233./foo/file
46234B
46235file
46236file
46237C
46238.
46239./bar
46240./file
46241./foo
46242./foo.tar
46243" | \
46244  $at_diff - "$at_stdout" || at_failed=:
46245at_fn_check_status 0 $at_status "$at_srcdir/remfiles05c.at:28"
46246$at_failed && at_fn_log_failure
46247$at_traceon; }
46248
46249
46250
46251
46252  set +x
46253  $at_times_p && times >"$at_times_file"
46254) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46255read at_status <"$at_status_file"
46256#AT_STOP_201
46257#AT_START_202
46258at_fn_group_banner 202 'remfiles06a.at:25' \
46259  "remove-files with -C:rel,abs in -c/non-incr. mode" "" 30
46260at_xfail=no
46261      test -f $XFAILFILE && at_xfail=yes
46262(
46263  $as_echo "202. $at_setup_line: testing $at_desc ..."
46264  $at_traceon
46265
46266
46267
46268
46269
46270  { set +x
46271$as_echo "$at_srcdir/remfiles06a.at:28:
46272mkdir gnu
46273(cd gnu
46274TEST_TAR_FORMAT=gnu
46275export TEST_TAR_FORMAT
46276TAR_OPTIONS=\"-H gnu\"
46277export TAR_OPTIONS
46278rm -rf *
46279
46280
46281test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46282
46283mkdir foo
46284mkdir bar
46285echo file > file
46286echo foo/file > foo/file
46287echo bar/file > bar/file
46288DIR=\`pwd\`
46289decho A
46290tar -cvf foo.tar --remove-files -C foo file -C \$DIR/bar file
46291decho B
46292find . | sort
46293)"
46294at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06a.at:28"
46295( $at_check_trace;
46296mkdir gnu
46297(cd gnu
46298TEST_TAR_FORMAT=gnu
46299export TEST_TAR_FORMAT
46300TAR_OPTIONS="-H gnu"
46301export TAR_OPTIONS
46302rm -rf *
46303
46304
46305test -z "`sort < /dev/null 2>&1`" || exit 77
46306
46307mkdir foo
46308mkdir bar
46309echo file > file
46310echo foo/file > foo/file
46311echo bar/file > bar/file
46312DIR=`pwd`
46313decho A
46314tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file
46315decho B
46316find . | sort
46317)
46318) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46319at_status=$? at_failed=false
46320$at_check_filter
46321echo >>"$at_stderr"; $as_echo "A
46322B
46323" | \
46324  $at_diff - "$at_stderr" || at_failed=:
46325echo >>"$at_stdout"; $as_echo "A
46326file
46327file
46328B
46329.
46330./bar
46331./file
46332./foo
46333./foo.tar
46334" | \
46335  $at_diff - "$at_stdout" || at_failed=:
46336at_fn_check_status 0 $at_status "$at_srcdir/remfiles06a.at:28"
46337$at_failed && at_fn_log_failure
46338$at_traceon; }
46339
46340
46341
46342
46343  set +x
46344  $at_times_p && times >"$at_times_file"
46345) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46346read at_status <"$at_status_file"
46347#AT_STOP_202
46348#AT_START_203
46349at_fn_group_banner 203 'remfiles06b.at:25' \
46350  "remove-files with -C:rel,abs in -c/incr. mode" "  " 30
46351at_xfail=no
46352      test -f $XFAILFILE && at_xfail=yes
46353(
46354  $as_echo "203. $at_setup_line: testing $at_desc ..."
46355  $at_traceon
46356
46357
46358
46359
46360
46361  { set +x
46362$as_echo "$at_srcdir/remfiles06b.at:28:
46363mkdir gnu
46364(cd gnu
46365TEST_TAR_FORMAT=gnu
46366export TEST_TAR_FORMAT
46367TAR_OPTIONS=\"-H gnu\"
46368export TAR_OPTIONS
46369rm -rf *
46370
46371
46372test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46373
46374mkdir foo
46375mkdir bar
46376echo file > file
46377echo foo/file > foo/file
46378echo bar/file > bar/file
46379DIR=\`pwd\`
46380decho A
46381tar -cvf foo.tar --incremental --remove-files -C foo file -C \$DIR/bar file
46382decho B
46383find . | sort
46384)"
46385at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06b.at:28"
46386( $at_check_trace;
46387mkdir gnu
46388(cd gnu
46389TEST_TAR_FORMAT=gnu
46390export TEST_TAR_FORMAT
46391TAR_OPTIONS="-H gnu"
46392export TAR_OPTIONS
46393rm -rf *
46394
46395
46396test -z "`sort < /dev/null 2>&1`" || exit 77
46397
46398mkdir foo
46399mkdir bar
46400echo file > file
46401echo foo/file > foo/file
46402echo bar/file > bar/file
46403DIR=`pwd`
46404decho A
46405tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file
46406decho B
46407find . | sort
46408)
46409) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46410at_status=$? at_failed=false
46411$at_check_filter
46412echo >>"$at_stderr"; $as_echo "A
46413B
46414" | \
46415  $at_diff - "$at_stderr" || at_failed=:
46416echo >>"$at_stdout"; $as_echo "A
46417file
46418file
46419B
46420.
46421./bar
46422./file
46423./foo
46424./foo.tar
46425" | \
46426  $at_diff - "$at_stdout" || at_failed=:
46427at_fn_check_status 0 $at_status "$at_srcdir/remfiles06b.at:28"
46428$at_failed && at_fn_log_failure
46429$at_traceon; }
46430
46431
46432
46433
46434  set +x
46435  $at_times_p && times >"$at_times_file"
46436) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46437read at_status <"$at_status_file"
46438#AT_STOP_203
46439#AT_START_204
46440at_fn_group_banner 204 'remfiles06c.at:25' \
46441  "remove-files with -C:rel,abs in -r mode" "        " 30
46442at_xfail=no
46443      test -f $XFAILFILE && at_xfail=yes
46444(
46445  $as_echo "204. $at_setup_line: testing $at_desc ..."
46446  $at_traceon
46447
46448
46449
46450
46451
46452  { set +x
46453$as_echo "$at_srcdir/remfiles06c.at:28:
46454mkdir gnu
46455(cd gnu
46456TEST_TAR_FORMAT=gnu
46457export TEST_TAR_FORMAT
46458TAR_OPTIONS=\"-H gnu\"
46459export TAR_OPTIONS
46460rm -rf *
46461
46462
46463test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46464
46465mkdir foo
46466mkdir bar
46467echo file > file
46468echo foo/file > foo/file
46469echo bar/file > bar/file
46470DIR=\`pwd\`
46471tar -cf foo.tar -C foo file -C \$DIR/bar file
46472decho A
46473find . | sort
46474decho B
46475tar -rvf foo.tar --remove-files -C foo file -C \$DIR/bar file
46476decho C
46477find . | sort
46478)"
46479at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06c.at:28"
46480( $at_check_trace;
46481mkdir gnu
46482(cd gnu
46483TEST_TAR_FORMAT=gnu
46484export TEST_TAR_FORMAT
46485TAR_OPTIONS="-H gnu"
46486export TAR_OPTIONS
46487rm -rf *
46488
46489
46490test -z "`sort < /dev/null 2>&1`" || exit 77
46491
46492mkdir foo
46493mkdir bar
46494echo file > file
46495echo foo/file > foo/file
46496echo bar/file > bar/file
46497DIR=`pwd`
46498tar -cf foo.tar -C foo file -C $DIR/bar file
46499decho A
46500find . | sort
46501decho B
46502tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file
46503decho C
46504find . | sort
46505)
46506) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46507at_status=$? at_failed=false
46508$at_check_filter
46509echo >>"$at_stderr"; $as_echo "A
46510B
46511C
46512" | \
46513  $at_diff - "$at_stderr" || at_failed=:
46514echo >>"$at_stdout"; $as_echo "A
46515.
46516./bar
46517./bar/file
46518./file
46519./foo
46520./foo.tar
46521./foo/file
46522B
46523file
46524file
46525C
46526.
46527./bar
46528./file
46529./foo
46530./foo.tar
46531" | \
46532  $at_diff - "$at_stdout" || at_failed=:
46533at_fn_check_status 0 $at_status "$at_srcdir/remfiles06c.at:28"
46534$at_failed && at_fn_log_failure
46535$at_traceon; }
46536
46537
46538
46539
46540  set +x
46541  $at_times_p && times >"$at_times_file"
46542) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46543read at_status <"$at_status_file"
46544#AT_STOP_204
46545#AT_START_205
46546at_fn_group_banner 205 'remfiles07a.at:25' \
46547  "remove-files with -C:abs,rel in -c/non-incr. mode" "" 30
46548at_xfail=no
46549      test -f $XFAILFILE && at_xfail=yes
46550(
46551  $as_echo "205. $at_setup_line: testing $at_desc ..."
46552  $at_traceon
46553
46554
46555
46556
46557
46558  { set +x
46559$as_echo "$at_srcdir/remfiles07a.at:28:
46560mkdir gnu
46561(cd gnu
46562TEST_TAR_FORMAT=gnu
46563export TEST_TAR_FORMAT
46564TAR_OPTIONS=\"-H gnu\"
46565export TAR_OPTIONS
46566rm -rf *
46567
46568
46569test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46570
46571mkdir foo
46572mkdir bar
46573echo file > file
46574echo foo/file > foo/file
46575echo bar/file > bar/file
46576DIR=\`pwd\`
46577decho A
46578tar -cvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
46579decho B
46580find . | sort
46581)"
46582at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07a.at:28"
46583( $at_check_trace;
46584mkdir gnu
46585(cd gnu
46586TEST_TAR_FORMAT=gnu
46587export TEST_TAR_FORMAT
46588TAR_OPTIONS="-H gnu"
46589export TAR_OPTIONS
46590rm -rf *
46591
46592
46593test -z "`sort < /dev/null 2>&1`" || exit 77
46594
46595mkdir foo
46596mkdir bar
46597echo file > file
46598echo foo/file > foo/file
46599echo bar/file > bar/file
46600DIR=`pwd`
46601decho A
46602tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
46603decho B
46604find . | sort
46605)
46606) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46607at_status=$? at_failed=false
46608$at_check_filter
46609echo >>"$at_stderr"; $as_echo "A
46610B
46611" | \
46612  $at_diff - "$at_stderr" || at_failed=:
46613echo >>"$at_stdout"; $as_echo "A
46614file
46615file
46616B
46617.
46618./bar
46619./file
46620./foo
46621./foo.tar
46622" | \
46623  $at_diff - "$at_stdout" || at_failed=:
46624at_fn_check_status 0 $at_status "$at_srcdir/remfiles07a.at:28"
46625$at_failed && at_fn_log_failure
46626$at_traceon; }
46627
46628
46629
46630
46631  set +x
46632  $at_times_p && times >"$at_times_file"
46633) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46634read at_status <"$at_status_file"
46635#AT_STOP_205
46636#AT_START_206
46637at_fn_group_banner 206 'remfiles07b.at:25' \
46638  "remove-files with -C:abs,rel in -c/incr. mode" "  " 30
46639at_xfail=no
46640      test -f $XFAILFILE && at_xfail=yes
46641(
46642  $as_echo "206. $at_setup_line: testing $at_desc ..."
46643  $at_traceon
46644
46645
46646
46647
46648
46649  { set +x
46650$as_echo "$at_srcdir/remfiles07b.at:28:
46651mkdir gnu
46652(cd gnu
46653TEST_TAR_FORMAT=gnu
46654export TEST_TAR_FORMAT
46655TAR_OPTIONS=\"-H gnu\"
46656export TAR_OPTIONS
46657rm -rf *
46658
46659
46660test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46661
46662mkdir foo
46663mkdir bar
46664echo file > file
46665echo foo/file > foo/file
46666echo bar/file > bar/file
46667DIR=\`pwd\`
46668decho A
46669tar -cvf foo.tar --incremental --remove-files -C \$DIR/foo file -C ../bar file
46670decho B
46671find . | sort
46672)"
46673at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07b.at:28"
46674( $at_check_trace;
46675mkdir gnu
46676(cd gnu
46677TEST_TAR_FORMAT=gnu
46678export TEST_TAR_FORMAT
46679TAR_OPTIONS="-H gnu"
46680export TAR_OPTIONS
46681rm -rf *
46682
46683
46684test -z "`sort < /dev/null 2>&1`" || exit 77
46685
46686mkdir foo
46687mkdir bar
46688echo file > file
46689echo foo/file > foo/file
46690echo bar/file > bar/file
46691DIR=`pwd`
46692decho A
46693tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file
46694decho B
46695find . | sort
46696)
46697) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46698at_status=$? at_failed=false
46699$at_check_filter
46700echo >>"$at_stderr"; $as_echo "A
46701B
46702" | \
46703  $at_diff - "$at_stderr" || at_failed=:
46704echo >>"$at_stdout"; $as_echo "A
46705file
46706file
46707B
46708.
46709./bar
46710./file
46711./foo
46712./foo.tar
46713" | \
46714  $at_diff - "$at_stdout" || at_failed=:
46715at_fn_check_status 0 $at_status "$at_srcdir/remfiles07b.at:28"
46716$at_failed && at_fn_log_failure
46717$at_traceon; }
46718
46719
46720
46721
46722  set +x
46723  $at_times_p && times >"$at_times_file"
46724) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46725read at_status <"$at_status_file"
46726#AT_STOP_206
46727#AT_START_207
46728at_fn_group_banner 207 'remfiles07c.at:25' \
46729  "remove-files with -C:abs,rel in -r mode" "        " 30
46730at_xfail=no
46731      test -f $XFAILFILE && at_xfail=yes
46732(
46733  $as_echo "207. $at_setup_line: testing $at_desc ..."
46734  $at_traceon
46735
46736
46737
46738
46739
46740  { set +x
46741$as_echo "$at_srcdir/remfiles07c.at:28:
46742mkdir gnu
46743(cd gnu
46744TEST_TAR_FORMAT=gnu
46745export TEST_TAR_FORMAT
46746TAR_OPTIONS=\"-H gnu\"
46747export TAR_OPTIONS
46748rm -rf *
46749
46750
46751test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46752
46753mkdir foo
46754mkdir bar
46755echo file > file
46756echo foo/file > foo/file
46757echo bar/file > bar/file
46758DIR=\`pwd\`
46759tar -cf foo.tar -C \$DIR/foo file -C ../bar file
46760decho A
46761find . | sort
46762decho B
46763tar -rvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
46764decho C
46765find . | sort
46766)"
46767at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07c.at:28"
46768( $at_check_trace;
46769mkdir gnu
46770(cd gnu
46771TEST_TAR_FORMAT=gnu
46772export TEST_TAR_FORMAT
46773TAR_OPTIONS="-H gnu"
46774export TAR_OPTIONS
46775rm -rf *
46776
46777
46778test -z "`sort < /dev/null 2>&1`" || exit 77
46779
46780mkdir foo
46781mkdir bar
46782echo file > file
46783echo foo/file > foo/file
46784echo bar/file > bar/file
46785DIR=`pwd`
46786tar -cf foo.tar -C $DIR/foo file -C ../bar file
46787decho A
46788find . | sort
46789decho B
46790tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
46791decho C
46792find . | sort
46793)
46794) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46795at_status=$? at_failed=false
46796$at_check_filter
46797echo >>"$at_stderr"; $as_echo "A
46798B
46799C
46800" | \
46801  $at_diff - "$at_stderr" || at_failed=:
46802echo >>"$at_stdout"; $as_echo "A
46803.
46804./bar
46805./bar/file
46806./file
46807./foo
46808./foo.tar
46809./foo/file
46810B
46811file
46812file
46813C
46814.
46815./bar
46816./file
46817./foo
46818./foo.tar
46819" | \
46820  $at_diff - "$at_stdout" || at_failed=:
46821at_fn_check_status 0 $at_status "$at_srcdir/remfiles07c.at:28"
46822$at_failed && at_fn_log_failure
46823$at_traceon; }
46824
46825
46826
46827
46828  set +x
46829  $at_times_p && times >"$at_times_file"
46830) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46831read at_status <"$at_status_file"
46832#AT_STOP_207
46833#AT_START_208
46834at_fn_group_banner 208 'remfiles08a.at:28' \
46835  "remove-files deleting two subdirs in -c/non-incr. mode" "" 30
46836at_xfail=no
46837      test -f $XFAILFILE && at_xfail=yes
46838(
46839  $as_echo "208. $at_setup_line: testing $at_desc ..."
46840  $at_traceon
46841
46842
46843
46844
46845
46846  { set +x
46847$as_echo "$at_srcdir/remfiles08a.at:31:
46848mkdir gnu
46849(cd gnu
46850TEST_TAR_FORMAT=gnu
46851export TEST_TAR_FORMAT
46852TAR_OPTIONS=\"-H gnu\"
46853export TAR_OPTIONS
46854rm -rf *
46855
46856mkdir foo
46857mkdir bar
46858echo foo/foo_file > foo/foo_file
46859echo bar/bar_file > bar/bar_file
46860decho A
46861tar -cvf foo.tar --remove-files -C foo . -C ../bar .
46862decho B
46863find .
46864)"
46865at_fn_check_prepare_notrace 'an embedded newline' "remfiles08a.at:31"
46866( $at_check_trace;
46867mkdir gnu
46868(cd gnu
46869TEST_TAR_FORMAT=gnu
46870export TEST_TAR_FORMAT
46871TAR_OPTIONS="-H gnu"
46872export TAR_OPTIONS
46873rm -rf *
46874
46875mkdir foo
46876mkdir bar
46877echo foo/foo_file > foo/foo_file
46878echo bar/bar_file > bar/bar_file
46879decho A
46880tar -cvf foo.tar --remove-files -C foo . -C ../bar .
46881decho B
46882find .
46883)
46884) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46885at_status=$? at_failed=false
46886$at_check_filter
46887echo >>"$at_stderr"; $as_echo "A
46888B
46889" | \
46890  $at_diff - "$at_stderr" || at_failed=:
46891echo >>"$at_stdout"; $as_echo "A
46892./
46893./foo_file
46894./
46895./bar_file
46896B
46897.
46898./foo.tar
46899" | \
46900  $at_diff - "$at_stdout" || at_failed=:
46901at_fn_check_status 0 $at_status "$at_srcdir/remfiles08a.at:31"
46902$at_failed && at_fn_log_failure
46903$at_traceon; }
46904
46905
46906
46907
46908  set +x
46909  $at_times_p && times >"$at_times_file"
46910) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46911read at_status <"$at_status_file"
46912#AT_STOP_208
46913#AT_START_209
46914at_fn_group_banner 209 'remfiles08b.at:31' \
46915  "remove-files deleting two subdirs in -c/incr. mode" "" 30
46916at_xfail=no
46917      test -f $XFAILFILE && at_xfail=yes
46918(
46919  $as_echo "209. $at_setup_line: testing $at_desc ..."
46920  $at_traceon
46921
46922
46923
46924
46925
46926  { set +x
46927$as_echo "$at_srcdir/remfiles08b.at:34:
46928mkdir gnu
46929(cd gnu
46930TEST_TAR_FORMAT=gnu
46931export TEST_TAR_FORMAT
46932TAR_OPTIONS=\"-H gnu\"
46933export TAR_OPTIONS
46934rm -rf *
46935
46936mkdir foo
46937mkdir bar
46938echo foo/foo_file > foo/foo_file
46939echo bar/bar_file > bar/bar_file
46940decho A
46941tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
46942decho B
46943find .
46944)"
46945at_fn_check_prepare_notrace 'an embedded newline' "remfiles08b.at:34"
46946( $at_check_trace;
46947mkdir gnu
46948(cd gnu
46949TEST_TAR_FORMAT=gnu
46950export TEST_TAR_FORMAT
46951TAR_OPTIONS="-H gnu"
46952export TAR_OPTIONS
46953rm -rf *
46954
46955mkdir foo
46956mkdir bar
46957echo foo/foo_file > foo/foo_file
46958echo bar/bar_file > bar/bar_file
46959decho A
46960tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
46961decho B
46962find .
46963)
46964) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46965at_status=$? at_failed=false
46966$at_check_filter
46967echo >>"$at_stderr"; $as_echo "A
46968tar: .: Directory is new
46969tar: .: Directory is new
46970B
46971" | \
46972  $at_diff - "$at_stderr" || at_failed=:
46973echo >>"$at_stdout"; $as_echo "A
46974./
46975./
46976./foo_file
46977./bar_file
46978B
46979.
46980./foo.tar
46981" | \
46982  $at_diff - "$at_stdout" || at_failed=:
46983at_fn_check_status 0 $at_status "$at_srcdir/remfiles08b.at:34"
46984$at_failed && at_fn_log_failure
46985$at_traceon; }
46986
46987
46988
46989
46990  set +x
46991  $at_times_p && times >"$at_times_file"
46992) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46993read at_status <"$at_status_file"
46994#AT_STOP_209
46995#AT_START_210
46996at_fn_group_banner 210 'remfiles08c.at:28' \
46997  "remove-files deleting two subdirs in -r mode" "   " 30
46998at_xfail=no
46999      test -f $XFAILFILE && at_xfail=yes
47000(
47001  $as_echo "210. $at_setup_line: testing $at_desc ..."
47002  $at_traceon
47003
47004
47005
47006
47007
47008  { set +x
47009$as_echo "$at_srcdir/remfiles08c.at:31:
47010mkdir gnu
47011(cd gnu
47012TEST_TAR_FORMAT=gnu
47013export TEST_TAR_FORMAT
47014TAR_OPTIONS=\"-H gnu\"
47015export TAR_OPTIONS
47016rm -rf *
47017
47018
47019test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
47020
47021mkdir foo
47022mkdir bar
47023echo foo/foo_file > foo/foo_file
47024echo bar/bar_file > bar/bar_file
47025tar -cf foo.tar -C foo . -C ../bar .
47026decho A
47027find . | sort
47028decho B
47029tar -rvf foo.tar --remove-files -C foo . -C ../bar .
47030decho C
47031find .
47032)"
47033at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:31"
47034( $at_check_trace;
47035mkdir gnu
47036(cd gnu
47037TEST_TAR_FORMAT=gnu
47038export TEST_TAR_FORMAT
47039TAR_OPTIONS="-H gnu"
47040export TAR_OPTIONS
47041rm -rf *
47042
47043
47044test -z "`sort < /dev/null 2>&1`" || exit 77
47045
47046mkdir foo
47047mkdir bar
47048echo foo/foo_file > foo/foo_file
47049echo bar/bar_file > bar/bar_file
47050tar -cf foo.tar -C foo . -C ../bar .
47051decho A
47052find . | sort
47053decho B
47054tar -rvf foo.tar --remove-files -C foo . -C ../bar .
47055decho C
47056find .
47057)
47058) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47059at_status=$? at_failed=false
47060$at_check_filter
47061echo >>"$at_stderr"; $as_echo "A
47062B
47063C
47064" | \
47065  $at_diff - "$at_stderr" || at_failed=:
47066echo >>"$at_stdout"; $as_echo "A
47067.
47068./bar
47069./bar/bar_file
47070./foo
47071./foo.tar
47072./foo/foo_file
47073B
47074./
47075./foo_file
47076./
47077./bar_file
47078C
47079.
47080./foo.tar
47081" | \
47082  $at_diff - "$at_stdout" || at_failed=:
47083at_fn_check_status 0 $at_status "$at_srcdir/remfiles08c.at:31"
47084$at_failed && at_fn_log_failure
47085$at_traceon; }
47086
47087
47088
47089
47090  set +x
47091  $at_times_p && times >"$at_times_file"
47092) 5>&1 2>&1 7>&- | eval $at_tee_pipe
47093read at_status <"$at_status_file"
47094#AT_STOP_210
47095#AT_START_211
47096at_fn_group_banner 211 'remfiles09a.at:25' \
47097  "remove-files on full directory in -c/non-incr. mode" "" 30
47098at_xfail=no
47099      test -f $XFAILFILE && at_xfail=yes
47100(
47101  $as_echo "211. $at_setup_line: testing $at_desc ..."
47102  $at_traceon
47103
47104
47105
47106
47107
47108  { set +x
47109$as_echo "$at_srcdir/remfiles09a.at:28:
47110mkdir gnu
47111(cd gnu
47112TEST_TAR_FORMAT=gnu
47113export TEST_TAR_FORMAT
47114TAR_OPTIONS=\"-H gnu\"
47115export TAR_OPTIONS
47116rm -rf *
47117
47118mkdir foo
47119echo foo/file > foo/file
47120decho A
47121tar -cvf foo.tar --remove-files foo
47122decho B
47123find .
47124)"
47125at_fn_check_prepare_notrace 'an embedded newline' "remfiles09a.at:28"
47126( $at_check_trace;
47127mkdir gnu
47128(cd gnu
47129TEST_TAR_FORMAT=gnu
47130export TEST_TAR_FORMAT
47131TAR_OPTIONS="-H gnu"
47132export TAR_OPTIONS
47133rm -rf *
47134
47135mkdir foo
47136echo foo/file > foo/file
47137decho A
47138tar -cvf foo.tar --remove-files foo
47139decho B
47140find .
47141)
47142) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47143at_status=$? at_failed=false
47144$at_check_filter
47145echo >>"$at_stderr"; $as_echo "A
47146B
47147" | \
47148  $at_diff - "$at_stderr" || at_failed=:
47149echo >>"$at_stdout"; $as_echo "A
47150foo/
47151foo/file
47152B
47153.
47154./foo.tar
47155" | \
47156  $at_diff - "$at_stdout" || at_failed=:
47157at_fn_check_status 0 $at_status "$at_srcdir/remfiles09a.at:28"
47158$at_failed && at_fn_log_failure
47159$at_traceon; }
47160
47161
47162
47163
47164  set +x
47165  $at_times_p && times >"$at_times_file"
47166) 5>&1 2>&1 7>&- | eval $at_tee_pipe
47167read at_status <"$at_status_file"
47168#AT_STOP_211
47169#AT_START_212
47170at_fn_group_banner 212 'remfiles09b.at:29' \
47171  "remove-files on full directory in -c/incr. mode" "" 30
47172at_xfail=no
47173      test -f $XFAILFILE && at_xfail=yes
47174(
47175  $as_echo "212. $at_setup_line: testing $at_desc ..."
47176  $at_traceon
47177
47178
47179
47180
47181
47182  { set +x
47183$as_echo "$at_srcdir/remfiles09b.at:32:
47184mkdir gnu
47185(cd gnu
47186TEST_TAR_FORMAT=gnu
47187export TEST_TAR_FORMAT
47188TAR_OPTIONS=\"-H gnu\"
47189export TAR_OPTIONS
47190rm -rf *
47191
47192mkdir foo
47193echo foo/file > foo/file
47194decho A
47195tar -cvf foo.tar --incremental --remove-files foo
47196decho B
47197find .
47198)"
47199at_fn_check_prepare_notrace 'an embedded newline' "remfiles09b.at:32"
47200( $at_check_trace;
47201mkdir gnu
47202(cd gnu
47203TEST_TAR_FORMAT=gnu
47204export TEST_TAR_FORMAT
47205TAR_OPTIONS="-H gnu"
47206export TAR_OPTIONS
47207rm -rf *
47208
47209mkdir foo
47210echo foo/file > foo/file
47211decho A
47212tar -cvf foo.tar --incremental --remove-files foo
47213decho B
47214find .
47215)
47216) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47217at_status=$? at_failed=false
47218$at_check_filter
47219echo >>"$at_stderr"; $as_echo "A
47220tar: foo: Directory is new
47221B
47222" | \
47223  $at_diff - "$at_stderr" || at_failed=:
47224echo >>"$at_stdout"; $as_echo "A
47225foo/
47226foo/file
47227B
47228.
47229./foo.tar
47230" | \
47231  $at_diff - "$at_stdout" || at_failed=:
47232at_fn_check_status 0 $at_status "$at_srcdir/remfiles09b.at:32"
47233$at_failed && at_fn_log_failure
47234$at_traceon; }
47235
47236
47237
47238
47239  set +x
47240  $at_times_p && times >"$at_times_file"
47241) 5>&1 2>&1 7>&- | eval $at_tee_pipe
47242read at_status <"$at_status_file"
47243#AT_STOP_212
47244#AT_START_213
47245at_fn_group_banner 213 'remfiles09c.at:25' \
47246  "remove-files on full directory in -r mode" "      " 30
47247at_xfail=no
47248      test -f $XFAILFILE && at_xfail=yes
47249(
47250  $as_echo "213. $at_setup_line: testing $at_desc ..."
47251  $at_traceon
47252
47253
47254
47255
47256
47257  { set +x
47258$as_echo "$at_srcdir/remfiles09c.at:28:
47259mkdir gnu
47260(cd gnu
47261TEST_TAR_FORMAT=gnu
47262export TEST_TAR_FORMAT
47263TAR_OPTIONS=\"-H gnu\"
47264export TAR_OPTIONS
47265rm -rf *
47266
47267
47268test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
47269
47270mkdir foo
47271echo foo/file > foo/file
47272tar -cf foo.tar foo
47273decho A
47274find . | sort
47275decho B
47276tar -rvf foo.tar --remove-files foo
47277decho C
47278find . | sort
47279)"
47280at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles09c.at:28"
47281( $at_check_trace;
47282mkdir gnu
47283(cd gnu
47284TEST_TAR_FORMAT=gnu
47285export TEST_TAR_FORMAT
47286TAR_OPTIONS="-H gnu"
47287export TAR_OPTIONS
47288rm -rf *
47289
47290
47291test -z "`sort < /dev/null 2>&1`" || exit 77
47292
47293mkdir foo
47294echo foo/file > foo/file
47295tar -cf foo.tar foo
47296decho A
47297find . | sort
47298decho B
47299tar -rvf foo.tar --remove-files foo
47300decho C
47301find . | sort
47302)
47303) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47304at_status=$? at_failed=false
47305$at_check_filter
47306echo >>"$at_stderr"; $as_echo "A
47307B
47308C
47309" | \
47310  $at_diff - "$at_stderr" || at_failed=:
47311echo >>"$at_stdout"; $as_echo "A
47312.
47313./foo
47314./foo.tar
47315./foo/file
47316B
47317foo/
47318foo/file
47319C
47320.
47321./foo.tar
47322" | \
47323  $at_diff - "$at_stdout" || at_failed=:
47324at_fn_check_status 0 $at_status "$at_srcdir/remfiles09c.at:28"
47325$at_failed && at_fn_log_failure
47326$at_traceon; }
47327
47328
47329
47330
47331  set +x
47332  $at_times_p && times >"$at_times_file"
47333) 5>&1 2>&1 7>&- | eval $at_tee_pipe
47334read at_status <"$at_status_file"
47335#AT_STOP_213
47336#AT_START_214
47337at_fn_group_banner 214 'remfiles10.at:20' \
47338  "remove-files" "                                   " 30
47339at_xfail=no
47340      test -f $XFAILFILE && at_xfail=yes
47341(
47342  $as_echo "214. $at_setup_line: testing $at_desc ..."
47343  $at_traceon
47344
47345
47346
47347
47348
47349  { set +x
47350$as_echo "$at_srcdir/remfiles10.at:23:
47351mkdir gnu
47352(cd gnu
47353TEST_TAR_FORMAT=gnu
47354export TEST_TAR_FORMAT
47355TAR_OPTIONS=\"-H gnu\"
47356export TAR_OPTIONS
47357rm -rf *
47358
47359mkdir foo
47360echo foo/file > foo/file
47361decho A
47362(cd foo && tar -cvf ../foo.tar --remove-files .)
47363tar_status=\$?
47364decho B
47365find foo
47366exit \$tar_status
47367)"
47368at_fn_check_prepare_notrace 'an embedded newline' "remfiles10.at:23"
47369( $at_check_trace;
47370mkdir gnu
47371(cd gnu
47372TEST_TAR_FORMAT=gnu
47373export TEST_TAR_FORMAT
47374TAR_OPTIONS="-H gnu"
47375export TAR_OPTIONS
47376rm -rf *
47377
47378mkdir foo
47379echo foo/file > foo/file
47380decho A
47381(cd foo && tar -cvf ../foo.tar --remove-files .)
47382tar_status=$?
47383decho B
47384find foo
47385exit $tar_status
47386)
47387) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47388at_status=$? at_failed=false
47389$at_check_filter
47390echo stderr:; tee stderr <"$at_stderr"
47391echo >>"$at_stdout"; $as_echo "A
47392./
47393./file
47394B
47395foo
47396" | \
47397  $at_diff - "$at_stdout" || at_failed=:
47398at_fn_check_status 2 $at_status "$at_srcdir/remfiles10.at:23"
47399$at_failed && at_fn_log_failure
47400$at_traceon; }
47401
47402
47403
47404
47405# Check standard error produced by the above command.  Exact errno reported
47406# when trying to remove CWD may differ, so it is stripped off.
47407{ set +x
47408$as_echo "$at_srcdir/remfiles10.at:44: sed '2s/:[^:]*\$//' stderr"
47409at_fn_check_prepare_dynamic "sed '2s/:[^:]*$//' stderr" "remfiles10.at:44"
47410( $at_check_trace; sed '2s/:[^:]*$//' stderr
47411) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47412at_status=$? at_failed=false
47413$at_check_filter
47414at_fn_diff_devnull "$at_stderr" || at_failed=:
47415echo >>"$at_stdout"; $as_echo "A
47416tar: .: Cannot rmdir
47417tar: Exiting with failure status due to previous errors
47418B
47419" | \
47420  $at_diff - "$at_stdout" || at_failed=:
47421at_fn_check_status 0 $at_status "$at_srcdir/remfiles10.at:44"
47422$at_failed && at_fn_log_failure
47423$at_traceon; }
47424
47425
47426  set +x
47427  $at_times_p && times >"$at_times_file"
47428) 5>&1 2>&1 7>&- | eval $at_tee_pipe
47429read at_status <"$at_status_file"
47430#AT_STOP_214
47431#AT_START_215
47432at_fn_group_banner 215 'xattr01.at:25' \
47433  "xattrs: basic functionality" "                    " 31
47434at_xfail=no
47435      test -f $XFAILFILE && at_xfail=yes
47436(
47437  $as_echo "215. $at_setup_line: testing $at_desc ..."
47438  $at_traceon
47439
47440
47441
47442
47443
47444  { set +x
47445$as_echo "$at_srcdir/xattr01.at:28:
47446mkdir v7
47447(cd v7
47448TEST_TAR_FORMAT=v7
47449export TEST_TAR_FORMAT
47450TAR_OPTIONS=\"-H v7\"
47451export TAR_OPTIONS
47452rm -rf *
47453
47454
47455
47456  file=\$(TMPDIR=. mktemp fiXXXXXX)
47457
47458  setfattr -n user.test -v test \$file &> /dev/null
47459  if test \"\$?\" != 0; then
47460    exit 77
47461  fi
47462
47463
47464  getfattr \$file &> /dev/null
47465  if test \"\$?\" != 0; then
47466    exit 77
47467  fi
47468
47469
47470  file=\$(TMPDIR=. mktemp fiXXXXXX)
47471  setfattr -n user.test -v ahoj \$file
47472  # check whether tar fails to store xattrs
47473  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
47474  if test \"\$err\" != \"0\"; then
47475    exit 77
47476  fi
47477
47478mkdir dir
47479genfile --file dir/file
47480
47481setfattr -n user.test -v OurDirValue dir
47482setfattr -n user.test -v OurFileValue dir/file
47483
47484tar --xattrs -cf archive.tar dir
47485
47486rm -rf dir
47487tar --xattrs -xf archive.tar
47488
47489getfattr -h -d dir         | grep -v -e '^#' -e ^\$
47490getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
47491)"
47492at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
47493( $at_check_trace;
47494mkdir v7
47495(cd v7
47496TEST_TAR_FORMAT=v7
47497export TEST_TAR_FORMAT
47498TAR_OPTIONS="-H v7"
47499export TAR_OPTIONS
47500rm -rf *
47501
47502
47503
47504  file=$(TMPDIR=. mktemp fiXXXXXX)
47505
47506  setfattr -n user.test -v test $file &> /dev/null
47507  if test "$?" != 0; then
47508    exit 77
47509  fi
47510
47511
47512  getfattr $file &> /dev/null
47513  if test "$?" != 0; then
47514    exit 77
47515  fi
47516
47517
47518  file=$(TMPDIR=. mktemp fiXXXXXX)
47519  setfattr -n user.test -v ahoj $file
47520  # check whether tar fails to store xattrs
47521  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
47522  if test "$err" != "0"; then
47523    exit 77
47524  fi
47525
47526mkdir dir
47527genfile --file dir/file
47528
47529setfattr -n user.test -v OurDirValue dir
47530setfattr -n user.test -v OurFileValue dir/file
47531
47532tar --xattrs -cf archive.tar dir
47533
47534rm -rf dir
47535tar --xattrs -xf archive.tar
47536
47537getfattr -h -d dir         | grep -v -e '^#' -e ^$
47538getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
47539)
47540) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47541at_status=$? at_failed=false
47542$at_check_filter
47543at_fn_diff_devnull "$at_stderr" || at_failed=:
47544echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
47545user.test=\"OurFileValue\"
47546" | \
47547  $at_diff - "$at_stdout" || at_failed=:
47548at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
47549$at_failed && at_fn_log_failure
47550$at_traceon; }
47551
47552              { set +x
47553$as_echo "$at_srcdir/xattr01.at:28:
47554mkdir oldgnu
47555(cd oldgnu
47556TEST_TAR_FORMAT=oldgnu
47557export TEST_TAR_FORMAT
47558TAR_OPTIONS=\"-H oldgnu\"
47559export TAR_OPTIONS
47560rm -rf *
47561
47562
47563
47564  file=\$(TMPDIR=. mktemp fiXXXXXX)
47565
47566  setfattr -n user.test -v test \$file &> /dev/null
47567  if test \"\$?\" != 0; then
47568    exit 77
47569  fi
47570
47571
47572  getfattr \$file &> /dev/null
47573  if test \"\$?\" != 0; then
47574    exit 77
47575  fi
47576
47577
47578  file=\$(TMPDIR=. mktemp fiXXXXXX)
47579  setfattr -n user.test -v ahoj \$file
47580  # check whether tar fails to store xattrs
47581  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
47582  if test \"\$err\" != \"0\"; then
47583    exit 77
47584  fi
47585
47586mkdir dir
47587genfile --file dir/file
47588
47589setfattr -n user.test -v OurDirValue dir
47590setfattr -n user.test -v OurFileValue dir/file
47591
47592tar --xattrs -cf archive.tar dir
47593
47594rm -rf dir
47595tar --xattrs -xf archive.tar
47596
47597getfattr -h -d dir         | grep -v -e '^#' -e ^\$
47598getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
47599)"
47600at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
47601( $at_check_trace;
47602mkdir oldgnu
47603(cd oldgnu
47604TEST_TAR_FORMAT=oldgnu
47605export TEST_TAR_FORMAT
47606TAR_OPTIONS="-H oldgnu"
47607export TAR_OPTIONS
47608rm -rf *
47609
47610
47611
47612  file=$(TMPDIR=. mktemp fiXXXXXX)
47613
47614  setfattr -n user.test -v test $file &> /dev/null
47615  if test "$?" != 0; then
47616    exit 77
47617  fi
47618
47619
47620  getfattr $file &> /dev/null
47621  if test "$?" != 0; then
47622    exit 77
47623  fi
47624
47625
47626  file=$(TMPDIR=. mktemp fiXXXXXX)
47627  setfattr -n user.test -v ahoj $file
47628  # check whether tar fails to store xattrs
47629  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
47630  if test "$err" != "0"; then
47631    exit 77
47632  fi
47633
47634mkdir dir
47635genfile --file dir/file
47636
47637setfattr -n user.test -v OurDirValue dir
47638setfattr -n user.test -v OurFileValue dir/file
47639
47640tar --xattrs -cf archive.tar dir
47641
47642rm -rf dir
47643tar --xattrs -xf archive.tar
47644
47645getfattr -h -d dir         | grep -v -e '^#' -e ^$
47646getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
47647)
47648) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47649at_status=$? at_failed=false
47650$at_check_filter
47651at_fn_diff_devnull "$at_stderr" || at_failed=:
47652echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
47653user.test=\"OurFileValue\"
47654" | \
47655  $at_diff - "$at_stdout" || at_failed=:
47656at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
47657$at_failed && at_fn_log_failure
47658$at_traceon; }
47659
47660              { set +x
47661$as_echo "$at_srcdir/xattr01.at:28:
47662mkdir ustar
47663(cd ustar
47664TEST_TAR_FORMAT=ustar
47665export TEST_TAR_FORMAT
47666TAR_OPTIONS=\"-H ustar\"
47667export TAR_OPTIONS
47668rm -rf *
47669
47670
47671
47672  file=\$(TMPDIR=. mktemp fiXXXXXX)
47673
47674  setfattr -n user.test -v test \$file &> /dev/null
47675  if test \"\$?\" != 0; then
47676    exit 77
47677  fi
47678
47679
47680  getfattr \$file &> /dev/null
47681  if test \"\$?\" != 0; then
47682    exit 77
47683  fi
47684
47685
47686  file=\$(TMPDIR=. mktemp fiXXXXXX)
47687  setfattr -n user.test -v ahoj \$file
47688  # check whether tar fails to store xattrs
47689  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
47690  if test \"\$err\" != \"0\"; then
47691    exit 77
47692  fi
47693
47694mkdir dir
47695genfile --file dir/file
47696
47697setfattr -n user.test -v OurDirValue dir
47698setfattr -n user.test -v OurFileValue dir/file
47699
47700tar --xattrs -cf archive.tar dir
47701
47702rm -rf dir
47703tar --xattrs -xf archive.tar
47704
47705getfattr -h -d dir         | grep -v -e '^#' -e ^\$
47706getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
47707)"
47708at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
47709( $at_check_trace;
47710mkdir ustar
47711(cd ustar
47712TEST_TAR_FORMAT=ustar
47713export TEST_TAR_FORMAT
47714TAR_OPTIONS="-H ustar"
47715export TAR_OPTIONS
47716rm -rf *
47717
47718
47719
47720  file=$(TMPDIR=. mktemp fiXXXXXX)
47721
47722  setfattr -n user.test -v test $file &> /dev/null
47723  if test "$?" != 0; then
47724    exit 77
47725  fi
47726
47727
47728  getfattr $file &> /dev/null
47729  if test "$?" != 0; then
47730    exit 77
47731  fi
47732
47733
47734  file=$(TMPDIR=. mktemp fiXXXXXX)
47735  setfattr -n user.test -v ahoj $file
47736  # check whether tar fails to store xattrs
47737  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
47738  if test "$err" != "0"; then
47739    exit 77
47740  fi
47741
47742mkdir dir
47743genfile --file dir/file
47744
47745setfattr -n user.test -v OurDirValue dir
47746setfattr -n user.test -v OurFileValue dir/file
47747
47748tar --xattrs -cf archive.tar dir
47749
47750rm -rf dir
47751tar --xattrs -xf archive.tar
47752
47753getfattr -h -d dir         | grep -v -e '^#' -e ^$
47754getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
47755)
47756) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47757at_status=$? at_failed=false
47758$at_check_filter
47759at_fn_diff_devnull "$at_stderr" || at_failed=:
47760echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
47761user.test=\"OurFileValue\"
47762" | \
47763  $at_diff - "$at_stdout" || at_failed=:
47764at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
47765$at_failed && at_fn_log_failure
47766$at_traceon; }
47767
47768              { set +x
47769$as_echo "$at_srcdir/xattr01.at:28:
47770mkdir posix
47771(cd posix
47772TEST_TAR_FORMAT=posix
47773export TEST_TAR_FORMAT
47774TAR_OPTIONS=\"-H posix\"
47775export TAR_OPTIONS
47776rm -rf *
47777
47778
47779
47780  file=\$(TMPDIR=. mktemp fiXXXXXX)
47781
47782  setfattr -n user.test -v test \$file &> /dev/null
47783  if test \"\$?\" != 0; then
47784    exit 77
47785  fi
47786
47787
47788  getfattr \$file &> /dev/null
47789  if test \"\$?\" != 0; then
47790    exit 77
47791  fi
47792
47793
47794  file=\$(TMPDIR=. mktemp fiXXXXXX)
47795  setfattr -n user.test -v ahoj \$file
47796  # check whether tar fails to store xattrs
47797  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
47798  if test \"\$err\" != \"0\"; then
47799    exit 77
47800  fi
47801
47802mkdir dir
47803genfile --file dir/file
47804
47805setfattr -n user.test -v OurDirValue dir
47806setfattr -n user.test -v OurFileValue dir/file
47807
47808tar --xattrs -cf archive.tar dir
47809
47810rm -rf dir
47811tar --xattrs -xf archive.tar
47812
47813getfattr -h -d dir         | grep -v -e '^#' -e ^\$
47814getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
47815)"
47816at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
47817( $at_check_trace;
47818mkdir posix
47819(cd posix
47820TEST_TAR_FORMAT=posix
47821export TEST_TAR_FORMAT
47822TAR_OPTIONS="-H posix"
47823export TAR_OPTIONS
47824rm -rf *
47825
47826
47827
47828  file=$(TMPDIR=. mktemp fiXXXXXX)
47829
47830  setfattr -n user.test -v test $file &> /dev/null
47831  if test "$?" != 0; then
47832    exit 77
47833  fi
47834
47835
47836  getfattr $file &> /dev/null
47837  if test "$?" != 0; then
47838    exit 77
47839  fi
47840
47841
47842  file=$(TMPDIR=. mktemp fiXXXXXX)
47843  setfattr -n user.test -v ahoj $file
47844  # check whether tar fails to store xattrs
47845  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
47846  if test "$err" != "0"; then
47847    exit 77
47848  fi
47849
47850mkdir dir
47851genfile --file dir/file
47852
47853setfattr -n user.test -v OurDirValue dir
47854setfattr -n user.test -v OurFileValue dir/file
47855
47856tar --xattrs -cf archive.tar dir
47857
47858rm -rf dir
47859tar --xattrs -xf archive.tar
47860
47861getfattr -h -d dir         | grep -v -e '^#' -e ^$
47862getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
47863)
47864) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47865at_status=$? at_failed=false
47866$at_check_filter
47867at_fn_diff_devnull "$at_stderr" || at_failed=:
47868echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
47869user.test=\"OurFileValue\"
47870" | \
47871  $at_diff - "$at_stdout" || at_failed=:
47872at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
47873$at_failed && at_fn_log_failure
47874$at_traceon; }
47875
47876              { set +x
47877$as_echo "$at_srcdir/xattr01.at:28:
47878mkdir gnu
47879(cd gnu
47880TEST_TAR_FORMAT=gnu
47881export TEST_TAR_FORMAT
47882TAR_OPTIONS=\"-H gnu\"
47883export TAR_OPTIONS
47884rm -rf *
47885
47886
47887
47888  file=\$(TMPDIR=. mktemp fiXXXXXX)
47889
47890  setfattr -n user.test -v test \$file &> /dev/null
47891  if test \"\$?\" != 0; then
47892    exit 77
47893  fi
47894
47895
47896  getfattr \$file &> /dev/null
47897  if test \"\$?\" != 0; then
47898    exit 77
47899  fi
47900
47901
47902  file=\$(TMPDIR=. mktemp fiXXXXXX)
47903  setfattr -n user.test -v ahoj \$file
47904  # check whether tar fails to store xattrs
47905  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
47906  if test \"\$err\" != \"0\"; then
47907    exit 77
47908  fi
47909
47910mkdir dir
47911genfile --file dir/file
47912
47913setfattr -n user.test -v OurDirValue dir
47914setfattr -n user.test -v OurFileValue dir/file
47915
47916tar --xattrs -cf archive.tar dir
47917
47918rm -rf dir
47919tar --xattrs -xf archive.tar
47920
47921getfattr -h -d dir         | grep -v -e '^#' -e ^\$
47922getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
47923)"
47924at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
47925( $at_check_trace;
47926mkdir gnu
47927(cd gnu
47928TEST_TAR_FORMAT=gnu
47929export TEST_TAR_FORMAT
47930TAR_OPTIONS="-H gnu"
47931export TAR_OPTIONS
47932rm -rf *
47933
47934
47935
47936  file=$(TMPDIR=. mktemp fiXXXXXX)
47937
47938  setfattr -n user.test -v test $file &> /dev/null
47939  if test "$?" != 0; then
47940    exit 77
47941  fi
47942
47943
47944  getfattr $file &> /dev/null
47945  if test "$?" != 0; then
47946    exit 77
47947  fi
47948
47949
47950  file=$(TMPDIR=. mktemp fiXXXXXX)
47951  setfattr -n user.test -v ahoj $file
47952  # check whether tar fails to store xattrs
47953  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
47954  if test "$err" != "0"; then
47955    exit 77
47956  fi
47957
47958mkdir dir
47959genfile --file dir/file
47960
47961setfattr -n user.test -v OurDirValue dir
47962setfattr -n user.test -v OurFileValue dir/file
47963
47964tar --xattrs -cf archive.tar dir
47965
47966rm -rf dir
47967tar --xattrs -xf archive.tar
47968
47969getfattr -h -d dir         | grep -v -e '^#' -e ^$
47970getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
47971)
47972) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47973at_status=$? at_failed=false
47974$at_check_filter
47975at_fn_diff_devnull "$at_stderr" || at_failed=:
47976echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
47977user.test=\"OurFileValue\"
47978" | \
47979  $at_diff - "$at_stdout" || at_failed=:
47980at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
47981$at_failed && at_fn_log_failure
47982$at_traceon; }
47983
47984
47985
47986
47987  set +x
47988  $at_times_p && times >"$at_times_file"
47989) 5>&1 2>&1 7>&- | eval $at_tee_pipe
47990read at_status <"$at_status_file"
47991#AT_STOP_215
47992#AT_START_216
47993at_fn_group_banner 216 'xattr02.at:25' \
47994  "xattrs: change directory with -C option" "        " 31
47995at_xfail=no
47996      test -f $XFAILFILE && at_xfail=yes
47997(
47998  $as_echo "216. $at_setup_line: testing $at_desc ..."
47999  $at_traceon
48000
48001
48002
48003
48004
48005  { set +x
48006$as_echo "$at_srcdir/xattr02.at:28:
48007mkdir v7
48008(cd v7
48009TEST_TAR_FORMAT=v7
48010export TEST_TAR_FORMAT
48011TAR_OPTIONS=\"-H v7\"
48012export TAR_OPTIONS
48013rm -rf *
48014
48015
48016
48017  file=\$(TMPDIR=. mktemp fiXXXXXX)
48018
48019  setfattr -n user.test -v test \$file &> /dev/null
48020  if test \"\$?\" != 0; then
48021    exit 77
48022  fi
48023
48024
48025  getfattr \$file &> /dev/null
48026  if test \"\$?\" != 0; then
48027    exit 77
48028  fi
48029
48030
48031  file=\$(TMPDIR=. mktemp fiXXXXXX)
48032  setfattr -n user.test -v ahoj \$file
48033  # check whether tar fails to store xattrs
48034  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48035  if test \"\$err\" != \"0\"; then
48036    exit 77
48037  fi
48038
48039
48040mkdir dir
48041mkdir dir/subdir
48042mkdir dir/subdir/subsubdir
48043genfile --file dir/file1
48044genfile --file dir/subdir/file2
48045
48046setfattr -n user.test -v OurFile1Value dir/file1
48047setfattr -n user.test -v OurFile2Value dir/subdir/file2
48048setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48049
48050tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48051
48052rm -rf dir
48053
48054tar --xattrs -xf archive.tar
48055
48056getfattr -h -d file1        | grep -v -e '^#' -e ^\$
48057getfattr -h -d file2        | grep -v -e '^#' -e ^\$
48058getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
48059)"
48060at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
48061( $at_check_trace;
48062mkdir v7
48063(cd v7
48064TEST_TAR_FORMAT=v7
48065export TEST_TAR_FORMAT
48066TAR_OPTIONS="-H v7"
48067export TAR_OPTIONS
48068rm -rf *
48069
48070
48071
48072  file=$(TMPDIR=. mktemp fiXXXXXX)
48073
48074  setfattr -n user.test -v test $file &> /dev/null
48075  if test "$?" != 0; then
48076    exit 77
48077  fi
48078
48079
48080  getfattr $file &> /dev/null
48081  if test "$?" != 0; then
48082    exit 77
48083  fi
48084
48085
48086  file=$(TMPDIR=. mktemp fiXXXXXX)
48087  setfattr -n user.test -v ahoj $file
48088  # check whether tar fails to store xattrs
48089  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48090  if test "$err" != "0"; then
48091    exit 77
48092  fi
48093
48094
48095mkdir dir
48096mkdir dir/subdir
48097mkdir dir/subdir/subsubdir
48098genfile --file dir/file1
48099genfile --file dir/subdir/file2
48100
48101setfattr -n user.test -v OurFile1Value dir/file1
48102setfattr -n user.test -v OurFile2Value dir/subdir/file2
48103setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48104
48105tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48106
48107rm -rf dir
48108
48109tar --xattrs -xf archive.tar
48110
48111getfattr -h -d file1        | grep -v -e '^#' -e ^$
48112getfattr -h -d file2        | grep -v -e '^#' -e ^$
48113getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
48114)
48115) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48116at_status=$? at_failed=false
48117$at_check_filter
48118at_fn_diff_devnull "$at_stderr" || at_failed=:
48119echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
48120user.test=\"OurFile2Value\"
48121user.test=\"OurDirValue\"
48122" | \
48123  $at_diff - "$at_stdout" || at_failed=:
48124at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
48125$at_failed && at_fn_log_failure
48126$at_traceon; }
48127
48128              { set +x
48129$as_echo "$at_srcdir/xattr02.at:28:
48130mkdir oldgnu
48131(cd oldgnu
48132TEST_TAR_FORMAT=oldgnu
48133export TEST_TAR_FORMAT
48134TAR_OPTIONS=\"-H oldgnu\"
48135export TAR_OPTIONS
48136rm -rf *
48137
48138
48139
48140  file=\$(TMPDIR=. mktemp fiXXXXXX)
48141
48142  setfattr -n user.test -v test \$file &> /dev/null
48143  if test \"\$?\" != 0; then
48144    exit 77
48145  fi
48146
48147
48148  getfattr \$file &> /dev/null
48149  if test \"\$?\" != 0; then
48150    exit 77
48151  fi
48152
48153
48154  file=\$(TMPDIR=. mktemp fiXXXXXX)
48155  setfattr -n user.test -v ahoj \$file
48156  # check whether tar fails to store xattrs
48157  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48158  if test \"\$err\" != \"0\"; then
48159    exit 77
48160  fi
48161
48162
48163mkdir dir
48164mkdir dir/subdir
48165mkdir dir/subdir/subsubdir
48166genfile --file dir/file1
48167genfile --file dir/subdir/file2
48168
48169setfattr -n user.test -v OurFile1Value dir/file1
48170setfattr -n user.test -v OurFile2Value dir/subdir/file2
48171setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48172
48173tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48174
48175rm -rf dir
48176
48177tar --xattrs -xf archive.tar
48178
48179getfattr -h -d file1        | grep -v -e '^#' -e ^\$
48180getfattr -h -d file2        | grep -v -e '^#' -e ^\$
48181getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
48182)"
48183at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
48184( $at_check_trace;
48185mkdir oldgnu
48186(cd oldgnu
48187TEST_TAR_FORMAT=oldgnu
48188export TEST_TAR_FORMAT
48189TAR_OPTIONS="-H oldgnu"
48190export TAR_OPTIONS
48191rm -rf *
48192
48193
48194
48195  file=$(TMPDIR=. mktemp fiXXXXXX)
48196
48197  setfattr -n user.test -v test $file &> /dev/null
48198  if test "$?" != 0; then
48199    exit 77
48200  fi
48201
48202
48203  getfattr $file &> /dev/null
48204  if test "$?" != 0; then
48205    exit 77
48206  fi
48207
48208
48209  file=$(TMPDIR=. mktemp fiXXXXXX)
48210  setfattr -n user.test -v ahoj $file
48211  # check whether tar fails to store xattrs
48212  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48213  if test "$err" != "0"; then
48214    exit 77
48215  fi
48216
48217
48218mkdir dir
48219mkdir dir/subdir
48220mkdir dir/subdir/subsubdir
48221genfile --file dir/file1
48222genfile --file dir/subdir/file2
48223
48224setfattr -n user.test -v OurFile1Value dir/file1
48225setfattr -n user.test -v OurFile2Value dir/subdir/file2
48226setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48227
48228tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48229
48230rm -rf dir
48231
48232tar --xattrs -xf archive.tar
48233
48234getfattr -h -d file1        | grep -v -e '^#' -e ^$
48235getfattr -h -d file2        | grep -v -e '^#' -e ^$
48236getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
48237)
48238) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48239at_status=$? at_failed=false
48240$at_check_filter
48241at_fn_diff_devnull "$at_stderr" || at_failed=:
48242echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
48243user.test=\"OurFile2Value\"
48244user.test=\"OurDirValue\"
48245" | \
48246  $at_diff - "$at_stdout" || at_failed=:
48247at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
48248$at_failed && at_fn_log_failure
48249$at_traceon; }
48250
48251              { set +x
48252$as_echo "$at_srcdir/xattr02.at:28:
48253mkdir ustar
48254(cd ustar
48255TEST_TAR_FORMAT=ustar
48256export TEST_TAR_FORMAT
48257TAR_OPTIONS=\"-H ustar\"
48258export TAR_OPTIONS
48259rm -rf *
48260
48261
48262
48263  file=\$(TMPDIR=. mktemp fiXXXXXX)
48264
48265  setfattr -n user.test -v test \$file &> /dev/null
48266  if test \"\$?\" != 0; then
48267    exit 77
48268  fi
48269
48270
48271  getfattr \$file &> /dev/null
48272  if test \"\$?\" != 0; then
48273    exit 77
48274  fi
48275
48276
48277  file=\$(TMPDIR=. mktemp fiXXXXXX)
48278  setfattr -n user.test -v ahoj \$file
48279  # check whether tar fails to store xattrs
48280  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48281  if test \"\$err\" != \"0\"; then
48282    exit 77
48283  fi
48284
48285
48286mkdir dir
48287mkdir dir/subdir
48288mkdir dir/subdir/subsubdir
48289genfile --file dir/file1
48290genfile --file dir/subdir/file2
48291
48292setfattr -n user.test -v OurFile1Value dir/file1
48293setfattr -n user.test -v OurFile2Value dir/subdir/file2
48294setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48295
48296tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48297
48298rm -rf dir
48299
48300tar --xattrs -xf archive.tar
48301
48302getfattr -h -d file1        | grep -v -e '^#' -e ^\$
48303getfattr -h -d file2        | grep -v -e '^#' -e ^\$
48304getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
48305)"
48306at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
48307( $at_check_trace;
48308mkdir ustar
48309(cd ustar
48310TEST_TAR_FORMAT=ustar
48311export TEST_TAR_FORMAT
48312TAR_OPTIONS="-H ustar"
48313export TAR_OPTIONS
48314rm -rf *
48315
48316
48317
48318  file=$(TMPDIR=. mktemp fiXXXXXX)
48319
48320  setfattr -n user.test -v test $file &> /dev/null
48321  if test "$?" != 0; then
48322    exit 77
48323  fi
48324
48325
48326  getfattr $file &> /dev/null
48327  if test "$?" != 0; then
48328    exit 77
48329  fi
48330
48331
48332  file=$(TMPDIR=. mktemp fiXXXXXX)
48333  setfattr -n user.test -v ahoj $file
48334  # check whether tar fails to store xattrs
48335  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48336  if test "$err" != "0"; then
48337    exit 77
48338  fi
48339
48340
48341mkdir dir
48342mkdir dir/subdir
48343mkdir dir/subdir/subsubdir
48344genfile --file dir/file1
48345genfile --file dir/subdir/file2
48346
48347setfattr -n user.test -v OurFile1Value dir/file1
48348setfattr -n user.test -v OurFile2Value dir/subdir/file2
48349setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48350
48351tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48352
48353rm -rf dir
48354
48355tar --xattrs -xf archive.tar
48356
48357getfattr -h -d file1        | grep -v -e '^#' -e ^$
48358getfattr -h -d file2        | grep -v -e '^#' -e ^$
48359getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
48360)
48361) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48362at_status=$? at_failed=false
48363$at_check_filter
48364at_fn_diff_devnull "$at_stderr" || at_failed=:
48365echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
48366user.test=\"OurFile2Value\"
48367user.test=\"OurDirValue\"
48368" | \
48369  $at_diff - "$at_stdout" || at_failed=:
48370at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
48371$at_failed && at_fn_log_failure
48372$at_traceon; }
48373
48374              { set +x
48375$as_echo "$at_srcdir/xattr02.at:28:
48376mkdir posix
48377(cd posix
48378TEST_TAR_FORMAT=posix
48379export TEST_TAR_FORMAT
48380TAR_OPTIONS=\"-H posix\"
48381export TAR_OPTIONS
48382rm -rf *
48383
48384
48385
48386  file=\$(TMPDIR=. mktemp fiXXXXXX)
48387
48388  setfattr -n user.test -v test \$file &> /dev/null
48389  if test \"\$?\" != 0; then
48390    exit 77
48391  fi
48392
48393
48394  getfattr \$file &> /dev/null
48395  if test \"\$?\" != 0; then
48396    exit 77
48397  fi
48398
48399
48400  file=\$(TMPDIR=. mktemp fiXXXXXX)
48401  setfattr -n user.test -v ahoj \$file
48402  # check whether tar fails to store xattrs
48403  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48404  if test \"\$err\" != \"0\"; then
48405    exit 77
48406  fi
48407
48408
48409mkdir dir
48410mkdir dir/subdir
48411mkdir dir/subdir/subsubdir
48412genfile --file dir/file1
48413genfile --file dir/subdir/file2
48414
48415setfattr -n user.test -v OurFile1Value dir/file1
48416setfattr -n user.test -v OurFile2Value dir/subdir/file2
48417setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48418
48419tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48420
48421rm -rf dir
48422
48423tar --xattrs -xf archive.tar
48424
48425getfattr -h -d file1        | grep -v -e '^#' -e ^\$
48426getfattr -h -d file2        | grep -v -e '^#' -e ^\$
48427getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
48428)"
48429at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
48430( $at_check_trace;
48431mkdir posix
48432(cd posix
48433TEST_TAR_FORMAT=posix
48434export TEST_TAR_FORMAT
48435TAR_OPTIONS="-H posix"
48436export TAR_OPTIONS
48437rm -rf *
48438
48439
48440
48441  file=$(TMPDIR=. mktemp fiXXXXXX)
48442
48443  setfattr -n user.test -v test $file &> /dev/null
48444  if test "$?" != 0; then
48445    exit 77
48446  fi
48447
48448
48449  getfattr $file &> /dev/null
48450  if test "$?" != 0; then
48451    exit 77
48452  fi
48453
48454
48455  file=$(TMPDIR=. mktemp fiXXXXXX)
48456  setfattr -n user.test -v ahoj $file
48457  # check whether tar fails to store xattrs
48458  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48459  if test "$err" != "0"; then
48460    exit 77
48461  fi
48462
48463
48464mkdir dir
48465mkdir dir/subdir
48466mkdir dir/subdir/subsubdir
48467genfile --file dir/file1
48468genfile --file dir/subdir/file2
48469
48470setfattr -n user.test -v OurFile1Value dir/file1
48471setfattr -n user.test -v OurFile2Value dir/subdir/file2
48472setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48473
48474tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48475
48476rm -rf dir
48477
48478tar --xattrs -xf archive.tar
48479
48480getfattr -h -d file1        | grep -v -e '^#' -e ^$
48481getfattr -h -d file2        | grep -v -e '^#' -e ^$
48482getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
48483)
48484) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48485at_status=$? at_failed=false
48486$at_check_filter
48487at_fn_diff_devnull "$at_stderr" || at_failed=:
48488echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
48489user.test=\"OurFile2Value\"
48490user.test=\"OurDirValue\"
48491" | \
48492  $at_diff - "$at_stdout" || at_failed=:
48493at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
48494$at_failed && at_fn_log_failure
48495$at_traceon; }
48496
48497              { set +x
48498$as_echo "$at_srcdir/xattr02.at:28:
48499mkdir gnu
48500(cd gnu
48501TEST_TAR_FORMAT=gnu
48502export TEST_TAR_FORMAT
48503TAR_OPTIONS=\"-H gnu\"
48504export TAR_OPTIONS
48505rm -rf *
48506
48507
48508
48509  file=\$(TMPDIR=. mktemp fiXXXXXX)
48510
48511  setfattr -n user.test -v test \$file &> /dev/null
48512  if test \"\$?\" != 0; then
48513    exit 77
48514  fi
48515
48516
48517  getfattr \$file &> /dev/null
48518  if test \"\$?\" != 0; then
48519    exit 77
48520  fi
48521
48522
48523  file=\$(TMPDIR=. mktemp fiXXXXXX)
48524  setfattr -n user.test -v ahoj \$file
48525  # check whether tar fails to store xattrs
48526  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48527  if test \"\$err\" != \"0\"; then
48528    exit 77
48529  fi
48530
48531
48532mkdir dir
48533mkdir dir/subdir
48534mkdir dir/subdir/subsubdir
48535genfile --file dir/file1
48536genfile --file dir/subdir/file2
48537
48538setfattr -n user.test -v OurFile1Value dir/file1
48539setfattr -n user.test -v OurFile2Value dir/subdir/file2
48540setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48541
48542tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48543
48544rm -rf dir
48545
48546tar --xattrs -xf archive.tar
48547
48548getfattr -h -d file1        | grep -v -e '^#' -e ^\$
48549getfattr -h -d file2        | grep -v -e '^#' -e ^\$
48550getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
48551)"
48552at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
48553( $at_check_trace;
48554mkdir gnu
48555(cd gnu
48556TEST_TAR_FORMAT=gnu
48557export TEST_TAR_FORMAT
48558TAR_OPTIONS="-H gnu"
48559export TAR_OPTIONS
48560rm -rf *
48561
48562
48563
48564  file=$(TMPDIR=. mktemp fiXXXXXX)
48565
48566  setfattr -n user.test -v test $file &> /dev/null
48567  if test "$?" != 0; then
48568    exit 77
48569  fi
48570
48571
48572  getfattr $file &> /dev/null
48573  if test "$?" != 0; then
48574    exit 77
48575  fi
48576
48577
48578  file=$(TMPDIR=. mktemp fiXXXXXX)
48579  setfattr -n user.test -v ahoj $file
48580  # check whether tar fails to store xattrs
48581  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48582  if test "$err" != "0"; then
48583    exit 77
48584  fi
48585
48586
48587mkdir dir
48588mkdir dir/subdir
48589mkdir dir/subdir/subsubdir
48590genfile --file dir/file1
48591genfile --file dir/subdir/file2
48592
48593setfattr -n user.test -v OurFile1Value dir/file1
48594setfattr -n user.test -v OurFile2Value dir/subdir/file2
48595setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
48596
48597tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48598
48599rm -rf dir
48600
48601tar --xattrs -xf archive.tar
48602
48603getfattr -h -d file1        | grep -v -e '^#' -e ^$
48604getfattr -h -d file2        | grep -v -e '^#' -e ^$
48605getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
48606)
48607) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48608at_status=$? at_failed=false
48609$at_check_filter
48610at_fn_diff_devnull "$at_stderr" || at_failed=:
48611echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
48612user.test=\"OurFile2Value\"
48613user.test=\"OurDirValue\"
48614" | \
48615  $at_diff - "$at_stdout" || at_failed=:
48616at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
48617$at_failed && at_fn_log_failure
48618$at_traceon; }
48619
48620
48621
48622
48623  set +x
48624  $at_times_p && times >"$at_times_file"
48625) 5>&1 2>&1 7>&- | eval $at_tee_pipe
48626read at_status <"$at_status_file"
48627#AT_STOP_216
48628#AT_START_217
48629at_fn_group_banner 217 'xattr03.at:25' \
48630  "xattrs: trusted.* attributes" "                   " 31
48631at_xfail=no
48632      test -f $XFAILFILE && at_xfail=yes
48633(
48634  $as_echo "217. $at_setup_line: testing $at_desc ..."
48635  $at_traceon
48636
48637
48638
48639
48640
48641  { set +x
48642$as_echo "$at_srcdir/xattr03.at:28:
48643mkdir v7
48644(cd v7
48645TEST_TAR_FORMAT=v7
48646export TEST_TAR_FORMAT
48647TAR_OPTIONS=\"-H v7\"
48648export TAR_OPTIONS
48649rm -rf *
48650
48651
48652echo \"test\" > \$\$
48653chmod 0 \$\$
48654cat \$\$ > /dev/null 2>&1
48655result=\$?
48656rm -f \$\$
48657test \$result -eq 0 || exit 77
48658
48659
48660
48661  file=\$(TMPDIR=. mktemp fiXXXXXX)
48662
48663  setfattr -n user.test -v test \$file &> /dev/null
48664  if test \"\$?\" != 0; then
48665    exit 77
48666  fi
48667
48668
48669  getfattr \$file &> /dev/null
48670  if test \"\$?\" != 0; then
48671    exit 77
48672  fi
48673
48674
48675  file=\$(TMPDIR=. mktemp fiXXXXXX)
48676  setfattr -n user.test -v ahoj \$file
48677  # check whether tar fails to store xattrs
48678  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48679  if test \"\$err\" != \"0\"; then
48680    exit 77
48681  fi
48682
48683
48684mkdir dir
48685mkdir dir/subdir
48686mkdir dir/subdir/subsubdir
48687genfile --file dir/file1
48688genfile --file dir/subdir/file2
48689
48690setfattr -n trusted.test -v OurFile1Value dir/file1
48691setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
48692setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
48693
48694tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48695
48696rm -rf dir
48697
48698tar --xattrs --xattrs-include=trusted* -xf archive.tar
48699
48700getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
48701getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
48702getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
48703)"
48704at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
48705( $at_check_trace;
48706mkdir v7
48707(cd v7
48708TEST_TAR_FORMAT=v7
48709export TEST_TAR_FORMAT
48710TAR_OPTIONS="-H v7"
48711export TAR_OPTIONS
48712rm -rf *
48713
48714
48715echo "test" > $$
48716chmod 0 $$
48717cat $$ > /dev/null 2>&1
48718result=$?
48719rm -f $$
48720test $result -eq 0 || exit 77
48721
48722
48723
48724  file=$(TMPDIR=. mktemp fiXXXXXX)
48725
48726  setfattr -n user.test -v test $file &> /dev/null
48727  if test "$?" != 0; then
48728    exit 77
48729  fi
48730
48731
48732  getfattr $file &> /dev/null
48733  if test "$?" != 0; then
48734    exit 77
48735  fi
48736
48737
48738  file=$(TMPDIR=. mktemp fiXXXXXX)
48739  setfattr -n user.test -v ahoj $file
48740  # check whether tar fails to store xattrs
48741  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48742  if test "$err" != "0"; then
48743    exit 77
48744  fi
48745
48746
48747mkdir dir
48748mkdir dir/subdir
48749mkdir dir/subdir/subsubdir
48750genfile --file dir/file1
48751genfile --file dir/subdir/file2
48752
48753setfattr -n trusted.test -v OurFile1Value dir/file1
48754setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
48755setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
48756
48757tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48758
48759rm -rf dir
48760
48761tar --xattrs --xattrs-include=trusted* -xf archive.tar
48762
48763getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
48764getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
48765getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
48766)
48767) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48768at_status=$? at_failed=false
48769$at_check_filter
48770at_fn_diff_devnull "$at_stderr" || at_failed=:
48771echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
48772trusted.test=\"OurFile2Value\"
48773trusted.test=\"OurDirValue\"
48774" | \
48775  $at_diff - "$at_stdout" || at_failed=:
48776at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
48777$at_failed && at_fn_log_failure
48778$at_traceon; }
48779
48780              { set +x
48781$as_echo "$at_srcdir/xattr03.at:28:
48782mkdir oldgnu
48783(cd oldgnu
48784TEST_TAR_FORMAT=oldgnu
48785export TEST_TAR_FORMAT
48786TAR_OPTIONS=\"-H oldgnu\"
48787export TAR_OPTIONS
48788rm -rf *
48789
48790
48791echo \"test\" > \$\$
48792chmod 0 \$\$
48793cat \$\$ > /dev/null 2>&1
48794result=\$?
48795rm -f \$\$
48796test \$result -eq 0 || exit 77
48797
48798
48799
48800  file=\$(TMPDIR=. mktemp fiXXXXXX)
48801
48802  setfattr -n user.test -v test \$file &> /dev/null
48803  if test \"\$?\" != 0; then
48804    exit 77
48805  fi
48806
48807
48808  getfattr \$file &> /dev/null
48809  if test \"\$?\" != 0; then
48810    exit 77
48811  fi
48812
48813
48814  file=\$(TMPDIR=. mktemp fiXXXXXX)
48815  setfattr -n user.test -v ahoj \$file
48816  # check whether tar fails to store xattrs
48817  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48818  if test \"\$err\" != \"0\"; then
48819    exit 77
48820  fi
48821
48822
48823mkdir dir
48824mkdir dir/subdir
48825mkdir dir/subdir/subsubdir
48826genfile --file dir/file1
48827genfile --file dir/subdir/file2
48828
48829setfattr -n trusted.test -v OurFile1Value dir/file1
48830setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
48831setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
48832
48833tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48834
48835rm -rf dir
48836
48837tar --xattrs --xattrs-include=trusted* -xf archive.tar
48838
48839getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
48840getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
48841getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
48842)"
48843at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
48844( $at_check_trace;
48845mkdir oldgnu
48846(cd oldgnu
48847TEST_TAR_FORMAT=oldgnu
48848export TEST_TAR_FORMAT
48849TAR_OPTIONS="-H oldgnu"
48850export TAR_OPTIONS
48851rm -rf *
48852
48853
48854echo "test" > $$
48855chmod 0 $$
48856cat $$ > /dev/null 2>&1
48857result=$?
48858rm -f $$
48859test $result -eq 0 || exit 77
48860
48861
48862
48863  file=$(TMPDIR=. mktemp fiXXXXXX)
48864
48865  setfattr -n user.test -v test $file &> /dev/null
48866  if test "$?" != 0; then
48867    exit 77
48868  fi
48869
48870
48871  getfattr $file &> /dev/null
48872  if test "$?" != 0; then
48873    exit 77
48874  fi
48875
48876
48877  file=$(TMPDIR=. mktemp fiXXXXXX)
48878  setfattr -n user.test -v ahoj $file
48879  # check whether tar fails to store xattrs
48880  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48881  if test "$err" != "0"; then
48882    exit 77
48883  fi
48884
48885
48886mkdir dir
48887mkdir dir/subdir
48888mkdir dir/subdir/subsubdir
48889genfile --file dir/file1
48890genfile --file dir/subdir/file2
48891
48892setfattr -n trusted.test -v OurFile1Value dir/file1
48893setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
48894setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
48895
48896tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48897
48898rm -rf dir
48899
48900tar --xattrs --xattrs-include=trusted* -xf archive.tar
48901
48902getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
48903getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
48904getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
48905)
48906) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48907at_status=$? at_failed=false
48908$at_check_filter
48909at_fn_diff_devnull "$at_stderr" || at_failed=:
48910echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
48911trusted.test=\"OurFile2Value\"
48912trusted.test=\"OurDirValue\"
48913" | \
48914  $at_diff - "$at_stdout" || at_failed=:
48915at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
48916$at_failed && at_fn_log_failure
48917$at_traceon; }
48918
48919              { set +x
48920$as_echo "$at_srcdir/xattr03.at:28:
48921mkdir ustar
48922(cd ustar
48923TEST_TAR_FORMAT=ustar
48924export TEST_TAR_FORMAT
48925TAR_OPTIONS=\"-H ustar\"
48926export TAR_OPTIONS
48927rm -rf *
48928
48929
48930echo \"test\" > \$\$
48931chmod 0 \$\$
48932cat \$\$ > /dev/null 2>&1
48933result=\$?
48934rm -f \$\$
48935test \$result -eq 0 || exit 77
48936
48937
48938
48939  file=\$(TMPDIR=. mktemp fiXXXXXX)
48940
48941  setfattr -n user.test -v test \$file &> /dev/null
48942  if test \"\$?\" != 0; then
48943    exit 77
48944  fi
48945
48946
48947  getfattr \$file &> /dev/null
48948  if test \"\$?\" != 0; then
48949    exit 77
48950  fi
48951
48952
48953  file=\$(TMPDIR=. mktemp fiXXXXXX)
48954  setfattr -n user.test -v ahoj \$file
48955  # check whether tar fails to store xattrs
48956  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48957  if test \"\$err\" != \"0\"; then
48958    exit 77
48959  fi
48960
48961
48962mkdir dir
48963mkdir dir/subdir
48964mkdir dir/subdir/subsubdir
48965genfile --file dir/file1
48966genfile --file dir/subdir/file2
48967
48968setfattr -n trusted.test -v OurFile1Value dir/file1
48969setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
48970setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
48971
48972tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
48973
48974rm -rf dir
48975
48976tar --xattrs --xattrs-include=trusted* -xf archive.tar
48977
48978getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
48979getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
48980getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
48981)"
48982at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
48983( $at_check_trace;
48984mkdir ustar
48985(cd ustar
48986TEST_TAR_FORMAT=ustar
48987export TEST_TAR_FORMAT
48988TAR_OPTIONS="-H ustar"
48989export TAR_OPTIONS
48990rm -rf *
48991
48992
48993echo "test" > $$
48994chmod 0 $$
48995cat $$ > /dev/null 2>&1
48996result=$?
48997rm -f $$
48998test $result -eq 0 || exit 77
48999
49000
49001
49002  file=$(TMPDIR=. mktemp fiXXXXXX)
49003
49004  setfattr -n user.test -v test $file &> /dev/null
49005  if test "$?" != 0; then
49006    exit 77
49007  fi
49008
49009
49010  getfattr $file &> /dev/null
49011  if test "$?" != 0; then
49012    exit 77
49013  fi
49014
49015
49016  file=$(TMPDIR=. mktemp fiXXXXXX)
49017  setfattr -n user.test -v ahoj $file
49018  # check whether tar fails to store xattrs
49019  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49020  if test "$err" != "0"; then
49021    exit 77
49022  fi
49023
49024
49025mkdir dir
49026mkdir dir/subdir
49027mkdir dir/subdir/subsubdir
49028genfile --file dir/file1
49029genfile --file dir/subdir/file2
49030
49031setfattr -n trusted.test -v OurFile1Value dir/file1
49032setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
49033setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
49034
49035tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
49036
49037rm -rf dir
49038
49039tar --xattrs --xattrs-include=trusted* -xf archive.tar
49040
49041getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
49042getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
49043getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
49044)
49045) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49046at_status=$? at_failed=false
49047$at_check_filter
49048at_fn_diff_devnull "$at_stderr" || at_failed=:
49049echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
49050trusted.test=\"OurFile2Value\"
49051trusted.test=\"OurDirValue\"
49052" | \
49053  $at_diff - "$at_stdout" || at_failed=:
49054at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
49055$at_failed && at_fn_log_failure
49056$at_traceon; }
49057
49058              { set +x
49059$as_echo "$at_srcdir/xattr03.at:28:
49060mkdir posix
49061(cd posix
49062TEST_TAR_FORMAT=posix
49063export TEST_TAR_FORMAT
49064TAR_OPTIONS=\"-H posix\"
49065export TAR_OPTIONS
49066rm -rf *
49067
49068
49069echo \"test\" > \$\$
49070chmod 0 \$\$
49071cat \$\$ > /dev/null 2>&1
49072result=\$?
49073rm -f \$\$
49074test \$result -eq 0 || exit 77
49075
49076
49077
49078  file=\$(TMPDIR=. mktemp fiXXXXXX)
49079
49080  setfattr -n user.test -v test \$file &> /dev/null
49081  if test \"\$?\" != 0; then
49082    exit 77
49083  fi
49084
49085
49086  getfattr \$file &> /dev/null
49087  if test \"\$?\" != 0; then
49088    exit 77
49089  fi
49090
49091
49092  file=\$(TMPDIR=. mktemp fiXXXXXX)
49093  setfattr -n user.test -v ahoj \$file
49094  # check whether tar fails to store xattrs
49095  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49096  if test \"\$err\" != \"0\"; then
49097    exit 77
49098  fi
49099
49100
49101mkdir dir
49102mkdir dir/subdir
49103mkdir dir/subdir/subsubdir
49104genfile --file dir/file1
49105genfile --file dir/subdir/file2
49106
49107setfattr -n trusted.test -v OurFile1Value dir/file1
49108setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
49109setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
49110
49111tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
49112
49113rm -rf dir
49114
49115tar --xattrs --xattrs-include=trusted* -xf archive.tar
49116
49117getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
49118getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
49119getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
49120)"
49121at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
49122( $at_check_trace;
49123mkdir posix
49124(cd posix
49125TEST_TAR_FORMAT=posix
49126export TEST_TAR_FORMAT
49127TAR_OPTIONS="-H posix"
49128export TAR_OPTIONS
49129rm -rf *
49130
49131
49132echo "test" > $$
49133chmod 0 $$
49134cat $$ > /dev/null 2>&1
49135result=$?
49136rm -f $$
49137test $result -eq 0 || exit 77
49138
49139
49140
49141  file=$(TMPDIR=. mktemp fiXXXXXX)
49142
49143  setfattr -n user.test -v test $file &> /dev/null
49144  if test "$?" != 0; then
49145    exit 77
49146  fi
49147
49148
49149  getfattr $file &> /dev/null
49150  if test "$?" != 0; then
49151    exit 77
49152  fi
49153
49154
49155  file=$(TMPDIR=. mktemp fiXXXXXX)
49156  setfattr -n user.test -v ahoj $file
49157  # check whether tar fails to store xattrs
49158  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49159  if test "$err" != "0"; then
49160    exit 77
49161  fi
49162
49163
49164mkdir dir
49165mkdir dir/subdir
49166mkdir dir/subdir/subsubdir
49167genfile --file dir/file1
49168genfile --file dir/subdir/file2
49169
49170setfattr -n trusted.test -v OurFile1Value dir/file1
49171setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
49172setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
49173
49174tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
49175
49176rm -rf dir
49177
49178tar --xattrs --xattrs-include=trusted* -xf archive.tar
49179
49180getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
49181getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
49182getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
49183)
49184) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49185at_status=$? at_failed=false
49186$at_check_filter
49187at_fn_diff_devnull "$at_stderr" || at_failed=:
49188echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
49189trusted.test=\"OurFile2Value\"
49190trusted.test=\"OurDirValue\"
49191" | \
49192  $at_diff - "$at_stdout" || at_failed=:
49193at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
49194$at_failed && at_fn_log_failure
49195$at_traceon; }
49196
49197              { set +x
49198$as_echo "$at_srcdir/xattr03.at:28:
49199mkdir gnu
49200(cd gnu
49201TEST_TAR_FORMAT=gnu
49202export TEST_TAR_FORMAT
49203TAR_OPTIONS=\"-H gnu\"
49204export TAR_OPTIONS
49205rm -rf *
49206
49207
49208echo \"test\" > \$\$
49209chmod 0 \$\$
49210cat \$\$ > /dev/null 2>&1
49211result=\$?
49212rm -f \$\$
49213test \$result -eq 0 || exit 77
49214
49215
49216
49217  file=\$(TMPDIR=. mktemp fiXXXXXX)
49218
49219  setfattr -n user.test -v test \$file &> /dev/null
49220  if test \"\$?\" != 0; then
49221    exit 77
49222  fi
49223
49224
49225  getfattr \$file &> /dev/null
49226  if test \"\$?\" != 0; then
49227    exit 77
49228  fi
49229
49230
49231  file=\$(TMPDIR=. mktemp fiXXXXXX)
49232  setfattr -n user.test -v ahoj \$file
49233  # check whether tar fails to store xattrs
49234  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49235  if test \"\$err\" != \"0\"; then
49236    exit 77
49237  fi
49238
49239
49240mkdir dir
49241mkdir dir/subdir
49242mkdir dir/subdir/subsubdir
49243genfile --file dir/file1
49244genfile --file dir/subdir/file2
49245
49246setfattr -n trusted.test -v OurFile1Value dir/file1
49247setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
49248setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
49249
49250tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
49251
49252rm -rf dir
49253
49254tar --xattrs --xattrs-include=trusted* -xf archive.tar
49255
49256getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
49257getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
49258getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
49259)"
49260at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
49261( $at_check_trace;
49262mkdir gnu
49263(cd gnu
49264TEST_TAR_FORMAT=gnu
49265export TEST_TAR_FORMAT
49266TAR_OPTIONS="-H gnu"
49267export TAR_OPTIONS
49268rm -rf *
49269
49270
49271echo "test" > $$
49272chmod 0 $$
49273cat $$ > /dev/null 2>&1
49274result=$?
49275rm -f $$
49276test $result -eq 0 || exit 77
49277
49278
49279
49280  file=$(TMPDIR=. mktemp fiXXXXXX)
49281
49282  setfattr -n user.test -v test $file &> /dev/null
49283  if test "$?" != 0; then
49284    exit 77
49285  fi
49286
49287
49288  getfattr $file &> /dev/null
49289  if test "$?" != 0; then
49290    exit 77
49291  fi
49292
49293
49294  file=$(TMPDIR=. mktemp fiXXXXXX)
49295  setfattr -n user.test -v ahoj $file
49296  # check whether tar fails to store xattrs
49297  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49298  if test "$err" != "0"; then
49299    exit 77
49300  fi
49301
49302
49303mkdir dir
49304mkdir dir/subdir
49305mkdir dir/subdir/subsubdir
49306genfile --file dir/file1
49307genfile --file dir/subdir/file2
49308
49309setfattr -n trusted.test -v OurFile1Value dir/file1
49310setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
49311setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
49312
49313tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
49314
49315rm -rf dir
49316
49317tar --xattrs --xattrs-include=trusted* -xf archive.tar
49318
49319getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
49320getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
49321getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
49322)
49323) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49324at_status=$? at_failed=false
49325$at_check_filter
49326at_fn_diff_devnull "$at_stderr" || at_failed=:
49327echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
49328trusted.test=\"OurFile2Value\"
49329trusted.test=\"OurDirValue\"
49330" | \
49331  $at_diff - "$at_stdout" || at_failed=:
49332at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
49333$at_failed && at_fn_log_failure
49334$at_traceon; }
49335
49336
49337
49338
49339  set +x
49340  $at_times_p && times >"$at_times_file"
49341) 5>&1 2>&1 7>&- | eval $at_tee_pipe
49342read at_status <"$at_status_file"
49343#AT_STOP_217
49344#AT_START_218
49345at_fn_group_banner 218 'xattr04.at:26' \
49346  "xattrs: s/open/openat/ regression" "              " 31
49347at_xfail=no
49348      test -f $XFAILFILE && at_xfail=yes
49349(
49350  $as_echo "218. $at_setup_line: testing $at_desc ..."
49351  $at_traceon
49352
49353
49354
49355
49356
49357  { set +x
49358$as_echo "$at_srcdir/xattr04.at:29:
49359mkdir v7
49360(cd v7
49361TEST_TAR_FORMAT=v7
49362export TEST_TAR_FORMAT
49363TAR_OPTIONS=\"-H v7\"
49364export TAR_OPTIONS
49365rm -rf *
49366
49367
49368
49369  file=\$(TMPDIR=. mktemp fiXXXXXX)
49370
49371  setfattr -n user.test -v test \$file &> /dev/null
49372  if test \"\$?\" != 0; then
49373    exit 77
49374  fi
49375
49376
49377  getfattr \$file &> /dev/null
49378  if test \"\$?\" != 0; then
49379    exit 77
49380  fi
49381
49382
49383  file=\$(TMPDIR=. mktemp fiXXXXXX)
49384  setfattr -n user.test -v ahoj \$file
49385  # check whether tar fails to store xattrs
49386  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49387  if test \"\$err\" != \"0\"; then
49388    exit 77
49389  fi
49390
49391
49392mkdir dir
49393mkdir output
49394genfile --file dir/file
49395
49396setfattr -n user.test -v value dir/file
49397
49398# archive whole directory including binary xattrs
49399tar --xattrs -cf archive.tar -C dir .
49400
49401tar --xattrs -xf archive.tar -C output
49402ret=\$?
49403getfattr -h -d output/file | grep -v -e '^#' -e ^\$
49404exit \$ret
49405)"
49406at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
49407( $at_check_trace;
49408mkdir v7
49409(cd v7
49410TEST_TAR_FORMAT=v7
49411export TEST_TAR_FORMAT
49412TAR_OPTIONS="-H v7"
49413export TAR_OPTIONS
49414rm -rf *
49415
49416
49417
49418  file=$(TMPDIR=. mktemp fiXXXXXX)
49419
49420  setfattr -n user.test -v test $file &> /dev/null
49421  if test "$?" != 0; then
49422    exit 77
49423  fi
49424
49425
49426  getfattr $file &> /dev/null
49427  if test "$?" != 0; then
49428    exit 77
49429  fi
49430
49431
49432  file=$(TMPDIR=. mktemp fiXXXXXX)
49433  setfattr -n user.test -v ahoj $file
49434  # check whether tar fails to store xattrs
49435  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49436  if test "$err" != "0"; then
49437    exit 77
49438  fi
49439
49440
49441mkdir dir
49442mkdir output
49443genfile --file dir/file
49444
49445setfattr -n user.test -v value dir/file
49446
49447# archive whole directory including binary xattrs
49448tar --xattrs -cf archive.tar -C dir .
49449
49450tar --xattrs -xf archive.tar -C output
49451ret=$?
49452getfattr -h -d output/file | grep -v -e '^#' -e ^$
49453exit $ret
49454)
49455) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49456at_status=$? at_failed=false
49457$at_check_filter
49458at_fn_diff_devnull "$at_stderr" || at_failed=:
49459echo >>"$at_stdout"; $as_echo "user.test=\"value\"
49460" | \
49461  $at_diff - "$at_stdout" || at_failed=:
49462at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
49463$at_failed && at_fn_log_failure
49464$at_traceon; }
49465
49466              { set +x
49467$as_echo "$at_srcdir/xattr04.at:29:
49468mkdir oldgnu
49469(cd oldgnu
49470TEST_TAR_FORMAT=oldgnu
49471export TEST_TAR_FORMAT
49472TAR_OPTIONS=\"-H oldgnu\"
49473export TAR_OPTIONS
49474rm -rf *
49475
49476
49477
49478  file=\$(TMPDIR=. mktemp fiXXXXXX)
49479
49480  setfattr -n user.test -v test \$file &> /dev/null
49481  if test \"\$?\" != 0; then
49482    exit 77
49483  fi
49484
49485
49486  getfattr \$file &> /dev/null
49487  if test \"\$?\" != 0; then
49488    exit 77
49489  fi
49490
49491
49492  file=\$(TMPDIR=. mktemp fiXXXXXX)
49493  setfattr -n user.test -v ahoj \$file
49494  # check whether tar fails to store xattrs
49495  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49496  if test \"\$err\" != \"0\"; then
49497    exit 77
49498  fi
49499
49500
49501mkdir dir
49502mkdir output
49503genfile --file dir/file
49504
49505setfattr -n user.test -v value dir/file
49506
49507# archive whole directory including binary xattrs
49508tar --xattrs -cf archive.tar -C dir .
49509
49510tar --xattrs -xf archive.tar -C output
49511ret=\$?
49512getfattr -h -d output/file | grep -v -e '^#' -e ^\$
49513exit \$ret
49514)"
49515at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
49516( $at_check_trace;
49517mkdir oldgnu
49518(cd oldgnu
49519TEST_TAR_FORMAT=oldgnu
49520export TEST_TAR_FORMAT
49521TAR_OPTIONS="-H oldgnu"
49522export TAR_OPTIONS
49523rm -rf *
49524
49525
49526
49527  file=$(TMPDIR=. mktemp fiXXXXXX)
49528
49529  setfattr -n user.test -v test $file &> /dev/null
49530  if test "$?" != 0; then
49531    exit 77
49532  fi
49533
49534
49535  getfattr $file &> /dev/null
49536  if test "$?" != 0; then
49537    exit 77
49538  fi
49539
49540
49541  file=$(TMPDIR=. mktemp fiXXXXXX)
49542  setfattr -n user.test -v ahoj $file
49543  # check whether tar fails to store xattrs
49544  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49545  if test "$err" != "0"; then
49546    exit 77
49547  fi
49548
49549
49550mkdir dir
49551mkdir output
49552genfile --file dir/file
49553
49554setfattr -n user.test -v value dir/file
49555
49556# archive whole directory including binary xattrs
49557tar --xattrs -cf archive.tar -C dir .
49558
49559tar --xattrs -xf archive.tar -C output
49560ret=$?
49561getfattr -h -d output/file | grep -v -e '^#' -e ^$
49562exit $ret
49563)
49564) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49565at_status=$? at_failed=false
49566$at_check_filter
49567at_fn_diff_devnull "$at_stderr" || at_failed=:
49568echo >>"$at_stdout"; $as_echo "user.test=\"value\"
49569" | \
49570  $at_diff - "$at_stdout" || at_failed=:
49571at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
49572$at_failed && at_fn_log_failure
49573$at_traceon; }
49574
49575              { set +x
49576$as_echo "$at_srcdir/xattr04.at:29:
49577mkdir ustar
49578(cd ustar
49579TEST_TAR_FORMAT=ustar
49580export TEST_TAR_FORMAT
49581TAR_OPTIONS=\"-H ustar\"
49582export TAR_OPTIONS
49583rm -rf *
49584
49585
49586
49587  file=\$(TMPDIR=. mktemp fiXXXXXX)
49588
49589  setfattr -n user.test -v test \$file &> /dev/null
49590  if test \"\$?\" != 0; then
49591    exit 77
49592  fi
49593
49594
49595  getfattr \$file &> /dev/null
49596  if test \"\$?\" != 0; then
49597    exit 77
49598  fi
49599
49600
49601  file=\$(TMPDIR=. mktemp fiXXXXXX)
49602  setfattr -n user.test -v ahoj \$file
49603  # check whether tar fails to store xattrs
49604  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49605  if test \"\$err\" != \"0\"; then
49606    exit 77
49607  fi
49608
49609
49610mkdir dir
49611mkdir output
49612genfile --file dir/file
49613
49614setfattr -n user.test -v value dir/file
49615
49616# archive whole directory including binary xattrs
49617tar --xattrs -cf archive.tar -C dir .
49618
49619tar --xattrs -xf archive.tar -C output
49620ret=\$?
49621getfattr -h -d output/file | grep -v -e '^#' -e ^\$
49622exit \$ret
49623)"
49624at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
49625( $at_check_trace;
49626mkdir ustar
49627(cd ustar
49628TEST_TAR_FORMAT=ustar
49629export TEST_TAR_FORMAT
49630TAR_OPTIONS="-H ustar"
49631export TAR_OPTIONS
49632rm -rf *
49633
49634
49635
49636  file=$(TMPDIR=. mktemp fiXXXXXX)
49637
49638  setfattr -n user.test -v test $file &> /dev/null
49639  if test "$?" != 0; then
49640    exit 77
49641  fi
49642
49643
49644  getfattr $file &> /dev/null
49645  if test "$?" != 0; then
49646    exit 77
49647  fi
49648
49649
49650  file=$(TMPDIR=. mktemp fiXXXXXX)
49651  setfattr -n user.test -v ahoj $file
49652  # check whether tar fails to store xattrs
49653  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49654  if test "$err" != "0"; then
49655    exit 77
49656  fi
49657
49658
49659mkdir dir
49660mkdir output
49661genfile --file dir/file
49662
49663setfattr -n user.test -v value dir/file
49664
49665# archive whole directory including binary xattrs
49666tar --xattrs -cf archive.tar -C dir .
49667
49668tar --xattrs -xf archive.tar -C output
49669ret=$?
49670getfattr -h -d output/file | grep -v -e '^#' -e ^$
49671exit $ret
49672)
49673) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49674at_status=$? at_failed=false
49675$at_check_filter
49676at_fn_diff_devnull "$at_stderr" || at_failed=:
49677echo >>"$at_stdout"; $as_echo "user.test=\"value\"
49678" | \
49679  $at_diff - "$at_stdout" || at_failed=:
49680at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
49681$at_failed && at_fn_log_failure
49682$at_traceon; }
49683
49684              { set +x
49685$as_echo "$at_srcdir/xattr04.at:29:
49686mkdir posix
49687(cd posix
49688TEST_TAR_FORMAT=posix
49689export TEST_TAR_FORMAT
49690TAR_OPTIONS=\"-H posix\"
49691export TAR_OPTIONS
49692rm -rf *
49693
49694
49695
49696  file=\$(TMPDIR=. mktemp fiXXXXXX)
49697
49698  setfattr -n user.test -v test \$file &> /dev/null
49699  if test \"\$?\" != 0; then
49700    exit 77
49701  fi
49702
49703
49704  getfattr \$file &> /dev/null
49705  if test \"\$?\" != 0; then
49706    exit 77
49707  fi
49708
49709
49710  file=\$(TMPDIR=. mktemp fiXXXXXX)
49711  setfattr -n user.test -v ahoj \$file
49712  # check whether tar fails to store xattrs
49713  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49714  if test \"\$err\" != \"0\"; then
49715    exit 77
49716  fi
49717
49718
49719mkdir dir
49720mkdir output
49721genfile --file dir/file
49722
49723setfattr -n user.test -v value dir/file
49724
49725# archive whole directory including binary xattrs
49726tar --xattrs -cf archive.tar -C dir .
49727
49728tar --xattrs -xf archive.tar -C output
49729ret=\$?
49730getfattr -h -d output/file | grep -v -e '^#' -e ^\$
49731exit \$ret
49732)"
49733at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
49734( $at_check_trace;
49735mkdir posix
49736(cd posix
49737TEST_TAR_FORMAT=posix
49738export TEST_TAR_FORMAT
49739TAR_OPTIONS="-H posix"
49740export TAR_OPTIONS
49741rm -rf *
49742
49743
49744
49745  file=$(TMPDIR=. mktemp fiXXXXXX)
49746
49747  setfattr -n user.test -v test $file &> /dev/null
49748  if test "$?" != 0; then
49749    exit 77
49750  fi
49751
49752
49753  getfattr $file &> /dev/null
49754  if test "$?" != 0; then
49755    exit 77
49756  fi
49757
49758
49759  file=$(TMPDIR=. mktemp fiXXXXXX)
49760  setfattr -n user.test -v ahoj $file
49761  # check whether tar fails to store xattrs
49762  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49763  if test "$err" != "0"; then
49764    exit 77
49765  fi
49766
49767
49768mkdir dir
49769mkdir output
49770genfile --file dir/file
49771
49772setfattr -n user.test -v value dir/file
49773
49774# archive whole directory including binary xattrs
49775tar --xattrs -cf archive.tar -C dir .
49776
49777tar --xattrs -xf archive.tar -C output
49778ret=$?
49779getfattr -h -d output/file | grep -v -e '^#' -e ^$
49780exit $ret
49781)
49782) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49783at_status=$? at_failed=false
49784$at_check_filter
49785at_fn_diff_devnull "$at_stderr" || at_failed=:
49786echo >>"$at_stdout"; $as_echo "user.test=\"value\"
49787" | \
49788  $at_diff - "$at_stdout" || at_failed=:
49789at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
49790$at_failed && at_fn_log_failure
49791$at_traceon; }
49792
49793              { set +x
49794$as_echo "$at_srcdir/xattr04.at:29:
49795mkdir gnu
49796(cd gnu
49797TEST_TAR_FORMAT=gnu
49798export TEST_TAR_FORMAT
49799TAR_OPTIONS=\"-H gnu\"
49800export TAR_OPTIONS
49801rm -rf *
49802
49803
49804
49805  file=\$(TMPDIR=. mktemp fiXXXXXX)
49806
49807  setfattr -n user.test -v test \$file &> /dev/null
49808  if test \"\$?\" != 0; then
49809    exit 77
49810  fi
49811
49812
49813  getfattr \$file &> /dev/null
49814  if test \"\$?\" != 0; then
49815    exit 77
49816  fi
49817
49818
49819  file=\$(TMPDIR=. mktemp fiXXXXXX)
49820  setfattr -n user.test -v ahoj \$file
49821  # check whether tar fails to store xattrs
49822  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49823  if test \"\$err\" != \"0\"; then
49824    exit 77
49825  fi
49826
49827
49828mkdir dir
49829mkdir output
49830genfile --file dir/file
49831
49832setfattr -n user.test -v value dir/file
49833
49834# archive whole directory including binary xattrs
49835tar --xattrs -cf archive.tar -C dir .
49836
49837tar --xattrs -xf archive.tar -C output
49838ret=\$?
49839getfattr -h -d output/file | grep -v -e '^#' -e ^\$
49840exit \$ret
49841)"
49842at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
49843( $at_check_trace;
49844mkdir gnu
49845(cd gnu
49846TEST_TAR_FORMAT=gnu
49847export TEST_TAR_FORMAT
49848TAR_OPTIONS="-H gnu"
49849export TAR_OPTIONS
49850rm -rf *
49851
49852
49853
49854  file=$(TMPDIR=. mktemp fiXXXXXX)
49855
49856  setfattr -n user.test -v test $file &> /dev/null
49857  if test "$?" != 0; then
49858    exit 77
49859  fi
49860
49861
49862  getfattr $file &> /dev/null
49863  if test "$?" != 0; then
49864    exit 77
49865  fi
49866
49867
49868  file=$(TMPDIR=. mktemp fiXXXXXX)
49869  setfattr -n user.test -v ahoj $file
49870  # check whether tar fails to store xattrs
49871  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49872  if test "$err" != "0"; then
49873    exit 77
49874  fi
49875
49876
49877mkdir dir
49878mkdir output
49879genfile --file dir/file
49880
49881setfattr -n user.test -v value dir/file
49882
49883# archive whole directory including binary xattrs
49884tar --xattrs -cf archive.tar -C dir .
49885
49886tar --xattrs -xf archive.tar -C output
49887ret=$?
49888getfattr -h -d output/file | grep -v -e '^#' -e ^$
49889exit $ret
49890)
49891) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49892at_status=$? at_failed=false
49893$at_check_filter
49894at_fn_diff_devnull "$at_stderr" || at_failed=:
49895echo >>"$at_stdout"; $as_echo "user.test=\"value\"
49896" | \
49897  $at_diff - "$at_stdout" || at_failed=:
49898at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
49899$at_failed && at_fn_log_failure
49900$at_traceon; }
49901
49902
49903
49904
49905  set +x
49906  $at_times_p && times >"$at_times_file"
49907) 5>&1 2>&1 7>&- | eval $at_tee_pipe
49908read at_status <"$at_status_file"
49909#AT_STOP_218
49910#AT_START_219
49911at_fn_group_banner 219 'xattr05.at:28' \
49912  "xattrs: keywords with '=' and '%'" "              " 31
49913at_xfail=no
49914      test -f $XFAILFILE && at_xfail=yes
49915(
49916  $as_echo "219. $at_setup_line: testing $at_desc ..."
49917  $at_traceon
49918
49919
49920
49921
49922
49923  { set +x
49924$as_echo "$at_srcdir/xattr05.at:31:
49925mkdir v7
49926(cd v7
49927TEST_TAR_FORMAT=v7
49928export TEST_TAR_FORMAT
49929TAR_OPTIONS=\"-H v7\"
49930export TAR_OPTIONS
49931rm -rf *
49932
49933
49934
49935  file=\$(TMPDIR=. mktemp fiXXXXXX)
49936
49937  setfattr -n user.test -v test \$file &> /dev/null
49938  if test \"\$?\" != 0; then
49939    exit 77
49940  fi
49941
49942
49943  getfattr \$file &> /dev/null
49944  if test \"\$?\" != 0; then
49945    exit 77
49946  fi
49947
49948
49949  file=\$(TMPDIR=. mktemp fiXXXXXX)
49950  setfattr -n user.test -v ahoj \$file
49951  # check whether tar fails to store xattrs
49952  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49953  if test \"\$err\" != \"0\"; then
49954    exit 77
49955  fi
49956
49957
49958mkdir dir
49959mkdir output
49960genfile --file dir/file
49961
49962setfattr -n user.=NAME%3D= -v value dir/file
49963getfattr -d dir/file | grep -v '# ' > before
49964
49965# archive whole directory including binary xattrs
49966tar --xattrs -cf archive.tar -C dir .
49967
49968tar --xattrs -xf archive.tar -C output
49969getfattr -d output/file | grep -v '# ' > after
49970diff before after
49971)"
49972at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
49973( $at_check_trace;
49974mkdir v7
49975(cd v7
49976TEST_TAR_FORMAT=v7
49977export TEST_TAR_FORMAT
49978TAR_OPTIONS="-H v7"
49979export TAR_OPTIONS
49980rm -rf *
49981
49982
49983
49984  file=$(TMPDIR=. mktemp fiXXXXXX)
49985
49986  setfattr -n user.test -v test $file &> /dev/null
49987  if test "$?" != 0; then
49988    exit 77
49989  fi
49990
49991
49992  getfattr $file &> /dev/null
49993  if test "$?" != 0; then
49994    exit 77
49995  fi
49996
49997
49998  file=$(TMPDIR=. mktemp fiXXXXXX)
49999  setfattr -n user.test -v ahoj $file
50000  # check whether tar fails to store xattrs
50001  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50002  if test "$err" != "0"; then
50003    exit 77
50004  fi
50005
50006
50007mkdir dir
50008mkdir output
50009genfile --file dir/file
50010
50011setfattr -n user.=NAME%3D= -v value dir/file
50012getfattr -d dir/file | grep -v '# ' > before
50013
50014# archive whole directory including binary xattrs
50015tar --xattrs -cf archive.tar -C dir .
50016
50017tar --xattrs -xf archive.tar -C output
50018getfattr -d output/file | grep -v '# ' > after
50019diff before after
50020)
50021) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50022at_status=$? at_failed=false
50023$at_check_filter
50024at_fn_diff_devnull "$at_stderr" || at_failed=:
50025at_fn_diff_devnull "$at_stdout" || at_failed=:
50026at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
50027$at_failed && at_fn_log_failure
50028$at_traceon; }
50029
50030              { set +x
50031$as_echo "$at_srcdir/xattr05.at:31:
50032mkdir oldgnu
50033(cd oldgnu
50034TEST_TAR_FORMAT=oldgnu
50035export TEST_TAR_FORMAT
50036TAR_OPTIONS=\"-H oldgnu\"
50037export TAR_OPTIONS
50038rm -rf *
50039
50040
50041
50042  file=\$(TMPDIR=. mktemp fiXXXXXX)
50043
50044  setfattr -n user.test -v test \$file &> /dev/null
50045  if test \"\$?\" != 0; then
50046    exit 77
50047  fi
50048
50049
50050  getfattr \$file &> /dev/null
50051  if test \"\$?\" != 0; then
50052    exit 77
50053  fi
50054
50055
50056  file=\$(TMPDIR=. mktemp fiXXXXXX)
50057  setfattr -n user.test -v ahoj \$file
50058  # check whether tar fails to store xattrs
50059  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50060  if test \"\$err\" != \"0\"; then
50061    exit 77
50062  fi
50063
50064
50065mkdir dir
50066mkdir output
50067genfile --file dir/file
50068
50069setfattr -n user.=NAME%3D= -v value dir/file
50070getfattr -d dir/file | grep -v '# ' > before
50071
50072# archive whole directory including binary xattrs
50073tar --xattrs -cf archive.tar -C dir .
50074
50075tar --xattrs -xf archive.tar -C output
50076getfattr -d output/file | grep -v '# ' > after
50077diff before after
50078)"
50079at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
50080( $at_check_trace;
50081mkdir oldgnu
50082(cd oldgnu
50083TEST_TAR_FORMAT=oldgnu
50084export TEST_TAR_FORMAT
50085TAR_OPTIONS="-H oldgnu"
50086export TAR_OPTIONS
50087rm -rf *
50088
50089
50090
50091  file=$(TMPDIR=. mktemp fiXXXXXX)
50092
50093  setfattr -n user.test -v test $file &> /dev/null
50094  if test "$?" != 0; then
50095    exit 77
50096  fi
50097
50098
50099  getfattr $file &> /dev/null
50100  if test "$?" != 0; then
50101    exit 77
50102  fi
50103
50104
50105  file=$(TMPDIR=. mktemp fiXXXXXX)
50106  setfattr -n user.test -v ahoj $file
50107  # check whether tar fails to store xattrs
50108  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50109  if test "$err" != "0"; then
50110    exit 77
50111  fi
50112
50113
50114mkdir dir
50115mkdir output
50116genfile --file dir/file
50117
50118setfattr -n user.=NAME%3D= -v value dir/file
50119getfattr -d dir/file | grep -v '# ' > before
50120
50121# archive whole directory including binary xattrs
50122tar --xattrs -cf archive.tar -C dir .
50123
50124tar --xattrs -xf archive.tar -C output
50125getfattr -d output/file | grep -v '# ' > after
50126diff before after
50127)
50128) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50129at_status=$? at_failed=false
50130$at_check_filter
50131at_fn_diff_devnull "$at_stderr" || at_failed=:
50132at_fn_diff_devnull "$at_stdout" || at_failed=:
50133at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
50134$at_failed && at_fn_log_failure
50135$at_traceon; }
50136
50137              { set +x
50138$as_echo "$at_srcdir/xattr05.at:31:
50139mkdir ustar
50140(cd ustar
50141TEST_TAR_FORMAT=ustar
50142export TEST_TAR_FORMAT
50143TAR_OPTIONS=\"-H ustar\"
50144export TAR_OPTIONS
50145rm -rf *
50146
50147
50148
50149  file=\$(TMPDIR=. mktemp fiXXXXXX)
50150
50151  setfattr -n user.test -v test \$file &> /dev/null
50152  if test \"\$?\" != 0; then
50153    exit 77
50154  fi
50155
50156
50157  getfattr \$file &> /dev/null
50158  if test \"\$?\" != 0; then
50159    exit 77
50160  fi
50161
50162
50163  file=\$(TMPDIR=. mktemp fiXXXXXX)
50164  setfattr -n user.test -v ahoj \$file
50165  # check whether tar fails to store xattrs
50166  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50167  if test \"\$err\" != \"0\"; then
50168    exit 77
50169  fi
50170
50171
50172mkdir dir
50173mkdir output
50174genfile --file dir/file
50175
50176setfattr -n user.=NAME%3D= -v value dir/file
50177getfattr -d dir/file | grep -v '# ' > before
50178
50179# archive whole directory including binary xattrs
50180tar --xattrs -cf archive.tar -C dir .
50181
50182tar --xattrs -xf archive.tar -C output
50183getfattr -d output/file | grep -v '# ' > after
50184diff before after
50185)"
50186at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
50187( $at_check_trace;
50188mkdir ustar
50189(cd ustar
50190TEST_TAR_FORMAT=ustar
50191export TEST_TAR_FORMAT
50192TAR_OPTIONS="-H ustar"
50193export TAR_OPTIONS
50194rm -rf *
50195
50196
50197
50198  file=$(TMPDIR=. mktemp fiXXXXXX)
50199
50200  setfattr -n user.test -v test $file &> /dev/null
50201  if test "$?" != 0; then
50202    exit 77
50203  fi
50204
50205
50206  getfattr $file &> /dev/null
50207  if test "$?" != 0; then
50208    exit 77
50209  fi
50210
50211
50212  file=$(TMPDIR=. mktemp fiXXXXXX)
50213  setfattr -n user.test -v ahoj $file
50214  # check whether tar fails to store xattrs
50215  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50216  if test "$err" != "0"; then
50217    exit 77
50218  fi
50219
50220
50221mkdir dir
50222mkdir output
50223genfile --file dir/file
50224
50225setfattr -n user.=NAME%3D= -v value dir/file
50226getfattr -d dir/file | grep -v '# ' > before
50227
50228# archive whole directory including binary xattrs
50229tar --xattrs -cf archive.tar -C dir .
50230
50231tar --xattrs -xf archive.tar -C output
50232getfattr -d output/file | grep -v '# ' > after
50233diff before after
50234)
50235) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50236at_status=$? at_failed=false
50237$at_check_filter
50238at_fn_diff_devnull "$at_stderr" || at_failed=:
50239at_fn_diff_devnull "$at_stdout" || at_failed=:
50240at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
50241$at_failed && at_fn_log_failure
50242$at_traceon; }
50243
50244              { set +x
50245$as_echo "$at_srcdir/xattr05.at:31:
50246mkdir posix
50247(cd posix
50248TEST_TAR_FORMAT=posix
50249export TEST_TAR_FORMAT
50250TAR_OPTIONS=\"-H posix\"
50251export TAR_OPTIONS
50252rm -rf *
50253
50254
50255
50256  file=\$(TMPDIR=. mktemp fiXXXXXX)
50257
50258  setfattr -n user.test -v test \$file &> /dev/null
50259  if test \"\$?\" != 0; then
50260    exit 77
50261  fi
50262
50263
50264  getfattr \$file &> /dev/null
50265  if test \"\$?\" != 0; then
50266    exit 77
50267  fi
50268
50269
50270  file=\$(TMPDIR=. mktemp fiXXXXXX)
50271  setfattr -n user.test -v ahoj \$file
50272  # check whether tar fails to store xattrs
50273  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50274  if test \"\$err\" != \"0\"; then
50275    exit 77
50276  fi
50277
50278
50279mkdir dir
50280mkdir output
50281genfile --file dir/file
50282
50283setfattr -n user.=NAME%3D= -v value dir/file
50284getfattr -d dir/file | grep -v '# ' > before
50285
50286# archive whole directory including binary xattrs
50287tar --xattrs -cf archive.tar -C dir .
50288
50289tar --xattrs -xf archive.tar -C output
50290getfattr -d output/file | grep -v '# ' > after
50291diff before after
50292)"
50293at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
50294( $at_check_trace;
50295mkdir posix
50296(cd posix
50297TEST_TAR_FORMAT=posix
50298export TEST_TAR_FORMAT
50299TAR_OPTIONS="-H posix"
50300export TAR_OPTIONS
50301rm -rf *
50302
50303
50304
50305  file=$(TMPDIR=. mktemp fiXXXXXX)
50306
50307  setfattr -n user.test -v test $file &> /dev/null
50308  if test "$?" != 0; then
50309    exit 77
50310  fi
50311
50312
50313  getfattr $file &> /dev/null
50314  if test "$?" != 0; then
50315    exit 77
50316  fi
50317
50318
50319  file=$(TMPDIR=. mktemp fiXXXXXX)
50320  setfattr -n user.test -v ahoj $file
50321  # check whether tar fails to store xattrs
50322  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50323  if test "$err" != "0"; then
50324    exit 77
50325  fi
50326
50327
50328mkdir dir
50329mkdir output
50330genfile --file dir/file
50331
50332setfattr -n user.=NAME%3D= -v value dir/file
50333getfattr -d dir/file | grep -v '# ' > before
50334
50335# archive whole directory including binary xattrs
50336tar --xattrs -cf archive.tar -C dir .
50337
50338tar --xattrs -xf archive.tar -C output
50339getfattr -d output/file | grep -v '# ' > after
50340diff before after
50341)
50342) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50343at_status=$? at_failed=false
50344$at_check_filter
50345at_fn_diff_devnull "$at_stderr" || at_failed=:
50346at_fn_diff_devnull "$at_stdout" || at_failed=:
50347at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
50348$at_failed && at_fn_log_failure
50349$at_traceon; }
50350
50351              { set +x
50352$as_echo "$at_srcdir/xattr05.at:31:
50353mkdir gnu
50354(cd gnu
50355TEST_TAR_FORMAT=gnu
50356export TEST_TAR_FORMAT
50357TAR_OPTIONS=\"-H gnu\"
50358export TAR_OPTIONS
50359rm -rf *
50360
50361
50362
50363  file=\$(TMPDIR=. mktemp fiXXXXXX)
50364
50365  setfattr -n user.test -v test \$file &> /dev/null
50366  if test \"\$?\" != 0; then
50367    exit 77
50368  fi
50369
50370
50371  getfattr \$file &> /dev/null
50372  if test \"\$?\" != 0; then
50373    exit 77
50374  fi
50375
50376
50377  file=\$(TMPDIR=. mktemp fiXXXXXX)
50378  setfattr -n user.test -v ahoj \$file
50379  # check whether tar fails to store xattrs
50380  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50381  if test \"\$err\" != \"0\"; then
50382    exit 77
50383  fi
50384
50385
50386mkdir dir
50387mkdir output
50388genfile --file dir/file
50389
50390setfattr -n user.=NAME%3D= -v value dir/file
50391getfattr -d dir/file | grep -v '# ' > before
50392
50393# archive whole directory including binary xattrs
50394tar --xattrs -cf archive.tar -C dir .
50395
50396tar --xattrs -xf archive.tar -C output
50397getfattr -d output/file | grep -v '# ' > after
50398diff before after
50399)"
50400at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
50401( $at_check_trace;
50402mkdir gnu
50403(cd gnu
50404TEST_TAR_FORMAT=gnu
50405export TEST_TAR_FORMAT
50406TAR_OPTIONS="-H gnu"
50407export TAR_OPTIONS
50408rm -rf *
50409
50410
50411
50412  file=$(TMPDIR=. mktemp fiXXXXXX)
50413
50414  setfattr -n user.test -v test $file &> /dev/null
50415  if test "$?" != 0; then
50416    exit 77
50417  fi
50418
50419
50420  getfattr $file &> /dev/null
50421  if test "$?" != 0; then
50422    exit 77
50423  fi
50424
50425
50426  file=$(TMPDIR=. mktemp fiXXXXXX)
50427  setfattr -n user.test -v ahoj $file
50428  # check whether tar fails to store xattrs
50429  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50430  if test "$err" != "0"; then
50431    exit 77
50432  fi
50433
50434
50435mkdir dir
50436mkdir output
50437genfile --file dir/file
50438
50439setfattr -n user.=NAME%3D= -v value dir/file
50440getfattr -d dir/file | grep -v '# ' > before
50441
50442# archive whole directory including binary xattrs
50443tar --xattrs -cf archive.tar -C dir .
50444
50445tar --xattrs -xf archive.tar -C output
50446getfattr -d output/file | grep -v '# ' > after
50447diff before after
50448)
50449) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50450at_status=$? at_failed=false
50451$at_check_filter
50452at_fn_diff_devnull "$at_stderr" || at_failed=:
50453at_fn_diff_devnull "$at_stdout" || at_failed=:
50454at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
50455$at_failed && at_fn_log_failure
50456$at_traceon; }
50457
50458
50459
50460
50461  set +x
50462  $at_times_p && times >"$at_times_file"
50463) 5>&1 2>&1 7>&- | eval $at_tee_pipe
50464read at_status <"$at_status_file"
50465#AT_STOP_219
50466#AT_START_220
50467at_fn_group_banner 220 'xattr06.at:27' \
50468  "xattrs: exclude xattrs on create " "              " 31
50469at_xfail=no
50470      test -f $XFAILFILE && at_xfail=yes
50471(
50472  $as_echo "220. $at_setup_line: testing $at_desc ..."
50473  $at_traceon
50474
50475
50476
50477
50478
50479  { set +x
50480$as_echo "$at_srcdir/xattr06.at:30:
50481mkdir v7
50482(cd v7
50483TEST_TAR_FORMAT=v7
50484export TEST_TAR_FORMAT
50485TAR_OPTIONS=\"-H v7\"
50486export TAR_OPTIONS
50487rm -rf *
50488
50489
50490
50491  file=\$(TMPDIR=. mktemp fiXXXXXX)
50492
50493  setfattr -n user.test -v test \$file &> /dev/null
50494  if test \"\$?\" != 0; then
50495    exit 77
50496  fi
50497
50498
50499  getfattr \$file &> /dev/null
50500  if test \"\$?\" != 0; then
50501    exit 77
50502  fi
50503
50504
50505  file=\$(TMPDIR=. mktemp fiXXXXXX)
50506  setfattr -n user.test -v ahoj \$file
50507  # check whether tar fails to store xattrs
50508  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50509  if test \"\$err\" != \"0\"; then
50510    exit 77
50511  fi
50512
50513
50514mkdir dir
50515mkdir output
50516genfile --file dir/file
50517
50518for attr in excluded incla inclb inclc incl_excluded
50519do
50520  setfattr -n user.\${attr} -v value dir/file || exit 77
50521done
50522
50523tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
50524tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
50525
50526getfattr -d output/file | grep -v \\
50527    -e excluded \\
50528    -e inclb \\
50529    -e inclc > filtered
50530getfattr -d output/file > full
50531# if they differ then the attribute is still present
50532diff filtered full
50533)"
50534at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr06.at:30"
50535( $at_check_trace;
50536mkdir v7
50537(cd v7
50538TEST_TAR_FORMAT=v7
50539export TEST_TAR_FORMAT
50540TAR_OPTIONS="-H v7"
50541export TAR_OPTIONS
50542rm -rf *
50543
50544
50545
50546  file=$(TMPDIR=. mktemp fiXXXXXX)
50547
50548  setfattr -n user.test -v test $file &> /dev/null
50549  if test "$?" != 0; then
50550    exit 77
50551  fi
50552
50553
50554  getfattr $file &> /dev/null
50555  if test "$?" != 0; then
50556    exit 77
50557  fi
50558
50559
50560  file=$(TMPDIR=. mktemp fiXXXXXX)
50561  setfattr -n user.test -v ahoj $file
50562  # check whether tar fails to store xattrs
50563  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50564  if test "$err" != "0"; then
50565    exit 77
50566  fi
50567
50568
50569mkdir dir
50570mkdir output
50571genfile --file dir/file
50572
50573for attr in excluded incla inclb inclc incl_excluded
50574do
50575  setfattr -n user.${attr} -v value dir/file || exit 77
50576done
50577
50578tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
50579tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
50580
50581getfattr -d output/file | grep -v \
50582    -e excluded \
50583    -e inclb \
50584    -e inclc > filtered
50585getfattr -d output/file > full
50586# if they differ then the attribute is still present
50587diff filtered full
50588)
50589) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50590at_status=$? at_failed=false
50591$at_check_filter
50592at_fn_diff_devnull "$at_stderr" || at_failed=:
50593at_fn_diff_devnull "$at_stdout" || at_failed=:
50594at_fn_check_status 0 $at_status "$at_srcdir/xattr06.at:30"
50595$at_failed && at_fn_log_failure
50596$at_traceon; }
50597
50598              { set +x
50599$as_echo "$at_srcdir/xattr06.at:30:
50600mkdir oldgnu
50601(cd oldgnu
50602TEST_TAR_FORMAT=oldgnu
50603export TEST_TAR_FORMAT
50604TAR_OPTIONS=\"-H oldgnu\"
50605export TAR_OPTIONS
50606rm -rf *
50607
50608
50609
50610  file=\$(TMPDIR=. mktemp fiXXXXXX)
50611
50612  setfattr -n user.test -v test \$file &> /dev/null
50613  if test \"\$?\" != 0; then
50614    exit 77
50615  fi
50616
50617
50618  getfattr \$file &> /dev/null
50619  if test \"\$?\" != 0; then
50620    exit 77
50621  fi
50622
50623
50624  file=\$(TMPDIR=. mktemp fiXXXXXX)
50625  setfattr -n user.test -v ahoj \$file
50626  # check whether tar fails to store xattrs
50627  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50628  if test \"\$err\" != \"0\"; then
50629    exit 77
50630  fi
50631
50632
50633mkdir dir
50634mkdir output
50635genfile --file dir/file
50636
50637for attr in excluded incla inclb inclc incl_excluded
50638do
50639  setfattr -n user.\${attr} -v value dir/file || exit 77
50640done
50641
50642tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
50643tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
50644
50645getfattr -d output/file | grep -v \\
50646    -e excluded \\
50647    -e inclb \\
50648    -e inclc > filtered
50649getfattr -d output/file > full
50650# if they differ then the attribute is still present
50651diff filtered full
50652)"
50653at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr06.at:30"
50654( $at_check_trace;
50655mkdir oldgnu
50656(cd oldgnu
50657TEST_TAR_FORMAT=oldgnu
50658export TEST_TAR_FORMAT
50659TAR_OPTIONS="-H oldgnu"
50660export TAR_OPTIONS
50661rm -rf *
50662
50663
50664
50665  file=$(TMPDIR=. mktemp fiXXXXXX)
50666
50667  setfattr -n user.test -v test $file &> /dev/null
50668  if test "$?" != 0; then
50669    exit 77
50670  fi
50671
50672
50673  getfattr $file &> /dev/null
50674  if test "$?" != 0; then
50675    exit 77
50676  fi
50677
50678
50679  file=$(TMPDIR=. mktemp fiXXXXXX)
50680  setfattr -n user.test -v ahoj $file
50681  # check whether tar fails to store xattrs
50682  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50683  if test "$err" != "0"; then
50684    exit 77
50685  fi
50686
50687
50688mkdir dir
50689mkdir output
50690genfile --file dir/file
50691
50692for attr in excluded incla inclb inclc incl_excluded
50693do
50694  setfattr -n user.${attr} -v value dir/file || exit 77
50695done
50696
50697tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
50698tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
50699
50700getfattr -d output/file | grep -v \
50701    -e excluded \
50702    -e inclb \
50703    -e inclc > filtered
50704getfattr -d output/file > full
50705# if they differ then the attribute is still present
50706diff filtered full
50707)
50708) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50709at_status=$? at_failed=false
50710$at_check_filter
50711at_fn_diff_devnull "$at_stderr" || at_failed=:
50712at_fn_diff_devnull "$at_stdout" || at_failed=:
50713at_fn_check_status 0 $at_status "$at_srcdir/xattr06.at:30"
50714$at_failed && at_fn_log_failure
50715$at_traceon; }
50716
50717              { set +x
50718$as_echo "$at_srcdir/xattr06.at:30:
50719mkdir ustar
50720(cd ustar
50721TEST_TAR_FORMAT=ustar
50722export TEST_TAR_FORMAT
50723TAR_OPTIONS=\"-H ustar\"
50724export TAR_OPTIONS
50725rm -rf *
50726
50727
50728
50729  file=\$(TMPDIR=. mktemp fiXXXXXX)
50730
50731  setfattr -n user.test -v test \$file &> /dev/null
50732  if test \"\$?\" != 0; then
50733    exit 77
50734  fi
50735
50736
50737  getfattr \$file &> /dev/null
50738  if test \"\$?\" != 0; then
50739    exit 77
50740  fi
50741
50742
50743  file=\$(TMPDIR=. mktemp fiXXXXXX)
50744  setfattr -n user.test -v ahoj \$file
50745  # check whether tar fails to store xattrs
50746  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50747  if test \"\$err\" != \"0\"; then
50748    exit 77
50749  fi
50750
50751
50752mkdir dir
50753mkdir output
50754genfile --file dir/file
50755
50756for attr in excluded incla inclb inclc incl_excluded
50757do
50758  setfattr -n user.\${attr} -v value dir/file || exit 77
50759done
50760
50761tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
50762tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
50763
50764getfattr -d output/file | grep -v \\
50765    -e excluded \\
50766    -e inclb \\
50767    -e inclc > filtered
50768getfattr -d output/file > full
50769# if they differ then the attribute is still present
50770diff filtered full
50771)"
50772at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr06.at:30"
50773( $at_check_trace;
50774mkdir ustar
50775(cd ustar
50776TEST_TAR_FORMAT=ustar
50777export TEST_TAR_FORMAT
50778TAR_OPTIONS="-H ustar"
50779export TAR_OPTIONS
50780rm -rf *
50781
50782
50783
50784  file=$(TMPDIR=. mktemp fiXXXXXX)
50785
50786  setfattr -n user.test -v test $file &> /dev/null
50787  if test "$?" != 0; then
50788    exit 77
50789  fi
50790
50791
50792  getfattr $file &> /dev/null
50793  if test "$?" != 0; then
50794    exit 77
50795  fi
50796
50797
50798  file=$(TMPDIR=. mktemp fiXXXXXX)
50799  setfattr -n user.test -v ahoj $file
50800  # check whether tar fails to store xattrs
50801  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50802  if test "$err" != "0"; then
50803    exit 77
50804  fi
50805
50806
50807mkdir dir
50808mkdir output
50809genfile --file dir/file
50810
50811for attr in excluded incla inclb inclc incl_excluded
50812do
50813  setfattr -n user.${attr} -v value dir/file || exit 77
50814done
50815
50816tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
50817tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
50818
50819getfattr -d output/file | grep -v \
50820    -e excluded \
50821    -e inclb \
50822    -e inclc > filtered
50823getfattr -d output/file > full
50824# if they differ then the attribute is still present
50825diff filtered full
50826)
50827) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50828at_status=$? at_failed=false
50829$at_check_filter
50830at_fn_diff_devnull "$at_stderr" || at_failed=:
50831at_fn_diff_devnull "$at_stdout" || at_failed=:
50832at_fn_check_status 0 $at_status "$at_srcdir/xattr06.at:30"
50833$at_failed && at_fn_log_failure
50834$at_traceon; }
50835
50836              { set +x
50837$as_echo "$at_srcdir/xattr06.at:30:
50838mkdir posix
50839(cd posix
50840TEST_TAR_FORMAT=posix
50841export TEST_TAR_FORMAT
50842TAR_OPTIONS=\"-H posix\"
50843export TAR_OPTIONS
50844rm -rf *
50845
50846
50847
50848  file=\$(TMPDIR=. mktemp fiXXXXXX)
50849
50850  setfattr -n user.test -v test \$file &> /dev/null
50851  if test \"\$?\" != 0; then
50852    exit 77
50853  fi
50854
50855
50856  getfattr \$file &> /dev/null
50857  if test \"\$?\" != 0; then
50858    exit 77
50859  fi
50860
50861
50862  file=\$(TMPDIR=. mktemp fiXXXXXX)
50863  setfattr -n user.test -v ahoj \$file
50864  # check whether tar fails to store xattrs
50865  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50866  if test \"\$err\" != \"0\"; then
50867    exit 77
50868  fi
50869
50870
50871mkdir dir
50872mkdir output
50873genfile --file dir/file
50874
50875for attr in excluded incla inclb inclc incl_excluded
50876do
50877  setfattr -n user.\${attr} -v value dir/file || exit 77
50878done
50879
50880tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
50881tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
50882
50883getfattr -d output/file | grep -v \\
50884    -e excluded \\
50885    -e inclb \\
50886    -e inclc > filtered
50887getfattr -d output/file > full
50888# if they differ then the attribute is still present
50889diff filtered full
50890)"
50891at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr06.at:30"
50892( $at_check_trace;
50893mkdir posix
50894(cd posix
50895TEST_TAR_FORMAT=posix
50896export TEST_TAR_FORMAT
50897TAR_OPTIONS="-H posix"
50898export TAR_OPTIONS
50899rm -rf *
50900
50901
50902
50903  file=$(TMPDIR=. mktemp fiXXXXXX)
50904
50905  setfattr -n user.test -v test $file &> /dev/null
50906  if test "$?" != 0; then
50907    exit 77
50908  fi
50909
50910
50911  getfattr $file &> /dev/null
50912  if test "$?" != 0; then
50913    exit 77
50914  fi
50915
50916
50917  file=$(TMPDIR=. mktemp fiXXXXXX)
50918  setfattr -n user.test -v ahoj $file
50919  # check whether tar fails to store xattrs
50920  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50921  if test "$err" != "0"; then
50922    exit 77
50923  fi
50924
50925
50926mkdir dir
50927mkdir output
50928genfile --file dir/file
50929
50930for attr in excluded incla inclb inclc incl_excluded
50931do
50932  setfattr -n user.${attr} -v value dir/file || exit 77
50933done
50934
50935tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
50936tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
50937
50938getfattr -d output/file | grep -v \
50939    -e excluded \
50940    -e inclb \
50941    -e inclc > filtered
50942getfattr -d output/file > full
50943# if they differ then the attribute is still present
50944diff filtered full
50945)
50946) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50947at_status=$? at_failed=false
50948$at_check_filter
50949at_fn_diff_devnull "$at_stderr" || at_failed=:
50950at_fn_diff_devnull "$at_stdout" || at_failed=:
50951at_fn_check_status 0 $at_status "$at_srcdir/xattr06.at:30"
50952$at_failed && at_fn_log_failure
50953$at_traceon; }
50954
50955              { set +x
50956$as_echo "$at_srcdir/xattr06.at:30:
50957mkdir gnu
50958(cd gnu
50959TEST_TAR_FORMAT=gnu
50960export TEST_TAR_FORMAT
50961TAR_OPTIONS=\"-H gnu\"
50962export TAR_OPTIONS
50963rm -rf *
50964
50965
50966
50967  file=\$(TMPDIR=. mktemp fiXXXXXX)
50968
50969  setfattr -n user.test -v test \$file &> /dev/null
50970  if test \"\$?\" != 0; then
50971    exit 77
50972  fi
50973
50974
50975  getfattr \$file &> /dev/null
50976  if test \"\$?\" != 0; then
50977    exit 77
50978  fi
50979
50980
50981  file=\$(TMPDIR=. mktemp fiXXXXXX)
50982  setfattr -n user.test -v ahoj \$file
50983  # check whether tar fails to store xattrs
50984  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50985  if test \"\$err\" != \"0\"; then
50986    exit 77
50987  fi
50988
50989
50990mkdir dir
50991mkdir output
50992genfile --file dir/file
50993
50994for attr in excluded incla inclb inclc incl_excluded
50995do
50996  setfattr -n user.\${attr} -v value dir/file || exit 77
50997done
50998
50999tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
51000tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
51001
51002getfattr -d output/file | grep -v \\
51003    -e excluded \\
51004    -e inclb \\
51005    -e inclc > filtered
51006getfattr -d output/file > full
51007# if they differ then the attribute is still present
51008diff filtered full
51009)"
51010at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr06.at:30"
51011( $at_check_trace;
51012mkdir gnu
51013(cd gnu
51014TEST_TAR_FORMAT=gnu
51015export TEST_TAR_FORMAT
51016TAR_OPTIONS="-H gnu"
51017export TAR_OPTIONS
51018rm -rf *
51019
51020
51021
51022  file=$(TMPDIR=. mktemp fiXXXXXX)
51023
51024  setfattr -n user.test -v test $file &> /dev/null
51025  if test "$?" != 0; then
51026    exit 77
51027  fi
51028
51029
51030  getfattr $file &> /dev/null
51031  if test "$?" != 0; then
51032    exit 77
51033  fi
51034
51035
51036  file=$(TMPDIR=. mktemp fiXXXXXX)
51037  setfattr -n user.test -v ahoj $file
51038  # check whether tar fails to store xattrs
51039  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51040  if test "$err" != "0"; then
51041    exit 77
51042  fi
51043
51044
51045mkdir dir
51046mkdir output
51047genfile --file dir/file
51048
51049for attr in excluded incla inclb inclc incl_excluded
51050do
51051  setfattr -n user.${attr} -v value dir/file || exit 77
51052done
51053
51054tar --xattrs-include=user.incl'*' --xattrs-exclude=user.incl_excluded -cf archive.tar -C dir .
51055tar -xf archive.tar --xattrs-include=user.incl[ab] --xattrs-exclude=user.inclb -C output
51056
51057getfattr -d output/file | grep -v \
51058    -e excluded \
51059    -e inclb \
51060    -e inclc > filtered
51061getfattr -d output/file > full
51062# if they differ then the attribute is still present
51063diff filtered full
51064)
51065) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51066at_status=$? at_failed=false
51067$at_check_filter
51068at_fn_diff_devnull "$at_stderr" || at_failed=:
51069at_fn_diff_devnull "$at_stdout" || at_failed=:
51070at_fn_check_status 0 $at_status "$at_srcdir/xattr06.at:30"
51071$at_failed && at_fn_log_failure
51072$at_traceon; }
51073
51074
51075
51076
51077  set +x
51078  $at_times_p && times >"$at_times_file"
51079) 5>&1 2>&1 7>&- | eval $at_tee_pipe
51080read at_status <"$at_status_file"
51081#AT_STOP_220
51082#AT_START_221
51083at_fn_group_banner 221 'xattr07.at:26' \
51084  "xattrs: xattrs and --skip-old-files" "            " 31
51085at_xfail=no
51086      test -f $XFAILFILE && at_xfail=yes
51087(
51088  $as_echo "221. $at_setup_line: testing $at_desc ..."
51089  $at_traceon
51090
51091
51092
51093
51094
51095  { set +x
51096$as_echo "$at_srcdir/xattr07.at:29:
51097mkdir v7
51098(cd v7
51099TEST_TAR_FORMAT=v7
51100export TEST_TAR_FORMAT
51101TAR_OPTIONS=\"-H v7\"
51102export TAR_OPTIONS
51103rm -rf *
51104
51105
51106
51107  file=\$(TMPDIR=. mktemp fiXXXXXX)
51108
51109  setfattr -n user.test -v test \$file &> /dev/null
51110  if test \"\$?\" != 0; then
51111    exit 77
51112  fi
51113
51114
51115  getfattr \$file &> /dev/null
51116  if test \"\$?\" != 0; then
51117    exit 77
51118  fi
51119
51120
51121  file=\$(TMPDIR=. mktemp fiXXXXXX)
51122  setfattr -n user.test -v ahoj \$file
51123  # check whether tar fails to store xattrs
51124  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
51125  if test \"\$err\" != \"0\"; then
51126    exit 77
51127  fi
51128
51129mkdir dir
51130genfile --file dir/file
51131genfile --file dir/file2
51132
51133setfattr -n user.test -v OurDirValue dir
51134setfattr -n user.test -v OurFileValue dir/file
51135setfattr -n user.test -v OurFileValue dir/file2
51136
51137tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51138
51139setfattr -n user.test -v OurDirValue2 dir
51140setfattr -n user.test -v OurFileValue2 dir/file
51141setfattr -n user.test -v OurFileValue2 dir/file2
51142
51143# Check that tar continues to file2 too!
51144tar --xattrs -xvf archive.tar --skip-old-files
51145tar --xattrs -xvf archive.tar --keep-old-files
51146
51147getfattr -h -d dir         | grep -v -e '^#' -e ^\$
51148getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
51149getfattr -h -d dir/file2   | grep -v -e '^#' -e ^\$
51150)"
51151at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr07.at:29"
51152( $at_check_trace;
51153mkdir v7
51154(cd v7
51155TEST_TAR_FORMAT=v7
51156export TEST_TAR_FORMAT
51157TAR_OPTIONS="-H v7"
51158export TAR_OPTIONS
51159rm -rf *
51160
51161
51162
51163  file=$(TMPDIR=. mktemp fiXXXXXX)
51164
51165  setfattr -n user.test -v test $file &> /dev/null
51166  if test "$?" != 0; then
51167    exit 77
51168  fi
51169
51170
51171  getfattr $file &> /dev/null
51172  if test "$?" != 0; then
51173    exit 77
51174  fi
51175
51176
51177  file=$(TMPDIR=. mktemp fiXXXXXX)
51178  setfattr -n user.test -v ahoj $file
51179  # check whether tar fails to store xattrs
51180  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51181  if test "$err" != "0"; then
51182    exit 77
51183  fi
51184
51185mkdir dir
51186genfile --file dir/file
51187genfile --file dir/file2
51188
51189setfattr -n user.test -v OurDirValue dir
51190setfattr -n user.test -v OurFileValue dir/file
51191setfattr -n user.test -v OurFileValue dir/file2
51192
51193tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51194
51195setfattr -n user.test -v OurDirValue2 dir
51196setfattr -n user.test -v OurFileValue2 dir/file
51197setfattr -n user.test -v OurFileValue2 dir/file2
51198
51199# Check that tar continues to file2 too!
51200tar --xattrs -xvf archive.tar --skip-old-files
51201tar --xattrs -xvf archive.tar --keep-old-files
51202
51203getfattr -h -d dir         | grep -v -e '^#' -e ^$
51204getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
51205getfattr -h -d dir/file2   | grep -v -e '^#' -e ^$
51206)
51207) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51208at_status=$? at_failed=false
51209$at_check_filter
51210echo >>"$at_stderr"; $as_echo "tar: dir: skipping existing file
51211tar: dir/file: skipping existing file
51212tar: dir/file: skipping existing file
51213tar: dir/file2: skipping existing file
51214tar: dir/file2: skipping existing file
51215tar: dir/file: Cannot open: File exists
51216tar: dir/file2: Cannot open: File exists
51217tar: Exiting with failure status due to previous errors
51218" | \
51219  $at_diff - "$at_stderr" || at_failed=:
51220echo >>"$at_stdout"; $as_echo "dir/
51221dir/file
51222dir/file2
51223dir/
51224dir/file
51225dir/file2
51226user.test=\"OurDirValue2\"
51227user.test=\"OurFileValue2\"
51228user.test=\"OurFileValue2\"
51229" | \
51230  $at_diff - "$at_stdout" || at_failed=:
51231at_fn_check_status 0 $at_status "$at_srcdir/xattr07.at:29"
51232$at_failed && at_fn_log_failure
51233$at_traceon; }
51234
51235              { set +x
51236$as_echo "$at_srcdir/xattr07.at:29:
51237mkdir oldgnu
51238(cd oldgnu
51239TEST_TAR_FORMAT=oldgnu
51240export TEST_TAR_FORMAT
51241TAR_OPTIONS=\"-H oldgnu\"
51242export TAR_OPTIONS
51243rm -rf *
51244
51245
51246
51247  file=\$(TMPDIR=. mktemp fiXXXXXX)
51248
51249  setfattr -n user.test -v test \$file &> /dev/null
51250  if test \"\$?\" != 0; then
51251    exit 77
51252  fi
51253
51254
51255  getfattr \$file &> /dev/null
51256  if test \"\$?\" != 0; then
51257    exit 77
51258  fi
51259
51260
51261  file=\$(TMPDIR=. mktemp fiXXXXXX)
51262  setfattr -n user.test -v ahoj \$file
51263  # check whether tar fails to store xattrs
51264  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
51265  if test \"\$err\" != \"0\"; then
51266    exit 77
51267  fi
51268
51269mkdir dir
51270genfile --file dir/file
51271genfile --file dir/file2
51272
51273setfattr -n user.test -v OurDirValue dir
51274setfattr -n user.test -v OurFileValue dir/file
51275setfattr -n user.test -v OurFileValue dir/file2
51276
51277tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51278
51279setfattr -n user.test -v OurDirValue2 dir
51280setfattr -n user.test -v OurFileValue2 dir/file
51281setfattr -n user.test -v OurFileValue2 dir/file2
51282
51283# Check that tar continues to file2 too!
51284tar --xattrs -xvf archive.tar --skip-old-files
51285tar --xattrs -xvf archive.tar --keep-old-files
51286
51287getfattr -h -d dir         | grep -v -e '^#' -e ^\$
51288getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
51289getfattr -h -d dir/file2   | grep -v -e '^#' -e ^\$
51290)"
51291at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr07.at:29"
51292( $at_check_trace;
51293mkdir oldgnu
51294(cd oldgnu
51295TEST_TAR_FORMAT=oldgnu
51296export TEST_TAR_FORMAT
51297TAR_OPTIONS="-H oldgnu"
51298export TAR_OPTIONS
51299rm -rf *
51300
51301
51302
51303  file=$(TMPDIR=. mktemp fiXXXXXX)
51304
51305  setfattr -n user.test -v test $file &> /dev/null
51306  if test "$?" != 0; then
51307    exit 77
51308  fi
51309
51310
51311  getfattr $file &> /dev/null
51312  if test "$?" != 0; then
51313    exit 77
51314  fi
51315
51316
51317  file=$(TMPDIR=. mktemp fiXXXXXX)
51318  setfattr -n user.test -v ahoj $file
51319  # check whether tar fails to store xattrs
51320  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51321  if test "$err" != "0"; then
51322    exit 77
51323  fi
51324
51325mkdir dir
51326genfile --file dir/file
51327genfile --file dir/file2
51328
51329setfattr -n user.test -v OurDirValue dir
51330setfattr -n user.test -v OurFileValue dir/file
51331setfattr -n user.test -v OurFileValue dir/file2
51332
51333tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51334
51335setfattr -n user.test -v OurDirValue2 dir
51336setfattr -n user.test -v OurFileValue2 dir/file
51337setfattr -n user.test -v OurFileValue2 dir/file2
51338
51339# Check that tar continues to file2 too!
51340tar --xattrs -xvf archive.tar --skip-old-files
51341tar --xattrs -xvf archive.tar --keep-old-files
51342
51343getfattr -h -d dir         | grep -v -e '^#' -e ^$
51344getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
51345getfattr -h -d dir/file2   | grep -v -e '^#' -e ^$
51346)
51347) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51348at_status=$? at_failed=false
51349$at_check_filter
51350echo >>"$at_stderr"; $as_echo "tar: dir: skipping existing file
51351tar: dir/file: skipping existing file
51352tar: dir/file: skipping existing file
51353tar: dir/file2: skipping existing file
51354tar: dir/file2: skipping existing file
51355tar: dir/file: Cannot open: File exists
51356tar: dir/file2: Cannot open: File exists
51357tar: Exiting with failure status due to previous errors
51358" | \
51359  $at_diff - "$at_stderr" || at_failed=:
51360echo >>"$at_stdout"; $as_echo "dir/
51361dir/file
51362dir/file2
51363dir/
51364dir/file
51365dir/file2
51366user.test=\"OurDirValue2\"
51367user.test=\"OurFileValue2\"
51368user.test=\"OurFileValue2\"
51369" | \
51370  $at_diff - "$at_stdout" || at_failed=:
51371at_fn_check_status 0 $at_status "$at_srcdir/xattr07.at:29"
51372$at_failed && at_fn_log_failure
51373$at_traceon; }
51374
51375              { set +x
51376$as_echo "$at_srcdir/xattr07.at:29:
51377mkdir ustar
51378(cd ustar
51379TEST_TAR_FORMAT=ustar
51380export TEST_TAR_FORMAT
51381TAR_OPTIONS=\"-H ustar\"
51382export TAR_OPTIONS
51383rm -rf *
51384
51385
51386
51387  file=\$(TMPDIR=. mktemp fiXXXXXX)
51388
51389  setfattr -n user.test -v test \$file &> /dev/null
51390  if test \"\$?\" != 0; then
51391    exit 77
51392  fi
51393
51394
51395  getfattr \$file &> /dev/null
51396  if test \"\$?\" != 0; then
51397    exit 77
51398  fi
51399
51400
51401  file=\$(TMPDIR=. mktemp fiXXXXXX)
51402  setfattr -n user.test -v ahoj \$file
51403  # check whether tar fails to store xattrs
51404  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
51405  if test \"\$err\" != \"0\"; then
51406    exit 77
51407  fi
51408
51409mkdir dir
51410genfile --file dir/file
51411genfile --file dir/file2
51412
51413setfattr -n user.test -v OurDirValue dir
51414setfattr -n user.test -v OurFileValue dir/file
51415setfattr -n user.test -v OurFileValue dir/file2
51416
51417tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51418
51419setfattr -n user.test -v OurDirValue2 dir
51420setfattr -n user.test -v OurFileValue2 dir/file
51421setfattr -n user.test -v OurFileValue2 dir/file2
51422
51423# Check that tar continues to file2 too!
51424tar --xattrs -xvf archive.tar --skip-old-files
51425tar --xattrs -xvf archive.tar --keep-old-files
51426
51427getfattr -h -d dir         | grep -v -e '^#' -e ^\$
51428getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
51429getfattr -h -d dir/file2   | grep -v -e '^#' -e ^\$
51430)"
51431at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr07.at:29"
51432( $at_check_trace;
51433mkdir ustar
51434(cd ustar
51435TEST_TAR_FORMAT=ustar
51436export TEST_TAR_FORMAT
51437TAR_OPTIONS="-H ustar"
51438export TAR_OPTIONS
51439rm -rf *
51440
51441
51442
51443  file=$(TMPDIR=. mktemp fiXXXXXX)
51444
51445  setfattr -n user.test -v test $file &> /dev/null
51446  if test "$?" != 0; then
51447    exit 77
51448  fi
51449
51450
51451  getfattr $file &> /dev/null
51452  if test "$?" != 0; then
51453    exit 77
51454  fi
51455
51456
51457  file=$(TMPDIR=. mktemp fiXXXXXX)
51458  setfattr -n user.test -v ahoj $file
51459  # check whether tar fails to store xattrs
51460  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51461  if test "$err" != "0"; then
51462    exit 77
51463  fi
51464
51465mkdir dir
51466genfile --file dir/file
51467genfile --file dir/file2
51468
51469setfattr -n user.test -v OurDirValue dir
51470setfattr -n user.test -v OurFileValue dir/file
51471setfattr -n user.test -v OurFileValue dir/file2
51472
51473tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51474
51475setfattr -n user.test -v OurDirValue2 dir
51476setfattr -n user.test -v OurFileValue2 dir/file
51477setfattr -n user.test -v OurFileValue2 dir/file2
51478
51479# Check that tar continues to file2 too!
51480tar --xattrs -xvf archive.tar --skip-old-files
51481tar --xattrs -xvf archive.tar --keep-old-files
51482
51483getfattr -h -d dir         | grep -v -e '^#' -e ^$
51484getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
51485getfattr -h -d dir/file2   | grep -v -e '^#' -e ^$
51486)
51487) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51488at_status=$? at_failed=false
51489$at_check_filter
51490echo >>"$at_stderr"; $as_echo "tar: dir: skipping existing file
51491tar: dir/file: skipping existing file
51492tar: dir/file: skipping existing file
51493tar: dir/file2: skipping existing file
51494tar: dir/file2: skipping existing file
51495tar: dir/file: Cannot open: File exists
51496tar: dir/file2: Cannot open: File exists
51497tar: Exiting with failure status due to previous errors
51498" | \
51499  $at_diff - "$at_stderr" || at_failed=:
51500echo >>"$at_stdout"; $as_echo "dir/
51501dir/file
51502dir/file2
51503dir/
51504dir/file
51505dir/file2
51506user.test=\"OurDirValue2\"
51507user.test=\"OurFileValue2\"
51508user.test=\"OurFileValue2\"
51509" | \
51510  $at_diff - "$at_stdout" || at_failed=:
51511at_fn_check_status 0 $at_status "$at_srcdir/xattr07.at:29"
51512$at_failed && at_fn_log_failure
51513$at_traceon; }
51514
51515              { set +x
51516$as_echo "$at_srcdir/xattr07.at:29:
51517mkdir posix
51518(cd posix
51519TEST_TAR_FORMAT=posix
51520export TEST_TAR_FORMAT
51521TAR_OPTIONS=\"-H posix\"
51522export TAR_OPTIONS
51523rm -rf *
51524
51525
51526
51527  file=\$(TMPDIR=. mktemp fiXXXXXX)
51528
51529  setfattr -n user.test -v test \$file &> /dev/null
51530  if test \"\$?\" != 0; then
51531    exit 77
51532  fi
51533
51534
51535  getfattr \$file &> /dev/null
51536  if test \"\$?\" != 0; then
51537    exit 77
51538  fi
51539
51540
51541  file=\$(TMPDIR=. mktemp fiXXXXXX)
51542  setfattr -n user.test -v ahoj \$file
51543  # check whether tar fails to store xattrs
51544  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
51545  if test \"\$err\" != \"0\"; then
51546    exit 77
51547  fi
51548
51549mkdir dir
51550genfile --file dir/file
51551genfile --file dir/file2
51552
51553setfattr -n user.test -v OurDirValue dir
51554setfattr -n user.test -v OurFileValue dir/file
51555setfattr -n user.test -v OurFileValue dir/file2
51556
51557tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51558
51559setfattr -n user.test -v OurDirValue2 dir
51560setfattr -n user.test -v OurFileValue2 dir/file
51561setfattr -n user.test -v OurFileValue2 dir/file2
51562
51563# Check that tar continues to file2 too!
51564tar --xattrs -xvf archive.tar --skip-old-files
51565tar --xattrs -xvf archive.tar --keep-old-files
51566
51567getfattr -h -d dir         | grep -v -e '^#' -e ^\$
51568getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
51569getfattr -h -d dir/file2   | grep -v -e '^#' -e ^\$
51570)"
51571at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr07.at:29"
51572( $at_check_trace;
51573mkdir posix
51574(cd posix
51575TEST_TAR_FORMAT=posix
51576export TEST_TAR_FORMAT
51577TAR_OPTIONS="-H posix"
51578export TAR_OPTIONS
51579rm -rf *
51580
51581
51582
51583  file=$(TMPDIR=. mktemp fiXXXXXX)
51584
51585  setfattr -n user.test -v test $file &> /dev/null
51586  if test "$?" != 0; then
51587    exit 77
51588  fi
51589
51590
51591  getfattr $file &> /dev/null
51592  if test "$?" != 0; then
51593    exit 77
51594  fi
51595
51596
51597  file=$(TMPDIR=. mktemp fiXXXXXX)
51598  setfattr -n user.test -v ahoj $file
51599  # check whether tar fails to store xattrs
51600  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51601  if test "$err" != "0"; then
51602    exit 77
51603  fi
51604
51605mkdir dir
51606genfile --file dir/file
51607genfile --file dir/file2
51608
51609setfattr -n user.test -v OurDirValue dir
51610setfattr -n user.test -v OurFileValue dir/file
51611setfattr -n user.test -v OurFileValue dir/file2
51612
51613tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51614
51615setfattr -n user.test -v OurDirValue2 dir
51616setfattr -n user.test -v OurFileValue2 dir/file
51617setfattr -n user.test -v OurFileValue2 dir/file2
51618
51619# Check that tar continues to file2 too!
51620tar --xattrs -xvf archive.tar --skip-old-files
51621tar --xattrs -xvf archive.tar --keep-old-files
51622
51623getfattr -h -d dir         | grep -v -e '^#' -e ^$
51624getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
51625getfattr -h -d dir/file2   | grep -v -e '^#' -e ^$
51626)
51627) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51628at_status=$? at_failed=false
51629$at_check_filter
51630echo >>"$at_stderr"; $as_echo "tar: dir: skipping existing file
51631tar: dir/file: skipping existing file
51632tar: dir/file: skipping existing file
51633tar: dir/file2: skipping existing file
51634tar: dir/file2: skipping existing file
51635tar: dir/file: Cannot open: File exists
51636tar: dir/file2: Cannot open: File exists
51637tar: Exiting with failure status due to previous errors
51638" | \
51639  $at_diff - "$at_stderr" || at_failed=:
51640echo >>"$at_stdout"; $as_echo "dir/
51641dir/file
51642dir/file2
51643dir/
51644dir/file
51645dir/file2
51646user.test=\"OurDirValue2\"
51647user.test=\"OurFileValue2\"
51648user.test=\"OurFileValue2\"
51649" | \
51650  $at_diff - "$at_stdout" || at_failed=:
51651at_fn_check_status 0 $at_status "$at_srcdir/xattr07.at:29"
51652$at_failed && at_fn_log_failure
51653$at_traceon; }
51654
51655              { set +x
51656$as_echo "$at_srcdir/xattr07.at:29:
51657mkdir gnu
51658(cd gnu
51659TEST_TAR_FORMAT=gnu
51660export TEST_TAR_FORMAT
51661TAR_OPTIONS=\"-H gnu\"
51662export TAR_OPTIONS
51663rm -rf *
51664
51665
51666
51667  file=\$(TMPDIR=. mktemp fiXXXXXX)
51668
51669  setfattr -n user.test -v test \$file &> /dev/null
51670  if test \"\$?\" != 0; then
51671    exit 77
51672  fi
51673
51674
51675  getfattr \$file &> /dev/null
51676  if test \"\$?\" != 0; then
51677    exit 77
51678  fi
51679
51680
51681  file=\$(TMPDIR=. mktemp fiXXXXXX)
51682  setfattr -n user.test -v ahoj \$file
51683  # check whether tar fails to store xattrs
51684  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
51685  if test \"\$err\" != \"0\"; then
51686    exit 77
51687  fi
51688
51689mkdir dir
51690genfile --file dir/file
51691genfile --file dir/file2
51692
51693setfattr -n user.test -v OurDirValue dir
51694setfattr -n user.test -v OurFileValue dir/file
51695setfattr -n user.test -v OurFileValue dir/file2
51696
51697tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51698
51699setfattr -n user.test -v OurDirValue2 dir
51700setfattr -n user.test -v OurFileValue2 dir/file
51701setfattr -n user.test -v OurFileValue2 dir/file2
51702
51703# Check that tar continues to file2 too!
51704tar --xattrs -xvf archive.tar --skip-old-files
51705tar --xattrs -xvf archive.tar --keep-old-files
51706
51707getfattr -h -d dir         | grep -v -e '^#' -e ^\$
51708getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
51709getfattr -h -d dir/file2   | grep -v -e '^#' -e ^\$
51710)"
51711at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr07.at:29"
51712( $at_check_trace;
51713mkdir gnu
51714(cd gnu
51715TEST_TAR_FORMAT=gnu
51716export TEST_TAR_FORMAT
51717TAR_OPTIONS="-H gnu"
51718export TAR_OPTIONS
51719rm -rf *
51720
51721
51722
51723  file=$(TMPDIR=. mktemp fiXXXXXX)
51724
51725  setfattr -n user.test -v test $file &> /dev/null
51726  if test "$?" != 0; then
51727    exit 77
51728  fi
51729
51730
51731  getfattr $file &> /dev/null
51732  if test "$?" != 0; then
51733    exit 77
51734  fi
51735
51736
51737  file=$(TMPDIR=. mktemp fiXXXXXX)
51738  setfattr -n user.test -v ahoj $file
51739  # check whether tar fails to store xattrs
51740  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51741  if test "$err" != "0"; then
51742    exit 77
51743  fi
51744
51745mkdir dir
51746genfile --file dir/file
51747genfile --file dir/file2
51748
51749setfattr -n user.test -v OurDirValue dir
51750setfattr -n user.test -v OurFileValue dir/file
51751setfattr -n user.test -v OurFileValue dir/file2
51752
51753tar --xattrs --no-recursion -cf archive.tar dir dir/file dir/file2
51754
51755setfattr -n user.test -v OurDirValue2 dir
51756setfattr -n user.test -v OurFileValue2 dir/file
51757setfattr -n user.test -v OurFileValue2 dir/file2
51758
51759# Check that tar continues to file2 too!
51760tar --xattrs -xvf archive.tar --skip-old-files
51761tar --xattrs -xvf archive.tar --keep-old-files
51762
51763getfattr -h -d dir         | grep -v -e '^#' -e ^$
51764getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
51765getfattr -h -d dir/file2   | grep -v -e '^#' -e ^$
51766)
51767) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51768at_status=$? at_failed=false
51769$at_check_filter
51770echo >>"$at_stderr"; $as_echo "tar: dir: skipping existing file
51771tar: dir/file: skipping existing file
51772tar: dir/file: skipping existing file
51773tar: dir/file2: skipping existing file
51774tar: dir/file2: skipping existing file
51775tar: dir/file: Cannot open: File exists
51776tar: dir/file2: Cannot open: File exists
51777tar: Exiting with failure status due to previous errors
51778" | \
51779  $at_diff - "$at_stderr" || at_failed=:
51780echo >>"$at_stdout"; $as_echo "dir/
51781dir/file
51782dir/file2
51783dir/
51784dir/file
51785dir/file2
51786user.test=\"OurDirValue2\"
51787user.test=\"OurFileValue2\"
51788user.test=\"OurFileValue2\"
51789" | \
51790  $at_diff - "$at_stdout" || at_failed=:
51791at_fn_check_status 0 $at_status "$at_srcdir/xattr07.at:29"
51792$at_failed && at_fn_log_failure
51793$at_traceon; }
51794
51795
51796
51797
51798  set +x
51799  $at_times_p && times >"$at_times_file"
51800) 5>&1 2>&1 7>&- | eval $at_tee_pipe
51801read at_status <"$at_status_file"
51802#AT_STOP_221
51803#AT_START_222
51804at_fn_group_banner 222 'acls01.at:25' \
51805  "acls: basic functionality" "                      " 31
51806at_xfail=no
51807      test -f $XFAILFILE && at_xfail=yes
51808(
51809  $as_echo "222. $at_setup_line: testing $at_desc ..."
51810  $at_traceon
51811
51812
51813
51814
51815
51816  { set +x
51817$as_echo "$at_srcdir/acls01.at:28:
51818mkdir v7
51819(cd v7
51820TEST_TAR_FORMAT=v7
51821export TEST_TAR_FORMAT
51822TAR_OPTIONS=\"-H v7\"
51823export TAR_OPTIONS
51824rm -rf *
51825
51826
51827  file=\$(TMPDIR=. mktemp fiXXXXXX)
51828
51829  setfattr -n user.test -v test \$file &> /dev/null
51830  if test \"\$?\" != 0; then
51831    exit 77
51832  fi
51833
51834
51835  getfattr \$file &> /dev/null
51836  if test \"\$?\" != 0; then
51837    exit 77
51838  fi
51839
51840
51841
51842
51843  file=\$(TMPDIR=. mktemp fiXXXXXX)
51844
51845  setfacl -m u:\$UID:rwx \$file &> /dev/null
51846  if test \"\$?\" != 0; then
51847    exit 77
51848  fi
51849
51850
51851  getfacl \$file &> /dev/null
51852  if test \"\$?\" != 0; then
51853    exit 77
51854  fi
51855
51856  rm -rf \$file
51857
51858  file=\$(TMPDIR=. mktemp fiXXXXXX)
51859  setfacl -m u:\$UID:rwx \$file
51860  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
51861  if test \"\$err\" != \"0\"; then
51862    exit 77
51863  fi
51864
51865
51866mkdir dir
51867genfile --file dir/file
51868
51869MYNAME=\$( id -un )
51870
51871setfacl -m u:\$MYNAME:--x dir/file
51872setfacl -m u:\$MYNAME:--x dir
51873
51874getfattr -h -m. -d dir dir/file > before
51875
51876tar --acls -cf archive.tar dir
51877rm -rf dir
51878
51879tar --acls -xf archive.tar
51880
51881getfattr -h -m. -d dir dir/file > after
51882
51883diff before after
51884test \"\$?\" = 0
51885)"
51886at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
51887( $at_check_trace;
51888mkdir v7
51889(cd v7
51890TEST_TAR_FORMAT=v7
51891export TEST_TAR_FORMAT
51892TAR_OPTIONS="-H v7"
51893export TAR_OPTIONS
51894rm -rf *
51895
51896
51897  file=$(TMPDIR=. mktemp fiXXXXXX)
51898
51899  setfattr -n user.test -v test $file &> /dev/null
51900  if test "$?" != 0; then
51901    exit 77
51902  fi
51903
51904
51905  getfattr $file &> /dev/null
51906  if test "$?" != 0; then
51907    exit 77
51908  fi
51909
51910
51911
51912
51913  file=$(TMPDIR=. mktemp fiXXXXXX)
51914
51915  setfacl -m u:$UID:rwx $file &> /dev/null
51916  if test "$?" != 0; then
51917    exit 77
51918  fi
51919
51920
51921  getfacl $file &> /dev/null
51922  if test "$?" != 0; then
51923    exit 77
51924  fi
51925
51926  rm -rf $file
51927
51928  file=$(TMPDIR=. mktemp fiXXXXXX)
51929  setfacl -m u:$UID:rwx $file
51930  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51931  if test "$err" != "0"; then
51932    exit 77
51933  fi
51934
51935
51936mkdir dir
51937genfile --file dir/file
51938
51939MYNAME=$( id -un )
51940
51941setfacl -m u:$MYNAME:--x dir/file
51942setfacl -m u:$MYNAME:--x dir
51943
51944getfattr -h -m. -d dir dir/file > before
51945
51946tar --acls -cf archive.tar dir
51947rm -rf dir
51948
51949tar --acls -xf archive.tar
51950
51951getfattr -h -m. -d dir dir/file > after
51952
51953diff before after
51954test "$?" = 0
51955)
51956) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51957at_status=$? at_failed=false
51958$at_check_filter
51959at_fn_diff_devnull "$at_stderr" || at_failed=:
51960at_fn_diff_devnull "$at_stdout" || at_failed=:
51961at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
51962$at_failed && at_fn_log_failure
51963$at_traceon; }
51964
51965              { set +x
51966$as_echo "$at_srcdir/acls01.at:28:
51967mkdir oldgnu
51968(cd oldgnu
51969TEST_TAR_FORMAT=oldgnu
51970export TEST_TAR_FORMAT
51971TAR_OPTIONS=\"-H oldgnu\"
51972export TAR_OPTIONS
51973rm -rf *
51974
51975
51976  file=\$(TMPDIR=. mktemp fiXXXXXX)
51977
51978  setfattr -n user.test -v test \$file &> /dev/null
51979  if test \"\$?\" != 0; then
51980    exit 77
51981  fi
51982
51983
51984  getfattr \$file &> /dev/null
51985  if test \"\$?\" != 0; then
51986    exit 77
51987  fi
51988
51989
51990
51991
51992  file=\$(TMPDIR=. mktemp fiXXXXXX)
51993
51994  setfacl -m u:\$UID:rwx \$file &> /dev/null
51995  if test \"\$?\" != 0; then
51996    exit 77
51997  fi
51998
51999
52000  getfacl \$file &> /dev/null
52001  if test \"\$?\" != 0; then
52002    exit 77
52003  fi
52004
52005  rm -rf \$file
52006
52007  file=\$(TMPDIR=. mktemp fiXXXXXX)
52008  setfacl -m u:\$UID:rwx \$file
52009  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
52010  if test \"\$err\" != \"0\"; then
52011    exit 77
52012  fi
52013
52014
52015mkdir dir
52016genfile --file dir/file
52017
52018MYNAME=\$( id -un )
52019
52020setfacl -m u:\$MYNAME:--x dir/file
52021setfacl -m u:\$MYNAME:--x dir
52022
52023getfattr -h -m. -d dir dir/file > before
52024
52025tar --acls -cf archive.tar dir
52026rm -rf dir
52027
52028tar --acls -xf archive.tar
52029
52030getfattr -h -m. -d dir dir/file > after
52031
52032diff before after
52033test \"\$?\" = 0
52034)"
52035at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
52036( $at_check_trace;
52037mkdir oldgnu
52038(cd oldgnu
52039TEST_TAR_FORMAT=oldgnu
52040export TEST_TAR_FORMAT
52041TAR_OPTIONS="-H oldgnu"
52042export TAR_OPTIONS
52043rm -rf *
52044
52045
52046  file=$(TMPDIR=. mktemp fiXXXXXX)
52047
52048  setfattr -n user.test -v test $file &> /dev/null
52049  if test "$?" != 0; then
52050    exit 77
52051  fi
52052
52053
52054  getfattr $file &> /dev/null
52055  if test "$?" != 0; then
52056    exit 77
52057  fi
52058
52059
52060
52061
52062  file=$(TMPDIR=. mktemp fiXXXXXX)
52063
52064  setfacl -m u:$UID:rwx $file &> /dev/null
52065  if test "$?" != 0; then
52066    exit 77
52067  fi
52068
52069
52070  getfacl $file &> /dev/null
52071  if test "$?" != 0; then
52072    exit 77
52073  fi
52074
52075  rm -rf $file
52076
52077  file=$(TMPDIR=. mktemp fiXXXXXX)
52078  setfacl -m u:$UID:rwx $file
52079  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
52080  if test "$err" != "0"; then
52081    exit 77
52082  fi
52083
52084
52085mkdir dir
52086genfile --file dir/file
52087
52088MYNAME=$( id -un )
52089
52090setfacl -m u:$MYNAME:--x dir/file
52091setfacl -m u:$MYNAME:--x dir
52092
52093getfattr -h -m. -d dir dir/file > before
52094
52095tar --acls -cf archive.tar dir
52096rm -rf dir
52097
52098tar --acls -xf archive.tar
52099
52100getfattr -h -m. -d dir dir/file > after
52101
52102diff before after
52103test "$?" = 0
52104)
52105) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52106at_status=$? at_failed=false
52107$at_check_filter
52108at_fn_diff_devnull "$at_stderr" || at_failed=:
52109at_fn_diff_devnull "$at_stdout" || at_failed=:
52110at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
52111$at_failed && at_fn_log_failure
52112$at_traceon; }
52113
52114              { set +x
52115$as_echo "$at_srcdir/acls01.at:28:
52116mkdir ustar
52117(cd ustar
52118TEST_TAR_FORMAT=ustar
52119export TEST_TAR_FORMAT
52120TAR_OPTIONS=\"-H ustar\"
52121export TAR_OPTIONS
52122rm -rf *
52123
52124
52125  file=\$(TMPDIR=. mktemp fiXXXXXX)
52126
52127  setfattr -n user.test -v test \$file &> /dev/null
52128  if test \"\$?\" != 0; then
52129    exit 77
52130  fi
52131
52132
52133  getfattr \$file &> /dev/null
52134  if test \"\$?\" != 0; then
52135    exit 77
52136  fi
52137
52138
52139
52140
52141  file=\$(TMPDIR=. mktemp fiXXXXXX)
52142
52143  setfacl -m u:\$UID:rwx \$file &> /dev/null
52144  if test \"\$?\" != 0; then
52145    exit 77
52146  fi
52147
52148
52149  getfacl \$file &> /dev/null
52150  if test \"\$?\" != 0; then
52151    exit 77
52152  fi
52153
52154  rm -rf \$file
52155
52156  file=\$(TMPDIR=. mktemp fiXXXXXX)
52157  setfacl -m u:\$UID:rwx \$file
52158  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
52159  if test \"\$err\" != \"0\"; then
52160    exit 77
52161  fi
52162
52163
52164mkdir dir
52165genfile --file dir/file
52166
52167MYNAME=\$( id -un )
52168
52169setfacl -m u:\$MYNAME:--x dir/file
52170setfacl -m u:\$MYNAME:--x dir
52171
52172getfattr -h -m. -d dir dir/file > before
52173
52174tar --acls -cf archive.tar dir
52175rm -rf dir
52176
52177tar --acls -xf archive.tar
52178
52179getfattr -h -m. -d dir dir/file > after
52180
52181diff before after
52182test \"\$?\" = 0
52183)"
52184at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
52185( $at_check_trace;
52186mkdir ustar
52187(cd ustar
52188TEST_TAR_FORMAT=ustar
52189export TEST_TAR_FORMAT
52190TAR_OPTIONS="-H ustar"
52191export TAR_OPTIONS
52192rm -rf *
52193
52194
52195  file=$(TMPDIR=. mktemp fiXXXXXX)
52196
52197  setfattr -n user.test -v test $file &> /dev/null
52198  if test "$?" != 0; then
52199    exit 77
52200  fi
52201
52202
52203  getfattr $file &> /dev/null
52204  if test "$?" != 0; then
52205    exit 77
52206  fi
52207
52208
52209
52210
52211  file=$(TMPDIR=. mktemp fiXXXXXX)
52212
52213  setfacl -m u:$UID:rwx $file &> /dev/null
52214  if test "$?" != 0; then
52215    exit 77
52216  fi
52217
52218
52219  getfacl $file &> /dev/null
52220  if test "$?" != 0; then
52221    exit 77
52222  fi
52223
52224  rm -rf $file
52225
52226  file=$(TMPDIR=. mktemp fiXXXXXX)
52227  setfacl -m u:$UID:rwx $file
52228  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
52229  if test "$err" != "0"; then
52230    exit 77
52231  fi
52232
52233
52234mkdir dir
52235genfile --file dir/file
52236
52237MYNAME=$( id -un )
52238
52239setfacl -m u:$MYNAME:--x dir/file
52240setfacl -m u:$MYNAME:--x dir
52241
52242getfattr -h -m. -d dir dir/file > before
52243
52244tar --acls -cf archive.tar dir
52245rm -rf dir
52246
52247tar --acls -xf archive.tar
52248
52249getfattr -h -m. -d dir dir/file > after
52250
52251diff before after
52252test "$?" = 0
52253)
52254) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52255at_status=$? at_failed=false
52256$at_check_filter
52257at_fn_diff_devnull "$at_stderr" || at_failed=:
52258at_fn_diff_devnull "$at_stdout" || at_failed=:
52259at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
52260$at_failed && at_fn_log_failure
52261$at_traceon; }
52262
52263              { set +x
52264$as_echo "$at_srcdir/acls01.at:28:
52265mkdir posix
52266(cd posix
52267TEST_TAR_FORMAT=posix
52268export TEST_TAR_FORMAT
52269TAR_OPTIONS=\"-H posix\"
52270export TAR_OPTIONS
52271rm -rf *
52272
52273
52274  file=\$(TMPDIR=. mktemp fiXXXXXX)
52275
52276  setfattr -n user.test -v test \$file &> /dev/null
52277  if test \"\$?\" != 0; then
52278    exit 77
52279  fi
52280
52281
52282  getfattr \$file &> /dev/null
52283  if test \"\$?\" != 0; then
52284    exit 77
52285  fi
52286
52287
52288
52289
52290  file=\$(TMPDIR=. mktemp fiXXXXXX)
52291
52292  setfacl -m u:\$UID:rwx \$file &> /dev/null
52293  if test \"\$?\" != 0; then
52294    exit 77
52295  fi
52296
52297
52298  getfacl \$file &> /dev/null
52299  if test \"\$?\" != 0; then
52300    exit 77
52301  fi
52302
52303  rm -rf \$file
52304
52305  file=\$(TMPDIR=. mktemp fiXXXXXX)
52306  setfacl -m u:\$UID:rwx \$file
52307  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
52308  if test \"\$err\" != \"0\"; then
52309    exit 77
52310  fi
52311
52312
52313mkdir dir
52314genfile --file dir/file
52315
52316MYNAME=\$( id -un )
52317
52318setfacl -m u:\$MYNAME:--x dir/file
52319setfacl -m u:\$MYNAME:--x dir
52320
52321getfattr -h -m. -d dir dir/file > before
52322
52323tar --acls -cf archive.tar dir
52324rm -rf dir
52325
52326tar --acls -xf archive.tar
52327
52328getfattr -h -m. -d dir dir/file > after
52329
52330diff before after
52331test \"\$?\" = 0
52332)"
52333at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
52334( $at_check_trace;
52335mkdir posix
52336(cd posix
52337TEST_TAR_FORMAT=posix
52338export TEST_TAR_FORMAT
52339TAR_OPTIONS="-H posix"
52340export TAR_OPTIONS
52341rm -rf *
52342
52343
52344  file=$(TMPDIR=. mktemp fiXXXXXX)
52345
52346  setfattr -n user.test -v test $file &> /dev/null
52347  if test "$?" != 0; then
52348    exit 77
52349  fi
52350
52351
52352  getfattr $file &> /dev/null
52353  if test "$?" != 0; then
52354    exit 77
52355  fi
52356
52357
52358
52359
52360  file=$(TMPDIR=. mktemp fiXXXXXX)
52361
52362  setfacl -m u:$UID:rwx $file &> /dev/null
52363  if test "$?" != 0; then
52364    exit 77
52365  fi
52366
52367
52368  getfacl $file &> /dev/null
52369  if test "$?" != 0; then
52370    exit 77
52371  fi
52372
52373  rm -rf $file
52374
52375  file=$(TMPDIR=. mktemp fiXXXXXX)
52376  setfacl -m u:$UID:rwx $file
52377  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
52378  if test "$err" != "0"; then
52379    exit 77
52380  fi
52381
52382
52383mkdir dir
52384genfile --file dir/file
52385
52386MYNAME=$( id -un )
52387
52388setfacl -m u:$MYNAME:--x dir/file
52389setfacl -m u:$MYNAME:--x dir
52390
52391getfattr -h -m. -d dir dir/file > before
52392
52393tar --acls -cf archive.tar dir
52394rm -rf dir
52395
52396tar --acls -xf archive.tar
52397
52398getfattr -h -m. -d dir dir/file > after
52399
52400diff before after
52401test "$?" = 0
52402)
52403) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52404at_status=$? at_failed=false
52405$at_check_filter
52406at_fn_diff_devnull "$at_stderr" || at_failed=:
52407at_fn_diff_devnull "$at_stdout" || at_failed=:
52408at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
52409$at_failed && at_fn_log_failure
52410$at_traceon; }
52411
52412              { set +x
52413$as_echo "$at_srcdir/acls01.at:28:
52414mkdir gnu
52415(cd gnu
52416TEST_TAR_FORMAT=gnu
52417export TEST_TAR_FORMAT
52418TAR_OPTIONS=\"-H gnu\"
52419export TAR_OPTIONS
52420rm -rf *
52421
52422
52423  file=\$(TMPDIR=. mktemp fiXXXXXX)
52424
52425  setfattr -n user.test -v test \$file &> /dev/null
52426  if test \"\$?\" != 0; then
52427    exit 77
52428  fi
52429
52430
52431  getfattr \$file &> /dev/null
52432  if test \"\$?\" != 0; then
52433    exit 77
52434  fi
52435
52436
52437
52438
52439  file=\$(TMPDIR=. mktemp fiXXXXXX)
52440
52441  setfacl -m u:\$UID:rwx \$file &> /dev/null
52442  if test \"\$?\" != 0; then
52443    exit 77
52444  fi
52445
52446
52447  getfacl \$file &> /dev/null
52448  if test \"\$?\" != 0; then
52449    exit 77
52450  fi
52451
52452  rm -rf \$file
52453
52454  file=\$(TMPDIR=. mktemp fiXXXXXX)
52455  setfacl -m u:\$UID:rwx \$file
52456  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
52457  if test \"\$err\" != \"0\"; then
52458    exit 77
52459  fi
52460
52461
52462mkdir dir
52463genfile --file dir/file
52464
52465MYNAME=\$( id -un )
52466
52467setfacl -m u:\$MYNAME:--x dir/file
52468setfacl -m u:\$MYNAME:--x dir
52469
52470getfattr -h -m. -d dir dir/file > before
52471
52472tar --acls -cf archive.tar dir
52473rm -rf dir
52474
52475tar --acls -xf archive.tar
52476
52477getfattr -h -m. -d dir dir/file > after
52478
52479diff before after
52480test \"\$?\" = 0
52481)"
52482at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
52483( $at_check_trace;
52484mkdir gnu
52485(cd gnu
52486TEST_TAR_FORMAT=gnu
52487export TEST_TAR_FORMAT
52488TAR_OPTIONS="-H gnu"
52489export TAR_OPTIONS
52490rm -rf *
52491
52492
52493  file=$(TMPDIR=. mktemp fiXXXXXX)
52494
52495  setfattr -n user.test -v test $file &> /dev/null
52496  if test "$?" != 0; then
52497    exit 77
52498  fi
52499
52500
52501  getfattr $file &> /dev/null
52502  if test "$?" != 0; then
52503    exit 77
52504  fi
52505
52506
52507
52508
52509  file=$(TMPDIR=. mktemp fiXXXXXX)
52510
52511  setfacl -m u:$UID:rwx $file &> /dev/null
52512  if test "$?" != 0; then
52513    exit 77
52514  fi
52515
52516
52517  getfacl $file &> /dev/null
52518  if test "$?" != 0; then
52519    exit 77
52520  fi
52521
52522  rm -rf $file
52523
52524  file=$(TMPDIR=. mktemp fiXXXXXX)
52525  setfacl -m u:$UID:rwx $file
52526  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
52527  if test "$err" != "0"; then
52528    exit 77
52529  fi
52530
52531
52532mkdir dir
52533genfile --file dir/file
52534
52535MYNAME=$( id -un )
52536
52537setfacl -m u:$MYNAME:--x dir/file
52538setfacl -m u:$MYNAME:--x dir
52539
52540getfattr -h -m. -d dir dir/file > before
52541
52542tar --acls -cf archive.tar dir
52543rm -rf dir
52544
52545tar --acls -xf archive.tar
52546
52547getfattr -h -m. -d dir dir/file > after
52548
52549diff before after
52550test "$?" = 0
52551)
52552) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52553at_status=$? at_failed=false
52554$at_check_filter
52555at_fn_diff_devnull "$at_stderr" || at_failed=:
52556at_fn_diff_devnull "$at_stdout" || at_failed=:
52557at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
52558$at_failed && at_fn_log_failure
52559$at_traceon; }
52560
52561
52562
52563
52564  set +x
52565  $at_times_p && times >"$at_times_file"
52566) 5>&1 2>&1 7>&- | eval $at_tee_pipe
52567read at_status <"$at_status_file"
52568#AT_STOP_222
52569#AT_START_223
52570at_fn_group_banner 223 'acls02.at:25' \
52571  "acls: work with -C" "                             " 31
52572at_xfail=no
52573      test -f $XFAILFILE && at_xfail=yes
52574(
52575  $as_echo "223. $at_setup_line: testing $at_desc ..."
52576  $at_traceon
52577
52578
52579
52580
52581
52582  { set +x
52583$as_echo "$at_srcdir/acls02.at:28:
52584mkdir v7
52585(cd v7
52586TEST_TAR_FORMAT=v7
52587export TEST_TAR_FORMAT
52588TAR_OPTIONS=\"-H v7\"
52589export TAR_OPTIONS
52590rm -rf *
52591
52592
52593  file=\$(TMPDIR=. mktemp fiXXXXXX)
52594
52595  setfattr -n user.test -v test \$file &> /dev/null
52596  if test \"\$?\" != 0; then
52597    exit 77
52598  fi
52599
52600
52601  getfattr \$file &> /dev/null
52602  if test \"\$?\" != 0; then
52603    exit 77
52604  fi
52605
52606
52607
52608
52609  file=\$(TMPDIR=. mktemp fiXXXXXX)
52610
52611  setfacl -m u:\$UID:rwx \$file &> /dev/null
52612  if test \"\$?\" != 0; then
52613    exit 77
52614  fi
52615
52616
52617  getfacl \$file &> /dev/null
52618  if test \"\$?\" != 0; then
52619    exit 77
52620  fi
52621
52622  rm -rf \$file
52623
52624  file=\$(TMPDIR=. mktemp fiXXXXXX)
52625  setfacl -m u:\$UID:rwx \$file
52626  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
52627  if test \"\$err\" != \"0\"; then
52628    exit 77
52629  fi
52630
52631
52632mkdir dir
52633mkdir dir/subdir
52634genfile --file dir/subdir/file
52635
52636MYNAME=\$( id -un )
52637
52638setfacl -m u:\$MYNAME:--x dir/subdir
52639setfacl -m u:\$MYNAME:--x dir/subdir/file
52640
52641cd dir
52642getfattr -h -m. -d subdir subdir/file > ../before
52643cd ..
52644
52645tar --acls -cf archive.tar -C dir subdir
52646rm -rf dir
52647
52648mkdir dir
52649tar --acls -xf archive.tar -C dir
52650
52651cd dir
52652getfattr -h -m. -d subdir subdir/file > ../after
52653cd ..
52654
52655diff before after
52656test \"\$?\" = 0
52657)"
52658at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
52659( $at_check_trace;
52660mkdir v7
52661(cd v7
52662TEST_TAR_FORMAT=v7
52663export TEST_TAR_FORMAT
52664TAR_OPTIONS="-H v7"
52665export TAR_OPTIONS
52666rm -rf *
52667
52668
52669  file=$(TMPDIR=. mktemp fiXXXXXX)
52670
52671  setfattr -n user.test -v test $file &> /dev/null
52672  if test "$?" != 0; then
52673    exit 77
52674  fi
52675
52676
52677  getfattr $file &> /dev/null
52678  if test "$?" != 0; then
52679    exit 77
52680  fi
52681
52682
52683
52684
52685  file=$(TMPDIR=. mktemp fiXXXXXX)
52686
52687  setfacl -m u:$UID:rwx $file &> /dev/null
52688  if test "$?" != 0; then
52689    exit 77
52690  fi
52691
52692
52693  getfacl $file &> /dev/null
52694  if test "$?" != 0; then
52695    exit 77
52696  fi
52697
52698  rm -rf $file
52699
52700  file=$(TMPDIR=. mktemp fiXXXXXX)
52701  setfacl -m u:$UID:rwx $file
52702  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
52703  if test "$err" != "0"; then
52704    exit 77
52705  fi
52706
52707
52708mkdir dir
52709mkdir dir/subdir
52710genfile --file dir/subdir/file
52711
52712MYNAME=$( id -un )
52713
52714setfacl -m u:$MYNAME:--x dir/subdir
52715setfacl -m u:$MYNAME:--x dir/subdir/file
52716
52717cd dir
52718getfattr -h -m. -d subdir subdir/file > ../before
52719cd ..
52720
52721tar --acls -cf archive.tar -C dir subdir
52722rm -rf dir
52723
52724mkdir dir
52725tar --acls -xf archive.tar -C dir
52726
52727cd dir
52728getfattr -h -m. -d subdir subdir/file > ../after
52729cd ..
52730
52731diff before after
52732test "$?" = 0
52733)
52734) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52735at_status=$? at_failed=false
52736$at_check_filter
52737at_fn_diff_devnull "$at_stderr" || at_failed=:
52738at_fn_diff_devnull "$at_stdout" || at_failed=:
52739at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
52740$at_failed && at_fn_log_failure
52741$at_traceon; }
52742
52743              { set +x
52744$as_echo "$at_srcdir/acls02.at:28:
52745mkdir oldgnu
52746(cd oldgnu
52747TEST_TAR_FORMAT=oldgnu
52748export TEST_TAR_FORMAT
52749TAR_OPTIONS=\"-H oldgnu\"
52750export TAR_OPTIONS
52751rm -rf *
52752
52753
52754  file=\$(TMPDIR=. mktemp fiXXXXXX)
52755
52756  setfattr -n user.test -v test \$file &> /dev/null
52757  if test \"\$?\" != 0; then
52758    exit 77
52759  fi
52760
52761
52762  getfattr \$file &> /dev/null
52763  if test \"\$?\" != 0; then
52764    exit 77
52765  fi
52766
52767
52768
52769
52770  file=\$(TMPDIR=. mktemp fiXXXXXX)
52771
52772  setfacl -m u:\$UID:rwx \$file &> /dev/null
52773  if test \"\$?\" != 0; then
52774    exit 77
52775  fi
52776
52777
52778  getfacl \$file &> /dev/null
52779  if test \"\$?\" != 0; then
52780    exit 77
52781  fi
52782
52783  rm -rf \$file
52784
52785  file=\$(TMPDIR=. mktemp fiXXXXXX)
52786  setfacl -m u:\$UID:rwx \$file
52787  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
52788  if test \"\$err\" != \"0\"; then
52789    exit 77
52790  fi
52791
52792
52793mkdir dir
52794mkdir dir/subdir
52795genfile --file dir/subdir/file
52796
52797MYNAME=\$( id -un )
52798
52799setfacl -m u:\$MYNAME:--x dir/subdir
52800setfacl -m u:\$MYNAME:--x dir/subdir/file
52801
52802cd dir
52803getfattr -h -m. -d subdir subdir/file > ../before
52804cd ..
52805
52806tar --acls -cf archive.tar -C dir subdir
52807rm -rf dir
52808
52809mkdir dir
52810tar --acls -xf archive.tar -C dir
52811
52812cd dir
52813getfattr -h -m. -d subdir subdir/file > ../after
52814cd ..
52815
52816diff before after
52817test \"\$?\" = 0
52818)"
52819at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
52820( $at_check_trace;
52821mkdir oldgnu
52822(cd oldgnu
52823TEST_TAR_FORMAT=oldgnu
52824export TEST_TAR_FORMAT
52825TAR_OPTIONS="-H oldgnu"
52826export TAR_OPTIONS
52827rm -rf *
52828
52829
52830  file=$(TMPDIR=. mktemp fiXXXXXX)
52831
52832  setfattr -n user.test -v test $file &> /dev/null
52833  if test "$?" != 0; then
52834    exit 77
52835  fi
52836
52837
52838  getfattr $file &> /dev/null
52839  if test "$?" != 0; then
52840    exit 77
52841  fi
52842
52843
52844
52845
52846  file=$(TMPDIR=. mktemp fiXXXXXX)
52847
52848  setfacl -m u:$UID:rwx $file &> /dev/null
52849  if test "$?" != 0; then
52850    exit 77
52851  fi
52852
52853
52854  getfacl $file &> /dev/null
52855  if test "$?" != 0; then
52856    exit 77
52857  fi
52858
52859  rm -rf $file
52860
52861  file=$(TMPDIR=. mktemp fiXXXXXX)
52862  setfacl -m u:$UID:rwx $file
52863  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
52864  if test "$err" != "0"; then
52865    exit 77
52866  fi
52867
52868
52869mkdir dir
52870mkdir dir/subdir
52871genfile --file dir/subdir/file
52872
52873MYNAME=$( id -un )
52874
52875setfacl -m u:$MYNAME:--x dir/subdir
52876setfacl -m u:$MYNAME:--x dir/subdir/file
52877
52878cd dir
52879getfattr -h -m. -d subdir subdir/file > ../before
52880cd ..
52881
52882tar --acls -cf archive.tar -C dir subdir
52883rm -rf dir
52884
52885mkdir dir
52886tar --acls -xf archive.tar -C dir
52887
52888cd dir
52889getfattr -h -m. -d subdir subdir/file > ../after
52890cd ..
52891
52892diff before after
52893test "$?" = 0
52894)
52895) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52896at_status=$? at_failed=false
52897$at_check_filter
52898at_fn_diff_devnull "$at_stderr" || at_failed=:
52899at_fn_diff_devnull "$at_stdout" || at_failed=:
52900at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
52901$at_failed && at_fn_log_failure
52902$at_traceon; }
52903
52904              { set +x
52905$as_echo "$at_srcdir/acls02.at:28:
52906mkdir ustar
52907(cd ustar
52908TEST_TAR_FORMAT=ustar
52909export TEST_TAR_FORMAT
52910TAR_OPTIONS=\"-H ustar\"
52911export TAR_OPTIONS
52912rm -rf *
52913
52914
52915  file=\$(TMPDIR=. mktemp fiXXXXXX)
52916
52917  setfattr -n user.test -v test \$file &> /dev/null
52918  if test \"\$?\" != 0; then
52919    exit 77
52920  fi
52921
52922
52923  getfattr \$file &> /dev/null
52924  if test \"\$?\" != 0; then
52925    exit 77
52926  fi
52927
52928
52929
52930
52931  file=\$(TMPDIR=. mktemp fiXXXXXX)
52932
52933  setfacl -m u:\$UID:rwx \$file &> /dev/null
52934  if test \"\$?\" != 0; then
52935    exit 77
52936  fi
52937
52938
52939  getfacl \$file &> /dev/null
52940  if test \"\$?\" != 0; then
52941    exit 77
52942  fi
52943
52944  rm -rf \$file
52945
52946  file=\$(TMPDIR=. mktemp fiXXXXXX)
52947  setfacl -m u:\$UID:rwx \$file
52948  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
52949  if test \"\$err\" != \"0\"; then
52950    exit 77
52951  fi
52952
52953
52954mkdir dir
52955mkdir dir/subdir
52956genfile --file dir/subdir/file
52957
52958MYNAME=\$( id -un )
52959
52960setfacl -m u:\$MYNAME:--x dir/subdir
52961setfacl -m u:\$MYNAME:--x dir/subdir/file
52962
52963cd dir
52964getfattr -h -m. -d subdir subdir/file > ../before
52965cd ..
52966
52967tar --acls -cf archive.tar -C dir subdir
52968rm -rf dir
52969
52970mkdir dir
52971tar --acls -xf archive.tar -C dir
52972
52973cd dir
52974getfattr -h -m. -d subdir subdir/file > ../after
52975cd ..
52976
52977diff before after
52978test \"\$?\" = 0
52979)"
52980at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
52981( $at_check_trace;
52982mkdir ustar
52983(cd ustar
52984TEST_TAR_FORMAT=ustar
52985export TEST_TAR_FORMAT
52986TAR_OPTIONS="-H ustar"
52987export TAR_OPTIONS
52988rm -rf *
52989
52990
52991  file=$(TMPDIR=. mktemp fiXXXXXX)
52992
52993  setfattr -n user.test -v test $file &> /dev/null
52994  if test "$?" != 0; then
52995    exit 77
52996  fi
52997
52998
52999  getfattr $file &> /dev/null
53000  if test "$?" != 0; then
53001    exit 77
53002  fi
53003
53004
53005
53006
53007  file=$(TMPDIR=. mktemp fiXXXXXX)
53008
53009  setfacl -m u:$UID:rwx $file &> /dev/null
53010  if test "$?" != 0; then
53011    exit 77
53012  fi
53013
53014
53015  getfacl $file &> /dev/null
53016  if test "$?" != 0; then
53017    exit 77
53018  fi
53019
53020  rm -rf $file
53021
53022  file=$(TMPDIR=. mktemp fiXXXXXX)
53023  setfacl -m u:$UID:rwx $file
53024  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
53025  if test "$err" != "0"; then
53026    exit 77
53027  fi
53028
53029
53030mkdir dir
53031mkdir dir/subdir
53032genfile --file dir/subdir/file
53033
53034MYNAME=$( id -un )
53035
53036setfacl -m u:$MYNAME:--x dir/subdir
53037setfacl -m u:$MYNAME:--x dir/subdir/file
53038
53039cd dir
53040getfattr -h -m. -d subdir subdir/file > ../before
53041cd ..
53042
53043tar --acls -cf archive.tar -C dir subdir
53044rm -rf dir
53045
53046mkdir dir
53047tar --acls -xf archive.tar -C dir
53048
53049cd dir
53050getfattr -h -m. -d subdir subdir/file > ../after
53051cd ..
53052
53053diff before after
53054test "$?" = 0
53055)
53056) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53057at_status=$? at_failed=false
53058$at_check_filter
53059at_fn_diff_devnull "$at_stderr" || at_failed=:
53060at_fn_diff_devnull "$at_stdout" || at_failed=:
53061at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
53062$at_failed && at_fn_log_failure
53063$at_traceon; }
53064
53065              { set +x
53066$as_echo "$at_srcdir/acls02.at:28:
53067mkdir posix
53068(cd posix
53069TEST_TAR_FORMAT=posix
53070export TEST_TAR_FORMAT
53071TAR_OPTIONS=\"-H posix\"
53072export TAR_OPTIONS
53073rm -rf *
53074
53075
53076  file=\$(TMPDIR=. mktemp fiXXXXXX)
53077
53078  setfattr -n user.test -v test \$file &> /dev/null
53079  if test \"\$?\" != 0; then
53080    exit 77
53081  fi
53082
53083
53084  getfattr \$file &> /dev/null
53085  if test \"\$?\" != 0; then
53086    exit 77
53087  fi
53088
53089
53090
53091
53092  file=\$(TMPDIR=. mktemp fiXXXXXX)
53093
53094  setfacl -m u:\$UID:rwx \$file &> /dev/null
53095  if test \"\$?\" != 0; then
53096    exit 77
53097  fi
53098
53099
53100  getfacl \$file &> /dev/null
53101  if test \"\$?\" != 0; then
53102    exit 77
53103  fi
53104
53105  rm -rf \$file
53106
53107  file=\$(TMPDIR=. mktemp fiXXXXXX)
53108  setfacl -m u:\$UID:rwx \$file
53109  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
53110  if test \"\$err\" != \"0\"; then
53111    exit 77
53112  fi
53113
53114
53115mkdir dir
53116mkdir dir/subdir
53117genfile --file dir/subdir/file
53118
53119MYNAME=\$( id -un )
53120
53121setfacl -m u:\$MYNAME:--x dir/subdir
53122setfacl -m u:\$MYNAME:--x dir/subdir/file
53123
53124cd dir
53125getfattr -h -m. -d subdir subdir/file > ../before
53126cd ..
53127
53128tar --acls -cf archive.tar -C dir subdir
53129rm -rf dir
53130
53131mkdir dir
53132tar --acls -xf archive.tar -C dir
53133
53134cd dir
53135getfattr -h -m. -d subdir subdir/file > ../after
53136cd ..
53137
53138diff before after
53139test \"\$?\" = 0
53140)"
53141at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
53142( $at_check_trace;
53143mkdir posix
53144(cd posix
53145TEST_TAR_FORMAT=posix
53146export TEST_TAR_FORMAT
53147TAR_OPTIONS="-H posix"
53148export TAR_OPTIONS
53149rm -rf *
53150
53151
53152  file=$(TMPDIR=. mktemp fiXXXXXX)
53153
53154  setfattr -n user.test -v test $file &> /dev/null
53155  if test "$?" != 0; then
53156    exit 77
53157  fi
53158
53159
53160  getfattr $file &> /dev/null
53161  if test "$?" != 0; then
53162    exit 77
53163  fi
53164
53165
53166
53167
53168  file=$(TMPDIR=. mktemp fiXXXXXX)
53169
53170  setfacl -m u:$UID:rwx $file &> /dev/null
53171  if test "$?" != 0; then
53172    exit 77
53173  fi
53174
53175
53176  getfacl $file &> /dev/null
53177  if test "$?" != 0; then
53178    exit 77
53179  fi
53180
53181  rm -rf $file
53182
53183  file=$(TMPDIR=. mktemp fiXXXXXX)
53184  setfacl -m u:$UID:rwx $file
53185  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
53186  if test "$err" != "0"; then
53187    exit 77
53188  fi
53189
53190
53191mkdir dir
53192mkdir dir/subdir
53193genfile --file dir/subdir/file
53194
53195MYNAME=$( id -un )
53196
53197setfacl -m u:$MYNAME:--x dir/subdir
53198setfacl -m u:$MYNAME:--x dir/subdir/file
53199
53200cd dir
53201getfattr -h -m. -d subdir subdir/file > ../before
53202cd ..
53203
53204tar --acls -cf archive.tar -C dir subdir
53205rm -rf dir
53206
53207mkdir dir
53208tar --acls -xf archive.tar -C dir
53209
53210cd dir
53211getfattr -h -m. -d subdir subdir/file > ../after
53212cd ..
53213
53214diff before after
53215test "$?" = 0
53216)
53217) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53218at_status=$? at_failed=false
53219$at_check_filter
53220at_fn_diff_devnull "$at_stderr" || at_failed=:
53221at_fn_diff_devnull "$at_stdout" || at_failed=:
53222at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
53223$at_failed && at_fn_log_failure
53224$at_traceon; }
53225
53226              { set +x
53227$as_echo "$at_srcdir/acls02.at:28:
53228mkdir gnu
53229(cd gnu
53230TEST_TAR_FORMAT=gnu
53231export TEST_TAR_FORMAT
53232TAR_OPTIONS=\"-H gnu\"
53233export TAR_OPTIONS
53234rm -rf *
53235
53236
53237  file=\$(TMPDIR=. mktemp fiXXXXXX)
53238
53239  setfattr -n user.test -v test \$file &> /dev/null
53240  if test \"\$?\" != 0; then
53241    exit 77
53242  fi
53243
53244
53245  getfattr \$file &> /dev/null
53246  if test \"\$?\" != 0; then
53247    exit 77
53248  fi
53249
53250
53251
53252
53253  file=\$(TMPDIR=. mktemp fiXXXXXX)
53254
53255  setfacl -m u:\$UID:rwx \$file &> /dev/null
53256  if test \"\$?\" != 0; then
53257    exit 77
53258  fi
53259
53260
53261  getfacl \$file &> /dev/null
53262  if test \"\$?\" != 0; then
53263    exit 77
53264  fi
53265
53266  rm -rf \$file
53267
53268  file=\$(TMPDIR=. mktemp fiXXXXXX)
53269  setfacl -m u:\$UID:rwx \$file
53270  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
53271  if test \"\$err\" != \"0\"; then
53272    exit 77
53273  fi
53274
53275
53276mkdir dir
53277mkdir dir/subdir
53278genfile --file dir/subdir/file
53279
53280MYNAME=\$( id -un )
53281
53282setfacl -m u:\$MYNAME:--x dir/subdir
53283setfacl -m u:\$MYNAME:--x dir/subdir/file
53284
53285cd dir
53286getfattr -h -m. -d subdir subdir/file > ../before
53287cd ..
53288
53289tar --acls -cf archive.tar -C dir subdir
53290rm -rf dir
53291
53292mkdir dir
53293tar --acls -xf archive.tar -C dir
53294
53295cd dir
53296getfattr -h -m. -d subdir subdir/file > ../after
53297cd ..
53298
53299diff before after
53300test \"\$?\" = 0
53301)"
53302at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
53303( $at_check_trace;
53304mkdir gnu
53305(cd gnu
53306TEST_TAR_FORMAT=gnu
53307export TEST_TAR_FORMAT
53308TAR_OPTIONS="-H gnu"
53309export TAR_OPTIONS
53310rm -rf *
53311
53312
53313  file=$(TMPDIR=. mktemp fiXXXXXX)
53314
53315  setfattr -n user.test -v test $file &> /dev/null
53316  if test "$?" != 0; then
53317    exit 77
53318  fi
53319
53320
53321  getfattr $file &> /dev/null
53322  if test "$?" != 0; then
53323    exit 77
53324  fi
53325
53326
53327
53328
53329  file=$(TMPDIR=. mktemp fiXXXXXX)
53330
53331  setfacl -m u:$UID:rwx $file &> /dev/null
53332  if test "$?" != 0; then
53333    exit 77
53334  fi
53335
53336
53337  getfacl $file &> /dev/null
53338  if test "$?" != 0; then
53339    exit 77
53340  fi
53341
53342  rm -rf $file
53343
53344  file=$(TMPDIR=. mktemp fiXXXXXX)
53345  setfacl -m u:$UID:rwx $file
53346  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
53347  if test "$err" != "0"; then
53348    exit 77
53349  fi
53350
53351
53352mkdir dir
53353mkdir dir/subdir
53354genfile --file dir/subdir/file
53355
53356MYNAME=$( id -un )
53357
53358setfacl -m u:$MYNAME:--x dir/subdir
53359setfacl -m u:$MYNAME:--x dir/subdir/file
53360
53361cd dir
53362getfattr -h -m. -d subdir subdir/file > ../before
53363cd ..
53364
53365tar --acls -cf archive.tar -C dir subdir
53366rm -rf dir
53367
53368mkdir dir
53369tar --acls -xf archive.tar -C dir
53370
53371cd dir
53372getfattr -h -m. -d subdir subdir/file > ../after
53373cd ..
53374
53375diff before after
53376test "$?" = 0
53377)
53378) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53379at_status=$? at_failed=false
53380$at_check_filter
53381at_fn_diff_devnull "$at_stderr" || at_failed=:
53382at_fn_diff_devnull "$at_stdout" || at_failed=:
53383at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
53384$at_failed && at_fn_log_failure
53385$at_traceon; }
53386
53387
53388
53389
53390  set +x
53391  $at_times_p && times >"$at_times_file"
53392) 5>&1 2>&1 7>&- | eval $at_tee_pipe
53393read at_status <"$at_status_file"
53394#AT_STOP_223
53395#AT_START_224
53396at_fn_group_banner 224 'acls03.at:30' \
53397  "acls: default ACLs" "                             " 31
53398at_xfail=no
53399      test -f $XFAILFILE && at_xfail=yes
53400(
53401  $as_echo "224. $at_setup_line: testing $at_desc ..."
53402  $at_traceon
53403
53404
53405
53406
53407
53408
53409
53410
53411
53412  { set +x
53413$as_echo "$at_srcdir/acls03.at:47:
53414mkdir v7
53415(cd v7
53416TEST_TAR_FORMAT=v7
53417export TEST_TAR_FORMAT
53418TAR_OPTIONS=\"-H v7\"
53419export TAR_OPTIONS
53420rm -rf *
53421
53422
53423  file=\$(TMPDIR=. mktemp fiXXXXXX)
53424
53425  setfattr -n user.test -v test \$file &> /dev/null
53426  if test \"\$?\" != 0; then
53427    exit 77
53428  fi
53429
53430
53431  getfattr \$file &> /dev/null
53432  if test \"\$?\" != 0; then
53433    exit 77
53434  fi
53435
53436
53437
53438
53439  file=\$(TMPDIR=. mktemp fiXXXXXX)
53440
53441  setfacl -m u:\$UID:rwx \$file &> /dev/null
53442  if test \"\$?\" != 0; then
53443    exit 77
53444  fi
53445
53446
53447  getfacl \$file &> /dev/null
53448  if test \"\$?\" != 0; then
53449    exit 77
53450  fi
53451
53452  rm -rf \$file
53453
53454  file=\$(TMPDIR=. mktemp fiXXXXXX)
53455  setfacl -m u:\$UID:rwx \$file
53456  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
53457  if test \"\$err\" != \"0\"; then
53458    exit 77
53459  fi
53460
53461
53462test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
53463
53464
53465MYNAME=\$( id -un )
53466MYGROUP=\$( id -gn )
53467
53468# Prepare directory structure with default ACLs
53469mkdir -p pure/d1/d2
53470genfile --file pure/d1/f2a
53471genfile --file pure/d1/f2b
53472genfile --file pure/d1/d2/f3a
53473genfile --file pure/d1/d2/f3b
53474setfacl    -m g:\$MYGROUP:r-x pure/d1
53475setfacl -d -m g:\$MYGROUP:rwx pure/d1
53476setfacl -d -m u:\$MYNAME:rwx  pure/d1
53477# \"*a\" files have \"some\" additional ACLs
53478setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
53479setfacl    -m u:\$MYNAME:--- pure/d1/f2a
53480
53481# use default format (no acls stored)
53482tar -cf noacl.tar -C pure d1
53483
53484# use posix format, acls stored
53485tar --acls -cf acl.tar -C pure d1
53486
53487# Directory names are chosen based on \"how the files were extracted from
53488# archive\".  Equivalent no* tags are used also:
53489#   ^sacl_    — extracted archive has stored ACLs
53490#   _def_     — target directory (-C) has default ACLs
53491#   _optacl\$  — extraction was done with --acls option
53492
53493mkdir sacl_def_optacl
53494mkdir sacl_def_optnoacl
53495mkdir sacl_nodef_optacl
53496mkdir sacl_nodef_optnoacl
53497mkdir nosacl_def_optacl
53498mkdir nosacl_def_optnoacl
53499mkdir nosacl_nodef_optacl
53500mkdir nosacl_nodef_optnoacl
53501
53502setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
53503setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
53504
53505tar -xf acl.tar -C sacl_nodef_optnoacl
53506tar --acls -xf acl.tar -C sacl_nodef_optacl
53507tar -xf acl.tar -C sacl_def_optnoacl
53508tar --acls -xf acl.tar -C sacl_def_optacl
53509tar -xf noacl.tar -C nosacl_def_optnoacl
53510# _NO_ ACLs in output
53511tar -xf noacl.tar -C nosacl_nodef_optnoacl
53512tar -xf noacl.tar -C nosacl_nodef_optacl
53513tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
53514# _NO_ ACLs in output (even when default ACLs exist)
53515tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
53516
53517
53518    cd pure
53519    pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53520    cd ..
53521
53522
53523
53524    cd sacl_def_optacl
53525    sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53526    cd ..
53527
53528
53529    cd sacl_def_optnoacl
53530    sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53531    cd ..
53532
53533
53534    cd sacl_nodef_optacl
53535    sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53536    cd ..
53537
53538
53539    cd sacl_nodef_optnoacl
53540    sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53541    cd ..
53542
53543
53544    cd nosacl_def_optacl
53545    nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53546    cd ..
53547
53548
53549    cd nosacl_def_optnoacl
53550    nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53551    cd ..
53552
53553
53554    cd nosacl_nodef_optacl
53555    nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53556    cd ..
53557
53558
53559    cd nosacl_nodef_optnoacl
53560    nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53561    cd ..
53562
53563
53564
53565    echo \"\$pure\" > pure.log
53566    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
53567    if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
53568        echo \"bad 'pure' against 'sacl_def_optacl' output\"
53569    fi
53570
53571
53572
53573    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
53574    echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
53575    if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
53576        echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
53577    fi
53578
53579
53580    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
53581    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
53582    if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
53583        echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
53584    fi
53585
53586
53587    echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
53588    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
53589    if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
53590        echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
53591    fi
53592
53593
53594    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
53595    echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
53596    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
53597        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
53598    fi
53599
53600
53601    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
53602    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
53603    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
53604        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
53605    fi
53606
53607
53608
53609    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
53610    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
53611    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
53612        echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
53613    fi
53614
53615
53616    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
53617    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
53618    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
53619        echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
53620    fi
53621
53622
53623    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
53624    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
53625    if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
53626        echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
53627    fi
53628
53629)"
53630at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
53631( $at_check_trace;
53632mkdir v7
53633(cd v7
53634TEST_TAR_FORMAT=v7
53635export TEST_TAR_FORMAT
53636TAR_OPTIONS="-H v7"
53637export TAR_OPTIONS
53638rm -rf *
53639
53640
53641  file=$(TMPDIR=. mktemp fiXXXXXX)
53642
53643  setfattr -n user.test -v test $file &> /dev/null
53644  if test "$?" != 0; then
53645    exit 77
53646  fi
53647
53648
53649  getfattr $file &> /dev/null
53650  if test "$?" != 0; then
53651    exit 77
53652  fi
53653
53654
53655
53656
53657  file=$(TMPDIR=. mktemp fiXXXXXX)
53658
53659  setfacl -m u:$UID:rwx $file &> /dev/null
53660  if test "$?" != 0; then
53661    exit 77
53662  fi
53663
53664
53665  getfacl $file &> /dev/null
53666  if test "$?" != 0; then
53667    exit 77
53668  fi
53669
53670  rm -rf $file
53671
53672  file=$(TMPDIR=. mktemp fiXXXXXX)
53673  setfacl -m u:$UID:rwx $file
53674  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
53675  if test "$err" != "0"; then
53676    exit 77
53677  fi
53678
53679
53680test -z "`sort < /dev/null 2>&1`" || exit 77
53681
53682
53683MYNAME=$( id -un )
53684MYGROUP=$( id -gn )
53685
53686# Prepare directory structure with default ACLs
53687mkdir -p pure/d1/d2
53688genfile --file pure/d1/f2a
53689genfile --file pure/d1/f2b
53690genfile --file pure/d1/d2/f3a
53691genfile --file pure/d1/d2/f3b
53692setfacl    -m g:$MYGROUP:r-x pure/d1
53693setfacl -d -m g:$MYGROUP:rwx pure/d1
53694setfacl -d -m u:$MYNAME:rwx  pure/d1
53695# "*a" files have "some" additional ACLs
53696setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
53697setfacl    -m u:$MYNAME:--- pure/d1/f2a
53698
53699# use default format (no acls stored)
53700tar -cf noacl.tar -C pure d1
53701
53702# use posix format, acls stored
53703tar --acls -cf acl.tar -C pure d1
53704
53705# Directory names are chosen based on "how the files were extracted from
53706# archive".  Equivalent no* tags are used also:
53707#   ^sacl_    — extracted archive has stored ACLs
53708#   _def_     — target directory (-C) has default ACLs
53709#   _optacl$  — extraction was done with --acls option
53710
53711mkdir sacl_def_optacl
53712mkdir sacl_def_optnoacl
53713mkdir sacl_nodef_optacl
53714mkdir sacl_nodef_optnoacl
53715mkdir nosacl_def_optacl
53716mkdir nosacl_def_optnoacl
53717mkdir nosacl_nodef_optacl
53718mkdir nosacl_nodef_optnoacl
53719
53720setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
53721setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
53722
53723tar -xf acl.tar -C sacl_nodef_optnoacl
53724tar --acls -xf acl.tar -C sacl_nodef_optacl
53725tar -xf acl.tar -C sacl_def_optnoacl
53726tar --acls -xf acl.tar -C sacl_def_optacl
53727tar -xf noacl.tar -C nosacl_def_optnoacl
53728# _NO_ ACLs in output
53729tar -xf noacl.tar -C nosacl_nodef_optnoacl
53730tar -xf noacl.tar -C nosacl_nodef_optacl
53731tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
53732# _NO_ ACLs in output (even when default ACLs exist)
53733tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
53734
53735
53736    cd pure
53737    pure="$(find d1 | sort | xargs -n 1 getfacl)"
53738    cd ..
53739
53740
53741
53742    cd sacl_def_optacl
53743    sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
53744    cd ..
53745
53746
53747    cd sacl_def_optnoacl
53748    sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
53749    cd ..
53750
53751
53752    cd sacl_nodef_optacl
53753    sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
53754    cd ..
53755
53756
53757    cd sacl_nodef_optnoacl
53758    sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
53759    cd ..
53760
53761
53762    cd nosacl_def_optacl
53763    nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
53764    cd ..
53765
53766
53767    cd nosacl_def_optnoacl
53768    nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
53769    cd ..
53770
53771
53772    cd nosacl_nodef_optacl
53773    nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
53774    cd ..
53775
53776
53777    cd nosacl_nodef_optnoacl
53778    nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
53779    cd ..
53780
53781
53782
53783    echo "$pure" > pure.log
53784    echo "$sacl_def_optacl" > sacl_def_optacl.log
53785    if test ! "$pure" "=" "$sacl_def_optacl"; then
53786        echo "bad 'pure' against 'sacl_def_optacl' output"
53787    fi
53788
53789
53790
53791    echo "$sacl_def_optacl" > sacl_def_optacl.log
53792    echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
53793    if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
53794        echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
53795    fi
53796
53797
53798    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
53799    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
53800    if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
53801        echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
53802    fi
53803
53804
53805    echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
53806    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
53807    if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
53808        echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
53809    fi
53810
53811
53812    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
53813    echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
53814    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
53815        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
53816    fi
53817
53818
53819    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
53820    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
53821    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
53822        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
53823    fi
53824
53825
53826
53827    echo "$sacl_def_optacl" > sacl_def_optacl.log
53828    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
53829    if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
53830        echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
53831    fi
53832
53833
53834    echo "$sacl_def_optacl" > sacl_def_optacl.log
53835    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
53836    if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
53837        echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
53838    fi
53839
53840
53841    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
53842    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
53843    if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
53844        echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
53845    fi
53846
53847)
53848) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53849at_status=$? at_failed=false
53850$at_check_filter
53851at_fn_diff_devnull "$at_stderr" || at_failed=:
53852at_fn_diff_devnull "$at_stdout" || at_failed=:
53853at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
53854$at_failed && at_fn_log_failure
53855$at_traceon; }
53856
53857              { set +x
53858$as_echo "$at_srcdir/acls03.at:47:
53859mkdir oldgnu
53860(cd oldgnu
53861TEST_TAR_FORMAT=oldgnu
53862export TEST_TAR_FORMAT
53863TAR_OPTIONS=\"-H oldgnu\"
53864export TAR_OPTIONS
53865rm -rf *
53866
53867
53868  file=\$(TMPDIR=. mktemp fiXXXXXX)
53869
53870  setfattr -n user.test -v test \$file &> /dev/null
53871  if test \"\$?\" != 0; then
53872    exit 77
53873  fi
53874
53875
53876  getfattr \$file &> /dev/null
53877  if test \"\$?\" != 0; then
53878    exit 77
53879  fi
53880
53881
53882
53883
53884  file=\$(TMPDIR=. mktemp fiXXXXXX)
53885
53886  setfacl -m u:\$UID:rwx \$file &> /dev/null
53887  if test \"\$?\" != 0; then
53888    exit 77
53889  fi
53890
53891
53892  getfacl \$file &> /dev/null
53893  if test \"\$?\" != 0; then
53894    exit 77
53895  fi
53896
53897  rm -rf \$file
53898
53899  file=\$(TMPDIR=. mktemp fiXXXXXX)
53900  setfacl -m u:\$UID:rwx \$file
53901  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
53902  if test \"\$err\" != \"0\"; then
53903    exit 77
53904  fi
53905
53906
53907test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
53908
53909
53910MYNAME=\$( id -un )
53911MYGROUP=\$( id -gn )
53912
53913# Prepare directory structure with default ACLs
53914mkdir -p pure/d1/d2
53915genfile --file pure/d1/f2a
53916genfile --file pure/d1/f2b
53917genfile --file pure/d1/d2/f3a
53918genfile --file pure/d1/d2/f3b
53919setfacl    -m g:\$MYGROUP:r-x pure/d1
53920setfacl -d -m g:\$MYGROUP:rwx pure/d1
53921setfacl -d -m u:\$MYNAME:rwx  pure/d1
53922# \"*a\" files have \"some\" additional ACLs
53923setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
53924setfacl    -m u:\$MYNAME:--- pure/d1/f2a
53925
53926# use default format (no acls stored)
53927tar -cf noacl.tar -C pure d1
53928
53929# use posix format, acls stored
53930tar --acls -cf acl.tar -C pure d1
53931
53932# Directory names are chosen based on \"how the files were extracted from
53933# archive\".  Equivalent no* tags are used also:
53934#   ^sacl_    — extracted archive has stored ACLs
53935#   _def_     — target directory (-C) has default ACLs
53936#   _optacl\$  — extraction was done with --acls option
53937
53938mkdir sacl_def_optacl
53939mkdir sacl_def_optnoacl
53940mkdir sacl_nodef_optacl
53941mkdir sacl_nodef_optnoacl
53942mkdir nosacl_def_optacl
53943mkdir nosacl_def_optnoacl
53944mkdir nosacl_nodef_optacl
53945mkdir nosacl_nodef_optnoacl
53946
53947setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
53948setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
53949
53950tar -xf acl.tar -C sacl_nodef_optnoacl
53951tar --acls -xf acl.tar -C sacl_nodef_optacl
53952tar -xf acl.tar -C sacl_def_optnoacl
53953tar --acls -xf acl.tar -C sacl_def_optacl
53954tar -xf noacl.tar -C nosacl_def_optnoacl
53955# _NO_ ACLs in output
53956tar -xf noacl.tar -C nosacl_nodef_optnoacl
53957tar -xf noacl.tar -C nosacl_nodef_optacl
53958tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
53959# _NO_ ACLs in output (even when default ACLs exist)
53960tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
53961
53962
53963    cd pure
53964    pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53965    cd ..
53966
53967
53968
53969    cd sacl_def_optacl
53970    sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53971    cd ..
53972
53973
53974    cd sacl_def_optnoacl
53975    sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53976    cd ..
53977
53978
53979    cd sacl_nodef_optacl
53980    sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53981    cd ..
53982
53983
53984    cd sacl_nodef_optnoacl
53985    sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53986    cd ..
53987
53988
53989    cd nosacl_def_optacl
53990    nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53991    cd ..
53992
53993
53994    cd nosacl_def_optnoacl
53995    nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
53996    cd ..
53997
53998
53999    cd nosacl_nodef_optacl
54000    nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54001    cd ..
54002
54003
54004    cd nosacl_nodef_optnoacl
54005    nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54006    cd ..
54007
54008
54009
54010    echo \"\$pure\" > pure.log
54011    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54012    if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
54013        echo \"bad 'pure' against 'sacl_def_optacl' output\"
54014    fi
54015
54016
54017
54018    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54019    echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
54020    if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
54021        echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
54022    fi
54023
54024
54025    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
54026    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54027    if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
54028        echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
54029    fi
54030
54031
54032    echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
54033    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54034    if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
54035        echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
54036    fi
54037
54038
54039    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
54040    echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
54041    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
54042        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
54043    fi
54044
54045
54046    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
54047    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54048    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
54049        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
54050    fi
54051
54052
54053
54054    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54055    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
54056    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
54057        echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
54058    fi
54059
54060
54061    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54062    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54063    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
54064        echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
54065    fi
54066
54067
54068    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54069    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54070    if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
54071        echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
54072    fi
54073
54074)"
54075at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
54076( $at_check_trace;
54077mkdir oldgnu
54078(cd oldgnu
54079TEST_TAR_FORMAT=oldgnu
54080export TEST_TAR_FORMAT
54081TAR_OPTIONS="-H oldgnu"
54082export TAR_OPTIONS
54083rm -rf *
54084
54085
54086  file=$(TMPDIR=. mktemp fiXXXXXX)
54087
54088  setfattr -n user.test -v test $file &> /dev/null
54089  if test "$?" != 0; then
54090    exit 77
54091  fi
54092
54093
54094  getfattr $file &> /dev/null
54095  if test "$?" != 0; then
54096    exit 77
54097  fi
54098
54099
54100
54101
54102  file=$(TMPDIR=. mktemp fiXXXXXX)
54103
54104  setfacl -m u:$UID:rwx $file &> /dev/null
54105  if test "$?" != 0; then
54106    exit 77
54107  fi
54108
54109
54110  getfacl $file &> /dev/null
54111  if test "$?" != 0; then
54112    exit 77
54113  fi
54114
54115  rm -rf $file
54116
54117  file=$(TMPDIR=. mktemp fiXXXXXX)
54118  setfacl -m u:$UID:rwx $file
54119  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
54120  if test "$err" != "0"; then
54121    exit 77
54122  fi
54123
54124
54125test -z "`sort < /dev/null 2>&1`" || exit 77
54126
54127
54128MYNAME=$( id -un )
54129MYGROUP=$( id -gn )
54130
54131# Prepare directory structure with default ACLs
54132mkdir -p pure/d1/d2
54133genfile --file pure/d1/f2a
54134genfile --file pure/d1/f2b
54135genfile --file pure/d1/d2/f3a
54136genfile --file pure/d1/d2/f3b
54137setfacl    -m g:$MYGROUP:r-x pure/d1
54138setfacl -d -m g:$MYGROUP:rwx pure/d1
54139setfacl -d -m u:$MYNAME:rwx  pure/d1
54140# "*a" files have "some" additional ACLs
54141setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
54142setfacl    -m u:$MYNAME:--- pure/d1/f2a
54143
54144# use default format (no acls stored)
54145tar -cf noacl.tar -C pure d1
54146
54147# use posix format, acls stored
54148tar --acls -cf acl.tar -C pure d1
54149
54150# Directory names are chosen based on "how the files were extracted from
54151# archive".  Equivalent no* tags are used also:
54152#   ^sacl_    — extracted archive has stored ACLs
54153#   _def_     — target directory (-C) has default ACLs
54154#   _optacl$  — extraction was done with --acls option
54155
54156mkdir sacl_def_optacl
54157mkdir sacl_def_optnoacl
54158mkdir sacl_nodef_optacl
54159mkdir sacl_nodef_optnoacl
54160mkdir nosacl_def_optacl
54161mkdir nosacl_def_optnoacl
54162mkdir nosacl_nodef_optacl
54163mkdir nosacl_nodef_optnoacl
54164
54165setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
54166setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
54167
54168tar -xf acl.tar -C sacl_nodef_optnoacl
54169tar --acls -xf acl.tar -C sacl_nodef_optacl
54170tar -xf acl.tar -C sacl_def_optnoacl
54171tar --acls -xf acl.tar -C sacl_def_optacl
54172tar -xf noacl.tar -C nosacl_def_optnoacl
54173# _NO_ ACLs in output
54174tar -xf noacl.tar -C nosacl_nodef_optnoacl
54175tar -xf noacl.tar -C nosacl_nodef_optacl
54176tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
54177# _NO_ ACLs in output (even when default ACLs exist)
54178tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
54179
54180
54181    cd pure
54182    pure="$(find d1 | sort | xargs -n 1 getfacl)"
54183    cd ..
54184
54185
54186
54187    cd sacl_def_optacl
54188    sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
54189    cd ..
54190
54191
54192    cd sacl_def_optnoacl
54193    sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
54194    cd ..
54195
54196
54197    cd sacl_nodef_optacl
54198    sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
54199    cd ..
54200
54201
54202    cd sacl_nodef_optnoacl
54203    sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
54204    cd ..
54205
54206
54207    cd nosacl_def_optacl
54208    nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
54209    cd ..
54210
54211
54212    cd nosacl_def_optnoacl
54213    nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
54214    cd ..
54215
54216
54217    cd nosacl_nodef_optacl
54218    nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
54219    cd ..
54220
54221
54222    cd nosacl_nodef_optnoacl
54223    nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
54224    cd ..
54225
54226
54227
54228    echo "$pure" > pure.log
54229    echo "$sacl_def_optacl" > sacl_def_optacl.log
54230    if test ! "$pure" "=" "$sacl_def_optacl"; then
54231        echo "bad 'pure' against 'sacl_def_optacl' output"
54232    fi
54233
54234
54235
54236    echo "$sacl_def_optacl" > sacl_def_optacl.log
54237    echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
54238    if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
54239        echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
54240    fi
54241
54242
54243    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
54244    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
54245    if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
54246        echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
54247    fi
54248
54249
54250    echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
54251    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
54252    if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
54253        echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
54254    fi
54255
54256
54257    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
54258    echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
54259    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
54260        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
54261    fi
54262
54263
54264    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
54265    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
54266    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
54267        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
54268    fi
54269
54270
54271
54272    echo "$sacl_def_optacl" > sacl_def_optacl.log
54273    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
54274    if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
54275        echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
54276    fi
54277
54278
54279    echo "$sacl_def_optacl" > sacl_def_optacl.log
54280    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
54281    if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
54282        echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
54283    fi
54284
54285
54286    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
54287    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
54288    if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
54289        echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
54290    fi
54291
54292)
54293) >>"$at_stdout" 2>>"$at_stderr" 5>&-
54294at_status=$? at_failed=false
54295$at_check_filter
54296at_fn_diff_devnull "$at_stderr" || at_failed=:
54297at_fn_diff_devnull "$at_stdout" || at_failed=:
54298at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
54299$at_failed && at_fn_log_failure
54300$at_traceon; }
54301
54302              { set +x
54303$as_echo "$at_srcdir/acls03.at:47:
54304mkdir ustar
54305(cd ustar
54306TEST_TAR_FORMAT=ustar
54307export TEST_TAR_FORMAT
54308TAR_OPTIONS=\"-H ustar\"
54309export TAR_OPTIONS
54310rm -rf *
54311
54312
54313  file=\$(TMPDIR=. mktemp fiXXXXXX)
54314
54315  setfattr -n user.test -v test \$file &> /dev/null
54316  if test \"\$?\" != 0; then
54317    exit 77
54318  fi
54319
54320
54321  getfattr \$file &> /dev/null
54322  if test \"\$?\" != 0; then
54323    exit 77
54324  fi
54325
54326
54327
54328
54329  file=\$(TMPDIR=. mktemp fiXXXXXX)
54330
54331  setfacl -m u:\$UID:rwx \$file &> /dev/null
54332  if test \"\$?\" != 0; then
54333    exit 77
54334  fi
54335
54336
54337  getfacl \$file &> /dev/null
54338  if test \"\$?\" != 0; then
54339    exit 77
54340  fi
54341
54342  rm -rf \$file
54343
54344  file=\$(TMPDIR=. mktemp fiXXXXXX)
54345  setfacl -m u:\$UID:rwx \$file
54346  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
54347  if test \"\$err\" != \"0\"; then
54348    exit 77
54349  fi
54350
54351
54352test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
54353
54354
54355MYNAME=\$( id -un )
54356MYGROUP=\$( id -gn )
54357
54358# Prepare directory structure with default ACLs
54359mkdir -p pure/d1/d2
54360genfile --file pure/d1/f2a
54361genfile --file pure/d1/f2b
54362genfile --file pure/d1/d2/f3a
54363genfile --file pure/d1/d2/f3b
54364setfacl    -m g:\$MYGROUP:r-x pure/d1
54365setfacl -d -m g:\$MYGROUP:rwx pure/d1
54366setfacl -d -m u:\$MYNAME:rwx  pure/d1
54367# \"*a\" files have \"some\" additional ACLs
54368setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
54369setfacl    -m u:\$MYNAME:--- pure/d1/f2a
54370
54371# use default format (no acls stored)
54372tar -cf noacl.tar -C pure d1
54373
54374# use posix format, acls stored
54375tar --acls -cf acl.tar -C pure d1
54376
54377# Directory names are chosen based on \"how the files were extracted from
54378# archive\".  Equivalent no* tags are used also:
54379#   ^sacl_    — extracted archive has stored ACLs
54380#   _def_     — target directory (-C) has default ACLs
54381#   _optacl\$  — extraction was done with --acls option
54382
54383mkdir sacl_def_optacl
54384mkdir sacl_def_optnoacl
54385mkdir sacl_nodef_optacl
54386mkdir sacl_nodef_optnoacl
54387mkdir nosacl_def_optacl
54388mkdir nosacl_def_optnoacl
54389mkdir nosacl_nodef_optacl
54390mkdir nosacl_nodef_optnoacl
54391
54392setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
54393setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
54394
54395tar -xf acl.tar -C sacl_nodef_optnoacl
54396tar --acls -xf acl.tar -C sacl_nodef_optacl
54397tar -xf acl.tar -C sacl_def_optnoacl
54398tar --acls -xf acl.tar -C sacl_def_optacl
54399tar -xf noacl.tar -C nosacl_def_optnoacl
54400# _NO_ ACLs in output
54401tar -xf noacl.tar -C nosacl_nodef_optnoacl
54402tar -xf noacl.tar -C nosacl_nodef_optacl
54403tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
54404# _NO_ ACLs in output (even when default ACLs exist)
54405tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
54406
54407
54408    cd pure
54409    pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54410    cd ..
54411
54412
54413
54414    cd sacl_def_optacl
54415    sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54416    cd ..
54417
54418
54419    cd sacl_def_optnoacl
54420    sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54421    cd ..
54422
54423
54424    cd sacl_nodef_optacl
54425    sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54426    cd ..
54427
54428
54429    cd sacl_nodef_optnoacl
54430    sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54431    cd ..
54432
54433
54434    cd nosacl_def_optacl
54435    nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54436    cd ..
54437
54438
54439    cd nosacl_def_optnoacl
54440    nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54441    cd ..
54442
54443
54444    cd nosacl_nodef_optacl
54445    nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54446    cd ..
54447
54448
54449    cd nosacl_nodef_optnoacl
54450    nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54451    cd ..
54452
54453
54454
54455    echo \"\$pure\" > pure.log
54456    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54457    if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
54458        echo \"bad 'pure' against 'sacl_def_optacl' output\"
54459    fi
54460
54461
54462
54463    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54464    echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
54465    if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
54466        echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
54467    fi
54468
54469
54470    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
54471    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54472    if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
54473        echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
54474    fi
54475
54476
54477    echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
54478    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54479    if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
54480        echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
54481    fi
54482
54483
54484    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
54485    echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
54486    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
54487        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
54488    fi
54489
54490
54491    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
54492    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54493    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
54494        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
54495    fi
54496
54497
54498
54499    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54500    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
54501    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
54502        echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
54503    fi
54504
54505
54506    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54507    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54508    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
54509        echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
54510    fi
54511
54512
54513    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54514    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54515    if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
54516        echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
54517    fi
54518
54519)"
54520at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
54521( $at_check_trace;
54522mkdir ustar
54523(cd ustar
54524TEST_TAR_FORMAT=ustar
54525export TEST_TAR_FORMAT
54526TAR_OPTIONS="-H ustar"
54527export TAR_OPTIONS
54528rm -rf *
54529
54530
54531  file=$(TMPDIR=. mktemp fiXXXXXX)
54532
54533  setfattr -n user.test -v test $file &> /dev/null
54534  if test "$?" != 0; then
54535    exit 77
54536  fi
54537
54538
54539  getfattr $file &> /dev/null
54540  if test "$?" != 0; then
54541    exit 77
54542  fi
54543
54544
54545
54546
54547  file=$(TMPDIR=. mktemp fiXXXXXX)
54548
54549  setfacl -m u:$UID:rwx $file &> /dev/null
54550  if test "$?" != 0; then
54551    exit 77
54552  fi
54553
54554
54555  getfacl $file &> /dev/null
54556  if test "$?" != 0; then
54557    exit 77
54558  fi
54559
54560  rm -rf $file
54561
54562  file=$(TMPDIR=. mktemp fiXXXXXX)
54563  setfacl -m u:$UID:rwx $file
54564  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
54565  if test "$err" != "0"; then
54566    exit 77
54567  fi
54568
54569
54570test -z "`sort < /dev/null 2>&1`" || exit 77
54571
54572
54573MYNAME=$( id -un )
54574MYGROUP=$( id -gn )
54575
54576# Prepare directory structure with default ACLs
54577mkdir -p pure/d1/d2
54578genfile --file pure/d1/f2a
54579genfile --file pure/d1/f2b
54580genfile --file pure/d1/d2/f3a
54581genfile --file pure/d1/d2/f3b
54582setfacl    -m g:$MYGROUP:r-x pure/d1
54583setfacl -d -m g:$MYGROUP:rwx pure/d1
54584setfacl -d -m u:$MYNAME:rwx  pure/d1
54585# "*a" files have "some" additional ACLs
54586setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
54587setfacl    -m u:$MYNAME:--- pure/d1/f2a
54588
54589# use default format (no acls stored)
54590tar -cf noacl.tar -C pure d1
54591
54592# use posix format, acls stored
54593tar --acls -cf acl.tar -C pure d1
54594
54595# Directory names are chosen based on "how the files were extracted from
54596# archive".  Equivalent no* tags are used also:
54597#   ^sacl_    — extracted archive has stored ACLs
54598#   _def_     — target directory (-C) has default ACLs
54599#   _optacl$  — extraction was done with --acls option
54600
54601mkdir sacl_def_optacl
54602mkdir sacl_def_optnoacl
54603mkdir sacl_nodef_optacl
54604mkdir sacl_nodef_optnoacl
54605mkdir nosacl_def_optacl
54606mkdir nosacl_def_optnoacl
54607mkdir nosacl_nodef_optacl
54608mkdir nosacl_nodef_optnoacl
54609
54610setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
54611setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
54612
54613tar -xf acl.tar -C sacl_nodef_optnoacl
54614tar --acls -xf acl.tar -C sacl_nodef_optacl
54615tar -xf acl.tar -C sacl_def_optnoacl
54616tar --acls -xf acl.tar -C sacl_def_optacl
54617tar -xf noacl.tar -C nosacl_def_optnoacl
54618# _NO_ ACLs in output
54619tar -xf noacl.tar -C nosacl_nodef_optnoacl
54620tar -xf noacl.tar -C nosacl_nodef_optacl
54621tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
54622# _NO_ ACLs in output (even when default ACLs exist)
54623tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
54624
54625
54626    cd pure
54627    pure="$(find d1 | sort | xargs -n 1 getfacl)"
54628    cd ..
54629
54630
54631
54632    cd sacl_def_optacl
54633    sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
54634    cd ..
54635
54636
54637    cd sacl_def_optnoacl
54638    sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
54639    cd ..
54640
54641
54642    cd sacl_nodef_optacl
54643    sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
54644    cd ..
54645
54646
54647    cd sacl_nodef_optnoacl
54648    sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
54649    cd ..
54650
54651
54652    cd nosacl_def_optacl
54653    nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
54654    cd ..
54655
54656
54657    cd nosacl_def_optnoacl
54658    nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
54659    cd ..
54660
54661
54662    cd nosacl_nodef_optacl
54663    nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
54664    cd ..
54665
54666
54667    cd nosacl_nodef_optnoacl
54668    nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
54669    cd ..
54670
54671
54672
54673    echo "$pure" > pure.log
54674    echo "$sacl_def_optacl" > sacl_def_optacl.log
54675    if test ! "$pure" "=" "$sacl_def_optacl"; then
54676        echo "bad 'pure' against 'sacl_def_optacl' output"
54677    fi
54678
54679
54680
54681    echo "$sacl_def_optacl" > sacl_def_optacl.log
54682    echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
54683    if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
54684        echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
54685    fi
54686
54687
54688    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
54689    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
54690    if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
54691        echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
54692    fi
54693
54694
54695    echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
54696    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
54697    if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
54698        echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
54699    fi
54700
54701
54702    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
54703    echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
54704    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
54705        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
54706    fi
54707
54708
54709    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
54710    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
54711    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
54712        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
54713    fi
54714
54715
54716
54717    echo "$sacl_def_optacl" > sacl_def_optacl.log
54718    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
54719    if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
54720        echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
54721    fi
54722
54723
54724    echo "$sacl_def_optacl" > sacl_def_optacl.log
54725    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
54726    if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
54727        echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
54728    fi
54729
54730
54731    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
54732    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
54733    if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
54734        echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
54735    fi
54736
54737)
54738) >>"$at_stdout" 2>>"$at_stderr" 5>&-
54739at_status=$? at_failed=false
54740$at_check_filter
54741at_fn_diff_devnull "$at_stderr" || at_failed=:
54742at_fn_diff_devnull "$at_stdout" || at_failed=:
54743at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
54744$at_failed && at_fn_log_failure
54745$at_traceon; }
54746
54747              { set +x
54748$as_echo "$at_srcdir/acls03.at:47:
54749mkdir posix
54750(cd posix
54751TEST_TAR_FORMAT=posix
54752export TEST_TAR_FORMAT
54753TAR_OPTIONS=\"-H posix\"
54754export TAR_OPTIONS
54755rm -rf *
54756
54757
54758  file=\$(TMPDIR=. mktemp fiXXXXXX)
54759
54760  setfattr -n user.test -v test \$file &> /dev/null
54761  if test \"\$?\" != 0; then
54762    exit 77
54763  fi
54764
54765
54766  getfattr \$file &> /dev/null
54767  if test \"\$?\" != 0; then
54768    exit 77
54769  fi
54770
54771
54772
54773
54774  file=\$(TMPDIR=. mktemp fiXXXXXX)
54775
54776  setfacl -m u:\$UID:rwx \$file &> /dev/null
54777  if test \"\$?\" != 0; then
54778    exit 77
54779  fi
54780
54781
54782  getfacl \$file &> /dev/null
54783  if test \"\$?\" != 0; then
54784    exit 77
54785  fi
54786
54787  rm -rf \$file
54788
54789  file=\$(TMPDIR=. mktemp fiXXXXXX)
54790  setfacl -m u:\$UID:rwx \$file
54791  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
54792  if test \"\$err\" != \"0\"; then
54793    exit 77
54794  fi
54795
54796
54797test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
54798
54799
54800MYNAME=\$( id -un )
54801MYGROUP=\$( id -gn )
54802
54803# Prepare directory structure with default ACLs
54804mkdir -p pure/d1/d2
54805genfile --file pure/d1/f2a
54806genfile --file pure/d1/f2b
54807genfile --file pure/d1/d2/f3a
54808genfile --file pure/d1/d2/f3b
54809setfacl    -m g:\$MYGROUP:r-x pure/d1
54810setfacl -d -m g:\$MYGROUP:rwx pure/d1
54811setfacl -d -m u:\$MYNAME:rwx  pure/d1
54812# \"*a\" files have \"some\" additional ACLs
54813setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
54814setfacl    -m u:\$MYNAME:--- pure/d1/f2a
54815
54816# use default format (no acls stored)
54817tar -cf noacl.tar -C pure d1
54818
54819# use posix format, acls stored
54820tar --acls -cf acl.tar -C pure d1
54821
54822# Directory names are chosen based on \"how the files were extracted from
54823# archive\".  Equivalent no* tags are used also:
54824#   ^sacl_    — extracted archive has stored ACLs
54825#   _def_     — target directory (-C) has default ACLs
54826#   _optacl\$  — extraction was done with --acls option
54827
54828mkdir sacl_def_optacl
54829mkdir sacl_def_optnoacl
54830mkdir sacl_nodef_optacl
54831mkdir sacl_nodef_optnoacl
54832mkdir nosacl_def_optacl
54833mkdir nosacl_def_optnoacl
54834mkdir nosacl_nodef_optacl
54835mkdir nosacl_nodef_optnoacl
54836
54837setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
54838setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
54839
54840tar -xf acl.tar -C sacl_nodef_optnoacl
54841tar --acls -xf acl.tar -C sacl_nodef_optacl
54842tar -xf acl.tar -C sacl_def_optnoacl
54843tar --acls -xf acl.tar -C sacl_def_optacl
54844tar -xf noacl.tar -C nosacl_def_optnoacl
54845# _NO_ ACLs in output
54846tar -xf noacl.tar -C nosacl_nodef_optnoacl
54847tar -xf noacl.tar -C nosacl_nodef_optacl
54848tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
54849# _NO_ ACLs in output (even when default ACLs exist)
54850tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
54851
54852
54853    cd pure
54854    pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54855    cd ..
54856
54857
54858
54859    cd sacl_def_optacl
54860    sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54861    cd ..
54862
54863
54864    cd sacl_def_optnoacl
54865    sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54866    cd ..
54867
54868
54869    cd sacl_nodef_optacl
54870    sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54871    cd ..
54872
54873
54874    cd sacl_nodef_optnoacl
54875    sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54876    cd ..
54877
54878
54879    cd nosacl_def_optacl
54880    nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54881    cd ..
54882
54883
54884    cd nosacl_def_optnoacl
54885    nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54886    cd ..
54887
54888
54889    cd nosacl_nodef_optacl
54890    nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54891    cd ..
54892
54893
54894    cd nosacl_nodef_optnoacl
54895    nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
54896    cd ..
54897
54898
54899
54900    echo \"\$pure\" > pure.log
54901    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54902    if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
54903        echo \"bad 'pure' against 'sacl_def_optacl' output\"
54904    fi
54905
54906
54907
54908    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54909    echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
54910    if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
54911        echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
54912    fi
54913
54914
54915    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
54916    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54917    if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
54918        echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
54919    fi
54920
54921
54922    echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
54923    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54924    if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
54925        echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
54926    fi
54927
54928
54929    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
54930    echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
54931    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
54932        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
54933    fi
54934
54935
54936    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
54937    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54938    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
54939        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
54940    fi
54941
54942
54943
54944    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54945    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
54946    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
54947        echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
54948    fi
54949
54950
54951    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
54952    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54953    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
54954        echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
54955    fi
54956
54957
54958    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
54959    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
54960    if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
54961        echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
54962    fi
54963
54964)"
54965at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
54966( $at_check_trace;
54967mkdir posix
54968(cd posix
54969TEST_TAR_FORMAT=posix
54970export TEST_TAR_FORMAT
54971TAR_OPTIONS="-H posix"
54972export TAR_OPTIONS
54973rm -rf *
54974
54975
54976  file=$(TMPDIR=. mktemp fiXXXXXX)
54977
54978  setfattr -n user.test -v test $file &> /dev/null
54979  if test "$?" != 0; then
54980    exit 77
54981  fi
54982
54983
54984  getfattr $file &> /dev/null
54985  if test "$?" != 0; then
54986    exit 77
54987  fi
54988
54989
54990
54991
54992  file=$(TMPDIR=. mktemp fiXXXXXX)
54993
54994  setfacl -m u:$UID:rwx $file &> /dev/null
54995  if test "$?" != 0; then
54996    exit 77
54997  fi
54998
54999
55000  getfacl $file &> /dev/null
55001  if test "$?" != 0; then
55002    exit 77
55003  fi
55004
55005  rm -rf $file
55006
55007  file=$(TMPDIR=. mktemp fiXXXXXX)
55008  setfacl -m u:$UID:rwx $file
55009  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
55010  if test "$err" != "0"; then
55011    exit 77
55012  fi
55013
55014
55015test -z "`sort < /dev/null 2>&1`" || exit 77
55016
55017
55018MYNAME=$( id -un )
55019MYGROUP=$( id -gn )
55020
55021# Prepare directory structure with default ACLs
55022mkdir -p pure/d1/d2
55023genfile --file pure/d1/f2a
55024genfile --file pure/d1/f2b
55025genfile --file pure/d1/d2/f3a
55026genfile --file pure/d1/d2/f3b
55027setfacl    -m g:$MYGROUP:r-x pure/d1
55028setfacl -d -m g:$MYGROUP:rwx pure/d1
55029setfacl -d -m u:$MYNAME:rwx  pure/d1
55030# "*a" files have "some" additional ACLs
55031setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
55032setfacl    -m u:$MYNAME:--- pure/d1/f2a
55033
55034# use default format (no acls stored)
55035tar -cf noacl.tar -C pure d1
55036
55037# use posix format, acls stored
55038tar --acls -cf acl.tar -C pure d1
55039
55040# Directory names are chosen based on "how the files were extracted from
55041# archive".  Equivalent no* tags are used also:
55042#   ^sacl_    — extracted archive has stored ACLs
55043#   _def_     — target directory (-C) has default ACLs
55044#   _optacl$  — extraction was done with --acls option
55045
55046mkdir sacl_def_optacl
55047mkdir sacl_def_optnoacl
55048mkdir sacl_nodef_optacl
55049mkdir sacl_nodef_optnoacl
55050mkdir nosacl_def_optacl
55051mkdir nosacl_def_optnoacl
55052mkdir nosacl_nodef_optacl
55053mkdir nosacl_nodef_optnoacl
55054
55055setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
55056setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
55057
55058tar -xf acl.tar -C sacl_nodef_optnoacl
55059tar --acls -xf acl.tar -C sacl_nodef_optacl
55060tar -xf acl.tar -C sacl_def_optnoacl
55061tar --acls -xf acl.tar -C sacl_def_optacl
55062tar -xf noacl.tar -C nosacl_def_optnoacl
55063# _NO_ ACLs in output
55064tar -xf noacl.tar -C nosacl_nodef_optnoacl
55065tar -xf noacl.tar -C nosacl_nodef_optacl
55066tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
55067# _NO_ ACLs in output (even when default ACLs exist)
55068tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
55069
55070
55071    cd pure
55072    pure="$(find d1 | sort | xargs -n 1 getfacl)"
55073    cd ..
55074
55075
55076
55077    cd sacl_def_optacl
55078    sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
55079    cd ..
55080
55081
55082    cd sacl_def_optnoacl
55083    sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
55084    cd ..
55085
55086
55087    cd sacl_nodef_optacl
55088    sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
55089    cd ..
55090
55091
55092    cd sacl_nodef_optnoacl
55093    sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
55094    cd ..
55095
55096
55097    cd nosacl_def_optacl
55098    nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
55099    cd ..
55100
55101
55102    cd nosacl_def_optnoacl
55103    nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
55104    cd ..
55105
55106
55107    cd nosacl_nodef_optacl
55108    nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
55109    cd ..
55110
55111
55112    cd nosacl_nodef_optnoacl
55113    nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
55114    cd ..
55115
55116
55117
55118    echo "$pure" > pure.log
55119    echo "$sacl_def_optacl" > sacl_def_optacl.log
55120    if test ! "$pure" "=" "$sacl_def_optacl"; then
55121        echo "bad 'pure' against 'sacl_def_optacl' output"
55122    fi
55123
55124
55125
55126    echo "$sacl_def_optacl" > sacl_def_optacl.log
55127    echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
55128    if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
55129        echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
55130    fi
55131
55132
55133    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
55134    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
55135    if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
55136        echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
55137    fi
55138
55139
55140    echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
55141    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
55142    if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
55143        echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
55144    fi
55145
55146
55147    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
55148    echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
55149    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
55150        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
55151    fi
55152
55153
55154    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
55155    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
55156    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
55157        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
55158    fi
55159
55160
55161
55162    echo "$sacl_def_optacl" > sacl_def_optacl.log
55163    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
55164    if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
55165        echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
55166    fi
55167
55168
55169    echo "$sacl_def_optacl" > sacl_def_optacl.log
55170    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
55171    if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
55172        echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
55173    fi
55174
55175
55176    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
55177    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
55178    if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
55179        echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
55180    fi
55181
55182)
55183) >>"$at_stdout" 2>>"$at_stderr" 5>&-
55184at_status=$? at_failed=false
55185$at_check_filter
55186at_fn_diff_devnull "$at_stderr" || at_failed=:
55187at_fn_diff_devnull "$at_stdout" || at_failed=:
55188at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
55189$at_failed && at_fn_log_failure
55190$at_traceon; }
55191
55192              { set +x
55193$as_echo "$at_srcdir/acls03.at:47:
55194mkdir gnu
55195(cd gnu
55196TEST_TAR_FORMAT=gnu
55197export TEST_TAR_FORMAT
55198TAR_OPTIONS=\"-H gnu\"
55199export TAR_OPTIONS
55200rm -rf *
55201
55202
55203  file=\$(TMPDIR=. mktemp fiXXXXXX)
55204
55205  setfattr -n user.test -v test \$file &> /dev/null
55206  if test \"\$?\" != 0; then
55207    exit 77
55208  fi
55209
55210
55211  getfattr \$file &> /dev/null
55212  if test \"\$?\" != 0; then
55213    exit 77
55214  fi
55215
55216
55217
55218
55219  file=\$(TMPDIR=. mktemp fiXXXXXX)
55220
55221  setfacl -m u:\$UID:rwx \$file &> /dev/null
55222  if test \"\$?\" != 0; then
55223    exit 77
55224  fi
55225
55226
55227  getfacl \$file &> /dev/null
55228  if test \"\$?\" != 0; then
55229    exit 77
55230  fi
55231
55232  rm -rf \$file
55233
55234  file=\$(TMPDIR=. mktemp fiXXXXXX)
55235  setfacl -m u:\$UID:rwx \$file
55236  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
55237  if test \"\$err\" != \"0\"; then
55238    exit 77
55239  fi
55240
55241
55242test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
55243
55244
55245MYNAME=\$( id -un )
55246MYGROUP=\$( id -gn )
55247
55248# Prepare directory structure with default ACLs
55249mkdir -p pure/d1/d2
55250genfile --file pure/d1/f2a
55251genfile --file pure/d1/f2b
55252genfile --file pure/d1/d2/f3a
55253genfile --file pure/d1/d2/f3b
55254setfacl    -m g:\$MYGROUP:r-x pure/d1
55255setfacl -d -m g:\$MYGROUP:rwx pure/d1
55256setfacl -d -m u:\$MYNAME:rwx  pure/d1
55257# \"*a\" files have \"some\" additional ACLs
55258setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
55259setfacl    -m u:\$MYNAME:--- pure/d1/f2a
55260
55261# use default format (no acls stored)
55262tar -cf noacl.tar -C pure d1
55263
55264# use posix format, acls stored
55265tar --acls -cf acl.tar -C pure d1
55266
55267# Directory names are chosen based on \"how the files were extracted from
55268# archive\".  Equivalent no* tags are used also:
55269#   ^sacl_    — extracted archive has stored ACLs
55270#   _def_     — target directory (-C) has default ACLs
55271#   _optacl\$  — extraction was done with --acls option
55272
55273mkdir sacl_def_optacl
55274mkdir sacl_def_optnoacl
55275mkdir sacl_nodef_optacl
55276mkdir sacl_nodef_optnoacl
55277mkdir nosacl_def_optacl
55278mkdir nosacl_def_optnoacl
55279mkdir nosacl_nodef_optacl
55280mkdir nosacl_nodef_optnoacl
55281
55282setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
55283setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
55284
55285tar -xf acl.tar -C sacl_nodef_optnoacl
55286tar --acls -xf acl.tar -C sacl_nodef_optacl
55287tar -xf acl.tar -C sacl_def_optnoacl
55288tar --acls -xf acl.tar -C sacl_def_optacl
55289tar -xf noacl.tar -C nosacl_def_optnoacl
55290# _NO_ ACLs in output
55291tar -xf noacl.tar -C nosacl_nodef_optnoacl
55292tar -xf noacl.tar -C nosacl_nodef_optacl
55293tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
55294# _NO_ ACLs in output (even when default ACLs exist)
55295tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
55296
55297
55298    cd pure
55299    pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55300    cd ..
55301
55302
55303
55304    cd sacl_def_optacl
55305    sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55306    cd ..
55307
55308
55309    cd sacl_def_optnoacl
55310    sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55311    cd ..
55312
55313
55314    cd sacl_nodef_optacl
55315    sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55316    cd ..
55317
55318
55319    cd sacl_nodef_optnoacl
55320    sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55321    cd ..
55322
55323
55324    cd nosacl_def_optacl
55325    nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55326    cd ..
55327
55328
55329    cd nosacl_def_optnoacl
55330    nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55331    cd ..
55332
55333
55334    cd nosacl_nodef_optacl
55335    nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55336    cd ..
55337
55338
55339    cd nosacl_nodef_optnoacl
55340    nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
55341    cd ..
55342
55343
55344
55345    echo \"\$pure\" > pure.log
55346    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
55347    if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
55348        echo \"bad 'pure' against 'sacl_def_optacl' output\"
55349    fi
55350
55351
55352
55353    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
55354    echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
55355    if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
55356        echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
55357    fi
55358
55359
55360    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
55361    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
55362    if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
55363        echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
55364    fi
55365
55366
55367    echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
55368    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
55369    if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
55370        echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
55371    fi
55372
55373
55374    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
55375    echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
55376    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
55377        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
55378    fi
55379
55380
55381    echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
55382    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
55383    if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
55384        echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
55385    fi
55386
55387
55388
55389    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
55390    echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
55391    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
55392        echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
55393    fi
55394
55395
55396    echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
55397    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
55398    if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
55399        echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
55400    fi
55401
55402
55403    echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
55404    echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
55405    if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
55406        echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
55407    fi
55408
55409)"
55410at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
55411( $at_check_trace;
55412mkdir gnu
55413(cd gnu
55414TEST_TAR_FORMAT=gnu
55415export TEST_TAR_FORMAT
55416TAR_OPTIONS="-H gnu"
55417export TAR_OPTIONS
55418rm -rf *
55419
55420
55421  file=$(TMPDIR=. mktemp fiXXXXXX)
55422
55423  setfattr -n user.test -v test $file &> /dev/null
55424  if test "$?" != 0; then
55425    exit 77
55426  fi
55427
55428
55429  getfattr $file &> /dev/null
55430  if test "$?" != 0; then
55431    exit 77
55432  fi
55433
55434
55435
55436
55437  file=$(TMPDIR=. mktemp fiXXXXXX)
55438
55439  setfacl -m u:$UID:rwx $file &> /dev/null
55440  if test "$?" != 0; then
55441    exit 77
55442  fi
55443
55444
55445  getfacl $file &> /dev/null
55446  if test "$?" != 0; then
55447    exit 77
55448  fi
55449
55450  rm -rf $file
55451
55452  file=$(TMPDIR=. mktemp fiXXXXXX)
55453  setfacl -m u:$UID:rwx $file
55454  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
55455  if test "$err" != "0"; then
55456    exit 77
55457  fi
55458
55459
55460test -z "`sort < /dev/null 2>&1`" || exit 77
55461
55462
55463MYNAME=$( id -un )
55464MYGROUP=$( id -gn )
55465
55466# Prepare directory structure with default ACLs
55467mkdir -p pure/d1/d2
55468genfile --file pure/d1/f2a
55469genfile --file pure/d1/f2b
55470genfile --file pure/d1/d2/f3a
55471genfile --file pure/d1/d2/f3b
55472setfacl    -m g:$MYGROUP:r-x pure/d1
55473setfacl -d -m g:$MYGROUP:rwx pure/d1
55474setfacl -d -m u:$MYNAME:rwx  pure/d1
55475# "*a" files have "some" additional ACLs
55476setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
55477setfacl    -m u:$MYNAME:--- pure/d1/f2a
55478
55479# use default format (no acls stored)
55480tar -cf noacl.tar -C pure d1
55481
55482# use posix format, acls stored
55483tar --acls -cf acl.tar -C pure d1
55484
55485# Directory names are chosen based on "how the files were extracted from
55486# archive".  Equivalent no* tags are used also:
55487#   ^sacl_    — extracted archive has stored ACLs
55488#   _def_     — target directory (-C) has default ACLs
55489#   _optacl$  — extraction was done with --acls option
55490
55491mkdir sacl_def_optacl
55492mkdir sacl_def_optnoacl
55493mkdir sacl_nodef_optacl
55494mkdir sacl_nodef_optnoacl
55495mkdir nosacl_def_optacl
55496mkdir nosacl_def_optnoacl
55497mkdir nosacl_nodef_optacl
55498mkdir nosacl_nodef_optnoacl
55499
55500setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
55501setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
55502
55503tar -xf acl.tar -C sacl_nodef_optnoacl
55504tar --acls -xf acl.tar -C sacl_nodef_optacl
55505tar -xf acl.tar -C sacl_def_optnoacl
55506tar --acls -xf acl.tar -C sacl_def_optacl
55507tar -xf noacl.tar -C nosacl_def_optnoacl
55508# _NO_ ACLs in output
55509tar -xf noacl.tar -C nosacl_nodef_optnoacl
55510tar -xf noacl.tar -C nosacl_nodef_optacl
55511tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
55512# _NO_ ACLs in output (even when default ACLs exist)
55513tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
55514
55515
55516    cd pure
55517    pure="$(find d1 | sort | xargs -n 1 getfacl)"
55518    cd ..
55519
55520
55521
55522    cd sacl_def_optacl
55523    sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
55524    cd ..
55525
55526
55527    cd sacl_def_optnoacl
55528    sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
55529    cd ..
55530
55531
55532    cd sacl_nodef_optacl
55533    sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
55534    cd ..
55535
55536
55537    cd sacl_nodef_optnoacl
55538    sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
55539    cd ..
55540
55541
55542    cd nosacl_def_optacl
55543    nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
55544    cd ..
55545
55546
55547    cd nosacl_def_optnoacl
55548    nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
55549    cd ..
55550
55551
55552    cd nosacl_nodef_optacl
55553    nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
55554    cd ..
55555
55556
55557    cd nosacl_nodef_optnoacl
55558    nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
55559    cd ..
55560
55561
55562
55563    echo "$pure" > pure.log
55564    echo "$sacl_def_optacl" > sacl_def_optacl.log
55565    if test ! "$pure" "=" "$sacl_def_optacl"; then
55566        echo "bad 'pure' against 'sacl_def_optacl' output"
55567    fi
55568
55569
55570
55571    echo "$sacl_def_optacl" > sacl_def_optacl.log
55572    echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
55573    if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
55574        echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
55575    fi
55576
55577
55578    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
55579    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
55580    if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
55581        echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
55582    fi
55583
55584
55585    echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
55586    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
55587    if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
55588        echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
55589    fi
55590
55591
55592    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
55593    echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
55594    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
55595        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
55596    fi
55597
55598
55599    echo "$nosacl_def_optacl" > nosacl_def_optacl.log
55600    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
55601    if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
55602        echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
55603    fi
55604
55605
55606
55607    echo "$sacl_def_optacl" > sacl_def_optacl.log
55608    echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
55609    if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
55610        echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
55611    fi
55612
55613
55614    echo "$sacl_def_optacl" > sacl_def_optacl.log
55615    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
55616    if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
55617        echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
55618    fi
55619
55620
55621    echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
55622    echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
55623    if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
55624        echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
55625    fi
55626
55627)
55628) >>"$at_stdout" 2>>"$at_stderr" 5>&-
55629at_status=$? at_failed=false
55630$at_check_filter
55631at_fn_diff_devnull "$at_stderr" || at_failed=:
55632at_fn_diff_devnull "$at_stdout" || at_failed=:
55633at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
55634$at_failed && at_fn_log_failure
55635$at_traceon; }
55636
55637
55638
55639
55640  set +x
55641  $at_times_p && times >"$at_times_file"
55642) 5>&1 2>&1 7>&- | eval $at_tee_pipe
55643read at_status <"$at_status_file"
55644#AT_STOP_224
55645#AT_START_225
55646at_fn_group_banner 225 'selnx01.at:25' \
55647  "selinux: basic store/restore" "                   " 31
55648at_xfail=no
55649      test -f $XFAILFILE && at_xfail=yes
55650(
55651  $as_echo "225. $at_setup_line: testing $at_desc ..."
55652  $at_traceon
55653
55654
55655
55656
55657
55658  { set +x
55659$as_echo "$at_srcdir/selnx01.at:28:
55660mkdir v7
55661(cd v7
55662TEST_TAR_FORMAT=v7
55663export TEST_TAR_FORMAT
55664TAR_OPTIONS=\"-H v7\"
55665export TAR_OPTIONS
55666rm -rf *
55667
55668
55669  file=\$(TMPDIR=. mktemp fiXXXXXX)
55670
55671  setfattr -n user.test -v test \$file &> /dev/null
55672  if test \"\$?\" != 0; then
55673    exit 77
55674  fi
55675
55676
55677  getfattr \$file &> /dev/null
55678  if test \"\$?\" != 0; then
55679    exit 77
55680  fi
55681
55682
55683
55684
55685  file=\$(TMPDIR=. mktemp fiXXXXXX)
55686
55687  restorecon \$file &> /dev/null
55688  if test \"\$?\" != 0; then
55689    exit 77
55690  fi
55691
55692
55693  chcon -h --user=unconfined_u \$file &> /dev/null
55694  if test \"\$?\" != 0; then
55695    exit 77
55696  fi
55697
55698  rm -rf \$file
55699
55700  file=\$(TMPDIR=. mktemp fiXXXXXX)
55701  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
55702  if test \"\$err\" != \"0\"; then
55703    exit 77
55704  fi
55705
55706
55707mkdir dir
55708genfile --file dir/file
55709ln -s file dir/link
55710
55711getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
55712
55713restorecon -R dir
55714chcon -h --user=system_u     dir
55715chcon -h --user=unconfined_u dir/file
55716chcon -h --user=system_u     dir/link
55717
55718# archive whole directory including selinux contexts
55719tar --selinux -cf archive.tar dir
55720
55721# clear the directory
55722rm -rf dir
55723
55724# ================================================
55725# check if selinux contexts are correctly restored
55726
55727tar --selinux -xf archive.tar
55728
55729# archive for later debugging
55730cp archive.tar archive_origin.tar
55731
55732# check if selinux contexts were restored
55733getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
55734    grep -v -e '^#' -e ^\$ | cut -d: -f1
55735
55736# ===========================================================================
55737# check if selinux contexts are not restored when --selinux option is missing
55738
55739getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
55740rm -rf dir
55741tar -xf archive.tar
55742getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
55743
55744diff with_selinux without_selinux > diff_with_without
55745if test \"\$?\" -eq \"0\"; then
55746    echo \"selinux contexts probably restored while --selinux is off\"
55747fi
55748
55749# =================================================================
55750# check if selinux is not archived when --selinux option is missing
55751
55752tar -cf archive.tar dir
55753
55754# clear the directory
55755rm -rf dir
55756
55757# restore (with --selinux)
55758tar --selinux -xf archive.tar dir
55759
55760getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
55761diff start final > final_diff
55762if test \"\$?\" -ne \"0\"; then
55763    echo \"bad result\"
55764fi
55765
55766)"
55767at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
55768( $at_check_trace;
55769mkdir v7
55770(cd v7
55771TEST_TAR_FORMAT=v7
55772export TEST_TAR_FORMAT
55773TAR_OPTIONS="-H v7"
55774export TAR_OPTIONS
55775rm -rf *
55776
55777
55778  file=$(TMPDIR=. mktemp fiXXXXXX)
55779
55780  setfattr -n user.test -v test $file &> /dev/null
55781  if test "$?" != 0; then
55782    exit 77
55783  fi
55784
55785
55786  getfattr $file &> /dev/null
55787  if test "$?" != 0; then
55788    exit 77
55789  fi
55790
55791
55792
55793
55794  file=$(TMPDIR=. mktemp fiXXXXXX)
55795
55796  restorecon $file &> /dev/null
55797  if test "$?" != 0; then
55798    exit 77
55799  fi
55800
55801
55802  chcon -h --user=unconfined_u $file &> /dev/null
55803  if test "$?" != 0; then
55804    exit 77
55805  fi
55806
55807  rm -rf $file
55808
55809  file=$(TMPDIR=. mktemp fiXXXXXX)
55810  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
55811  if test "$err" != "0"; then
55812    exit 77
55813  fi
55814
55815
55816mkdir dir
55817genfile --file dir/file
55818ln -s file dir/link
55819
55820getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
55821
55822restorecon -R dir
55823chcon -h --user=system_u     dir
55824chcon -h --user=unconfined_u dir/file
55825chcon -h --user=system_u     dir/link
55826
55827# archive whole directory including selinux contexts
55828tar --selinux -cf archive.tar dir
55829
55830# clear the directory
55831rm -rf dir
55832
55833# ================================================
55834# check if selinux contexts are correctly restored
55835
55836tar --selinux -xf archive.tar
55837
55838# archive for later debugging
55839cp archive.tar archive_origin.tar
55840
55841# check if selinux contexts were restored
55842getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
55843    grep -v -e '^#' -e ^$ | cut -d: -f1
55844
55845# ===========================================================================
55846# check if selinux contexts are not restored when --selinux option is missing
55847
55848getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
55849rm -rf dir
55850tar -xf archive.tar
55851getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
55852
55853diff with_selinux without_selinux > diff_with_without
55854if test "$?" -eq "0"; then
55855    echo "selinux contexts probably restored while --selinux is off"
55856fi
55857
55858# =================================================================
55859# check if selinux is not archived when --selinux option is missing
55860
55861tar -cf archive.tar dir
55862
55863# clear the directory
55864rm -rf dir
55865
55866# restore (with --selinux)
55867tar --selinux -xf archive.tar dir
55868
55869getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
55870diff start final > final_diff
55871if test "$?" -ne "0"; then
55872    echo "bad result"
55873fi
55874
55875)
55876) >>"$at_stdout" 2>>"$at_stderr" 5>&-
55877at_status=$? at_failed=false
55878$at_check_filter
55879at_fn_diff_devnull "$at_stderr" || at_failed=:
55880echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
55881security.selinux=\"unconfined_u
55882security.selinux=\"system_u
55883" | \
55884  $at_diff - "$at_stdout" || at_failed=:
55885at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
55886$at_failed && at_fn_log_failure
55887$at_traceon; }
55888
55889              { set +x
55890$as_echo "$at_srcdir/selnx01.at:28:
55891mkdir oldgnu
55892(cd oldgnu
55893TEST_TAR_FORMAT=oldgnu
55894export TEST_TAR_FORMAT
55895TAR_OPTIONS=\"-H oldgnu\"
55896export TAR_OPTIONS
55897rm -rf *
55898
55899
55900  file=\$(TMPDIR=. mktemp fiXXXXXX)
55901
55902  setfattr -n user.test -v test \$file &> /dev/null
55903  if test \"\$?\" != 0; then
55904    exit 77
55905  fi
55906
55907
55908  getfattr \$file &> /dev/null
55909  if test \"\$?\" != 0; then
55910    exit 77
55911  fi
55912
55913
55914
55915
55916  file=\$(TMPDIR=. mktemp fiXXXXXX)
55917
55918  restorecon \$file &> /dev/null
55919  if test \"\$?\" != 0; then
55920    exit 77
55921  fi
55922
55923
55924  chcon -h --user=unconfined_u \$file &> /dev/null
55925  if test \"\$?\" != 0; then
55926    exit 77
55927  fi
55928
55929  rm -rf \$file
55930
55931  file=\$(TMPDIR=. mktemp fiXXXXXX)
55932  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
55933  if test \"\$err\" != \"0\"; then
55934    exit 77
55935  fi
55936
55937
55938mkdir dir
55939genfile --file dir/file
55940ln -s file dir/link
55941
55942getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
55943
55944restorecon -R dir
55945chcon -h --user=system_u     dir
55946chcon -h --user=unconfined_u dir/file
55947chcon -h --user=system_u     dir/link
55948
55949# archive whole directory including selinux contexts
55950tar --selinux -cf archive.tar dir
55951
55952# clear the directory
55953rm -rf dir
55954
55955# ================================================
55956# check if selinux contexts are correctly restored
55957
55958tar --selinux -xf archive.tar
55959
55960# archive for later debugging
55961cp archive.tar archive_origin.tar
55962
55963# check if selinux contexts were restored
55964getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
55965    grep -v -e '^#' -e ^\$ | cut -d: -f1
55966
55967# ===========================================================================
55968# check if selinux contexts are not restored when --selinux option is missing
55969
55970getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
55971rm -rf dir
55972tar -xf archive.tar
55973getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
55974
55975diff with_selinux without_selinux > diff_with_without
55976if test \"\$?\" -eq \"0\"; then
55977    echo \"selinux contexts probably restored while --selinux is off\"
55978fi
55979
55980# =================================================================
55981# check if selinux is not archived when --selinux option is missing
55982
55983tar -cf archive.tar dir
55984
55985# clear the directory
55986rm -rf dir
55987
55988# restore (with --selinux)
55989tar --selinux -xf archive.tar dir
55990
55991getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
55992diff start final > final_diff
55993if test \"\$?\" -ne \"0\"; then
55994    echo \"bad result\"
55995fi
55996
55997)"
55998at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
55999( $at_check_trace;
56000mkdir oldgnu
56001(cd oldgnu
56002TEST_TAR_FORMAT=oldgnu
56003export TEST_TAR_FORMAT
56004TAR_OPTIONS="-H oldgnu"
56005export TAR_OPTIONS
56006rm -rf *
56007
56008
56009  file=$(TMPDIR=. mktemp fiXXXXXX)
56010
56011  setfattr -n user.test -v test $file &> /dev/null
56012  if test "$?" != 0; then
56013    exit 77
56014  fi
56015
56016
56017  getfattr $file &> /dev/null
56018  if test "$?" != 0; then
56019    exit 77
56020  fi
56021
56022
56023
56024
56025  file=$(TMPDIR=. mktemp fiXXXXXX)
56026
56027  restorecon $file &> /dev/null
56028  if test "$?" != 0; then
56029    exit 77
56030  fi
56031
56032
56033  chcon -h --user=unconfined_u $file &> /dev/null
56034  if test "$?" != 0; then
56035    exit 77
56036  fi
56037
56038  rm -rf $file
56039
56040  file=$(TMPDIR=. mktemp fiXXXXXX)
56041  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
56042  if test "$err" != "0"; then
56043    exit 77
56044  fi
56045
56046
56047mkdir dir
56048genfile --file dir/file
56049ln -s file dir/link
56050
56051getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
56052
56053restorecon -R dir
56054chcon -h --user=system_u     dir
56055chcon -h --user=unconfined_u dir/file
56056chcon -h --user=system_u     dir/link
56057
56058# archive whole directory including selinux contexts
56059tar --selinux -cf archive.tar dir
56060
56061# clear the directory
56062rm -rf dir
56063
56064# ================================================
56065# check if selinux contexts are correctly restored
56066
56067tar --selinux -xf archive.tar
56068
56069# archive for later debugging
56070cp archive.tar archive_origin.tar
56071
56072# check if selinux contexts were restored
56073getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
56074    grep -v -e '^#' -e ^$ | cut -d: -f1
56075
56076# ===========================================================================
56077# check if selinux contexts are not restored when --selinux option is missing
56078
56079getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
56080rm -rf dir
56081tar -xf archive.tar
56082getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
56083
56084diff with_selinux without_selinux > diff_with_without
56085if test "$?" -eq "0"; then
56086    echo "selinux contexts probably restored while --selinux is off"
56087fi
56088
56089# =================================================================
56090# check if selinux is not archived when --selinux option is missing
56091
56092tar -cf archive.tar dir
56093
56094# clear the directory
56095rm -rf dir
56096
56097# restore (with --selinux)
56098tar --selinux -xf archive.tar dir
56099
56100getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
56101diff start final > final_diff
56102if test "$?" -ne "0"; then
56103    echo "bad result"
56104fi
56105
56106)
56107) >>"$at_stdout" 2>>"$at_stderr" 5>&-
56108at_status=$? at_failed=false
56109$at_check_filter
56110at_fn_diff_devnull "$at_stderr" || at_failed=:
56111echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
56112security.selinux=\"unconfined_u
56113security.selinux=\"system_u
56114" | \
56115  $at_diff - "$at_stdout" || at_failed=:
56116at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
56117$at_failed && at_fn_log_failure
56118$at_traceon; }
56119
56120              { set +x
56121$as_echo "$at_srcdir/selnx01.at:28:
56122mkdir ustar
56123(cd ustar
56124TEST_TAR_FORMAT=ustar
56125export TEST_TAR_FORMAT
56126TAR_OPTIONS=\"-H ustar\"
56127export TAR_OPTIONS
56128rm -rf *
56129
56130
56131  file=\$(TMPDIR=. mktemp fiXXXXXX)
56132
56133  setfattr -n user.test -v test \$file &> /dev/null
56134  if test \"\$?\" != 0; then
56135    exit 77
56136  fi
56137
56138
56139  getfattr \$file &> /dev/null
56140  if test \"\$?\" != 0; then
56141    exit 77
56142  fi
56143
56144
56145
56146
56147  file=\$(TMPDIR=. mktemp fiXXXXXX)
56148
56149  restorecon \$file &> /dev/null
56150  if test \"\$?\" != 0; then
56151    exit 77
56152  fi
56153
56154
56155  chcon -h --user=unconfined_u \$file &> /dev/null
56156  if test \"\$?\" != 0; then
56157    exit 77
56158  fi
56159
56160  rm -rf \$file
56161
56162  file=\$(TMPDIR=. mktemp fiXXXXXX)
56163  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
56164  if test \"\$err\" != \"0\"; then
56165    exit 77
56166  fi
56167
56168
56169mkdir dir
56170genfile --file dir/file
56171ln -s file dir/link
56172
56173getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
56174
56175restorecon -R dir
56176chcon -h --user=system_u     dir
56177chcon -h --user=unconfined_u dir/file
56178chcon -h --user=system_u     dir/link
56179
56180# archive whole directory including selinux contexts
56181tar --selinux -cf archive.tar dir
56182
56183# clear the directory
56184rm -rf dir
56185
56186# ================================================
56187# check if selinux contexts are correctly restored
56188
56189tar --selinux -xf archive.tar
56190
56191# archive for later debugging
56192cp archive.tar archive_origin.tar
56193
56194# check if selinux contexts were restored
56195getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
56196    grep -v -e '^#' -e ^\$ | cut -d: -f1
56197
56198# ===========================================================================
56199# check if selinux contexts are not restored when --selinux option is missing
56200
56201getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
56202rm -rf dir
56203tar -xf archive.tar
56204getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
56205
56206diff with_selinux without_selinux > diff_with_without
56207if test \"\$?\" -eq \"0\"; then
56208    echo \"selinux contexts probably restored while --selinux is off\"
56209fi
56210
56211# =================================================================
56212# check if selinux is not archived when --selinux option is missing
56213
56214tar -cf archive.tar dir
56215
56216# clear the directory
56217rm -rf dir
56218
56219# restore (with --selinux)
56220tar --selinux -xf archive.tar dir
56221
56222getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
56223diff start final > final_diff
56224if test \"\$?\" -ne \"0\"; then
56225    echo \"bad result\"
56226fi
56227
56228)"
56229at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
56230( $at_check_trace;
56231mkdir ustar
56232(cd ustar
56233TEST_TAR_FORMAT=ustar
56234export TEST_TAR_FORMAT
56235TAR_OPTIONS="-H ustar"
56236export TAR_OPTIONS
56237rm -rf *
56238
56239
56240  file=$(TMPDIR=. mktemp fiXXXXXX)
56241
56242  setfattr -n user.test -v test $file &> /dev/null
56243  if test "$?" != 0; then
56244    exit 77
56245  fi
56246
56247
56248  getfattr $file &> /dev/null
56249  if test "$?" != 0; then
56250    exit 77
56251  fi
56252
56253
56254
56255
56256  file=$(TMPDIR=. mktemp fiXXXXXX)
56257
56258  restorecon $file &> /dev/null
56259  if test "$?" != 0; then
56260    exit 77
56261  fi
56262
56263
56264  chcon -h --user=unconfined_u $file &> /dev/null
56265  if test "$?" != 0; then
56266    exit 77
56267  fi
56268
56269  rm -rf $file
56270
56271  file=$(TMPDIR=. mktemp fiXXXXXX)
56272  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
56273  if test "$err" != "0"; then
56274    exit 77
56275  fi
56276
56277
56278mkdir dir
56279genfile --file dir/file
56280ln -s file dir/link
56281
56282getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
56283
56284restorecon -R dir
56285chcon -h --user=system_u     dir
56286chcon -h --user=unconfined_u dir/file
56287chcon -h --user=system_u     dir/link
56288
56289# archive whole directory including selinux contexts
56290tar --selinux -cf archive.tar dir
56291
56292# clear the directory
56293rm -rf dir
56294
56295# ================================================
56296# check if selinux contexts are correctly restored
56297
56298tar --selinux -xf archive.tar
56299
56300# archive for later debugging
56301cp archive.tar archive_origin.tar
56302
56303# check if selinux contexts were restored
56304getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
56305    grep -v -e '^#' -e ^$ | cut -d: -f1
56306
56307# ===========================================================================
56308# check if selinux contexts are not restored when --selinux option is missing
56309
56310getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
56311rm -rf dir
56312tar -xf archive.tar
56313getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
56314
56315diff with_selinux without_selinux > diff_with_without
56316if test "$?" -eq "0"; then
56317    echo "selinux contexts probably restored while --selinux is off"
56318fi
56319
56320# =================================================================
56321# check if selinux is not archived when --selinux option is missing
56322
56323tar -cf archive.tar dir
56324
56325# clear the directory
56326rm -rf dir
56327
56328# restore (with --selinux)
56329tar --selinux -xf archive.tar dir
56330
56331getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
56332diff start final > final_diff
56333if test "$?" -ne "0"; then
56334    echo "bad result"
56335fi
56336
56337)
56338) >>"$at_stdout" 2>>"$at_stderr" 5>&-
56339at_status=$? at_failed=false
56340$at_check_filter
56341at_fn_diff_devnull "$at_stderr" || at_failed=:
56342echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
56343security.selinux=\"unconfined_u
56344security.selinux=\"system_u
56345" | \
56346  $at_diff - "$at_stdout" || at_failed=:
56347at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
56348$at_failed && at_fn_log_failure
56349$at_traceon; }
56350
56351              { set +x
56352$as_echo "$at_srcdir/selnx01.at:28:
56353mkdir posix
56354(cd posix
56355TEST_TAR_FORMAT=posix
56356export TEST_TAR_FORMAT
56357TAR_OPTIONS=\"-H posix\"
56358export TAR_OPTIONS
56359rm -rf *
56360
56361
56362  file=\$(TMPDIR=. mktemp fiXXXXXX)
56363
56364  setfattr -n user.test -v test \$file &> /dev/null
56365  if test \"\$?\" != 0; then
56366    exit 77
56367  fi
56368
56369
56370  getfattr \$file &> /dev/null
56371  if test \"\$?\" != 0; then
56372    exit 77
56373  fi
56374
56375
56376
56377
56378  file=\$(TMPDIR=. mktemp fiXXXXXX)
56379
56380  restorecon \$file &> /dev/null
56381  if test \"\$?\" != 0; then
56382    exit 77
56383  fi
56384
56385
56386  chcon -h --user=unconfined_u \$file &> /dev/null
56387  if test \"\$?\" != 0; then
56388    exit 77
56389  fi
56390
56391  rm -rf \$file
56392
56393  file=\$(TMPDIR=. mktemp fiXXXXXX)
56394  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
56395  if test \"\$err\" != \"0\"; then
56396    exit 77
56397  fi
56398
56399
56400mkdir dir
56401genfile --file dir/file
56402ln -s file dir/link
56403
56404getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
56405
56406restorecon -R dir
56407chcon -h --user=system_u     dir
56408chcon -h --user=unconfined_u dir/file
56409chcon -h --user=system_u     dir/link
56410
56411# archive whole directory including selinux contexts
56412tar --selinux -cf archive.tar dir
56413
56414# clear the directory
56415rm -rf dir
56416
56417# ================================================
56418# check if selinux contexts are correctly restored
56419
56420tar --selinux -xf archive.tar
56421
56422# archive for later debugging
56423cp archive.tar archive_origin.tar
56424
56425# check if selinux contexts were restored
56426getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
56427    grep -v -e '^#' -e ^\$ | cut -d: -f1
56428
56429# ===========================================================================
56430# check if selinux contexts are not restored when --selinux option is missing
56431
56432getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
56433rm -rf dir
56434tar -xf archive.tar
56435getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
56436
56437diff with_selinux without_selinux > diff_with_without
56438if test \"\$?\" -eq \"0\"; then
56439    echo \"selinux contexts probably restored while --selinux is off\"
56440fi
56441
56442# =================================================================
56443# check if selinux is not archived when --selinux option is missing
56444
56445tar -cf archive.tar dir
56446
56447# clear the directory
56448rm -rf dir
56449
56450# restore (with --selinux)
56451tar --selinux -xf archive.tar dir
56452
56453getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
56454diff start final > final_diff
56455if test \"\$?\" -ne \"0\"; then
56456    echo \"bad result\"
56457fi
56458
56459)"
56460at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
56461( $at_check_trace;
56462mkdir posix
56463(cd posix
56464TEST_TAR_FORMAT=posix
56465export TEST_TAR_FORMAT
56466TAR_OPTIONS="-H posix"
56467export TAR_OPTIONS
56468rm -rf *
56469
56470
56471  file=$(TMPDIR=. mktemp fiXXXXXX)
56472
56473  setfattr -n user.test -v test $file &> /dev/null
56474  if test "$?" != 0; then
56475    exit 77
56476  fi
56477
56478
56479  getfattr $file &> /dev/null
56480  if test "$?" != 0; then
56481    exit 77
56482  fi
56483
56484
56485
56486
56487  file=$(TMPDIR=. mktemp fiXXXXXX)
56488
56489  restorecon $file &> /dev/null
56490  if test "$?" != 0; then
56491    exit 77
56492  fi
56493
56494
56495  chcon -h --user=unconfined_u $file &> /dev/null
56496  if test "$?" != 0; then
56497    exit 77
56498  fi
56499
56500  rm -rf $file
56501
56502  file=$(TMPDIR=. mktemp fiXXXXXX)
56503  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
56504  if test "$err" != "0"; then
56505    exit 77
56506  fi
56507
56508
56509mkdir dir
56510genfile --file dir/file
56511ln -s file dir/link
56512
56513getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
56514
56515restorecon -R dir
56516chcon -h --user=system_u     dir
56517chcon -h --user=unconfined_u dir/file
56518chcon -h --user=system_u     dir/link
56519
56520# archive whole directory including selinux contexts
56521tar --selinux -cf archive.tar dir
56522
56523# clear the directory
56524rm -rf dir
56525
56526# ================================================
56527# check if selinux contexts are correctly restored
56528
56529tar --selinux -xf archive.tar
56530
56531# archive for later debugging
56532cp archive.tar archive_origin.tar
56533
56534# check if selinux contexts were restored
56535getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
56536    grep -v -e '^#' -e ^$ | cut -d: -f1
56537
56538# ===========================================================================
56539# check if selinux contexts are not restored when --selinux option is missing
56540
56541getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
56542rm -rf dir
56543tar -xf archive.tar
56544getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
56545
56546diff with_selinux without_selinux > diff_with_without
56547if test "$?" -eq "0"; then
56548    echo "selinux contexts probably restored while --selinux is off"
56549fi
56550
56551# =================================================================
56552# check if selinux is not archived when --selinux option is missing
56553
56554tar -cf archive.tar dir
56555
56556# clear the directory
56557rm -rf dir
56558
56559# restore (with --selinux)
56560tar --selinux -xf archive.tar dir
56561
56562getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
56563diff start final > final_diff
56564if test "$?" -ne "0"; then
56565    echo "bad result"
56566fi
56567
56568)
56569) >>"$at_stdout" 2>>"$at_stderr" 5>&-
56570at_status=$? at_failed=false
56571$at_check_filter
56572at_fn_diff_devnull "$at_stderr" || at_failed=:
56573echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
56574security.selinux=\"unconfined_u
56575security.selinux=\"system_u
56576" | \
56577  $at_diff - "$at_stdout" || at_failed=:
56578at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
56579$at_failed && at_fn_log_failure
56580$at_traceon; }
56581
56582              { set +x
56583$as_echo "$at_srcdir/selnx01.at:28:
56584mkdir gnu
56585(cd gnu
56586TEST_TAR_FORMAT=gnu
56587export TEST_TAR_FORMAT
56588TAR_OPTIONS=\"-H gnu\"
56589export TAR_OPTIONS
56590rm -rf *
56591
56592
56593  file=\$(TMPDIR=. mktemp fiXXXXXX)
56594
56595  setfattr -n user.test -v test \$file &> /dev/null
56596  if test \"\$?\" != 0; then
56597    exit 77
56598  fi
56599
56600
56601  getfattr \$file &> /dev/null
56602  if test \"\$?\" != 0; then
56603    exit 77
56604  fi
56605
56606
56607
56608
56609  file=\$(TMPDIR=. mktemp fiXXXXXX)
56610
56611  restorecon \$file &> /dev/null
56612  if test \"\$?\" != 0; then
56613    exit 77
56614  fi
56615
56616
56617  chcon -h --user=unconfined_u \$file &> /dev/null
56618  if test \"\$?\" != 0; then
56619    exit 77
56620  fi
56621
56622  rm -rf \$file
56623
56624  file=\$(TMPDIR=. mktemp fiXXXXXX)
56625  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
56626  if test \"\$err\" != \"0\"; then
56627    exit 77
56628  fi
56629
56630
56631mkdir dir
56632genfile --file dir/file
56633ln -s file dir/link
56634
56635getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
56636
56637restorecon -R dir
56638chcon -h --user=system_u     dir
56639chcon -h --user=unconfined_u dir/file
56640chcon -h --user=system_u     dir/link
56641
56642# archive whole directory including selinux contexts
56643tar --selinux -cf archive.tar dir
56644
56645# clear the directory
56646rm -rf dir
56647
56648# ================================================
56649# check if selinux contexts are correctly restored
56650
56651tar --selinux -xf archive.tar
56652
56653# archive for later debugging
56654cp archive.tar archive_origin.tar
56655
56656# check if selinux contexts were restored
56657getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
56658    grep -v -e '^#' -e ^\$ | cut -d: -f1
56659
56660# ===========================================================================
56661# check if selinux contexts are not restored when --selinux option is missing
56662
56663getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
56664rm -rf dir
56665tar -xf archive.tar
56666getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
56667
56668diff with_selinux without_selinux > diff_with_without
56669if test \"\$?\" -eq \"0\"; then
56670    echo \"selinux contexts probably restored while --selinux is off\"
56671fi
56672
56673# =================================================================
56674# check if selinux is not archived when --selinux option is missing
56675
56676tar -cf archive.tar dir
56677
56678# clear the directory
56679rm -rf dir
56680
56681# restore (with --selinux)
56682tar --selinux -xf archive.tar dir
56683
56684getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
56685diff start final > final_diff
56686if test \"\$?\" -ne \"0\"; then
56687    echo \"bad result\"
56688fi
56689
56690)"
56691at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
56692( $at_check_trace;
56693mkdir gnu
56694(cd gnu
56695TEST_TAR_FORMAT=gnu
56696export TEST_TAR_FORMAT
56697TAR_OPTIONS="-H gnu"
56698export TAR_OPTIONS
56699rm -rf *
56700
56701
56702  file=$(TMPDIR=. mktemp fiXXXXXX)
56703
56704  setfattr -n user.test -v test $file &> /dev/null
56705  if test "$?" != 0; then
56706    exit 77
56707  fi
56708
56709
56710  getfattr $file &> /dev/null
56711  if test "$?" != 0; then
56712    exit 77
56713  fi
56714
56715
56716
56717
56718  file=$(TMPDIR=. mktemp fiXXXXXX)
56719
56720  restorecon $file &> /dev/null
56721  if test "$?" != 0; then
56722    exit 77
56723  fi
56724
56725
56726  chcon -h --user=unconfined_u $file &> /dev/null
56727  if test "$?" != 0; then
56728    exit 77
56729  fi
56730
56731  rm -rf $file
56732
56733  file=$(TMPDIR=. mktemp fiXXXXXX)
56734  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
56735  if test "$err" != "0"; then
56736    exit 77
56737  fi
56738
56739
56740mkdir dir
56741genfile --file dir/file
56742ln -s file dir/link
56743
56744getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
56745
56746restorecon -R dir
56747chcon -h --user=system_u     dir
56748chcon -h --user=unconfined_u dir/file
56749chcon -h --user=system_u     dir/link
56750
56751# archive whole directory including selinux contexts
56752tar --selinux -cf archive.tar dir
56753
56754# clear the directory
56755rm -rf dir
56756
56757# ================================================
56758# check if selinux contexts are correctly restored
56759
56760tar --selinux -xf archive.tar
56761
56762# archive for later debugging
56763cp archive.tar archive_origin.tar
56764
56765# check if selinux contexts were restored
56766getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
56767    grep -v -e '^#' -e ^$ | cut -d: -f1
56768
56769# ===========================================================================
56770# check if selinux contexts are not restored when --selinux option is missing
56771
56772getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
56773rm -rf dir
56774tar -xf archive.tar
56775getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
56776
56777diff with_selinux without_selinux > diff_with_without
56778if test "$?" -eq "0"; then
56779    echo "selinux contexts probably restored while --selinux is off"
56780fi
56781
56782# =================================================================
56783# check if selinux is not archived when --selinux option is missing
56784
56785tar -cf archive.tar dir
56786
56787# clear the directory
56788rm -rf dir
56789
56790# restore (with --selinux)
56791tar --selinux -xf archive.tar dir
56792
56793getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
56794diff start final > final_diff
56795if test "$?" -ne "0"; then
56796    echo "bad result"
56797fi
56798
56799)
56800) >>"$at_stdout" 2>>"$at_stderr" 5>&-
56801at_status=$? at_failed=false
56802$at_check_filter
56803at_fn_diff_devnull "$at_stderr" || at_failed=:
56804echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
56805security.selinux=\"unconfined_u
56806security.selinux=\"system_u
56807" | \
56808  $at_diff - "$at_stdout" || at_failed=:
56809at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
56810$at_failed && at_fn_log_failure
56811$at_traceon; }
56812
56813
56814
56815
56816  set +x
56817  $at_times_p && times >"$at_times_file"
56818) 5>&1 2>&1 7>&- | eval $at_tee_pipe
56819read at_status <"$at_status_file"
56820#AT_STOP_225
56821#AT_START_226
56822at_fn_group_banner 226 'selacl01.at:25' \
56823  "acls/selinux: special files & fifos" "            " 31
56824at_xfail=no
56825      test -f $XFAILFILE && at_xfail=yes
56826(
56827  $as_echo "226. $at_setup_line: testing $at_desc ..."
56828  $at_traceon
56829
56830
56831
56832
56833
56834  { set +x
56835$as_echo "$at_srcdir/selacl01.at:28:
56836mkdir v7
56837(cd v7
56838TEST_TAR_FORMAT=v7
56839export TEST_TAR_FORMAT
56840TAR_OPTIONS=\"-H v7\"
56841export TAR_OPTIONS
56842rm -rf *
56843
56844
56845echo \"test\" > \$\$
56846chmod 0 \$\$
56847cat \$\$ > /dev/null 2>&1
56848result=\$?
56849rm -f \$\$
56850test \$result -eq 0 || exit 77
56851
56852
56853  file=\$(TMPDIR=. mktemp fiXXXXXX)
56854
56855  setfattr -n user.test -v test \$file &> /dev/null
56856  if test \"\$?\" != 0; then
56857    exit 77
56858  fi
56859
56860
56861  getfattr \$file &> /dev/null
56862  if test \"\$?\" != 0; then
56863    exit 77
56864  fi
56865
56866
56867
56868
56869  file=\$(TMPDIR=. mktemp fiXXXXXX)
56870
56871  restorecon \$file &> /dev/null
56872  if test \"\$?\" != 0; then
56873    exit 77
56874  fi
56875
56876
56877  chcon -h --user=unconfined_u \$file &> /dev/null
56878  if test \"\$?\" != 0; then
56879    exit 77
56880  fi
56881
56882  rm -rf \$file
56883
56884  file=\$(TMPDIR=. mktemp fiXXXXXX)
56885  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
56886  if test \"\$err\" != \"0\"; then
56887    exit 77
56888  fi
56889
56890
56891
56892  file=\$(TMPDIR=. mktemp fiXXXXXX)
56893
56894  setfacl -m u:\$UID:rwx \$file &> /dev/null
56895  if test \"\$?\" != 0; then
56896    exit 77
56897  fi
56898
56899
56900  getfacl \$file &> /dev/null
56901  if test \"\$?\" != 0; then
56902    exit 77
56903  fi
56904
56905  rm -rf \$file
56906
56907  file=\$(TMPDIR=. mktemp fiXXXXXX)
56908  setfacl -m u:\$UID:rwx \$file
56909  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
56910  if test \"\$err\" != \"0\"; then
56911    exit 77
56912  fi
56913
56914
56915mkdir dir
56916mkfifo dir/fifo
56917MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
56918MINOR=\$( stat /dev/urandom --printf=\"%T\" )
56919mknod dir/chartype c \$MAJOR \$MINOR
56920
56921# setup attributes
56922restorecon -R dir
56923chcon -h --user=system_u dir/fifo
56924chcon -h --user=system_u dir/chartype
56925setfacl -m u:\$UID:--- dir/fifo
56926setfacl -m u:\$UID:rwx dir/chartype
56927
56928getfacl dir/fifo >> before
56929getfattr -msecurity.selinux dir/chartype >> before
56930
56931tar --xattrs --selinux --acls -cf archive.tar dir
56932
56933mv dir olddir
56934
56935tar --xattrs --selinux --acls -xf archive.tar
56936
56937getfacl dir/fifo >> after
56938getfattr -msecurity.selinux dir/chartype >> after
56939
56940diff before after
56941echo separator
56942)"
56943at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
56944( $at_check_trace;
56945mkdir v7
56946(cd v7
56947TEST_TAR_FORMAT=v7
56948export TEST_TAR_FORMAT
56949TAR_OPTIONS="-H v7"
56950export TAR_OPTIONS
56951rm -rf *
56952
56953
56954echo "test" > $$
56955chmod 0 $$
56956cat $$ > /dev/null 2>&1
56957result=$?
56958rm -f $$
56959test $result -eq 0 || exit 77
56960
56961
56962  file=$(TMPDIR=. mktemp fiXXXXXX)
56963
56964  setfattr -n user.test -v test $file &> /dev/null
56965  if test "$?" != 0; then
56966    exit 77
56967  fi
56968
56969
56970  getfattr $file &> /dev/null
56971  if test "$?" != 0; then
56972    exit 77
56973  fi
56974
56975
56976
56977
56978  file=$(TMPDIR=. mktemp fiXXXXXX)
56979
56980  restorecon $file &> /dev/null
56981  if test "$?" != 0; then
56982    exit 77
56983  fi
56984
56985
56986  chcon -h --user=unconfined_u $file &> /dev/null
56987  if test "$?" != 0; then
56988    exit 77
56989  fi
56990
56991  rm -rf $file
56992
56993  file=$(TMPDIR=. mktemp fiXXXXXX)
56994  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
56995  if test "$err" != "0"; then
56996    exit 77
56997  fi
56998
56999
57000
57001  file=$(TMPDIR=. mktemp fiXXXXXX)
57002
57003  setfacl -m u:$UID:rwx $file &> /dev/null
57004  if test "$?" != 0; then
57005    exit 77
57006  fi
57007
57008
57009  getfacl $file &> /dev/null
57010  if test "$?" != 0; then
57011    exit 77
57012  fi
57013
57014  rm -rf $file
57015
57016  file=$(TMPDIR=. mktemp fiXXXXXX)
57017  setfacl -m u:$UID:rwx $file
57018  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57019  if test "$err" != "0"; then
57020    exit 77
57021  fi
57022
57023
57024mkdir dir
57025mkfifo dir/fifo
57026MAJOR=$( stat /dev/urandom --printf="%t" )
57027MINOR=$( stat /dev/urandom --printf="%T" )
57028mknod dir/chartype c $MAJOR $MINOR
57029
57030# setup attributes
57031restorecon -R dir
57032chcon -h --user=system_u dir/fifo
57033chcon -h --user=system_u dir/chartype
57034setfacl -m u:$UID:--- dir/fifo
57035setfacl -m u:$UID:rwx dir/chartype
57036
57037getfacl dir/fifo >> before
57038getfattr -msecurity.selinux dir/chartype >> before
57039
57040tar --xattrs --selinux --acls -cf archive.tar dir
57041
57042mv dir olddir
57043
57044tar --xattrs --selinux --acls -xf archive.tar
57045
57046getfacl dir/fifo >> after
57047getfattr -msecurity.selinux dir/chartype >> after
57048
57049diff before after
57050echo separator
57051)
57052) >>"$at_stdout" 2>>"$at_stderr" 5>&-
57053at_status=$? at_failed=false
57054$at_check_filter
57055at_fn_diff_devnull "$at_stderr" || at_failed=:
57056echo >>"$at_stdout"; $as_echo "separator
57057" | \
57058  $at_diff - "$at_stdout" || at_failed=:
57059at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
57060$at_failed && at_fn_log_failure
57061$at_traceon; }
57062
57063              { set +x
57064$as_echo "$at_srcdir/selacl01.at:28:
57065mkdir oldgnu
57066(cd oldgnu
57067TEST_TAR_FORMAT=oldgnu
57068export TEST_TAR_FORMAT
57069TAR_OPTIONS=\"-H oldgnu\"
57070export TAR_OPTIONS
57071rm -rf *
57072
57073
57074echo \"test\" > \$\$
57075chmod 0 \$\$
57076cat \$\$ > /dev/null 2>&1
57077result=\$?
57078rm -f \$\$
57079test \$result -eq 0 || exit 77
57080
57081
57082  file=\$(TMPDIR=. mktemp fiXXXXXX)
57083
57084  setfattr -n user.test -v test \$file &> /dev/null
57085  if test \"\$?\" != 0; then
57086    exit 77
57087  fi
57088
57089
57090  getfattr \$file &> /dev/null
57091  if test \"\$?\" != 0; then
57092    exit 77
57093  fi
57094
57095
57096
57097
57098  file=\$(TMPDIR=. mktemp fiXXXXXX)
57099
57100  restorecon \$file &> /dev/null
57101  if test \"\$?\" != 0; then
57102    exit 77
57103  fi
57104
57105
57106  chcon -h --user=unconfined_u \$file &> /dev/null
57107  if test \"\$?\" != 0; then
57108    exit 77
57109  fi
57110
57111  rm -rf \$file
57112
57113  file=\$(TMPDIR=. mktemp fiXXXXXX)
57114  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
57115  if test \"\$err\" != \"0\"; then
57116    exit 77
57117  fi
57118
57119
57120
57121  file=\$(TMPDIR=. mktemp fiXXXXXX)
57122
57123  setfacl -m u:\$UID:rwx \$file &> /dev/null
57124  if test \"\$?\" != 0; then
57125    exit 77
57126  fi
57127
57128
57129  getfacl \$file &> /dev/null
57130  if test \"\$?\" != 0; then
57131    exit 77
57132  fi
57133
57134  rm -rf \$file
57135
57136  file=\$(TMPDIR=. mktemp fiXXXXXX)
57137  setfacl -m u:\$UID:rwx \$file
57138  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
57139  if test \"\$err\" != \"0\"; then
57140    exit 77
57141  fi
57142
57143
57144mkdir dir
57145mkfifo dir/fifo
57146MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
57147MINOR=\$( stat /dev/urandom --printf=\"%T\" )
57148mknod dir/chartype c \$MAJOR \$MINOR
57149
57150# setup attributes
57151restorecon -R dir
57152chcon -h --user=system_u dir/fifo
57153chcon -h --user=system_u dir/chartype
57154setfacl -m u:\$UID:--- dir/fifo
57155setfacl -m u:\$UID:rwx dir/chartype
57156
57157getfacl dir/fifo >> before
57158getfattr -msecurity.selinux dir/chartype >> before
57159
57160tar --xattrs --selinux --acls -cf archive.tar dir
57161
57162mv dir olddir
57163
57164tar --xattrs --selinux --acls -xf archive.tar
57165
57166getfacl dir/fifo >> after
57167getfattr -msecurity.selinux dir/chartype >> after
57168
57169diff before after
57170echo separator
57171)"
57172at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
57173( $at_check_trace;
57174mkdir oldgnu
57175(cd oldgnu
57176TEST_TAR_FORMAT=oldgnu
57177export TEST_TAR_FORMAT
57178TAR_OPTIONS="-H oldgnu"
57179export TAR_OPTIONS
57180rm -rf *
57181
57182
57183echo "test" > $$
57184chmod 0 $$
57185cat $$ > /dev/null 2>&1
57186result=$?
57187rm -f $$
57188test $result -eq 0 || exit 77
57189
57190
57191  file=$(TMPDIR=. mktemp fiXXXXXX)
57192
57193  setfattr -n user.test -v test $file &> /dev/null
57194  if test "$?" != 0; then
57195    exit 77
57196  fi
57197
57198
57199  getfattr $file &> /dev/null
57200  if test "$?" != 0; then
57201    exit 77
57202  fi
57203
57204
57205
57206
57207  file=$(TMPDIR=. mktemp fiXXXXXX)
57208
57209  restorecon $file &> /dev/null
57210  if test "$?" != 0; then
57211    exit 77
57212  fi
57213
57214
57215  chcon -h --user=unconfined_u $file &> /dev/null
57216  if test "$?" != 0; then
57217    exit 77
57218  fi
57219
57220  rm -rf $file
57221
57222  file=$(TMPDIR=. mktemp fiXXXXXX)
57223  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57224  if test "$err" != "0"; then
57225    exit 77
57226  fi
57227
57228
57229
57230  file=$(TMPDIR=. mktemp fiXXXXXX)
57231
57232  setfacl -m u:$UID:rwx $file &> /dev/null
57233  if test "$?" != 0; then
57234    exit 77
57235  fi
57236
57237
57238  getfacl $file &> /dev/null
57239  if test "$?" != 0; then
57240    exit 77
57241  fi
57242
57243  rm -rf $file
57244
57245  file=$(TMPDIR=. mktemp fiXXXXXX)
57246  setfacl -m u:$UID:rwx $file
57247  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57248  if test "$err" != "0"; then
57249    exit 77
57250  fi
57251
57252
57253mkdir dir
57254mkfifo dir/fifo
57255MAJOR=$( stat /dev/urandom --printf="%t" )
57256MINOR=$( stat /dev/urandom --printf="%T" )
57257mknod dir/chartype c $MAJOR $MINOR
57258
57259# setup attributes
57260restorecon -R dir
57261chcon -h --user=system_u dir/fifo
57262chcon -h --user=system_u dir/chartype
57263setfacl -m u:$UID:--- dir/fifo
57264setfacl -m u:$UID:rwx dir/chartype
57265
57266getfacl dir/fifo >> before
57267getfattr -msecurity.selinux dir/chartype >> before
57268
57269tar --xattrs --selinux --acls -cf archive.tar dir
57270
57271mv dir olddir
57272
57273tar --xattrs --selinux --acls -xf archive.tar
57274
57275getfacl dir/fifo >> after
57276getfattr -msecurity.selinux dir/chartype >> after
57277
57278diff before after
57279echo separator
57280)
57281) >>"$at_stdout" 2>>"$at_stderr" 5>&-
57282at_status=$? at_failed=false
57283$at_check_filter
57284at_fn_diff_devnull "$at_stderr" || at_failed=:
57285echo >>"$at_stdout"; $as_echo "separator
57286" | \
57287  $at_diff - "$at_stdout" || at_failed=:
57288at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
57289$at_failed && at_fn_log_failure
57290$at_traceon; }
57291
57292              { set +x
57293$as_echo "$at_srcdir/selacl01.at:28:
57294mkdir ustar
57295(cd ustar
57296TEST_TAR_FORMAT=ustar
57297export TEST_TAR_FORMAT
57298TAR_OPTIONS=\"-H ustar\"
57299export TAR_OPTIONS
57300rm -rf *
57301
57302
57303echo \"test\" > \$\$
57304chmod 0 \$\$
57305cat \$\$ > /dev/null 2>&1
57306result=\$?
57307rm -f \$\$
57308test \$result -eq 0 || exit 77
57309
57310
57311  file=\$(TMPDIR=. mktemp fiXXXXXX)
57312
57313  setfattr -n user.test -v test \$file &> /dev/null
57314  if test \"\$?\" != 0; then
57315    exit 77
57316  fi
57317
57318
57319  getfattr \$file &> /dev/null
57320  if test \"\$?\" != 0; then
57321    exit 77
57322  fi
57323
57324
57325
57326
57327  file=\$(TMPDIR=. mktemp fiXXXXXX)
57328
57329  restorecon \$file &> /dev/null
57330  if test \"\$?\" != 0; then
57331    exit 77
57332  fi
57333
57334
57335  chcon -h --user=unconfined_u \$file &> /dev/null
57336  if test \"\$?\" != 0; then
57337    exit 77
57338  fi
57339
57340  rm -rf \$file
57341
57342  file=\$(TMPDIR=. mktemp fiXXXXXX)
57343  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
57344  if test \"\$err\" != \"0\"; then
57345    exit 77
57346  fi
57347
57348
57349
57350  file=\$(TMPDIR=. mktemp fiXXXXXX)
57351
57352  setfacl -m u:\$UID:rwx \$file &> /dev/null
57353  if test \"\$?\" != 0; then
57354    exit 77
57355  fi
57356
57357
57358  getfacl \$file &> /dev/null
57359  if test \"\$?\" != 0; then
57360    exit 77
57361  fi
57362
57363  rm -rf \$file
57364
57365  file=\$(TMPDIR=. mktemp fiXXXXXX)
57366  setfacl -m u:\$UID:rwx \$file
57367  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
57368  if test \"\$err\" != \"0\"; then
57369    exit 77
57370  fi
57371
57372
57373mkdir dir
57374mkfifo dir/fifo
57375MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
57376MINOR=\$( stat /dev/urandom --printf=\"%T\" )
57377mknod dir/chartype c \$MAJOR \$MINOR
57378
57379# setup attributes
57380restorecon -R dir
57381chcon -h --user=system_u dir/fifo
57382chcon -h --user=system_u dir/chartype
57383setfacl -m u:\$UID:--- dir/fifo
57384setfacl -m u:\$UID:rwx dir/chartype
57385
57386getfacl dir/fifo >> before
57387getfattr -msecurity.selinux dir/chartype >> before
57388
57389tar --xattrs --selinux --acls -cf archive.tar dir
57390
57391mv dir olddir
57392
57393tar --xattrs --selinux --acls -xf archive.tar
57394
57395getfacl dir/fifo >> after
57396getfattr -msecurity.selinux dir/chartype >> after
57397
57398diff before after
57399echo separator
57400)"
57401at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
57402( $at_check_trace;
57403mkdir ustar
57404(cd ustar
57405TEST_TAR_FORMAT=ustar
57406export TEST_TAR_FORMAT
57407TAR_OPTIONS="-H ustar"
57408export TAR_OPTIONS
57409rm -rf *
57410
57411
57412echo "test" > $$
57413chmod 0 $$
57414cat $$ > /dev/null 2>&1
57415result=$?
57416rm -f $$
57417test $result -eq 0 || exit 77
57418
57419
57420  file=$(TMPDIR=. mktemp fiXXXXXX)
57421
57422  setfattr -n user.test -v test $file &> /dev/null
57423  if test "$?" != 0; then
57424    exit 77
57425  fi
57426
57427
57428  getfattr $file &> /dev/null
57429  if test "$?" != 0; then
57430    exit 77
57431  fi
57432
57433
57434
57435
57436  file=$(TMPDIR=. mktemp fiXXXXXX)
57437
57438  restorecon $file &> /dev/null
57439  if test "$?" != 0; then
57440    exit 77
57441  fi
57442
57443
57444  chcon -h --user=unconfined_u $file &> /dev/null
57445  if test "$?" != 0; then
57446    exit 77
57447  fi
57448
57449  rm -rf $file
57450
57451  file=$(TMPDIR=. mktemp fiXXXXXX)
57452  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57453  if test "$err" != "0"; then
57454    exit 77
57455  fi
57456
57457
57458
57459  file=$(TMPDIR=. mktemp fiXXXXXX)
57460
57461  setfacl -m u:$UID:rwx $file &> /dev/null
57462  if test "$?" != 0; then
57463    exit 77
57464  fi
57465
57466
57467  getfacl $file &> /dev/null
57468  if test "$?" != 0; then
57469    exit 77
57470  fi
57471
57472  rm -rf $file
57473
57474  file=$(TMPDIR=. mktemp fiXXXXXX)
57475  setfacl -m u:$UID:rwx $file
57476  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57477  if test "$err" != "0"; then
57478    exit 77
57479  fi
57480
57481
57482mkdir dir
57483mkfifo dir/fifo
57484MAJOR=$( stat /dev/urandom --printf="%t" )
57485MINOR=$( stat /dev/urandom --printf="%T" )
57486mknod dir/chartype c $MAJOR $MINOR
57487
57488# setup attributes
57489restorecon -R dir
57490chcon -h --user=system_u dir/fifo
57491chcon -h --user=system_u dir/chartype
57492setfacl -m u:$UID:--- dir/fifo
57493setfacl -m u:$UID:rwx dir/chartype
57494
57495getfacl dir/fifo >> before
57496getfattr -msecurity.selinux dir/chartype >> before
57497
57498tar --xattrs --selinux --acls -cf archive.tar dir
57499
57500mv dir olddir
57501
57502tar --xattrs --selinux --acls -xf archive.tar
57503
57504getfacl dir/fifo >> after
57505getfattr -msecurity.selinux dir/chartype >> after
57506
57507diff before after
57508echo separator
57509)
57510) >>"$at_stdout" 2>>"$at_stderr" 5>&-
57511at_status=$? at_failed=false
57512$at_check_filter
57513at_fn_diff_devnull "$at_stderr" || at_failed=:
57514echo >>"$at_stdout"; $as_echo "separator
57515" | \
57516  $at_diff - "$at_stdout" || at_failed=:
57517at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
57518$at_failed && at_fn_log_failure
57519$at_traceon; }
57520
57521              { set +x
57522$as_echo "$at_srcdir/selacl01.at:28:
57523mkdir posix
57524(cd posix
57525TEST_TAR_FORMAT=posix
57526export TEST_TAR_FORMAT
57527TAR_OPTIONS=\"-H posix\"
57528export TAR_OPTIONS
57529rm -rf *
57530
57531
57532echo \"test\" > \$\$
57533chmod 0 \$\$
57534cat \$\$ > /dev/null 2>&1
57535result=\$?
57536rm -f \$\$
57537test \$result -eq 0 || exit 77
57538
57539
57540  file=\$(TMPDIR=. mktemp fiXXXXXX)
57541
57542  setfattr -n user.test -v test \$file &> /dev/null
57543  if test \"\$?\" != 0; then
57544    exit 77
57545  fi
57546
57547
57548  getfattr \$file &> /dev/null
57549  if test \"\$?\" != 0; then
57550    exit 77
57551  fi
57552
57553
57554
57555
57556  file=\$(TMPDIR=. mktemp fiXXXXXX)
57557
57558  restorecon \$file &> /dev/null
57559  if test \"\$?\" != 0; then
57560    exit 77
57561  fi
57562
57563
57564  chcon -h --user=unconfined_u \$file &> /dev/null
57565  if test \"\$?\" != 0; then
57566    exit 77
57567  fi
57568
57569  rm -rf \$file
57570
57571  file=\$(TMPDIR=. mktemp fiXXXXXX)
57572  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
57573  if test \"\$err\" != \"0\"; then
57574    exit 77
57575  fi
57576
57577
57578
57579  file=\$(TMPDIR=. mktemp fiXXXXXX)
57580
57581  setfacl -m u:\$UID:rwx \$file &> /dev/null
57582  if test \"\$?\" != 0; then
57583    exit 77
57584  fi
57585
57586
57587  getfacl \$file &> /dev/null
57588  if test \"\$?\" != 0; then
57589    exit 77
57590  fi
57591
57592  rm -rf \$file
57593
57594  file=\$(TMPDIR=. mktemp fiXXXXXX)
57595  setfacl -m u:\$UID:rwx \$file
57596  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
57597  if test \"\$err\" != \"0\"; then
57598    exit 77
57599  fi
57600
57601
57602mkdir dir
57603mkfifo dir/fifo
57604MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
57605MINOR=\$( stat /dev/urandom --printf=\"%T\" )
57606mknod dir/chartype c \$MAJOR \$MINOR
57607
57608# setup attributes
57609restorecon -R dir
57610chcon -h --user=system_u dir/fifo
57611chcon -h --user=system_u dir/chartype
57612setfacl -m u:\$UID:--- dir/fifo
57613setfacl -m u:\$UID:rwx dir/chartype
57614
57615getfacl dir/fifo >> before
57616getfattr -msecurity.selinux dir/chartype >> before
57617
57618tar --xattrs --selinux --acls -cf archive.tar dir
57619
57620mv dir olddir
57621
57622tar --xattrs --selinux --acls -xf archive.tar
57623
57624getfacl dir/fifo >> after
57625getfattr -msecurity.selinux dir/chartype >> after
57626
57627diff before after
57628echo separator
57629)"
57630at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
57631( $at_check_trace;
57632mkdir posix
57633(cd posix
57634TEST_TAR_FORMAT=posix
57635export TEST_TAR_FORMAT
57636TAR_OPTIONS="-H posix"
57637export TAR_OPTIONS
57638rm -rf *
57639
57640
57641echo "test" > $$
57642chmod 0 $$
57643cat $$ > /dev/null 2>&1
57644result=$?
57645rm -f $$
57646test $result -eq 0 || exit 77
57647
57648
57649  file=$(TMPDIR=. mktemp fiXXXXXX)
57650
57651  setfattr -n user.test -v test $file &> /dev/null
57652  if test "$?" != 0; then
57653    exit 77
57654  fi
57655
57656
57657  getfattr $file &> /dev/null
57658  if test "$?" != 0; then
57659    exit 77
57660  fi
57661
57662
57663
57664
57665  file=$(TMPDIR=. mktemp fiXXXXXX)
57666
57667  restorecon $file &> /dev/null
57668  if test "$?" != 0; then
57669    exit 77
57670  fi
57671
57672
57673  chcon -h --user=unconfined_u $file &> /dev/null
57674  if test "$?" != 0; then
57675    exit 77
57676  fi
57677
57678  rm -rf $file
57679
57680  file=$(TMPDIR=. mktemp fiXXXXXX)
57681  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57682  if test "$err" != "0"; then
57683    exit 77
57684  fi
57685
57686
57687
57688  file=$(TMPDIR=. mktemp fiXXXXXX)
57689
57690  setfacl -m u:$UID:rwx $file &> /dev/null
57691  if test "$?" != 0; then
57692    exit 77
57693  fi
57694
57695
57696  getfacl $file &> /dev/null
57697  if test "$?" != 0; then
57698    exit 77
57699  fi
57700
57701  rm -rf $file
57702
57703  file=$(TMPDIR=. mktemp fiXXXXXX)
57704  setfacl -m u:$UID:rwx $file
57705  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57706  if test "$err" != "0"; then
57707    exit 77
57708  fi
57709
57710
57711mkdir dir
57712mkfifo dir/fifo
57713MAJOR=$( stat /dev/urandom --printf="%t" )
57714MINOR=$( stat /dev/urandom --printf="%T" )
57715mknod dir/chartype c $MAJOR $MINOR
57716
57717# setup attributes
57718restorecon -R dir
57719chcon -h --user=system_u dir/fifo
57720chcon -h --user=system_u dir/chartype
57721setfacl -m u:$UID:--- dir/fifo
57722setfacl -m u:$UID:rwx dir/chartype
57723
57724getfacl dir/fifo >> before
57725getfattr -msecurity.selinux dir/chartype >> before
57726
57727tar --xattrs --selinux --acls -cf archive.tar dir
57728
57729mv dir olddir
57730
57731tar --xattrs --selinux --acls -xf archive.tar
57732
57733getfacl dir/fifo >> after
57734getfattr -msecurity.selinux dir/chartype >> after
57735
57736diff before after
57737echo separator
57738)
57739) >>"$at_stdout" 2>>"$at_stderr" 5>&-
57740at_status=$? at_failed=false
57741$at_check_filter
57742at_fn_diff_devnull "$at_stderr" || at_failed=:
57743echo >>"$at_stdout"; $as_echo "separator
57744" | \
57745  $at_diff - "$at_stdout" || at_failed=:
57746at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
57747$at_failed && at_fn_log_failure
57748$at_traceon; }
57749
57750              { set +x
57751$as_echo "$at_srcdir/selacl01.at:28:
57752mkdir gnu
57753(cd gnu
57754TEST_TAR_FORMAT=gnu
57755export TEST_TAR_FORMAT
57756TAR_OPTIONS=\"-H gnu\"
57757export TAR_OPTIONS
57758rm -rf *
57759
57760
57761echo \"test\" > \$\$
57762chmod 0 \$\$
57763cat \$\$ > /dev/null 2>&1
57764result=\$?
57765rm -f \$\$
57766test \$result -eq 0 || exit 77
57767
57768
57769  file=\$(TMPDIR=. mktemp fiXXXXXX)
57770
57771  setfattr -n user.test -v test \$file &> /dev/null
57772  if test \"\$?\" != 0; then
57773    exit 77
57774  fi
57775
57776
57777  getfattr \$file &> /dev/null
57778  if test \"\$?\" != 0; then
57779    exit 77
57780  fi
57781
57782
57783
57784
57785  file=\$(TMPDIR=. mktemp fiXXXXXX)
57786
57787  restorecon \$file &> /dev/null
57788  if test \"\$?\" != 0; then
57789    exit 77
57790  fi
57791
57792
57793  chcon -h --user=unconfined_u \$file &> /dev/null
57794  if test \"\$?\" != 0; then
57795    exit 77
57796  fi
57797
57798  rm -rf \$file
57799
57800  file=\$(TMPDIR=. mktemp fiXXXXXX)
57801  err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
57802  if test \"\$err\" != \"0\"; then
57803    exit 77
57804  fi
57805
57806
57807
57808  file=\$(TMPDIR=. mktemp fiXXXXXX)
57809
57810  setfacl -m u:\$UID:rwx \$file &> /dev/null
57811  if test \"\$?\" != 0; then
57812    exit 77
57813  fi
57814
57815
57816  getfacl \$file &> /dev/null
57817  if test \"\$?\" != 0; then
57818    exit 77
57819  fi
57820
57821  rm -rf \$file
57822
57823  file=\$(TMPDIR=. mktemp fiXXXXXX)
57824  setfacl -m u:\$UID:rwx \$file
57825  err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
57826  if test \"\$err\" != \"0\"; then
57827    exit 77
57828  fi
57829
57830
57831mkdir dir
57832mkfifo dir/fifo
57833MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
57834MINOR=\$( stat /dev/urandom --printf=\"%T\" )
57835mknod dir/chartype c \$MAJOR \$MINOR
57836
57837# setup attributes
57838restorecon -R dir
57839chcon -h --user=system_u dir/fifo
57840chcon -h --user=system_u dir/chartype
57841setfacl -m u:\$UID:--- dir/fifo
57842setfacl -m u:\$UID:rwx dir/chartype
57843
57844getfacl dir/fifo >> before
57845getfattr -msecurity.selinux dir/chartype >> before
57846
57847tar --xattrs --selinux --acls -cf archive.tar dir
57848
57849mv dir olddir
57850
57851tar --xattrs --selinux --acls -xf archive.tar
57852
57853getfacl dir/fifo >> after
57854getfattr -msecurity.selinux dir/chartype >> after
57855
57856diff before after
57857echo separator
57858)"
57859at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
57860( $at_check_trace;
57861mkdir gnu
57862(cd gnu
57863TEST_TAR_FORMAT=gnu
57864export TEST_TAR_FORMAT
57865TAR_OPTIONS="-H gnu"
57866export TAR_OPTIONS
57867rm -rf *
57868
57869
57870echo "test" > $$
57871chmod 0 $$
57872cat $$ > /dev/null 2>&1
57873result=$?
57874rm -f $$
57875test $result -eq 0 || exit 77
57876
57877
57878  file=$(TMPDIR=. mktemp fiXXXXXX)
57879
57880  setfattr -n user.test -v test $file &> /dev/null
57881  if test "$?" != 0; then
57882    exit 77
57883  fi
57884
57885
57886  getfattr $file &> /dev/null
57887  if test "$?" != 0; then
57888    exit 77
57889  fi
57890
57891
57892
57893
57894  file=$(TMPDIR=. mktemp fiXXXXXX)
57895
57896  restorecon $file &> /dev/null
57897  if test "$?" != 0; then
57898    exit 77
57899  fi
57900
57901
57902  chcon -h --user=unconfined_u $file &> /dev/null
57903  if test "$?" != 0; then
57904    exit 77
57905  fi
57906
57907  rm -rf $file
57908
57909  file=$(TMPDIR=. mktemp fiXXXXXX)
57910  err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57911  if test "$err" != "0"; then
57912    exit 77
57913  fi
57914
57915
57916
57917  file=$(TMPDIR=. mktemp fiXXXXXX)
57918
57919  setfacl -m u:$UID:rwx $file &> /dev/null
57920  if test "$?" != 0; then
57921    exit 77
57922  fi
57923
57924
57925  getfacl $file &> /dev/null
57926  if test "$?" != 0; then
57927    exit 77
57928  fi
57929
57930  rm -rf $file
57931
57932  file=$(TMPDIR=. mktemp fiXXXXXX)
57933  setfacl -m u:$UID:rwx $file
57934  err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
57935  if test "$err" != "0"; then
57936    exit 77
57937  fi
57938
57939
57940mkdir dir
57941mkfifo dir/fifo
57942MAJOR=$( stat /dev/urandom --printf="%t" )
57943MINOR=$( stat /dev/urandom --printf="%T" )
57944mknod dir/chartype c $MAJOR $MINOR
57945
57946# setup attributes
57947restorecon -R dir
57948chcon -h --user=system_u dir/fifo
57949chcon -h --user=system_u dir/chartype
57950setfacl -m u:$UID:--- dir/fifo
57951setfacl -m u:$UID:rwx dir/chartype
57952
57953getfacl dir/fifo >> before
57954getfattr -msecurity.selinux dir/chartype >> before
57955
57956tar --xattrs --selinux --acls -cf archive.tar dir
57957
57958mv dir olddir
57959
57960tar --xattrs --selinux --acls -xf archive.tar
57961
57962getfacl dir/fifo >> after
57963getfattr -msecurity.selinux dir/chartype >> after
57964
57965diff before after
57966echo separator
57967)
57968) >>"$at_stdout" 2>>"$at_stderr" 5>&-
57969at_status=$? at_failed=false
57970$at_check_filter
57971at_fn_diff_devnull "$at_stderr" || at_failed=:
57972echo >>"$at_stdout"; $as_echo "separator
57973" | \
57974  $at_diff - "$at_stdout" || at_failed=:
57975at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
57976$at_failed && at_fn_log_failure
57977$at_traceon; }
57978
57979
57980
57981
57982  set +x
57983  $at_times_p && times >"$at_times_file"
57984) 5>&1 2>&1 7>&- | eval $at_tee_pipe
57985read at_status <"$at_status_file"
57986#AT_STOP_226
57987#AT_START_227
57988at_fn_group_banner 227 'capabs_raw01.at:25' \
57989  "capabilities: binary store/restore" "             " 31
57990at_xfail=no
57991      test -f $XFAILFILE && at_xfail=yes
57992(
57993  $as_echo "227. $at_setup_line: testing $at_desc ..."
57994  $at_traceon
57995
57996
57997
57998
57999
58000  { set +x
58001$as_echo "$at_srcdir/capabs_raw01.at:28:
58002mkdir v7
58003(cd v7
58004TEST_TAR_FORMAT=v7
58005export TEST_TAR_FORMAT
58006TAR_OPTIONS=\"-H v7\"
58007export TAR_OPTIONS
58008rm -rf *
58009
58010
58011echo \"test\" > \$\$
58012chmod 0 \$\$
58013cat \$\$ > /dev/null 2>&1
58014result=\$?
58015rm -f \$\$
58016test \$result -eq 0 || exit 77
58017
58018
58019
58020  file=\$(TMPDIR=. mktemp fiXXXXXX)
58021
58022  setfattr -n user.test -v test \$file &> /dev/null
58023  if test \"\$?\" != 0; then
58024    exit 77
58025  fi
58026
58027
58028  getfattr \$file &> /dev/null
58029  if test \"\$?\" != 0; then
58030    exit 77
58031  fi
58032
58033
58034  file=\$(TMPDIR=. mktemp fiXXXXXX)
58035  setfattr -n user.test -v ahoj \$file
58036  # check whether tar fails to store xattrs
58037  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
58038  if test \"\$err\" != \"0\"; then
58039    exit 77
58040  fi
58041
58042
58043  file=\$(TMPDIR=. mktemp fiXXXXXX)
58044
58045  setcap \"= cap_chown=ei\" \$file &> /dev/null
58046  if test \"\$?\" != 0; then
58047    exit 77
58048  fi
58049
58050
58051  getcap \$file &> /dev/null
58052  if test \"\$?\" != 0; then
58053    exit 77
58054  fi
58055
58056  rm -rf \$file
58057
58058
58059mkdir dir
58060genfile --file dir/file
58061
58062setcap \"= cap_chown=ei\" dir/file
58063
58064# archive whole directory including binary xattrs
58065tar --xattrs -cf archive.tar dir
58066
58067# clear the directory
58068rm -rf dir
58069
58070# restore _all_ xattrs (not just the user.* domain)
58071tar --xattrs --xattrs-include='*' -xf archive.tar
58072
58073# Newer systems print = instead of + here
58074getcap dir/file | sed 's/+/=/'
58075)"
58076at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
58077( $at_check_trace;
58078mkdir v7
58079(cd v7
58080TEST_TAR_FORMAT=v7
58081export TEST_TAR_FORMAT
58082TAR_OPTIONS="-H v7"
58083export TAR_OPTIONS
58084rm -rf *
58085
58086
58087echo "test" > $$
58088chmod 0 $$
58089cat $$ > /dev/null 2>&1
58090result=$?
58091rm -f $$
58092test $result -eq 0 || exit 77
58093
58094
58095
58096  file=$(TMPDIR=. mktemp fiXXXXXX)
58097
58098  setfattr -n user.test -v test $file &> /dev/null
58099  if test "$?" != 0; then
58100    exit 77
58101  fi
58102
58103
58104  getfattr $file &> /dev/null
58105  if test "$?" != 0; then
58106    exit 77
58107  fi
58108
58109
58110  file=$(TMPDIR=. mktemp fiXXXXXX)
58111  setfattr -n user.test -v ahoj $file
58112  # check whether tar fails to store xattrs
58113  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
58114  if test "$err" != "0"; then
58115    exit 77
58116  fi
58117
58118
58119  file=$(TMPDIR=. mktemp fiXXXXXX)
58120
58121  setcap "= cap_chown=ei" $file &> /dev/null
58122  if test "$?" != 0; then
58123    exit 77
58124  fi
58125
58126
58127  getcap $file &> /dev/null
58128  if test "$?" != 0; then
58129    exit 77
58130  fi
58131
58132  rm -rf $file
58133
58134
58135mkdir dir
58136genfile --file dir/file
58137
58138setcap "= cap_chown=ei" dir/file
58139
58140# archive whole directory including binary xattrs
58141tar --xattrs -cf archive.tar dir
58142
58143# clear the directory
58144rm -rf dir
58145
58146# restore _all_ xattrs (not just the user.* domain)
58147tar --xattrs --xattrs-include='*' -xf archive.tar
58148
58149# Newer systems print = instead of + here
58150getcap dir/file | sed 's/+/=/'
58151)
58152) >>"$at_stdout" 2>>"$at_stderr" 5>&-
58153at_status=$? at_failed=false
58154$at_check_filter
58155at_fn_diff_devnull "$at_stderr" || at_failed=:
58156echo >>"$at_stdout"; $as_echo "dir/file = cap_chown=ei
58157" | \
58158  $at_diff - "$at_stdout" || at_failed=:
58159at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
58160$at_failed && at_fn_log_failure
58161$at_traceon; }
58162
58163              { set +x
58164$as_echo "$at_srcdir/capabs_raw01.at:28:
58165mkdir oldgnu
58166(cd oldgnu
58167TEST_TAR_FORMAT=oldgnu
58168export TEST_TAR_FORMAT
58169TAR_OPTIONS=\"-H oldgnu\"
58170export TAR_OPTIONS
58171rm -rf *
58172
58173
58174echo \"test\" > \$\$
58175chmod 0 \$\$
58176cat \$\$ > /dev/null 2>&1
58177result=\$?
58178rm -f \$\$
58179test \$result -eq 0 || exit 77
58180
58181
58182
58183  file=\$(TMPDIR=. mktemp fiXXXXXX)
58184
58185  setfattr -n user.test -v test \$file &> /dev/null
58186  if test \"\$?\" != 0; then
58187    exit 77
58188  fi
58189
58190
58191  getfattr \$file &> /dev/null
58192  if test \"\$?\" != 0; then
58193    exit 77
58194  fi
58195
58196
58197  file=\$(TMPDIR=. mktemp fiXXXXXX)
58198  setfattr -n user.test -v ahoj \$file
58199  # check whether tar fails to store xattrs
58200  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
58201  if test \"\$err\" != \"0\"; then
58202    exit 77
58203  fi
58204
58205
58206  file=\$(TMPDIR=. mktemp fiXXXXXX)
58207
58208  setcap \"= cap_chown=ei\" \$file &> /dev/null
58209  if test \"\$?\" != 0; then
58210    exit 77
58211  fi
58212
58213
58214  getcap \$file &> /dev/null
58215  if test \"\$?\" != 0; then
58216    exit 77
58217  fi
58218
58219  rm -rf \$file
58220
58221
58222mkdir dir
58223genfile --file dir/file
58224
58225setcap \"= cap_chown=ei\" dir/file
58226
58227# archive whole directory including binary xattrs
58228tar --xattrs -cf archive.tar dir
58229
58230# clear the directory
58231rm -rf dir
58232
58233# restore _all_ xattrs (not just the user.* domain)
58234tar --xattrs --xattrs-include='*' -xf archive.tar
58235
58236# Newer systems print = instead of + here
58237getcap dir/file | sed 's/+/=/'
58238)"
58239at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
58240( $at_check_trace;
58241mkdir oldgnu
58242(cd oldgnu
58243TEST_TAR_FORMAT=oldgnu
58244export TEST_TAR_FORMAT
58245TAR_OPTIONS="-H oldgnu"
58246export TAR_OPTIONS
58247rm -rf *
58248
58249
58250echo "test" > $$
58251chmod 0 $$
58252cat $$ > /dev/null 2>&1
58253result=$?
58254rm -f $$
58255test $result -eq 0 || exit 77
58256
58257
58258
58259  file=$(TMPDIR=. mktemp fiXXXXXX)
58260
58261  setfattr -n user.test -v test $file &> /dev/null
58262  if test "$?" != 0; then
58263    exit 77
58264  fi
58265
58266
58267  getfattr $file &> /dev/null
58268  if test "$?" != 0; then
58269    exit 77
58270  fi
58271
58272
58273  file=$(TMPDIR=. mktemp fiXXXXXX)
58274  setfattr -n user.test -v ahoj $file
58275  # check whether tar fails to store xattrs
58276  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
58277  if test "$err" != "0"; then
58278    exit 77
58279  fi
58280
58281
58282  file=$(TMPDIR=. mktemp fiXXXXXX)
58283
58284  setcap "= cap_chown=ei" $file &> /dev/null
58285  if test "$?" != 0; then
58286    exit 77
58287  fi
58288
58289
58290  getcap $file &> /dev/null
58291  if test "$?" != 0; then
58292    exit 77
58293  fi
58294
58295  rm -rf $file
58296
58297
58298mkdir dir
58299genfile --file dir/file
58300
58301setcap "= cap_chown=ei" dir/file
58302
58303# archive whole directory including binary xattrs
58304tar --xattrs -cf archive.tar dir
58305
58306# clear the directory
58307rm -rf dir
58308
58309# restore _all_ xattrs (not just the user.* domain)
58310tar --xattrs --xattrs-include='*' -xf archive.tar
58311
58312# Newer systems print = instead of + here
58313getcap dir/file | sed 's/+/=/'
58314)
58315) >>"$at_stdout" 2>>"$at_stderr" 5>&-
58316at_status=$? at_failed=false
58317$at_check_filter
58318at_fn_diff_devnull "$at_stderr" || at_failed=:
58319echo >>"$at_stdout"; $as_echo "dir/file = cap_chown=ei
58320" | \
58321  $at_diff - "$at_stdout" || at_failed=:
58322at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
58323$at_failed && at_fn_log_failure
58324$at_traceon; }
58325
58326              { set +x
58327$as_echo "$at_srcdir/capabs_raw01.at:28:
58328mkdir ustar
58329(cd ustar
58330TEST_TAR_FORMAT=ustar
58331export TEST_TAR_FORMAT
58332TAR_OPTIONS=\"-H ustar\"
58333export TAR_OPTIONS
58334rm -rf *
58335
58336
58337echo \"test\" > \$\$
58338chmod 0 \$\$
58339cat \$\$ > /dev/null 2>&1
58340result=\$?
58341rm -f \$\$
58342test \$result -eq 0 || exit 77
58343
58344
58345
58346  file=\$(TMPDIR=. mktemp fiXXXXXX)
58347
58348  setfattr -n user.test -v test \$file &> /dev/null
58349  if test \"\$?\" != 0; then
58350    exit 77
58351  fi
58352
58353
58354  getfattr \$file &> /dev/null
58355  if test \"\$?\" != 0; then
58356    exit 77
58357  fi
58358
58359
58360  file=\$(TMPDIR=. mktemp fiXXXXXX)
58361  setfattr -n user.test -v ahoj \$file
58362  # check whether tar fails to store xattrs
58363  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
58364  if test \"\$err\" != \"0\"; then
58365    exit 77
58366  fi
58367
58368
58369  file=\$(TMPDIR=. mktemp fiXXXXXX)
58370
58371  setcap \"= cap_chown=ei\" \$file &> /dev/null
58372  if test \"\$?\" != 0; then
58373    exit 77
58374  fi
58375
58376
58377  getcap \$file &> /dev/null
58378  if test \"\$?\" != 0; then
58379    exit 77
58380  fi
58381
58382  rm -rf \$file
58383
58384
58385mkdir dir
58386genfile --file dir/file
58387
58388setcap \"= cap_chown=ei\" dir/file
58389
58390# archive whole directory including binary xattrs
58391tar --xattrs -cf archive.tar dir
58392
58393# clear the directory
58394rm -rf dir
58395
58396# restore _all_ xattrs (not just the user.* domain)
58397tar --xattrs --xattrs-include='*' -xf archive.tar
58398
58399# Newer systems print = instead of + here
58400getcap dir/file | sed 's/+/=/'
58401)"
58402at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
58403( $at_check_trace;
58404mkdir ustar
58405(cd ustar
58406TEST_TAR_FORMAT=ustar
58407export TEST_TAR_FORMAT
58408TAR_OPTIONS="-H ustar"
58409export TAR_OPTIONS
58410rm -rf *
58411
58412
58413echo "test" > $$
58414chmod 0 $$
58415cat $$ > /dev/null 2>&1
58416result=$?
58417rm -f $$
58418test $result -eq 0 || exit 77
58419
58420
58421
58422  file=$(TMPDIR=. mktemp fiXXXXXX)
58423
58424  setfattr -n user.test -v test $file &> /dev/null
58425  if test "$?" != 0; then
58426    exit 77
58427  fi
58428
58429
58430  getfattr $file &> /dev/null
58431  if test "$?" != 0; then
58432    exit 77
58433  fi
58434
58435
58436  file=$(TMPDIR=. mktemp fiXXXXXX)
58437  setfattr -n user.test -v ahoj $file
58438  # check whether tar fails to store xattrs
58439  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
58440  if test "$err" != "0"; then
58441    exit 77
58442  fi
58443
58444
58445  file=$(TMPDIR=. mktemp fiXXXXXX)
58446
58447  setcap "= cap_chown=ei" $file &> /dev/null
58448  if test "$?" != 0; then
58449    exit 77
58450  fi
58451
58452
58453  getcap $file &> /dev/null
58454  if test "$?" != 0; then
58455    exit 77
58456  fi
58457
58458  rm -rf $file
58459
58460
58461mkdir dir
58462genfile --file dir/file
58463
58464setcap "= cap_chown=ei" dir/file
58465
58466# archive whole directory including binary xattrs
58467tar --xattrs -cf archive.tar dir
58468
58469# clear the directory
58470rm -rf dir
58471
58472# restore _all_ xattrs (not just the user.* domain)
58473tar --xattrs --xattrs-include='*' -xf archive.tar
58474
58475# Newer systems print = instead of + here
58476getcap dir/file | sed 's/+/=/'
58477)
58478) >>"$at_stdout" 2>>"$at_stderr" 5>&-
58479at_status=$? at_failed=false
58480$at_check_filter
58481at_fn_diff_devnull "$at_stderr" || at_failed=:
58482echo >>"$at_stdout"; $as_echo "dir/file = cap_chown=ei
58483" | \
58484  $at_diff - "$at_stdout" || at_failed=:
58485at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
58486$at_failed && at_fn_log_failure
58487$at_traceon; }
58488
58489              { set +x
58490$as_echo "$at_srcdir/capabs_raw01.at:28:
58491mkdir posix
58492(cd posix
58493TEST_TAR_FORMAT=posix
58494export TEST_TAR_FORMAT
58495TAR_OPTIONS=\"-H posix\"
58496export TAR_OPTIONS
58497rm -rf *
58498
58499
58500echo \"test\" > \$\$
58501chmod 0 \$\$
58502cat \$\$ > /dev/null 2>&1
58503result=\$?
58504rm -f \$\$
58505test \$result -eq 0 || exit 77
58506
58507
58508
58509  file=\$(TMPDIR=. mktemp fiXXXXXX)
58510
58511  setfattr -n user.test -v test \$file &> /dev/null
58512  if test \"\$?\" != 0; then
58513    exit 77
58514  fi
58515
58516
58517  getfattr \$file &> /dev/null
58518  if test \"\$?\" != 0; then
58519    exit 77
58520  fi
58521
58522
58523  file=\$(TMPDIR=. mktemp fiXXXXXX)
58524  setfattr -n user.test -v ahoj \$file
58525  # check whether tar fails to store xattrs
58526  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
58527  if test \"\$err\" != \"0\"; then
58528    exit 77
58529  fi
58530
58531
58532  file=\$(TMPDIR=. mktemp fiXXXXXX)
58533
58534  setcap \"= cap_chown=ei\" \$file &> /dev/null
58535  if test \"\$?\" != 0; then
58536    exit 77
58537  fi
58538
58539
58540  getcap \$file &> /dev/null
58541  if test \"\$?\" != 0; then
58542    exit 77
58543  fi
58544
58545  rm -rf \$file
58546
58547
58548mkdir dir
58549genfile --file dir/file
58550
58551setcap \"= cap_chown=ei\" dir/file
58552
58553# archive whole directory including binary xattrs
58554tar --xattrs -cf archive.tar dir
58555
58556# clear the directory
58557rm -rf dir
58558
58559# restore _all_ xattrs (not just the user.* domain)
58560tar --xattrs --xattrs-include='*' -xf archive.tar
58561
58562# Newer systems print = instead of + here
58563getcap dir/file | sed 's/+/=/'
58564)"
58565at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
58566( $at_check_trace;
58567mkdir posix
58568(cd posix
58569TEST_TAR_FORMAT=posix
58570export TEST_TAR_FORMAT
58571TAR_OPTIONS="-H posix"
58572export TAR_OPTIONS
58573rm -rf *
58574
58575
58576echo "test" > $$
58577chmod 0 $$
58578cat $$ > /dev/null 2>&1
58579result=$?
58580rm -f $$
58581test $result -eq 0 || exit 77
58582
58583
58584
58585  file=$(TMPDIR=. mktemp fiXXXXXX)
58586
58587  setfattr -n user.test -v test $file &> /dev/null
58588  if test "$?" != 0; then
58589    exit 77
58590  fi
58591
58592
58593  getfattr $file &> /dev/null
58594  if test "$?" != 0; then
58595    exit 77
58596  fi
58597
58598
58599  file=$(TMPDIR=. mktemp fiXXXXXX)
58600  setfattr -n user.test -v ahoj $file
58601  # check whether tar fails to store xattrs
58602  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
58603  if test "$err" != "0"; then
58604    exit 77
58605  fi
58606
58607
58608  file=$(TMPDIR=. mktemp fiXXXXXX)
58609
58610  setcap "= cap_chown=ei" $file &> /dev/null
58611  if test "$?" != 0; then
58612    exit 77
58613  fi
58614
58615
58616  getcap $file &> /dev/null
58617  if test "$?" != 0; then
58618    exit 77
58619  fi
58620
58621  rm -rf $file
58622
58623
58624mkdir dir
58625genfile --file dir/file
58626
58627setcap "= cap_chown=ei" dir/file
58628
58629# archive whole directory including binary xattrs
58630tar --xattrs -cf archive.tar dir
58631
58632# clear the directory
58633rm -rf dir
58634
58635# restore _all_ xattrs (not just the user.* domain)
58636tar --xattrs --xattrs-include='*' -xf archive.tar
58637
58638# Newer systems print = instead of + here
58639getcap dir/file | sed 's/+/=/'
58640)
58641) >>"$at_stdout" 2>>"$at_stderr" 5>&-
58642at_status=$? at_failed=false
58643$at_check_filter
58644at_fn_diff_devnull "$at_stderr" || at_failed=:
58645echo >>"$at_stdout"; $as_echo "dir/file = cap_chown=ei
58646" | \
58647  $at_diff - "$at_stdout" || at_failed=:
58648at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
58649$at_failed && at_fn_log_failure
58650$at_traceon; }
58651
58652              { set +x
58653$as_echo "$at_srcdir/capabs_raw01.at:28:
58654mkdir gnu
58655(cd gnu
58656TEST_TAR_FORMAT=gnu
58657export TEST_TAR_FORMAT
58658TAR_OPTIONS=\"-H gnu\"
58659export TAR_OPTIONS
58660rm -rf *
58661
58662
58663echo \"test\" > \$\$
58664chmod 0 \$\$
58665cat \$\$ > /dev/null 2>&1
58666result=\$?
58667rm -f \$\$
58668test \$result -eq 0 || exit 77
58669
58670
58671
58672  file=\$(TMPDIR=. mktemp fiXXXXXX)
58673
58674  setfattr -n user.test -v test \$file &> /dev/null
58675  if test \"\$?\" != 0; then
58676    exit 77
58677  fi
58678
58679
58680  getfattr \$file &> /dev/null
58681  if test \"\$?\" != 0; then
58682    exit 77
58683  fi
58684
58685
58686  file=\$(TMPDIR=. mktemp fiXXXXXX)
58687  setfattr -n user.test -v ahoj \$file
58688  # check whether tar fails to store xattrs
58689  err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
58690  if test \"\$err\" != \"0\"; then
58691    exit 77
58692  fi
58693
58694
58695  file=\$(TMPDIR=. mktemp fiXXXXXX)
58696
58697  setcap \"= cap_chown=ei\" \$file &> /dev/null
58698  if test \"\$?\" != 0; then
58699    exit 77
58700  fi
58701
58702
58703  getcap \$file &> /dev/null
58704  if test \"\$?\" != 0; then
58705    exit 77
58706  fi
58707
58708  rm -rf \$file
58709
58710
58711mkdir dir
58712genfile --file dir/file
58713
58714setcap \"= cap_chown=ei\" dir/file
58715
58716# archive whole directory including binary xattrs
58717tar --xattrs -cf archive.tar dir
58718
58719# clear the directory
58720rm -rf dir
58721
58722# restore _all_ xattrs (not just the user.* domain)
58723tar --xattrs --xattrs-include='*' -xf archive.tar
58724
58725# Newer systems print = instead of + here
58726getcap dir/file | sed 's/+/=/'
58727)"
58728at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
58729( $at_check_trace;
58730mkdir gnu
58731(cd gnu
58732TEST_TAR_FORMAT=gnu
58733export TEST_TAR_FORMAT
58734TAR_OPTIONS="-H gnu"
58735export TAR_OPTIONS
58736rm -rf *
58737
58738
58739echo "test" > $$
58740chmod 0 $$
58741cat $$ > /dev/null 2>&1
58742result=$?
58743rm -f $$
58744test $result -eq 0 || exit 77
58745
58746
58747
58748  file=$(TMPDIR=. mktemp fiXXXXXX)
58749
58750  setfattr -n user.test -v test $file &> /dev/null
58751  if test "$?" != 0; then
58752    exit 77
58753  fi
58754
58755
58756  getfattr $file &> /dev/null
58757  if test "$?" != 0; then
58758    exit 77
58759  fi
58760
58761
58762  file=$(TMPDIR=. mktemp fiXXXXXX)
58763  setfattr -n user.test -v ahoj $file
58764  # check whether tar fails to store xattrs
58765  err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
58766  if test "$err" != "0"; then
58767    exit 77
58768  fi
58769
58770
58771  file=$(TMPDIR=. mktemp fiXXXXXX)
58772
58773  setcap "= cap_chown=ei" $file &> /dev/null
58774  if test "$?" != 0; then
58775    exit 77
58776  fi
58777
58778
58779  getcap $file &> /dev/null
58780  if test "$?" != 0; then
58781    exit 77
58782  fi
58783
58784  rm -rf $file
58785
58786
58787mkdir dir
58788genfile --file dir/file
58789
58790setcap "= cap_chown=ei" dir/file
58791
58792# archive whole directory including binary xattrs
58793tar --xattrs -cf archive.tar dir
58794
58795# clear the directory
58796rm -rf dir
58797
58798# restore _all_ xattrs (not just the user.* domain)
58799tar --xattrs --xattrs-include='*' -xf archive.tar
58800
58801# Newer systems print = instead of + here
58802getcap dir/file | sed 's/+/=/'
58803)
58804) >>"$at_stdout" 2>>"$at_stderr" 5>&-
58805at_status=$? at_failed=false
58806$at_check_filter
58807at_fn_diff_devnull "$at_stderr" || at_failed=:
58808echo >>"$at_stdout"; $as_echo "dir/file = cap_chown=ei
58809" | \
58810  $at_diff - "$at_stdout" || at_failed=:
58811at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
58812$at_failed && at_fn_log_failure
58813$at_traceon; }
58814
58815
58816
58817
58818  set +x
58819  $at_times_p && times >"$at_times_file"
58820) 5>&1 2>&1 7>&- | eval $at_tee_pipe
58821read at_status <"$at_status_file"
58822#AT_STOP_227
58823#AT_START_228
58824at_fn_group_banner 228 'onetop01.at:21' \
58825  "tar --one-top-level" "                            " 32
58826at_xfail=no
58827      test -f $XFAILFILE && at_xfail=yes
58828(
58829  $as_echo "228. $at_setup_line: testing $at_desc ..."
58830  $at_traceon
58831
58832
58833
58834
58835
58836  { set +x
58837$as_echo "$at_srcdir/onetop01.at:24:
58838mkdir v7
58839(cd v7
58840TEST_TAR_FORMAT=v7
58841export TEST_TAR_FORMAT
58842TAR_OPTIONS=\"-H v7\"
58843export TAR_OPTIONS
58844rm -rf *
58845
58846
58847test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
58848
58849mkdir a
58850genfile --file a/b
58851genfile --file c
58852tar cf a.tar a c
58853mkdir out
58854cd out
58855tar --one-top-level -x -f ../a.tar
58856find . | sort
58857)"
58858at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
58859( $at_check_trace;
58860mkdir v7
58861(cd v7
58862TEST_TAR_FORMAT=v7
58863export TEST_TAR_FORMAT
58864TAR_OPTIONS="-H v7"
58865export TAR_OPTIONS
58866rm -rf *
58867
58868
58869test -z "`sort < /dev/null 2>&1`" || exit 77
58870
58871mkdir a
58872genfile --file a/b
58873genfile --file c
58874tar cf a.tar a c
58875mkdir out
58876cd out
58877tar --one-top-level -x -f ../a.tar
58878find . | sort
58879)
58880) >>"$at_stdout" 2>>"$at_stderr" 5>&-
58881at_status=$? at_failed=false
58882$at_check_filter
58883at_fn_diff_devnull "$at_stderr" || at_failed=:
58884echo >>"$at_stdout"; $as_echo ".
58885./a
58886./a/b
58887./a/c
58888" | \
58889  $at_diff - "$at_stdout" || at_failed=:
58890at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
58891$at_failed && at_fn_log_failure
58892$at_traceon; }
58893
58894              { set +x
58895$as_echo "$at_srcdir/onetop01.at:24:
58896mkdir oldgnu
58897(cd oldgnu
58898TEST_TAR_FORMAT=oldgnu
58899export TEST_TAR_FORMAT
58900TAR_OPTIONS=\"-H oldgnu\"
58901export TAR_OPTIONS
58902rm -rf *
58903
58904
58905test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
58906
58907mkdir a
58908genfile --file a/b
58909genfile --file c
58910tar cf a.tar a c
58911mkdir out
58912cd out
58913tar --one-top-level -x -f ../a.tar
58914find . | sort
58915)"
58916at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
58917( $at_check_trace;
58918mkdir oldgnu
58919(cd oldgnu
58920TEST_TAR_FORMAT=oldgnu
58921export TEST_TAR_FORMAT
58922TAR_OPTIONS="-H oldgnu"
58923export TAR_OPTIONS
58924rm -rf *
58925
58926
58927test -z "`sort < /dev/null 2>&1`" || exit 77
58928
58929mkdir a
58930genfile --file a/b
58931genfile --file c
58932tar cf a.tar a c
58933mkdir out
58934cd out
58935tar --one-top-level -x -f ../a.tar
58936find . | sort
58937)
58938) >>"$at_stdout" 2>>"$at_stderr" 5>&-
58939at_status=$? at_failed=false
58940$at_check_filter
58941at_fn_diff_devnull "$at_stderr" || at_failed=:
58942echo >>"$at_stdout"; $as_echo ".
58943./a
58944./a/b
58945./a/c
58946" | \
58947  $at_diff - "$at_stdout" || at_failed=:
58948at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
58949$at_failed && at_fn_log_failure
58950$at_traceon; }
58951
58952              { set +x
58953$as_echo "$at_srcdir/onetop01.at:24:
58954mkdir ustar
58955(cd ustar
58956TEST_TAR_FORMAT=ustar
58957export TEST_TAR_FORMAT
58958TAR_OPTIONS=\"-H ustar\"
58959export TAR_OPTIONS
58960rm -rf *
58961
58962
58963test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
58964
58965mkdir a
58966genfile --file a/b
58967genfile --file c
58968tar cf a.tar a c
58969mkdir out
58970cd out
58971tar --one-top-level -x -f ../a.tar
58972find . | sort
58973)"
58974at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
58975( $at_check_trace;
58976mkdir ustar
58977(cd ustar
58978TEST_TAR_FORMAT=ustar
58979export TEST_TAR_FORMAT
58980TAR_OPTIONS="-H ustar"
58981export TAR_OPTIONS
58982rm -rf *
58983
58984
58985test -z "`sort < /dev/null 2>&1`" || exit 77
58986
58987mkdir a
58988genfile --file a/b
58989genfile --file c
58990tar cf a.tar a c
58991mkdir out
58992cd out
58993tar --one-top-level -x -f ../a.tar
58994find . | sort
58995)
58996) >>"$at_stdout" 2>>"$at_stderr" 5>&-
58997at_status=$? at_failed=false
58998$at_check_filter
58999at_fn_diff_devnull "$at_stderr" || at_failed=:
59000echo >>"$at_stdout"; $as_echo ".
59001./a
59002./a/b
59003./a/c
59004" | \
59005  $at_diff - "$at_stdout" || at_failed=:
59006at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
59007$at_failed && at_fn_log_failure
59008$at_traceon; }
59009
59010              { set +x
59011$as_echo "$at_srcdir/onetop01.at:24:
59012mkdir posix
59013(cd posix
59014TEST_TAR_FORMAT=posix
59015export TEST_TAR_FORMAT
59016TAR_OPTIONS=\"-H posix\"
59017export TAR_OPTIONS
59018rm -rf *
59019
59020
59021test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59022
59023mkdir a
59024genfile --file a/b
59025genfile --file c
59026tar cf a.tar a c
59027mkdir out
59028cd out
59029tar --one-top-level -x -f ../a.tar
59030find . | sort
59031)"
59032at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
59033( $at_check_trace;
59034mkdir posix
59035(cd posix
59036TEST_TAR_FORMAT=posix
59037export TEST_TAR_FORMAT
59038TAR_OPTIONS="-H posix"
59039export TAR_OPTIONS
59040rm -rf *
59041
59042
59043test -z "`sort < /dev/null 2>&1`" || exit 77
59044
59045mkdir a
59046genfile --file a/b
59047genfile --file c
59048tar cf a.tar a c
59049mkdir out
59050cd out
59051tar --one-top-level -x -f ../a.tar
59052find . | sort
59053)
59054) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59055at_status=$? at_failed=false
59056$at_check_filter
59057at_fn_diff_devnull "$at_stderr" || at_failed=:
59058echo >>"$at_stdout"; $as_echo ".
59059./a
59060./a/b
59061./a/c
59062" | \
59063  $at_diff - "$at_stdout" || at_failed=:
59064at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
59065$at_failed && at_fn_log_failure
59066$at_traceon; }
59067
59068              { set +x
59069$as_echo "$at_srcdir/onetop01.at:24:
59070mkdir gnu
59071(cd gnu
59072TEST_TAR_FORMAT=gnu
59073export TEST_TAR_FORMAT
59074TAR_OPTIONS=\"-H gnu\"
59075export TAR_OPTIONS
59076rm -rf *
59077
59078
59079test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59080
59081mkdir a
59082genfile --file a/b
59083genfile --file c
59084tar cf a.tar a c
59085mkdir out
59086cd out
59087tar --one-top-level -x -f ../a.tar
59088find . | sort
59089)"
59090at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
59091( $at_check_trace;
59092mkdir gnu
59093(cd gnu
59094TEST_TAR_FORMAT=gnu
59095export TEST_TAR_FORMAT
59096TAR_OPTIONS="-H gnu"
59097export TAR_OPTIONS
59098rm -rf *
59099
59100
59101test -z "`sort < /dev/null 2>&1`" || exit 77
59102
59103mkdir a
59104genfile --file a/b
59105genfile --file c
59106tar cf a.tar a c
59107mkdir out
59108cd out
59109tar --one-top-level -x -f ../a.tar
59110find . | sort
59111)
59112) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59113at_status=$? at_failed=false
59114$at_check_filter
59115at_fn_diff_devnull "$at_stderr" || at_failed=:
59116echo >>"$at_stdout"; $as_echo ".
59117./a
59118./a/b
59119./a/c
59120" | \
59121  $at_diff - "$at_stdout" || at_failed=:
59122at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
59123$at_failed && at_fn_log_failure
59124$at_traceon; }
59125
59126
59127
59128
59129  set +x
59130  $at_times_p && times >"$at_times_file"
59131) 5>&1 2>&1 7>&- | eval $at_tee_pipe
59132read at_status <"$at_status_file"
59133#AT_STOP_228
59134#AT_START_229
59135at_fn_group_banner 229 'onetop02.at:21' \
59136  "tar --one-top-level --show-transformed" "         " 32
59137at_xfail=no
59138      test -f $XFAILFILE && at_xfail=yes
59139(
59140  $as_echo "229. $at_setup_line: testing $at_desc ..."
59141  $at_traceon
59142
59143
59144
59145
59146
59147  { set +x
59148$as_echo "$at_srcdir/onetop02.at:24:
59149mkdir v7
59150(cd v7
59151TEST_TAR_FORMAT=v7
59152export TEST_TAR_FORMAT
59153TAR_OPTIONS=\"-H v7\"
59154export TAR_OPTIONS
59155rm -rf *
59156
59157
59158test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59159
59160mkdir a
59161genfile --file a/b
59162genfile --file c
59163tar cf a.tar a c
59164mkdir out
59165cd out
59166tar --one-top-level --show-transformed  -v -x -f ../a.tar
59167find . | sort
59168)"
59169at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
59170( $at_check_trace;
59171mkdir v7
59172(cd v7
59173TEST_TAR_FORMAT=v7
59174export TEST_TAR_FORMAT
59175TAR_OPTIONS="-H v7"
59176export TAR_OPTIONS
59177rm -rf *
59178
59179
59180test -z "`sort < /dev/null 2>&1`" || exit 77
59181
59182mkdir a
59183genfile --file a/b
59184genfile --file c
59185tar cf a.tar a c
59186mkdir out
59187cd out
59188tar --one-top-level --show-transformed  -v -x -f ../a.tar
59189find . | sort
59190)
59191) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59192at_status=$? at_failed=false
59193$at_check_filter
59194at_fn_diff_devnull "$at_stderr" || at_failed=:
59195echo >>"$at_stdout"; $as_echo "a/
59196a/b
59197a/c
59198.
59199./a
59200./a/b
59201./a/c
59202" | \
59203  $at_diff - "$at_stdout" || at_failed=:
59204at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
59205$at_failed && at_fn_log_failure
59206$at_traceon; }
59207
59208              { set +x
59209$as_echo "$at_srcdir/onetop02.at:24:
59210mkdir oldgnu
59211(cd oldgnu
59212TEST_TAR_FORMAT=oldgnu
59213export TEST_TAR_FORMAT
59214TAR_OPTIONS=\"-H oldgnu\"
59215export TAR_OPTIONS
59216rm -rf *
59217
59218
59219test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59220
59221mkdir a
59222genfile --file a/b
59223genfile --file c
59224tar cf a.tar a c
59225mkdir out
59226cd out
59227tar --one-top-level --show-transformed  -v -x -f ../a.tar
59228find . | sort
59229)"
59230at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
59231( $at_check_trace;
59232mkdir oldgnu
59233(cd oldgnu
59234TEST_TAR_FORMAT=oldgnu
59235export TEST_TAR_FORMAT
59236TAR_OPTIONS="-H oldgnu"
59237export TAR_OPTIONS
59238rm -rf *
59239
59240
59241test -z "`sort < /dev/null 2>&1`" || exit 77
59242
59243mkdir a
59244genfile --file a/b
59245genfile --file c
59246tar cf a.tar a c
59247mkdir out
59248cd out
59249tar --one-top-level --show-transformed  -v -x -f ../a.tar
59250find . | sort
59251)
59252) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59253at_status=$? at_failed=false
59254$at_check_filter
59255at_fn_diff_devnull "$at_stderr" || at_failed=:
59256echo >>"$at_stdout"; $as_echo "a/
59257a/b
59258a/c
59259.
59260./a
59261./a/b
59262./a/c
59263" | \
59264  $at_diff - "$at_stdout" || at_failed=:
59265at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
59266$at_failed && at_fn_log_failure
59267$at_traceon; }
59268
59269              { set +x
59270$as_echo "$at_srcdir/onetop02.at:24:
59271mkdir ustar
59272(cd ustar
59273TEST_TAR_FORMAT=ustar
59274export TEST_TAR_FORMAT
59275TAR_OPTIONS=\"-H ustar\"
59276export TAR_OPTIONS
59277rm -rf *
59278
59279
59280test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59281
59282mkdir a
59283genfile --file a/b
59284genfile --file c
59285tar cf a.tar a c
59286mkdir out
59287cd out
59288tar --one-top-level --show-transformed  -v -x -f ../a.tar
59289find . | sort
59290)"
59291at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
59292( $at_check_trace;
59293mkdir ustar
59294(cd ustar
59295TEST_TAR_FORMAT=ustar
59296export TEST_TAR_FORMAT
59297TAR_OPTIONS="-H ustar"
59298export TAR_OPTIONS
59299rm -rf *
59300
59301
59302test -z "`sort < /dev/null 2>&1`" || exit 77
59303
59304mkdir a
59305genfile --file a/b
59306genfile --file c
59307tar cf a.tar a c
59308mkdir out
59309cd out
59310tar --one-top-level --show-transformed  -v -x -f ../a.tar
59311find . | sort
59312)
59313) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59314at_status=$? at_failed=false
59315$at_check_filter
59316at_fn_diff_devnull "$at_stderr" || at_failed=:
59317echo >>"$at_stdout"; $as_echo "a/
59318a/b
59319a/c
59320.
59321./a
59322./a/b
59323./a/c
59324" | \
59325  $at_diff - "$at_stdout" || at_failed=:
59326at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
59327$at_failed && at_fn_log_failure
59328$at_traceon; }
59329
59330              { set +x
59331$as_echo "$at_srcdir/onetop02.at:24:
59332mkdir posix
59333(cd posix
59334TEST_TAR_FORMAT=posix
59335export TEST_TAR_FORMAT
59336TAR_OPTIONS=\"-H posix\"
59337export TAR_OPTIONS
59338rm -rf *
59339
59340
59341test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59342
59343mkdir a
59344genfile --file a/b
59345genfile --file c
59346tar cf a.tar a c
59347mkdir out
59348cd out
59349tar --one-top-level --show-transformed  -v -x -f ../a.tar
59350find . | sort
59351)"
59352at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
59353( $at_check_trace;
59354mkdir posix
59355(cd posix
59356TEST_TAR_FORMAT=posix
59357export TEST_TAR_FORMAT
59358TAR_OPTIONS="-H posix"
59359export TAR_OPTIONS
59360rm -rf *
59361
59362
59363test -z "`sort < /dev/null 2>&1`" || exit 77
59364
59365mkdir a
59366genfile --file a/b
59367genfile --file c
59368tar cf a.tar a c
59369mkdir out
59370cd out
59371tar --one-top-level --show-transformed  -v -x -f ../a.tar
59372find . | sort
59373)
59374) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59375at_status=$? at_failed=false
59376$at_check_filter
59377at_fn_diff_devnull "$at_stderr" || at_failed=:
59378echo >>"$at_stdout"; $as_echo "a/
59379a/b
59380a/c
59381.
59382./a
59383./a/b
59384./a/c
59385" | \
59386  $at_diff - "$at_stdout" || at_failed=:
59387at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
59388$at_failed && at_fn_log_failure
59389$at_traceon; }
59390
59391              { set +x
59392$as_echo "$at_srcdir/onetop02.at:24:
59393mkdir gnu
59394(cd gnu
59395TEST_TAR_FORMAT=gnu
59396export TEST_TAR_FORMAT
59397TAR_OPTIONS=\"-H gnu\"
59398export TAR_OPTIONS
59399rm -rf *
59400
59401
59402test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59403
59404mkdir a
59405genfile --file a/b
59406genfile --file c
59407tar cf a.tar a c
59408mkdir out
59409cd out
59410tar --one-top-level --show-transformed  -v -x -f ../a.tar
59411find . | sort
59412)"
59413at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
59414( $at_check_trace;
59415mkdir gnu
59416(cd gnu
59417TEST_TAR_FORMAT=gnu
59418export TEST_TAR_FORMAT
59419TAR_OPTIONS="-H gnu"
59420export TAR_OPTIONS
59421rm -rf *
59422
59423
59424test -z "`sort < /dev/null 2>&1`" || exit 77
59425
59426mkdir a
59427genfile --file a/b
59428genfile --file c
59429tar cf a.tar a c
59430mkdir out
59431cd out
59432tar --one-top-level --show-transformed  -v -x -f ../a.tar
59433find . | sort
59434)
59435) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59436at_status=$? at_failed=false
59437$at_check_filter
59438at_fn_diff_devnull "$at_stderr" || at_failed=:
59439echo >>"$at_stdout"; $as_echo "a/
59440a/b
59441a/c
59442.
59443./a
59444./a/b
59445./a/c
59446" | \
59447  $at_diff - "$at_stdout" || at_failed=:
59448at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
59449$at_failed && at_fn_log_failure
59450$at_traceon; }
59451
59452
59453
59454
59455  set +x
59456  $at_times_p && times >"$at_times_file"
59457) 5>&1 2>&1 7>&- | eval $at_tee_pipe
59458read at_status <"$at_status_file"
59459#AT_STOP_229
59460#AT_START_230
59461at_fn_group_banner 230 'onetop03.at:21' \
59462  "tar --one-top-level --transform" "                " 32
59463at_xfail=no
59464      test -f $XFAILFILE && at_xfail=yes
59465(
59466  $as_echo "230. $at_setup_line: testing $at_desc ..."
59467  $at_traceon
59468
59469
59470
59471
59472
59473  { set +x
59474$as_echo "$at_srcdir/onetop03.at:24:
59475mkdir v7
59476(cd v7
59477TEST_TAR_FORMAT=v7
59478export TEST_TAR_FORMAT
59479TAR_OPTIONS=\"-H v7\"
59480export TAR_OPTIONS
59481rm -rf *
59482
59483
59484test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59485
59486mkdir a
59487genfile --file a/b
59488genfile --file c
59489tar cf a.tar a c
59490mkdir out
59491cd out
59492tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59493find . | sort
59494)"
59495at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
59496( $at_check_trace;
59497mkdir v7
59498(cd v7
59499TEST_TAR_FORMAT=v7
59500export TEST_TAR_FORMAT
59501TAR_OPTIONS="-H v7"
59502export TAR_OPTIONS
59503rm -rf *
59504
59505
59506test -z "`sort < /dev/null 2>&1`" || exit 77
59507
59508mkdir a
59509genfile --file a/b
59510genfile --file c
59511tar cf a.tar a c
59512mkdir out
59513cd out
59514tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59515find . | sort
59516)
59517) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59518at_status=$? at_failed=false
59519$at_check_filter
59520at_fn_diff_devnull "$at_stderr" || at_failed=:
59521echo >>"$at_stdout"; $as_echo ".
59522./a
59523./a/b
59524./a/d
59525" | \
59526  $at_diff - "$at_stdout" || at_failed=:
59527at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
59528$at_failed && at_fn_log_failure
59529$at_traceon; }
59530
59531              { set +x
59532$as_echo "$at_srcdir/onetop03.at:24:
59533mkdir oldgnu
59534(cd oldgnu
59535TEST_TAR_FORMAT=oldgnu
59536export TEST_TAR_FORMAT
59537TAR_OPTIONS=\"-H oldgnu\"
59538export TAR_OPTIONS
59539rm -rf *
59540
59541
59542test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59543
59544mkdir a
59545genfile --file a/b
59546genfile --file c
59547tar cf a.tar a c
59548mkdir out
59549cd out
59550tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59551find . | sort
59552)"
59553at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
59554( $at_check_trace;
59555mkdir oldgnu
59556(cd oldgnu
59557TEST_TAR_FORMAT=oldgnu
59558export TEST_TAR_FORMAT
59559TAR_OPTIONS="-H oldgnu"
59560export TAR_OPTIONS
59561rm -rf *
59562
59563
59564test -z "`sort < /dev/null 2>&1`" || exit 77
59565
59566mkdir a
59567genfile --file a/b
59568genfile --file c
59569tar cf a.tar a c
59570mkdir out
59571cd out
59572tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59573find . | sort
59574)
59575) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59576at_status=$? at_failed=false
59577$at_check_filter
59578at_fn_diff_devnull "$at_stderr" || at_failed=:
59579echo >>"$at_stdout"; $as_echo ".
59580./a
59581./a/b
59582./a/d
59583" | \
59584  $at_diff - "$at_stdout" || at_failed=:
59585at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
59586$at_failed && at_fn_log_failure
59587$at_traceon; }
59588
59589              { set +x
59590$as_echo "$at_srcdir/onetop03.at:24:
59591mkdir ustar
59592(cd ustar
59593TEST_TAR_FORMAT=ustar
59594export TEST_TAR_FORMAT
59595TAR_OPTIONS=\"-H ustar\"
59596export TAR_OPTIONS
59597rm -rf *
59598
59599
59600test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59601
59602mkdir a
59603genfile --file a/b
59604genfile --file c
59605tar cf a.tar a c
59606mkdir out
59607cd out
59608tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59609find . | sort
59610)"
59611at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
59612( $at_check_trace;
59613mkdir ustar
59614(cd ustar
59615TEST_TAR_FORMAT=ustar
59616export TEST_TAR_FORMAT
59617TAR_OPTIONS="-H ustar"
59618export TAR_OPTIONS
59619rm -rf *
59620
59621
59622test -z "`sort < /dev/null 2>&1`" || exit 77
59623
59624mkdir a
59625genfile --file a/b
59626genfile --file c
59627tar cf a.tar a c
59628mkdir out
59629cd out
59630tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59631find . | sort
59632)
59633) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59634at_status=$? at_failed=false
59635$at_check_filter
59636at_fn_diff_devnull "$at_stderr" || at_failed=:
59637echo >>"$at_stdout"; $as_echo ".
59638./a
59639./a/b
59640./a/d
59641" | \
59642  $at_diff - "$at_stdout" || at_failed=:
59643at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
59644$at_failed && at_fn_log_failure
59645$at_traceon; }
59646
59647              { set +x
59648$as_echo "$at_srcdir/onetop03.at:24:
59649mkdir posix
59650(cd posix
59651TEST_TAR_FORMAT=posix
59652export TEST_TAR_FORMAT
59653TAR_OPTIONS=\"-H posix\"
59654export TAR_OPTIONS
59655rm -rf *
59656
59657
59658test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59659
59660mkdir a
59661genfile --file a/b
59662genfile --file c
59663tar cf a.tar a c
59664mkdir out
59665cd out
59666tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59667find . | sort
59668)"
59669at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
59670( $at_check_trace;
59671mkdir posix
59672(cd posix
59673TEST_TAR_FORMAT=posix
59674export TEST_TAR_FORMAT
59675TAR_OPTIONS="-H posix"
59676export TAR_OPTIONS
59677rm -rf *
59678
59679
59680test -z "`sort < /dev/null 2>&1`" || exit 77
59681
59682mkdir a
59683genfile --file a/b
59684genfile --file c
59685tar cf a.tar a c
59686mkdir out
59687cd out
59688tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59689find . | sort
59690)
59691) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59692at_status=$? at_failed=false
59693$at_check_filter
59694at_fn_diff_devnull "$at_stderr" || at_failed=:
59695echo >>"$at_stdout"; $as_echo ".
59696./a
59697./a/b
59698./a/d
59699" | \
59700  $at_diff - "$at_stdout" || at_failed=:
59701at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
59702$at_failed && at_fn_log_failure
59703$at_traceon; }
59704
59705              { set +x
59706$as_echo "$at_srcdir/onetop03.at:24:
59707mkdir gnu
59708(cd gnu
59709TEST_TAR_FORMAT=gnu
59710export TEST_TAR_FORMAT
59711TAR_OPTIONS=\"-H gnu\"
59712export TAR_OPTIONS
59713rm -rf *
59714
59715
59716test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59717
59718mkdir a
59719genfile --file a/b
59720genfile --file c
59721tar cf a.tar a c
59722mkdir out
59723cd out
59724tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59725find . | sort
59726)"
59727at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
59728( $at_check_trace;
59729mkdir gnu
59730(cd gnu
59731TEST_TAR_FORMAT=gnu
59732export TEST_TAR_FORMAT
59733TAR_OPTIONS="-H gnu"
59734export TAR_OPTIONS
59735rm -rf *
59736
59737
59738test -z "`sort < /dev/null 2>&1`" || exit 77
59739
59740mkdir a
59741genfile --file a/b
59742genfile --file c
59743tar cf a.tar a c
59744mkdir out
59745cd out
59746tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
59747find . | sort
59748)
59749) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59750at_status=$? at_failed=false
59751$at_check_filter
59752at_fn_diff_devnull "$at_stderr" || at_failed=:
59753echo >>"$at_stdout"; $as_echo ".
59754./a
59755./a/b
59756./a/d
59757" | \
59758  $at_diff - "$at_stdout" || at_failed=:
59759at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
59760$at_failed && at_fn_log_failure
59761$at_traceon; }
59762
59763
59764
59765
59766  set +x
59767  $at_times_p && times >"$at_times_file"
59768) 5>&1 2>&1 7>&- | eval $at_tee_pipe
59769read at_status <"$at_status_file"
59770#AT_STOP_230
59771#AT_START_231
59772at_fn_group_banner 231 'onetop04.at:21' \
59773  "tar --one-top-level --transform" "                " 32
59774at_xfail=no
59775      test -f $XFAILFILE && at_xfail=yes
59776(
59777  $as_echo "231. $at_setup_line: testing $at_desc ..."
59778  $at_traceon
59779
59780
59781
59782
59783
59784  { set +x
59785$as_echo "$at_srcdir/onetop04.at:24:
59786mkdir v7
59787(cd v7
59788TEST_TAR_FORMAT=v7
59789export TEST_TAR_FORMAT
59790TAR_OPTIONS=\"-H v7\"
59791export TAR_OPTIONS
59792rm -rf *
59793
59794
59795test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59796
59797mkdir a
59798genfile --file a/b
59799genfile --file c
59800tar cf a.tar a c
59801tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
59802)"
59803at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
59804( $at_check_trace;
59805mkdir v7
59806(cd v7
59807TEST_TAR_FORMAT=v7
59808export TEST_TAR_FORMAT
59809TAR_OPTIONS="-H v7"
59810export TAR_OPTIONS
59811rm -rf *
59812
59813
59814test -z "`sort < /dev/null 2>&1`" || exit 77
59815
59816mkdir a
59817genfile --file a/b
59818genfile --file c
59819tar cf a.tar a c
59820tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
59821)
59822) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59823at_status=$? at_failed=false
59824$at_check_filter
59825at_fn_diff_devnull "$at_stderr" || at_failed=:
59826echo >>"$at_stdout"; $as_echo "a/
59827a/b
59828a/d
59829" | \
59830  $at_diff - "$at_stdout" || at_failed=:
59831at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
59832$at_failed && at_fn_log_failure
59833$at_traceon; }
59834
59835              { set +x
59836$as_echo "$at_srcdir/onetop04.at:24:
59837mkdir oldgnu
59838(cd oldgnu
59839TEST_TAR_FORMAT=oldgnu
59840export TEST_TAR_FORMAT
59841TAR_OPTIONS=\"-H oldgnu\"
59842export TAR_OPTIONS
59843rm -rf *
59844
59845
59846test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59847
59848mkdir a
59849genfile --file a/b
59850genfile --file c
59851tar cf a.tar a c
59852tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
59853)"
59854at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
59855( $at_check_trace;
59856mkdir oldgnu
59857(cd oldgnu
59858TEST_TAR_FORMAT=oldgnu
59859export TEST_TAR_FORMAT
59860TAR_OPTIONS="-H oldgnu"
59861export TAR_OPTIONS
59862rm -rf *
59863
59864
59865test -z "`sort < /dev/null 2>&1`" || exit 77
59866
59867mkdir a
59868genfile --file a/b
59869genfile --file c
59870tar cf a.tar a c
59871tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
59872)
59873) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59874at_status=$? at_failed=false
59875$at_check_filter
59876at_fn_diff_devnull "$at_stderr" || at_failed=:
59877echo >>"$at_stdout"; $as_echo "a/
59878a/b
59879a/d
59880" | \
59881  $at_diff - "$at_stdout" || at_failed=:
59882at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
59883$at_failed && at_fn_log_failure
59884$at_traceon; }
59885
59886              { set +x
59887$as_echo "$at_srcdir/onetop04.at:24:
59888mkdir ustar
59889(cd ustar
59890TEST_TAR_FORMAT=ustar
59891export TEST_TAR_FORMAT
59892TAR_OPTIONS=\"-H ustar\"
59893export TAR_OPTIONS
59894rm -rf *
59895
59896
59897test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59898
59899mkdir a
59900genfile --file a/b
59901genfile --file c
59902tar cf a.tar a c
59903tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
59904)"
59905at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
59906( $at_check_trace;
59907mkdir ustar
59908(cd ustar
59909TEST_TAR_FORMAT=ustar
59910export TEST_TAR_FORMAT
59911TAR_OPTIONS="-H ustar"
59912export TAR_OPTIONS
59913rm -rf *
59914
59915
59916test -z "`sort < /dev/null 2>&1`" || exit 77
59917
59918mkdir a
59919genfile --file a/b
59920genfile --file c
59921tar cf a.tar a c
59922tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
59923)
59924) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59925at_status=$? at_failed=false
59926$at_check_filter
59927at_fn_diff_devnull "$at_stderr" || at_failed=:
59928echo >>"$at_stdout"; $as_echo "a/
59929a/b
59930a/d
59931" | \
59932  $at_diff - "$at_stdout" || at_failed=:
59933at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
59934$at_failed && at_fn_log_failure
59935$at_traceon; }
59936
59937              { set +x
59938$as_echo "$at_srcdir/onetop04.at:24:
59939mkdir posix
59940(cd posix
59941TEST_TAR_FORMAT=posix
59942export TEST_TAR_FORMAT
59943TAR_OPTIONS=\"-H posix\"
59944export TAR_OPTIONS
59945rm -rf *
59946
59947
59948test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
59949
59950mkdir a
59951genfile --file a/b
59952genfile --file c
59953tar cf a.tar a c
59954tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
59955)"
59956at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
59957( $at_check_trace;
59958mkdir posix
59959(cd posix
59960TEST_TAR_FORMAT=posix
59961export TEST_TAR_FORMAT
59962TAR_OPTIONS="-H posix"
59963export TAR_OPTIONS
59964rm -rf *
59965
59966
59967test -z "`sort < /dev/null 2>&1`" || exit 77
59968
59969mkdir a
59970genfile --file a/b
59971genfile --file c
59972tar cf a.tar a c
59973tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
59974)
59975) >>"$at_stdout" 2>>"$at_stderr" 5>&-
59976at_status=$? at_failed=false
59977$at_check_filter
59978at_fn_diff_devnull "$at_stderr" || at_failed=:
59979echo >>"$at_stdout"; $as_echo "a/
59980a/b
59981a/d
59982" | \
59983  $at_diff - "$at_stdout" || at_failed=:
59984at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
59985$at_failed && at_fn_log_failure
59986$at_traceon; }
59987
59988              { set +x
59989$as_echo "$at_srcdir/onetop04.at:24:
59990mkdir gnu
59991(cd gnu
59992TEST_TAR_FORMAT=gnu
59993export TEST_TAR_FORMAT
59994TAR_OPTIONS=\"-H gnu\"
59995export TAR_OPTIONS
59996rm -rf *
59997
59998
59999test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
60000
60001mkdir a
60002genfile --file a/b
60003genfile --file c
60004tar cf a.tar a c
60005tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
60006)"
60007at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
60008( $at_check_trace;
60009mkdir gnu
60010(cd gnu
60011TEST_TAR_FORMAT=gnu
60012export TEST_TAR_FORMAT
60013TAR_OPTIONS="-H gnu"
60014export TAR_OPTIONS
60015rm -rf *
60016
60017
60018test -z "`sort < /dev/null 2>&1`" || exit 77
60019
60020mkdir a
60021genfile --file a/b
60022genfile --file c
60023tar cf a.tar a c
60024tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
60025)
60026) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60027at_status=$? at_failed=false
60028$at_check_filter
60029at_fn_diff_devnull "$at_stderr" || at_failed=:
60030echo >>"$at_stdout"; $as_echo "a/
60031a/b
60032a/d
60033" | \
60034  $at_diff - "$at_stdout" || at_failed=:
60035at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
60036$at_failed && at_fn_log_failure
60037$at_traceon; }
60038
60039
60040
60041
60042  set +x
60043  $at_times_p && times >"$at_times_file"
60044) 5>&1 2>&1 7>&- | eval $at_tee_pipe
60045read at_status <"$at_status_file"
60046#AT_STOP_231
60047#AT_START_232
60048at_fn_group_banner 232 'onetop05.at:21' \
60049  "tar --one-top-level restoring permissions" "      " 32
60050at_xfail=no
60051      test -f $XFAILFILE && at_xfail=yes
60052(
60053  $as_echo "232. $at_setup_line: testing $at_desc ..."
60054  $at_traceon
60055
60056
60057
60058# When extracting an archive that contains ./ with the --one-top-level option,
60059# the mode and ownership of ./ would be incorrectly applied to the current
60060# working directory, instead of the requested top-level directory.
60061
60062
60063
60064  { set +x
60065$as_echo "$at_srcdir/onetop05.at:28:
60066mkdir v7
60067(cd v7
60068TEST_TAR_FORMAT=v7
60069export TEST_TAR_FORMAT
60070TAR_OPTIONS=\"-H v7\"
60071export TAR_OPTIONS
60072rm -rf *
60073
60074orig_mode=3702
60075mkdir d
60076chmod \$orig_mode d
60077
60078mode=\$(genfile --stat=mode.7777 d)
60079test \$mode = \$orig_mode || exit 77
60080
60081genfile --file d/file
60082tar -cf d.tar -C d .
60083rm -rf d
60084
60085(mkdir d1
60086chmod 700 d1
60087cd d1
60088tar --one-top-level=top -xpf ../d.tar)
60089mode=\$(genfile --stat=mode.777 d1)
60090if test 700 = \$mode; then
60091    echo \"CWD: OK\"
60092else
60093    echo \"CWD: mode changed: 700 != \$mode\"
60094fi
60095
60096mkdir d2
60097chmod 700 d2
60098tar -C d2 --one-top-level=top -xpf d.tar
60099mode=\$(genfile --stat=mode.777 d2)
60100if test 700 = \$mode; then
60101    echo \"DIR: OK\"
60102else
60103    echo \"DIR: mode changed: 700 != \$mode\"
60104fi
60105mode=\$(genfile --stat=mode.7777 d2/top)
60106if test \$mode = \$orig_mode; then
60107    echo \"TOP: OK\"
60108else
60109    echo \"TOP: mode changed: \$orig_mode != \$mode\"
60110fi
60111)"
60112at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
60113( $at_check_trace;
60114mkdir v7
60115(cd v7
60116TEST_TAR_FORMAT=v7
60117export TEST_TAR_FORMAT
60118TAR_OPTIONS="-H v7"
60119export TAR_OPTIONS
60120rm -rf *
60121
60122orig_mode=3702
60123mkdir d
60124chmod $orig_mode d
60125
60126mode=$(genfile --stat=mode.7777 d)
60127test $mode = $orig_mode || exit 77
60128
60129genfile --file d/file
60130tar -cf d.tar -C d .
60131rm -rf d
60132
60133(mkdir d1
60134chmod 700 d1
60135cd d1
60136tar --one-top-level=top -xpf ../d.tar)
60137mode=$(genfile --stat=mode.777 d1)
60138if test 700 = $mode; then
60139    echo "CWD: OK"
60140else
60141    echo "CWD: mode changed: 700 != $mode"
60142fi
60143
60144mkdir d2
60145chmod 700 d2
60146tar -C d2 --one-top-level=top -xpf d.tar
60147mode=$(genfile --stat=mode.777 d2)
60148if test 700 = $mode; then
60149    echo "DIR: OK"
60150else
60151    echo "DIR: mode changed: 700 != $mode"
60152fi
60153mode=$(genfile --stat=mode.7777 d2/top)
60154if test $mode = $orig_mode; then
60155    echo "TOP: OK"
60156else
60157    echo "TOP: mode changed: $orig_mode != $mode"
60158fi
60159)
60160) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60161at_status=$? at_failed=false
60162$at_check_filter
60163at_fn_diff_devnull "$at_stderr" || at_failed=:
60164echo >>"$at_stdout"; $as_echo "CWD: OK
60165DIR: OK
60166TOP: OK
60167" | \
60168  $at_diff - "$at_stdout" || at_failed=:
60169at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
60170$at_failed && at_fn_log_failure
60171$at_traceon; }
60172
60173              { set +x
60174$as_echo "$at_srcdir/onetop05.at:28:
60175mkdir oldgnu
60176(cd oldgnu
60177TEST_TAR_FORMAT=oldgnu
60178export TEST_TAR_FORMAT
60179TAR_OPTIONS=\"-H oldgnu\"
60180export TAR_OPTIONS
60181rm -rf *
60182
60183orig_mode=3702
60184mkdir d
60185chmod \$orig_mode d
60186
60187mode=\$(genfile --stat=mode.7777 d)
60188test \$mode = \$orig_mode || exit 77
60189
60190genfile --file d/file
60191tar -cf d.tar -C d .
60192rm -rf d
60193
60194(mkdir d1
60195chmod 700 d1
60196cd d1
60197tar --one-top-level=top -xpf ../d.tar)
60198mode=\$(genfile --stat=mode.777 d1)
60199if test 700 = \$mode; then
60200    echo \"CWD: OK\"
60201else
60202    echo \"CWD: mode changed: 700 != \$mode\"
60203fi
60204
60205mkdir d2
60206chmod 700 d2
60207tar -C d2 --one-top-level=top -xpf d.tar
60208mode=\$(genfile --stat=mode.777 d2)
60209if test 700 = \$mode; then
60210    echo \"DIR: OK\"
60211else
60212    echo \"DIR: mode changed: 700 != \$mode\"
60213fi
60214mode=\$(genfile --stat=mode.7777 d2/top)
60215if test \$mode = \$orig_mode; then
60216    echo \"TOP: OK\"
60217else
60218    echo \"TOP: mode changed: \$orig_mode != \$mode\"
60219fi
60220)"
60221at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
60222( $at_check_trace;
60223mkdir oldgnu
60224(cd oldgnu
60225TEST_TAR_FORMAT=oldgnu
60226export TEST_TAR_FORMAT
60227TAR_OPTIONS="-H oldgnu"
60228export TAR_OPTIONS
60229rm -rf *
60230
60231orig_mode=3702
60232mkdir d
60233chmod $orig_mode d
60234
60235mode=$(genfile --stat=mode.7777 d)
60236test $mode = $orig_mode || exit 77
60237
60238genfile --file d/file
60239tar -cf d.tar -C d .
60240rm -rf d
60241
60242(mkdir d1
60243chmod 700 d1
60244cd d1
60245tar --one-top-level=top -xpf ../d.tar)
60246mode=$(genfile --stat=mode.777 d1)
60247if test 700 = $mode; then
60248    echo "CWD: OK"
60249else
60250    echo "CWD: mode changed: 700 != $mode"
60251fi
60252
60253mkdir d2
60254chmod 700 d2
60255tar -C d2 --one-top-level=top -xpf d.tar
60256mode=$(genfile --stat=mode.777 d2)
60257if test 700 = $mode; then
60258    echo "DIR: OK"
60259else
60260    echo "DIR: mode changed: 700 != $mode"
60261fi
60262mode=$(genfile --stat=mode.7777 d2/top)
60263if test $mode = $orig_mode; then
60264    echo "TOP: OK"
60265else
60266    echo "TOP: mode changed: $orig_mode != $mode"
60267fi
60268)
60269) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60270at_status=$? at_failed=false
60271$at_check_filter
60272at_fn_diff_devnull "$at_stderr" || at_failed=:
60273echo >>"$at_stdout"; $as_echo "CWD: OK
60274DIR: OK
60275TOP: OK
60276" | \
60277  $at_diff - "$at_stdout" || at_failed=:
60278at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
60279$at_failed && at_fn_log_failure
60280$at_traceon; }
60281
60282              { set +x
60283$as_echo "$at_srcdir/onetop05.at:28:
60284mkdir ustar
60285(cd ustar
60286TEST_TAR_FORMAT=ustar
60287export TEST_TAR_FORMAT
60288TAR_OPTIONS=\"-H ustar\"
60289export TAR_OPTIONS
60290rm -rf *
60291
60292orig_mode=3702
60293mkdir d
60294chmod \$orig_mode d
60295
60296mode=\$(genfile --stat=mode.7777 d)
60297test \$mode = \$orig_mode || exit 77
60298
60299genfile --file d/file
60300tar -cf d.tar -C d .
60301rm -rf d
60302
60303(mkdir d1
60304chmod 700 d1
60305cd d1
60306tar --one-top-level=top -xpf ../d.tar)
60307mode=\$(genfile --stat=mode.777 d1)
60308if test 700 = \$mode; then
60309    echo \"CWD: OK\"
60310else
60311    echo \"CWD: mode changed: 700 != \$mode\"
60312fi
60313
60314mkdir d2
60315chmod 700 d2
60316tar -C d2 --one-top-level=top -xpf d.tar
60317mode=\$(genfile --stat=mode.777 d2)
60318if test 700 = \$mode; then
60319    echo \"DIR: OK\"
60320else
60321    echo \"DIR: mode changed: 700 != \$mode\"
60322fi
60323mode=\$(genfile --stat=mode.7777 d2/top)
60324if test \$mode = \$orig_mode; then
60325    echo \"TOP: OK\"
60326else
60327    echo \"TOP: mode changed: \$orig_mode != \$mode\"
60328fi
60329)"
60330at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
60331( $at_check_trace;
60332mkdir ustar
60333(cd ustar
60334TEST_TAR_FORMAT=ustar
60335export TEST_TAR_FORMAT
60336TAR_OPTIONS="-H ustar"
60337export TAR_OPTIONS
60338rm -rf *
60339
60340orig_mode=3702
60341mkdir d
60342chmod $orig_mode d
60343
60344mode=$(genfile --stat=mode.7777 d)
60345test $mode = $orig_mode || exit 77
60346
60347genfile --file d/file
60348tar -cf d.tar -C d .
60349rm -rf d
60350
60351(mkdir d1
60352chmod 700 d1
60353cd d1
60354tar --one-top-level=top -xpf ../d.tar)
60355mode=$(genfile --stat=mode.777 d1)
60356if test 700 = $mode; then
60357    echo "CWD: OK"
60358else
60359    echo "CWD: mode changed: 700 != $mode"
60360fi
60361
60362mkdir d2
60363chmod 700 d2
60364tar -C d2 --one-top-level=top -xpf d.tar
60365mode=$(genfile --stat=mode.777 d2)
60366if test 700 = $mode; then
60367    echo "DIR: OK"
60368else
60369    echo "DIR: mode changed: 700 != $mode"
60370fi
60371mode=$(genfile --stat=mode.7777 d2/top)
60372if test $mode = $orig_mode; then
60373    echo "TOP: OK"
60374else
60375    echo "TOP: mode changed: $orig_mode != $mode"
60376fi
60377)
60378) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60379at_status=$? at_failed=false
60380$at_check_filter
60381at_fn_diff_devnull "$at_stderr" || at_failed=:
60382echo >>"$at_stdout"; $as_echo "CWD: OK
60383DIR: OK
60384TOP: OK
60385" | \
60386  $at_diff - "$at_stdout" || at_failed=:
60387at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
60388$at_failed && at_fn_log_failure
60389$at_traceon; }
60390
60391              { set +x
60392$as_echo "$at_srcdir/onetop05.at:28:
60393mkdir posix
60394(cd posix
60395TEST_TAR_FORMAT=posix
60396export TEST_TAR_FORMAT
60397TAR_OPTIONS=\"-H posix\"
60398export TAR_OPTIONS
60399rm -rf *
60400
60401orig_mode=3702
60402mkdir d
60403chmod \$orig_mode d
60404
60405mode=\$(genfile --stat=mode.7777 d)
60406test \$mode = \$orig_mode || exit 77
60407
60408genfile --file d/file
60409tar -cf d.tar -C d .
60410rm -rf d
60411
60412(mkdir d1
60413chmod 700 d1
60414cd d1
60415tar --one-top-level=top -xpf ../d.tar)
60416mode=\$(genfile --stat=mode.777 d1)
60417if test 700 = \$mode; then
60418    echo \"CWD: OK\"
60419else
60420    echo \"CWD: mode changed: 700 != \$mode\"
60421fi
60422
60423mkdir d2
60424chmod 700 d2
60425tar -C d2 --one-top-level=top -xpf d.tar
60426mode=\$(genfile --stat=mode.777 d2)
60427if test 700 = \$mode; then
60428    echo \"DIR: OK\"
60429else
60430    echo \"DIR: mode changed: 700 != \$mode\"
60431fi
60432mode=\$(genfile --stat=mode.7777 d2/top)
60433if test \$mode = \$orig_mode; then
60434    echo \"TOP: OK\"
60435else
60436    echo \"TOP: mode changed: \$orig_mode != \$mode\"
60437fi
60438)"
60439at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
60440( $at_check_trace;
60441mkdir posix
60442(cd posix
60443TEST_TAR_FORMAT=posix
60444export TEST_TAR_FORMAT
60445TAR_OPTIONS="-H posix"
60446export TAR_OPTIONS
60447rm -rf *
60448
60449orig_mode=3702
60450mkdir d
60451chmod $orig_mode d
60452
60453mode=$(genfile --stat=mode.7777 d)
60454test $mode = $orig_mode || exit 77
60455
60456genfile --file d/file
60457tar -cf d.tar -C d .
60458rm -rf d
60459
60460(mkdir d1
60461chmod 700 d1
60462cd d1
60463tar --one-top-level=top -xpf ../d.tar)
60464mode=$(genfile --stat=mode.777 d1)
60465if test 700 = $mode; then
60466    echo "CWD: OK"
60467else
60468    echo "CWD: mode changed: 700 != $mode"
60469fi
60470
60471mkdir d2
60472chmod 700 d2
60473tar -C d2 --one-top-level=top -xpf d.tar
60474mode=$(genfile --stat=mode.777 d2)
60475if test 700 = $mode; then
60476    echo "DIR: OK"
60477else
60478    echo "DIR: mode changed: 700 != $mode"
60479fi
60480mode=$(genfile --stat=mode.7777 d2/top)
60481if test $mode = $orig_mode; then
60482    echo "TOP: OK"
60483else
60484    echo "TOP: mode changed: $orig_mode != $mode"
60485fi
60486)
60487) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60488at_status=$? at_failed=false
60489$at_check_filter
60490at_fn_diff_devnull "$at_stderr" || at_failed=:
60491echo >>"$at_stdout"; $as_echo "CWD: OK
60492DIR: OK
60493TOP: OK
60494" | \
60495  $at_diff - "$at_stdout" || at_failed=:
60496at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
60497$at_failed && at_fn_log_failure
60498$at_traceon; }
60499
60500              { set +x
60501$as_echo "$at_srcdir/onetop05.at:28:
60502mkdir gnu
60503(cd gnu
60504TEST_TAR_FORMAT=gnu
60505export TEST_TAR_FORMAT
60506TAR_OPTIONS=\"-H gnu\"
60507export TAR_OPTIONS
60508rm -rf *
60509
60510orig_mode=3702
60511mkdir d
60512chmod \$orig_mode d
60513
60514mode=\$(genfile --stat=mode.7777 d)
60515test \$mode = \$orig_mode || exit 77
60516
60517genfile --file d/file
60518tar -cf d.tar -C d .
60519rm -rf d
60520
60521(mkdir d1
60522chmod 700 d1
60523cd d1
60524tar --one-top-level=top -xpf ../d.tar)
60525mode=\$(genfile --stat=mode.777 d1)
60526if test 700 = \$mode; then
60527    echo \"CWD: OK\"
60528else
60529    echo \"CWD: mode changed: 700 != \$mode\"
60530fi
60531
60532mkdir d2
60533chmod 700 d2
60534tar -C d2 --one-top-level=top -xpf d.tar
60535mode=\$(genfile --stat=mode.777 d2)
60536if test 700 = \$mode; then
60537    echo \"DIR: OK\"
60538else
60539    echo \"DIR: mode changed: 700 != \$mode\"
60540fi
60541mode=\$(genfile --stat=mode.7777 d2/top)
60542if test \$mode = \$orig_mode; then
60543    echo \"TOP: OK\"
60544else
60545    echo \"TOP: mode changed: \$orig_mode != \$mode\"
60546fi
60547)"
60548at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
60549( $at_check_trace;
60550mkdir gnu
60551(cd gnu
60552TEST_TAR_FORMAT=gnu
60553export TEST_TAR_FORMAT
60554TAR_OPTIONS="-H gnu"
60555export TAR_OPTIONS
60556rm -rf *
60557
60558orig_mode=3702
60559mkdir d
60560chmod $orig_mode d
60561
60562mode=$(genfile --stat=mode.7777 d)
60563test $mode = $orig_mode || exit 77
60564
60565genfile --file d/file
60566tar -cf d.tar -C d .
60567rm -rf d
60568
60569(mkdir d1
60570chmod 700 d1
60571cd d1
60572tar --one-top-level=top -xpf ../d.tar)
60573mode=$(genfile --stat=mode.777 d1)
60574if test 700 = $mode; then
60575    echo "CWD: OK"
60576else
60577    echo "CWD: mode changed: 700 != $mode"
60578fi
60579
60580mkdir d2
60581chmod 700 d2
60582tar -C d2 --one-top-level=top -xpf d.tar
60583mode=$(genfile --stat=mode.777 d2)
60584if test 700 = $mode; then
60585    echo "DIR: OK"
60586else
60587    echo "DIR: mode changed: 700 != $mode"
60588fi
60589mode=$(genfile --stat=mode.7777 d2/top)
60590if test $mode = $orig_mode; then
60591    echo "TOP: OK"
60592else
60593    echo "TOP: mode changed: $orig_mode != $mode"
60594fi
60595)
60596) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60597at_status=$? at_failed=false
60598$at_check_filter
60599at_fn_diff_devnull "$at_stderr" || at_failed=:
60600echo >>"$at_stdout"; $as_echo "CWD: OK
60601DIR: OK
60602TOP: OK
60603" | \
60604  $at_diff - "$at_stdout" || at_failed=:
60605at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
60606$at_failed && at_fn_log_failure
60607$at_traceon; }
60608
60609
60610
60611
60612  set +x
60613  $at_times_p && times >"$at_times_file"
60614) 5>&1 2>&1 7>&- | eval $at_tee_pipe
60615read at_status <"$at_status_file"
60616#AT_STOP_232
60617#AT_START_233
60618at_fn_group_banner 233 'gtarfail.at:21' \
60619  "gtarfail" "                                       " 33
60620at_xfail=no
60621(
60622  $as_echo "233. $at_setup_line: testing $at_desc ..."
60623  $at_traceon
60624
60625
60626
60627unset TAR_OPTIONS
60628
60629{ set +x
60630$as_echo "$at_srcdir/gtarfail.at:26:
60631
60632test -z \"\$STAR_TESTSCRIPTS\" && exit 77
60633tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
60634
60635
60636tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail.tar
60637"
60638at_fn_check_prepare_notrace 'an embedded newline' "gtarfail.at:26"
60639( $at_check_trace;
60640
60641test -z "$STAR_TESTSCRIPTS" && exit 77
60642tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
60643
60644
60645tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
60646
60647) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60648at_status=$? at_failed=false
60649$at_check_filter
60650at_fn_diff_devnull "$at_stderr" || at_failed=:
60651echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone       518 2001-05-25 14:41 vedpowered.gif
60652-rw-r--r-- jes/glone      6825 1997-04-29 00:19 cd.gif
60653-rw-r--r-- jes/glone     33354 1999-06-22 12:17 DSCN0049c.JPG
60654-rw-r--r-- jes/glone     86159 2001-06-05 18:16 Window1.jpg
60655-rw-r--r-- jes/glone      1310 2001-05-25 13:05 vipower.gif
60656-rw-rw-rw- jes/glone    148753 1998-09-15 13:08 billyboy.jpg
60657" | \
60658  $at_diff - "$at_stdout" || at_failed=:
60659at_fn_check_status 0 $at_status "$at_srcdir/gtarfail.at:26"
60660$at_failed && at_fn_log_failure
60661$at_traceon; }
60662
60663
60664  set +x
60665  $at_times_p && times >"$at_times_file"
60666) 5>&1 2>&1 7>&- | eval $at_tee_pipe
60667read at_status <"$at_status_file"
60668#AT_STOP_233
60669#AT_START_234
60670at_fn_group_banner 234 'gtarfail2.at:21' \
60671  "gtarfail2" "                                      " 33
60672at_xfail=no
60673(
60674  $as_echo "234. $at_setup_line: testing $at_desc ..."
60675  $at_traceon
60676
60677
60678
60679unset TAR_OPTIONS
60680
60681{ set +x
60682$as_echo "$at_srcdir/gtarfail2.at:26:
60683
60684test -z \"\$STAR_TESTSCRIPTS\" && exit 77
60685tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
60686
60687tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail2.tar
60688"
60689at_fn_check_prepare_notrace 'an embedded newline' "gtarfail2.at:26"
60690( $at_check_trace;
60691
60692test -z "$STAR_TESTSCRIPTS" && exit 77
60693tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
60694
60695tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
60696
60697) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60698at_status=$? at_failed=false
60699$at_check_filter
60700at_fn_diff_devnull "$at_stderr" || at_failed=:
60701echo >>"$at_stdout"; $as_echo "-rwxr-xr-x jes/glone       214 2001-09-21 14:08 .clean
60702lrwxrwxrwx jes/cats          0 1998-05-07 12:39 RULES -> makefiles/RULES
60703drwxr-sr-x jes/glone         0 2001-12-10 00:00 build/
60704-rw-r--r-- jes/glone    312019 2001-12-10 00:00 build/smake-1.2.tar.gz
60705drwxr-sr-x jes/glone         0 2001-11-09 18:20 build/psmake/
60706-rwxr-xr-x jes/glone       259 2000-01-09 16:36 build/psmake/MAKE
60707-rwxr-xr-x jes/glone      4820 2001-02-25 22:45 build/psmake/MAKE.sh
60708-rw-r--r-- jes/glone       647 2001-02-25 23:50 build/psmake/Makefile
60709lrwxrwxrwx jes/glone         0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c
60710lrwxrwxrwx jes/glone         0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c
60711" | \
60712  $at_diff - "$at_stdout" || at_failed=:
60713at_fn_check_status 0 $at_status "$at_srcdir/gtarfail2.at:26"
60714$at_failed && at_fn_log_failure
60715$at_traceon; }
60716
60717
60718  set +x
60719  $at_times_p && times >"$at_times_file"
60720) 5>&1 2>&1 7>&- | eval $at_tee_pipe
60721read at_status <"$at_status_file"
60722#AT_STOP_234
60723#AT_START_235
60724at_fn_group_banner 235 'multi-fail.at:21' \
60725  "multi-fail" "                                     " 33
60726at_xfail=no
60727(
60728  $as_echo "235. $at_setup_line: testing $at_desc ..."
60729  $at_traceon
60730
60731
60732
60733unset TAR_OPTIONS
60734
60735{ set +x
60736$as_echo "$at_srcdir/multi-fail.at:26:
60737
60738test -z \"\$STAR_TESTSCRIPTS\" && exit 77
60739tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
60740
60741
60742test -z \"\$STAR_TESTSCRIPTS\" && exit 77
60743tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
60744
60745
60746tar --utc -tvM -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \\
60747               -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
60748"
60749at_fn_check_prepare_notrace 'an embedded newline' "multi-fail.at:26"
60750( $at_check_trace;
60751
60752test -z "$STAR_TESTSCRIPTS" && exit 77
60753tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
60754
60755
60756test -z "$STAR_TESTSCRIPTS" && exit 77
60757tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
60758
60759
60760tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
60761               -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
60762
60763) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60764at_status=$? at_failed=false
60765$at_check_filter
60766at_fn_diff_devnull "$at_stderr" || at_failed=:
60767echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs          0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/
60768-rw-r--r-- joerg/bs          1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull
60769-rw-r--r-- joerg/bs       1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d
60770-rw-r--r-- joerg/bs       1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d
60771-rw-r--r-- joerg/bs       1540 2003-10-10 18:06 OBJ/i386-sunos5-gcc/cpiohdr.d
60772-rw-r--r-- joerg/bs       2245 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xheader.d
60773-rw-r--r-- joerg/bs       1254 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xattr.d
60774-rw-r--r-- joerg/bs       1330 2003-10-10 18:06 OBJ/i386-sunos5-gcc/list.d
60775-rw-r--r-- joerg/bs       1745 2003-10-10 18:06 OBJ/i386-sunos5-gcc/extract.d
60776-rw-r--r-- joerg/bs       1518 2003-10-10 18:06 OBJ/i386-sunos5-gcc/create.d
60777-rw-r--r-- joerg/bs       1235 2003-10-10 18:06 OBJ/i386-sunos5-gcc/append.d
60778-rw-r--r-- joerg/bs       1368 2003-10-10 18:06 OBJ/i386-sunos5-gcc/diff.d
60779-rw-r--r-- joerg/bs       1423 2003-10-10 18:06 OBJ/i386-sunos5-gcc/remove.d
60780-rw-r--r-- joerg/bs       1493 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.d
60781-rw-r--r-- joerg/bs       1572 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.d
60782-rw-r--r-- joerg/bs       1453 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.d
60783-rw-r--r-- joerg/bs       2257 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.d
60784-rw-r--r-- joerg/bs        969 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.d
60785-rw-r--r-- joerg/bs       1308 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.d
60786-rw-r--r-- joerg/bs       1287 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.d
60787-rw-r--r-- joerg/bs       1105 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.d
60788-rw-r--r-- joerg/bs       1230 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.d
60789-rw-r--r-- joerg/bs       1091 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.d
60790-rw-r--r-- joerg/bs        961 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.d
60791-rw-r--r-- joerg/bs       1113 2003-10-10 18:07 OBJ/i386-sunos5-gcc/props.d
60792-rw-r--r-- joerg/bs       2146 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fetchdir.d
60793-rw-r--r-- joerg/bs       1093 2003-10-10 18:07 OBJ/i386-sunos5-gcc/unicode.d
60794-rw-r--r-- joerg/bs       1211 2003-10-10 18:07 OBJ/i386-sunos5-gcc/subst.d
60795-rw-r--r-- joerg/bs       2076 2003-10-11 11:53 OBJ/i386-sunos5-gcc/volhdr.d
60796-rw-r--r-- joerg/bs       1480 2003-10-10 18:07 OBJ/i386-sunos5-gcc/chdir.d
60797-rw-r--r-- joerg/bs      42460 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star.o
60798-rw-r--r-- joerg/bs      22564 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.o
60799-rw-r--r-- joerg/bs       7880 2003-10-10 18:07 OBJ/i386-sunos5-gcc/cpiohdr.o
60800-rw-r--r-- joerg/bs      14624 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xheader.o
60801-rw-r--r-- joerg/bs        924 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xattr.o
60802-rw-r--r-- joerg/bs       6120 2003-10-10 18:07 OBJ/i386-sunos5-gcc/list.o
60803-rw-r--r-- joerg/bs      12764 2003-10-10 18:07 OBJ/i386-sunos5-gcc/extract.o
60804-rw-r--r-- joerg/bs      14668 2003-10-10 18:07 OBJ/i386-sunos5-gcc/create.o
60805-rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/append.o
60806-rw-r--r-- joerg/bs       7636 2003-10-10 18:07 OBJ/i386-sunos5-gcc/diff.o
60807-rw-r--r-- joerg/bs       3072 2003-10-10 18:07 OBJ/i386-sunos5-gcc/remove.o
60808-rw-r--r-- joerg/bs       5612 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.o
60809-rw-r--r-- joerg/bs       6220 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.o
60810-rw-r--r-- joerg/bs       1092 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.o
60811-rw-r--r-- joerg/bs      20996 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.o
60812-rw-r--r-- joerg/bs       2060 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.o
60813-rw-r--r-- joerg/bs       1664 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.o
60814-rw-r--r-- joerg/bs      10564 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.o
60815-rw-r--r-- joerg/bs       3864 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.o
60816-rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o
60817-rw-r--r-- joerg/bs        952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o
60818-rw-r--r-- joerg/bs       2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o
60819" | \
60820  $at_diff - "$at_stdout" || at_failed=:
60821at_fn_check_status 0 $at_status "$at_srcdir/multi-fail.at:26"
60822$at_failed && at_fn_log_failure
60823$at_traceon; }
60824
60825
60826  set +x
60827  $at_times_p && times >"$at_times_file"
60828) 5>&1 2>&1 7>&- | eval $at_tee_pipe
60829read at_status <"$at_status_file"
60830#AT_STOP_235
60831#AT_START_236
60832at_fn_group_banner 236 'ustar-big-2g.at:21' \
60833  "ustar-big-2g" "                                   " 33
60834at_xfail=no
60835(
60836  $as_echo "236. $at_setup_line: testing $at_desc ..."
60837  $at_traceon
60838
60839
60840
60841unset TAR_OPTIONS
60842
60843{ set +x
60844$as_echo "$at_srcdir/ustar-big-2g.at:26:
60845test \"\${TARTEST_SKIP_LARGE_FILES:-0}\" != 0 && exit 77
60846
60847cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
60848
60849
60850test -z \"\$STAR_TESTSCRIPTS\" && exit 77
60851tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
60852
60853
60854tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
60855"
60856at_fn_check_prepare_notrace 'a ${...} parameter expansion' "ustar-big-2g.at:26"
60857( $at_check_trace;
60858test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && exit 77
60859
60860cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
60861
60862
60863test -z "$STAR_TESTSCRIPTS" && exit 77
60864tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
60865
60866
60867tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
60868
60869) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60870at_status=$? at_failed=false
60871$at_check_filter
60872echo stderr:; tee stderr <"$at_stderr"
60873echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big
60874-rw-r--r-- jes/glone          0 2002-06-15 14:53 file
60875" | \
60876  $at_diff - "$at_stdout" || at_failed=:
60877at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:26"
60878$at_failed && at_fn_log_failure
60879$at_traceon; }
60880
60881
60882
60883cat >stderr.re <<'_ATEOF'
60884tar: Record size = .*
60885_ATEOF
60886
60887awk '{print NR " " $0}' stderr > $$.1
60888awk '{print NR " " $0}' stderr.re | join - $$.1 |
60889while read NUM RE LINE
60890do
60891  echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
60892done
60893
60894
60895  set +x
60896  $at_times_p && times >"$at_times_file"
60897) 5>&1 2>&1 7>&- | eval $at_tee_pipe
60898read at_status <"$at_status_file"
60899#AT_STOP_236
60900#AT_START_237
60901at_fn_group_banner 237 'ustar-big-8g.at:21' \
60902  "ustar-big-8g" "                                   " 33
60903at_xfail=no
60904(
60905  $as_echo "237. $at_setup_line: testing $at_desc ..."
60906  $at_traceon
60907
60908
60909
60910unset TAR_OPTIONS
60911
60912{ set +x
60913$as_echo "$at_srcdir/ustar-big-8g.at:26:
60914test \"\${TARTEST_SKIP_LARGE_FILES:-0}\" != 0 && exit 77
60915
60916cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
60917
60918
60919test -z \"\$STAR_TESTSCRIPTS\" && exit 77
60920tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
60921
60922
60923tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
60924"
60925at_fn_check_prepare_notrace 'a ${...} parameter expansion' "ustar-big-8g.at:26"
60926( $at_check_trace;
60927test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && exit 77
60928
60929cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
60930
60931
60932test -z "$STAR_TESTSCRIPTS" && exit 77
60933tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
60934
60935
60936tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
60937
60938) >>"$at_stdout" 2>>"$at_stderr" 5>&-
60939at_status=$? at_failed=false
60940$at_check_filter
60941echo stderr:; tee stderr <"$at_stderr"
60942echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1
60943-rw-r--r-- jes/glone          0 2002-06-15 14:53 file
60944" | \
60945  $at_diff - "$at_stdout" || at_failed=:
60946at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:26"
60947$at_failed && at_fn_log_failure
60948$at_traceon; }
60949
60950
60951
60952cat >stderr.re <<'_ATEOF'
60953tar: Record size = .*
60954_ATEOF
60955
60956awk '{print NR " " $0}' stderr > $$.1
60957awk '{print NR " " $0}' stderr.re | join - $$.1 |
60958while read NUM RE LINE
60959do
60960  echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
60961done
60962
60963
60964  set +x
60965  $at_times_p && times >"$at_times_file"
60966) 5>&1 2>&1 7>&- | eval $at_tee_pipe
60967read at_status <"$at_status_file"
60968#AT_STOP_237
60969#AT_START_238
60970at_fn_group_banner 238 'pax-big-10g.at:21' \
60971  "pax-big-10g" "                                    " 33
60972at_xfail=no
60973(
60974  $as_echo "238. $at_setup_line: testing $at_desc ..."
60975  $at_traceon
60976
60977
60978
60979unset TAR_OPTIONS
60980
60981{ set +x
60982$as_echo "$at_srcdir/pax-big-10g.at:26:
60983test \"\${TARTEST_SKIP_LARGE_FILES:-0}\" != 0 && exit 77
60984
60985cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
60986
60987
60988test -z \"\$STAR_TESTSCRIPTS\" && exit 77
60989tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
60990
60991
60992tar --utc -tvjf \$STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
60993"
60994at_fn_check_prepare_notrace 'a ${...} parameter expansion' "pax-big-10g.at:26"
60995( $at_check_trace;
60996test "${TARTEST_SKIP_LARGE_FILES:-0}" != 0 && exit 77
60997
60998cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
60999
61000
61001test -z "$STAR_TESTSCRIPTS" && exit 77
61002tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
61003
61004
61005tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
61006
61007) >>"$at_stdout" 2>>"$at_stderr" 5>&-
61008at_status=$? at_failed=false
61009$at_check_filter
61010echo stderr:; tee stderr <"$at_stderr"
61011echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g
61012-rw-r--r-- jes/glone           0 2002-06-15 14:53 file
61013" | \
61014  $at_diff - "$at_stdout" || at_failed=:
61015at_fn_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:26"
61016$at_failed && at_fn_log_failure
61017$at_traceon; }
61018
61019
61020
61021cat >stderr.re <<'_ATEOF'
61022tar: Record size = .*
61023_ATEOF
61024
61025awk '{print NR " " $0}' stderr > $$.1
61026awk '{print NR " " $0}' stderr.re | join - $$.1 |
61027while read NUM RE LINE
61028do
61029  echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
61030done
61031
61032
61033  set +x
61034  $at_times_p && times >"$at_times_file"
61035) 5>&1 2>&1 7>&- | eval $at_tee_pipe
61036read at_status <"$at_status_file"
61037#AT_STOP_238
61038