re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / testsuite
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
13 DUALCASE=1; export DUALCASE # for MKS sh
14 if 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
21 else
22   case `(set -o) 2>/dev/null` in #(
23   *posix*) :
24     set -o posix ;; #(
25   *) :
26      ;;
27 esac
28 fi
29
30
31 as_nl='
32 '
33 export as_nl
34 # Printing a long string crashes Solaris 7 /usr/bin/printf.
35 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
37 as_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.
40 if 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 --'
44 elif (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'
47 else
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'
67 fi
68
69 # The user is always right.
70 if 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   }
76 fi
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.)
84 IFS=" ""        $as_nl"
85
86 # Find who we are.  Look in the path if we contain no directory separator.
87 as_myself=
88 case $0 in #((
89   *[\\/]* ) as_myself=$0 ;;
90   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91 for as_dir in $PATH
92 do
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
97 IFS=$as_save_IFS
98
99      ;;
100 esac
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.
103 if test "x$as_myself" = x; then
104   as_myself=$0
105 fi
106 if test ! -f "$as_myself"; then
107   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
108   exit 1
109 fi
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.
115 for as_var in BASH_ENV ENV MAIL MAILPATH
116 do eval test x\${$as_var+set} = xset \
117   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
118 done
119 PS1='$ '
120 PS2='> '
121 PS4='+ '
122
123 # NLS nuisances.
124 LC_ALL=C
125 export LC_ALL
126 LANGUAGE=C
127 export LANGUAGE
128
129 # CDPATH.
130 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
131
132 if 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
140 else
141   case \`(set -o) 2>/dev/null\` in #(
142   *posix*) :
143     set -o posix ;; #(
144   *) :
145      ;;
146 esac
147 fi
148 "
149   as_required="as_fn_return () { (exit \$1); }
150 as_fn_success () { as_fn_return 0; }
151 as_fn_failure () { as_fn_return 1; }
152 as_fn_ret_success () { return 0; }
153 as_fn_ret_failure () { return 1; }
154
155 exitcode=0
156 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
157 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
158 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
159 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
160 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
161
162 else
163   exitcode=1; echo positional parameters were not saved.
164 fi
165 test x\$exitcode = x0 || exit 1
166 test -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
171 test \$(( 1 + 1 )) = 2 || exit 1"
172   if (eval "$as_required") 2>/dev/null; then :
173   as_have_required=yes
174 else
175   as_have_required=no
176 fi
177   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
178
179 else
180   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
181 as_found=false
182 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
183 do
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
197 fi
198 fi
199            done;;
200        esac
201   as_found=false
202 done
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
206 fi; }
207 IFS=$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.
216 BASH_ENV=/dev/null
217 ENV=/dev/null
218 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
219 case $- in # ((((
220   *v*x* | *x*v* ) as_opts=-vx ;;
221   *v* ) as_opts=-v ;;
222   *x* ) as_opts=-x ;;
223   * ) as_opts= ;;
224 esac
225 exec $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
229 exit 255
230 fi
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
245 fi
246 fi
247 fi
248 SHELL=${CONFIG_SHELL-/bin/sh}
249 export SHELL
250 # Unset more variables known to interfere with behavior of common tools.
251 CLICOLOR_FORCE= GREP_OPTIONS=
252 unset CLICOLOR_FORCE GREP_OPTIONS
253
254 ## --------------------- ##
255 ## M4sh Shell Functions. ##
256 ## --------------------- ##
257 # as_fn_unset VAR
258 # ---------------
259 # Portably unset VAR.
260 as_fn_unset ()
261 {
262   { eval $1=; unset $1;}
263 }
264 as_unset=as_fn_unset
265
266 # as_fn_set_status STATUS
267 # -----------------------
268 # Set $? to STATUS, without forking.
269 as_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.
277 as_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.
287 as_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.
335 as_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.
345 if (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   }'
350 else
351   as_fn_append ()
352   {
353     eval $1=\$$1\$2
354   }
355 fi # 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.
362 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
363   eval 'as_fn_arith ()
364   {
365     as_val=$(( $* ))
366   }'
367 else
368   as_fn_arith ()
369   {
370     as_val=`expr "$@" || test $? -eq 1`
371   }
372 fi # 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.
380 as_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
391 if expr a : '\(a\)' >/dev/null 2>&1 &&
392    test "X`expr 00001 : '.*\(...\)'`" = X001; then
393   as_expr=expr
394 else
395   as_expr=false
396 fi
397
398 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
399   as_basename=basename
400 else
401   as_basename=false
402 fi
403
404 as_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
423 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
424   as_dirname=dirname
425 else
426   as_dirname=false
427 fi
428
429 # Avoid depending upon Character Ranges.
430 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
431 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
432 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
433 as_cr_digits='0123456789'
434 as_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
472 ECHO_C= ECHO_N= ECHO_T=
473 case `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';;
483 esac
484
485 rm -f conf$$ conf$$.exe conf$$.file
486 if test -d conf$$.dir; then
487   rm -f conf$$.dir/conf$$.file
488 else
489   rm -f conf$$.dir
490   mkdir conf$$.dir 2>/dev/null
491 fi
492 if (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
506 else
507   as_ln_s='cp -pR'
508 fi
509 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
510 rmdir conf$$.dir 2>/dev/null
511
512 if mkdir -p . 2>/dev/null; then
513   as_mkdir_p='mkdir -p "$as_dir"'
514 else
515   test -d ./-p && rmdir ./-p
516   as_mkdir_p=false
517 fi
518
519 as_test_x='test -x'
520 as_executable_p=as_fn_executable_p
521
522 # Sed expression to map a string onto a valid CPP name.
523 as_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.
526 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529
530
531
532 SHELL=${CONFIG_SHELL-/bin/sh}
533
534 # How were we run?
535 at_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.
540 at_times_p=false
541 (times) >/dev/null 2>&1 && at_times_p=:
542
543 # CLI Arguments to pass to the debugging scripts.
544 at_debug_args=
545 # -e sets to true
546 at_errexit_p=false
547 # Shall we be verbose?  ':' means no, empty means yes.
548 at_verbose=:
549 at_quiet=
550 # Running several jobs in parallel, 0 means as many as test groups.
551 at_jobs=1
552 at_traceon=:
553 at_trace_echo=:
554 at_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.
558 at_debug_p=false
559 # Display help message?
560 at_help_p=false
561 # Display the version message?
562 at_version_p=false
563 # List test groups?
564 at_list_p=false
565 # --clean
566 at_clean=false
567 # Test groups to run
568 at_groups=
569 # Whether to rerun failed tests.
570 at_recheck=
571 # Whether a write failure occurred
572 at_write_fail=0
573
574 # The directory we run the suite in.  Default to . if no -C option.
575 at_dir=`pwd`
576 # An absolute reference to this testsuite script.
577 case $as_myself in
578   [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
579   * ) at_myself=$at_dir/$as_myself ;;
580 esac
581 # Whether -C is in effect.
582 at_change_dir=false
583
584 # Whether to enable colored test results.
585 at_color=no
586 # List of the tested programs.
587 at_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.
591 at_format='???'
592 # Description of all the test groups.
593 at_help_all="1;version.at:20;tar version;;
594 2;pipe.at:29;decompressing from stdin;pipe;
595 3;options.at:25;mixing options;options options00;
596 4;options02.at:27;interspersed options;options options02;
597 5;opcomp01.at:21;occurrence compatibility;opcomp opcomp01;
598 6;opcomp02.at:21;occurrence compatibility;opcomp opcomp02;
599 7;opcomp03.at:21;--verify compatibility;opcomp opcomp03;
600 8;opcomp04.at:21;compress option compatibility;opcomp opcomp04;
601 9;opcomp05.at:21;--pax-option compatibility;opcomp opcomp05;
602 10;opcomp06.at:21;--pax-option compatibility;opcomp opcomp06;
603 11;T-mult.at:21;multiple file lists;files-from t-mult;
604 12;T-nest.at:21;nested file lists;files-from t-nest;
605 13;T-rec.at:21;recursive file lists;files-from t-rec;
606 14;T-recurse.at:27;files-from & recurse: toggle;recurse t-recurse files-from;
607 15;T-recurse.at:66;toggle --recursion (not) from -T;recurse t-recurse t-recurse2 files-from;
608 16;T-cd.at:21;-C in file lists;files-from t-cd;
609 17;T-empty.at:26;empty entries;files-from empty-line;
610 18;T-null.at:21;0-separated file without -0;files-from null t-null;
611 19;T-null2.at:17;--null enables verbatim reading;files-from null t-null2 t-verbatim;
612 20;T-zfile.at:26;empty file;files-from empty-file;
613 21;T-nonl.at:27;entries with missing newlines;files-from nonewline nonl t-nonl;
614 22;T-dir00.at:28;recursive extraction from --files-from;files-from extract t-dir t-dir00;
615 23;T-dir01.at:28;trailing slash in --files-from;files-from extract t-dir t-dir01;
616 24;indexfile.at:26;tar --index-file=FILE --file=-;stdout indexfile;
617 25;verbose.at:26;tar cvf -;stdout verbose;
618 26;gzip.at:24;gzip;gzip;
619 27;recurse.at:21;recurse;recurse;
620 28;recurs02.at:30;recurse: toggle;recurse options recurse02;
621 29;shortrec.at:26;short records;shortrec;
622 30;numeric.at:18;--numeric-owner basic tests;options numeric numeric-owner;
623 31;same-order01.at:27;working -C with --same-order;same-order same-order01;
624 32;same-order02.at:26;multiple -C options;same-order same-order02;
625 33;append.at:22;append;append append00;
626 34;append01.at:29;appending files with long names;append append01;
627 35;append02.at:55;append vs. create;append append02 append-gnu;
628 36;append03.at:21;append with name transformation;append append03;
629 37;append04.at:29;append with verify;append append04 verify append-verify;
630 38;append05.at:32;append after changed blocking;append append05 blocking;
631 39;xform-h.at:30;transforming hard links on create;transform xform xform-h;
632 40;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume;
633 41;xform02.at:21;transforming escaped delimiters on create;transform xform delimiter;
634 42;exclude.at:23;exclude;exclude;
635 43;exclude01.at:19;exclude wildcards;exclude exclude01;
636 44;exclude02.at:19;exclude: anchoring;exclude exclude02;
637 45;exclude03.at:19;exclude: wildcards match slash;exclude exclude03;
638 46;exclude04.at:19;exclude: case insensitive;exclude exclude04;
639 47;exclude05.at:21;exclude: lots of excludes;exclude exclude05;
640 48;exclude06.at:26;exclude: long files in pax archives;exclude exclude06;
641 49;exclude07.at:19;exclude: --exclude-backups option;exclude exclude07;
642 50;exclude08.at:36;--exclude-tag option;exclude exclude-tag exclude08;
643 51;exclude09.at:37;--exclude-tag option and --listed-incremental;exclude exclude-tag listed incremental exclude09;
644 52;exclude10.at:38;--exclude-tag option in incremental pass;exclude exclude-tag listed incremental exclude10;
645 53;exclude11.at:36;--exclude-tag-under option;exclude exclude-tag exclude-tag-under exclude11;
646 54;exclude12.at:37;--exclude-tag-under and --listed-incremental;exclude exclude-tag exclude-tag-under listed incremental exclude12;
647 55;exclude13.at:39;--exclude-tag-under option in incremental pass;exclude exclude-tag exclude-tag-under listed incremental exclude13;
648 56;exclude14.at:36;--exclude-tag-all option;exclude exclude-tag exclude-tag-all exclude14;
649 57;exclude15.at:36;--exclude-tag-all and --listed-incremental;exclude exclude-tag exclude-tag-all listed incremental exclude15;
650 58;exclude16.at:38;--exclude-tag-all option in incremental pass;exclude exclude-tag exclude-tag-all listed incremental exclude16;
651 59;delete01.at:24;deleting a member after a big one;delete delete01;
652 60;delete02.at:24;deleting a member from stdin archive;delete delete02;
653 61;delete03.at:21;deleting members with long names;delete delete03;
654 62;delete04.at:24;deleting a large last member;delete delete04;
655 63;delete05.at:28;deleting non-existing member;delete delete05;
656 64;extrac01.at:24;extract over an existing directory;extract extract01;
657 65;extrac02.at:24;extracting symlinks over an existing file;extract extract02 symlink;
658 66;extrac03.at:23;extraction loops;extract extract03;
659 67;extrac04.at:24;extract + fnmatch;extract extract04 fnmatch;
660 68;extrac05.at:31;extracting selected members from pax;extract extract05;
661 69;extrac06.at:34;mode of extracted directories;extract extract06 directory mode;
662 70;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink;
663 71;extrac08.at:33;restoring mode on existing directory;extract extrac08;
664 72;extrac09.at:34;extracting even when . and .. are unreadable;extract extrac09;
665 73;extrac10.at:29;-C and delayed setting of metadata;extract extrac10;
666 74;extrac11.at:25;scarce file descriptors;extract extrac11;
667 75;extrac12.at:25;extract dot permissions;extract extrac12;
668 76;extrac13.at:26;extract over symlinks;extract extrac13;
669 77;extrac14.at:25;extract -C symlink;extract extrac14;
670 78;extrac15.at:25;extract parent mkdir failure;extract extrac15;
671 79;extrac16.at:26;extract empty directory with -C;extract extrac16;
672 80;extrac17.at:21;name matching/transformation ordering;extract extrac17;
673 81;extrac18.at:34;keep-old-files;extract extrac18 old-files keep-old-files;
674 82;extrac19.at:21;skip-old-files;extract extrac19 old-files skip-old-files;
675 83;backup01.at:33;extracting existing dir with --backup;extract backup backup01;
676 84;label01.at:21;single-volume label;label label01;
677 85;label02.at:21;multi-volume label;label label02 multi-label multivolume multiv;
678 86;label03.at:27;test-label option;label label03 test-label;
679 87;label04.at:27;label with non-create option;label label04;
680 88;label05.at:24;label with non-create option;label label05;
681 89;incremental.at:23;incremental;incremental listed incr00;
682 90;incr01.at:27;restore broken symlinks from incremental;incremental incr01;
683 91;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02;
684 92;listed01.at:27;--listed for individual files;listed incremental listed01;
685 93;listed02.at:29;working --listed;listed incremental listed02;
686 94;listed03.at:24;incremental dump when the parent directory is unreadable;listed incremental listed03;
687 95;listed04.at:26;--listed-incremental and --one-file-system;listed incremental listed04;
688 96;listed05.at:33;--listed-incremental and remounted directories;listed incremental listed05;
689 97;incr03.at:29;renamed files in incrementals;incremental incr03 rename;
690 98;incr04.at:30;proper icontents initialization;incremental incr04 icontents;
691 99;incr05.at:21;incremental dumps with -C;incremental incr05;
692 100;incr06.at:21;incremental dumps of nested directories;incremental incr06;
693 101;incr07.at:18;incremental restores with -C;incremental extract incr07;
694 102;incr08.at:38;filename normalization;incremental create incr08;
695 103;incr09.at:26;incremental with alternating -C;incremental create incr09;
696 104;incr10.at:18;concatenated incremental archives (deletes);incremental concat cat incr10;
697 105;incr11.at:25;concatenated incremental archives (renames);incremental concat cat incr11;
698 106;filerem01.at:36;file removed as we read it (ca. 22 seconds);create incremental listed filechange filerem filerem01;
699 107;filerem02.at:26;toplevel file removed (ca. 24 seconds);create incremental listed filechange filerem filerem02;
700 108;rename01.at:25;renamed dirs in incrementals;incremental rename rename01;
701 109;rename02.at:25;move between hierarchies;incremental rename rename02;
702 110;rename03.at:24;cyclic renames;incremental rename rename03 cyclic-rename;
703 111;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename;
704 112;rename05.at:24;renamed subdirectories;incremental rename05 rename;
705 113;chtype.at:27;changed file types in incrementals;incremental listed chtype;
706 114;ignfail.at:24;ignfail;ignfail;
707 115;link01.at:34;link count gt 2;hardlinks link01;
708 116;link02.at:32;preserve hard links with --remove-files;hardlinks link02;
709 117;link03.at:24;working -l with --remove-files;hardlinks link03;
710 118;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04;
711 119;longv7.at:25;long names in V7 archives;longname longv7;
712 120;long01.at:28;long file names divisible by block size;longname long512;
713 121;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01;
714 122;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02;
715 123;lustar03.at:21;ustar: splitting long names;longname ustar lustar03;
716 124;old.at:23;old archives;old;
717 125;time01.at:20;time: tricky time stamps;time time01;
718 126;time02.at:20;time: clamping mtime;time time02;
719 127;multiv01.at:24;multivolume dumps from pipes;multivolume multiv multiv01;
720 128;multiv02.at:29;skipping a straddling member;multivolume multiv multiv02;
721 129;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03;
722 130;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental listed multiv04;
723 131;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync;
724 132;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06;
725 133;multiv07.at:28;volumes split at an extended header;multivolume multiv multiv07 xsplit;
726 134;multiv08.at:25;multivolume header creation;multivolume multiv multiv08;
727 135;multiv09.at:26;bad next volume;multivolume multiv multiv09;
728 136;owner.at:21;--owner and --group;owner;
729 137;map.at:21;--owner-map and --group-map;owner map;
730 138;sparse01.at:22;sparse files;sparse sparse01;
731 139;sparse02.at:22;extracting sparse file over a pipe;sparse sparse02;
732 140;sparse03.at:21;storing sparse files > 8G;sparse sparse03;
733 141;sparse04.at:21;storing long sparse file names;sparse sparse04;
734 142;sparse05.at:21;listing sparse files bigger than 2^33 B;sparse sparse05;
735 143;sparse06.at:21;storing sparse file using seek method;sparse sparse06;
736 144;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv;
737 145;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00;
738 146;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01;
739 147;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10;
740 148;update.at:28;update unchanged directories;update update00;
741 149;update01.at:29;update directories;update update01;
742 150;update02.at:26;update changed files;update update02;
743 151;verify.at:25;verify;verify;
744 152;volume.at:24;volume;volume volcheck;
745 153;volsize.at:29;volume header size;volume volsize;
746 154;comprec.at:22;compressed format recognition;comprec;
747 155;shortfile.at:26;short input files;shortfile shortfile0;
748 156;shortupd.at:31;updating short archives;shortfile shortfile1 shortupd;
749 157;truncate.at:29;truncate;truncate filechange;
750 158;grow.at:24;grow;grow filechange;
751 159;sigpipe.at:21;sigpipe handling;sigpipe;
752 160;comperr.at:18;compressor program failure;compress comperr;
753 161;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip;
754 162;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip;
755 163;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03;
756 164;remfiles04a.at:25;remove-files with -C:rel in -c/non-incr. mode;create remove-files remfiles04 remfiles04a;
757 165;remfiles04b.at:33;remove-files with -C:rel in -c/incr. mode;create incremental remove-files remfiles04 remfiles04b;
758 166;remfiles04c.at:33;remove-files with -C:rel in -r mode;create append remove-files remfiles04 remfiles04c;
759 167;remfiles05a.at:34;remove-files with -C:rel,rel in -c/non-incr. mode;create remove-files remfiles05 remfiles05a;
760 168;remfiles05b.at:25;remove-files with -C:rel,rel in -c/incr. mode;create incremental remove-files remfiles05 remfiles05b;
761 169;remfiles05c.at:25;remove-files with -C:rel,rel in -r mode;create append remove-files remfiles05 remfiles05c;
762 170;remfiles06a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles06 remfiles06a;
763 171;remfiles06b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles06 remfiles06b;
764 172;remfiles06c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles06 remfiles06c;
765 173;remfiles07a.at:25;remove-files with -C:abs,rel in -c/non-incr. mode;create remove-files remfiles07 remfiles07a;
766 174;remfiles07b.at:25;remove-files with -C:abs,rel in -c/incr. mode;create incremental remove-files remfiles07 remfiles07b;
767 175;remfiles07c.at:25;remove-files with -C:abs,rel in -r mode;create append remove-files remfiles07 remfiles07c;
768 176;remfiles08a.at:28;remove-files deleting two subdirs in -c/non-incr. mode;create remove-files remfiles08 remfiles08a;
769 177;remfiles08b.at:31;remove-files deleting two subdirs in -c/incr. mode;create incremental remove-files remfiles08 remfiles08b;
770 178;remfiles08c.at:28;remove-files deleting two subdirs in -r mode;create append remove-files remfiles08 remfiles08c;
771 179;remfiles09a.at:25;remove-files on full directory in -c/non-incr. mode;create remove-files remfiles09 remfiles09a;
772 180;remfiles09b.at:29;remove-files on full directory in -c/incr. mode;create incremental remove-files remfiles09 remfiles09b;
773 181;remfiles09c.at:25;remove-files on full directory in -r mode;create append remove-files remfiles09 remfiles09c;
774 182;remfiles10.at:20;remove-files;create remove-files remfiles10;
775 183;xattr01.at:25;xattrs: basic functionality;xattrs xattr01;
776 184;xattr02.at:25;xattrs: change directory with -C option;xattrs xattr02;
777 185;xattr03.at:25;xattrs: trusted.* attributes;xattrs xattr03;
778 186;xattr04.at:26;xattrs: s/open/openat/ regression;xattrs xattr04;
779 187;xattr05.at:28;xattrs: keywords with '=' and '%';xattrs xattr05;
780 188;acls01.at:25;acls: basic functionality;xattrs acls acls01;
781 189;acls02.at:25;acls: work with -C;xattrs acls acls02;
782 190;acls03.at:30;acls: default ACLs;xattrs acls acls03;
783 191;selnx01.at:25;selinux: basic store/restore;xattrs selinux selnx01;
784 192;selacl01.at:25;acls/selinux: special files & fifos;xattrs selinux acls selacls01;
785 193;capabs_raw01.at:25;capabilities: binary store/restore;xattrs capabilities capabs_raw01;
786 194;onetop01.at:21;tar --one-top-level;extract onetop onetop01;
787 195;onetop02.at:21;tar --one-top-level --show-transformed;extract onetop onetop02;
788 196;onetop03.at:21;tar --one-top-level --transform;extract onetop onetop03;
789 197;onetop04.at:21;tar --one-top-level --transform;extract onetop onetop04;
790 198;onetop05.at:21;tar --one-top-level restoring permissions;extract onetop onetop05;
791 199;gtarfail.at:22;gtarfail;star gtarfail;
792 200;gtarfail2.at:22;gtarfail2;star gtarfail2;
793 201;multi-fail.at:22;multi-fail;star multivolume multiv multi-fail;
794 202;ustar-big-2g.at:22;ustar-big-2g;star ustar-big-2g;
795 203;ustar-big-8g.at:22;ustar-big-8g;star ustar-big-8g;
796 204;pax-big-10g.at:22;pax-big-10g;star pax-big-10g;
797 "
798 # List of the all the test groups.
799 at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
800
801 # at_fn_validate_ranges NAME...
802 # -----------------------------
803 # Validate and normalize the test group number contained in each variable
804 # NAME. Leading zeroes are treated as decimal.
805 at_fn_validate_ranges ()
806 {
807   for at_grp
808   do
809     eval at_value=\$$at_grp
810     if test $at_value -lt 1 || test $at_value -gt 204; then
811       $as_echo "invalid test group: $at_value" >&2
812       exit 1
813     fi
814     case $at_value in
815       0*) # We want to treat leading 0 as decimal, like expr and test, but
816           # AS_VAR_ARITH treats it as octal if it uses $(( )).
817           # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
818           # expr fork, but it is not worth the effort to determine if the
819           # shell supports XSI when the user can just avoid leading 0.
820           eval $at_grp='`expr $at_value + 0`' ;;
821     esac
822   done
823 }
824
825 at_prev=
826 for at_option
827 do
828   # If the previous option needs an argument, assign it.
829   if test -n "$at_prev"; then
830     at_option=$at_prev=$at_option
831     at_prev=
832   fi
833
834   case $at_option in
835   *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
836   *)    at_optarg= ;;
837   esac
838
839   # Accept the important Cygnus configure options, so we can diagnose typos.
840
841   case $at_option in
842     --help | -h )
843         at_help_p=:
844         ;;
845
846     --list | -l )
847         at_list_p=:
848         ;;
849
850     --version | -V )
851         at_version_p=:
852         ;;
853
854     --clean | -c )
855         at_clean=:
856         ;;
857
858     --color )
859         at_color=always
860         ;;
861     --color=* )
862         case $at_optarg in
863         no | never | none) at_color=never ;;
864         auto | tty | if-tty) at_color=auto ;;
865         always | yes | force) at_color=always ;;
866         *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
867            as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
868         esac
869         ;;
870
871     --debug | -d )
872         at_debug_p=:
873         ;;
874
875     --errexit | -e )
876         at_debug_p=:
877         at_errexit_p=:
878         ;;
879
880     --verbose | -v )
881         at_verbose=; at_quiet=:
882         ;;
883
884     --trace | -x )
885         at_traceon='set -x'
886         at_trace_echo=echo
887         at_check_filter_trace=at_fn_filter_trace
888         ;;
889
890     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
891         at_fn_validate_ranges at_option
892         as_fn_append at_groups "$at_option$as_nl"
893         ;;
894
895     # Ranges
896     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
897         at_range_start=`echo $at_option |tr -d X-`
898         at_fn_validate_ranges at_range_start
899         at_range=`$as_echo "$at_groups_all" | \
900           sed -ne '/^'$at_range_start'$/,$p'`
901         as_fn_append at_groups "$at_range$as_nl"
902         ;;
903
904     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
905         at_range_end=`echo $at_option |tr -d X-`
906         at_fn_validate_ranges at_range_end
907         at_range=`$as_echo "$at_groups_all" | \
908           sed -ne '1,/^'$at_range_end'$/p'`
909         as_fn_append at_groups "$at_range$as_nl"
910         ;;
911
912     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
913     [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
914     [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
915     [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
916     [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
917     [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
918         at_range_start=`expr $at_option : '\(.*\)-'`
919         at_range_end=`expr $at_option : '.*-\(.*\)'`
920         if test $at_range_start -gt $at_range_end; then
921           at_tmp=$at_range_end
922           at_range_end=$at_range_start
923           at_range_start=$at_tmp
924         fi
925         at_fn_validate_ranges at_range_start at_range_end
926         at_range=`$as_echo "$at_groups_all" | \
927           sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
928         as_fn_append at_groups "$at_range$as_nl"
929         ;;
930
931     # Directory selection.
932     --directory | -C )
933         at_prev=--directory
934         ;;
935     --directory=* )
936         at_change_dir=:
937         at_dir=$at_optarg
938         if test x- = "x$at_dir" ; then
939           at_dir=./-
940         fi
941         ;;
942
943     # Parallel execution.
944     --jobs | -j )
945         at_jobs=0
946         ;;
947     --jobs=* | -j[0-9]* )
948         if test -n "$at_optarg"; then
949           at_jobs=$at_optarg
950         else
951           at_jobs=`expr X$at_option : 'X-j\(.*\)'`
952         fi
953         case $at_jobs in *[!0-9]*)
954           at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
955           as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
956         esac
957         ;;
958
959     # Keywords.
960     --keywords | -k )
961         at_prev=--keywords
962         ;;
963     --keywords=* )
964         at_groups_selected=$at_help_all
965         at_save_IFS=$IFS
966         IFS=,
967         set X $at_optarg
968         shift
969         IFS=$at_save_IFS
970         for at_keyword
971         do
972           at_invert=
973           case $at_keyword in
974           '!'*)
975             at_invert="-v"
976             at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
977             ;;
978           esac
979           # It is on purpose that we match the test group titles too.
980           at_groups_selected=`$as_echo "$at_groups_selected" |
981               grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
982         done
983         # Smash the keywords.
984         at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
985         as_fn_append at_groups "$at_groups_selected$as_nl"
986         ;;
987     --recheck)
988         at_recheck=:
989         ;;
990
991     *=*)
992         at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
993         # Reject names that are not valid shell variable names.
994         case $at_envvar in
995           '' | [0-9]* | *[!_$as_cr_alnum]* )
996             as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
997         esac
998         at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
999         # Export now, but save eval for later and for debug scripts.
1000         export $at_envvar
1001         as_fn_append at_debug_args " $at_envvar='$at_value'"
1002         ;;
1003
1004      *) $as_echo "$as_me: invalid option: $at_option" >&2
1005         $as_echo "Try \`$0 --help' for more information." >&2
1006         exit 1
1007         ;;
1008   esac
1009 done
1010
1011 # Verify our last option didn't require an argument
1012 if test -n "$at_prev"; then :
1013   as_fn_error $? "\`$at_prev' requires an argument"
1014 fi
1015
1016 # The file containing the suite.
1017 at_suite_log=$at_dir/$as_me.log
1018
1019 # Selected test groups.
1020 if test -z "$at_groups$at_recheck"; then
1021   at_groups=$at_groups_all
1022 else
1023   if test -n "$at_recheck" && test -r "$at_suite_log"; then
1024     at_oldfails=`sed -n '
1025       /^Failed tests:$/,/^Skipped tests:$/{
1026         s/^[ ]*\([1-9][0-9]*\):.*/\1/p
1027       }
1028       /^Unexpected passes:$/,/^## Detailed failed tests/{
1029         s/^[ ]*\([1-9][0-9]*\):.*/\1/p
1030       }
1031       /^## Detailed failed tests/q
1032       ' "$at_suite_log"`
1033     as_fn_append at_groups "$at_oldfails$as_nl"
1034   fi
1035   # Sort the tests, removing duplicates.
1036   at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
1037 fi
1038
1039 if test x"$at_color" = xalways \
1040    || { test x"$at_color" = xauto && test -t 1; }; then
1041   at_red=`printf '\033[0;31m'`
1042   at_grn=`printf '\033[0;32m'`
1043   at_lgn=`printf '\033[1;32m'`
1044   at_blu=`printf '\033[1;34m'`
1045   at_std=`printf '\033[m'`
1046 else
1047   at_red= at_grn= at_lgn= at_blu= at_std=
1048 fi
1049
1050 # Help message.
1051 if $at_help_p; then
1052   cat <<_ATEOF || at_write_fail=1
1053 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
1054
1055 Run all the tests, or the selected TESTS, given by numeric ranges, and
1056 save a detailed log file.  Upon failure, create debugging scripts.
1057
1058 Do not change environment variables directly.  Instead, set them via
1059 command line arguments.  Set \`AUTOTEST_PATH' to select the executables
1060 to exercise.  Each relative directory is expanded as build and source
1061 directories relative to the top level of this distribution.
1062 E.g., from within the build directory /tmp/foo-1.0, invoking this:
1063
1064   $ $0 AUTOTEST_PATH=bin
1065
1066 is equivalent to the following, assuming the source directory is /src/foo-1.0:
1067
1068   PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
1069 _ATEOF
1070 cat <<_ATEOF || at_write_fail=1
1071
1072 Operation modes:
1073   -h, --help     print the help message, then exit
1074   -V, --version  print version number, then exit
1075   -c, --clean    remove all the files this test suite might create and exit
1076   -l, --list     describes all the tests, or the selected TESTS
1077 _ATEOF
1078 cat <<_ATEOF || at_write_fail=1
1079
1080 Execution tuning:
1081   -C, --directory=DIR
1082                  change to directory DIR before starting
1083       --color[=never|auto|always]
1084                  enable colored test results on terminal, or always
1085   -j, --jobs[=N]
1086                  Allow N jobs at once; infinite jobs with no arg (default 1)
1087   -k, --keywords=KEYWORDS
1088                  select the tests matching all the comma-separated KEYWORDS
1089                  multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
1090       --recheck  select all tests that failed or passed unexpectedly last time
1091   -e, --errexit  abort as soon as a test fails; implies --debug
1092   -v, --verbose  force more detailed output
1093                  default for debugging scripts
1094   -d, --debug    inhibit clean up and top-level logging
1095                  default for debugging scripts
1096   -x, --trace    enable tests shell tracing
1097 _ATEOF
1098 cat <<_ATEOF || at_write_fail=1
1099
1100 Report bugs to <bug-tar@gnu.org>.
1101 General help using GNU software: <http://www.gnu.org/gethelp/>.
1102 _ATEOF
1103   exit $at_write_fail
1104 fi
1105
1106 # List of tests.
1107 if $at_list_p; then
1108   cat <<_ATEOF || at_write_fail=1
1109 GNU tar 1.29 test suite test groups:
1110
1111  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
1112       KEYWORDS
1113
1114 _ATEOF
1115   # Pass an empty line as separator between selected groups and help.
1116   $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
1117     awk 'NF == 1 && FS != ";" {
1118            selected[$ 1] = 1
1119            next
1120          }
1121          /^$/ { FS = ";" }
1122          NF > 0 {
1123            if (selected[$ 1]) {
1124              printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
1125              if ($ 4) {
1126                lmax = 79
1127                indent = "     "
1128                line = indent
1129                len = length (line)
1130                n = split ($ 4, a, " ")
1131                for (i = 1; i <= n; i++) {
1132                  l = length (a[i]) + 1
1133                  if (i > 1 && len + l > lmax) {
1134                    print line
1135                    line = indent " " a[i]
1136                    len = length (line)
1137                  } else {
1138                    line = line " " a[i]
1139                    len += l
1140                  }
1141                }
1142                if (n)
1143                  print line
1144              }
1145            }
1146          }' || at_write_fail=1
1147   exit $at_write_fail
1148 fi
1149 if $at_version_p; then
1150   $as_echo "$as_me (GNU tar 1.29)" &&
1151   cat <<\_ATEOF || at_write_fail=1
1152
1153 Copyright (C) 2012 Free Software Foundation, Inc.
1154 This test suite is free software; the Free Software Foundation gives
1155 unlimited permission to copy, distribute and modify it.
1156 _ATEOF
1157   exit $at_write_fail
1158 fi
1159
1160 # Should we print banners?  Yes if more than one test is run.
1161 case $at_groups in #(
1162   *$as_nl* )
1163       at_print_banners=: ;; #(
1164   * ) at_print_banners=false ;;
1165 esac
1166 # Text for banner N, set to a single space once printed.
1167 # Banner 1. testsuite.at:208
1168 # Category starts at test group 5.
1169 at_banner_text_1="Option compatibility"
1170 # Banner 2. testsuite.at:216
1171 # Category starts at test group 11.
1172 at_banner_text_2="The -T option"
1173 # Banner 3. testsuite.at:230
1174 # Category starts at test group 24.
1175 at_banner_text_3="Various options"
1176 # Banner 4. testsuite.at:239
1177 # Category starts at test group 31.
1178 at_banner_text_4="The --same-order option"
1179 # Banner 5. testsuite.at:243
1180 # Category starts at test group 33.
1181 at_banner_text_5="Append"
1182 # Banner 6. testsuite.at:251
1183 # Category starts at test group 39.
1184 at_banner_text_6="Transforms"
1185 # Banner 7. testsuite.at:256
1186 # Category starts at test group 42.
1187 at_banner_text_7="Exclude"
1188 # Banner 8. testsuite.at:275
1189 # Category starts at test group 59.
1190 at_banner_text_8="Deletions"
1191 # Banner 9. testsuite.at:282
1192 # Category starts at test group 64.
1193 at_banner_text_9="Extracting"
1194 # Banner 10. testsuite.at:304
1195 # Category starts at test group 84.
1196 at_banner_text_10="Volume label operations"
1197 # Banner 11. testsuite.at:311
1198 # Category starts at test group 89.
1199 at_banner_text_11="Incremental archives"
1200 # Banner 12. testsuite.at:330
1201 # Category starts at test group 106.
1202 at_banner_text_12="Files removed while archiving"
1203 # Banner 13. testsuite.at:334
1204 # Category starts at test group 108.
1205 at_banner_text_13="Renames"
1206 # Banner 14. testsuite.at:342
1207 # Category starts at test group 114.
1208 at_banner_text_14="Ignore failing reads"
1209 # Banner 15. testsuite.at:345
1210 # Category starts at test group 115.
1211 at_banner_text_15="Link handling"
1212 # Banner 16. testsuite.at:351
1213 # Category starts at test group 119.
1214 at_banner_text_16="Specific archive formats"
1215 # Banner 17. testsuite.at:362
1216 # Category starts at test group 127.
1217 at_banner_text_17="Multivolume archives"
1218 # Banner 18. testsuite.at:373
1219 # Category starts at test group 136.
1220 at_banner_text_18="Owner and Groups"
1221 # Banner 19. testsuite.at:377
1222 # Category starts at test group 138.
1223 at_banner_text_19="Sparse files"
1224 # Banner 20. testsuite.at:389
1225 # Category starts at test group 148.
1226 at_banner_text_20="Updates"
1227 # Banner 21. testsuite.at:394
1228 # Category starts at test group 151.
1229 at_banner_text_21="Verifying the archive"
1230 # Banner 22. testsuite.at:397
1231 # Category starts at test group 152.
1232 at_banner_text_22="Volume operations"
1233 # Banner 23. testsuite.at:401
1234 # Category starts at test group 154.
1235 at_banner_text_23=""
1236 # Banner 24. testsuite.at:411
1237 # Category starts at test group 161.
1238 at_banner_text_24="Removing files after archiving"
1239 # Banner 25. testsuite.at:435
1240 # Category starts at test group 183.
1241 at_banner_text_25="Extended attributes"
1242 # Banner 26. testsuite.at:451
1243 # Category starts at test group 194.
1244 at_banner_text_26="One top level"
1245 # Banner 27. testsuite.at:458
1246 # Category starts at test group 199.
1247 at_banner_text_27="Star tests"
1248
1249 # Take any -C into account.
1250 if $at_change_dir ; then
1251   test x != "x$at_dir" && cd "$at_dir" \
1252     || as_fn_error $? "unable to change directory"
1253   at_dir=`pwd`
1254 fi
1255
1256 # Load the config files for any default variable assignments.
1257 for at_file in atconfig atlocal
1258 do
1259   test -r $at_file || continue
1260   . ./$at_file || as_fn_error $? "invalid content: $at_file"
1261 done
1262
1263 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1264 : "${at_top_build_prefix=$at_top_builddir}"
1265
1266 # Perform any assignments requested during argument parsing.
1267 eval "$at_debug_args"
1268
1269 # atconfig delivers names relative to the directory the test suite is
1270 # in, but the groups themselves are run in testsuite-dir/group-dir.
1271 if test -n "$at_top_srcdir"; then
1272   builddir=../..
1273   for at_dir_var in srcdir top_srcdir top_build_prefix
1274   do
1275     eval at_val=\$at_$at_dir_var
1276     case $at_val in
1277       [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1278       *) at_prefix=../../ ;;
1279     esac
1280     eval "$at_dir_var=\$at_prefix\$at_val"
1281   done
1282 fi
1283
1284 ## -------------------- ##
1285 ## Directory structure. ##
1286 ## -------------------- ##
1287
1288 # This is the set of directories and files used by this script
1289 # (non-literals are capitalized):
1290 #
1291 # TESTSUITE         - the testsuite
1292 # TESTSUITE.log     - summarizes the complete testsuite run
1293 # TESTSUITE.dir/    - created during a run, remains after -d or failed test
1294 # + at-groups/      - during a run: status of all groups in run
1295 # | + NNN/          - during a run: meta-data about test group NNN
1296 # | | + check-line  - location (source file and line) of current AT_CHECK
1297 # | | + status      - exit status of current AT_CHECK
1298 # | | + stdout      - stdout of current AT_CHECK
1299 # | | + stder1      - stderr, including trace
1300 # | | + stderr      - stderr, with trace filtered out
1301 # | | + test-source - portion of testsuite that defines group
1302 # | | + times       - timestamps for computing duration
1303 # | | + pass        - created if group passed
1304 # | | + xpass       - created if group xpassed
1305 # | | + fail        - created if group failed
1306 # | | + xfail       - created if group xfailed
1307 # | | + skip        - created if group skipped
1308 # + at-stop         - during a run: end the run if this file exists
1309 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1310 # + 0..NNN/         - created for each group NNN, remains after -d or failed test
1311 # | + TESTSUITE.log - summarizes the group results
1312 # | + ...           - files created during the group
1313
1314 # The directory the whole suite works in.
1315 # Should be absolute to let the user `cd' at will.
1316 at_suite_dir=$at_dir/$as_me.dir
1317 # The file containing the suite ($at_dir might have changed since earlier).
1318 at_suite_log=$at_dir/$as_me.log
1319 # The directory containing helper files per test group.
1320 at_helper_dir=$at_suite_dir/at-groups
1321 # Stop file: if it exists, do not start new jobs.
1322 at_stop_file=$at_suite_dir/at-stop
1323 # The fifo used for the job dispatcher.
1324 at_job_fifo=$at_suite_dir/at-job-fifo
1325
1326 if $at_clean; then
1327   test -d "$at_suite_dir" &&
1328     find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1329   rm -f -r "$at_suite_dir" "$at_suite_log"
1330   exit $?
1331 fi
1332
1333 # Don't take risks: use only absolute directories in PATH.
1334 #
1335 # For stand-alone test suites (ie. atconfig was not found),
1336 # AUTOTEST_PATH is relative to `.'.
1337 #
1338 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1339 # of the package.  Then expand it into build/src parts, since users
1340 # may create executables in both places.
1341 AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1342 at_path=
1343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1344 for as_dir in $AUTOTEST_PATH $PATH
1345 do
1346   IFS=$as_save_IFS
1347   test -z "$as_dir" && as_dir=.
1348     test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1349 case $as_dir in
1350   [\\/]* | ?:[\\/]* )
1351     as_fn_append at_path "$as_dir"
1352     ;;
1353   * )
1354     if test -z "$at_top_build_prefix"; then
1355       # Stand-alone test suite.
1356       as_fn_append at_path "$as_dir"
1357     else
1358       # Embedded test suite.
1359       as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1360       as_fn_append at_path "$at_top_srcdir/$as_dir"
1361     fi
1362     ;;
1363 esac
1364   done
1365 IFS=$as_save_IFS
1366
1367
1368 # Now build and simplify PATH.
1369 #
1370 # There might be directories that don't exist, but don't redirect
1371 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1372 at_new_path=
1373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1374 for as_dir in $at_path
1375 do
1376   IFS=$as_save_IFS
1377   test -z "$as_dir" && as_dir=.
1378     test -d "$as_dir" || continue
1379 case $as_dir in
1380   [\\/]* | ?:[\\/]* ) ;;
1381   * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1382 esac
1383 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1384   *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1385   $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1386   *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1387 esac
1388   done
1389 IFS=$as_save_IFS
1390
1391 PATH=$at_new_path
1392 export PATH
1393
1394 # Setting up the FDs.
1395
1396
1397
1398 # 5 is the log file.  Not to be overwritten if `-d'.
1399 if $at_debug_p; then
1400   at_suite_log=/dev/null
1401 else
1402   : >"$at_suite_log"
1403 fi
1404 exec 5>>"$at_suite_log"
1405
1406 # Banners and logs.
1407 $as_echo "## ------------------------ ##
1408 ## GNU tar 1.29 test suite. ##
1409 ## ------------------------ ##"
1410 {
1411   $as_echo "## ------------------------ ##
1412 ## GNU tar 1.29 test suite. ##
1413 ## ------------------------ ##"
1414   echo
1415
1416   $as_echo "$as_me: command line was:"
1417   $as_echo "  \$ $0 $at_cli_args"
1418   echo
1419
1420   # If ChangeLog exists, list a few lines in case it might help determining
1421   # the exact version.
1422   if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1423     $as_echo "## ---------- ##
1424 ## ChangeLog. ##
1425 ## ---------- ##"
1426     echo
1427     sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1428     echo
1429   fi
1430
1431   {
1432 cat <<_ASUNAME
1433 ## --------- ##
1434 ## Platform. ##
1435 ## --------- ##
1436
1437 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1438 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1439 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1440 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1441 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1442
1443 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1444 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1445
1446 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1447 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1448 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1449 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1450 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1451 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1452 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1453
1454 _ASUNAME
1455
1456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1457 for as_dir in $PATH
1458 do
1459   IFS=$as_save_IFS
1460   test -z "$as_dir" && as_dir=.
1461     $as_echo "PATH: $as_dir"
1462   done
1463 IFS=$as_save_IFS
1464
1465 }
1466   echo
1467
1468   # Contents of the config files.
1469   for at_file in atconfig atlocal
1470   do
1471     test -r $at_file || continue
1472     $as_echo "$as_me: $at_file:"
1473     sed 's/^/| /' $at_file
1474     echo
1475   done
1476 } >&5
1477
1478
1479 ## ------------------------- ##
1480 ## Autotest shell functions. ##
1481 ## ------------------------- ##
1482
1483 # at_fn_banner NUMBER
1484 # -------------------
1485 # Output banner NUMBER, provided the testsuite is running multiple groups and
1486 # this particular banner has not yet been printed.
1487 at_fn_banner ()
1488 {
1489   $at_print_banners || return 0
1490   eval at_banner_text=\$at_banner_text_$1
1491   test "x$at_banner_text" = "x " && return 0
1492   eval "at_banner_text_$1=\" \""
1493   if test -z "$at_banner_text"; then
1494     $at_first || echo
1495   else
1496     $as_echo "$as_nl$at_banner_text$as_nl"
1497   fi
1498 } # at_fn_banner
1499
1500 # at_fn_check_prepare_notrace REASON LINE
1501 # ---------------------------------------
1502 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1503 # command; REASON is the reason for disabling tracing.
1504 at_fn_check_prepare_notrace ()
1505 {
1506   $at_trace_echo "Not enabling shell tracing (command contains $1)"
1507   $as_echo "$2" >"$at_check_line_file"
1508   at_check_trace=: at_check_filter=:
1509   : >"$at_stdout"; : >"$at_stderr"
1510 }
1511
1512 # at_fn_check_prepare_trace LINE
1513 # ------------------------------
1514 # Perform AT_CHECK preparations for the command at LINE for a traceable
1515 # command.
1516 at_fn_check_prepare_trace ()
1517 {
1518   $as_echo "$1" >"$at_check_line_file"
1519   at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1520   : >"$at_stdout"; : >"$at_stderr"
1521 }
1522
1523 # at_fn_check_prepare_dynamic COMMAND LINE
1524 # ----------------------------------------
1525 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1526 # preparation function.
1527 at_fn_check_prepare_dynamic ()
1528 {
1529   case $1 in
1530     *$as_nl*)
1531       at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1532     *)
1533       at_fn_check_prepare_trace "$2" ;;
1534   esac
1535 }
1536
1537 # at_fn_filter_trace
1538 # ------------------
1539 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1540 # them to stderr.
1541 at_fn_filter_trace ()
1542 {
1543   mv "$at_stderr" "$at_stder1"
1544   grep '^ *+' "$at_stder1" >&2
1545   grep -v '^ *+' "$at_stder1" >"$at_stderr"
1546 }
1547
1548 # at_fn_log_failure FILE-LIST
1549 # ---------------------------
1550 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1551 # with a failure exit code.
1552 at_fn_log_failure ()
1553 {
1554   for file
1555     do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1556   echo 1 > "$at_status_file"
1557   exit 1
1558 }
1559
1560 # at_fn_check_skip EXIT-CODE LINE
1561 # -------------------------------
1562 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1563 # the test group subshell with that same exit code. Use LINE in any report
1564 # about test failure.
1565 at_fn_check_skip ()
1566 {
1567   case $1 in
1568     99) echo 99 > "$at_status_file"; at_failed=:
1569         $as_echo "$2: hard failure"; exit 99;;
1570     77) echo 77 > "$at_status_file"; exit 77;;
1571   esac
1572 }
1573
1574 # at_fn_check_status EXPECTED EXIT-CODE LINE
1575 # ------------------------------------------
1576 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1577 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1578 # exit code; if it is anything else print an error message referring to LINE,
1579 # and fail the test.
1580 at_fn_check_status ()
1581 {
1582   case $2 in
1583     $1 ) ;;
1584     77) echo 77 > "$at_status_file"; exit 77;;
1585     99) echo 99 > "$at_status_file"; at_failed=:
1586         $as_echo "$3: hard failure"; exit 99;;
1587     *) $as_echo "$3: exit code was $2, expected $1"
1588       at_failed=:;;
1589   esac
1590 }
1591
1592 # at_fn_diff_devnull FILE
1593 # -----------------------
1594 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1595 # invocations.
1596 at_fn_diff_devnull ()
1597 {
1598   test -s "$1" || return 0
1599   $at_diff "$at_devnull" "$1"
1600 }
1601
1602 # at_fn_test NUMBER
1603 # -----------------
1604 # Parse out test NUMBER from the tail of this file.
1605 at_fn_test ()
1606 {
1607   eval at_sed=\$at_sed$1
1608   sed "$at_sed" "$at_myself" > "$at_test_source"
1609 }
1610
1611 # at_fn_create_debugging_script
1612 # -----------------------------
1613 # Create the debugging script $at_group_dir/run which will reproduce the
1614 # current test group.
1615 at_fn_create_debugging_script ()
1616 {
1617   {
1618     echo "#! /bin/sh" &&
1619     echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1620     $as_echo "cd '$at_dir'" &&
1621     $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1622     echo 'exit 1'
1623   } >"$at_group_dir/run" &&
1624   chmod +x "$at_group_dir/run"
1625 }
1626
1627 ## -------------------------------- ##
1628 ## End of autotest shell functions. ##
1629 ## -------------------------------- ##
1630 {
1631   $as_echo "## ---------------- ##
1632 ## Tested programs. ##
1633 ## ---------------- ##"
1634   echo
1635 } >&5
1636
1637 # Report what programs are being tested.
1638 for at_program in : $at_tested
1639 do
1640   test "$at_program" = : && continue
1641   case $at_program in
1642     [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
1643     * )
1644     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1645 for as_dir in $PATH
1646 do
1647   IFS=$as_save_IFS
1648   test -z "$as_dir" && as_dir=.
1649     test -f "$as_dir/$at_program" && break
1650   done
1651 IFS=$as_save_IFS
1652
1653     at_program_=$as_dir/$at_program ;;
1654   esac
1655   if test -f "$at_program_"; then
1656     {
1657       $as_echo "$at_srcdir/testsuite.at:197: $at_program_ --version"
1658       "$at_program_" --version </dev/null
1659       echo
1660     } >&5 2>&1
1661   else
1662     as_fn_error $? "cannot find $at_program" "$LINENO" 5
1663   fi
1664 done
1665
1666 {
1667   $as_echo "## ------------------ ##
1668 ## Running the tests. ##
1669 ## ------------------ ##"
1670 } >&5
1671
1672 at_start_date=`date`
1673 at_start_time=`date +%s 2>/dev/null`
1674 $as_echo "$as_me: starting at: $at_start_date" >&5
1675
1676 # Create the master directory if it doesn't already exist.
1677 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1678   as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1679
1680 # Can we diff with `/dev/null'?  DU 5.0 refuses.
1681 if diff /dev/null /dev/null >/dev/null 2>&1; then
1682   at_devnull=/dev/null
1683 else
1684   at_devnull=$at_suite_dir/devnull
1685   >"$at_devnull"
1686 fi
1687
1688 # Use `diff -u' when possible.
1689 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1690 then
1691   at_diff='diff -u'
1692 else
1693   at_diff=diff
1694 fi
1695
1696 # Get the last needed group.
1697 for at_group in : $at_groups; do :; done
1698
1699 # Extract the start and end lines of each test group at the tail
1700 # of this file
1701 awk '
1702 BEGIN { FS="\a" }
1703 /^#AT_START_/ {
1704   start = NR
1705 }
1706 /^#AT_STOP_/ {
1707   test = substr ($ 0, 10)
1708   print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1709   if (test == "'"$at_group"'") exit
1710 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1711 . "$at_suite_dir/at-source-lines" ||
1712   as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1713 rm -f "$at_suite_dir/at-source-lines"
1714
1715 # Set number of jobs for `-j'; avoid more jobs than test groups.
1716 set X $at_groups; shift; at_max_jobs=$#
1717 if test $at_max_jobs -eq 0; then
1718   at_jobs=1
1719 fi
1720 if test $at_jobs -ne 1 &&
1721    { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1722   at_jobs=$at_max_jobs
1723 fi
1724
1725 # If parallel mode, don't output banners, don't split summary lines.
1726 if test $at_jobs -ne 1; then
1727   at_print_banners=false
1728   at_quiet=:
1729 fi
1730
1731 # Set up helper dirs.
1732 rm -rf "$at_helper_dir" &&
1733 mkdir "$at_helper_dir" &&
1734 cd "$at_helper_dir" &&
1735 { test -z "$at_groups" || mkdir $at_groups; } ||
1736 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1737
1738 # Functions for running a test group.  We leave the actual
1739 # test group execution outside of a shell function in order
1740 # to avoid hitting zsh 4.x exit status bugs.
1741
1742 # at_fn_group_prepare
1743 # -------------------
1744 # Prepare for running a test group.
1745 at_fn_group_prepare ()
1746 {
1747   # The directory for additional per-group helper files.
1748   at_job_dir=$at_helper_dir/$at_group
1749   # The file containing the location of the last AT_CHECK.
1750   at_check_line_file=$at_job_dir/check-line
1751   # The file containing the exit status of the last command.
1752   at_status_file=$at_job_dir/status
1753   # The files containing the output of the tested commands.
1754   at_stdout=$at_job_dir/stdout
1755   at_stder1=$at_job_dir/stder1
1756   at_stderr=$at_job_dir/stderr
1757   # The file containing the code for a test group.
1758   at_test_source=$at_job_dir/test-source
1759   # The file containing dates.
1760   at_times_file=$at_job_dir/times
1761
1762   # Be sure to come back to the top test directory.
1763   cd "$at_suite_dir"
1764
1765   # Clearly separate the test groups when verbose.
1766   $at_first || $at_verbose echo
1767
1768   at_group_normalized=$at_group
1769
1770   eval 'while :; do
1771     case $at_group_normalized in #(
1772     '"$at_format"'*) break;;
1773     esac
1774     at_group_normalized=0$at_group_normalized
1775   done'
1776
1777
1778   # Create a fresh directory for the next test group, and enter.
1779   # If one already exists, the user may have invoked ./run from
1780   # within that directory; we remove the contents, but not the
1781   # directory itself, so that we aren't pulling the rug out from
1782   # under the shell's notion of the current directory.
1783   at_group_dir=$at_suite_dir/$at_group_normalized
1784   at_group_log=$at_group_dir/$as_me.log
1785   if test -d "$at_group_dir"; then
1786   find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1787   rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1788 fi ||
1789     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1790 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1791   # Be tolerant if the above `rm' was not able to remove the directory.
1792   as_dir="$at_group_dir"; as_fn_mkdir_p
1793
1794   echo 0 > "$at_status_file"
1795
1796   # In verbose mode, append to the log file *and* show on
1797   # the standard output; in quiet mode only write to the log.
1798   if test -z "$at_verbose"; then
1799     at_tee_pipe='tee -a "$at_group_log"'
1800   else
1801     at_tee_pipe='cat >> "$at_group_log"'
1802   fi
1803 }
1804
1805 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1806 # -------------------------------------------------
1807 # Declare the test group ORDINAL, located at LINE with group description DESC,
1808 # and residing under BANNER. Use PAD to align the status column.
1809 at_fn_group_banner ()
1810 {
1811   at_setup_line="$2"
1812   test -n "$5" && at_fn_banner $5
1813   at_desc="$3"
1814   case $1 in
1815     [0-9])      at_desc_line="  $1: ";;
1816     [0-9][0-9]) at_desc_line=" $1: " ;;
1817     *)          at_desc_line="$1: "  ;;
1818   esac
1819   as_fn_append at_desc_line "$3$4"
1820   $at_quiet $as_echo_n "$at_desc_line"
1821   echo "#                             -*- compilation -*-" >> "$at_group_log"
1822 }
1823
1824 # at_fn_group_postprocess
1825 # -----------------------
1826 # Perform cleanup after running a test group.
1827 at_fn_group_postprocess ()
1828 {
1829   # Be sure to come back to the suite directory, in particular
1830   # since below we might `rm' the group directory we are in currently.
1831   cd "$at_suite_dir"
1832
1833   if test ! -f "$at_check_line_file"; then
1834     sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1835       A failure happened in a test group before any test could be
1836       run. This means that test suite is improperly designed.  Please
1837       report this failure to <bug-tar@gnu.org>.
1838 _ATEOF
1839     $as_echo "$at_setup_line" >"$at_check_line_file"
1840     at_status=99
1841   fi
1842   $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1843   $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1844   case $at_xfail:$at_status in
1845     yes:0)
1846         at_msg="UNEXPECTED PASS"
1847         at_res=xpass
1848         at_errexit=$at_errexit_p
1849         at_color=$at_red
1850         ;;
1851     no:0)
1852         at_msg="ok"
1853         at_res=pass
1854         at_errexit=false
1855         at_color=$at_grn
1856         ;;
1857     *:77)
1858         at_msg='skipped ('`cat "$at_check_line_file"`')'
1859         at_res=skip
1860         at_errexit=false
1861         at_color=$at_blu
1862         ;;
1863     no:* | *:99)
1864         at_msg='FAILED ('`cat "$at_check_line_file"`')'
1865         at_res=fail
1866         at_errexit=$at_errexit_p
1867         at_color=$at_red
1868         ;;
1869     yes:*)
1870         at_msg='expected failure ('`cat "$at_check_line_file"`')'
1871         at_res=xfail
1872         at_errexit=false
1873         at_color=$at_lgn
1874         ;;
1875   esac
1876   echo "$at_res" > "$at_job_dir/$at_res"
1877   # In parallel mode, output the summary line only afterwards.
1878   if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1879     $as_echo "$at_desc_line $at_color$at_msg$at_std"
1880   else
1881     # Make sure there is a separator even with long titles.
1882     $as_echo " $at_color$at_msg$at_std"
1883   fi
1884   at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1885   case $at_status in
1886     0|77)
1887       # $at_times_file is only available if the group succeeded.
1888       # We're not including the group log, so the success message
1889       # is written in the global log separately.  But we also
1890       # write to the group log in case they're using -d.
1891       if test -f "$at_times_file"; then
1892         at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
1893         rm -f "$at_times_file"
1894       fi
1895       $as_echo "$at_log_msg" >> "$at_group_log"
1896       $as_echo "$at_log_msg" >&5
1897
1898       # Cleanup the group directory, unless the user wants the files
1899       # or the success was unexpected.
1900       if $at_debug_p || test $at_res = xpass; then
1901         at_fn_create_debugging_script
1902         if test $at_res = xpass && $at_errexit; then
1903           echo stop > "$at_stop_file"
1904         fi
1905       else
1906         if test -d "$at_group_dir"; then
1907           find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1908           rm -fr "$at_group_dir"
1909         fi
1910         rm -f "$at_test_source"
1911       fi
1912       ;;
1913     *)
1914       # Upon failure, include the log into the testsuite's global
1915       # log.  The failure message is written in the group log.  It
1916       # is later included in the global log.
1917       $as_echo "$at_log_msg" >> "$at_group_log"
1918
1919       # Upon failure, keep the group directory for autopsy, and create
1920       # the debugging script.  With -e, do not start any further tests.
1921       at_fn_create_debugging_script
1922       if $at_errexit; then
1923         echo stop > "$at_stop_file"
1924       fi
1925       ;;
1926   esac
1927 }
1928
1929
1930 ## ------------ ##
1931 ## Driver loop. ##
1932 ## ------------ ##
1933
1934
1935 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1936   set +b
1937   at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1938 else
1939   at_job_control_on=: at_job_control_off=: at_job_group=
1940 fi
1941
1942 for at_signal in 1 2 15; do
1943   trap 'set +x; set +e
1944         $at_job_control_off
1945         at_signal='"$at_signal"'
1946         echo stop > "$at_stop_file"
1947         trap "" $at_signal
1948         at_pgids=
1949         for at_pgid in `jobs -p 2>/dev/null`; do
1950           at_pgids="$at_pgids $at_job_group$at_pgid"
1951         done
1952         test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1953         wait
1954         if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1955           echo >&2
1956         fi
1957         at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1958         set x $at_signame
1959         test 0 -gt 2 && at_signame=$at_signal
1960         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1961 $as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1962         as_fn_arith 128 + $at_signal && exit_status=$as_val
1963         as_fn_exit $exit_status' $at_signal
1964 done
1965
1966 rm -f "$at_stop_file"
1967 at_first=:
1968
1969 if test $at_jobs -ne 1 &&
1970      rm -f "$at_job_fifo" &&
1971      test -n "$at_job_group" &&
1972      ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1973 then
1974   # FIFO job dispatcher.
1975
1976   trap 'at_pids=
1977         for at_pid in `jobs -p`; do
1978           at_pids="$at_pids $at_job_group$at_pid"
1979         done
1980         if test -n "$at_pids"; then
1981           at_sig=TSTP
1982           test "${TMOUT+set}" = set && at_sig=STOP
1983           kill -$at_sig $at_pids 2>/dev/null
1984         fi
1985         kill -STOP $$
1986         test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1987
1988   echo
1989   # Turn jobs into a list of numbers, starting from 1.
1990   at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
1991
1992   set X $at_joblist
1993   shift
1994   for at_group in $at_groups; do
1995     $at_job_control_on 2>/dev/null
1996     (
1997       # Start one test group.
1998       $at_job_control_off
1999       if $at_first; then
2000         exec 7>"$at_job_fifo"
2001       else
2002         exec 6<&-
2003       fi
2004       trap 'set +x; set +e
2005             trap "" PIPE
2006             echo stop > "$at_stop_file"
2007             echo >&7
2008             as_fn_exit 141' PIPE
2009       at_fn_group_prepare
2010       if cd "$at_group_dir" &&
2011          at_fn_test $at_group &&
2012          . "$at_test_source"
2013       then :; else
2014         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
2015 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
2016         at_failed=:
2017       fi
2018       at_fn_group_postprocess
2019       echo >&7
2020     ) &
2021     $at_job_control_off
2022     if $at_first; then
2023       at_first=false
2024       exec 6<"$at_job_fifo" 7>"$at_job_fifo"
2025     fi
2026     shift # Consume one token.
2027     if test $# -gt 0; then :; else
2028       read at_token <&6 || break
2029       set x $*
2030     fi
2031     test -f "$at_stop_file" && break
2032   done
2033   exec 7>&-
2034   # Read back the remaining ($at_jobs - 1) tokens.
2035   set X $at_joblist
2036   shift
2037   if test $# -gt 0; then
2038     shift
2039     for at_job
2040     do
2041       read at_token
2042     done <&6
2043   fi
2044   exec 6<&-
2045   wait
2046 else
2047   # Run serially, avoid forks and other potential surprises.
2048   for at_group in $at_groups; do
2049     at_fn_group_prepare
2050     if cd "$at_group_dir" &&
2051        at_fn_test $at_group &&
2052        . "$at_test_source"; then :; else
2053       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
2054 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
2055       at_failed=:
2056     fi
2057     at_fn_group_postprocess
2058     test -f "$at_stop_file" && break
2059     at_first=false
2060   done
2061 fi
2062
2063 # Wrap up the test suite with summary statistics.
2064 cd "$at_helper_dir"
2065
2066 # Use ?..???? when the list must remain sorted, the faster * otherwise.
2067 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
2068 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
2069 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
2070 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
2071                  echo $f; done | sed '/?/d; s,/xpass,,'`
2072 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
2073                 echo $f; done | sed '/?/d; s,/fail,,'`
2074
2075 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
2076 shift; at_group_count=$#
2077 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
2078 set X $at_xfail_list; shift; at_xfail_count=$#
2079 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
2080 set X $at_skip_list; shift; at_skip_count=$#
2081
2082 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
2083 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
2084 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
2085
2086 # Back to the top directory.
2087 cd "$at_dir"
2088 rm -rf "$at_helper_dir"
2089
2090 # Compute the duration of the suite.
2091 at_stop_date=`date`
2092 at_stop_time=`date +%s 2>/dev/null`
2093 $as_echo "$as_me: ending at: $at_stop_date" >&5
2094 case $at_start_time,$at_stop_time in
2095   [0-9]*,[0-9]*)
2096     as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
2097     as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
2098     as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
2099     as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
2100     as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
2101     at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
2102     $as_echo "$as_me: test suite duration: $at_duration" >&5
2103     ;;
2104 esac
2105
2106 echo
2107 $as_echo "## ------------- ##
2108 ## Test results. ##
2109 ## ------------- ##"
2110 echo
2111 {
2112   echo
2113   $as_echo "## ------------- ##
2114 ## Test results. ##
2115 ## ------------- ##"
2116   echo
2117 } >&5
2118
2119 if test $at_run_count = 1; then
2120   at_result="1 test"
2121   at_were=was
2122 else
2123   at_result="$at_run_count tests"
2124   at_were=were
2125 fi
2126 if $at_errexit_p && test $at_unexpected_count != 0; then
2127   if test $at_xpass_count = 1; then
2128     at_result="$at_result $at_were run, one passed"
2129   else
2130     at_result="$at_result $at_were run, one failed"
2131   fi
2132   at_result="$at_result unexpectedly and inhibited subsequent tests."
2133   at_color=$at_red
2134 else
2135   # Don't you just love exponential explosion of the number of cases?
2136   at_color=$at_red
2137   case $at_xpass_count:$at_fail_count:$at_xfail_count in
2138     # So far, so good.
2139     0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
2140     0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
2141
2142     # Some unexpected failures
2143     0:*:0) at_result="$at_result $at_were run,
2144 $at_fail_count failed unexpectedly." ;;
2145
2146     # Some failures, both expected and unexpected
2147     0:*:1) at_result="$at_result $at_were run,
2148 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2149     0:*:*) at_result="$at_result $at_were run,
2150 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2151
2152     # No unexpected failures, but some xpasses
2153     *:0:*) at_result="$at_result $at_were run,
2154 $at_xpass_count passed unexpectedly." ;;
2155
2156     # No expected failures, but failures and xpasses
2157     *:1:0) at_result="$at_result $at_were run,
2158 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
2159     *:*:0) at_result="$at_result $at_were run,
2160 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
2161
2162     # All of them.
2163     *:*:1) at_result="$at_result $at_were run,
2164 $at_xpass_count passed unexpectedly,
2165 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2166     *:*:*) at_result="$at_result $at_were run,
2167 $at_xpass_count passed unexpectedly,
2168 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2169   esac
2170
2171   if test $at_skip_count = 0 && test $at_run_count -gt 1; then
2172     at_result="All $at_result"
2173   fi
2174 fi
2175
2176 # Now put skips in the mix.
2177 case $at_skip_count in
2178   0) ;;
2179   1) at_result="$at_result
2180 1 test was skipped." ;;
2181   *) at_result="$at_result
2182 $at_skip_count tests were skipped." ;;
2183 esac
2184
2185 if test $at_unexpected_count = 0; then
2186   echo "$at_color$at_result$at_std"
2187   echo "$at_result" >&5
2188 else
2189   echo "${at_color}ERROR: $at_result$at_std" >&2
2190   echo "ERROR: $at_result" >&5
2191   {
2192     echo
2193     $as_echo "## ------------------------ ##
2194 ## Summary of the failures. ##
2195 ## ------------------------ ##"
2196
2197     # Summary of failed and skipped tests.
2198     if test $at_fail_count != 0; then
2199       echo "Failed tests:"
2200       $SHELL "$at_myself" $at_fail_list --list
2201       echo
2202     fi
2203     if test $at_skip_count != 0; then
2204       echo "Skipped tests:"
2205       $SHELL "$at_myself" $at_skip_list --list
2206       echo
2207     fi
2208     if test $at_xpass_count != 0; then
2209       echo "Unexpected passes:"
2210       $SHELL "$at_myself" $at_xpass_list --list
2211       echo
2212     fi
2213     if test $at_fail_count != 0; then
2214       $as_echo "## ---------------------- ##
2215 ## Detailed failed tests. ##
2216 ## ---------------------- ##"
2217       echo
2218       for at_group in $at_fail_list
2219       do
2220         at_group_normalized=$at_group
2221
2222   eval 'while :; do
2223     case $at_group_normalized in #(
2224     '"$at_format"'*) break;;
2225     esac
2226     at_group_normalized=0$at_group_normalized
2227   done'
2228
2229         cat "$at_suite_dir/$at_group_normalized/$as_me.log"
2230         echo
2231       done
2232       echo
2233     fi
2234     if test -n "$at_top_srcdir"; then
2235       sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2236 ## ${at_top_build_prefix}config.log ##
2237 _ASBOX
2238       sed 's/^/| /' ${at_top_build_prefix}config.log
2239       echo
2240     fi
2241   } >&5
2242
2243   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2244 ## $as_me.log was created. ##
2245 _ASBOX
2246
2247   echo
2248   if $at_debug_p; then
2249     at_msg='per-test log files'
2250   else
2251     at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
2252   fi
2253   $as_echo "Please send $at_msg and all information you think might help:
2254
2255    To: <bug-tar@gnu.org>
2256    Subject: [GNU tar 1.29] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
2257
2258 You may investigate any problem if you feel able to do so, in which
2259 case the test suite provides a good starting point.  Its output may
2260 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2261 "
2262   exit 1
2263 fi
2264
2265 exit 0
2266
2267 ## ------------- ##
2268 ## Actual tests. ##
2269 ## ------------- ##
2270 #AT_START_1
2271 at_fn_group_banner 1 'version.at:20' \
2272   "tar version" "                                    "
2273 at_xfail=no
2274 (
2275   $as_echo "1. $at_setup_line: testing $at_desc ..."
2276   $at_traceon
2277
2278
2279 { set +x
2280 $as_echo "$at_srcdir/version.at:22: tar --version | sed 1q"
2281 at_fn_check_prepare_notrace 'a shell pipeline' "version.at:22"
2282 ( $at_check_trace; tar --version | sed 1q
2283 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2284 at_status=$? at_failed=false
2285 $at_check_filter
2286 at_fn_diff_devnull "$at_stderr" || at_failed=:
2287 echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.29
2288 " | \
2289   $at_diff - "$at_stdout" || at_failed=:
2290 at_fn_check_status 0 $at_status "$at_srcdir/version.at:22"
2291 if $at_failed; then :
2292   cat >$XFAILFILE <<'_EOT'
2293
2294 ==============================================================
2295 WARNING: Not using the proper version, *all* checks dubious...
2296 ==============================================================
2297 _EOT
2298
2299 else
2300   rm -f $XFAILFILE
2301 fi
2302 $at_failed && at_fn_log_failure
2303 $at_traceon; }
2304
2305
2306   set +x
2307   $at_times_p && times >"$at_times_file"
2308 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2309 read at_status <"$at_status_file"
2310 #AT_STOP_1
2311 #AT_START_2
2312 at_fn_group_banner 2 'pipe.at:29' \
2313   "decompressing from stdin" "                       "
2314 at_xfail=no
2315       test -f $XFAILFILE && at_xfail=yes
2316 (
2317   $as_echo "2. $at_setup_line: testing $at_desc ..."
2318   $at_traceon
2319
2320
2321
2322
2323
2324
2325   { set +x
2326 $as_echo "$at_srcdir/pipe.at:33:
2327 mkdir v7
2328 (cd v7
2329 TEST_TAR_FORMAT=v7
2330 export TEST_TAR_FORMAT
2331 TAR_OPTIONS=\"-H v7\"
2332 export TAR_OPTIONS
2333 rm -rf *
2334
2335
2336 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2337
2338
2339 mkdir directory
2340 genfile --length 10240 --pattern zeros --file directory/file1
2341 genfile --length 13 --file directory/file2
2342 tar cf archive directory
2343 mv directory orig
2344 cat archive | tar xfv - --warning=no-timestamp | sort
2345 echo \"separator\"
2346 cmp orig/file1 directory/file1
2347 echo \"separator\"
2348 cmp orig/file2 directory/file2)"
2349 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2350 ( $at_check_trace;
2351 mkdir v7
2352 (cd v7
2353 TEST_TAR_FORMAT=v7
2354 export TEST_TAR_FORMAT
2355 TAR_OPTIONS="-H v7"
2356 export TAR_OPTIONS
2357 rm -rf *
2358
2359
2360 test -z "`sort < /dev/null 2>&1`" || exit 77
2361
2362
2363 mkdir directory
2364 genfile --length 10240 --pattern zeros --file directory/file1
2365 genfile --length 13 --file directory/file2
2366 tar cf archive directory
2367 mv directory orig
2368 cat archive | tar xfv - --warning=no-timestamp | sort
2369 echo "separator"
2370 cmp orig/file1 directory/file1
2371 echo "separator"
2372 cmp orig/file2 directory/file2)
2373 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2374 at_status=$? at_failed=false
2375 $at_check_filter
2376 at_fn_diff_devnull "$at_stderr" || at_failed=:
2377 echo >>"$at_stdout"; $as_echo "directory/
2378 directory/file1
2379 directory/file2
2380 separator
2381 separator
2382 " | \
2383   $at_diff - "$at_stdout" || at_failed=:
2384 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2385 $at_failed && at_fn_log_failure
2386 $at_traceon; }
2387
2388               { set +x
2389 $as_echo "$at_srcdir/pipe.at:33:
2390 mkdir oldgnu
2391 (cd oldgnu
2392 TEST_TAR_FORMAT=oldgnu
2393 export TEST_TAR_FORMAT
2394 TAR_OPTIONS=\"-H oldgnu\"
2395 export TAR_OPTIONS
2396 rm -rf *
2397
2398
2399 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2400
2401
2402 mkdir directory
2403 genfile --length 10240 --pattern zeros --file directory/file1
2404 genfile --length 13 --file directory/file2
2405 tar cf archive directory
2406 mv directory orig
2407 cat archive | tar xfv - --warning=no-timestamp | sort
2408 echo \"separator\"
2409 cmp orig/file1 directory/file1
2410 echo \"separator\"
2411 cmp orig/file2 directory/file2)"
2412 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2413 ( $at_check_trace;
2414 mkdir oldgnu
2415 (cd oldgnu
2416 TEST_TAR_FORMAT=oldgnu
2417 export TEST_TAR_FORMAT
2418 TAR_OPTIONS="-H oldgnu"
2419 export TAR_OPTIONS
2420 rm -rf *
2421
2422
2423 test -z "`sort < /dev/null 2>&1`" || exit 77
2424
2425
2426 mkdir directory
2427 genfile --length 10240 --pattern zeros --file directory/file1
2428 genfile --length 13 --file directory/file2
2429 tar cf archive directory
2430 mv directory orig
2431 cat archive | tar xfv - --warning=no-timestamp | sort
2432 echo "separator"
2433 cmp orig/file1 directory/file1
2434 echo "separator"
2435 cmp orig/file2 directory/file2)
2436 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2437 at_status=$? at_failed=false
2438 $at_check_filter
2439 at_fn_diff_devnull "$at_stderr" || at_failed=:
2440 echo >>"$at_stdout"; $as_echo "directory/
2441 directory/file1
2442 directory/file2
2443 separator
2444 separator
2445 " | \
2446   $at_diff - "$at_stdout" || at_failed=:
2447 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2448 $at_failed && at_fn_log_failure
2449 $at_traceon; }
2450
2451               { set +x
2452 $as_echo "$at_srcdir/pipe.at:33:
2453 mkdir ustar
2454 (cd ustar
2455 TEST_TAR_FORMAT=ustar
2456 export TEST_TAR_FORMAT
2457 TAR_OPTIONS=\"-H ustar\"
2458 export TAR_OPTIONS
2459 rm -rf *
2460
2461
2462 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2463
2464
2465 mkdir directory
2466 genfile --length 10240 --pattern zeros --file directory/file1
2467 genfile --length 13 --file directory/file2
2468 tar cf archive directory
2469 mv directory orig
2470 cat archive | tar xfv - --warning=no-timestamp | sort
2471 echo \"separator\"
2472 cmp orig/file1 directory/file1
2473 echo \"separator\"
2474 cmp orig/file2 directory/file2)"
2475 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2476 ( $at_check_trace;
2477 mkdir ustar
2478 (cd ustar
2479 TEST_TAR_FORMAT=ustar
2480 export TEST_TAR_FORMAT
2481 TAR_OPTIONS="-H ustar"
2482 export TAR_OPTIONS
2483 rm -rf *
2484
2485
2486 test -z "`sort < /dev/null 2>&1`" || exit 77
2487
2488
2489 mkdir directory
2490 genfile --length 10240 --pattern zeros --file directory/file1
2491 genfile --length 13 --file directory/file2
2492 tar cf archive directory
2493 mv directory orig
2494 cat archive | tar xfv - --warning=no-timestamp | sort
2495 echo "separator"
2496 cmp orig/file1 directory/file1
2497 echo "separator"
2498 cmp orig/file2 directory/file2)
2499 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2500 at_status=$? at_failed=false
2501 $at_check_filter
2502 at_fn_diff_devnull "$at_stderr" || at_failed=:
2503 echo >>"$at_stdout"; $as_echo "directory/
2504 directory/file1
2505 directory/file2
2506 separator
2507 separator
2508 " | \
2509   $at_diff - "$at_stdout" || at_failed=:
2510 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2511 $at_failed && at_fn_log_failure
2512 $at_traceon; }
2513
2514               { set +x
2515 $as_echo "$at_srcdir/pipe.at:33:
2516 mkdir posix
2517 (cd posix
2518 TEST_TAR_FORMAT=posix
2519 export TEST_TAR_FORMAT
2520 TAR_OPTIONS=\"-H posix\"
2521 export TAR_OPTIONS
2522 rm -rf *
2523
2524
2525 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2526
2527
2528 mkdir directory
2529 genfile --length 10240 --pattern zeros --file directory/file1
2530 genfile --length 13 --file directory/file2
2531 tar cf archive directory
2532 mv directory orig
2533 cat archive | tar xfv - --warning=no-timestamp | sort
2534 echo \"separator\"
2535 cmp orig/file1 directory/file1
2536 echo \"separator\"
2537 cmp orig/file2 directory/file2)"
2538 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2539 ( $at_check_trace;
2540 mkdir posix
2541 (cd posix
2542 TEST_TAR_FORMAT=posix
2543 export TEST_TAR_FORMAT
2544 TAR_OPTIONS="-H posix"
2545 export TAR_OPTIONS
2546 rm -rf *
2547
2548
2549 test -z "`sort < /dev/null 2>&1`" || exit 77
2550
2551
2552 mkdir directory
2553 genfile --length 10240 --pattern zeros --file directory/file1
2554 genfile --length 13 --file directory/file2
2555 tar cf archive directory
2556 mv directory orig
2557 cat archive | tar xfv - --warning=no-timestamp | sort
2558 echo "separator"
2559 cmp orig/file1 directory/file1
2560 echo "separator"
2561 cmp orig/file2 directory/file2)
2562 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2563 at_status=$? at_failed=false
2564 $at_check_filter
2565 at_fn_diff_devnull "$at_stderr" || at_failed=:
2566 echo >>"$at_stdout"; $as_echo "directory/
2567 directory/file1
2568 directory/file2
2569 separator
2570 separator
2571 " | \
2572   $at_diff - "$at_stdout" || at_failed=:
2573 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2574 $at_failed && at_fn_log_failure
2575 $at_traceon; }
2576
2577               { set +x
2578 $as_echo "$at_srcdir/pipe.at:33:
2579 mkdir gnu
2580 (cd gnu
2581 TEST_TAR_FORMAT=gnu
2582 export TEST_TAR_FORMAT
2583 TAR_OPTIONS=\"-H gnu\"
2584 export TAR_OPTIONS
2585 rm -rf *
2586
2587
2588 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2589
2590
2591 mkdir directory
2592 genfile --length 10240 --pattern zeros --file directory/file1
2593 genfile --length 13 --file directory/file2
2594 tar cf archive directory
2595 mv directory orig
2596 cat archive | tar xfv - --warning=no-timestamp | sort
2597 echo \"separator\"
2598 cmp orig/file1 directory/file1
2599 echo \"separator\"
2600 cmp orig/file2 directory/file2)"
2601 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2602 ( $at_check_trace;
2603 mkdir gnu
2604 (cd gnu
2605 TEST_TAR_FORMAT=gnu
2606 export TEST_TAR_FORMAT
2607 TAR_OPTIONS="-H gnu"
2608 export TAR_OPTIONS
2609 rm -rf *
2610
2611
2612 test -z "`sort < /dev/null 2>&1`" || exit 77
2613
2614
2615 mkdir directory
2616 genfile --length 10240 --pattern zeros --file directory/file1
2617 genfile --length 13 --file directory/file2
2618 tar cf archive directory
2619 mv directory orig
2620 cat archive | tar xfv - --warning=no-timestamp | sort
2621 echo "separator"
2622 cmp orig/file1 directory/file1
2623 echo "separator"
2624 cmp orig/file2 directory/file2)
2625 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2626 at_status=$? at_failed=false
2627 $at_check_filter
2628 at_fn_diff_devnull "$at_stderr" || at_failed=:
2629 echo >>"$at_stdout"; $as_echo "directory/
2630 directory/file1
2631 directory/file2
2632 separator
2633 separator
2634 " | \
2635   $at_diff - "$at_stdout" || at_failed=:
2636 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2637 $at_failed && at_fn_log_failure
2638 $at_traceon; }
2639
2640
2641
2642
2643   set +x
2644   $at_times_p && times >"$at_times_file"
2645 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2646 read at_status <"$at_status_file"
2647 #AT_STOP_2
2648 #AT_START_3
2649 at_fn_group_banner 3 'options.at:25' \
2650   "mixing options" "                                 "
2651 at_xfail=no
2652 (
2653   $as_echo "3. $at_setup_line: testing $at_desc ..."
2654   $at_traceon
2655
2656
2657
2658 { set +x
2659 $as_echo "$at_srcdir/options.at:28:
2660 echo > file1
2661 TAR_OPTIONS=--numeric-owner tar chof archive file1
2662 tar tf archive
2663 "
2664 at_fn_check_prepare_notrace 'an embedded newline' "options.at:28"
2665 ( $at_check_trace;
2666 echo > file1
2667 TAR_OPTIONS=--numeric-owner tar chof archive file1
2668 tar tf archive
2669
2670 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2671 at_status=$? at_failed=false
2672 $at_check_filter
2673 at_fn_diff_devnull "$at_stderr" || at_failed=:
2674 echo >>"$at_stdout"; $as_echo "file1
2675 " | \
2676   $at_diff - "$at_stdout" || at_failed=:
2677 at_fn_check_status 0 $at_status "$at_srcdir/options.at:28"
2678 $at_failed && at_fn_log_failure
2679 $at_traceon; }
2680
2681
2682   set +x
2683   $at_times_p && times >"$at_times_file"
2684 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2685 read at_status <"$at_status_file"
2686 #AT_STOP_3
2687 #AT_START_4
2688 at_fn_group_banner 4 'options02.at:27' \
2689   "interspersed options" "                           "
2690 at_xfail=no
2691 (
2692   $as_echo "4. $at_setup_line: testing $at_desc ..."
2693   $at_traceon
2694
2695
2696
2697 { set +x
2698 $as_echo "$at_srcdir/options02.at:30:
2699 echo > file1
2700 tar c file1 -f archive
2701 tar tf archive
2702 "
2703 at_fn_check_prepare_notrace 'an embedded newline' "options02.at:30"
2704 ( $at_check_trace;
2705 echo > file1
2706 tar c file1 -f archive
2707 tar tf archive
2708
2709 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2710 at_status=$? at_failed=false
2711 $at_check_filter
2712 at_fn_diff_devnull "$at_stderr" || at_failed=:
2713 echo >>"$at_stdout"; $as_echo "file1
2714 " | \
2715   $at_diff - "$at_stdout" || at_failed=:
2716 at_fn_check_status 0 $at_status "$at_srcdir/options02.at:30"
2717 $at_failed && at_fn_log_failure
2718 $at_traceon; }
2719
2720
2721   set +x
2722   $at_times_p && times >"$at_times_file"
2723 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2724 read at_status <"$at_status_file"
2725 #AT_STOP_4
2726 #AT_START_5
2727 at_fn_group_banner 5 'opcomp01.at:21' \
2728   "occurrence compatibility" "                       " 1
2729 at_xfail=no
2730 (
2731   $as_echo "5. $at_setup_line: testing $at_desc ..."
2732   $at_traceon
2733
2734
2735
2736 { set +x
2737 $as_echo "$at_srcdir/opcomp01.at:24:
2738 tar --occurrence=1 -cf test.tar .
2739 "
2740 at_fn_check_prepare_notrace 'an embedded newline' "opcomp01.at:24"
2741 ( $at_check_trace;
2742 tar --occurrence=1 -cf test.tar .
2743
2744 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2745 at_status=$? at_failed=false
2746 $at_check_filter
2747 echo >>"$at_stderr"; $as_echo "tar: '--occurrence' cannot be used with '-c'
2748 Try 'tar --help' or 'tar --usage' for more information.
2749 " | \
2750   $at_diff - "$at_stderr" || at_failed=:
2751 at_fn_diff_devnull "$at_stdout" || at_failed=:
2752 at_fn_check_status 2 $at_status "$at_srcdir/opcomp01.at:24"
2753 $at_failed && at_fn_log_failure
2754 $at_traceon; }
2755
2756
2757   set +x
2758   $at_times_p && times >"$at_times_file"
2759 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2760 read at_status <"$at_status_file"
2761 #AT_STOP_5
2762 #AT_START_6
2763 at_fn_group_banner 6 'opcomp02.at:21' \
2764   "occurrence compatibility" "                       " 1
2765 at_xfail=no
2766 (
2767   $as_echo "6. $at_setup_line: testing $at_desc ..."
2768   $at_traceon
2769
2770
2771
2772 { set +x
2773 $as_echo "$at_srcdir/opcomp02.at:24:
2774 tar --occurrence=1 -tf test.tar
2775 "
2776 at_fn_check_prepare_notrace 'an embedded newline' "opcomp02.at:24"
2777 ( $at_check_trace;
2778 tar --occurrence=1 -tf test.tar
2779
2780 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2781 at_status=$? at_failed=false
2782 $at_check_filter
2783 echo >>"$at_stderr"; $as_echo "tar: --occurrence is meaningless without a file list
2784 Try 'tar --help' or 'tar --usage' for more information.
2785 " | \
2786   $at_diff - "$at_stderr" || at_failed=:
2787 at_fn_diff_devnull "$at_stdout" || at_failed=:
2788 at_fn_check_status 2 $at_status "$at_srcdir/opcomp02.at:24"
2789 $at_failed && at_fn_log_failure
2790 $at_traceon; }
2791
2792
2793   set +x
2794   $at_times_p && times >"$at_times_file"
2795 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2796 read at_status <"$at_status_file"
2797 #AT_STOP_6
2798 #AT_START_7
2799 at_fn_group_banner 7 'opcomp03.at:21' \
2800   "--verify compatibility" "                         " 1
2801 at_xfail=no
2802 (
2803   $as_echo "7. $at_setup_line: testing $at_desc ..."
2804   $at_traceon
2805
2806
2807
2808 { set +x
2809 $as_echo "$at_srcdir/opcomp03.at:24:
2810 tar -tWf test.tar .
2811 "
2812 at_fn_check_prepare_notrace 'an embedded newline' "opcomp03.at:24"
2813 ( $at_check_trace;
2814 tar -tWf test.tar .
2815
2816 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2817 at_status=$? at_failed=false
2818 $at_check_filter
2819 echo >>"$at_stderr"; $as_echo "tar: '--verify' cannot be used with '-t'
2820 Try 'tar --help' or 'tar --usage' for more information.
2821 " | \
2822   $at_diff - "$at_stderr" || at_failed=:
2823 at_fn_diff_devnull "$at_stdout" || at_failed=:
2824 at_fn_check_status 2 $at_status "$at_srcdir/opcomp03.at:24"
2825 $at_failed && at_fn_log_failure
2826 $at_traceon; }
2827
2828
2829   set +x
2830   $at_times_p && times >"$at_times_file"
2831 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2832 read at_status <"$at_status_file"
2833 #AT_STOP_7
2834 #AT_START_8
2835 at_fn_group_banner 8 'opcomp04.at:21' \
2836   "compress option compatibility" "                  " 1
2837 at_xfail=no
2838 (
2839   $as_echo "8. $at_setup_line: testing $at_desc ..."
2840   $at_traceon
2841
2842
2843
2844 { set +x
2845 $as_echo "$at_srcdir/opcomp04.at:24:
2846
2847 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
2848
2849 genfile --file file
2850 tar czf test.tar file
2851 genfile --file newfile
2852 tar rzf test.tar newfile
2853 "
2854 at_fn_check_prepare_notrace 'an embedded newline' "opcomp04.at:24"
2855 ( $at_check_trace;
2856
2857 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
2858
2859 genfile --file file
2860 tar czf test.tar file
2861 genfile --file newfile
2862 tar rzf test.tar newfile
2863
2864 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2865 at_status=$? at_failed=false
2866 $at_check_filter
2867 echo >>"$at_stderr"; $as_echo "tar: Cannot update compressed archives
2868 Try 'tar --help' or 'tar --usage' for more information.
2869 " | \
2870   $at_diff - "$at_stderr" || at_failed=:
2871 at_fn_diff_devnull "$at_stdout" || at_failed=:
2872 at_fn_check_status 2 $at_status "$at_srcdir/opcomp04.at:24"
2873 $at_failed && at_fn_log_failure
2874 $at_traceon; }
2875
2876
2877   set +x
2878   $at_times_p && times >"$at_times_file"
2879 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2880 read at_status <"$at_status_file"
2881 #AT_STOP_8
2882 #AT_START_9
2883 at_fn_group_banner 9 'opcomp05.at:21' \
2884   "--pax-option compatibility" "                     " 1
2885 at_xfail=no
2886 (
2887   $as_echo "9. $at_setup_line: testing $at_desc ..."
2888   $at_traceon
2889
2890
2891
2892 { set +x
2893 $as_echo "$at_srcdir/opcomp05.at:24:
2894 tar -Hgnu -cf test.tar --pax-option user:=root .
2895 "
2896 at_fn_check_prepare_notrace 'an embedded newline' "opcomp05.at:24"
2897 ( $at_check_trace;
2898 tar -Hgnu -cf test.tar --pax-option user:=root .
2899
2900 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2901 at_status=$? at_failed=false
2902 $at_check_filter
2903 echo >>"$at_stderr"; $as_echo "tar: --pax-option can be used only on POSIX archives
2904 Try 'tar --help' or 'tar --usage' for more information.
2905 " | \
2906   $at_diff - "$at_stderr" || at_failed=:
2907 at_fn_diff_devnull "$at_stdout" || at_failed=:
2908 at_fn_check_status 2 $at_status "$at_srcdir/opcomp05.at:24"
2909 $at_failed && at_fn_log_failure
2910 $at_traceon; }
2911
2912
2913   set +x
2914   $at_times_p && times >"$at_times_file"
2915 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2916 read at_status <"$at_status_file"
2917 #AT_STOP_9
2918 #AT_START_10
2919 at_fn_group_banner 10 'opcomp06.at:21' \
2920   "--pax-option compatibility" "                     " 1
2921 at_xfail=no
2922 (
2923   $as_echo "10. $at_setup_line: testing $at_desc ..."
2924   $at_traceon
2925
2926
2927
2928 { set +x
2929 $as_echo "$at_srcdir/opcomp06.at:24:
2930
2931
2932   file=\$(TMPDIR=. mktemp fiXXXXXX)
2933
2934   setfacl -m u:\$UID:rwx \$file &> /dev/null
2935   if test \"\$?\" != 0; then
2936     exit 77
2937   fi
2938
2939
2940   getfacl \$file &> /dev/null
2941   if test \"\$?\" != 0; then
2942     exit 77
2943   fi
2944
2945   rm -rf \$file
2946
2947   file=\$(TMPDIR=. mktemp fiXXXXXX)
2948   setfacl -m u:\$UID:rwx \$file
2949   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
2950   if test \"\$err\" != \"0\"; then
2951     exit 77
2952   fi
2953
2954 genfile --file file
2955 tar -cf test.tar --acls -Hgnu file
2956 "
2957 at_fn_check_prepare_notrace 'a $(...) command substitution' "opcomp06.at:24"
2958 ( $at_check_trace;
2959
2960
2961   file=$(TMPDIR=. mktemp fiXXXXXX)
2962
2963   setfacl -m u:$UID:rwx $file &> /dev/null
2964   if test "$?" != 0; then
2965     exit 77
2966   fi
2967
2968
2969   getfacl $file &> /dev/null
2970   if test "$?" != 0; then
2971     exit 77
2972   fi
2973
2974   rm -rf $file
2975
2976   file=$(TMPDIR=. mktemp fiXXXXXX)
2977   setfacl -m u:$UID:rwx $file
2978   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
2979   if test "$err" != "0"; then
2980     exit 77
2981   fi
2982
2983 genfile --file file
2984 tar -cf test.tar --acls -Hgnu file
2985
2986 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2987 at_status=$? at_failed=false
2988 $at_check_filter
2989 echo >>"$at_stderr"; $as_echo "tar: --acls can be used only on POSIX archives
2990 Try 'tar --help' or 'tar --usage' for more information.
2991 " | \
2992   $at_diff - "$at_stderr" || at_failed=:
2993 at_fn_diff_devnull "$at_stdout" || at_failed=:
2994 at_fn_check_status 2 $at_status "$at_srcdir/opcomp06.at:24"
2995 $at_failed && at_fn_log_failure
2996 $at_traceon; }
2997
2998
2999   set +x
3000   $at_times_p && times >"$at_times_file"
3001 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3002 read at_status <"$at_status_file"
3003 #AT_STOP_10
3004 #AT_START_11
3005 at_fn_group_banner 11 'T-mult.at:21' \
3006   "multiple file lists" "                            " 2
3007 at_xfail=no
3008       test -f $XFAILFILE && at_xfail=yes
3009 (
3010   $as_echo "11. $at_setup_line: testing $at_desc ..."
3011   $at_traceon
3012
3013
3014
3015
3016
3017   { set +x
3018 $as_echo "$at_srcdir/T-mult.at:24:
3019 mkdir ustar
3020 (cd ustar
3021 TEST_TAR_FORMAT=ustar
3022 export TEST_TAR_FORMAT
3023 TAR_OPTIONS=\"-H ustar\"
3024 export TAR_OPTIONS
3025 rm -rf *
3026
3027 >file1
3028 >file2
3029 >file3
3030 >file4
3031 cat >F1 <<'_ATEOF'
3032 file1
3033 file2
3034 _ATEOF
3035
3036 cat >F2 <<'_ATEOF'
3037 file3
3038 file4
3039 _ATEOF
3040
3041 tar cf archive -T F1 -T F2
3042 tar tf archive
3043 )"
3044 at_fn_check_prepare_notrace 'an embedded newline' "T-mult.at:24"
3045 ( $at_check_trace;
3046 mkdir ustar
3047 (cd ustar
3048 TEST_TAR_FORMAT=ustar
3049 export TEST_TAR_FORMAT
3050 TAR_OPTIONS="-H ustar"
3051 export TAR_OPTIONS
3052 rm -rf *
3053
3054 >file1
3055 >file2
3056 >file3
3057 >file4
3058 cat >F1 <<'_ATEOF'
3059 file1
3060 file2
3061 _ATEOF
3062
3063 cat >F2 <<'_ATEOF'
3064 file3
3065 file4
3066 _ATEOF
3067
3068 tar cf archive -T F1 -T F2
3069 tar tf archive
3070 )
3071 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3072 at_status=$? at_failed=false
3073 $at_check_filter
3074 at_fn_diff_devnull "$at_stderr" || at_failed=:
3075 echo >>"$at_stdout"; $as_echo "file1
3076 file2
3077 file3
3078 file4
3079 " | \
3080   $at_diff - "$at_stdout" || at_failed=:
3081 at_fn_check_status 0 $at_status "$at_srcdir/T-mult.at:24"
3082 $at_failed && at_fn_log_failure
3083 $at_traceon; }
3084
3085
3086
3087
3088   set +x
3089   $at_times_p && times >"$at_times_file"
3090 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3091 read at_status <"$at_status_file"
3092 #AT_STOP_11
3093 #AT_START_12
3094 at_fn_group_banner 12 'T-nest.at:21' \
3095   "nested file lists" "                              " 2
3096 at_xfail=no
3097       test -f $XFAILFILE && at_xfail=yes
3098 (
3099   $as_echo "12. $at_setup_line: testing $at_desc ..."
3100   $at_traceon
3101
3102
3103
3104
3105
3106   { set +x
3107 $as_echo "$at_srcdir/T-nest.at:24:
3108 mkdir ustar
3109 (cd ustar
3110 TEST_TAR_FORMAT=ustar
3111 export TEST_TAR_FORMAT
3112 TAR_OPTIONS=\"-H ustar\"
3113 export TAR_OPTIONS
3114 rm -rf *
3115
3116 >file1
3117 >file2
3118 >file3
3119 >file4
3120 cat >F1 <<'_ATEOF'
3121 file1
3122 -T F2
3123 file2
3124 _ATEOF
3125
3126 cat >F2 <<'_ATEOF'
3127 file3
3128 file4
3129 _ATEOF
3130
3131 tar cf archive -T F1
3132 tar tf archive
3133 )"
3134 at_fn_check_prepare_notrace 'an embedded newline' "T-nest.at:24"
3135 ( $at_check_trace;
3136 mkdir ustar
3137 (cd ustar
3138 TEST_TAR_FORMAT=ustar
3139 export TEST_TAR_FORMAT
3140 TAR_OPTIONS="-H ustar"
3141 export TAR_OPTIONS
3142 rm -rf *
3143
3144 >file1
3145 >file2
3146 >file3
3147 >file4
3148 cat >F1 <<'_ATEOF'
3149 file1
3150 -T F2
3151 file2
3152 _ATEOF
3153
3154 cat >F2 <<'_ATEOF'
3155 file3
3156 file4
3157 _ATEOF
3158
3159 tar cf archive -T F1
3160 tar tf archive
3161 )
3162 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3163 at_status=$? at_failed=false
3164 $at_check_filter
3165 at_fn_diff_devnull "$at_stderr" || at_failed=:
3166 echo >>"$at_stdout"; $as_echo "file1
3167 file3
3168 file4
3169 file2
3170 " | \
3171   $at_diff - "$at_stdout" || at_failed=:
3172 at_fn_check_status 0 $at_status "$at_srcdir/T-nest.at:24"
3173 $at_failed && at_fn_log_failure
3174 $at_traceon; }
3175
3176
3177
3178
3179   set +x
3180   $at_times_p && times >"$at_times_file"
3181 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3182 read at_status <"$at_status_file"
3183 #AT_STOP_12
3184 #AT_START_13
3185 at_fn_group_banner 13 'T-rec.at:21' \
3186   "recursive file lists" "                           " 2
3187 at_xfail=no
3188       test -f $XFAILFILE && at_xfail=yes
3189 (
3190   $as_echo "13. $at_setup_line: testing $at_desc ..."
3191   $at_traceon
3192
3193
3194
3195
3196
3197   { set +x
3198 $as_echo "$at_srcdir/T-rec.at:24:
3199 mkdir ustar
3200 (cd ustar
3201 TEST_TAR_FORMAT=ustar
3202 export TEST_TAR_FORMAT
3203 TAR_OPTIONS=\"-H ustar\"
3204 export TAR_OPTIONS
3205 rm -rf *
3206
3207 >file1
3208 >file2
3209 cat >F1 <<'_ATEOF'
3210 file1
3211 -T F2
3212 _ATEOF
3213
3214 cat >F2 <<'_ATEOF'
3215 file2
3216 -T F1
3217 _ATEOF
3218
3219 tar cf archive -T F1
3220 echo \$?
3221 tar tf archive
3222 )"
3223 at_fn_check_prepare_notrace 'an embedded newline' "T-rec.at:24"
3224 ( $at_check_trace;
3225 mkdir ustar
3226 (cd ustar
3227 TEST_TAR_FORMAT=ustar
3228 export TEST_TAR_FORMAT
3229 TAR_OPTIONS="-H ustar"
3230 export TAR_OPTIONS
3231 rm -rf *
3232
3233 >file1
3234 >file2
3235 cat >F1 <<'_ATEOF'
3236 file1
3237 -T F2
3238 _ATEOF
3239
3240 cat >F2 <<'_ATEOF'
3241 file2
3242 -T F1
3243 _ATEOF
3244
3245 tar cf archive -T F1
3246 echo $?
3247 tar tf archive
3248 )
3249 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3250 at_status=$? at_failed=false
3251 $at_check_filter
3252 echo >>"$at_stderr"; $as_echo "tar: F1: file list requested from F2 already read from command line
3253 tar: Exiting with failure status due to previous errors
3254 " | \
3255   $at_diff - "$at_stderr" || at_failed=:
3256 echo >>"$at_stdout"; $as_echo "2
3257 file1
3258 file2
3259 " | \
3260   $at_diff - "$at_stdout" || at_failed=:
3261 at_fn_check_status 0 $at_status "$at_srcdir/T-rec.at:24"
3262 $at_failed && at_fn_log_failure
3263 $at_traceon; }
3264
3265
3266
3267
3268   set +x
3269   $at_times_p && times >"$at_times_file"
3270 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3271 read at_status <"$at_status_file"
3272 #AT_STOP_13
3273 #AT_START_14
3274 at_fn_group_banner 14 'T-recurse.at:27' \
3275   "files-from & recurse: toggle" "                   " 2
3276 at_xfail=no
3277       test -f $XFAILFILE && at_xfail=yes
3278 (
3279   $as_echo "14. $at_setup_line: testing $at_desc ..."
3280   $at_traceon
3281
3282
3283
3284
3285
3286   { set +x
3287 $as_echo "$at_srcdir/T-recurse.at:30:
3288 mkdir v7
3289 (cd v7
3290 TEST_TAR_FORMAT=v7
3291 export TEST_TAR_FORMAT
3292 TAR_OPTIONS=\"-H v7\"
3293 export TAR_OPTIONS
3294 rm -rf *
3295
3296 mkdir directory1 directory2
3297 touch directory1/file directory2/file
3298
3299 cat >F1 <<'_ATEOF'
3300 --no-recursion
3301 directory1/
3302 --recursion
3303 directory2/
3304 _ATEOF
3305
3306
3307 cat >F2A <<'_ATEOF'
3308 directory1/
3309 _ATEOF
3310
3311
3312 cat >F2B <<'_ATEOF'
3313 directory2/
3314 _ATEOF
3315
3316
3317 a=archive
3318 tar cf \"\$a\" --files-from F1
3319 tar tf \"\$a\"
3320
3321 a=archive2
3322 tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
3323 tar tf \"\$a\"
3324 )"
3325 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
3326 ( $at_check_trace;
3327 mkdir v7
3328 (cd v7
3329 TEST_TAR_FORMAT=v7
3330 export TEST_TAR_FORMAT
3331 TAR_OPTIONS="-H v7"
3332 export TAR_OPTIONS
3333 rm -rf *
3334
3335 mkdir directory1 directory2
3336 touch directory1/file directory2/file
3337
3338 cat >F1 <<'_ATEOF'
3339 --no-recursion
3340 directory1/
3341 --recursion
3342 directory2/
3343 _ATEOF
3344
3345
3346 cat >F2A <<'_ATEOF'
3347 directory1/
3348 _ATEOF
3349
3350
3351 cat >F2B <<'_ATEOF'
3352 directory2/
3353 _ATEOF
3354
3355
3356 a=archive
3357 tar cf "$a" --files-from F1
3358 tar tf "$a"
3359
3360 a=archive2
3361 tar cf "$a" --no-recursion -T F2A --recursion -T F2B
3362 tar tf "$a"
3363 )
3364 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3365 at_status=$? at_failed=false
3366 $at_check_filter
3367 at_fn_diff_devnull "$at_stderr" || at_failed=:
3368 echo >>"$at_stdout"; $as_echo "directory1/
3369 directory2/
3370 directory2/file
3371 directory1/
3372 directory2/
3373 directory2/file
3374 " | \
3375   $at_diff - "$at_stdout" || at_failed=:
3376 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
3377 $at_failed && at_fn_log_failure
3378 $at_traceon; }
3379
3380               { set +x
3381 $as_echo "$at_srcdir/T-recurse.at:30:
3382 mkdir oldgnu
3383 (cd oldgnu
3384 TEST_TAR_FORMAT=oldgnu
3385 export TEST_TAR_FORMAT
3386 TAR_OPTIONS=\"-H oldgnu\"
3387 export TAR_OPTIONS
3388 rm -rf *
3389
3390 mkdir directory1 directory2
3391 touch directory1/file directory2/file
3392
3393 cat >F1 <<'_ATEOF'
3394 --no-recursion
3395 directory1/
3396 --recursion
3397 directory2/
3398 _ATEOF
3399
3400
3401 cat >F2A <<'_ATEOF'
3402 directory1/
3403 _ATEOF
3404
3405
3406 cat >F2B <<'_ATEOF'
3407 directory2/
3408 _ATEOF
3409
3410
3411 a=archive
3412 tar cf \"\$a\" --files-from F1
3413 tar tf \"\$a\"
3414
3415 a=archive2
3416 tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
3417 tar tf \"\$a\"
3418 )"
3419 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
3420 ( $at_check_trace;
3421 mkdir oldgnu
3422 (cd oldgnu
3423 TEST_TAR_FORMAT=oldgnu
3424 export TEST_TAR_FORMAT
3425 TAR_OPTIONS="-H oldgnu"
3426 export TAR_OPTIONS
3427 rm -rf *
3428
3429 mkdir directory1 directory2
3430 touch directory1/file directory2/file
3431
3432 cat >F1 <<'_ATEOF'
3433 --no-recursion
3434 directory1/
3435 --recursion
3436 directory2/
3437 _ATEOF
3438
3439
3440 cat >F2A <<'_ATEOF'
3441 directory1/
3442 _ATEOF
3443
3444
3445 cat >F2B <<'_ATEOF'
3446 directory2/
3447 _ATEOF
3448
3449
3450 a=archive
3451 tar cf "$a" --files-from F1
3452 tar tf "$a"
3453
3454 a=archive2
3455 tar cf "$a" --no-recursion -T F2A --recursion -T F2B
3456 tar tf "$a"
3457 )
3458 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3459 at_status=$? at_failed=false
3460 $at_check_filter
3461 at_fn_diff_devnull "$at_stderr" || at_failed=:
3462 echo >>"$at_stdout"; $as_echo "directory1/
3463 directory2/
3464 directory2/file
3465 directory1/
3466 directory2/
3467 directory2/file
3468 " | \
3469   $at_diff - "$at_stdout" || at_failed=:
3470 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
3471 $at_failed && at_fn_log_failure
3472 $at_traceon; }
3473
3474               { set +x
3475 $as_echo "$at_srcdir/T-recurse.at:30:
3476 mkdir ustar
3477 (cd ustar
3478 TEST_TAR_FORMAT=ustar
3479 export TEST_TAR_FORMAT
3480 TAR_OPTIONS=\"-H ustar\"
3481 export TAR_OPTIONS
3482 rm -rf *
3483
3484 mkdir directory1 directory2
3485 touch directory1/file directory2/file
3486
3487 cat >F1 <<'_ATEOF'
3488 --no-recursion
3489 directory1/
3490 --recursion
3491 directory2/
3492 _ATEOF
3493
3494
3495 cat >F2A <<'_ATEOF'
3496 directory1/
3497 _ATEOF
3498
3499
3500 cat >F2B <<'_ATEOF'
3501 directory2/
3502 _ATEOF
3503
3504
3505 a=archive
3506 tar cf \"\$a\" --files-from F1
3507 tar tf \"\$a\"
3508
3509 a=archive2
3510 tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
3511 tar tf \"\$a\"
3512 )"
3513 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
3514 ( $at_check_trace;
3515 mkdir ustar
3516 (cd ustar
3517 TEST_TAR_FORMAT=ustar
3518 export TEST_TAR_FORMAT
3519 TAR_OPTIONS="-H ustar"
3520 export TAR_OPTIONS
3521 rm -rf *
3522
3523 mkdir directory1 directory2
3524 touch directory1/file directory2/file
3525
3526 cat >F1 <<'_ATEOF'
3527 --no-recursion
3528 directory1/
3529 --recursion
3530 directory2/
3531 _ATEOF
3532
3533
3534 cat >F2A <<'_ATEOF'
3535 directory1/
3536 _ATEOF
3537
3538
3539 cat >F2B <<'_ATEOF'
3540 directory2/
3541 _ATEOF
3542
3543
3544 a=archive
3545 tar cf "$a" --files-from F1
3546 tar tf "$a"
3547
3548 a=archive2
3549 tar cf "$a" --no-recursion -T F2A --recursion -T F2B
3550 tar tf "$a"
3551 )
3552 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3553 at_status=$? at_failed=false
3554 $at_check_filter
3555 at_fn_diff_devnull "$at_stderr" || at_failed=:
3556 echo >>"$at_stdout"; $as_echo "directory1/
3557 directory2/
3558 directory2/file
3559 directory1/
3560 directory2/
3561 directory2/file
3562 " | \
3563   $at_diff - "$at_stdout" || at_failed=:
3564 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
3565 $at_failed && at_fn_log_failure
3566 $at_traceon; }
3567
3568               { set +x
3569 $as_echo "$at_srcdir/T-recurse.at:30:
3570 mkdir posix
3571 (cd posix
3572 TEST_TAR_FORMAT=posix
3573 export TEST_TAR_FORMAT
3574 TAR_OPTIONS=\"-H posix\"
3575 export TAR_OPTIONS
3576 rm -rf *
3577
3578 mkdir directory1 directory2
3579 touch directory1/file directory2/file
3580
3581 cat >F1 <<'_ATEOF'
3582 --no-recursion
3583 directory1/
3584 --recursion
3585 directory2/
3586 _ATEOF
3587
3588
3589 cat >F2A <<'_ATEOF'
3590 directory1/
3591 _ATEOF
3592
3593
3594 cat >F2B <<'_ATEOF'
3595 directory2/
3596 _ATEOF
3597
3598
3599 a=archive
3600 tar cf \"\$a\" --files-from F1
3601 tar tf \"\$a\"
3602
3603 a=archive2
3604 tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
3605 tar tf \"\$a\"
3606 )"
3607 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
3608 ( $at_check_trace;
3609 mkdir posix
3610 (cd posix
3611 TEST_TAR_FORMAT=posix
3612 export TEST_TAR_FORMAT
3613 TAR_OPTIONS="-H posix"
3614 export TAR_OPTIONS
3615 rm -rf *
3616
3617 mkdir directory1 directory2
3618 touch directory1/file directory2/file
3619
3620 cat >F1 <<'_ATEOF'
3621 --no-recursion
3622 directory1/
3623 --recursion
3624 directory2/
3625 _ATEOF
3626
3627
3628 cat >F2A <<'_ATEOF'
3629 directory1/
3630 _ATEOF
3631
3632
3633 cat >F2B <<'_ATEOF'
3634 directory2/
3635 _ATEOF
3636
3637
3638 a=archive
3639 tar cf "$a" --files-from F1
3640 tar tf "$a"
3641
3642 a=archive2
3643 tar cf "$a" --no-recursion -T F2A --recursion -T F2B
3644 tar tf "$a"
3645 )
3646 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3647 at_status=$? at_failed=false
3648 $at_check_filter
3649 at_fn_diff_devnull "$at_stderr" || at_failed=:
3650 echo >>"$at_stdout"; $as_echo "directory1/
3651 directory2/
3652 directory2/file
3653 directory1/
3654 directory2/
3655 directory2/file
3656 " | \
3657   $at_diff - "$at_stdout" || at_failed=:
3658 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
3659 $at_failed && at_fn_log_failure
3660 $at_traceon; }
3661
3662               { set +x
3663 $as_echo "$at_srcdir/T-recurse.at:30:
3664 mkdir gnu
3665 (cd gnu
3666 TEST_TAR_FORMAT=gnu
3667 export TEST_TAR_FORMAT
3668 TAR_OPTIONS=\"-H gnu\"
3669 export TAR_OPTIONS
3670 rm -rf *
3671
3672 mkdir directory1 directory2
3673 touch directory1/file directory2/file
3674
3675 cat >F1 <<'_ATEOF'
3676 --no-recursion
3677 directory1/
3678 --recursion
3679 directory2/
3680 _ATEOF
3681
3682
3683 cat >F2A <<'_ATEOF'
3684 directory1/
3685 _ATEOF
3686
3687
3688 cat >F2B <<'_ATEOF'
3689 directory2/
3690 _ATEOF
3691
3692
3693 a=archive
3694 tar cf \"\$a\" --files-from F1
3695 tar tf \"\$a\"
3696
3697 a=archive2
3698 tar cf \"\$a\" --no-recursion -T F2A --recursion -T F2B
3699 tar tf \"\$a\"
3700 )"
3701 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:30"
3702 ( $at_check_trace;
3703 mkdir gnu
3704 (cd gnu
3705 TEST_TAR_FORMAT=gnu
3706 export TEST_TAR_FORMAT
3707 TAR_OPTIONS="-H gnu"
3708 export TAR_OPTIONS
3709 rm -rf *
3710
3711 mkdir directory1 directory2
3712 touch directory1/file directory2/file
3713
3714 cat >F1 <<'_ATEOF'
3715 --no-recursion
3716 directory1/
3717 --recursion
3718 directory2/
3719 _ATEOF
3720
3721
3722 cat >F2A <<'_ATEOF'
3723 directory1/
3724 _ATEOF
3725
3726
3727 cat >F2B <<'_ATEOF'
3728 directory2/
3729 _ATEOF
3730
3731
3732 a=archive
3733 tar cf "$a" --files-from F1
3734 tar tf "$a"
3735
3736 a=archive2
3737 tar cf "$a" --no-recursion -T F2A --recursion -T F2B
3738 tar tf "$a"
3739 )
3740 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3741 at_status=$? at_failed=false
3742 $at_check_filter
3743 at_fn_diff_devnull "$at_stderr" || at_failed=:
3744 echo >>"$at_stdout"; $as_echo "directory1/
3745 directory2/
3746 directory2/file
3747 directory1/
3748 directory2/
3749 directory2/file
3750 " | \
3751   $at_diff - "$at_stdout" || at_failed=:
3752 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:30"
3753 $at_failed && at_fn_log_failure
3754 $at_traceon; }
3755
3756
3757
3758
3759   set +x
3760   $at_times_p && times >"$at_times_file"
3761 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3762 read at_status <"$at_status_file"
3763 #AT_STOP_14
3764 #AT_START_15
3765 at_fn_group_banner 15 'T-recurse.at:66' \
3766   "toggle --recursion (not) from -T" "               " 2
3767 at_xfail=no
3768       test -f $XFAILFILE && at_xfail=yes
3769 (
3770   $as_echo "15. $at_setup_line: testing $at_desc ..."
3771   $at_traceon
3772
3773
3774
3775
3776
3777   { set +x
3778 $as_echo "$at_srcdir/T-recurse.at:69:
3779 mkdir v7
3780 (cd v7
3781 TEST_TAR_FORMAT=v7
3782 export TEST_TAR_FORMAT
3783 TAR_OPTIONS=\"-H v7\"
3784 export TAR_OPTIONS
3785 rm -rf *
3786
3787 mkdir directory1 directory2
3788 touch directory1/file directory2/file
3789
3790 cat >F1 <<'_ATEOF'
3791 --no-recursion
3792 directory1/
3793 _ATEOF
3794
3795
3796 cat >F2 <<'_ATEOF'
3797 directory2/
3798 _ATEOF
3799
3800
3801 tar cf archive -T F1 --recursion -T F2
3802 tar tf archive
3803
3804 )"
3805 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
3806 ( $at_check_trace;
3807 mkdir v7
3808 (cd v7
3809 TEST_TAR_FORMAT=v7
3810 export TEST_TAR_FORMAT
3811 TAR_OPTIONS="-H v7"
3812 export TAR_OPTIONS
3813 rm -rf *
3814
3815 mkdir directory1 directory2
3816 touch directory1/file directory2/file
3817
3818 cat >F1 <<'_ATEOF'
3819 --no-recursion
3820 directory1/
3821 _ATEOF
3822
3823
3824 cat >F2 <<'_ATEOF'
3825 directory2/
3826 _ATEOF
3827
3828
3829 tar cf archive -T F1 --recursion -T F2
3830 tar tf archive
3831
3832 )
3833 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3834 at_status=$? at_failed=false
3835 $at_check_filter
3836 at_fn_diff_devnull "$at_stderr" || at_failed=:
3837 echo >>"$at_stdout"; $as_echo "directory1/
3838 directory2/
3839 directory2/file
3840 " | \
3841   $at_diff - "$at_stdout" || at_failed=:
3842 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
3843 $at_failed && at_fn_log_failure
3844 $at_traceon; }
3845
3846               { set +x
3847 $as_echo "$at_srcdir/T-recurse.at:69:
3848 mkdir oldgnu
3849 (cd oldgnu
3850 TEST_TAR_FORMAT=oldgnu
3851 export TEST_TAR_FORMAT
3852 TAR_OPTIONS=\"-H oldgnu\"
3853 export TAR_OPTIONS
3854 rm -rf *
3855
3856 mkdir directory1 directory2
3857 touch directory1/file directory2/file
3858
3859 cat >F1 <<'_ATEOF'
3860 --no-recursion
3861 directory1/
3862 _ATEOF
3863
3864
3865 cat >F2 <<'_ATEOF'
3866 directory2/
3867 _ATEOF
3868
3869
3870 tar cf archive -T F1 --recursion -T F2
3871 tar tf archive
3872
3873 )"
3874 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
3875 ( $at_check_trace;
3876 mkdir oldgnu
3877 (cd oldgnu
3878 TEST_TAR_FORMAT=oldgnu
3879 export TEST_TAR_FORMAT
3880 TAR_OPTIONS="-H oldgnu"
3881 export TAR_OPTIONS
3882 rm -rf *
3883
3884 mkdir directory1 directory2
3885 touch directory1/file directory2/file
3886
3887 cat >F1 <<'_ATEOF'
3888 --no-recursion
3889 directory1/
3890 _ATEOF
3891
3892
3893 cat >F2 <<'_ATEOF'
3894 directory2/
3895 _ATEOF
3896
3897
3898 tar cf archive -T F1 --recursion -T F2
3899 tar tf archive
3900
3901 )
3902 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3903 at_status=$? at_failed=false
3904 $at_check_filter
3905 at_fn_diff_devnull "$at_stderr" || at_failed=:
3906 echo >>"$at_stdout"; $as_echo "directory1/
3907 directory2/
3908 directory2/file
3909 " | \
3910   $at_diff - "$at_stdout" || at_failed=:
3911 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
3912 $at_failed && at_fn_log_failure
3913 $at_traceon; }
3914
3915               { set +x
3916 $as_echo "$at_srcdir/T-recurse.at:69:
3917 mkdir ustar
3918 (cd ustar
3919 TEST_TAR_FORMAT=ustar
3920 export TEST_TAR_FORMAT
3921 TAR_OPTIONS=\"-H ustar\"
3922 export TAR_OPTIONS
3923 rm -rf *
3924
3925 mkdir directory1 directory2
3926 touch directory1/file directory2/file
3927
3928 cat >F1 <<'_ATEOF'
3929 --no-recursion
3930 directory1/
3931 _ATEOF
3932
3933
3934 cat >F2 <<'_ATEOF'
3935 directory2/
3936 _ATEOF
3937
3938
3939 tar cf archive -T F1 --recursion -T F2
3940 tar tf archive
3941
3942 )"
3943 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
3944 ( $at_check_trace;
3945 mkdir ustar
3946 (cd ustar
3947 TEST_TAR_FORMAT=ustar
3948 export TEST_TAR_FORMAT
3949 TAR_OPTIONS="-H ustar"
3950 export TAR_OPTIONS
3951 rm -rf *
3952
3953 mkdir directory1 directory2
3954 touch directory1/file directory2/file
3955
3956 cat >F1 <<'_ATEOF'
3957 --no-recursion
3958 directory1/
3959 _ATEOF
3960
3961
3962 cat >F2 <<'_ATEOF'
3963 directory2/
3964 _ATEOF
3965
3966
3967 tar cf archive -T F1 --recursion -T F2
3968 tar tf archive
3969
3970 )
3971 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3972 at_status=$? at_failed=false
3973 $at_check_filter
3974 at_fn_diff_devnull "$at_stderr" || at_failed=:
3975 echo >>"$at_stdout"; $as_echo "directory1/
3976 directory2/
3977 directory2/file
3978 " | \
3979   $at_diff - "$at_stdout" || at_failed=:
3980 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
3981 $at_failed && at_fn_log_failure
3982 $at_traceon; }
3983
3984               { set +x
3985 $as_echo "$at_srcdir/T-recurse.at:69:
3986 mkdir posix
3987 (cd posix
3988 TEST_TAR_FORMAT=posix
3989 export TEST_TAR_FORMAT
3990 TAR_OPTIONS=\"-H posix\"
3991 export TAR_OPTIONS
3992 rm -rf *
3993
3994 mkdir directory1 directory2
3995 touch directory1/file directory2/file
3996
3997 cat >F1 <<'_ATEOF'
3998 --no-recursion
3999 directory1/
4000 _ATEOF
4001
4002
4003 cat >F2 <<'_ATEOF'
4004 directory2/
4005 _ATEOF
4006
4007
4008 tar cf archive -T F1 --recursion -T F2
4009 tar tf archive
4010
4011 )"
4012 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
4013 ( $at_check_trace;
4014 mkdir posix
4015 (cd posix
4016 TEST_TAR_FORMAT=posix
4017 export TEST_TAR_FORMAT
4018 TAR_OPTIONS="-H posix"
4019 export TAR_OPTIONS
4020 rm -rf *
4021
4022 mkdir directory1 directory2
4023 touch directory1/file directory2/file
4024
4025 cat >F1 <<'_ATEOF'
4026 --no-recursion
4027 directory1/
4028 _ATEOF
4029
4030
4031 cat >F2 <<'_ATEOF'
4032 directory2/
4033 _ATEOF
4034
4035
4036 tar cf archive -T F1 --recursion -T F2
4037 tar tf archive
4038
4039 )
4040 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4041 at_status=$? at_failed=false
4042 $at_check_filter
4043 at_fn_diff_devnull "$at_stderr" || at_failed=:
4044 echo >>"$at_stdout"; $as_echo "directory1/
4045 directory2/
4046 directory2/file
4047 " | \
4048   $at_diff - "$at_stdout" || at_failed=:
4049 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
4050 $at_failed && at_fn_log_failure
4051 $at_traceon; }
4052
4053               { set +x
4054 $as_echo "$at_srcdir/T-recurse.at:69:
4055 mkdir gnu
4056 (cd gnu
4057 TEST_TAR_FORMAT=gnu
4058 export TEST_TAR_FORMAT
4059 TAR_OPTIONS=\"-H gnu\"
4060 export TAR_OPTIONS
4061 rm -rf *
4062
4063 mkdir directory1 directory2
4064 touch directory1/file directory2/file
4065
4066 cat >F1 <<'_ATEOF'
4067 --no-recursion
4068 directory1/
4069 _ATEOF
4070
4071
4072 cat >F2 <<'_ATEOF'
4073 directory2/
4074 _ATEOF
4075
4076
4077 tar cf archive -T F1 --recursion -T F2
4078 tar tf archive
4079
4080 )"
4081 at_fn_check_prepare_notrace 'an embedded newline' "T-recurse.at:69"
4082 ( $at_check_trace;
4083 mkdir gnu
4084 (cd gnu
4085 TEST_TAR_FORMAT=gnu
4086 export TEST_TAR_FORMAT
4087 TAR_OPTIONS="-H gnu"
4088 export TAR_OPTIONS
4089 rm -rf *
4090
4091 mkdir directory1 directory2
4092 touch directory1/file directory2/file
4093
4094 cat >F1 <<'_ATEOF'
4095 --no-recursion
4096 directory1/
4097 _ATEOF
4098
4099
4100 cat >F2 <<'_ATEOF'
4101 directory2/
4102 _ATEOF
4103
4104
4105 tar cf archive -T F1 --recursion -T F2
4106 tar tf archive
4107
4108 )
4109 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4110 at_status=$? at_failed=false
4111 $at_check_filter
4112 at_fn_diff_devnull "$at_stderr" || at_failed=:
4113 echo >>"$at_stdout"; $as_echo "directory1/
4114 directory2/
4115 directory2/file
4116 " | \
4117   $at_diff - "$at_stdout" || at_failed=:
4118 at_fn_check_status 0 $at_status "$at_srcdir/T-recurse.at:69"
4119 $at_failed && at_fn_log_failure
4120 $at_traceon; }
4121
4122
4123
4124
4125   set +x
4126   $at_times_p && times >"$at_times_file"
4127 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4128 read at_status <"$at_status_file"
4129 #AT_STOP_15
4130 #AT_START_16
4131 at_fn_group_banner 16 'T-cd.at:21' \
4132   "-C in file lists" "                               " 2
4133 at_xfail=no
4134       test -f $XFAILFILE && at_xfail=yes
4135 (
4136   $as_echo "16. $at_setup_line: testing $at_desc ..."
4137   $at_traceon
4138
4139
4140
4141
4142
4143   { set +x
4144 $as_echo "$at_srcdir/T-cd.at:24:
4145 mkdir ustar
4146 (cd ustar
4147 TEST_TAR_FORMAT=ustar
4148 export TEST_TAR_FORMAT
4149 TAR_OPTIONS=\"-H ustar\"
4150 export TAR_OPTIONS
4151 rm -rf *
4152
4153
4154 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4155
4156 >file1
4157 mkdir dir
4158 >dir/file2
4159 >dir/file3
4160 cat >F1 <<'_ATEOF'
4161 file1
4162 -C dir
4163 .
4164 _ATEOF
4165
4166 tar cf archive -T F1
4167 tar tf archive | sort
4168 )"
4169 at_fn_check_prepare_notrace 'a `...` command substitution' "T-cd.at:24"
4170 ( $at_check_trace;
4171 mkdir ustar
4172 (cd ustar
4173 TEST_TAR_FORMAT=ustar
4174 export TEST_TAR_FORMAT
4175 TAR_OPTIONS="-H ustar"
4176 export TAR_OPTIONS
4177 rm -rf *
4178
4179
4180 test -z "`sort < /dev/null 2>&1`" || exit 77
4181
4182 >file1
4183 mkdir dir
4184 >dir/file2
4185 >dir/file3
4186 cat >F1 <<'_ATEOF'
4187 file1
4188 -C dir
4189 .
4190 _ATEOF
4191
4192 tar cf archive -T F1
4193 tar tf archive | sort
4194 )
4195 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4196 at_status=$? at_failed=false
4197 $at_check_filter
4198 at_fn_diff_devnull "$at_stderr" || at_failed=:
4199 echo >>"$at_stdout"; $as_echo "./
4200 ./file2
4201 ./file3
4202 file1
4203 " | \
4204   $at_diff - "$at_stdout" || at_failed=:
4205 at_fn_check_status 0 $at_status "$at_srcdir/T-cd.at:24"
4206 $at_failed && at_fn_log_failure
4207 $at_traceon; }
4208
4209
4210
4211
4212   set +x
4213   $at_times_p && times >"$at_times_file"
4214 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4215 read at_status <"$at_status_file"
4216 #AT_STOP_16
4217 #AT_START_17
4218 at_fn_group_banner 17 'T-empty.at:26' \
4219   "empty entries" "                                  " 2
4220 at_xfail=no
4221       test -f $XFAILFILE && at_xfail=yes
4222 (
4223   $as_echo "17. $at_setup_line: testing $at_desc ..."
4224   $at_traceon
4225
4226
4227
4228 cat >file-list <<'_ATEOF'
4229 jeden
4230 dwa
4231
4232 trzy
4233 _ATEOF
4234
4235
4236
4237
4238   { set +x
4239 $as_echo "$at_srcdir/T-empty.at:36:
4240 mkdir ustar
4241 (cd ustar
4242 TEST_TAR_FORMAT=ustar
4243 export TEST_TAR_FORMAT
4244 TAR_OPTIONS=\"-H ustar\"
4245 export TAR_OPTIONS
4246 rm -rf *
4247
4248
4249 genfile --file jeden
4250 genfile --file dwa
4251 genfile --file trzy
4252
4253 tar cfvT archive ../file-list
4254 )"
4255 at_fn_check_prepare_notrace 'an embedded newline' "T-empty.at:36"
4256 ( $at_check_trace;
4257 mkdir ustar
4258 (cd ustar
4259 TEST_TAR_FORMAT=ustar
4260 export TEST_TAR_FORMAT
4261 TAR_OPTIONS="-H ustar"
4262 export TAR_OPTIONS
4263 rm -rf *
4264
4265
4266 genfile --file jeden
4267 genfile --file dwa
4268 genfile --file trzy
4269
4270 tar cfvT archive ../file-list
4271 )
4272 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4273 at_status=$? at_failed=false
4274 $at_check_filter
4275 at_fn_diff_devnull "$at_stderr" || at_failed=:
4276 echo >>"$at_stdout"; $as_echo "jeden
4277 dwa
4278 trzy
4279 " | \
4280   $at_diff - "$at_stdout" || at_failed=:
4281 at_fn_check_status 0 $at_status "$at_srcdir/T-empty.at:36"
4282 $at_failed && at_fn_log_failure
4283 $at_traceon; }
4284
4285
4286  # Testing one format is enough
4287
4288   set +x
4289   $at_times_p && times >"$at_times_file"
4290 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4291 read at_status <"$at_status_file"
4292 #AT_STOP_17
4293 #AT_START_18
4294 at_fn_group_banner 18 'T-null.at:21' \
4295   "0-separated file without -0" "                    " 2
4296 at_xfail=no
4297       test -f $XFAILFILE && at_xfail=yes
4298 (
4299   $as_echo "18. $at_setup_line: testing $at_desc ..."
4300   $at_traceon
4301
4302
4303
4304
4305
4306   { set +x
4307 $as_echo "$at_srcdir/T-null.at:24:
4308 mkdir ustar
4309 (cd ustar
4310 TEST_TAR_FORMAT=ustar
4311 export TEST_TAR_FORMAT
4312 TAR_OPTIONS=\"-H ustar\"
4313 export TAR_OPTIONS
4314 rm -rf *
4315
4316
4317 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4318
4319
4320 echo jeden > temp
4321 echo dwa >> temp
4322 echo trzy >> temp
4323 cat temp | tr '\\n' '\\0' > file-list
4324
4325 genfile -f jeden
4326 genfile -f dwa
4327 genfile -f trzy
4328
4329 tar cfTv archive file-list
4330 )"
4331 at_fn_check_prepare_notrace 'a `...` command substitution' "T-null.at:24"
4332 ( $at_check_trace;
4333 mkdir ustar
4334 (cd ustar
4335 TEST_TAR_FORMAT=ustar
4336 export TEST_TAR_FORMAT
4337 TAR_OPTIONS="-H ustar"
4338 export TAR_OPTIONS
4339 rm -rf *
4340
4341
4342 test -z "`sort < /dev/null 2>&1`" || exit 77
4343
4344
4345 echo jeden > temp
4346 echo dwa >> temp
4347 echo trzy >> temp
4348 cat temp | tr '\n' '\0' > file-list
4349
4350 genfile -f jeden
4351 genfile -f dwa
4352 genfile -f trzy
4353
4354 tar cfTv archive file-list
4355 )
4356 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4357 at_status=$? at_failed=false
4358 $at_check_filter
4359 echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character
4360 " | \
4361   $at_diff - "$at_stderr" || at_failed=:
4362 echo >>"$at_stdout"; $as_echo "jeden
4363 dwa
4364 trzy
4365 " | \
4366   $at_diff - "$at_stdout" || at_failed=:
4367 at_fn_check_status 0 $at_status "$at_srcdir/T-null.at:24"
4368 $at_failed && at_fn_log_failure
4369 $at_traceon; }
4370
4371
4372  # Testing one format is enough
4373
4374   set +x
4375   $at_times_p && times >"$at_times_file"
4376 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4377 read at_status <"$at_status_file"
4378 #AT_STOP_18
4379 #AT_START_19
4380 at_fn_group_banner 19 'T-null2.at:17' \
4381   "--null enables verbatim reading" "                " 2
4382 at_xfail=no
4383       test -f $XFAILFILE && at_xfail=yes
4384 (
4385   $as_echo "19. $at_setup_line: testing $at_desc ..."
4386   $at_traceon
4387
4388
4389
4390 # According to the docs, --null should read each line from the file
4391 # list verbatim.  This feature was broken by commit 26538c9b (tar version
4392 # 1.27).
4393
4394
4395
4396   { set +x
4397 $as_echo "$at_srcdir/T-null2.at:24:
4398 mkdir ustar
4399 (cd ustar
4400 TEST_TAR_FORMAT=ustar
4401 export TEST_TAR_FORMAT
4402 TAR_OPTIONS=\"-H ustar\"
4403 export TAR_OPTIONS
4404 rm -rf *
4405
4406 cat >file-list <<'_ATEOF'
4407 a
4408 -b
4409 --c d
4410 _ATEOF
4411
4412
4413 genfile -f a
4414 genfile -f -b
4415 genfile -f '--c d'
4416
4417 cat file-list | tr '\\n' '\\0' | tar -c -f archive -v --null -T -
4418 )"
4419 at_fn_check_prepare_notrace 'an embedded newline' "T-null2.at:24"
4420 ( $at_check_trace;
4421 mkdir ustar
4422 (cd ustar
4423 TEST_TAR_FORMAT=ustar
4424 export TEST_TAR_FORMAT
4425 TAR_OPTIONS="-H ustar"
4426 export TAR_OPTIONS
4427 rm -rf *
4428
4429 cat >file-list <<'_ATEOF'
4430 a
4431 -b
4432 --c d
4433 _ATEOF
4434
4435
4436 genfile -f a
4437 genfile -f -b
4438 genfile -f '--c d'
4439
4440 cat file-list | tr '\n' '\0' | tar -c -f archive -v --null -T -
4441 )
4442 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4443 at_status=$? at_failed=false
4444 $at_check_filter
4445 at_fn_diff_devnull "$at_stderr" || at_failed=:
4446 echo >>"$at_stdout"; $as_echo "a
4447 -b
4448 --c d
4449 " | \
4450   $at_diff - "$at_stdout" || at_failed=:
4451 at_fn_check_status 0 $at_status "$at_srcdir/T-null2.at:24"
4452 $at_failed && at_fn_log_failure
4453 $at_traceon; }
4454
4455
4456  # Testing one format is enough
4457
4458   set +x
4459   $at_times_p && times >"$at_times_file"
4460 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4461 read at_status <"$at_status_file"
4462 #AT_STOP_19
4463 #AT_START_20
4464 at_fn_group_banner 20 'T-zfile.at:26' \
4465   "empty file" "                                     " 2
4466 at_xfail=no
4467       test -f $XFAILFILE && at_xfail=yes
4468 (
4469   $as_echo "20. $at_setup_line: testing $at_desc ..."
4470   $at_traceon
4471
4472
4473
4474
4475
4476   { set +x
4477 $as_echo "$at_srcdir/T-zfile.at:29:
4478 mkdir ustar
4479 (cd ustar
4480 TEST_TAR_FORMAT=ustar
4481 export TEST_TAR_FORMAT
4482 TAR_OPTIONS=\"-H ustar\"
4483 export TAR_OPTIONS
4484 rm -rf *
4485
4486 genfile --length=0 --file empty
4487 genfile --file a
4488 genfile --file b
4489 cat >valid <<'_ATEOF'
4490 a
4491 b
4492 _ATEOF
4493
4494
4495 tar cf archive -T empty -T valid
4496 tar tf archive
4497 echo \"==\"
4498 tar cf archive -T valid -T empty
4499 tar tf archive
4500 )"
4501 at_fn_check_prepare_notrace 'an embedded newline' "T-zfile.at:29"
4502 ( $at_check_trace;
4503 mkdir ustar
4504 (cd ustar
4505 TEST_TAR_FORMAT=ustar
4506 export TEST_TAR_FORMAT
4507 TAR_OPTIONS="-H ustar"
4508 export TAR_OPTIONS
4509 rm -rf *
4510
4511 genfile --length=0 --file empty
4512 genfile --file a
4513 genfile --file b
4514 cat >valid <<'_ATEOF'
4515 a
4516 b
4517 _ATEOF
4518
4519
4520 tar cf archive -T empty -T valid
4521 tar tf archive
4522 echo "=="
4523 tar cf archive -T valid -T empty
4524 tar tf archive
4525 )
4526 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4527 at_status=$? at_failed=false
4528 $at_check_filter
4529 at_fn_diff_devnull "$at_stderr" || at_failed=:
4530 echo >>"$at_stdout"; $as_echo "a
4531 b
4532 ==
4533 a
4534 b
4535 " | \
4536   $at_diff - "$at_stdout" || at_failed=:
4537 at_fn_check_status 0 $at_status "$at_srcdir/T-zfile.at:29"
4538 $at_failed && at_fn_log_failure
4539 $at_traceon; }
4540
4541
4542  # Testing one format is enough
4543
4544   set +x
4545   $at_times_p && times >"$at_times_file"
4546 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4547 read at_status <"$at_status_file"
4548 #AT_STOP_20
4549 #AT_START_21
4550 at_fn_group_banner 21 'T-nonl.at:27' \
4551   "entries with missing newlines" "                  " 2
4552 at_xfail=no
4553       test -f $XFAILFILE && at_xfail=yes
4554 (
4555   $as_echo "21. $at_setup_line: testing $at_desc ..."
4556   $at_traceon
4557
4558
4559
4560
4561
4562   { set +x
4563 $as_echo "$at_srcdir/T-nonl.at:30:
4564 mkdir ustar
4565 (cd ustar
4566 TEST_TAR_FORMAT=ustar
4567 export TEST_TAR_FORMAT
4568 TAR_OPTIONS=\"-H ustar\"
4569 export TAR_OPTIONS
4570 rm -rf *
4571
4572 genfile --length=0 --file empty
4573 \$as_echo_n c > 1.nonl
4574 echo d > 2.nonl
4575 \$as_echo_n e >> 2.nonl
4576 touch a b c d e
4577 cat >filelist <<'_ATEOF'
4578 a
4579 b
4580 _ATEOF
4581
4582
4583 tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
4584 tar tf archive
4585 echo ==
4586 tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
4587 tar tf archive
4588 )"
4589 at_fn_check_prepare_notrace 'an embedded newline' "T-nonl.at:30"
4590 ( $at_check_trace;
4591 mkdir ustar
4592 (cd ustar
4593 TEST_TAR_FORMAT=ustar
4594 export TEST_TAR_FORMAT
4595 TAR_OPTIONS="-H ustar"
4596 export TAR_OPTIONS
4597 rm -rf *
4598
4599 genfile --length=0 --file empty
4600 $as_echo_n c > 1.nonl
4601 echo d > 2.nonl
4602 $as_echo_n e >> 2.nonl
4603 touch a b c d e
4604 cat >filelist <<'_ATEOF'
4605 a
4606 b
4607 _ATEOF
4608
4609
4610 tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
4611 tar tf archive
4612 echo ==
4613 tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
4614 tar tf archive
4615 )
4616 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4617 at_status=$? at_failed=false
4618 $at_check_filter
4619 at_fn_diff_devnull "$at_stderr" || at_failed=:
4620 echo >>"$at_stdout"; $as_echo "c
4621 d
4622 e
4623 a
4624 b
4625 ==
4626 d
4627 e
4628 a
4629 b
4630 c
4631 " | \
4632   $at_diff - "$at_stdout" || at_failed=:
4633 at_fn_check_status 0 $at_status "$at_srcdir/T-nonl.at:30"
4634 $at_failed && at_fn_log_failure
4635 $at_traceon; }
4636
4637
4638
4639
4640   set +x
4641   $at_times_p && times >"$at_times_file"
4642 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4643 read at_status <"$at_status_file"
4644 #AT_STOP_21
4645 #AT_START_22
4646 at_fn_group_banner 22 'T-dir00.at:28' \
4647   "recursive extraction from --files-from" "         " 2
4648 at_xfail=no
4649       test -f $XFAILFILE && at_xfail=yes
4650 (
4651   $as_echo "22. $at_setup_line: testing $at_desc ..."
4652   $at_traceon
4653
4654
4655
4656
4657   { set +x
4658 $as_echo "$at_srcdir/T-dir00.at:30:
4659 mkdir v7
4660 (cd v7
4661 TEST_TAR_FORMAT=v7
4662 export TEST_TAR_FORMAT
4663 TAR_OPTIONS=\"-H v7\"
4664 export TAR_OPTIONS
4665 rm -rf *
4666
4667
4668 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4669
4670 mkdir dir
4671 genfile -f dir/file1
4672 genfile -f dir/file2
4673 tar cf archive dir
4674 rm -rf dir
4675 echo dir > list
4676 tar xfTv archive list | sort
4677 )"
4678 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
4679 ( $at_check_trace;
4680 mkdir v7
4681 (cd v7
4682 TEST_TAR_FORMAT=v7
4683 export TEST_TAR_FORMAT
4684 TAR_OPTIONS="-H v7"
4685 export TAR_OPTIONS
4686 rm -rf *
4687
4688
4689 test -z "`sort < /dev/null 2>&1`" || exit 77
4690
4691 mkdir dir
4692 genfile -f dir/file1
4693 genfile -f dir/file2
4694 tar cf archive dir
4695 rm -rf dir
4696 echo dir > list
4697 tar xfTv archive list | sort
4698 )
4699 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4700 at_status=$? at_failed=false
4701 $at_check_filter
4702 at_fn_diff_devnull "$at_stderr" || at_failed=:
4703 echo >>"$at_stdout"; $as_echo "dir/
4704 dir/file1
4705 dir/file2
4706 " | \
4707   $at_diff - "$at_stdout" || at_failed=:
4708 at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
4709 $at_failed && at_fn_log_failure
4710 $at_traceon; }
4711
4712               { set +x
4713 $as_echo "$at_srcdir/T-dir00.at:30:
4714 mkdir oldgnu
4715 (cd oldgnu
4716 TEST_TAR_FORMAT=oldgnu
4717 export TEST_TAR_FORMAT
4718 TAR_OPTIONS=\"-H oldgnu\"
4719 export TAR_OPTIONS
4720 rm -rf *
4721
4722
4723 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4724
4725 mkdir dir
4726 genfile -f dir/file1
4727 genfile -f dir/file2
4728 tar cf archive dir
4729 rm -rf dir
4730 echo dir > list
4731 tar xfTv archive list | sort
4732 )"
4733 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
4734 ( $at_check_trace;
4735 mkdir oldgnu
4736 (cd oldgnu
4737 TEST_TAR_FORMAT=oldgnu
4738 export TEST_TAR_FORMAT
4739 TAR_OPTIONS="-H oldgnu"
4740 export TAR_OPTIONS
4741 rm -rf *
4742
4743
4744 test -z "`sort < /dev/null 2>&1`" || exit 77
4745
4746 mkdir dir
4747 genfile -f dir/file1
4748 genfile -f dir/file2
4749 tar cf archive dir
4750 rm -rf dir
4751 echo dir > list
4752 tar xfTv archive list | sort
4753 )
4754 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4755 at_status=$? at_failed=false
4756 $at_check_filter
4757 at_fn_diff_devnull "$at_stderr" || at_failed=:
4758 echo >>"$at_stdout"; $as_echo "dir/
4759 dir/file1
4760 dir/file2
4761 " | \
4762   $at_diff - "$at_stdout" || at_failed=:
4763 at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
4764 $at_failed && at_fn_log_failure
4765 $at_traceon; }
4766
4767               { set +x
4768 $as_echo "$at_srcdir/T-dir00.at:30:
4769 mkdir ustar
4770 (cd ustar
4771 TEST_TAR_FORMAT=ustar
4772 export TEST_TAR_FORMAT
4773 TAR_OPTIONS=\"-H ustar\"
4774 export TAR_OPTIONS
4775 rm -rf *
4776
4777
4778 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4779
4780 mkdir dir
4781 genfile -f dir/file1
4782 genfile -f dir/file2
4783 tar cf archive dir
4784 rm -rf dir
4785 echo dir > list
4786 tar xfTv archive list | sort
4787 )"
4788 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
4789 ( $at_check_trace;
4790 mkdir ustar
4791 (cd ustar
4792 TEST_TAR_FORMAT=ustar
4793 export TEST_TAR_FORMAT
4794 TAR_OPTIONS="-H ustar"
4795 export TAR_OPTIONS
4796 rm -rf *
4797
4798
4799 test -z "`sort < /dev/null 2>&1`" || exit 77
4800
4801 mkdir dir
4802 genfile -f dir/file1
4803 genfile -f dir/file2
4804 tar cf archive dir
4805 rm -rf dir
4806 echo dir > list
4807 tar xfTv archive list | sort
4808 )
4809 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4810 at_status=$? at_failed=false
4811 $at_check_filter
4812 at_fn_diff_devnull "$at_stderr" || at_failed=:
4813 echo >>"$at_stdout"; $as_echo "dir/
4814 dir/file1
4815 dir/file2
4816 " | \
4817   $at_diff - "$at_stdout" || at_failed=:
4818 at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
4819 $at_failed && at_fn_log_failure
4820 $at_traceon; }
4821
4822               { set +x
4823 $as_echo "$at_srcdir/T-dir00.at:30:
4824 mkdir posix
4825 (cd posix
4826 TEST_TAR_FORMAT=posix
4827 export TEST_TAR_FORMAT
4828 TAR_OPTIONS=\"-H posix\"
4829 export TAR_OPTIONS
4830 rm -rf *
4831
4832
4833 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4834
4835 mkdir dir
4836 genfile -f dir/file1
4837 genfile -f dir/file2
4838 tar cf archive dir
4839 rm -rf dir
4840 echo dir > list
4841 tar xfTv archive list | sort
4842 )"
4843 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
4844 ( $at_check_trace;
4845 mkdir posix
4846 (cd posix
4847 TEST_TAR_FORMAT=posix
4848 export TEST_TAR_FORMAT
4849 TAR_OPTIONS="-H posix"
4850 export TAR_OPTIONS
4851 rm -rf *
4852
4853
4854 test -z "`sort < /dev/null 2>&1`" || exit 77
4855
4856 mkdir dir
4857 genfile -f dir/file1
4858 genfile -f dir/file2
4859 tar cf archive dir
4860 rm -rf dir
4861 echo dir > list
4862 tar xfTv archive list | sort
4863 )
4864 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4865 at_status=$? at_failed=false
4866 $at_check_filter
4867 at_fn_diff_devnull "$at_stderr" || at_failed=:
4868 echo >>"$at_stdout"; $as_echo "dir/
4869 dir/file1
4870 dir/file2
4871 " | \
4872   $at_diff - "$at_stdout" || at_failed=:
4873 at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
4874 $at_failed && at_fn_log_failure
4875 $at_traceon; }
4876
4877               { set +x
4878 $as_echo "$at_srcdir/T-dir00.at:30:
4879 mkdir gnu
4880 (cd gnu
4881 TEST_TAR_FORMAT=gnu
4882 export TEST_TAR_FORMAT
4883 TAR_OPTIONS=\"-H gnu\"
4884 export TAR_OPTIONS
4885 rm -rf *
4886
4887
4888 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4889
4890 mkdir dir
4891 genfile -f dir/file1
4892 genfile -f dir/file2
4893 tar cf archive dir
4894 rm -rf dir
4895 echo dir > list
4896 tar xfTv archive list | sort
4897 )"
4898 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir00.at:30"
4899 ( $at_check_trace;
4900 mkdir gnu
4901 (cd gnu
4902 TEST_TAR_FORMAT=gnu
4903 export TEST_TAR_FORMAT
4904 TAR_OPTIONS="-H gnu"
4905 export TAR_OPTIONS
4906 rm -rf *
4907
4908
4909 test -z "`sort < /dev/null 2>&1`" || exit 77
4910
4911 mkdir dir
4912 genfile -f dir/file1
4913 genfile -f dir/file2
4914 tar cf archive dir
4915 rm -rf dir
4916 echo dir > list
4917 tar xfTv archive list | sort
4918 )
4919 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4920 at_status=$? at_failed=false
4921 $at_check_filter
4922 at_fn_diff_devnull "$at_stderr" || at_failed=:
4923 echo >>"$at_stdout"; $as_echo "dir/
4924 dir/file1
4925 dir/file2
4926 " | \
4927   $at_diff - "$at_stdout" || at_failed=:
4928 at_fn_check_status 0 $at_status "$at_srcdir/T-dir00.at:30"
4929 $at_failed && at_fn_log_failure
4930 $at_traceon; }
4931
4932
4933
4934   set +x
4935   $at_times_p && times >"$at_times_file"
4936 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4937 read at_status <"$at_status_file"
4938 #AT_STOP_22
4939 #AT_START_23
4940 at_fn_group_banner 23 'T-dir01.at:28' \
4941   "trailing slash in --files-from" "                 " 2
4942 at_xfail=no
4943       test -f $XFAILFILE && at_xfail=yes
4944 (
4945   $as_echo "23. $at_setup_line: testing $at_desc ..."
4946   $at_traceon
4947
4948
4949
4950
4951   { set +x
4952 $as_echo "$at_srcdir/T-dir01.at:30:
4953 mkdir v7
4954 (cd v7
4955 TEST_TAR_FORMAT=v7
4956 export TEST_TAR_FORMAT
4957 TAR_OPTIONS=\"-H v7\"
4958 export TAR_OPTIONS
4959 rm -rf *
4960
4961
4962 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4963
4964 mkdir dir
4965 genfile -f dir/file1
4966 genfile -f dir/file2
4967 tar cf archive dir
4968 rm -rf dir
4969 echo dir/ > list
4970 tar xfTv archive list | sort
4971 )"
4972 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
4973 ( $at_check_trace;
4974 mkdir v7
4975 (cd v7
4976 TEST_TAR_FORMAT=v7
4977 export TEST_TAR_FORMAT
4978 TAR_OPTIONS="-H v7"
4979 export TAR_OPTIONS
4980 rm -rf *
4981
4982
4983 test -z "`sort < /dev/null 2>&1`" || exit 77
4984
4985 mkdir dir
4986 genfile -f dir/file1
4987 genfile -f dir/file2
4988 tar cf archive dir
4989 rm -rf dir
4990 echo dir/ > list
4991 tar xfTv archive list | sort
4992 )
4993 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4994 at_status=$? at_failed=false
4995 $at_check_filter
4996 at_fn_diff_devnull "$at_stderr" || at_failed=:
4997 echo >>"$at_stdout"; $as_echo "dir/
4998 dir/file1
4999 dir/file2
5000 " | \
5001   $at_diff - "$at_stdout" || at_failed=:
5002 at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
5003 $at_failed && at_fn_log_failure
5004 $at_traceon; }
5005
5006               { set +x
5007 $as_echo "$at_srcdir/T-dir01.at:30:
5008 mkdir oldgnu
5009 (cd oldgnu
5010 TEST_TAR_FORMAT=oldgnu
5011 export TEST_TAR_FORMAT
5012 TAR_OPTIONS=\"-H oldgnu\"
5013 export TAR_OPTIONS
5014 rm -rf *
5015
5016
5017 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5018
5019 mkdir dir
5020 genfile -f dir/file1
5021 genfile -f dir/file2
5022 tar cf archive dir
5023 rm -rf dir
5024 echo dir/ > list
5025 tar xfTv archive list | sort
5026 )"
5027 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
5028 ( $at_check_trace;
5029 mkdir oldgnu
5030 (cd oldgnu
5031 TEST_TAR_FORMAT=oldgnu
5032 export TEST_TAR_FORMAT
5033 TAR_OPTIONS="-H oldgnu"
5034 export TAR_OPTIONS
5035 rm -rf *
5036
5037
5038 test -z "`sort < /dev/null 2>&1`" || exit 77
5039
5040 mkdir dir
5041 genfile -f dir/file1
5042 genfile -f dir/file2
5043 tar cf archive dir
5044 rm -rf dir
5045 echo dir/ > list
5046 tar xfTv archive list | sort
5047 )
5048 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5049 at_status=$? at_failed=false
5050 $at_check_filter
5051 at_fn_diff_devnull "$at_stderr" || at_failed=:
5052 echo >>"$at_stdout"; $as_echo "dir/
5053 dir/file1
5054 dir/file2
5055 " | \
5056   $at_diff - "$at_stdout" || at_failed=:
5057 at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
5058 $at_failed && at_fn_log_failure
5059 $at_traceon; }
5060
5061               { set +x
5062 $as_echo "$at_srcdir/T-dir01.at:30:
5063 mkdir ustar
5064 (cd ustar
5065 TEST_TAR_FORMAT=ustar
5066 export TEST_TAR_FORMAT
5067 TAR_OPTIONS=\"-H ustar\"
5068 export TAR_OPTIONS
5069 rm -rf *
5070
5071
5072 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5073
5074 mkdir dir
5075 genfile -f dir/file1
5076 genfile -f dir/file2
5077 tar cf archive dir
5078 rm -rf dir
5079 echo dir/ > list
5080 tar xfTv archive list | sort
5081 )"
5082 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
5083 ( $at_check_trace;
5084 mkdir ustar
5085 (cd ustar
5086 TEST_TAR_FORMAT=ustar
5087 export TEST_TAR_FORMAT
5088 TAR_OPTIONS="-H ustar"
5089 export TAR_OPTIONS
5090 rm -rf *
5091
5092
5093 test -z "`sort < /dev/null 2>&1`" || exit 77
5094
5095 mkdir dir
5096 genfile -f dir/file1
5097 genfile -f dir/file2
5098 tar cf archive dir
5099 rm -rf dir
5100 echo dir/ > list
5101 tar xfTv archive list | sort
5102 )
5103 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5104 at_status=$? at_failed=false
5105 $at_check_filter
5106 at_fn_diff_devnull "$at_stderr" || at_failed=:
5107 echo >>"$at_stdout"; $as_echo "dir/
5108 dir/file1
5109 dir/file2
5110 " | \
5111   $at_diff - "$at_stdout" || at_failed=:
5112 at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
5113 $at_failed && at_fn_log_failure
5114 $at_traceon; }
5115
5116               { set +x
5117 $as_echo "$at_srcdir/T-dir01.at:30:
5118 mkdir posix
5119 (cd posix
5120 TEST_TAR_FORMAT=posix
5121 export TEST_TAR_FORMAT
5122 TAR_OPTIONS=\"-H posix\"
5123 export TAR_OPTIONS
5124 rm -rf *
5125
5126
5127 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5128
5129 mkdir dir
5130 genfile -f dir/file1
5131 genfile -f dir/file2
5132 tar cf archive dir
5133 rm -rf dir
5134 echo dir/ > list
5135 tar xfTv archive list | sort
5136 )"
5137 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
5138 ( $at_check_trace;
5139 mkdir posix
5140 (cd posix
5141 TEST_TAR_FORMAT=posix
5142 export TEST_TAR_FORMAT
5143 TAR_OPTIONS="-H posix"
5144 export TAR_OPTIONS
5145 rm -rf *
5146
5147
5148 test -z "`sort < /dev/null 2>&1`" || exit 77
5149
5150 mkdir dir
5151 genfile -f dir/file1
5152 genfile -f dir/file2
5153 tar cf archive dir
5154 rm -rf dir
5155 echo dir/ > list
5156 tar xfTv archive list | sort
5157 )
5158 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5159 at_status=$? at_failed=false
5160 $at_check_filter
5161 at_fn_diff_devnull "$at_stderr" || at_failed=:
5162 echo >>"$at_stdout"; $as_echo "dir/
5163 dir/file1
5164 dir/file2
5165 " | \
5166   $at_diff - "$at_stdout" || at_failed=:
5167 at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
5168 $at_failed && at_fn_log_failure
5169 $at_traceon; }
5170
5171               { set +x
5172 $as_echo "$at_srcdir/T-dir01.at:30:
5173 mkdir gnu
5174 (cd gnu
5175 TEST_TAR_FORMAT=gnu
5176 export TEST_TAR_FORMAT
5177 TAR_OPTIONS=\"-H gnu\"
5178 export TAR_OPTIONS
5179 rm -rf *
5180
5181
5182 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5183
5184 mkdir dir
5185 genfile -f dir/file1
5186 genfile -f dir/file2
5187 tar cf archive dir
5188 rm -rf dir
5189 echo dir/ > list
5190 tar xfTv archive list | sort
5191 )"
5192 at_fn_check_prepare_notrace 'a `...` command substitution' "T-dir01.at:30"
5193 ( $at_check_trace;
5194 mkdir gnu
5195 (cd gnu
5196 TEST_TAR_FORMAT=gnu
5197 export TEST_TAR_FORMAT
5198 TAR_OPTIONS="-H gnu"
5199 export TAR_OPTIONS
5200 rm -rf *
5201
5202
5203 test -z "`sort < /dev/null 2>&1`" || exit 77
5204
5205 mkdir dir
5206 genfile -f dir/file1
5207 genfile -f dir/file2
5208 tar cf archive dir
5209 rm -rf dir
5210 echo dir/ > list
5211 tar xfTv archive list | sort
5212 )
5213 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5214 at_status=$? at_failed=false
5215 $at_check_filter
5216 at_fn_diff_devnull "$at_stderr" || at_failed=:
5217 echo >>"$at_stdout"; $as_echo "dir/
5218 dir/file1
5219 dir/file2
5220 " | \
5221   $at_diff - "$at_stdout" || at_failed=:
5222 at_fn_check_status 0 $at_status "$at_srcdir/T-dir01.at:30"
5223 $at_failed && at_fn_log_failure
5224 $at_traceon; }
5225
5226
5227
5228   set +x
5229   $at_times_p && times >"$at_times_file"
5230 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5231 read at_status <"$at_status_file"
5232 #AT_STOP_23
5233 #AT_START_24
5234 at_fn_group_banner 24 'indexfile.at:26' \
5235   "tar --index-file=FILE --file=-" "                 " 3
5236 at_xfail=no
5237       test -f $XFAILFILE && at_xfail=yes
5238 (
5239   $as_echo "24. $at_setup_line: testing $at_desc ..."
5240   $at_traceon
5241
5242
5243
5244
5245
5246   { set +x
5247 $as_echo "$at_srcdir/indexfile.at:29:
5248 mkdir v7
5249 (cd v7
5250 TEST_TAR_FORMAT=v7
5251 export TEST_TAR_FORMAT
5252 TAR_OPTIONS=\"-H v7\"
5253 export TAR_OPTIONS
5254 rm -rf *
5255
5256
5257 mkdir directory
5258 genfile --file=directory/a --length=1035
5259
5260 echo \"Creating the archive\"
5261 tar -c -v -f - --index-file=idx directory > archive
5262
5263 echo \"Testing the archive\"
5264 tar -tf archive
5265 )"
5266 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
5267 ( $at_check_trace;
5268 mkdir v7
5269 (cd v7
5270 TEST_TAR_FORMAT=v7
5271 export TEST_TAR_FORMAT
5272 TAR_OPTIONS="-H v7"
5273 export TAR_OPTIONS
5274 rm -rf *
5275
5276
5277 mkdir directory
5278 genfile --file=directory/a --length=1035
5279
5280 echo "Creating the archive"
5281 tar -c -v -f - --index-file=idx directory > archive
5282
5283 echo "Testing the archive"
5284 tar -tf archive
5285 )
5286 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5287 at_status=$? at_failed=false
5288 $at_check_filter
5289 at_fn_diff_devnull "$at_stderr" || at_failed=:
5290 echo >>"$at_stdout"; $as_echo "Creating the archive
5291 Testing the archive
5292 directory/
5293 directory/a
5294 " | \
5295   $at_diff - "$at_stdout" || at_failed=:
5296 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
5297 $at_failed && at_fn_log_failure
5298 $at_traceon; }
5299
5300               { set +x
5301 $as_echo "$at_srcdir/indexfile.at:29:
5302 mkdir oldgnu
5303 (cd oldgnu
5304 TEST_TAR_FORMAT=oldgnu
5305 export TEST_TAR_FORMAT
5306 TAR_OPTIONS=\"-H oldgnu\"
5307 export TAR_OPTIONS
5308 rm -rf *
5309
5310
5311 mkdir directory
5312 genfile --file=directory/a --length=1035
5313
5314 echo \"Creating the archive\"
5315 tar -c -v -f - --index-file=idx directory > archive
5316
5317 echo \"Testing the archive\"
5318 tar -tf archive
5319 )"
5320 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
5321 ( $at_check_trace;
5322 mkdir oldgnu
5323 (cd oldgnu
5324 TEST_TAR_FORMAT=oldgnu
5325 export TEST_TAR_FORMAT
5326 TAR_OPTIONS="-H oldgnu"
5327 export TAR_OPTIONS
5328 rm -rf *
5329
5330
5331 mkdir directory
5332 genfile --file=directory/a --length=1035
5333
5334 echo "Creating the archive"
5335 tar -c -v -f - --index-file=idx directory > archive
5336
5337 echo "Testing the archive"
5338 tar -tf archive
5339 )
5340 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5341 at_status=$? at_failed=false
5342 $at_check_filter
5343 at_fn_diff_devnull "$at_stderr" || at_failed=:
5344 echo >>"$at_stdout"; $as_echo "Creating the archive
5345 Testing the archive
5346 directory/
5347 directory/a
5348 " | \
5349   $at_diff - "$at_stdout" || at_failed=:
5350 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
5351 $at_failed && at_fn_log_failure
5352 $at_traceon; }
5353
5354               { set +x
5355 $as_echo "$at_srcdir/indexfile.at:29:
5356 mkdir ustar
5357 (cd ustar
5358 TEST_TAR_FORMAT=ustar
5359 export TEST_TAR_FORMAT
5360 TAR_OPTIONS=\"-H ustar\"
5361 export TAR_OPTIONS
5362 rm -rf *
5363
5364
5365 mkdir directory
5366 genfile --file=directory/a --length=1035
5367
5368 echo \"Creating the archive\"
5369 tar -c -v -f - --index-file=idx directory > archive
5370
5371 echo \"Testing the archive\"
5372 tar -tf archive
5373 )"
5374 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
5375 ( $at_check_trace;
5376 mkdir ustar
5377 (cd ustar
5378 TEST_TAR_FORMAT=ustar
5379 export TEST_TAR_FORMAT
5380 TAR_OPTIONS="-H ustar"
5381 export TAR_OPTIONS
5382 rm -rf *
5383
5384
5385 mkdir directory
5386 genfile --file=directory/a --length=1035
5387
5388 echo "Creating the archive"
5389 tar -c -v -f - --index-file=idx directory > archive
5390
5391 echo "Testing the archive"
5392 tar -tf archive
5393 )
5394 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5395 at_status=$? at_failed=false
5396 $at_check_filter
5397 at_fn_diff_devnull "$at_stderr" || at_failed=:
5398 echo >>"$at_stdout"; $as_echo "Creating the archive
5399 Testing the archive
5400 directory/
5401 directory/a
5402 " | \
5403   $at_diff - "$at_stdout" || at_failed=:
5404 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
5405 $at_failed && at_fn_log_failure
5406 $at_traceon; }
5407
5408               { set +x
5409 $as_echo "$at_srcdir/indexfile.at:29:
5410 mkdir posix
5411 (cd posix
5412 TEST_TAR_FORMAT=posix
5413 export TEST_TAR_FORMAT
5414 TAR_OPTIONS=\"-H posix\"
5415 export TAR_OPTIONS
5416 rm -rf *
5417
5418
5419 mkdir directory
5420 genfile --file=directory/a --length=1035
5421
5422 echo \"Creating the archive\"
5423 tar -c -v -f - --index-file=idx directory > archive
5424
5425 echo \"Testing the archive\"
5426 tar -tf archive
5427 )"
5428 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
5429 ( $at_check_trace;
5430 mkdir posix
5431 (cd posix
5432 TEST_TAR_FORMAT=posix
5433 export TEST_TAR_FORMAT
5434 TAR_OPTIONS="-H posix"
5435 export TAR_OPTIONS
5436 rm -rf *
5437
5438
5439 mkdir directory
5440 genfile --file=directory/a --length=1035
5441
5442 echo "Creating the archive"
5443 tar -c -v -f - --index-file=idx directory > archive
5444
5445 echo "Testing the archive"
5446 tar -tf archive
5447 )
5448 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5449 at_status=$? at_failed=false
5450 $at_check_filter
5451 at_fn_diff_devnull "$at_stderr" || at_failed=:
5452 echo >>"$at_stdout"; $as_echo "Creating the archive
5453 Testing the archive
5454 directory/
5455 directory/a
5456 " | \
5457   $at_diff - "$at_stdout" || at_failed=:
5458 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
5459 $at_failed && at_fn_log_failure
5460 $at_traceon; }
5461
5462               { set +x
5463 $as_echo "$at_srcdir/indexfile.at:29:
5464 mkdir gnu
5465 (cd gnu
5466 TEST_TAR_FORMAT=gnu
5467 export TEST_TAR_FORMAT
5468 TAR_OPTIONS=\"-H gnu\"
5469 export TAR_OPTIONS
5470 rm -rf *
5471
5472
5473 mkdir directory
5474 genfile --file=directory/a --length=1035
5475
5476 echo \"Creating the archive\"
5477 tar -c -v -f - --index-file=idx directory > archive
5478
5479 echo \"Testing the archive\"
5480 tar -tf archive
5481 )"
5482 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
5483 ( $at_check_trace;
5484 mkdir gnu
5485 (cd gnu
5486 TEST_TAR_FORMAT=gnu
5487 export TEST_TAR_FORMAT
5488 TAR_OPTIONS="-H gnu"
5489 export TAR_OPTIONS
5490 rm -rf *
5491
5492
5493 mkdir directory
5494 genfile --file=directory/a --length=1035
5495
5496 echo "Creating the archive"
5497 tar -c -v -f - --index-file=idx directory > archive
5498
5499 echo "Testing the archive"
5500 tar -tf archive
5501 )
5502 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5503 at_status=$? at_failed=false
5504 $at_check_filter
5505 at_fn_diff_devnull "$at_stderr" || at_failed=:
5506 echo >>"$at_stdout"; $as_echo "Creating the archive
5507 Testing the archive
5508 directory/
5509 directory/a
5510 " | \
5511   $at_diff - "$at_stdout" || at_failed=:
5512 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
5513 $at_failed && at_fn_log_failure
5514 $at_traceon; }
5515
5516
5517
5518
5519   set +x
5520   $at_times_p && times >"$at_times_file"
5521 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5522 read at_status <"$at_status_file"
5523 #AT_STOP_24
5524 #AT_START_25
5525 at_fn_group_banner 25 'verbose.at:26' \
5526   "tar cvf -" "                                      " 3
5527 at_xfail=no
5528       test -f $XFAILFILE && at_xfail=yes
5529 (
5530   $as_echo "25. $at_setup_line: testing $at_desc ..."
5531   $at_traceon
5532
5533
5534
5535
5536
5537   { set +x
5538 $as_echo "$at_srcdir/verbose.at:29:
5539 mkdir v7
5540 (cd v7
5541 TEST_TAR_FORMAT=v7
5542 export TEST_TAR_FORMAT
5543 TAR_OPTIONS=\"-H v7\"
5544 export TAR_OPTIONS
5545 rm -rf *
5546
5547 genfile --file file --length 10240
5548 echo Creating the archive
5549 tar cvf - file > archive
5550 echo Testing the archive
5551 tar tf archive
5552 )"
5553 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
5554 ( $at_check_trace;
5555 mkdir v7
5556 (cd v7
5557 TEST_TAR_FORMAT=v7
5558 export TEST_TAR_FORMAT
5559 TAR_OPTIONS="-H v7"
5560 export TAR_OPTIONS
5561 rm -rf *
5562
5563 genfile --file file --length 10240
5564 echo Creating the archive
5565 tar cvf - file > archive
5566 echo Testing the archive
5567 tar tf archive
5568 )
5569 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5570 at_status=$? at_failed=false
5571 $at_check_filter
5572 echo >>"$at_stderr"; $as_echo "file
5573 " | \
5574   $at_diff - "$at_stderr" || at_failed=:
5575 echo >>"$at_stdout"; $as_echo "Creating the archive
5576 Testing the archive
5577 file
5578 " | \
5579   $at_diff - "$at_stdout" || at_failed=:
5580 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
5581 $at_failed && at_fn_log_failure
5582 $at_traceon; }
5583
5584               { set +x
5585 $as_echo "$at_srcdir/verbose.at:29:
5586 mkdir oldgnu
5587 (cd oldgnu
5588 TEST_TAR_FORMAT=oldgnu
5589 export TEST_TAR_FORMAT
5590 TAR_OPTIONS=\"-H oldgnu\"
5591 export TAR_OPTIONS
5592 rm -rf *
5593
5594 genfile --file file --length 10240
5595 echo Creating the archive
5596 tar cvf - file > archive
5597 echo Testing the archive
5598 tar tf archive
5599 )"
5600 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
5601 ( $at_check_trace;
5602 mkdir oldgnu
5603 (cd oldgnu
5604 TEST_TAR_FORMAT=oldgnu
5605 export TEST_TAR_FORMAT
5606 TAR_OPTIONS="-H oldgnu"
5607 export TAR_OPTIONS
5608 rm -rf *
5609
5610 genfile --file file --length 10240
5611 echo Creating the archive
5612 tar cvf - file > archive
5613 echo Testing the archive
5614 tar tf archive
5615 )
5616 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5617 at_status=$? at_failed=false
5618 $at_check_filter
5619 echo >>"$at_stderr"; $as_echo "file
5620 " | \
5621   $at_diff - "$at_stderr" || at_failed=:
5622 echo >>"$at_stdout"; $as_echo "Creating the archive
5623 Testing the archive
5624 file
5625 " | \
5626   $at_diff - "$at_stdout" || at_failed=:
5627 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
5628 $at_failed && at_fn_log_failure
5629 $at_traceon; }
5630
5631               { set +x
5632 $as_echo "$at_srcdir/verbose.at:29:
5633 mkdir ustar
5634 (cd ustar
5635 TEST_TAR_FORMAT=ustar
5636 export TEST_TAR_FORMAT
5637 TAR_OPTIONS=\"-H ustar\"
5638 export TAR_OPTIONS
5639 rm -rf *
5640
5641 genfile --file file --length 10240
5642 echo Creating the archive
5643 tar cvf - file > archive
5644 echo Testing the archive
5645 tar tf archive
5646 )"
5647 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
5648 ( $at_check_trace;
5649 mkdir ustar
5650 (cd ustar
5651 TEST_TAR_FORMAT=ustar
5652 export TEST_TAR_FORMAT
5653 TAR_OPTIONS="-H ustar"
5654 export TAR_OPTIONS
5655 rm -rf *
5656
5657 genfile --file file --length 10240
5658 echo Creating the archive
5659 tar cvf - file > archive
5660 echo Testing the archive
5661 tar tf archive
5662 )
5663 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5664 at_status=$? at_failed=false
5665 $at_check_filter
5666 echo >>"$at_stderr"; $as_echo "file
5667 " | \
5668   $at_diff - "$at_stderr" || at_failed=:
5669 echo >>"$at_stdout"; $as_echo "Creating the archive
5670 Testing the archive
5671 file
5672 " | \
5673   $at_diff - "$at_stdout" || at_failed=:
5674 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
5675 $at_failed && at_fn_log_failure
5676 $at_traceon; }
5677
5678               { set +x
5679 $as_echo "$at_srcdir/verbose.at:29:
5680 mkdir posix
5681 (cd posix
5682 TEST_TAR_FORMAT=posix
5683 export TEST_TAR_FORMAT
5684 TAR_OPTIONS=\"-H posix\"
5685 export TAR_OPTIONS
5686 rm -rf *
5687
5688 genfile --file file --length 10240
5689 echo Creating the archive
5690 tar cvf - file > archive
5691 echo Testing the archive
5692 tar tf archive
5693 )"
5694 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
5695 ( $at_check_trace;
5696 mkdir posix
5697 (cd posix
5698 TEST_TAR_FORMAT=posix
5699 export TEST_TAR_FORMAT
5700 TAR_OPTIONS="-H posix"
5701 export TAR_OPTIONS
5702 rm -rf *
5703
5704 genfile --file file --length 10240
5705 echo Creating the archive
5706 tar cvf - file > archive
5707 echo Testing the archive
5708 tar tf archive
5709 )
5710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5711 at_status=$? at_failed=false
5712 $at_check_filter
5713 echo >>"$at_stderr"; $as_echo "file
5714 " | \
5715   $at_diff - "$at_stderr" || at_failed=:
5716 echo >>"$at_stdout"; $as_echo "Creating the archive
5717 Testing the archive
5718 file
5719 " | \
5720   $at_diff - "$at_stdout" || at_failed=:
5721 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
5722 $at_failed && at_fn_log_failure
5723 $at_traceon; }
5724
5725               { set +x
5726 $as_echo "$at_srcdir/verbose.at:29:
5727 mkdir gnu
5728 (cd gnu
5729 TEST_TAR_FORMAT=gnu
5730 export TEST_TAR_FORMAT
5731 TAR_OPTIONS=\"-H gnu\"
5732 export TAR_OPTIONS
5733 rm -rf *
5734
5735 genfile --file file --length 10240
5736 echo Creating the archive
5737 tar cvf - file > archive
5738 echo Testing the archive
5739 tar tf archive
5740 )"
5741 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
5742 ( $at_check_trace;
5743 mkdir gnu
5744 (cd gnu
5745 TEST_TAR_FORMAT=gnu
5746 export TEST_TAR_FORMAT
5747 TAR_OPTIONS="-H gnu"
5748 export TAR_OPTIONS
5749 rm -rf *
5750
5751 genfile --file file --length 10240
5752 echo Creating the archive
5753 tar cvf - file > archive
5754 echo Testing the archive
5755 tar tf archive
5756 )
5757 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5758 at_status=$? at_failed=false
5759 $at_check_filter
5760 echo >>"$at_stderr"; $as_echo "file
5761 " | \
5762   $at_diff - "$at_stderr" || at_failed=:
5763 echo >>"$at_stdout"; $as_echo "Creating the archive
5764 Testing the archive
5765 file
5766 " | \
5767   $at_diff - "$at_stdout" || at_failed=:
5768 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
5769 $at_failed && at_fn_log_failure
5770 $at_traceon; }
5771
5772
5773
5774
5775   set +x
5776   $at_times_p && times >"$at_times_file"
5777 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5778 read at_status <"$at_status_file"
5779 #AT_STOP_25
5780 #AT_START_26
5781 at_fn_group_banner 26 'gzip.at:24' \
5782   "gzip" "                                           " 3
5783 at_xfail=no
5784 (
5785   $as_echo "26. $at_setup_line: testing $at_desc ..."
5786   $at_traceon
5787
5788
5789
5790 unset TAR_OPTIONS
5791
5792 { set +x
5793 $as_echo "$at_srcdir/gzip.at:29:
5794
5795 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
5796
5797 tar xfvz /dev/null 2>err
5798 RC=\$?
5799 sed -n '/^tar:/p' err >&2
5800 exit \$RC
5801 "
5802 at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:29"
5803 ( $at_check_trace;
5804
5805 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
5806
5807 tar xfvz /dev/null 2>err
5808 RC=$?
5809 sed -n '/^tar:/p' err >&2
5810 exit $RC
5811
5812 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5813 at_status=$? at_failed=false
5814 $at_check_filter
5815 echo >>"$at_stderr"; $as_echo "tar: Child returned status 1
5816 tar: Error is not recoverable: exiting now
5817 " | \
5818   $at_diff - "$at_stderr" || at_failed=:
5819 at_fn_diff_devnull "$at_stdout" || at_failed=:
5820 at_fn_check_status 2 $at_status "$at_srcdir/gzip.at:29"
5821 $at_failed && at_fn_log_failure
5822 $at_traceon; }
5823
5824
5825   set +x
5826   $at_times_p && times >"$at_times_file"
5827 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5828 read at_status <"$at_status_file"
5829 #AT_STOP_26
5830 #AT_START_27
5831 at_fn_group_banner 27 'recurse.at:21' \
5832   "recurse" "                                        " 3
5833 at_xfail=no
5834       test -f $XFAILFILE && at_xfail=yes
5835 (
5836   $as_echo "27. $at_setup_line: testing $at_desc ..."
5837   $at_traceon
5838
5839
5840
5841
5842
5843   { set +x
5844 $as_echo "$at_srcdir/recurse.at:24:
5845 mkdir v7
5846 (cd v7
5847 TEST_TAR_FORMAT=v7
5848 export TEST_TAR_FORMAT
5849 TAR_OPTIONS=\"-H v7\"
5850 export TAR_OPTIONS
5851 rm -rf *
5852
5853 mkdir directory
5854 touch directory/file
5855 tar --create --file archive --no-recursion directory || exit 1
5856 tar tf archive
5857 )"
5858 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
5859 ( $at_check_trace;
5860 mkdir v7
5861 (cd v7
5862 TEST_TAR_FORMAT=v7
5863 export TEST_TAR_FORMAT
5864 TAR_OPTIONS="-H v7"
5865 export TAR_OPTIONS
5866 rm -rf *
5867
5868 mkdir directory
5869 touch directory/file
5870 tar --create --file archive --no-recursion directory || exit 1
5871 tar tf archive
5872 )
5873 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5874 at_status=$? at_failed=false
5875 $at_check_filter
5876 at_fn_diff_devnull "$at_stderr" || at_failed=:
5877 echo >>"$at_stdout"; $as_echo "directory/
5878 " | \
5879   $at_diff - "$at_stdout" || at_failed=:
5880 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
5881 $at_failed && at_fn_log_failure
5882 $at_traceon; }
5883
5884               { set +x
5885 $as_echo "$at_srcdir/recurse.at:24:
5886 mkdir oldgnu
5887 (cd oldgnu
5888 TEST_TAR_FORMAT=oldgnu
5889 export TEST_TAR_FORMAT
5890 TAR_OPTIONS=\"-H oldgnu\"
5891 export TAR_OPTIONS
5892 rm -rf *
5893
5894 mkdir directory
5895 touch directory/file
5896 tar --create --file archive --no-recursion directory || exit 1
5897 tar tf archive
5898 )"
5899 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
5900 ( $at_check_trace;
5901 mkdir oldgnu
5902 (cd oldgnu
5903 TEST_TAR_FORMAT=oldgnu
5904 export TEST_TAR_FORMAT
5905 TAR_OPTIONS="-H oldgnu"
5906 export TAR_OPTIONS
5907 rm -rf *
5908
5909 mkdir directory
5910 touch directory/file
5911 tar --create --file archive --no-recursion directory || exit 1
5912 tar tf archive
5913 )
5914 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5915 at_status=$? at_failed=false
5916 $at_check_filter
5917 at_fn_diff_devnull "$at_stderr" || at_failed=:
5918 echo >>"$at_stdout"; $as_echo "directory/
5919 " | \
5920   $at_diff - "$at_stdout" || at_failed=:
5921 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
5922 $at_failed && at_fn_log_failure
5923 $at_traceon; }
5924
5925               { set +x
5926 $as_echo "$at_srcdir/recurse.at:24:
5927 mkdir ustar
5928 (cd ustar
5929 TEST_TAR_FORMAT=ustar
5930 export TEST_TAR_FORMAT
5931 TAR_OPTIONS=\"-H ustar\"
5932 export TAR_OPTIONS
5933 rm -rf *
5934
5935 mkdir directory
5936 touch directory/file
5937 tar --create --file archive --no-recursion directory || exit 1
5938 tar tf archive
5939 )"
5940 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
5941 ( $at_check_trace;
5942 mkdir ustar
5943 (cd ustar
5944 TEST_TAR_FORMAT=ustar
5945 export TEST_TAR_FORMAT
5946 TAR_OPTIONS="-H ustar"
5947 export TAR_OPTIONS
5948 rm -rf *
5949
5950 mkdir directory
5951 touch directory/file
5952 tar --create --file archive --no-recursion directory || exit 1
5953 tar tf archive
5954 )
5955 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5956 at_status=$? at_failed=false
5957 $at_check_filter
5958 at_fn_diff_devnull "$at_stderr" || at_failed=:
5959 echo >>"$at_stdout"; $as_echo "directory/
5960 " | \
5961   $at_diff - "$at_stdout" || at_failed=:
5962 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
5963 $at_failed && at_fn_log_failure
5964 $at_traceon; }
5965
5966               { set +x
5967 $as_echo "$at_srcdir/recurse.at:24:
5968 mkdir posix
5969 (cd posix
5970 TEST_TAR_FORMAT=posix
5971 export TEST_TAR_FORMAT
5972 TAR_OPTIONS=\"-H posix\"
5973 export TAR_OPTIONS
5974 rm -rf *
5975
5976 mkdir directory
5977 touch directory/file
5978 tar --create --file archive --no-recursion directory || exit 1
5979 tar tf archive
5980 )"
5981 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
5982 ( $at_check_trace;
5983 mkdir posix
5984 (cd posix
5985 TEST_TAR_FORMAT=posix
5986 export TEST_TAR_FORMAT
5987 TAR_OPTIONS="-H posix"
5988 export TAR_OPTIONS
5989 rm -rf *
5990
5991 mkdir directory
5992 touch directory/file
5993 tar --create --file archive --no-recursion directory || exit 1
5994 tar tf archive
5995 )
5996 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5997 at_status=$? at_failed=false
5998 $at_check_filter
5999 at_fn_diff_devnull "$at_stderr" || at_failed=:
6000 echo >>"$at_stdout"; $as_echo "directory/
6001 " | \
6002   $at_diff - "$at_stdout" || at_failed=:
6003 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
6004 $at_failed && at_fn_log_failure
6005 $at_traceon; }
6006
6007               { set +x
6008 $as_echo "$at_srcdir/recurse.at:24:
6009 mkdir gnu
6010 (cd gnu
6011 TEST_TAR_FORMAT=gnu
6012 export TEST_TAR_FORMAT
6013 TAR_OPTIONS=\"-H gnu\"
6014 export TAR_OPTIONS
6015 rm -rf *
6016
6017 mkdir directory
6018 touch directory/file
6019 tar --create --file archive --no-recursion directory || exit 1
6020 tar tf archive
6021 )"
6022 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
6023 ( $at_check_trace;
6024 mkdir gnu
6025 (cd gnu
6026 TEST_TAR_FORMAT=gnu
6027 export TEST_TAR_FORMAT
6028 TAR_OPTIONS="-H gnu"
6029 export TAR_OPTIONS
6030 rm -rf *
6031
6032 mkdir directory
6033 touch directory/file
6034 tar --create --file archive --no-recursion directory || exit 1
6035 tar tf archive
6036 )
6037 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6038 at_status=$? at_failed=false
6039 $at_check_filter
6040 at_fn_diff_devnull "$at_stderr" || at_failed=:
6041 echo >>"$at_stdout"; $as_echo "directory/
6042 " | \
6043   $at_diff - "$at_stdout" || at_failed=:
6044 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
6045 $at_failed && at_fn_log_failure
6046 $at_traceon; }
6047
6048
6049
6050
6051   set +x
6052   $at_times_p && times >"$at_times_file"
6053 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6054 read at_status <"$at_status_file"
6055 #AT_STOP_27
6056 #AT_START_28
6057 at_fn_group_banner 28 'recurs02.at:30' \
6058   "recurse: toggle" "                                " 3
6059 at_xfail=no
6060       test -f $XFAILFILE && at_xfail=yes
6061 (
6062   $as_echo "28. $at_setup_line: testing $at_desc ..."
6063   $at_traceon
6064
6065
6066
6067
6068
6069   { set +x
6070 $as_echo "$at_srcdir/recurs02.at:33:
6071 mkdir v7
6072 (cd v7
6073 TEST_TAR_FORMAT=v7
6074 export TEST_TAR_FORMAT
6075 TAR_OPTIONS=\"-H v7\"
6076 export TAR_OPTIONS
6077 rm -rf *
6078
6079 mkdir directory1 directory2
6080 touch directory1/file directory2/file
6081 tar --create --file archive \\
6082     --no-recursion directory1 \\
6083     --recursion directory2 || exit 1
6084 tar tf archive
6085 tar cf archive directory1 directory2
6086 tar tf archive \\
6087     --no-recursion directory1 \\
6088     --recursion directory2 || exit 1
6089 )"
6090 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
6091 ( $at_check_trace;
6092 mkdir v7
6093 (cd v7
6094 TEST_TAR_FORMAT=v7
6095 export TEST_TAR_FORMAT
6096 TAR_OPTIONS="-H v7"
6097 export TAR_OPTIONS
6098 rm -rf *
6099
6100 mkdir directory1 directory2
6101 touch directory1/file directory2/file
6102 tar --create --file archive \
6103     --no-recursion directory1 \
6104     --recursion directory2 || exit 1
6105 tar tf archive
6106 tar cf archive directory1 directory2
6107 tar tf archive \
6108     --no-recursion directory1 \
6109     --recursion directory2 || exit 1
6110 )
6111 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6112 at_status=$? at_failed=false
6113 $at_check_filter
6114 at_fn_diff_devnull "$at_stderr" || at_failed=:
6115 echo >>"$at_stdout"; $as_echo "directory1/
6116 directory2/
6117 directory2/file
6118 directory1/
6119 directory2/
6120 directory2/file
6121 " | \
6122   $at_diff - "$at_stdout" || at_failed=:
6123 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
6124 $at_failed && at_fn_log_failure
6125 $at_traceon; }
6126
6127               { set +x
6128 $as_echo "$at_srcdir/recurs02.at:33:
6129 mkdir oldgnu
6130 (cd oldgnu
6131 TEST_TAR_FORMAT=oldgnu
6132 export TEST_TAR_FORMAT
6133 TAR_OPTIONS=\"-H oldgnu\"
6134 export TAR_OPTIONS
6135 rm -rf *
6136
6137 mkdir directory1 directory2
6138 touch directory1/file directory2/file
6139 tar --create --file archive \\
6140     --no-recursion directory1 \\
6141     --recursion directory2 || exit 1
6142 tar tf archive
6143 tar cf archive directory1 directory2
6144 tar tf archive \\
6145     --no-recursion directory1 \\
6146     --recursion directory2 || exit 1
6147 )"
6148 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
6149 ( $at_check_trace;
6150 mkdir oldgnu
6151 (cd oldgnu
6152 TEST_TAR_FORMAT=oldgnu
6153 export TEST_TAR_FORMAT
6154 TAR_OPTIONS="-H oldgnu"
6155 export TAR_OPTIONS
6156 rm -rf *
6157
6158 mkdir directory1 directory2
6159 touch directory1/file directory2/file
6160 tar --create --file archive \
6161     --no-recursion directory1 \
6162     --recursion directory2 || exit 1
6163 tar tf archive
6164 tar cf archive directory1 directory2
6165 tar tf archive \
6166     --no-recursion directory1 \
6167     --recursion directory2 || exit 1
6168 )
6169 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6170 at_status=$? at_failed=false
6171 $at_check_filter
6172 at_fn_diff_devnull "$at_stderr" || at_failed=:
6173 echo >>"$at_stdout"; $as_echo "directory1/
6174 directory2/
6175 directory2/file
6176 directory1/
6177 directory2/
6178 directory2/file
6179 " | \
6180   $at_diff - "$at_stdout" || at_failed=:
6181 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
6182 $at_failed && at_fn_log_failure
6183 $at_traceon; }
6184
6185               { set +x
6186 $as_echo "$at_srcdir/recurs02.at:33:
6187 mkdir ustar
6188 (cd ustar
6189 TEST_TAR_FORMAT=ustar
6190 export TEST_TAR_FORMAT
6191 TAR_OPTIONS=\"-H ustar\"
6192 export TAR_OPTIONS
6193 rm -rf *
6194
6195 mkdir directory1 directory2
6196 touch directory1/file directory2/file
6197 tar --create --file archive \\
6198     --no-recursion directory1 \\
6199     --recursion directory2 || exit 1
6200 tar tf archive
6201 tar cf archive directory1 directory2
6202 tar tf archive \\
6203     --no-recursion directory1 \\
6204     --recursion directory2 || exit 1
6205 )"
6206 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
6207 ( $at_check_trace;
6208 mkdir ustar
6209 (cd ustar
6210 TEST_TAR_FORMAT=ustar
6211 export TEST_TAR_FORMAT
6212 TAR_OPTIONS="-H ustar"
6213 export TAR_OPTIONS
6214 rm -rf *
6215
6216 mkdir directory1 directory2
6217 touch directory1/file directory2/file
6218 tar --create --file archive \
6219     --no-recursion directory1 \
6220     --recursion directory2 || exit 1
6221 tar tf archive
6222 tar cf archive directory1 directory2
6223 tar tf archive \
6224     --no-recursion directory1 \
6225     --recursion directory2 || exit 1
6226 )
6227 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6228 at_status=$? at_failed=false
6229 $at_check_filter
6230 at_fn_diff_devnull "$at_stderr" || at_failed=:
6231 echo >>"$at_stdout"; $as_echo "directory1/
6232 directory2/
6233 directory2/file
6234 directory1/
6235 directory2/
6236 directory2/file
6237 " | \
6238   $at_diff - "$at_stdout" || at_failed=:
6239 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
6240 $at_failed && at_fn_log_failure
6241 $at_traceon; }
6242
6243               { set +x
6244 $as_echo "$at_srcdir/recurs02.at:33:
6245 mkdir posix
6246 (cd posix
6247 TEST_TAR_FORMAT=posix
6248 export TEST_TAR_FORMAT
6249 TAR_OPTIONS=\"-H posix\"
6250 export TAR_OPTIONS
6251 rm -rf *
6252
6253 mkdir directory1 directory2
6254 touch directory1/file directory2/file
6255 tar --create --file archive \\
6256     --no-recursion directory1 \\
6257     --recursion directory2 || exit 1
6258 tar tf archive
6259 tar cf archive directory1 directory2
6260 tar tf archive \\
6261     --no-recursion directory1 \\
6262     --recursion directory2 || exit 1
6263 )"
6264 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
6265 ( $at_check_trace;
6266 mkdir posix
6267 (cd posix
6268 TEST_TAR_FORMAT=posix
6269 export TEST_TAR_FORMAT
6270 TAR_OPTIONS="-H posix"
6271 export TAR_OPTIONS
6272 rm -rf *
6273
6274 mkdir directory1 directory2
6275 touch directory1/file directory2/file
6276 tar --create --file archive \
6277     --no-recursion directory1 \
6278     --recursion directory2 || exit 1
6279 tar tf archive
6280 tar cf archive directory1 directory2
6281 tar tf archive \
6282     --no-recursion directory1 \
6283     --recursion directory2 || exit 1
6284 )
6285 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6286 at_status=$? at_failed=false
6287 $at_check_filter
6288 at_fn_diff_devnull "$at_stderr" || at_failed=:
6289 echo >>"$at_stdout"; $as_echo "directory1/
6290 directory2/
6291 directory2/file
6292 directory1/
6293 directory2/
6294 directory2/file
6295 " | \
6296   $at_diff - "$at_stdout" || at_failed=:
6297 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
6298 $at_failed && at_fn_log_failure
6299 $at_traceon; }
6300
6301               { set +x
6302 $as_echo "$at_srcdir/recurs02.at:33:
6303 mkdir gnu
6304 (cd gnu
6305 TEST_TAR_FORMAT=gnu
6306 export TEST_TAR_FORMAT
6307 TAR_OPTIONS=\"-H gnu\"
6308 export TAR_OPTIONS
6309 rm -rf *
6310
6311 mkdir directory1 directory2
6312 touch directory1/file directory2/file
6313 tar --create --file archive \\
6314     --no-recursion directory1 \\
6315     --recursion directory2 || exit 1
6316 tar tf archive
6317 tar cf archive directory1 directory2
6318 tar tf archive \\
6319     --no-recursion directory1 \\
6320     --recursion directory2 || exit 1
6321 )"
6322 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
6323 ( $at_check_trace;
6324 mkdir gnu
6325 (cd gnu
6326 TEST_TAR_FORMAT=gnu
6327 export TEST_TAR_FORMAT
6328 TAR_OPTIONS="-H gnu"
6329 export TAR_OPTIONS
6330 rm -rf *
6331
6332 mkdir directory1 directory2
6333 touch directory1/file directory2/file
6334 tar --create --file archive \
6335     --no-recursion directory1 \
6336     --recursion directory2 || exit 1
6337 tar tf archive
6338 tar cf archive directory1 directory2
6339 tar tf archive \
6340     --no-recursion directory1 \
6341     --recursion directory2 || exit 1
6342 )
6343 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6344 at_status=$? at_failed=false
6345 $at_check_filter
6346 at_fn_diff_devnull "$at_stderr" || at_failed=:
6347 echo >>"$at_stdout"; $as_echo "directory1/
6348 directory2/
6349 directory2/file
6350 directory1/
6351 directory2/
6352 directory2/file
6353 " | \
6354   $at_diff - "$at_stdout" || at_failed=:
6355 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
6356 $at_failed && at_fn_log_failure
6357 $at_traceon; }
6358
6359
6360
6361
6362   set +x
6363   $at_times_p && times >"$at_times_file"
6364 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6365 read at_status <"$at_status_file"
6366 #AT_STOP_28
6367 #AT_START_29
6368 at_fn_group_banner 29 'shortrec.at:26' \
6369   "short records" "                                  " 3
6370 at_xfail=no
6371       test -f $XFAILFILE && at_xfail=yes
6372 (
6373   $as_echo "29. $at_setup_line: testing $at_desc ..."
6374   $at_traceon
6375
6376
6377
6378
6379
6380   { set +x
6381 $as_echo "$at_srcdir/shortrec.at:29:
6382 mkdir v7
6383 (cd v7
6384 TEST_TAR_FORMAT=v7
6385 export TEST_TAR_FORMAT
6386 TAR_OPTIONS=\"-H v7\"
6387 export TAR_OPTIONS
6388 rm -rf *
6389
6390 mkdir directory
6391 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6392 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6393 tar -c -b 1 -f archive directory
6394 tar -t -f archive > /dev/null
6395 tar -t -f - < archive > /dev/null
6396
6397 rm -r directory
6398 )"
6399 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
6400 ( $at_check_trace;
6401 mkdir v7
6402 (cd v7
6403 TEST_TAR_FORMAT=v7
6404 export TEST_TAR_FORMAT
6405 TAR_OPTIONS="-H v7"
6406 export TAR_OPTIONS
6407 rm -rf *
6408
6409 mkdir directory
6410 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6411 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6412 tar -c -b 1 -f archive directory
6413 tar -t -f archive > /dev/null
6414 tar -t -f - < archive > /dev/null
6415
6416 rm -r directory
6417 )
6418 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6419 at_status=$? at_failed=false
6420 $at_check_filter
6421 at_fn_diff_devnull "$at_stderr" || at_failed=:
6422 at_fn_diff_devnull "$at_stdout" || at_failed=:
6423 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
6424 $at_failed && at_fn_log_failure
6425 $at_traceon; }
6426
6427               { set +x
6428 $as_echo "$at_srcdir/shortrec.at:29:
6429 mkdir oldgnu
6430 (cd oldgnu
6431 TEST_TAR_FORMAT=oldgnu
6432 export TEST_TAR_FORMAT
6433 TAR_OPTIONS=\"-H oldgnu\"
6434 export TAR_OPTIONS
6435 rm -rf *
6436
6437 mkdir directory
6438 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6439 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6440 tar -c -b 1 -f archive directory
6441 tar -t -f archive > /dev/null
6442 tar -t -f - < archive > /dev/null
6443
6444 rm -r directory
6445 )"
6446 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
6447 ( $at_check_trace;
6448 mkdir oldgnu
6449 (cd oldgnu
6450 TEST_TAR_FORMAT=oldgnu
6451 export TEST_TAR_FORMAT
6452 TAR_OPTIONS="-H oldgnu"
6453 export TAR_OPTIONS
6454 rm -rf *
6455
6456 mkdir directory
6457 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6458 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6459 tar -c -b 1 -f archive directory
6460 tar -t -f archive > /dev/null
6461 tar -t -f - < archive > /dev/null
6462
6463 rm -r directory
6464 )
6465 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6466 at_status=$? at_failed=false
6467 $at_check_filter
6468 at_fn_diff_devnull "$at_stderr" || at_failed=:
6469 at_fn_diff_devnull "$at_stdout" || at_failed=:
6470 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
6471 $at_failed && at_fn_log_failure
6472 $at_traceon; }
6473
6474               { set +x
6475 $as_echo "$at_srcdir/shortrec.at:29:
6476 mkdir ustar
6477 (cd ustar
6478 TEST_TAR_FORMAT=ustar
6479 export TEST_TAR_FORMAT
6480 TAR_OPTIONS=\"-H ustar\"
6481 export TAR_OPTIONS
6482 rm -rf *
6483
6484 mkdir directory
6485 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6486 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6487 tar -c -b 1 -f archive directory
6488 tar -t -f archive > /dev/null
6489 tar -t -f - < archive > /dev/null
6490
6491 rm -r directory
6492 )"
6493 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
6494 ( $at_check_trace;
6495 mkdir ustar
6496 (cd ustar
6497 TEST_TAR_FORMAT=ustar
6498 export TEST_TAR_FORMAT
6499 TAR_OPTIONS="-H ustar"
6500 export TAR_OPTIONS
6501 rm -rf *
6502
6503 mkdir directory
6504 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6505 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6506 tar -c -b 1 -f archive directory
6507 tar -t -f archive > /dev/null
6508 tar -t -f - < archive > /dev/null
6509
6510 rm -r directory
6511 )
6512 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6513 at_status=$? at_failed=false
6514 $at_check_filter
6515 at_fn_diff_devnull "$at_stderr" || at_failed=:
6516 at_fn_diff_devnull "$at_stdout" || at_failed=:
6517 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
6518 $at_failed && at_fn_log_failure
6519 $at_traceon; }
6520
6521               { set +x
6522 $as_echo "$at_srcdir/shortrec.at:29:
6523 mkdir posix
6524 (cd posix
6525 TEST_TAR_FORMAT=posix
6526 export TEST_TAR_FORMAT
6527 TAR_OPTIONS=\"-H posix\"
6528 export TAR_OPTIONS
6529 rm -rf *
6530
6531 mkdir directory
6532 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6533 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6534 tar -c -b 1 -f archive directory
6535 tar -t -f archive > /dev/null
6536 tar -t -f - < archive > /dev/null
6537
6538 rm -r directory
6539 )"
6540 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
6541 ( $at_check_trace;
6542 mkdir posix
6543 (cd posix
6544 TEST_TAR_FORMAT=posix
6545 export TEST_TAR_FORMAT
6546 TAR_OPTIONS="-H posix"
6547 export TAR_OPTIONS
6548 rm -rf *
6549
6550 mkdir directory
6551 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6552 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6553 tar -c -b 1 -f archive directory
6554 tar -t -f archive > /dev/null
6555 tar -t -f - < archive > /dev/null
6556
6557 rm -r directory
6558 )
6559 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6560 at_status=$? at_failed=false
6561 $at_check_filter
6562 at_fn_diff_devnull "$at_stderr" || at_failed=:
6563 at_fn_diff_devnull "$at_stdout" || at_failed=:
6564 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
6565 $at_failed && at_fn_log_failure
6566 $at_traceon; }
6567
6568               { set +x
6569 $as_echo "$at_srcdir/shortrec.at:29:
6570 mkdir gnu
6571 (cd gnu
6572 TEST_TAR_FORMAT=gnu
6573 export TEST_TAR_FORMAT
6574 TAR_OPTIONS=\"-H gnu\"
6575 export TAR_OPTIONS
6576 rm -rf *
6577
6578 mkdir directory
6579 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6580 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6581 tar -c -b 1 -f archive directory
6582 tar -t -f archive > /dev/null
6583 tar -t -f - < archive > /dev/null
6584
6585 rm -r directory
6586 )"
6587 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:29"
6588 ( $at_check_trace;
6589 mkdir gnu
6590 (cd gnu
6591 TEST_TAR_FORMAT=gnu
6592 export TEST_TAR_FORMAT
6593 TAR_OPTIONS="-H gnu"
6594 export TAR_OPTIONS
6595 rm -rf *
6596
6597 mkdir directory
6598 (cd directory && touch a b c d e f g h i j k l m n o p q r)
6599 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
6600 tar -c -b 1 -f archive directory
6601 tar -t -f archive > /dev/null
6602 tar -t -f - < archive > /dev/null
6603
6604 rm -r directory
6605 )
6606 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6607 at_status=$? at_failed=false
6608 $at_check_filter
6609 at_fn_diff_devnull "$at_stderr" || at_failed=:
6610 at_fn_diff_devnull "$at_stdout" || at_failed=:
6611 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:29"
6612 $at_failed && at_fn_log_failure
6613 $at_traceon; }
6614
6615
6616
6617
6618   set +x
6619   $at_times_p && times >"$at_times_file"
6620 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6621 read at_status <"$at_status_file"
6622 #AT_STOP_29
6623 #AT_START_30
6624 at_fn_group_banner 30 'numeric.at:18' \
6625   "--numeric-owner basic tests" "                    " 3
6626 at_xfail=no
6627       test -f $XFAILFILE && at_xfail=yes
6628 (
6629   $as_echo "30. $at_setup_line: testing $at_desc ..."
6630   $at_traceon
6631
6632
6633
6634
6635
6636
6637
6638   { set +x
6639 $as_echo "$at_srcdir/numeric.at:29:
6640 mkdir posix
6641 (cd posix
6642 TEST_TAR_FORMAT=posix
6643 export TEST_TAR_FORMAT
6644 TAR_OPTIONS=\"-H posix\"
6645 export TAR_OPTIONS
6646 rm -rf *
6647
6648 mkdir dir
6649 genfile --file dir/file
6650
6651 MYUID=\$(id -u) || exit 77
6652 MYGID=\$(id -g) || exit 77
6653 MYUSR=\$(id -un) || exit 77
6654 MYGRP=\$(id -gn) || exit 77
6655
6656
6657 decho --create
6658 tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6659 tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6660
6661
6662 decho --list
6663 tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6664 tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6665
6666
6667 decho --diff
6668 tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6669 tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6670
6671
6672 decho --extract
6673 tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6674 tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6675
6676 )"
6677 at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
6678 ( $at_check_trace;
6679 mkdir posix
6680 (cd posix
6681 TEST_TAR_FORMAT=posix
6682 export TEST_TAR_FORMAT
6683 TAR_OPTIONS="-H posix"
6684 export TAR_OPTIONS
6685 rm -rf *
6686
6687 mkdir dir
6688 genfile --file dir/file
6689
6690 MYUID=$(id -u) || exit 77
6691 MYGID=$(id -g) || exit 77
6692 MYUSR=$(id -un) || exit 77
6693 MYGRP=$(id -gn) || exit 77
6694
6695
6696 decho --create
6697 tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6698 tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6699
6700
6701 decho --list
6702 tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6703 tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6704
6705
6706 decho --diff
6707 tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6708 tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6709
6710
6711 decho --extract
6712 tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6713 tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6714
6715 )
6716 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6717 at_status=$? at_failed=false
6718 $at_check_filter
6719 echo >>"$at_stderr"; $as_echo "--create
6720 --list
6721 --diff
6722 --extract
6723 " | \
6724   $at_diff - "$at_stderr" || at_failed=:
6725 echo >>"$at_stdout"; $as_echo "--create
6726 OK
6727 OK
6728 OK
6729 OK
6730 --list
6731 OK
6732 OK
6733 OK
6734 OK
6735 --diff
6736 OK
6737 OK
6738 OK
6739 OK
6740 --extract
6741 OK
6742 OK
6743 OK
6744 OK
6745 " | \
6746   $at_diff - "$at_stdout" || at_failed=:
6747 at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
6748 $at_failed && at_fn_log_failure
6749 $at_traceon; }
6750
6751               { set +x
6752 $as_echo "$at_srcdir/numeric.at:29:
6753 mkdir gnu
6754 (cd gnu
6755 TEST_TAR_FORMAT=gnu
6756 export TEST_TAR_FORMAT
6757 TAR_OPTIONS=\"-H gnu\"
6758 export TAR_OPTIONS
6759 rm -rf *
6760
6761 mkdir dir
6762 genfile --file dir/file
6763
6764 MYUID=\$(id -u) || exit 77
6765 MYGID=\$(id -g) || exit 77
6766 MYUSR=\$(id -un) || exit 77
6767 MYGRP=\$(id -gn) || exit 77
6768
6769
6770 decho --create
6771 tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6772 tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6773
6774
6775 decho --list
6776 tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6777 tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6778
6779
6780 decho --diff
6781 tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6782 tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6783
6784
6785 decho --extract
6786 tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6787 tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6788
6789 )"
6790 at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
6791 ( $at_check_trace;
6792 mkdir gnu
6793 (cd gnu
6794 TEST_TAR_FORMAT=gnu
6795 export TEST_TAR_FORMAT
6796 TAR_OPTIONS="-H gnu"
6797 export TAR_OPTIONS
6798 rm -rf *
6799
6800 mkdir dir
6801 genfile --file dir/file
6802
6803 MYUID=$(id -u) || exit 77
6804 MYGID=$(id -g) || exit 77
6805 MYUSR=$(id -un) || exit 77
6806 MYGRP=$(id -gn) || exit 77
6807
6808
6809 decho --create
6810 tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6811 tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6812
6813
6814 decho --list
6815 tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6816 tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6817
6818
6819 decho --diff
6820 tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6821 tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6822
6823
6824 decho --extract
6825 tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6826 tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6827
6828 )
6829 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6830 at_status=$? at_failed=false
6831 $at_check_filter
6832 echo >>"$at_stderr"; $as_echo "--create
6833 --list
6834 --diff
6835 --extract
6836 " | \
6837   $at_diff - "$at_stderr" || at_failed=:
6838 echo >>"$at_stdout"; $as_echo "--create
6839 OK
6840 OK
6841 OK
6842 OK
6843 --list
6844 OK
6845 OK
6846 OK
6847 OK
6848 --diff
6849 OK
6850 OK
6851 OK
6852 OK
6853 --extract
6854 OK
6855 OK
6856 OK
6857 OK
6858 " | \
6859   $at_diff - "$at_stdout" || at_failed=:
6860 at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
6861 $at_failed && at_fn_log_failure
6862 $at_traceon; }
6863
6864               { set +x
6865 $as_echo "$at_srcdir/numeric.at:29:
6866 mkdir ustar
6867 (cd ustar
6868 TEST_TAR_FORMAT=ustar
6869 export TEST_TAR_FORMAT
6870 TAR_OPTIONS=\"-H ustar\"
6871 export TAR_OPTIONS
6872 rm -rf *
6873
6874 mkdir dir
6875 genfile --file dir/file
6876
6877 MYUID=\$(id -u) || exit 77
6878 MYGID=\$(id -g) || exit 77
6879 MYUSR=\$(id -un) || exit 77
6880 MYGRP=\$(id -gn) || exit 77
6881
6882
6883 decho --create
6884 tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6885 tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6886
6887
6888 decho --list
6889 tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6890 tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6891
6892
6893 decho --diff
6894 tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6895 tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6896
6897
6898 decho --extract
6899 tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6900 tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6901
6902 )"
6903 at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
6904 ( $at_check_trace;
6905 mkdir ustar
6906 (cd ustar
6907 TEST_TAR_FORMAT=ustar
6908 export TEST_TAR_FORMAT
6909 TAR_OPTIONS="-H ustar"
6910 export TAR_OPTIONS
6911 rm -rf *
6912
6913 mkdir dir
6914 genfile --file dir/file
6915
6916 MYUID=$(id -u) || exit 77
6917 MYGID=$(id -g) || exit 77
6918 MYUSR=$(id -un) || exit 77
6919 MYGRP=$(id -gn) || exit 77
6920
6921
6922 decho --create
6923 tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6924 tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6925
6926
6927 decho --list
6928 tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6929 tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6930
6931
6932 decho --diff
6933 tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6934 tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6935
6936
6937 decho --extract
6938 tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
6939 tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
6940
6941 )
6942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6943 at_status=$? at_failed=false
6944 $at_check_filter
6945 echo >>"$at_stderr"; $as_echo "--create
6946 --list
6947 --diff
6948 --extract
6949 " | \
6950   $at_diff - "$at_stderr" || at_failed=:
6951 echo >>"$at_stdout"; $as_echo "--create
6952 OK
6953 OK
6954 OK
6955 OK
6956 --list
6957 OK
6958 OK
6959 OK
6960 OK
6961 --diff
6962 OK
6963 OK
6964 OK
6965 OK
6966 --extract
6967 OK
6968 OK
6969 OK
6970 OK
6971 " | \
6972   $at_diff - "$at_stdout" || at_failed=:
6973 at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
6974 $at_failed && at_fn_log_failure
6975 $at_traceon; }
6976
6977               { set +x
6978 $as_echo "$at_srcdir/numeric.at:29:
6979 mkdir oldgnu
6980 (cd oldgnu
6981 TEST_TAR_FORMAT=oldgnu
6982 export TEST_TAR_FORMAT
6983 TAR_OPTIONS=\"-H oldgnu\"
6984 export TAR_OPTIONS
6985 rm -rf *
6986
6987 mkdir dir
6988 genfile --file dir/file
6989
6990 MYUID=\$(id -u) || exit 77
6991 MYGID=\$(id -g) || exit 77
6992 MYUSR=\$(id -un) || exit 77
6993 MYGRP=\$(id -gn) || exit 77
6994
6995
6996 decho --create
6997 tar --create -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
6998 tar --create -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
6999
7000
7001 decho --list
7002 tar --list -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
7003 tar --list -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
7004
7005
7006 decho --diff
7007 tar --diff -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
7008 tar --diff -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
7009
7010
7011 decho --extract
7012 tar --extract -vvf a dir --numeric-owner | awk '$2==\"'\"\$MYUID/\$MYGID\"'\" {print \"OK\"; next} {print}'
7013 tar --extract -vvf a dir | awk '$2==\"'\"\$MYUSR/\$MYGRP\"'\" {print \"OK\"; next} {print}'
7014
7015 )"
7016 at_fn_check_prepare_notrace 'a $(...) command substitution' "numeric.at:29"
7017 ( $at_check_trace;
7018 mkdir oldgnu
7019 (cd oldgnu
7020 TEST_TAR_FORMAT=oldgnu
7021 export TEST_TAR_FORMAT
7022 TAR_OPTIONS="-H oldgnu"
7023 export TAR_OPTIONS
7024 rm -rf *
7025
7026 mkdir dir
7027 genfile --file dir/file
7028
7029 MYUID=$(id -u) || exit 77
7030 MYGID=$(id -g) || exit 77
7031 MYUSR=$(id -un) || exit 77
7032 MYGRP=$(id -gn) || exit 77
7033
7034
7035 decho --create
7036 tar --create -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
7037 tar --create -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
7038
7039
7040 decho --list
7041 tar --list -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
7042 tar --list -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
7043
7044
7045 decho --diff
7046 tar --diff -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
7047 tar --diff -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
7048
7049
7050 decho --extract
7051 tar --extract -vvf a dir --numeric-owner | awk '$2=="'"$MYUID/$MYGID"'" {print "OK"; next} {print}'
7052 tar --extract -vvf a dir | awk '$2=="'"$MYUSR/$MYGRP"'" {print "OK"; next} {print}'
7053
7054 )
7055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7056 at_status=$? at_failed=false
7057 $at_check_filter
7058 echo >>"$at_stderr"; $as_echo "--create
7059 --list
7060 --diff
7061 --extract
7062 " | \
7063   $at_diff - "$at_stderr" || at_failed=:
7064 echo >>"$at_stdout"; $as_echo "--create
7065 OK
7066 OK
7067 OK
7068 OK
7069 --list
7070 OK
7071 OK
7072 OK
7073 OK
7074 --diff
7075 OK
7076 OK
7077 OK
7078 OK
7079 --extract
7080 OK
7081 OK
7082 OK
7083 OK
7084 " | \
7085   $at_diff - "$at_stdout" || at_failed=:
7086 at_fn_check_status 0 $at_status "$at_srcdir/numeric.at:29"
7087 $at_failed && at_fn_log_failure
7088 $at_traceon; }
7089
7090
7091
7092
7093   set +x
7094   $at_times_p && times >"$at_times_file"
7095 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7096 read at_status <"$at_status_file"
7097 #AT_STOP_30
7098 #AT_START_31
7099 at_fn_group_banner 31 'same-order01.at:27' \
7100   "working -C with --same-order" "                   " 4
7101 at_xfail=no
7102       test -f $XFAILFILE && at_xfail=yes
7103 (
7104   $as_echo "31. $at_setup_line: testing $at_desc ..."
7105   $at_traceon
7106
7107
7108
7109
7110
7111   { set +x
7112 $as_echo "$at_srcdir/same-order01.at:30:
7113 mkdir v7
7114 (cd v7
7115 TEST_TAR_FORMAT=v7
7116 export TEST_TAR_FORMAT
7117 TAR_OPTIONS=\"-H v7\"
7118 export TAR_OPTIONS
7119 rm -rf *
7120
7121
7122 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7123
7124
7125 genfile -l 1024 -f file1
7126 genfile -l 1024 -f file2
7127 tar cf archive file1 file2
7128
7129 mkdir directory
7130 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7131
7132 ls directory|sort
7133 )"
7134 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
7135 ( $at_check_trace;
7136 mkdir v7
7137 (cd v7
7138 TEST_TAR_FORMAT=v7
7139 export TEST_TAR_FORMAT
7140 TAR_OPTIONS="-H v7"
7141 export TAR_OPTIONS
7142 rm -rf *
7143
7144
7145 test -z "`sort < /dev/null 2>&1`" || exit 77
7146
7147
7148 genfile -l 1024 -f file1
7149 genfile -l 1024 -f file2
7150 tar cf archive file1 file2
7151
7152 mkdir directory
7153 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7154
7155 ls directory|sort
7156 )
7157 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7158 at_status=$? at_failed=false
7159 $at_check_filter
7160 at_fn_diff_devnull "$at_stderr" || at_failed=:
7161 echo >>"$at_stdout"; $as_echo "file1
7162 file2
7163 " | \
7164   $at_diff - "$at_stdout" || at_failed=:
7165 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
7166 $at_failed && at_fn_log_failure
7167 $at_traceon; }
7168
7169               { set +x
7170 $as_echo "$at_srcdir/same-order01.at:30:
7171 mkdir oldgnu
7172 (cd oldgnu
7173 TEST_TAR_FORMAT=oldgnu
7174 export TEST_TAR_FORMAT
7175 TAR_OPTIONS=\"-H oldgnu\"
7176 export TAR_OPTIONS
7177 rm -rf *
7178
7179
7180 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7181
7182
7183 genfile -l 1024 -f file1
7184 genfile -l 1024 -f file2
7185 tar cf archive file1 file2
7186
7187 mkdir directory
7188 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7189
7190 ls directory|sort
7191 )"
7192 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
7193 ( $at_check_trace;
7194 mkdir oldgnu
7195 (cd oldgnu
7196 TEST_TAR_FORMAT=oldgnu
7197 export TEST_TAR_FORMAT
7198 TAR_OPTIONS="-H oldgnu"
7199 export TAR_OPTIONS
7200 rm -rf *
7201
7202
7203 test -z "`sort < /dev/null 2>&1`" || exit 77
7204
7205
7206 genfile -l 1024 -f file1
7207 genfile -l 1024 -f file2
7208 tar cf archive file1 file2
7209
7210 mkdir directory
7211 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7212
7213 ls directory|sort
7214 )
7215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7216 at_status=$? at_failed=false
7217 $at_check_filter
7218 at_fn_diff_devnull "$at_stderr" || at_failed=:
7219 echo >>"$at_stdout"; $as_echo "file1
7220 file2
7221 " | \
7222   $at_diff - "$at_stdout" || at_failed=:
7223 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
7224 $at_failed && at_fn_log_failure
7225 $at_traceon; }
7226
7227               { set +x
7228 $as_echo "$at_srcdir/same-order01.at:30:
7229 mkdir ustar
7230 (cd ustar
7231 TEST_TAR_FORMAT=ustar
7232 export TEST_TAR_FORMAT
7233 TAR_OPTIONS=\"-H ustar\"
7234 export TAR_OPTIONS
7235 rm -rf *
7236
7237
7238 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7239
7240
7241 genfile -l 1024 -f file1
7242 genfile -l 1024 -f file2
7243 tar cf archive file1 file2
7244
7245 mkdir directory
7246 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7247
7248 ls directory|sort
7249 )"
7250 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
7251 ( $at_check_trace;
7252 mkdir ustar
7253 (cd ustar
7254 TEST_TAR_FORMAT=ustar
7255 export TEST_TAR_FORMAT
7256 TAR_OPTIONS="-H ustar"
7257 export TAR_OPTIONS
7258 rm -rf *
7259
7260
7261 test -z "`sort < /dev/null 2>&1`" || exit 77
7262
7263
7264 genfile -l 1024 -f file1
7265 genfile -l 1024 -f file2
7266 tar cf archive file1 file2
7267
7268 mkdir directory
7269 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7270
7271 ls directory|sort
7272 )
7273 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7274 at_status=$? at_failed=false
7275 $at_check_filter
7276 at_fn_diff_devnull "$at_stderr" || at_failed=:
7277 echo >>"$at_stdout"; $as_echo "file1
7278 file2
7279 " | \
7280   $at_diff - "$at_stdout" || at_failed=:
7281 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
7282 $at_failed && at_fn_log_failure
7283 $at_traceon; }
7284
7285               { set +x
7286 $as_echo "$at_srcdir/same-order01.at:30:
7287 mkdir posix
7288 (cd posix
7289 TEST_TAR_FORMAT=posix
7290 export TEST_TAR_FORMAT
7291 TAR_OPTIONS=\"-H posix\"
7292 export TAR_OPTIONS
7293 rm -rf *
7294
7295
7296 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7297
7298
7299 genfile -l 1024 -f file1
7300 genfile -l 1024 -f file2
7301 tar cf archive file1 file2
7302
7303 mkdir directory
7304 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7305
7306 ls directory|sort
7307 )"
7308 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
7309 ( $at_check_trace;
7310 mkdir posix
7311 (cd posix
7312 TEST_TAR_FORMAT=posix
7313 export TEST_TAR_FORMAT
7314 TAR_OPTIONS="-H posix"
7315 export TAR_OPTIONS
7316 rm -rf *
7317
7318
7319 test -z "`sort < /dev/null 2>&1`" || exit 77
7320
7321
7322 genfile -l 1024 -f file1
7323 genfile -l 1024 -f file2
7324 tar cf archive file1 file2
7325
7326 mkdir directory
7327 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7328
7329 ls directory|sort
7330 )
7331 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7332 at_status=$? at_failed=false
7333 $at_check_filter
7334 at_fn_diff_devnull "$at_stderr" || at_failed=:
7335 echo >>"$at_stdout"; $as_echo "file1
7336 file2
7337 " | \
7338   $at_diff - "$at_stdout" || at_failed=:
7339 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
7340 $at_failed && at_fn_log_failure
7341 $at_traceon; }
7342
7343               { set +x
7344 $as_echo "$at_srcdir/same-order01.at:30:
7345 mkdir gnu
7346 (cd gnu
7347 TEST_TAR_FORMAT=gnu
7348 export TEST_TAR_FORMAT
7349 TAR_OPTIONS=\"-H gnu\"
7350 export TAR_OPTIONS
7351 rm -rf *
7352
7353
7354 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7355
7356
7357 genfile -l 1024 -f file1
7358 genfile -l 1024 -f file2
7359 tar cf archive file1 file2
7360
7361 mkdir directory
7362 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7363
7364 ls directory|sort
7365 )"
7366 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:30"
7367 ( $at_check_trace;
7368 mkdir gnu
7369 (cd gnu
7370 TEST_TAR_FORMAT=gnu
7371 export TEST_TAR_FORMAT
7372 TAR_OPTIONS="-H gnu"
7373 export TAR_OPTIONS
7374 rm -rf *
7375
7376
7377 test -z "`sort < /dev/null 2>&1`" || exit 77
7378
7379
7380 genfile -l 1024 -f file1
7381 genfile -l 1024 -f file2
7382 tar cf archive file1 file2
7383
7384 mkdir directory
7385 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
7386
7387 ls directory|sort
7388 )
7389 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7390 at_status=$? at_failed=false
7391 $at_check_filter
7392 at_fn_diff_devnull "$at_stderr" || at_failed=:
7393 echo >>"$at_stdout"; $as_echo "file1
7394 file2
7395 " | \
7396   $at_diff - "$at_stdout" || at_failed=:
7397 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:30"
7398 $at_failed && at_fn_log_failure
7399 $at_traceon; }
7400
7401
7402
7403
7404   set +x
7405   $at_times_p && times >"$at_times_file"
7406 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7407 read at_status <"$at_status_file"
7408 #AT_STOP_31
7409 #AT_START_32
7410 at_fn_group_banner 32 'same-order02.at:26' \
7411   "multiple -C options" "                            " 4
7412 at_xfail=no
7413       test -f $XFAILFILE && at_xfail=yes
7414 (
7415   $as_echo "32. $at_setup_line: testing $at_desc ..."
7416   $at_traceon
7417
7418
7419
7420
7421
7422   { set +x
7423 $as_echo "$at_srcdir/same-order02.at:29:
7424 mkdir v7
7425 (cd v7
7426 TEST_TAR_FORMAT=v7
7427 export TEST_TAR_FORMAT
7428 TAR_OPTIONS=\"-H v7\"
7429 export TAR_OPTIONS
7430 rm -rf *
7431
7432 genfile -l 1024 -f file1
7433 genfile -l 1024 -f file2
7434 tar cf archive file1 file2
7435
7436 mkdir en
7437 mkdir to
7438
7439 HERE=\`pwd\`
7440 tar -xf archive --same-order --warning=no-timestamp \\
7441   -C \$HERE/en file1 \\
7442   -C \$HERE/to file2 || exit 1
7443
7444 ls en
7445 echo separator
7446 ls to
7447 )"
7448 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
7449 ( $at_check_trace;
7450 mkdir v7
7451 (cd v7
7452 TEST_TAR_FORMAT=v7
7453 export TEST_TAR_FORMAT
7454 TAR_OPTIONS="-H v7"
7455 export TAR_OPTIONS
7456 rm -rf *
7457
7458 genfile -l 1024 -f file1
7459 genfile -l 1024 -f file2
7460 tar cf archive file1 file2
7461
7462 mkdir en
7463 mkdir to
7464
7465 HERE=`pwd`
7466 tar -xf archive --same-order --warning=no-timestamp \
7467   -C $HERE/en file1 \
7468   -C $HERE/to file2 || exit 1
7469
7470 ls en
7471 echo separator
7472 ls to
7473 )
7474 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7475 at_status=$? at_failed=false
7476 $at_check_filter
7477 at_fn_diff_devnull "$at_stderr" || at_failed=:
7478 echo >>"$at_stdout"; $as_echo "file1
7479 separator
7480 file2
7481 " | \
7482   $at_diff - "$at_stdout" || at_failed=:
7483 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
7484 $at_failed && at_fn_log_failure
7485 $at_traceon; }
7486
7487               { set +x
7488 $as_echo "$at_srcdir/same-order02.at:29:
7489 mkdir oldgnu
7490 (cd oldgnu
7491 TEST_TAR_FORMAT=oldgnu
7492 export TEST_TAR_FORMAT
7493 TAR_OPTIONS=\"-H oldgnu\"
7494 export TAR_OPTIONS
7495 rm -rf *
7496
7497 genfile -l 1024 -f file1
7498 genfile -l 1024 -f file2
7499 tar cf archive file1 file2
7500
7501 mkdir en
7502 mkdir to
7503
7504 HERE=\`pwd\`
7505 tar -xf archive --same-order --warning=no-timestamp \\
7506   -C \$HERE/en file1 \\
7507   -C \$HERE/to file2 || exit 1
7508
7509 ls en
7510 echo separator
7511 ls to
7512 )"
7513 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
7514 ( $at_check_trace;
7515 mkdir oldgnu
7516 (cd oldgnu
7517 TEST_TAR_FORMAT=oldgnu
7518 export TEST_TAR_FORMAT
7519 TAR_OPTIONS="-H oldgnu"
7520 export TAR_OPTIONS
7521 rm -rf *
7522
7523 genfile -l 1024 -f file1
7524 genfile -l 1024 -f file2
7525 tar cf archive file1 file2
7526
7527 mkdir en
7528 mkdir to
7529
7530 HERE=`pwd`
7531 tar -xf archive --same-order --warning=no-timestamp \
7532   -C $HERE/en file1 \
7533   -C $HERE/to file2 || exit 1
7534
7535 ls en
7536 echo separator
7537 ls to
7538 )
7539 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7540 at_status=$? at_failed=false
7541 $at_check_filter
7542 at_fn_diff_devnull "$at_stderr" || at_failed=:
7543 echo >>"$at_stdout"; $as_echo "file1
7544 separator
7545 file2
7546 " | \
7547   $at_diff - "$at_stdout" || at_failed=:
7548 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
7549 $at_failed && at_fn_log_failure
7550 $at_traceon; }
7551
7552               { set +x
7553 $as_echo "$at_srcdir/same-order02.at:29:
7554 mkdir ustar
7555 (cd ustar
7556 TEST_TAR_FORMAT=ustar
7557 export TEST_TAR_FORMAT
7558 TAR_OPTIONS=\"-H ustar\"
7559 export TAR_OPTIONS
7560 rm -rf *
7561
7562 genfile -l 1024 -f file1
7563 genfile -l 1024 -f file2
7564 tar cf archive file1 file2
7565
7566 mkdir en
7567 mkdir to
7568
7569 HERE=\`pwd\`
7570 tar -xf archive --same-order --warning=no-timestamp \\
7571   -C \$HERE/en file1 \\
7572   -C \$HERE/to file2 || exit 1
7573
7574 ls en
7575 echo separator
7576 ls to
7577 )"
7578 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
7579 ( $at_check_trace;
7580 mkdir ustar
7581 (cd ustar
7582 TEST_TAR_FORMAT=ustar
7583 export TEST_TAR_FORMAT
7584 TAR_OPTIONS="-H ustar"
7585 export TAR_OPTIONS
7586 rm -rf *
7587
7588 genfile -l 1024 -f file1
7589 genfile -l 1024 -f file2
7590 tar cf archive file1 file2
7591
7592 mkdir en
7593 mkdir to
7594
7595 HERE=`pwd`
7596 tar -xf archive --same-order --warning=no-timestamp \
7597   -C $HERE/en file1 \
7598   -C $HERE/to file2 || exit 1
7599
7600 ls en
7601 echo separator
7602 ls to
7603 )
7604 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7605 at_status=$? at_failed=false
7606 $at_check_filter
7607 at_fn_diff_devnull "$at_stderr" || at_failed=:
7608 echo >>"$at_stdout"; $as_echo "file1
7609 separator
7610 file2
7611 " | \
7612   $at_diff - "$at_stdout" || at_failed=:
7613 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
7614 $at_failed && at_fn_log_failure
7615 $at_traceon; }
7616
7617               { set +x
7618 $as_echo "$at_srcdir/same-order02.at:29:
7619 mkdir posix
7620 (cd posix
7621 TEST_TAR_FORMAT=posix
7622 export TEST_TAR_FORMAT
7623 TAR_OPTIONS=\"-H posix\"
7624 export TAR_OPTIONS
7625 rm -rf *
7626
7627 genfile -l 1024 -f file1
7628 genfile -l 1024 -f file2
7629 tar cf archive file1 file2
7630
7631 mkdir en
7632 mkdir to
7633
7634 HERE=\`pwd\`
7635 tar -xf archive --same-order --warning=no-timestamp \\
7636   -C \$HERE/en file1 \\
7637   -C \$HERE/to file2 || exit 1
7638
7639 ls en
7640 echo separator
7641 ls to
7642 )"
7643 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
7644 ( $at_check_trace;
7645 mkdir posix
7646 (cd posix
7647 TEST_TAR_FORMAT=posix
7648 export TEST_TAR_FORMAT
7649 TAR_OPTIONS="-H posix"
7650 export TAR_OPTIONS
7651 rm -rf *
7652
7653 genfile -l 1024 -f file1
7654 genfile -l 1024 -f file2
7655 tar cf archive file1 file2
7656
7657 mkdir en
7658 mkdir to
7659
7660 HERE=`pwd`
7661 tar -xf archive --same-order --warning=no-timestamp \
7662   -C $HERE/en file1 \
7663   -C $HERE/to file2 || exit 1
7664
7665 ls en
7666 echo separator
7667 ls to
7668 )
7669 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7670 at_status=$? at_failed=false
7671 $at_check_filter
7672 at_fn_diff_devnull "$at_stderr" || at_failed=:
7673 echo >>"$at_stdout"; $as_echo "file1
7674 separator
7675 file2
7676 " | \
7677   $at_diff - "$at_stdout" || at_failed=:
7678 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
7679 $at_failed && at_fn_log_failure
7680 $at_traceon; }
7681
7682               { set +x
7683 $as_echo "$at_srcdir/same-order02.at:29:
7684 mkdir gnu
7685 (cd gnu
7686 TEST_TAR_FORMAT=gnu
7687 export TEST_TAR_FORMAT
7688 TAR_OPTIONS=\"-H gnu\"
7689 export TAR_OPTIONS
7690 rm -rf *
7691
7692 genfile -l 1024 -f file1
7693 genfile -l 1024 -f file2
7694 tar cf archive file1 file2
7695
7696 mkdir en
7697 mkdir to
7698
7699 HERE=\`pwd\`
7700 tar -xf archive --same-order --warning=no-timestamp \\
7701   -C \$HERE/en file1 \\
7702   -C \$HERE/to file2 || exit 1
7703
7704 ls en
7705 echo separator
7706 ls to
7707 )"
7708 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:29"
7709 ( $at_check_trace;
7710 mkdir gnu
7711 (cd gnu
7712 TEST_TAR_FORMAT=gnu
7713 export TEST_TAR_FORMAT
7714 TAR_OPTIONS="-H gnu"
7715 export TAR_OPTIONS
7716 rm -rf *
7717
7718 genfile -l 1024 -f file1
7719 genfile -l 1024 -f file2
7720 tar cf archive file1 file2
7721
7722 mkdir en
7723 mkdir to
7724
7725 HERE=`pwd`
7726 tar -xf archive --same-order --warning=no-timestamp \
7727   -C $HERE/en file1 \
7728   -C $HERE/to file2 || exit 1
7729
7730 ls en
7731 echo separator
7732 ls to
7733 )
7734 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7735 at_status=$? at_failed=false
7736 $at_check_filter
7737 at_fn_diff_devnull "$at_stderr" || at_failed=:
7738 echo >>"$at_stdout"; $as_echo "file1
7739 separator
7740 file2
7741 " | \
7742   $at_diff - "$at_stdout" || at_failed=:
7743 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:29"
7744 $at_failed && at_fn_log_failure
7745 $at_traceon; }
7746
7747
7748
7749
7750   set +x
7751   $at_times_p && times >"$at_times_file"
7752 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7753 read at_status <"$at_status_file"
7754 #AT_STOP_32
7755 #AT_START_33
7756 at_fn_group_banner 33 'append.at:22' \
7757   "append" "                                         " 5
7758 at_xfail=no
7759       test -f $XFAILFILE && at_xfail=yes
7760 (
7761   $as_echo "33. $at_setup_line: testing $at_desc ..."
7762   $at_traceon
7763
7764
7765
7766
7767
7768   { set +x
7769 $as_echo "$at_srcdir/append.at:25:
7770 mkdir v7
7771 (cd v7
7772 TEST_TAR_FORMAT=v7
7773 export TEST_TAR_FORMAT
7774 TAR_OPTIONS=\"-H v7\"
7775 export TAR_OPTIONS
7776 rm -rf *
7777 touch file1
7778           touch file2
7779           tar cf archive file1
7780           tar rf archive file2
7781           tar tf archive)"
7782 at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
7783 ( $at_check_trace;
7784 mkdir v7
7785 (cd v7
7786 TEST_TAR_FORMAT=v7
7787 export TEST_TAR_FORMAT
7788 TAR_OPTIONS="-H v7"
7789 export TAR_OPTIONS
7790 rm -rf *
7791 touch file1
7792           touch file2
7793           tar cf archive file1
7794           tar rf archive file2
7795           tar tf archive)
7796 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7797 at_status=$? at_failed=false
7798 $at_check_filter
7799 at_fn_diff_devnull "$at_stderr" || at_failed=:
7800 echo >>"$at_stdout"; $as_echo "file1
7801 file2
7802 " | \
7803   $at_diff - "$at_stdout" || at_failed=:
7804 at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
7805 $at_failed && at_fn_log_failure
7806 $at_traceon; }
7807
7808               { set +x
7809 $as_echo "$at_srcdir/append.at:25:
7810 mkdir oldgnu
7811 (cd oldgnu
7812 TEST_TAR_FORMAT=oldgnu
7813 export TEST_TAR_FORMAT
7814 TAR_OPTIONS=\"-H oldgnu\"
7815 export TAR_OPTIONS
7816 rm -rf *
7817 touch file1
7818           touch file2
7819           tar cf archive file1
7820           tar rf archive file2
7821           tar tf archive)"
7822 at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
7823 ( $at_check_trace;
7824 mkdir oldgnu
7825 (cd oldgnu
7826 TEST_TAR_FORMAT=oldgnu
7827 export TEST_TAR_FORMAT
7828 TAR_OPTIONS="-H oldgnu"
7829 export TAR_OPTIONS
7830 rm -rf *
7831 touch file1
7832           touch file2
7833           tar cf archive file1
7834           tar rf archive file2
7835           tar tf archive)
7836 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7837 at_status=$? at_failed=false
7838 $at_check_filter
7839 at_fn_diff_devnull "$at_stderr" || at_failed=:
7840 echo >>"$at_stdout"; $as_echo "file1
7841 file2
7842 " | \
7843   $at_diff - "$at_stdout" || at_failed=:
7844 at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
7845 $at_failed && at_fn_log_failure
7846 $at_traceon; }
7847
7848               { set +x
7849 $as_echo "$at_srcdir/append.at:25:
7850 mkdir ustar
7851 (cd ustar
7852 TEST_TAR_FORMAT=ustar
7853 export TEST_TAR_FORMAT
7854 TAR_OPTIONS=\"-H ustar\"
7855 export TAR_OPTIONS
7856 rm -rf *
7857 touch file1
7858           touch file2
7859           tar cf archive file1
7860           tar rf archive file2
7861           tar tf archive)"
7862 at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
7863 ( $at_check_trace;
7864 mkdir ustar
7865 (cd ustar
7866 TEST_TAR_FORMAT=ustar
7867 export TEST_TAR_FORMAT
7868 TAR_OPTIONS="-H ustar"
7869 export TAR_OPTIONS
7870 rm -rf *
7871 touch file1
7872           touch file2
7873           tar cf archive file1
7874           tar rf archive file2
7875           tar tf archive)
7876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7877 at_status=$? at_failed=false
7878 $at_check_filter
7879 at_fn_diff_devnull "$at_stderr" || at_failed=:
7880 echo >>"$at_stdout"; $as_echo "file1
7881 file2
7882 " | \
7883   $at_diff - "$at_stdout" || at_failed=:
7884 at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
7885 $at_failed && at_fn_log_failure
7886 $at_traceon; }
7887
7888               { set +x
7889 $as_echo "$at_srcdir/append.at:25:
7890 mkdir posix
7891 (cd posix
7892 TEST_TAR_FORMAT=posix
7893 export TEST_TAR_FORMAT
7894 TAR_OPTIONS=\"-H posix\"
7895 export TAR_OPTIONS
7896 rm -rf *
7897 touch file1
7898           touch file2
7899           tar cf archive file1
7900           tar rf archive file2
7901           tar tf archive)"
7902 at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
7903 ( $at_check_trace;
7904 mkdir posix
7905 (cd posix
7906 TEST_TAR_FORMAT=posix
7907 export TEST_TAR_FORMAT
7908 TAR_OPTIONS="-H posix"
7909 export TAR_OPTIONS
7910 rm -rf *
7911 touch file1
7912           touch file2
7913           tar cf archive file1
7914           tar rf archive file2
7915           tar tf archive)
7916 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7917 at_status=$? at_failed=false
7918 $at_check_filter
7919 at_fn_diff_devnull "$at_stderr" || at_failed=:
7920 echo >>"$at_stdout"; $as_echo "file1
7921 file2
7922 " | \
7923   $at_diff - "$at_stdout" || at_failed=:
7924 at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
7925 $at_failed && at_fn_log_failure
7926 $at_traceon; }
7927
7928               { set +x
7929 $as_echo "$at_srcdir/append.at:25:
7930 mkdir gnu
7931 (cd gnu
7932 TEST_TAR_FORMAT=gnu
7933 export TEST_TAR_FORMAT
7934 TAR_OPTIONS=\"-H gnu\"
7935 export TAR_OPTIONS
7936 rm -rf *
7937 touch file1
7938           touch file2
7939           tar cf archive file1
7940           tar rf archive file2
7941           tar tf archive)"
7942 at_fn_check_prepare_notrace 'an embedded newline' "append.at:25"
7943 ( $at_check_trace;
7944 mkdir gnu
7945 (cd gnu
7946 TEST_TAR_FORMAT=gnu
7947 export TEST_TAR_FORMAT
7948 TAR_OPTIONS="-H gnu"
7949 export TAR_OPTIONS
7950 rm -rf *
7951 touch file1
7952           touch file2
7953           tar cf archive file1
7954           tar rf archive file2
7955           tar tf archive)
7956 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7957 at_status=$? at_failed=false
7958 $at_check_filter
7959 at_fn_diff_devnull "$at_stderr" || at_failed=:
7960 echo >>"$at_stdout"; $as_echo "file1
7961 file2
7962 " | \
7963   $at_diff - "$at_stdout" || at_failed=:
7964 at_fn_check_status 0 $at_status "$at_srcdir/append.at:25"
7965 $at_failed && at_fn_log_failure
7966 $at_traceon; }
7967
7968
7969
7970
7971   set +x
7972   $at_times_p && times >"$at_times_file"
7973 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7974 read at_status <"$at_status_file"
7975 #AT_STOP_33
7976 #AT_START_34
7977 at_fn_group_banner 34 'append01.at:29' \
7978   "appending files with long names" "                " 5
7979 at_xfail=no
7980       test -f $XFAILFILE && at_xfail=yes
7981 (
7982   $as_echo "34. $at_setup_line: testing $at_desc ..."
7983   $at_traceon
7984
7985
7986
7987
7988
7989
7990
7991   { set +x
7992 $as_echo "$at_srcdir/append01.at:34:
7993 mkdir oldgnu
7994 (cd oldgnu
7995 TEST_TAR_FORMAT=oldgnu
7996 export TEST_TAR_FORMAT
7997 TAR_OPTIONS=\"-H oldgnu\"
7998 export TAR_OPTIONS
7999 rm -rf *
8000
8001 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
8002 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8003 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8004 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8005 tar tf archive
8006 )"
8007 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
8008 ( $at_check_trace;
8009 mkdir oldgnu
8010 (cd oldgnu
8011 TEST_TAR_FORMAT=oldgnu
8012 export TEST_TAR_FORMAT
8013 TAR_OPTIONS="-H oldgnu"
8014 export TAR_OPTIONS
8015 rm -rf *
8016
8017 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
8018 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8019 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8020 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8021 tar tf archive
8022 )
8023 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8024 at_status=$? at_failed=false
8025 $at_check_filter
8026 at_fn_diff_devnull "$at_stderr" || at_failed=:
8027 echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8028 This_is_a_very_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
8029 " | \
8030   $at_diff - "$at_stdout" || at_failed=:
8031 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
8032 $at_failed && at_fn_log_failure
8033 $at_traceon; }
8034
8035               { set +x
8036 $as_echo "$at_srcdir/append01.at:34:
8037 mkdir ustar
8038 (cd ustar
8039 TEST_TAR_FORMAT=ustar
8040 export TEST_TAR_FORMAT
8041 TAR_OPTIONS=\"-H ustar\"
8042 export TAR_OPTIONS
8043 rm -rf *
8044
8045 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
8046 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8047 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8048 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8049 tar tf archive
8050 )"
8051 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
8052 ( $at_check_trace;
8053 mkdir ustar
8054 (cd ustar
8055 TEST_TAR_FORMAT=ustar
8056 export TEST_TAR_FORMAT
8057 TAR_OPTIONS="-H ustar"
8058 export TAR_OPTIONS
8059 rm -rf *
8060
8061 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
8062 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8063 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8064 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8065 tar tf archive
8066 )
8067 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8068 at_status=$? at_failed=false
8069 $at_check_filter
8070 at_fn_diff_devnull "$at_stderr" || at_failed=:
8071 echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8072 This_is_a_very_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
8073 " | \
8074   $at_diff - "$at_stdout" || at_failed=:
8075 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
8076 $at_failed && at_fn_log_failure
8077 $at_traceon; }
8078
8079               { set +x
8080 $as_echo "$at_srcdir/append01.at:34:
8081 mkdir posix
8082 (cd posix
8083 TEST_TAR_FORMAT=posix
8084 export TEST_TAR_FORMAT
8085 TAR_OPTIONS=\"-H posix\"
8086 export TAR_OPTIONS
8087 rm -rf *
8088
8089 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
8090 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8091 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8092 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8093 tar tf archive
8094 )"
8095 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
8096 ( $at_check_trace;
8097 mkdir posix
8098 (cd posix
8099 TEST_TAR_FORMAT=posix
8100 export TEST_TAR_FORMAT
8101 TAR_OPTIONS="-H posix"
8102 export TAR_OPTIONS
8103 rm -rf *
8104
8105 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
8106 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8107 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8108 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8109 tar tf archive
8110 )
8111 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8112 at_status=$? at_failed=false
8113 $at_check_filter
8114 at_fn_diff_devnull "$at_stderr" || at_failed=:
8115 echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8116 This_is_a_very_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
8117 " | \
8118   $at_diff - "$at_stdout" || at_failed=:
8119 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
8120 $at_failed && at_fn_log_failure
8121 $at_traceon; }
8122
8123               { set +x
8124 $as_echo "$at_srcdir/append01.at:34:
8125 mkdir gnu
8126 (cd gnu
8127 TEST_TAR_FORMAT=gnu
8128 export TEST_TAR_FORMAT
8129 TAR_OPTIONS=\"-H gnu\"
8130 export TAR_OPTIONS
8131 rm -rf *
8132
8133 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
8134 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8135 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8136 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8137 tar tf archive
8138 )"
8139 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
8140 ( $at_check_trace;
8141 mkdir gnu
8142 (cd gnu
8143 TEST_TAR_FORMAT=gnu
8144 export TEST_TAR_FORMAT
8145 TAR_OPTIONS="-H gnu"
8146 export TAR_OPTIONS
8147 rm -rf *
8148
8149 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
8150 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8151 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8152 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
8153 tar tf archive
8154 )
8155 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8156 at_status=$? at_failed=false
8157 $at_check_filter
8158 at_fn_diff_devnull "$at_stderr" || at_failed=:
8159 echo >>"$at_stdout"; $as_echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
8160 This_is_a_very_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
8161 " | \
8162   $at_diff - "$at_stdout" || at_failed=:
8163 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
8164 $at_failed && at_fn_log_failure
8165 $at_traceon; }
8166
8167
8168
8169
8170
8171   set +x
8172   $at_times_p && times >"$at_times_file"
8173 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8174 read at_status <"$at_status_file"
8175 #AT_STOP_34
8176 #AT_START_35
8177 at_fn_group_banner 35 'append02.at:55' \
8178   "append vs. create" "                              " 5
8179 at_xfail=no
8180       test -f $XFAILFILE && at_xfail=yes
8181 (
8182   $as_echo "35. $at_setup_line: testing $at_desc ..."
8183   $at_traceon
8184
8185
8186
8187
8188
8189   { set +x
8190 $as_echo "$at_srcdir/append02.at:58:
8191 mkdir v7
8192 (cd v7
8193 TEST_TAR_FORMAT=v7
8194 export TEST_TAR_FORMAT
8195 TAR_OPTIONS=\"-H v7\"
8196 export TAR_OPTIONS
8197 rm -rf *
8198
8199 genfile --file file1
8200 genfile --file file2
8201
8202 # Make sure file timestamps in the archive will not differ
8203 MTIME=\"--mtime=@0\"
8204
8205 # For PAX archives, we need to make sure extended header names are
8206 # reproducible and that their contents won't change with time
8207 if test \$TEST_TAR_FORMAT = posix; then
8208   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
8209 fi
8210
8211 echo Creating archive.1
8212 tar \$MTIME -cf archive.1 file1 file2
8213
8214 echo Creating archive.2
8215 tar \$MTIME -cf archive.2 -T /dev/null
8216 tar \$MTIME -rf archive.2 file1
8217 tar \$MTIME -rf archive.2 file2
8218
8219 echo Comparing archives
8220 cmp archive.1 archive.2
8221 )"
8222 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
8223 ( $at_check_trace;
8224 mkdir v7
8225 (cd v7
8226 TEST_TAR_FORMAT=v7
8227 export TEST_TAR_FORMAT
8228 TAR_OPTIONS="-H v7"
8229 export TAR_OPTIONS
8230 rm -rf *
8231
8232 genfile --file file1
8233 genfile --file file2
8234
8235 # Make sure file timestamps in the archive will not differ
8236 MTIME="--mtime=@0"
8237
8238 # For PAX archives, we need to make sure extended header names are
8239 # reproducible and that their contents won't change with time
8240 if test $TEST_TAR_FORMAT = posix; then
8241   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
8242 fi
8243
8244 echo Creating archive.1
8245 tar $MTIME -cf archive.1 file1 file2
8246
8247 echo Creating archive.2
8248 tar $MTIME -cf archive.2 -T /dev/null
8249 tar $MTIME -rf archive.2 file1
8250 tar $MTIME -rf archive.2 file2
8251
8252 echo Comparing archives
8253 cmp archive.1 archive.2
8254 )
8255 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8256 at_status=$? at_failed=false
8257 $at_check_filter
8258 at_fn_diff_devnull "$at_stderr" || at_failed=:
8259 echo >>"$at_stdout"; $as_echo "Creating archive.1
8260 Creating archive.2
8261 Comparing archives
8262 " | \
8263   $at_diff - "$at_stdout" || at_failed=:
8264 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
8265 $at_failed && at_fn_log_failure
8266 $at_traceon; }
8267
8268               { set +x
8269 $as_echo "$at_srcdir/append02.at:58:
8270 mkdir oldgnu
8271 (cd oldgnu
8272 TEST_TAR_FORMAT=oldgnu
8273 export TEST_TAR_FORMAT
8274 TAR_OPTIONS=\"-H oldgnu\"
8275 export TAR_OPTIONS
8276 rm -rf *
8277
8278 genfile --file file1
8279 genfile --file file2
8280
8281 # Make sure file timestamps in the archive will not differ
8282 MTIME=\"--mtime=@0\"
8283
8284 # For PAX archives, we need to make sure extended header names are
8285 # reproducible and that their contents won't change with time
8286 if test \$TEST_TAR_FORMAT = posix; then
8287   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
8288 fi
8289
8290 echo Creating archive.1
8291 tar \$MTIME -cf archive.1 file1 file2
8292
8293 echo Creating archive.2
8294 tar \$MTIME -cf archive.2 -T /dev/null
8295 tar \$MTIME -rf archive.2 file1
8296 tar \$MTIME -rf archive.2 file2
8297
8298 echo Comparing archives
8299 cmp archive.1 archive.2
8300 )"
8301 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
8302 ( $at_check_trace;
8303 mkdir oldgnu
8304 (cd oldgnu
8305 TEST_TAR_FORMAT=oldgnu
8306 export TEST_TAR_FORMAT
8307 TAR_OPTIONS="-H oldgnu"
8308 export TAR_OPTIONS
8309 rm -rf *
8310
8311 genfile --file file1
8312 genfile --file file2
8313
8314 # Make sure file timestamps in the archive will not differ
8315 MTIME="--mtime=@0"
8316
8317 # For PAX archives, we need to make sure extended header names are
8318 # reproducible and that their contents won't change with time
8319 if test $TEST_TAR_FORMAT = posix; then
8320   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
8321 fi
8322
8323 echo Creating archive.1
8324 tar $MTIME -cf archive.1 file1 file2
8325
8326 echo Creating archive.2
8327 tar $MTIME -cf archive.2 -T /dev/null
8328 tar $MTIME -rf archive.2 file1
8329 tar $MTIME -rf archive.2 file2
8330
8331 echo Comparing archives
8332 cmp archive.1 archive.2
8333 )
8334 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8335 at_status=$? at_failed=false
8336 $at_check_filter
8337 at_fn_diff_devnull "$at_stderr" || at_failed=:
8338 echo >>"$at_stdout"; $as_echo "Creating archive.1
8339 Creating archive.2
8340 Comparing archives
8341 " | \
8342   $at_diff - "$at_stdout" || at_failed=:
8343 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
8344 $at_failed && at_fn_log_failure
8345 $at_traceon; }
8346
8347               { set +x
8348 $as_echo "$at_srcdir/append02.at:58:
8349 mkdir ustar
8350 (cd ustar
8351 TEST_TAR_FORMAT=ustar
8352 export TEST_TAR_FORMAT
8353 TAR_OPTIONS=\"-H ustar\"
8354 export TAR_OPTIONS
8355 rm -rf *
8356
8357 genfile --file file1
8358 genfile --file file2
8359
8360 # Make sure file timestamps in the archive will not differ
8361 MTIME=\"--mtime=@0\"
8362
8363 # For PAX archives, we need to make sure extended header names are
8364 # reproducible and that their contents won't change with time
8365 if test \$TEST_TAR_FORMAT = posix; then
8366   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
8367 fi
8368
8369 echo Creating archive.1
8370 tar \$MTIME -cf archive.1 file1 file2
8371
8372 echo Creating archive.2
8373 tar \$MTIME -cf archive.2 -T /dev/null
8374 tar \$MTIME -rf archive.2 file1
8375 tar \$MTIME -rf archive.2 file2
8376
8377 echo Comparing archives
8378 cmp archive.1 archive.2
8379 )"
8380 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
8381 ( $at_check_trace;
8382 mkdir ustar
8383 (cd ustar
8384 TEST_TAR_FORMAT=ustar
8385 export TEST_TAR_FORMAT
8386 TAR_OPTIONS="-H ustar"
8387 export TAR_OPTIONS
8388 rm -rf *
8389
8390 genfile --file file1
8391 genfile --file file2
8392
8393 # Make sure file timestamps in the archive will not differ
8394 MTIME="--mtime=@0"
8395
8396 # For PAX archives, we need to make sure extended header names are
8397 # reproducible and that their contents won't change with time
8398 if test $TEST_TAR_FORMAT = posix; then
8399   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
8400 fi
8401
8402 echo Creating archive.1
8403 tar $MTIME -cf archive.1 file1 file2
8404
8405 echo Creating archive.2
8406 tar $MTIME -cf archive.2 -T /dev/null
8407 tar $MTIME -rf archive.2 file1
8408 tar $MTIME -rf archive.2 file2
8409
8410 echo Comparing archives
8411 cmp archive.1 archive.2
8412 )
8413 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8414 at_status=$? at_failed=false
8415 $at_check_filter
8416 at_fn_diff_devnull "$at_stderr" || at_failed=:
8417 echo >>"$at_stdout"; $as_echo "Creating archive.1
8418 Creating archive.2
8419 Comparing archives
8420 " | \
8421   $at_diff - "$at_stdout" || at_failed=:
8422 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
8423 $at_failed && at_fn_log_failure
8424 $at_traceon; }
8425
8426               { set +x
8427 $as_echo "$at_srcdir/append02.at:58:
8428 mkdir posix
8429 (cd posix
8430 TEST_TAR_FORMAT=posix
8431 export TEST_TAR_FORMAT
8432 TAR_OPTIONS=\"-H posix\"
8433 export TAR_OPTIONS
8434 rm -rf *
8435
8436 genfile --file file1
8437 genfile --file file2
8438
8439 # Make sure file timestamps in the archive will not differ
8440 MTIME=\"--mtime=@0\"
8441
8442 # For PAX archives, we need to make sure extended header names are
8443 # reproducible and that their contents won't change with time
8444 if test \$TEST_TAR_FORMAT = posix; then
8445   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
8446 fi
8447
8448 echo Creating archive.1
8449 tar \$MTIME -cf archive.1 file1 file2
8450
8451 echo Creating archive.2
8452 tar \$MTIME -cf archive.2 -T /dev/null
8453 tar \$MTIME -rf archive.2 file1
8454 tar \$MTIME -rf archive.2 file2
8455
8456 echo Comparing archives
8457 cmp archive.1 archive.2
8458 )"
8459 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
8460 ( $at_check_trace;
8461 mkdir posix
8462 (cd posix
8463 TEST_TAR_FORMAT=posix
8464 export TEST_TAR_FORMAT
8465 TAR_OPTIONS="-H posix"
8466 export TAR_OPTIONS
8467 rm -rf *
8468
8469 genfile --file file1
8470 genfile --file file2
8471
8472 # Make sure file timestamps in the archive will not differ
8473 MTIME="--mtime=@0"
8474
8475 # For PAX archives, we need to make sure extended header names are
8476 # reproducible and that their contents won't change with time
8477 if test $TEST_TAR_FORMAT = posix; then
8478   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
8479 fi
8480
8481 echo Creating archive.1
8482 tar $MTIME -cf archive.1 file1 file2
8483
8484 echo Creating archive.2
8485 tar $MTIME -cf archive.2 -T /dev/null
8486 tar $MTIME -rf archive.2 file1
8487 tar $MTIME -rf archive.2 file2
8488
8489 echo Comparing archives
8490 cmp archive.1 archive.2
8491 )
8492 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8493 at_status=$? at_failed=false
8494 $at_check_filter
8495 at_fn_diff_devnull "$at_stderr" || at_failed=:
8496 echo >>"$at_stdout"; $as_echo "Creating archive.1
8497 Creating archive.2
8498 Comparing archives
8499 " | \
8500   $at_diff - "$at_stdout" || at_failed=:
8501 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
8502 $at_failed && at_fn_log_failure
8503 $at_traceon; }
8504
8505               { set +x
8506 $as_echo "$at_srcdir/append02.at:58:
8507 mkdir gnu
8508 (cd gnu
8509 TEST_TAR_FORMAT=gnu
8510 export TEST_TAR_FORMAT
8511 TAR_OPTIONS=\"-H gnu\"
8512 export TAR_OPTIONS
8513 rm -rf *
8514
8515 genfile --file file1
8516 genfile --file file2
8517
8518 # Make sure file timestamps in the archive will not differ
8519 MTIME=\"--mtime=@0\"
8520
8521 # For PAX archives, we need to make sure extended header names are
8522 # reproducible and that their contents won't change with time
8523 if test \$TEST_TAR_FORMAT = posix; then
8524   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
8525 fi
8526
8527 echo Creating archive.1
8528 tar \$MTIME -cf archive.1 file1 file2
8529
8530 echo Creating archive.2
8531 tar \$MTIME -cf archive.2 -T /dev/null
8532 tar \$MTIME -rf archive.2 file1
8533 tar \$MTIME -rf archive.2 file2
8534
8535 echo Comparing archives
8536 cmp archive.1 archive.2
8537 )"
8538 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:58"
8539 ( $at_check_trace;
8540 mkdir gnu
8541 (cd gnu
8542 TEST_TAR_FORMAT=gnu
8543 export TEST_TAR_FORMAT
8544 TAR_OPTIONS="-H gnu"
8545 export TAR_OPTIONS
8546 rm -rf *
8547
8548 genfile --file file1
8549 genfile --file file2
8550
8551 # Make sure file timestamps in the archive will not differ
8552 MTIME="--mtime=@0"
8553
8554 # For PAX archives, we need to make sure extended header names are
8555 # reproducible and that their contents won't change with time
8556 if test $TEST_TAR_FORMAT = posix; then
8557   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
8558 fi
8559
8560 echo Creating archive.1
8561 tar $MTIME -cf archive.1 file1 file2
8562
8563 echo Creating archive.2
8564 tar $MTIME -cf archive.2 -T /dev/null
8565 tar $MTIME -rf archive.2 file1
8566 tar $MTIME -rf archive.2 file2
8567
8568 echo Comparing archives
8569 cmp archive.1 archive.2
8570 )
8571 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8572 at_status=$? at_failed=false
8573 $at_check_filter
8574 at_fn_diff_devnull "$at_stderr" || at_failed=:
8575 echo >>"$at_stdout"; $as_echo "Creating archive.1
8576 Creating archive.2
8577 Comparing archives
8578 " | \
8579   $at_diff - "$at_stdout" || at_failed=:
8580 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:58"
8581 $at_failed && at_fn_log_failure
8582 $at_traceon; }
8583
8584
8585
8586
8587   set +x
8588   $at_times_p && times >"$at_times_file"
8589 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8590 read at_status <"$at_status_file"
8591 #AT_STOP_35
8592 #AT_START_36
8593 at_fn_group_banner 36 'append03.at:21' \
8594   "append with name transformation" "                " 5
8595 at_xfail=no
8596       test -f $XFAILFILE && at_xfail=yes
8597 (
8598   $as_echo "36. $at_setup_line: testing $at_desc ..."
8599   $at_traceon
8600
8601
8602
8603 # Description: Make sure filenames are transformed during append.
8604
8605
8606
8607   { set +x
8608 $as_echo "$at_srcdir/append03.at:26:
8609 mkdir v7
8610 (cd v7
8611 TEST_TAR_FORMAT=v7
8612 export TEST_TAR_FORMAT
8613 TAR_OPTIONS=\"-H v7\"
8614 export TAR_OPTIONS
8615 rm -rf *
8616
8617 genfile --file file.1
8618 genfile --file file.2
8619
8620 tar -c -f archive --transform 's/file/plik/' file.*
8621 echo Appending
8622 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8623 echo Testing
8624 tar tf archive
8625 )"
8626 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
8627 ( $at_check_trace;
8628 mkdir v7
8629 (cd v7
8630 TEST_TAR_FORMAT=v7
8631 export TEST_TAR_FORMAT
8632 TAR_OPTIONS="-H v7"
8633 export TAR_OPTIONS
8634 rm -rf *
8635
8636 genfile --file file.1
8637 genfile --file file.2
8638
8639 tar -c -f archive --transform 's/file/plik/' file.*
8640 echo Appending
8641 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8642 echo Testing
8643 tar tf archive
8644 )
8645 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8646 at_status=$? at_failed=false
8647 $at_check_filter
8648 at_fn_diff_devnull "$at_stderr" || at_failed=:
8649 echo >>"$at_stdout"; $as_echo "Appending
8650 plik.1
8651 Testing
8652 plik.1
8653 plik.2
8654 plik.1
8655 " | \
8656   $at_diff - "$at_stdout" || at_failed=:
8657 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
8658 $at_failed && at_fn_log_failure
8659 $at_traceon; }
8660
8661               { set +x
8662 $as_echo "$at_srcdir/append03.at:26:
8663 mkdir oldgnu
8664 (cd oldgnu
8665 TEST_TAR_FORMAT=oldgnu
8666 export TEST_TAR_FORMAT
8667 TAR_OPTIONS=\"-H oldgnu\"
8668 export TAR_OPTIONS
8669 rm -rf *
8670
8671 genfile --file file.1
8672 genfile --file file.2
8673
8674 tar -c -f archive --transform 's/file/plik/' file.*
8675 echo Appending
8676 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8677 echo Testing
8678 tar tf archive
8679 )"
8680 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
8681 ( $at_check_trace;
8682 mkdir oldgnu
8683 (cd oldgnu
8684 TEST_TAR_FORMAT=oldgnu
8685 export TEST_TAR_FORMAT
8686 TAR_OPTIONS="-H oldgnu"
8687 export TAR_OPTIONS
8688 rm -rf *
8689
8690 genfile --file file.1
8691 genfile --file file.2
8692
8693 tar -c -f archive --transform 's/file/plik/' file.*
8694 echo Appending
8695 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8696 echo Testing
8697 tar tf archive
8698 )
8699 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8700 at_status=$? at_failed=false
8701 $at_check_filter
8702 at_fn_diff_devnull "$at_stderr" || at_failed=:
8703 echo >>"$at_stdout"; $as_echo "Appending
8704 plik.1
8705 Testing
8706 plik.1
8707 plik.2
8708 plik.1
8709 " | \
8710   $at_diff - "$at_stdout" || at_failed=:
8711 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
8712 $at_failed && at_fn_log_failure
8713 $at_traceon; }
8714
8715               { set +x
8716 $as_echo "$at_srcdir/append03.at:26:
8717 mkdir ustar
8718 (cd ustar
8719 TEST_TAR_FORMAT=ustar
8720 export TEST_TAR_FORMAT
8721 TAR_OPTIONS=\"-H ustar\"
8722 export TAR_OPTIONS
8723 rm -rf *
8724
8725 genfile --file file.1
8726 genfile --file file.2
8727
8728 tar -c -f archive --transform 's/file/plik/' file.*
8729 echo Appending
8730 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8731 echo Testing
8732 tar tf archive
8733 )"
8734 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
8735 ( $at_check_trace;
8736 mkdir ustar
8737 (cd ustar
8738 TEST_TAR_FORMAT=ustar
8739 export TEST_TAR_FORMAT
8740 TAR_OPTIONS="-H ustar"
8741 export TAR_OPTIONS
8742 rm -rf *
8743
8744 genfile --file file.1
8745 genfile --file file.2
8746
8747 tar -c -f archive --transform 's/file/plik/' file.*
8748 echo Appending
8749 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8750 echo Testing
8751 tar tf archive
8752 )
8753 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8754 at_status=$? at_failed=false
8755 $at_check_filter
8756 at_fn_diff_devnull "$at_stderr" || at_failed=:
8757 echo >>"$at_stdout"; $as_echo "Appending
8758 plik.1
8759 Testing
8760 plik.1
8761 plik.2
8762 plik.1
8763 " | \
8764   $at_diff - "$at_stdout" || at_failed=:
8765 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
8766 $at_failed && at_fn_log_failure
8767 $at_traceon; }
8768
8769               { set +x
8770 $as_echo "$at_srcdir/append03.at:26:
8771 mkdir posix
8772 (cd posix
8773 TEST_TAR_FORMAT=posix
8774 export TEST_TAR_FORMAT
8775 TAR_OPTIONS=\"-H posix\"
8776 export TAR_OPTIONS
8777 rm -rf *
8778
8779 genfile --file file.1
8780 genfile --file file.2
8781
8782 tar -c -f archive --transform 's/file/plik/' file.*
8783 echo Appending
8784 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8785 echo Testing
8786 tar tf archive
8787 )"
8788 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
8789 ( $at_check_trace;
8790 mkdir posix
8791 (cd posix
8792 TEST_TAR_FORMAT=posix
8793 export TEST_TAR_FORMAT
8794 TAR_OPTIONS="-H posix"
8795 export TAR_OPTIONS
8796 rm -rf *
8797
8798 genfile --file file.1
8799 genfile --file file.2
8800
8801 tar -c -f archive --transform 's/file/plik/' file.*
8802 echo Appending
8803 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8804 echo Testing
8805 tar tf archive
8806 )
8807 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8808 at_status=$? at_failed=false
8809 $at_check_filter
8810 at_fn_diff_devnull "$at_stderr" || at_failed=:
8811 echo >>"$at_stdout"; $as_echo "Appending
8812 plik.1
8813 Testing
8814 plik.1
8815 plik.2
8816 plik.1
8817 " | \
8818   $at_diff - "$at_stdout" || at_failed=:
8819 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
8820 $at_failed && at_fn_log_failure
8821 $at_traceon; }
8822
8823               { set +x
8824 $as_echo "$at_srcdir/append03.at:26:
8825 mkdir gnu
8826 (cd gnu
8827 TEST_TAR_FORMAT=gnu
8828 export TEST_TAR_FORMAT
8829 TAR_OPTIONS=\"-H gnu\"
8830 export TAR_OPTIONS
8831 rm -rf *
8832
8833 genfile --file file.1
8834 genfile --file file.2
8835
8836 tar -c -f archive --transform 's/file/plik/' file.*
8837 echo Appending
8838 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8839 echo Testing
8840 tar tf archive
8841 )"
8842 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
8843 ( $at_check_trace;
8844 mkdir gnu
8845 (cd gnu
8846 TEST_TAR_FORMAT=gnu
8847 export TEST_TAR_FORMAT
8848 TAR_OPTIONS="-H gnu"
8849 export TAR_OPTIONS
8850 rm -rf *
8851
8852 genfile --file file.1
8853 genfile --file file.2
8854
8855 tar -c -f archive --transform 's/file/plik/' file.*
8856 echo Appending
8857 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
8858 echo Testing
8859 tar tf archive
8860 )
8861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8862 at_status=$? at_failed=false
8863 $at_check_filter
8864 at_fn_diff_devnull "$at_stderr" || at_failed=:
8865 echo >>"$at_stdout"; $as_echo "Appending
8866 plik.1
8867 Testing
8868 plik.1
8869 plik.2
8870 plik.1
8871 " | \
8872   $at_diff - "$at_stdout" || at_failed=:
8873 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
8874 $at_failed && at_fn_log_failure
8875 $at_traceon; }
8876
8877
8878
8879
8880   set +x
8881   $at_times_p && times >"$at_times_file"
8882 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8883 read at_status <"$at_status_file"
8884 #AT_STOP_36
8885 #AT_START_37
8886 at_fn_group_banner 37 'append04.at:29' \
8887   "append with verify" "                             " 5
8888 at_xfail=no
8889       test -f $XFAILFILE && at_xfail=yes
8890 (
8891   $as_echo "37. $at_setup_line: testing $at_desc ..."
8892   $at_traceon
8893
8894
8895
8896
8897
8898   { set +x
8899 $as_echo "$at_srcdir/append04.at:32:
8900 mkdir v7
8901 (cd v7
8902 TEST_TAR_FORMAT=v7
8903 export TEST_TAR_FORMAT
8904 TAR_OPTIONS=\"-H v7\"
8905 export TAR_OPTIONS
8906 rm -rf *
8907
8908 # Create two empty files:
8909 touch file1 file2
8910
8911 # Create an archive:
8912 tar cpfW archive.tar file1 file2
8913
8914 # Verify created archive by listing its content:
8915 tar -tf archive.tar
8916 echo ==
8917 # Create another empty file:
8918 touch file3
8919
8920 # Append it to the already created archive:
8921 tar rpfW archive.tar file3
8922
8923 # Verify content of the new archive:
8924 tar -tf archive.tar
8925 )"
8926 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
8927 ( $at_check_trace;
8928 mkdir v7
8929 (cd v7
8930 TEST_TAR_FORMAT=v7
8931 export TEST_TAR_FORMAT
8932 TAR_OPTIONS="-H v7"
8933 export TAR_OPTIONS
8934 rm -rf *
8935
8936 # Create two empty files:
8937 touch file1 file2
8938
8939 # Create an archive:
8940 tar cpfW archive.tar file1 file2
8941
8942 # Verify created archive by listing its content:
8943 tar -tf archive.tar
8944 echo ==
8945 # Create another empty file:
8946 touch file3
8947
8948 # Append it to the already created archive:
8949 tar rpfW archive.tar file3
8950
8951 # Verify content of the new archive:
8952 tar -tf archive.tar
8953 )
8954 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8955 at_status=$? at_failed=false
8956 $at_check_filter
8957 at_fn_diff_devnull "$at_stderr" || at_failed=:
8958 echo >>"$at_stdout"; $as_echo "file1
8959 file2
8960 ==
8961 file1
8962 file2
8963 file3
8964 " | \
8965   $at_diff - "$at_stdout" || at_failed=:
8966 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
8967 $at_failed && at_fn_log_failure
8968 $at_traceon; }
8969
8970               { set +x
8971 $as_echo "$at_srcdir/append04.at:32:
8972 mkdir oldgnu
8973 (cd oldgnu
8974 TEST_TAR_FORMAT=oldgnu
8975 export TEST_TAR_FORMAT
8976 TAR_OPTIONS=\"-H oldgnu\"
8977 export TAR_OPTIONS
8978 rm -rf *
8979
8980 # Create two empty files:
8981 touch file1 file2
8982
8983 # Create an archive:
8984 tar cpfW archive.tar file1 file2
8985
8986 # Verify created archive by listing its content:
8987 tar -tf archive.tar
8988 echo ==
8989 # Create another empty file:
8990 touch file3
8991
8992 # Append it to the already created archive:
8993 tar rpfW archive.tar file3
8994
8995 # Verify content of the new archive:
8996 tar -tf archive.tar
8997 )"
8998 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
8999 ( $at_check_trace;
9000 mkdir oldgnu
9001 (cd oldgnu
9002 TEST_TAR_FORMAT=oldgnu
9003 export TEST_TAR_FORMAT
9004 TAR_OPTIONS="-H oldgnu"
9005 export TAR_OPTIONS
9006 rm -rf *
9007
9008 # Create two empty files:
9009 touch file1 file2
9010
9011 # Create an archive:
9012 tar cpfW archive.tar file1 file2
9013
9014 # Verify created archive by listing its content:
9015 tar -tf archive.tar
9016 echo ==
9017 # Create another empty file:
9018 touch file3
9019
9020 # Append it to the already created archive:
9021 tar rpfW archive.tar file3
9022
9023 # Verify content of the new archive:
9024 tar -tf archive.tar
9025 )
9026 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9027 at_status=$? at_failed=false
9028 $at_check_filter
9029 at_fn_diff_devnull "$at_stderr" || at_failed=:
9030 echo >>"$at_stdout"; $as_echo "file1
9031 file2
9032 ==
9033 file1
9034 file2
9035 file3
9036 " | \
9037   $at_diff - "$at_stdout" || at_failed=:
9038 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
9039 $at_failed && at_fn_log_failure
9040 $at_traceon; }
9041
9042               { set +x
9043 $as_echo "$at_srcdir/append04.at:32:
9044 mkdir ustar
9045 (cd ustar
9046 TEST_TAR_FORMAT=ustar
9047 export TEST_TAR_FORMAT
9048 TAR_OPTIONS=\"-H ustar\"
9049 export TAR_OPTIONS
9050 rm -rf *
9051
9052 # Create two empty files:
9053 touch file1 file2
9054
9055 # Create an archive:
9056 tar cpfW archive.tar file1 file2
9057
9058 # Verify created archive by listing its content:
9059 tar -tf archive.tar
9060 echo ==
9061 # Create another empty file:
9062 touch file3
9063
9064 # Append it to the already created archive:
9065 tar rpfW archive.tar file3
9066
9067 # Verify content of the new archive:
9068 tar -tf archive.tar
9069 )"
9070 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
9071 ( $at_check_trace;
9072 mkdir ustar
9073 (cd ustar
9074 TEST_TAR_FORMAT=ustar
9075 export TEST_TAR_FORMAT
9076 TAR_OPTIONS="-H ustar"
9077 export TAR_OPTIONS
9078 rm -rf *
9079
9080 # Create two empty files:
9081 touch file1 file2
9082
9083 # Create an archive:
9084 tar cpfW archive.tar file1 file2
9085
9086 # Verify created archive by listing its content:
9087 tar -tf archive.tar
9088 echo ==
9089 # Create another empty file:
9090 touch file3
9091
9092 # Append it to the already created archive:
9093 tar rpfW archive.tar file3
9094
9095 # Verify content of the new archive:
9096 tar -tf archive.tar
9097 )
9098 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9099 at_status=$? at_failed=false
9100 $at_check_filter
9101 at_fn_diff_devnull "$at_stderr" || at_failed=:
9102 echo >>"$at_stdout"; $as_echo "file1
9103 file2
9104 ==
9105 file1
9106 file2
9107 file3
9108 " | \
9109   $at_diff - "$at_stdout" || at_failed=:
9110 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
9111 $at_failed && at_fn_log_failure
9112 $at_traceon; }
9113
9114               { set +x
9115 $as_echo "$at_srcdir/append04.at:32:
9116 mkdir posix
9117 (cd posix
9118 TEST_TAR_FORMAT=posix
9119 export TEST_TAR_FORMAT
9120 TAR_OPTIONS=\"-H posix\"
9121 export TAR_OPTIONS
9122 rm -rf *
9123
9124 # Create two empty files:
9125 touch file1 file2
9126
9127 # Create an archive:
9128 tar cpfW archive.tar file1 file2
9129
9130 # Verify created archive by listing its content:
9131 tar -tf archive.tar
9132 echo ==
9133 # Create another empty file:
9134 touch file3
9135
9136 # Append it to the already created archive:
9137 tar rpfW archive.tar file3
9138
9139 # Verify content of the new archive:
9140 tar -tf archive.tar
9141 )"
9142 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
9143 ( $at_check_trace;
9144 mkdir posix
9145 (cd posix
9146 TEST_TAR_FORMAT=posix
9147 export TEST_TAR_FORMAT
9148 TAR_OPTIONS="-H posix"
9149 export TAR_OPTIONS
9150 rm -rf *
9151
9152 # Create two empty files:
9153 touch file1 file2
9154
9155 # Create an archive:
9156 tar cpfW archive.tar file1 file2
9157
9158 # Verify created archive by listing its content:
9159 tar -tf archive.tar
9160 echo ==
9161 # Create another empty file:
9162 touch file3
9163
9164 # Append it to the already created archive:
9165 tar rpfW archive.tar file3
9166
9167 # Verify content of the new archive:
9168 tar -tf archive.tar
9169 )
9170 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9171 at_status=$? at_failed=false
9172 $at_check_filter
9173 at_fn_diff_devnull "$at_stderr" || at_failed=:
9174 echo >>"$at_stdout"; $as_echo "file1
9175 file2
9176 ==
9177 file1
9178 file2
9179 file3
9180 " | \
9181   $at_diff - "$at_stdout" || at_failed=:
9182 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
9183 $at_failed && at_fn_log_failure
9184 $at_traceon; }
9185
9186               { set +x
9187 $as_echo "$at_srcdir/append04.at:32:
9188 mkdir gnu
9189 (cd gnu
9190 TEST_TAR_FORMAT=gnu
9191 export TEST_TAR_FORMAT
9192 TAR_OPTIONS=\"-H gnu\"
9193 export TAR_OPTIONS
9194 rm -rf *
9195
9196 # Create two empty files:
9197 touch file1 file2
9198
9199 # Create an archive:
9200 tar cpfW archive.tar file1 file2
9201
9202 # Verify created archive by listing its content:
9203 tar -tf archive.tar
9204 echo ==
9205 # Create another empty file:
9206 touch file3
9207
9208 # Append it to the already created archive:
9209 tar rpfW archive.tar file3
9210
9211 # Verify content of the new archive:
9212 tar -tf archive.tar
9213 )"
9214 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
9215 ( $at_check_trace;
9216 mkdir gnu
9217 (cd gnu
9218 TEST_TAR_FORMAT=gnu
9219 export TEST_TAR_FORMAT
9220 TAR_OPTIONS="-H gnu"
9221 export TAR_OPTIONS
9222 rm -rf *
9223
9224 # Create two empty files:
9225 touch file1 file2
9226
9227 # Create an archive:
9228 tar cpfW archive.tar file1 file2
9229
9230 # Verify created archive by listing its content:
9231 tar -tf archive.tar
9232 echo ==
9233 # Create another empty file:
9234 touch file3
9235
9236 # Append it to the already created archive:
9237 tar rpfW archive.tar file3
9238
9239 # Verify content of the new archive:
9240 tar -tf archive.tar
9241 )
9242 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9243 at_status=$? at_failed=false
9244 $at_check_filter
9245 at_fn_diff_devnull "$at_stderr" || at_failed=:
9246 echo >>"$at_stdout"; $as_echo "file1
9247 file2
9248 ==
9249 file1
9250 file2
9251 file3
9252 " | \
9253   $at_diff - "$at_stdout" || at_failed=:
9254 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
9255 $at_failed && at_fn_log_failure
9256 $at_traceon; }
9257
9258
9259
9260
9261   set +x
9262   $at_times_p && times >"$at_times_file"
9263 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9264 read at_status <"$at_status_file"
9265 #AT_STOP_37
9266 #AT_START_38
9267 at_fn_group_banner 38 'append05.at:32' \
9268   "append after changed blocking" "                  " 5
9269 at_xfail=no
9270       test -f $XFAILFILE && at_xfail=yes
9271 (
9272   $as_echo "38. $at_setup_line: testing $at_desc ..."
9273   $at_traceon
9274
9275
9276
9277
9278
9279   { set +x
9280 $as_echo "$at_srcdir/append05.at:35:
9281 mkdir v7
9282 (cd v7
9283 TEST_TAR_FORMAT=v7
9284 export TEST_TAR_FORMAT
9285 TAR_OPTIONS=\"-H v7\"
9286 export TAR_OPTIONS
9287 rm -rf *
9288
9289 for f in a b c d e f g h i
9290 do
9291   echo \$f > \$f
9292 done
9293
9294 decho 'creating archive'
9295 tar -cf archive -b1 a b c
9296
9297 tar tf archive
9298
9299 decho 'adding d e f'
9300 tar -vrf archive -b3 d e f
9301 echo ==
9302 tar tf archive
9303
9304 decho 'adding g h i'
9305 tar -vrf archive -b5 g h i
9306
9307 decho 'resulting archive'
9308 tar tf archive
9309 )"
9310 at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
9311 ( $at_check_trace;
9312 mkdir v7
9313 (cd v7
9314 TEST_TAR_FORMAT=v7
9315 export TEST_TAR_FORMAT
9316 TAR_OPTIONS="-H v7"
9317 export TAR_OPTIONS
9318 rm -rf *
9319
9320 for f in a b c d e f g h i
9321 do
9322   echo $f > $f
9323 done
9324
9325 decho 'creating archive'
9326 tar -cf archive -b1 a b c
9327
9328 tar tf archive
9329
9330 decho 'adding d e f'
9331 tar -vrf archive -b3 d e f
9332 echo ==
9333 tar tf archive
9334
9335 decho 'adding g h i'
9336 tar -vrf archive -b5 g h i
9337
9338 decho 'resulting archive'
9339 tar tf archive
9340 )
9341 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9342 at_status=$? at_failed=false
9343 $at_check_filter
9344 echo >>"$at_stderr"; $as_echo "creating archive
9345 adding d e f
9346 adding g h i
9347 resulting archive
9348 " | \
9349   $at_diff - "$at_stderr" || at_failed=:
9350 echo >>"$at_stdout"; $as_echo "creating archive
9351 a
9352 b
9353 c
9354 adding d e f
9355 d
9356 e
9357 f
9358 ==
9359 a
9360 b
9361 c
9362 d
9363 e
9364 f
9365 adding g h i
9366 g
9367 h
9368 i
9369 resulting archive
9370 a
9371 b
9372 c
9373 d
9374 e
9375 f
9376 g
9377 h
9378 i
9379 " | \
9380   $at_diff - "$at_stdout" || at_failed=:
9381 at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
9382 $at_failed && at_fn_log_failure
9383 $at_traceon; }
9384
9385               { set +x
9386 $as_echo "$at_srcdir/append05.at:35:
9387 mkdir oldgnu
9388 (cd oldgnu
9389 TEST_TAR_FORMAT=oldgnu
9390 export TEST_TAR_FORMAT
9391 TAR_OPTIONS=\"-H oldgnu\"
9392 export TAR_OPTIONS
9393 rm -rf *
9394
9395 for f in a b c d e f g h i
9396 do
9397   echo \$f > \$f
9398 done
9399
9400 decho 'creating archive'
9401 tar -cf archive -b1 a b c
9402
9403 tar tf archive
9404
9405 decho 'adding d e f'
9406 tar -vrf archive -b3 d e f
9407 echo ==
9408 tar tf archive
9409
9410 decho 'adding g h i'
9411 tar -vrf archive -b5 g h i
9412
9413 decho 'resulting archive'
9414 tar tf archive
9415 )"
9416 at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
9417 ( $at_check_trace;
9418 mkdir oldgnu
9419 (cd oldgnu
9420 TEST_TAR_FORMAT=oldgnu
9421 export TEST_TAR_FORMAT
9422 TAR_OPTIONS="-H oldgnu"
9423 export TAR_OPTIONS
9424 rm -rf *
9425
9426 for f in a b c d e f g h i
9427 do
9428   echo $f > $f
9429 done
9430
9431 decho 'creating archive'
9432 tar -cf archive -b1 a b c
9433
9434 tar tf archive
9435
9436 decho 'adding d e f'
9437 tar -vrf archive -b3 d e f
9438 echo ==
9439 tar tf archive
9440
9441 decho 'adding g h i'
9442 tar -vrf archive -b5 g h i
9443
9444 decho 'resulting archive'
9445 tar tf archive
9446 )
9447 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9448 at_status=$? at_failed=false
9449 $at_check_filter
9450 echo >>"$at_stderr"; $as_echo "creating archive
9451 adding d e f
9452 adding g h i
9453 resulting archive
9454 " | \
9455   $at_diff - "$at_stderr" || at_failed=:
9456 echo >>"$at_stdout"; $as_echo "creating archive
9457 a
9458 b
9459 c
9460 adding d e f
9461 d
9462 e
9463 f
9464 ==
9465 a
9466 b
9467 c
9468 d
9469 e
9470 f
9471 adding g h i
9472 g
9473 h
9474 i
9475 resulting archive
9476 a
9477 b
9478 c
9479 d
9480 e
9481 f
9482 g
9483 h
9484 i
9485 " | \
9486   $at_diff - "$at_stdout" || at_failed=:
9487 at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
9488 $at_failed && at_fn_log_failure
9489 $at_traceon; }
9490
9491               { set +x
9492 $as_echo "$at_srcdir/append05.at:35:
9493 mkdir ustar
9494 (cd ustar
9495 TEST_TAR_FORMAT=ustar
9496 export TEST_TAR_FORMAT
9497 TAR_OPTIONS=\"-H ustar\"
9498 export TAR_OPTIONS
9499 rm -rf *
9500
9501 for f in a b c d e f g h i
9502 do
9503   echo \$f > \$f
9504 done
9505
9506 decho 'creating archive'
9507 tar -cf archive -b1 a b c
9508
9509 tar tf archive
9510
9511 decho 'adding d e f'
9512 tar -vrf archive -b3 d e f
9513 echo ==
9514 tar tf archive
9515
9516 decho 'adding g h i'
9517 tar -vrf archive -b5 g h i
9518
9519 decho 'resulting archive'
9520 tar tf archive
9521 )"
9522 at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
9523 ( $at_check_trace;
9524 mkdir ustar
9525 (cd ustar
9526 TEST_TAR_FORMAT=ustar
9527 export TEST_TAR_FORMAT
9528 TAR_OPTIONS="-H ustar"
9529 export TAR_OPTIONS
9530 rm -rf *
9531
9532 for f in a b c d e f g h i
9533 do
9534   echo $f > $f
9535 done
9536
9537 decho 'creating archive'
9538 tar -cf archive -b1 a b c
9539
9540 tar tf archive
9541
9542 decho 'adding d e f'
9543 tar -vrf archive -b3 d e f
9544 echo ==
9545 tar tf archive
9546
9547 decho 'adding g h i'
9548 tar -vrf archive -b5 g h i
9549
9550 decho 'resulting archive'
9551 tar tf archive
9552 )
9553 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9554 at_status=$? at_failed=false
9555 $at_check_filter
9556 echo >>"$at_stderr"; $as_echo "creating archive
9557 adding d e f
9558 adding g h i
9559 resulting archive
9560 " | \
9561   $at_diff - "$at_stderr" || at_failed=:
9562 echo >>"$at_stdout"; $as_echo "creating archive
9563 a
9564 b
9565 c
9566 adding d e f
9567 d
9568 e
9569 f
9570 ==
9571 a
9572 b
9573 c
9574 d
9575 e
9576 f
9577 adding g h i
9578 g
9579 h
9580 i
9581 resulting archive
9582 a
9583 b
9584 c
9585 d
9586 e
9587 f
9588 g
9589 h
9590 i
9591 " | \
9592   $at_diff - "$at_stdout" || at_failed=:
9593 at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
9594 $at_failed && at_fn_log_failure
9595 $at_traceon; }
9596
9597               { set +x
9598 $as_echo "$at_srcdir/append05.at:35:
9599 mkdir posix
9600 (cd posix
9601 TEST_TAR_FORMAT=posix
9602 export TEST_TAR_FORMAT
9603 TAR_OPTIONS=\"-H posix\"
9604 export TAR_OPTIONS
9605 rm -rf *
9606
9607 for f in a b c d e f g h i
9608 do
9609   echo \$f > \$f
9610 done
9611
9612 decho 'creating archive'
9613 tar -cf archive -b1 a b c
9614
9615 tar tf archive
9616
9617 decho 'adding d e f'
9618 tar -vrf archive -b3 d e f
9619 echo ==
9620 tar tf archive
9621
9622 decho 'adding g h i'
9623 tar -vrf archive -b5 g h i
9624
9625 decho 'resulting archive'
9626 tar tf archive
9627 )"
9628 at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
9629 ( $at_check_trace;
9630 mkdir posix
9631 (cd posix
9632 TEST_TAR_FORMAT=posix
9633 export TEST_TAR_FORMAT
9634 TAR_OPTIONS="-H posix"
9635 export TAR_OPTIONS
9636 rm -rf *
9637
9638 for f in a b c d e f g h i
9639 do
9640   echo $f > $f
9641 done
9642
9643 decho 'creating archive'
9644 tar -cf archive -b1 a b c
9645
9646 tar tf archive
9647
9648 decho 'adding d e f'
9649 tar -vrf archive -b3 d e f
9650 echo ==
9651 tar tf archive
9652
9653 decho 'adding g h i'
9654 tar -vrf archive -b5 g h i
9655
9656 decho 'resulting archive'
9657 tar tf archive
9658 )
9659 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9660 at_status=$? at_failed=false
9661 $at_check_filter
9662 echo >>"$at_stderr"; $as_echo "creating archive
9663 adding d e f
9664 adding g h i
9665 resulting archive
9666 " | \
9667   $at_diff - "$at_stderr" || at_failed=:
9668 echo >>"$at_stdout"; $as_echo "creating archive
9669 a
9670 b
9671 c
9672 adding d e f
9673 d
9674 e
9675 f
9676 ==
9677 a
9678 b
9679 c
9680 d
9681 e
9682 f
9683 adding g h i
9684 g
9685 h
9686 i
9687 resulting archive
9688 a
9689 b
9690 c
9691 d
9692 e
9693 f
9694 g
9695 h
9696 i
9697 " | \
9698   $at_diff - "$at_stdout" || at_failed=:
9699 at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
9700 $at_failed && at_fn_log_failure
9701 $at_traceon; }
9702
9703               { set +x
9704 $as_echo "$at_srcdir/append05.at:35:
9705 mkdir gnu
9706 (cd gnu
9707 TEST_TAR_FORMAT=gnu
9708 export TEST_TAR_FORMAT
9709 TAR_OPTIONS=\"-H gnu\"
9710 export TAR_OPTIONS
9711 rm -rf *
9712
9713 for f in a b c d e f g h i
9714 do
9715   echo \$f > \$f
9716 done
9717
9718 decho 'creating archive'
9719 tar -cf archive -b1 a b c
9720
9721 tar tf archive
9722
9723 decho 'adding d e f'
9724 tar -vrf archive -b3 d e f
9725 echo ==
9726 tar tf archive
9727
9728 decho 'adding g h i'
9729 tar -vrf archive -b5 g h i
9730
9731 decho 'resulting archive'
9732 tar tf archive
9733 )"
9734 at_fn_check_prepare_notrace 'an embedded newline' "append05.at:35"
9735 ( $at_check_trace;
9736 mkdir gnu
9737 (cd gnu
9738 TEST_TAR_FORMAT=gnu
9739 export TEST_TAR_FORMAT
9740 TAR_OPTIONS="-H gnu"
9741 export TAR_OPTIONS
9742 rm -rf *
9743
9744 for f in a b c d e f g h i
9745 do
9746   echo $f > $f
9747 done
9748
9749 decho 'creating archive'
9750 tar -cf archive -b1 a b c
9751
9752 tar tf archive
9753
9754 decho 'adding d e f'
9755 tar -vrf archive -b3 d e f
9756 echo ==
9757 tar tf archive
9758
9759 decho 'adding g h i'
9760 tar -vrf archive -b5 g h i
9761
9762 decho 'resulting archive'
9763 tar tf archive
9764 )
9765 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9766 at_status=$? at_failed=false
9767 $at_check_filter
9768 echo >>"$at_stderr"; $as_echo "creating archive
9769 adding d e f
9770 adding g h i
9771 resulting archive
9772 " | \
9773   $at_diff - "$at_stderr" || at_failed=:
9774 echo >>"$at_stdout"; $as_echo "creating archive
9775 a
9776 b
9777 c
9778 adding d e f
9779 d
9780 e
9781 f
9782 ==
9783 a
9784 b
9785 c
9786 d
9787 e
9788 f
9789 adding g h i
9790 g
9791 h
9792 i
9793 resulting archive
9794 a
9795 b
9796 c
9797 d
9798 e
9799 f
9800 g
9801 h
9802 i
9803 " | \
9804   $at_diff - "$at_stdout" || at_failed=:
9805 at_fn_check_status 0 $at_status "$at_srcdir/append05.at:35"
9806 $at_failed && at_fn_log_failure
9807 $at_traceon; }
9808
9809
9810
9811
9812   set +x
9813   $at_times_p && times >"$at_times_file"
9814 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9815 read at_status <"$at_status_file"
9816 #AT_STOP_38
9817 #AT_START_39
9818 at_fn_group_banner 39 'xform-h.at:30' \
9819   "transforming hard links on create" "              " 6
9820 at_xfail=no
9821       test -f $XFAILFILE && at_xfail=yes
9822 (
9823   $as_echo "39. $at_setup_line: testing $at_desc ..."
9824   $at_traceon
9825
9826
9827
9828
9829
9830
9831
9832   { set +x
9833 $as_echo "$at_srcdir/xform-h.at:39:
9834 mkdir v7
9835 (cd v7
9836 TEST_TAR_FORMAT=v7
9837 export TEST_TAR_FORMAT
9838 TAR_OPTIONS=\"-H v7\"
9839 export TAR_OPTIONS
9840 rm -rf *
9841
9842 mkdir basedir
9843 echo \"hello\" > basedir/test
9844 ln basedir/test basedir/test_link
9845
9846
9847 echo \"Default transform scope\"
9848 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
9849 tar tvf archive | sed -n 's/.*test_link link to //p'
9850
9851
9852 echo \"Transforming hard links\"
9853 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
9854 tar tvf archive | sed -n 's/.*test_link link to //p'
9855
9856
9857 echo \"Not transforming hard links\"
9858 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
9859 tar tvf archive | sed -n 's/.*test_link link to //p'
9860
9861 )"
9862 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
9863 ( $at_check_trace;
9864 mkdir v7
9865 (cd v7
9866 TEST_TAR_FORMAT=v7
9867 export TEST_TAR_FORMAT
9868 TAR_OPTIONS="-H v7"
9869 export TAR_OPTIONS
9870 rm -rf *
9871
9872 mkdir basedir
9873 echo "hello" > basedir/test
9874 ln basedir/test basedir/test_link
9875
9876
9877 echo "Default transform scope"
9878 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
9879 tar tvf archive | sed -n 's/.*test_link link to //p'
9880
9881
9882 echo "Transforming hard links"
9883 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
9884 tar tvf archive | sed -n 's/.*test_link link to //p'
9885
9886
9887 echo "Not transforming hard links"
9888 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
9889 tar tvf archive | sed -n 's/.*test_link link to //p'
9890
9891 )
9892 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9893 at_status=$? at_failed=false
9894 $at_check_filter
9895 at_fn_diff_devnull "$at_stderr" || at_failed=:
9896 echo >>"$at_stdout"; $as_echo "Default transform scope
9897 test
9898 Transforming hard links
9899 test
9900 Not transforming hard links
9901 basedir/test
9902 " | \
9903   $at_diff - "$at_stdout" || at_failed=:
9904 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
9905 $at_failed && at_fn_log_failure
9906 $at_traceon; }
9907
9908               { set +x
9909 $as_echo "$at_srcdir/xform-h.at:39:
9910 mkdir oldgnu
9911 (cd oldgnu
9912 TEST_TAR_FORMAT=oldgnu
9913 export TEST_TAR_FORMAT
9914 TAR_OPTIONS=\"-H oldgnu\"
9915 export TAR_OPTIONS
9916 rm -rf *
9917
9918 mkdir basedir
9919 echo \"hello\" > basedir/test
9920 ln basedir/test basedir/test_link
9921
9922
9923 echo \"Default transform scope\"
9924 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
9925 tar tvf archive | sed -n 's/.*test_link link to //p'
9926
9927
9928 echo \"Transforming hard links\"
9929 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
9930 tar tvf archive | sed -n 's/.*test_link link to //p'
9931
9932
9933 echo \"Not transforming hard links\"
9934 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
9935 tar tvf archive | sed -n 's/.*test_link link to //p'
9936
9937 )"
9938 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
9939 ( $at_check_trace;
9940 mkdir oldgnu
9941 (cd oldgnu
9942 TEST_TAR_FORMAT=oldgnu
9943 export TEST_TAR_FORMAT
9944 TAR_OPTIONS="-H oldgnu"
9945 export TAR_OPTIONS
9946 rm -rf *
9947
9948 mkdir basedir
9949 echo "hello" > basedir/test
9950 ln basedir/test basedir/test_link
9951
9952
9953 echo "Default transform scope"
9954 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
9955 tar tvf archive | sed -n 's/.*test_link link to //p'
9956
9957
9958 echo "Transforming hard links"
9959 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
9960 tar tvf archive | sed -n 's/.*test_link link to //p'
9961
9962
9963 echo "Not transforming hard links"
9964 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
9965 tar tvf archive | sed -n 's/.*test_link link to //p'
9966
9967 )
9968 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9969 at_status=$? at_failed=false
9970 $at_check_filter
9971 at_fn_diff_devnull "$at_stderr" || at_failed=:
9972 echo >>"$at_stdout"; $as_echo "Default transform scope
9973 test
9974 Transforming hard links
9975 test
9976 Not transforming hard links
9977 basedir/test
9978 " | \
9979   $at_diff - "$at_stdout" || at_failed=:
9980 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
9981 $at_failed && at_fn_log_failure
9982 $at_traceon; }
9983
9984               { set +x
9985 $as_echo "$at_srcdir/xform-h.at:39:
9986 mkdir ustar
9987 (cd ustar
9988 TEST_TAR_FORMAT=ustar
9989 export TEST_TAR_FORMAT
9990 TAR_OPTIONS=\"-H ustar\"
9991 export TAR_OPTIONS
9992 rm -rf *
9993
9994 mkdir basedir
9995 echo \"hello\" > basedir/test
9996 ln basedir/test basedir/test_link
9997
9998
9999 echo \"Default transform scope\"
10000 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
10001 tar tvf archive | sed -n 's/.*test_link link to //p'
10002
10003
10004 echo \"Transforming hard links\"
10005 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
10006 tar tvf archive | sed -n 's/.*test_link link to //p'
10007
10008
10009 echo \"Not transforming hard links\"
10010 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
10011 tar tvf archive | sed -n 's/.*test_link link to //p'
10012
10013 )"
10014 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
10015 ( $at_check_trace;
10016 mkdir ustar
10017 (cd ustar
10018 TEST_TAR_FORMAT=ustar
10019 export TEST_TAR_FORMAT
10020 TAR_OPTIONS="-H ustar"
10021 export TAR_OPTIONS
10022 rm -rf *
10023
10024 mkdir basedir
10025 echo "hello" > basedir/test
10026 ln basedir/test basedir/test_link
10027
10028
10029 echo "Default transform scope"
10030 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
10031 tar tvf archive | sed -n 's/.*test_link link to //p'
10032
10033
10034 echo "Transforming hard links"
10035 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
10036 tar tvf archive | sed -n 's/.*test_link link to //p'
10037
10038
10039 echo "Not transforming hard links"
10040 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
10041 tar tvf archive | sed -n 's/.*test_link link to //p'
10042
10043 )
10044 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10045 at_status=$? at_failed=false
10046 $at_check_filter
10047 at_fn_diff_devnull "$at_stderr" || at_failed=:
10048 echo >>"$at_stdout"; $as_echo "Default transform scope
10049 test
10050 Transforming hard links
10051 test
10052 Not transforming hard links
10053 basedir/test
10054 " | \
10055   $at_diff - "$at_stdout" || at_failed=:
10056 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
10057 $at_failed && at_fn_log_failure
10058 $at_traceon; }
10059
10060               { set +x
10061 $as_echo "$at_srcdir/xform-h.at:39:
10062 mkdir posix
10063 (cd posix
10064 TEST_TAR_FORMAT=posix
10065 export TEST_TAR_FORMAT
10066 TAR_OPTIONS=\"-H posix\"
10067 export TAR_OPTIONS
10068 rm -rf *
10069
10070 mkdir basedir
10071 echo \"hello\" > basedir/test
10072 ln basedir/test basedir/test_link
10073
10074
10075 echo \"Default transform scope\"
10076 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
10077 tar tvf archive | sed -n 's/.*test_link link to //p'
10078
10079
10080 echo \"Transforming hard links\"
10081 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
10082 tar tvf archive | sed -n 's/.*test_link link to //p'
10083
10084
10085 echo \"Not transforming hard links\"
10086 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
10087 tar tvf archive | sed -n 's/.*test_link link to //p'
10088
10089 )"
10090 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
10091 ( $at_check_trace;
10092 mkdir posix
10093 (cd posix
10094 TEST_TAR_FORMAT=posix
10095 export TEST_TAR_FORMAT
10096 TAR_OPTIONS="-H posix"
10097 export TAR_OPTIONS
10098 rm -rf *
10099
10100 mkdir basedir
10101 echo "hello" > basedir/test
10102 ln basedir/test basedir/test_link
10103
10104
10105 echo "Default transform scope"
10106 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
10107 tar tvf archive | sed -n 's/.*test_link link to //p'
10108
10109
10110 echo "Transforming hard links"
10111 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
10112 tar tvf archive | sed -n 's/.*test_link link to //p'
10113
10114
10115 echo "Not transforming hard links"
10116 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
10117 tar tvf archive | sed -n 's/.*test_link link to //p'
10118
10119 )
10120 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10121 at_status=$? at_failed=false
10122 $at_check_filter
10123 at_fn_diff_devnull "$at_stderr" || at_failed=:
10124 echo >>"$at_stdout"; $as_echo "Default transform scope
10125 test
10126 Transforming hard links
10127 test
10128 Not transforming hard links
10129 basedir/test
10130 " | \
10131   $at_diff - "$at_stdout" || at_failed=:
10132 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
10133 $at_failed && at_fn_log_failure
10134 $at_traceon; }
10135
10136               { set +x
10137 $as_echo "$at_srcdir/xform-h.at:39:
10138 mkdir gnu
10139 (cd gnu
10140 TEST_TAR_FORMAT=gnu
10141 export TEST_TAR_FORMAT
10142 TAR_OPTIONS=\"-H gnu\"
10143 export TAR_OPTIONS
10144 rm -rf *
10145
10146 mkdir basedir
10147 echo \"hello\" > basedir/test
10148 ln basedir/test basedir/test_link
10149
10150
10151 echo \"Default transform scope\"
10152 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
10153 tar tvf archive | sed -n 's/.*test_link link to //p'
10154
10155
10156 echo \"Transforming hard links\"
10157 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
10158 tar tvf archive | sed -n 's/.*test_link link to //p'
10159
10160
10161 echo \"Not transforming hard links\"
10162 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
10163 tar tvf archive | sed -n 's/.*test_link link to //p'
10164
10165 )"
10166 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
10167 ( $at_check_trace;
10168 mkdir gnu
10169 (cd gnu
10170 TEST_TAR_FORMAT=gnu
10171 export TEST_TAR_FORMAT
10172 TAR_OPTIONS="-H gnu"
10173 export TAR_OPTIONS
10174 rm -rf *
10175
10176 mkdir basedir
10177 echo "hello" > basedir/test
10178 ln basedir/test basedir/test_link
10179
10180
10181 echo "Default transform scope"
10182 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
10183 tar tvf archive | sed -n 's/.*test_link link to //p'
10184
10185
10186 echo "Transforming hard links"
10187 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
10188 tar tvf archive | sed -n 's/.*test_link link to //p'
10189
10190
10191 echo "Not transforming hard links"
10192 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
10193 tar tvf archive | sed -n 's/.*test_link link to //p'
10194
10195 )
10196 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10197 at_status=$? at_failed=false
10198 $at_check_filter
10199 at_fn_diff_devnull "$at_stderr" || at_failed=:
10200 echo >>"$at_stdout"; $as_echo "Default transform scope
10201 test
10202 Transforming hard links
10203 test
10204 Not transforming hard links
10205 basedir/test
10206 " | \
10207   $at_diff - "$at_stdout" || at_failed=:
10208 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
10209 $at_failed && at_fn_log_failure
10210 $at_traceon; }
10211
10212
10213
10214
10215
10216
10217   set +x
10218   $at_times_p && times >"$at_times_file"
10219 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10220 read at_status <"$at_status_file"
10221 #AT_STOP_39
10222 #AT_START_40
10223 at_fn_group_banner 40 'xform01.at:26' \
10224   "transformations and GNU volume labels" "          " 6
10225 at_xfail=no
10226       test -f $XFAILFILE && at_xfail=yes
10227 (
10228   $as_echo "40. $at_setup_line: testing $at_desc ..."
10229   $at_traceon
10230
10231
10232
10233
10234
10235   { set +x
10236 $as_echo "$at_srcdir/xform01.at:29:
10237 mkdir gnu
10238 (cd gnu
10239 TEST_TAR_FORMAT=gnu
10240 export TEST_TAR_FORMAT
10241 TAR_OPTIONS=\"-H gnu\"
10242 export TAR_OPTIONS
10243 rm -rf *
10244
10245 genfile --file file
10246 tar -cf archive.tar -V /label/ file
10247 tar tf archive.tar
10248 )"
10249 at_fn_check_prepare_notrace 'an embedded newline' "xform01.at:29"
10250 ( $at_check_trace;
10251 mkdir gnu
10252 (cd gnu
10253 TEST_TAR_FORMAT=gnu
10254 export TEST_TAR_FORMAT
10255 TAR_OPTIONS="-H gnu"
10256 export TAR_OPTIONS
10257 rm -rf *
10258
10259 genfile --file file
10260 tar -cf archive.tar -V /label/ file
10261 tar tf archive.tar
10262 )
10263 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10264 at_status=$? at_failed=false
10265 $at_check_filter
10266 at_fn_diff_devnull "$at_stderr" || at_failed=:
10267 echo >>"$at_stdout"; $as_echo "/label/
10268 file
10269 " | \
10270   $at_diff - "$at_stdout" || at_failed=:
10271 at_fn_check_status 0 $at_status "$at_srcdir/xform01.at:29"
10272 $at_failed && at_fn_log_failure
10273 $at_traceon; }
10274
10275
10276
10277
10278   set +x
10279   $at_times_p && times >"$at_times_file"
10280 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10281 read at_status <"$at_status_file"
10282 #AT_STOP_40
10283 #AT_START_41
10284 at_fn_group_banner 41 'xform02.at:21' \
10285   "transforming escaped delimiters on create" "      " 6
10286 at_xfail=no
10287       test -f $XFAILFILE && at_xfail=yes
10288 (
10289   $as_echo "41. $at_setup_line: testing $at_desc ..."
10290   $at_traceon
10291
10292
10293
10294
10295
10296   { set +x
10297 $as_echo "$at_srcdir/xform02.at:24:
10298 mkdir v7
10299 (cd v7
10300 TEST_TAR_FORMAT=v7
10301 export TEST_TAR_FORMAT
10302 TAR_OPTIONS=\"-H v7\"
10303 export TAR_OPTIONS
10304 rm -rf *
10305
10306 genfile --file file
10307 tar cvf /dev/null file \\
10308    --transform='s/file/other\\/name/' \\
10309    --show-transformed-name
10310 )"
10311 at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
10312 ( $at_check_trace;
10313 mkdir v7
10314 (cd v7
10315 TEST_TAR_FORMAT=v7
10316 export TEST_TAR_FORMAT
10317 TAR_OPTIONS="-H v7"
10318 export TAR_OPTIONS
10319 rm -rf *
10320
10321 genfile --file file
10322 tar cvf /dev/null file \
10323    --transform='s/file/other\/name/' \
10324    --show-transformed-name
10325 )
10326 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10327 at_status=$? at_failed=false
10328 $at_check_filter
10329 at_fn_diff_devnull "$at_stderr" || at_failed=:
10330 echo >>"$at_stdout"; $as_echo "other/name
10331 " | \
10332   $at_diff - "$at_stdout" || at_failed=:
10333 at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
10334 $at_failed && at_fn_log_failure
10335 $at_traceon; }
10336
10337               { set +x
10338 $as_echo "$at_srcdir/xform02.at:24:
10339 mkdir oldgnu
10340 (cd oldgnu
10341 TEST_TAR_FORMAT=oldgnu
10342 export TEST_TAR_FORMAT
10343 TAR_OPTIONS=\"-H oldgnu\"
10344 export TAR_OPTIONS
10345 rm -rf *
10346
10347 genfile --file file
10348 tar cvf /dev/null file \\
10349    --transform='s/file/other\\/name/' \\
10350    --show-transformed-name
10351 )"
10352 at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
10353 ( $at_check_trace;
10354 mkdir oldgnu
10355 (cd oldgnu
10356 TEST_TAR_FORMAT=oldgnu
10357 export TEST_TAR_FORMAT
10358 TAR_OPTIONS="-H oldgnu"
10359 export TAR_OPTIONS
10360 rm -rf *
10361
10362 genfile --file file
10363 tar cvf /dev/null file \
10364    --transform='s/file/other\/name/' \
10365    --show-transformed-name
10366 )
10367 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10368 at_status=$? at_failed=false
10369 $at_check_filter
10370 at_fn_diff_devnull "$at_stderr" || at_failed=:
10371 echo >>"$at_stdout"; $as_echo "other/name
10372 " | \
10373   $at_diff - "$at_stdout" || at_failed=:
10374 at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
10375 $at_failed && at_fn_log_failure
10376 $at_traceon; }
10377
10378               { set +x
10379 $as_echo "$at_srcdir/xform02.at:24:
10380 mkdir ustar
10381 (cd ustar
10382 TEST_TAR_FORMAT=ustar
10383 export TEST_TAR_FORMAT
10384 TAR_OPTIONS=\"-H ustar\"
10385 export TAR_OPTIONS
10386 rm -rf *
10387
10388 genfile --file file
10389 tar cvf /dev/null file \\
10390    --transform='s/file/other\\/name/' \\
10391    --show-transformed-name
10392 )"
10393 at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
10394 ( $at_check_trace;
10395 mkdir ustar
10396 (cd ustar
10397 TEST_TAR_FORMAT=ustar
10398 export TEST_TAR_FORMAT
10399 TAR_OPTIONS="-H ustar"
10400 export TAR_OPTIONS
10401 rm -rf *
10402
10403 genfile --file file
10404 tar cvf /dev/null file \
10405    --transform='s/file/other\/name/' \
10406    --show-transformed-name
10407 )
10408 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10409 at_status=$? at_failed=false
10410 $at_check_filter
10411 at_fn_diff_devnull "$at_stderr" || at_failed=:
10412 echo >>"$at_stdout"; $as_echo "other/name
10413 " | \
10414   $at_diff - "$at_stdout" || at_failed=:
10415 at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
10416 $at_failed && at_fn_log_failure
10417 $at_traceon; }
10418
10419               { set +x
10420 $as_echo "$at_srcdir/xform02.at:24:
10421 mkdir posix
10422 (cd posix
10423 TEST_TAR_FORMAT=posix
10424 export TEST_TAR_FORMAT
10425 TAR_OPTIONS=\"-H posix\"
10426 export TAR_OPTIONS
10427 rm -rf *
10428
10429 genfile --file file
10430 tar cvf /dev/null file \\
10431    --transform='s/file/other\\/name/' \\
10432    --show-transformed-name
10433 )"
10434 at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
10435 ( $at_check_trace;
10436 mkdir posix
10437 (cd posix
10438 TEST_TAR_FORMAT=posix
10439 export TEST_TAR_FORMAT
10440 TAR_OPTIONS="-H posix"
10441 export TAR_OPTIONS
10442 rm -rf *
10443
10444 genfile --file file
10445 tar cvf /dev/null file \
10446    --transform='s/file/other\/name/' \
10447    --show-transformed-name
10448 )
10449 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10450 at_status=$? at_failed=false
10451 $at_check_filter
10452 at_fn_diff_devnull "$at_stderr" || at_failed=:
10453 echo >>"$at_stdout"; $as_echo "other/name
10454 " | \
10455   $at_diff - "$at_stdout" || at_failed=:
10456 at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
10457 $at_failed && at_fn_log_failure
10458 $at_traceon; }
10459
10460               { set +x
10461 $as_echo "$at_srcdir/xform02.at:24:
10462 mkdir gnu
10463 (cd gnu
10464 TEST_TAR_FORMAT=gnu
10465 export TEST_TAR_FORMAT
10466 TAR_OPTIONS=\"-H gnu\"
10467 export TAR_OPTIONS
10468 rm -rf *
10469
10470 genfile --file file
10471 tar cvf /dev/null file \\
10472    --transform='s/file/other\\/name/' \\
10473    --show-transformed-name
10474 )"
10475 at_fn_check_prepare_notrace 'an embedded newline' "xform02.at:24"
10476 ( $at_check_trace;
10477 mkdir gnu
10478 (cd gnu
10479 TEST_TAR_FORMAT=gnu
10480 export TEST_TAR_FORMAT
10481 TAR_OPTIONS="-H gnu"
10482 export TAR_OPTIONS
10483 rm -rf *
10484
10485 genfile --file file
10486 tar cvf /dev/null file \
10487    --transform='s/file/other\/name/' \
10488    --show-transformed-name
10489 )
10490 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10491 at_status=$? at_failed=false
10492 $at_check_filter
10493 at_fn_diff_devnull "$at_stderr" || at_failed=:
10494 echo >>"$at_stdout"; $as_echo "other/name
10495 " | \
10496   $at_diff - "$at_stdout" || at_failed=:
10497 at_fn_check_status 0 $at_status "$at_srcdir/xform02.at:24"
10498 $at_failed && at_fn_log_failure
10499 $at_traceon; }
10500
10501
10502
10503
10504   set +x
10505   $at_times_p && times >"$at_times_file"
10506 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10507 read at_status <"$at_status_file"
10508 #AT_STOP_41
10509 #AT_START_42
10510 at_fn_group_banner 42 'exclude.at:23' \
10511   "exclude" "                                        " 7
10512 at_xfail=no
10513       test -f $XFAILFILE && at_xfail=yes
10514 (
10515   $as_echo "42. $at_setup_line: testing $at_desc ..."
10516   $at_traceon
10517
10518
10519
10520
10521
10522   { set +x
10523 $as_echo "$at_srcdir/exclude.at:26:
10524 mkdir ustar
10525 (cd ustar
10526 TEST_TAR_FORMAT=ustar
10527 export TEST_TAR_FORMAT
10528 TAR_OPTIONS=\"-H ustar\"
10529 export TAR_OPTIONS
10530 rm -rf *
10531
10532
10533 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10534
10535
10536 mkdir dir
10537 echo blues > dir/blues
10538 echo jazz > dir/jazz
10539 mkdir dir/folk
10540 echo tagfile > dir/folk/tagfile
10541 echo sanjuan > dir/folk/sanjuan
10542 mkdir dir/rock
10543 echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG
10544 echo \"test\" > dir/rock/file
10545
10546 for option in exclude-caches exclude-caches-under exclude-caches-all
10547 do
10548   echo OPTION \$option
10549   tar -cf archive.tar --\$option -v dir 2>err | sort
10550   cat err
10551   echo ARCHIVE
10552   tar tf archive.tar | sort
10553 done
10554
10555 for option in exclude-tag exclude-tag-under exclude-tag-all
10556 do
10557   echo OPTION \$option
10558   tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort
10559   cat err
10560   echo ARCHIVE
10561   tar tf archive.tar | sort
10562 done
10563 )"
10564 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude.at:26"
10565 ( $at_check_trace;
10566 mkdir ustar
10567 (cd ustar
10568 TEST_TAR_FORMAT=ustar
10569 export TEST_TAR_FORMAT
10570 TAR_OPTIONS="-H ustar"
10571 export TAR_OPTIONS
10572 rm -rf *
10573
10574
10575 test -z "`sort < /dev/null 2>&1`" || exit 77
10576
10577
10578 mkdir dir
10579 echo blues > dir/blues
10580 echo jazz > dir/jazz
10581 mkdir dir/folk
10582 echo tagfile > dir/folk/tagfile
10583 echo sanjuan > dir/folk/sanjuan
10584 mkdir dir/rock
10585 echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
10586 echo "test" > dir/rock/file
10587
10588 for option in exclude-caches exclude-caches-under exclude-caches-all
10589 do
10590   echo OPTION $option
10591   tar -cf archive.tar --$option -v dir 2>err | sort
10592   cat err
10593   echo ARCHIVE
10594   tar tf archive.tar | sort
10595 done
10596
10597 for option in exclude-tag exclude-tag-under exclude-tag-all
10598 do
10599   echo OPTION $option
10600   tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
10601   cat err
10602   echo ARCHIVE
10603   tar tf archive.tar | sort
10604 done
10605 )
10606 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10607 at_status=$? at_failed=false
10608 $at_check_filter
10609 at_fn_diff_devnull "$at_stderr" || at_failed=:
10610 echo >>"$at_stdout"; $as_echo "OPTION exclude-caches
10611 dir/
10612 dir/blues
10613 dir/folk/
10614 dir/folk/sanjuan
10615 dir/folk/tagfile
10616 dir/jazz
10617 dir/rock/
10618 dir/rock/CACHEDIR.TAG
10619 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
10620 ARCHIVE
10621 dir/
10622 dir/blues
10623 dir/folk/
10624 dir/folk/sanjuan
10625 dir/folk/tagfile
10626 dir/jazz
10627 dir/rock/
10628 dir/rock/CACHEDIR.TAG
10629 OPTION exclude-caches-under
10630 dir/
10631 dir/blues
10632 dir/folk/
10633 dir/folk/sanjuan
10634 dir/folk/tagfile
10635 dir/jazz
10636 dir/rock/
10637 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
10638 ARCHIVE
10639 dir/
10640 dir/blues
10641 dir/folk/
10642 dir/folk/sanjuan
10643 dir/folk/tagfile
10644 dir/jazz
10645 dir/rock/
10646 OPTION exclude-caches-all
10647 dir/
10648 dir/blues
10649 dir/folk/
10650 dir/folk/sanjuan
10651 dir/folk/tagfile
10652 dir/jazz
10653 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
10654 ARCHIVE
10655 dir/
10656 dir/blues
10657 dir/folk/
10658 dir/folk/sanjuan
10659 dir/folk/tagfile
10660 dir/jazz
10661 OPTION exclude-tag
10662 dir/
10663 dir/blues
10664 dir/folk/
10665 dir/folk/tagfile
10666 dir/jazz
10667 dir/rock/
10668 dir/rock/CACHEDIR.TAG
10669 dir/rock/file
10670 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
10671 ARCHIVE
10672 dir/
10673 dir/blues
10674 dir/folk/
10675 dir/folk/tagfile
10676 dir/jazz
10677 dir/rock/
10678 dir/rock/CACHEDIR.TAG
10679 dir/rock/file
10680 OPTION exclude-tag-under
10681 dir/
10682 dir/blues
10683 dir/folk/
10684 dir/jazz
10685 dir/rock/
10686 dir/rock/CACHEDIR.TAG
10687 dir/rock/file
10688 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
10689 ARCHIVE
10690 dir/
10691 dir/blues
10692 dir/folk/
10693 dir/jazz
10694 dir/rock/
10695 dir/rock/CACHEDIR.TAG
10696 dir/rock/file
10697 OPTION exclude-tag-all
10698 dir/
10699 dir/blues
10700 dir/jazz
10701 dir/rock/
10702 dir/rock/CACHEDIR.TAG
10703 dir/rock/file
10704 tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
10705 ARCHIVE
10706 dir/
10707 dir/blues
10708 dir/jazz
10709 dir/rock/
10710 dir/rock/CACHEDIR.TAG
10711 dir/rock/file
10712 " | \
10713   $at_diff - "$at_stdout" || at_failed=:
10714 at_fn_check_status 0 $at_status "$at_srcdir/exclude.at:26"
10715 $at_failed && at_fn_log_failure
10716 $at_traceon; }
10717
10718
10719
10720
10721   set +x
10722   $at_times_p && times >"$at_times_file"
10723 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10724 read at_status <"$at_status_file"
10725 #AT_STOP_42
10726 #AT_START_43
10727 at_fn_group_banner 43 'exclude01.at:19' \
10728   "exclude wildcards" "                              " 7
10729 at_xfail=no
10730       test -f $XFAILFILE && at_xfail=yes
10731 (
10732   $as_echo "43. $at_setup_line: testing $at_desc ..."
10733   $at_traceon
10734
10735
10736
10737
10738
10739   { set +x
10740 $as_echo "$at_srcdir/exclude01.at:22:
10741 mkdir v7
10742 (cd v7
10743 TEST_TAR_FORMAT=v7
10744 export TEST_TAR_FORMAT
10745 TAR_OPTIONS=\"-H v7\"
10746 export TAR_OPTIONS
10747 rm -rf *
10748
10749
10750 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10751
10752
10753 rm -rf testdir
10754 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
10755 touch testdir/dir1/file1
10756 touch testdir/dir1/\\*
10757 touch testdir/dir2/file2
10758 touch testdir/dir2/\\*
10759 touch testdir/dir3/file3
10760 touch testdir/dir3/\\*
10761
10762 tar cf archive --exclude=testdir/dir1/\\* \\
10763                --no-wildcards \\
10764                --exclude=testdir/dir2/\\* \\
10765                --wildcards \\
10766                --exclude=testdir/dir3/\\* \\
10767                testdir
10768 tar tf archive | sort
10769
10770 echo \"NEXT\"
10771 tar cf archive testdir
10772 tar t \"testdir/dir1/*\" -f archive | sort
10773
10774 echo \"NEXT\"
10775 tar cf archive testdir/dir1
10776 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
10777
10778 echo \"NEXT\"
10779 tar cf archive testdir
10780 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
10781
10782 rm -rf testdir
10783 )"
10784 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
10785 ( $at_check_trace;
10786 mkdir v7
10787 (cd v7
10788 TEST_TAR_FORMAT=v7
10789 export TEST_TAR_FORMAT
10790 TAR_OPTIONS="-H v7"
10791 export TAR_OPTIONS
10792 rm -rf *
10793
10794
10795 test -z "`sort < /dev/null 2>&1`" || exit 77
10796
10797
10798 rm -rf testdir
10799 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
10800 touch testdir/dir1/file1
10801 touch testdir/dir1/\*
10802 touch testdir/dir2/file2
10803 touch testdir/dir2/\*
10804 touch testdir/dir3/file3
10805 touch testdir/dir3/\*
10806
10807 tar cf archive --exclude=testdir/dir1/\* \
10808                --no-wildcards \
10809                --exclude=testdir/dir2/\* \
10810                --wildcards \
10811                --exclude=testdir/dir3/\* \
10812                testdir
10813 tar tf archive | sort
10814
10815 echo "NEXT"
10816 tar cf archive testdir
10817 tar t "testdir/dir1/*" -f archive | sort
10818
10819 echo "NEXT"
10820 tar cf archive testdir/dir1
10821 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
10822
10823 echo "NEXT"
10824 tar cf archive testdir
10825 tar t --wildcards "testdir/dir1/*" -f archive | sort
10826
10827 rm -rf testdir
10828 )
10829 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10830 at_status=$? at_failed=false
10831 $at_check_filter
10832 at_fn_diff_devnull "$at_stderr" || at_failed=:
10833 echo >>"$at_stdout"; $as_echo "testdir/
10834 testdir/dir1/
10835 testdir/dir2/
10836 testdir/dir2/file2
10837 testdir/dir3/
10838 NEXT
10839 testdir/dir1/*
10840 NEXT
10841 testdir/dir1/*
10842 NEXT
10843 testdir/dir1/*
10844 testdir/dir1/file1
10845 " | \
10846   $at_diff - "$at_stdout" || at_failed=:
10847 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
10848 $at_failed && at_fn_log_failure
10849 $at_traceon; }
10850
10851               { set +x
10852 $as_echo "$at_srcdir/exclude01.at:22:
10853 mkdir oldgnu
10854 (cd oldgnu
10855 TEST_TAR_FORMAT=oldgnu
10856 export TEST_TAR_FORMAT
10857 TAR_OPTIONS=\"-H oldgnu\"
10858 export TAR_OPTIONS
10859 rm -rf *
10860
10861
10862 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10863
10864
10865 rm -rf testdir
10866 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
10867 touch testdir/dir1/file1
10868 touch testdir/dir1/\\*
10869 touch testdir/dir2/file2
10870 touch testdir/dir2/\\*
10871 touch testdir/dir3/file3
10872 touch testdir/dir3/\\*
10873
10874 tar cf archive --exclude=testdir/dir1/\\* \\
10875                --no-wildcards \\
10876                --exclude=testdir/dir2/\\* \\
10877                --wildcards \\
10878                --exclude=testdir/dir3/\\* \\
10879                testdir
10880 tar tf archive | sort
10881
10882 echo \"NEXT\"
10883 tar cf archive testdir
10884 tar t \"testdir/dir1/*\" -f archive | sort
10885
10886 echo \"NEXT\"
10887 tar cf archive testdir/dir1
10888 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
10889
10890 echo \"NEXT\"
10891 tar cf archive testdir
10892 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
10893
10894 rm -rf testdir
10895 )"
10896 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
10897 ( $at_check_trace;
10898 mkdir oldgnu
10899 (cd oldgnu
10900 TEST_TAR_FORMAT=oldgnu
10901 export TEST_TAR_FORMAT
10902 TAR_OPTIONS="-H oldgnu"
10903 export TAR_OPTIONS
10904 rm -rf *
10905
10906
10907 test -z "`sort < /dev/null 2>&1`" || exit 77
10908
10909
10910 rm -rf testdir
10911 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
10912 touch testdir/dir1/file1
10913 touch testdir/dir1/\*
10914 touch testdir/dir2/file2
10915 touch testdir/dir2/\*
10916 touch testdir/dir3/file3
10917 touch testdir/dir3/\*
10918
10919 tar cf archive --exclude=testdir/dir1/\* \
10920                --no-wildcards \
10921                --exclude=testdir/dir2/\* \
10922                --wildcards \
10923                --exclude=testdir/dir3/\* \
10924                testdir
10925 tar tf archive | sort
10926
10927 echo "NEXT"
10928 tar cf archive testdir
10929 tar t "testdir/dir1/*" -f archive | sort
10930
10931 echo "NEXT"
10932 tar cf archive testdir/dir1
10933 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
10934
10935 echo "NEXT"
10936 tar cf archive testdir
10937 tar t --wildcards "testdir/dir1/*" -f archive | sort
10938
10939 rm -rf testdir
10940 )
10941 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10942 at_status=$? at_failed=false
10943 $at_check_filter
10944 at_fn_diff_devnull "$at_stderr" || at_failed=:
10945 echo >>"$at_stdout"; $as_echo "testdir/
10946 testdir/dir1/
10947 testdir/dir2/
10948 testdir/dir2/file2
10949 testdir/dir3/
10950 NEXT
10951 testdir/dir1/*
10952 NEXT
10953 testdir/dir1/*
10954 NEXT
10955 testdir/dir1/*
10956 testdir/dir1/file1
10957 " | \
10958   $at_diff - "$at_stdout" || at_failed=:
10959 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
10960 $at_failed && at_fn_log_failure
10961 $at_traceon; }
10962
10963               { set +x
10964 $as_echo "$at_srcdir/exclude01.at:22:
10965 mkdir ustar
10966 (cd ustar
10967 TEST_TAR_FORMAT=ustar
10968 export TEST_TAR_FORMAT
10969 TAR_OPTIONS=\"-H ustar\"
10970 export TAR_OPTIONS
10971 rm -rf *
10972
10973
10974 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10975
10976
10977 rm -rf testdir
10978 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
10979 touch testdir/dir1/file1
10980 touch testdir/dir1/\\*
10981 touch testdir/dir2/file2
10982 touch testdir/dir2/\\*
10983 touch testdir/dir3/file3
10984 touch testdir/dir3/\\*
10985
10986 tar cf archive --exclude=testdir/dir1/\\* \\
10987                --no-wildcards \\
10988                --exclude=testdir/dir2/\\* \\
10989                --wildcards \\
10990                --exclude=testdir/dir3/\\* \\
10991                testdir
10992 tar tf archive | sort
10993
10994 echo \"NEXT\"
10995 tar cf archive testdir
10996 tar t \"testdir/dir1/*\" -f archive | sort
10997
10998 echo \"NEXT\"
10999 tar cf archive testdir/dir1
11000 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
11001
11002 echo \"NEXT\"
11003 tar cf archive testdir
11004 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
11005
11006 rm -rf testdir
11007 )"
11008 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
11009 ( $at_check_trace;
11010 mkdir ustar
11011 (cd ustar
11012 TEST_TAR_FORMAT=ustar
11013 export TEST_TAR_FORMAT
11014 TAR_OPTIONS="-H ustar"
11015 export TAR_OPTIONS
11016 rm -rf *
11017
11018
11019 test -z "`sort < /dev/null 2>&1`" || exit 77
11020
11021
11022 rm -rf testdir
11023 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
11024 touch testdir/dir1/file1
11025 touch testdir/dir1/\*
11026 touch testdir/dir2/file2
11027 touch testdir/dir2/\*
11028 touch testdir/dir3/file3
11029 touch testdir/dir3/\*
11030
11031 tar cf archive --exclude=testdir/dir1/\* \
11032                --no-wildcards \
11033                --exclude=testdir/dir2/\* \
11034                --wildcards \
11035                --exclude=testdir/dir3/\* \
11036                testdir
11037 tar tf archive | sort
11038
11039 echo "NEXT"
11040 tar cf archive testdir
11041 tar t "testdir/dir1/*" -f archive | sort
11042
11043 echo "NEXT"
11044 tar cf archive testdir/dir1
11045 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
11046
11047 echo "NEXT"
11048 tar cf archive testdir
11049 tar t --wildcards "testdir/dir1/*" -f archive | sort
11050
11051 rm -rf testdir
11052 )
11053 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11054 at_status=$? at_failed=false
11055 $at_check_filter
11056 at_fn_diff_devnull "$at_stderr" || at_failed=:
11057 echo >>"$at_stdout"; $as_echo "testdir/
11058 testdir/dir1/
11059 testdir/dir2/
11060 testdir/dir2/file2
11061 testdir/dir3/
11062 NEXT
11063 testdir/dir1/*
11064 NEXT
11065 testdir/dir1/*
11066 NEXT
11067 testdir/dir1/*
11068 testdir/dir1/file1
11069 " | \
11070   $at_diff - "$at_stdout" || at_failed=:
11071 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
11072 $at_failed && at_fn_log_failure
11073 $at_traceon; }
11074
11075               { set +x
11076 $as_echo "$at_srcdir/exclude01.at:22:
11077 mkdir posix
11078 (cd posix
11079 TEST_TAR_FORMAT=posix
11080 export TEST_TAR_FORMAT
11081 TAR_OPTIONS=\"-H posix\"
11082 export TAR_OPTIONS
11083 rm -rf *
11084
11085
11086 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11087
11088
11089 rm -rf testdir
11090 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
11091 touch testdir/dir1/file1
11092 touch testdir/dir1/\\*
11093 touch testdir/dir2/file2
11094 touch testdir/dir2/\\*
11095 touch testdir/dir3/file3
11096 touch testdir/dir3/\\*
11097
11098 tar cf archive --exclude=testdir/dir1/\\* \\
11099                --no-wildcards \\
11100                --exclude=testdir/dir2/\\* \\
11101                --wildcards \\
11102                --exclude=testdir/dir3/\\* \\
11103                testdir
11104 tar tf archive | sort
11105
11106 echo \"NEXT\"
11107 tar cf archive testdir
11108 tar t \"testdir/dir1/*\" -f archive | sort
11109
11110 echo \"NEXT\"
11111 tar cf archive testdir/dir1
11112 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
11113
11114 echo \"NEXT\"
11115 tar cf archive testdir
11116 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
11117
11118 rm -rf testdir
11119 )"
11120 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
11121 ( $at_check_trace;
11122 mkdir posix
11123 (cd posix
11124 TEST_TAR_FORMAT=posix
11125 export TEST_TAR_FORMAT
11126 TAR_OPTIONS="-H posix"
11127 export TAR_OPTIONS
11128 rm -rf *
11129
11130
11131 test -z "`sort < /dev/null 2>&1`" || exit 77
11132
11133
11134 rm -rf testdir
11135 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
11136 touch testdir/dir1/file1
11137 touch testdir/dir1/\*
11138 touch testdir/dir2/file2
11139 touch testdir/dir2/\*
11140 touch testdir/dir3/file3
11141 touch testdir/dir3/\*
11142
11143 tar cf archive --exclude=testdir/dir1/\* \
11144                --no-wildcards \
11145                --exclude=testdir/dir2/\* \
11146                --wildcards \
11147                --exclude=testdir/dir3/\* \
11148                testdir
11149 tar tf archive | sort
11150
11151 echo "NEXT"
11152 tar cf archive testdir
11153 tar t "testdir/dir1/*" -f archive | sort
11154
11155 echo "NEXT"
11156 tar cf archive testdir/dir1
11157 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
11158
11159 echo "NEXT"
11160 tar cf archive testdir
11161 tar t --wildcards "testdir/dir1/*" -f archive | sort
11162
11163 rm -rf testdir
11164 )
11165 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11166 at_status=$? at_failed=false
11167 $at_check_filter
11168 at_fn_diff_devnull "$at_stderr" || at_failed=:
11169 echo >>"$at_stdout"; $as_echo "testdir/
11170 testdir/dir1/
11171 testdir/dir2/
11172 testdir/dir2/file2
11173 testdir/dir3/
11174 NEXT
11175 testdir/dir1/*
11176 NEXT
11177 testdir/dir1/*
11178 NEXT
11179 testdir/dir1/*
11180 testdir/dir1/file1
11181 " | \
11182   $at_diff - "$at_stdout" || at_failed=:
11183 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
11184 $at_failed && at_fn_log_failure
11185 $at_traceon; }
11186
11187               { set +x
11188 $as_echo "$at_srcdir/exclude01.at:22:
11189 mkdir gnu
11190 (cd gnu
11191 TEST_TAR_FORMAT=gnu
11192 export TEST_TAR_FORMAT
11193 TAR_OPTIONS=\"-H gnu\"
11194 export TAR_OPTIONS
11195 rm -rf *
11196
11197
11198 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11199
11200
11201 rm -rf testdir
11202 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
11203 touch testdir/dir1/file1
11204 touch testdir/dir1/\\*
11205 touch testdir/dir2/file2
11206 touch testdir/dir2/\\*
11207 touch testdir/dir3/file3
11208 touch testdir/dir3/\\*
11209
11210 tar cf archive --exclude=testdir/dir1/\\* \\
11211                --no-wildcards \\
11212                --exclude=testdir/dir2/\\* \\
11213                --wildcards \\
11214                --exclude=testdir/dir3/\\* \\
11215                testdir
11216 tar tf archive | sort
11217
11218 echo \"NEXT\"
11219 tar cf archive testdir
11220 tar t \"testdir/dir1/*\" -f archive | sort
11221
11222 echo \"NEXT\"
11223 tar cf archive testdir/dir1
11224 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
11225
11226 echo \"NEXT\"
11227 tar cf archive testdir
11228 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
11229
11230 rm -rf testdir
11231 )"
11232 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
11233 ( $at_check_trace;
11234 mkdir gnu
11235 (cd gnu
11236 TEST_TAR_FORMAT=gnu
11237 export TEST_TAR_FORMAT
11238 TAR_OPTIONS="-H gnu"
11239 export TAR_OPTIONS
11240 rm -rf *
11241
11242
11243 test -z "`sort < /dev/null 2>&1`" || exit 77
11244
11245
11246 rm -rf testdir
11247 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
11248 touch testdir/dir1/file1
11249 touch testdir/dir1/\*
11250 touch testdir/dir2/file2
11251 touch testdir/dir2/\*
11252 touch testdir/dir3/file3
11253 touch testdir/dir3/\*
11254
11255 tar cf archive --exclude=testdir/dir1/\* \
11256                --no-wildcards \
11257                --exclude=testdir/dir2/\* \
11258                --wildcards \
11259                --exclude=testdir/dir3/\* \
11260                testdir
11261 tar tf archive | sort
11262
11263 echo "NEXT"
11264 tar cf archive testdir
11265 tar t "testdir/dir1/*" -f archive | sort
11266
11267 echo "NEXT"
11268 tar cf archive testdir/dir1
11269 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
11270
11271 echo "NEXT"
11272 tar cf archive testdir
11273 tar t --wildcards "testdir/dir1/*" -f archive | sort
11274
11275 rm -rf testdir
11276 )
11277 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11278 at_status=$? at_failed=false
11279 $at_check_filter
11280 at_fn_diff_devnull "$at_stderr" || at_failed=:
11281 echo >>"$at_stdout"; $as_echo "testdir/
11282 testdir/dir1/
11283 testdir/dir2/
11284 testdir/dir2/file2
11285 testdir/dir3/
11286 NEXT
11287 testdir/dir1/*
11288 NEXT
11289 testdir/dir1/*
11290 NEXT
11291 testdir/dir1/*
11292 testdir/dir1/file1
11293 " | \
11294   $at_diff - "$at_stdout" || at_failed=:
11295 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
11296 $at_failed && at_fn_log_failure
11297 $at_traceon; }
11298
11299
11300
11301
11302   set +x
11303   $at_times_p && times >"$at_times_file"
11304 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11305 read at_status <"$at_status_file"
11306 #AT_STOP_43
11307 #AT_START_44
11308 at_fn_group_banner 44 'exclude02.at:19' \
11309   "exclude: anchoring" "                             " 7
11310 at_xfail=no
11311       test -f $XFAILFILE && at_xfail=yes
11312 (
11313   $as_echo "44. $at_setup_line: testing $at_desc ..."
11314   $at_traceon
11315
11316
11317
11318
11319
11320   { set +x
11321 $as_echo "$at_srcdir/exclude02.at:22:
11322 mkdir v7
11323 (cd v7
11324 TEST_TAR_FORMAT=v7
11325 export TEST_TAR_FORMAT
11326 TAR_OPTIONS=\"-H v7\"
11327 export TAR_OPTIONS
11328 rm -rf *
11329
11330
11331 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11332
11333
11334 rm -rf testdir
11335 mkdir -p testdir
11336 touch file1.txt
11337 touch testdir/file1.txt
11338 touch testdir/file2
11339
11340 tar cf archive --exclude=\"file1.txt\" \\
11341                testdir
11342 tar tf archive | sort
11343
11344 echo \"SUB 1\"
11345 tar cf archive --no-anchored \\
11346                --exclude=\"file1.txt\" \\
11347                testdir
11348 tar tf archive | sort
11349
11350 echo \"SUB 2\"
11351 tar cf archive --anchored \\
11352                --exclude=\"file1.txt\" \\
11353                testdir
11354 tar tf archive | sort
11355
11356 echo \"SUB 3\"
11357 tar cf archive testdir file1.txt
11358 tar t \"file1.txt\" -f archive | sort
11359
11360 echo \"SUB 4\"
11361 tar t --no-anchored \"file1.txt\" -f archive | sort
11362
11363 echo \"SUB 5\"
11364 tar t --anchored \"file1.txt\" -f archive | sort
11365
11366 rm -rf testdir file1.txt
11367
11368 )"
11369 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
11370 ( $at_check_trace;
11371 mkdir v7
11372 (cd v7
11373 TEST_TAR_FORMAT=v7
11374 export TEST_TAR_FORMAT
11375 TAR_OPTIONS="-H v7"
11376 export TAR_OPTIONS
11377 rm -rf *
11378
11379
11380 test -z "`sort < /dev/null 2>&1`" || exit 77
11381
11382
11383 rm -rf testdir
11384 mkdir -p testdir
11385 touch file1.txt
11386 touch testdir/file1.txt
11387 touch testdir/file2
11388
11389 tar cf archive --exclude="file1.txt" \
11390                testdir
11391 tar tf archive | sort
11392
11393 echo "SUB 1"
11394 tar cf archive --no-anchored \
11395                --exclude="file1.txt" \
11396                testdir
11397 tar tf archive | sort
11398
11399 echo "SUB 2"
11400 tar cf archive --anchored \
11401                --exclude="file1.txt" \
11402                testdir
11403 tar tf archive | sort
11404
11405 echo "SUB 3"
11406 tar cf archive testdir file1.txt
11407 tar t "file1.txt" -f archive | sort
11408
11409 echo "SUB 4"
11410 tar t --no-anchored "file1.txt" -f archive | sort
11411
11412 echo "SUB 5"
11413 tar t --anchored "file1.txt" -f archive | sort
11414
11415 rm -rf testdir file1.txt
11416
11417 )
11418 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11419 at_status=$? at_failed=false
11420 $at_check_filter
11421 at_fn_diff_devnull "$at_stderr" || at_failed=:
11422 echo >>"$at_stdout"; $as_echo "testdir/
11423 testdir/file2
11424 SUB 1
11425 testdir/
11426 testdir/file2
11427 SUB 2
11428 testdir/
11429 testdir/file1.txt
11430 testdir/file2
11431 SUB 3
11432 file1.txt
11433 SUB 4
11434 file1.txt
11435 testdir/file1.txt
11436 SUB 5
11437 file1.txt
11438 " | \
11439   $at_diff - "$at_stdout" || at_failed=:
11440 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
11441 $at_failed && at_fn_log_failure
11442 $at_traceon; }
11443
11444               { set +x
11445 $as_echo "$at_srcdir/exclude02.at:22:
11446 mkdir oldgnu
11447 (cd oldgnu
11448 TEST_TAR_FORMAT=oldgnu
11449 export TEST_TAR_FORMAT
11450 TAR_OPTIONS=\"-H oldgnu\"
11451 export TAR_OPTIONS
11452 rm -rf *
11453
11454
11455 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11456
11457
11458 rm -rf testdir
11459 mkdir -p testdir
11460 touch file1.txt
11461 touch testdir/file1.txt
11462 touch testdir/file2
11463
11464 tar cf archive --exclude=\"file1.txt\" \\
11465                testdir
11466 tar tf archive | sort
11467
11468 echo \"SUB 1\"
11469 tar cf archive --no-anchored \\
11470                --exclude=\"file1.txt\" \\
11471                testdir
11472 tar tf archive | sort
11473
11474 echo \"SUB 2\"
11475 tar cf archive --anchored \\
11476                --exclude=\"file1.txt\" \\
11477                testdir
11478 tar tf archive | sort
11479
11480 echo \"SUB 3\"
11481 tar cf archive testdir file1.txt
11482 tar t \"file1.txt\" -f archive | sort
11483
11484 echo \"SUB 4\"
11485 tar t --no-anchored \"file1.txt\" -f archive | sort
11486
11487 echo \"SUB 5\"
11488 tar t --anchored \"file1.txt\" -f archive | sort
11489
11490 rm -rf testdir file1.txt
11491
11492 )"
11493 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
11494 ( $at_check_trace;
11495 mkdir oldgnu
11496 (cd oldgnu
11497 TEST_TAR_FORMAT=oldgnu
11498 export TEST_TAR_FORMAT
11499 TAR_OPTIONS="-H oldgnu"
11500 export TAR_OPTIONS
11501 rm -rf *
11502
11503
11504 test -z "`sort < /dev/null 2>&1`" || exit 77
11505
11506
11507 rm -rf testdir
11508 mkdir -p testdir
11509 touch file1.txt
11510 touch testdir/file1.txt
11511 touch testdir/file2
11512
11513 tar cf archive --exclude="file1.txt" \
11514                testdir
11515 tar tf archive | sort
11516
11517 echo "SUB 1"
11518 tar cf archive --no-anchored \
11519                --exclude="file1.txt" \
11520                testdir
11521 tar tf archive | sort
11522
11523 echo "SUB 2"
11524 tar cf archive --anchored \
11525                --exclude="file1.txt" \
11526                testdir
11527 tar tf archive | sort
11528
11529 echo "SUB 3"
11530 tar cf archive testdir file1.txt
11531 tar t "file1.txt" -f archive | sort
11532
11533 echo "SUB 4"
11534 tar t --no-anchored "file1.txt" -f archive | sort
11535
11536 echo "SUB 5"
11537 tar t --anchored "file1.txt" -f archive | sort
11538
11539 rm -rf testdir file1.txt
11540
11541 )
11542 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11543 at_status=$? at_failed=false
11544 $at_check_filter
11545 at_fn_diff_devnull "$at_stderr" || at_failed=:
11546 echo >>"$at_stdout"; $as_echo "testdir/
11547 testdir/file2
11548 SUB 1
11549 testdir/
11550 testdir/file2
11551 SUB 2
11552 testdir/
11553 testdir/file1.txt
11554 testdir/file2
11555 SUB 3
11556 file1.txt
11557 SUB 4
11558 file1.txt
11559 testdir/file1.txt
11560 SUB 5
11561 file1.txt
11562 " | \
11563   $at_diff - "$at_stdout" || at_failed=:
11564 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
11565 $at_failed && at_fn_log_failure
11566 $at_traceon; }
11567
11568               { set +x
11569 $as_echo "$at_srcdir/exclude02.at:22:
11570 mkdir ustar
11571 (cd ustar
11572 TEST_TAR_FORMAT=ustar
11573 export TEST_TAR_FORMAT
11574 TAR_OPTIONS=\"-H ustar\"
11575 export TAR_OPTIONS
11576 rm -rf *
11577
11578
11579 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11580
11581
11582 rm -rf testdir
11583 mkdir -p testdir
11584 touch file1.txt
11585 touch testdir/file1.txt
11586 touch testdir/file2
11587
11588 tar cf archive --exclude=\"file1.txt\" \\
11589                testdir
11590 tar tf archive | sort
11591
11592 echo \"SUB 1\"
11593 tar cf archive --no-anchored \\
11594                --exclude=\"file1.txt\" \\
11595                testdir
11596 tar tf archive | sort
11597
11598 echo \"SUB 2\"
11599 tar cf archive --anchored \\
11600                --exclude=\"file1.txt\" \\
11601                testdir
11602 tar tf archive | sort
11603
11604 echo \"SUB 3\"
11605 tar cf archive testdir file1.txt
11606 tar t \"file1.txt\" -f archive | sort
11607
11608 echo \"SUB 4\"
11609 tar t --no-anchored \"file1.txt\" -f archive | sort
11610
11611 echo \"SUB 5\"
11612 tar t --anchored \"file1.txt\" -f archive | sort
11613
11614 rm -rf testdir file1.txt
11615
11616 )"
11617 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
11618 ( $at_check_trace;
11619 mkdir ustar
11620 (cd ustar
11621 TEST_TAR_FORMAT=ustar
11622 export TEST_TAR_FORMAT
11623 TAR_OPTIONS="-H ustar"
11624 export TAR_OPTIONS
11625 rm -rf *
11626
11627
11628 test -z "`sort < /dev/null 2>&1`" || exit 77
11629
11630
11631 rm -rf testdir
11632 mkdir -p testdir
11633 touch file1.txt
11634 touch testdir/file1.txt
11635 touch testdir/file2
11636
11637 tar cf archive --exclude="file1.txt" \
11638                testdir
11639 tar tf archive | sort
11640
11641 echo "SUB 1"
11642 tar cf archive --no-anchored \
11643                --exclude="file1.txt" \
11644                testdir
11645 tar tf archive | sort
11646
11647 echo "SUB 2"
11648 tar cf archive --anchored \
11649                --exclude="file1.txt" \
11650                testdir
11651 tar tf archive | sort
11652
11653 echo "SUB 3"
11654 tar cf archive testdir file1.txt
11655 tar t "file1.txt" -f archive | sort
11656
11657 echo "SUB 4"
11658 tar t --no-anchored "file1.txt" -f archive | sort
11659
11660 echo "SUB 5"
11661 tar t --anchored "file1.txt" -f archive | sort
11662
11663 rm -rf testdir file1.txt
11664
11665 )
11666 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11667 at_status=$? at_failed=false
11668 $at_check_filter
11669 at_fn_diff_devnull "$at_stderr" || at_failed=:
11670 echo >>"$at_stdout"; $as_echo "testdir/
11671 testdir/file2
11672 SUB 1
11673 testdir/
11674 testdir/file2
11675 SUB 2
11676 testdir/
11677 testdir/file1.txt
11678 testdir/file2
11679 SUB 3
11680 file1.txt
11681 SUB 4
11682 file1.txt
11683 testdir/file1.txt
11684 SUB 5
11685 file1.txt
11686 " | \
11687   $at_diff - "$at_stdout" || at_failed=:
11688 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
11689 $at_failed && at_fn_log_failure
11690 $at_traceon; }
11691
11692               { set +x
11693 $as_echo "$at_srcdir/exclude02.at:22:
11694 mkdir posix
11695 (cd posix
11696 TEST_TAR_FORMAT=posix
11697 export TEST_TAR_FORMAT
11698 TAR_OPTIONS=\"-H posix\"
11699 export TAR_OPTIONS
11700 rm -rf *
11701
11702
11703 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11704
11705
11706 rm -rf testdir
11707 mkdir -p testdir
11708 touch file1.txt
11709 touch testdir/file1.txt
11710 touch testdir/file2
11711
11712 tar cf archive --exclude=\"file1.txt\" \\
11713                testdir
11714 tar tf archive | sort
11715
11716 echo \"SUB 1\"
11717 tar cf archive --no-anchored \\
11718                --exclude=\"file1.txt\" \\
11719                testdir
11720 tar tf archive | sort
11721
11722 echo \"SUB 2\"
11723 tar cf archive --anchored \\
11724                --exclude=\"file1.txt\" \\
11725                testdir
11726 tar tf archive | sort
11727
11728 echo \"SUB 3\"
11729 tar cf archive testdir file1.txt
11730 tar t \"file1.txt\" -f archive | sort
11731
11732 echo \"SUB 4\"
11733 tar t --no-anchored \"file1.txt\" -f archive | sort
11734
11735 echo \"SUB 5\"
11736 tar t --anchored \"file1.txt\" -f archive | sort
11737
11738 rm -rf testdir file1.txt
11739
11740 )"
11741 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
11742 ( $at_check_trace;
11743 mkdir posix
11744 (cd posix
11745 TEST_TAR_FORMAT=posix
11746 export TEST_TAR_FORMAT
11747 TAR_OPTIONS="-H posix"
11748 export TAR_OPTIONS
11749 rm -rf *
11750
11751
11752 test -z "`sort < /dev/null 2>&1`" || exit 77
11753
11754
11755 rm -rf testdir
11756 mkdir -p testdir
11757 touch file1.txt
11758 touch testdir/file1.txt
11759 touch testdir/file2
11760
11761 tar cf archive --exclude="file1.txt" \
11762                testdir
11763 tar tf archive | sort
11764
11765 echo "SUB 1"
11766 tar cf archive --no-anchored \
11767                --exclude="file1.txt" \
11768                testdir
11769 tar tf archive | sort
11770
11771 echo "SUB 2"
11772 tar cf archive --anchored \
11773                --exclude="file1.txt" \
11774                testdir
11775 tar tf archive | sort
11776
11777 echo "SUB 3"
11778 tar cf archive testdir file1.txt
11779 tar t "file1.txt" -f archive | sort
11780
11781 echo "SUB 4"
11782 tar t --no-anchored "file1.txt" -f archive | sort
11783
11784 echo "SUB 5"
11785 tar t --anchored "file1.txt" -f archive | sort
11786
11787 rm -rf testdir file1.txt
11788
11789 )
11790 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11791 at_status=$? at_failed=false
11792 $at_check_filter
11793 at_fn_diff_devnull "$at_stderr" || at_failed=:
11794 echo >>"$at_stdout"; $as_echo "testdir/
11795 testdir/file2
11796 SUB 1
11797 testdir/
11798 testdir/file2
11799 SUB 2
11800 testdir/
11801 testdir/file1.txt
11802 testdir/file2
11803 SUB 3
11804 file1.txt
11805 SUB 4
11806 file1.txt
11807 testdir/file1.txt
11808 SUB 5
11809 file1.txt
11810 " | \
11811   $at_diff - "$at_stdout" || at_failed=:
11812 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
11813 $at_failed && at_fn_log_failure
11814 $at_traceon; }
11815
11816               { set +x
11817 $as_echo "$at_srcdir/exclude02.at:22:
11818 mkdir gnu
11819 (cd gnu
11820 TEST_TAR_FORMAT=gnu
11821 export TEST_TAR_FORMAT
11822 TAR_OPTIONS=\"-H gnu\"
11823 export TAR_OPTIONS
11824 rm -rf *
11825
11826
11827 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11828
11829
11830 rm -rf testdir
11831 mkdir -p testdir
11832 touch file1.txt
11833 touch testdir/file1.txt
11834 touch testdir/file2
11835
11836 tar cf archive --exclude=\"file1.txt\" \\
11837                testdir
11838 tar tf archive | sort
11839
11840 echo \"SUB 1\"
11841 tar cf archive --no-anchored \\
11842                --exclude=\"file1.txt\" \\
11843                testdir
11844 tar tf archive | sort
11845
11846 echo \"SUB 2\"
11847 tar cf archive --anchored \\
11848                --exclude=\"file1.txt\" \\
11849                testdir
11850 tar tf archive | sort
11851
11852 echo \"SUB 3\"
11853 tar cf archive testdir file1.txt
11854 tar t \"file1.txt\" -f archive | sort
11855
11856 echo \"SUB 4\"
11857 tar t --no-anchored \"file1.txt\" -f archive | sort
11858
11859 echo \"SUB 5\"
11860 tar t --anchored \"file1.txt\" -f archive | sort
11861
11862 rm -rf testdir file1.txt
11863
11864 )"
11865 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
11866 ( $at_check_trace;
11867 mkdir gnu
11868 (cd gnu
11869 TEST_TAR_FORMAT=gnu
11870 export TEST_TAR_FORMAT
11871 TAR_OPTIONS="-H gnu"
11872 export TAR_OPTIONS
11873 rm -rf *
11874
11875
11876 test -z "`sort < /dev/null 2>&1`" || exit 77
11877
11878
11879 rm -rf testdir
11880 mkdir -p testdir
11881 touch file1.txt
11882 touch testdir/file1.txt
11883 touch testdir/file2
11884
11885 tar cf archive --exclude="file1.txt" \
11886                testdir
11887 tar tf archive | sort
11888
11889 echo "SUB 1"
11890 tar cf archive --no-anchored \
11891                --exclude="file1.txt" \
11892                testdir
11893 tar tf archive | sort
11894
11895 echo "SUB 2"
11896 tar cf archive --anchored \
11897                --exclude="file1.txt" \
11898                testdir
11899 tar tf archive | sort
11900
11901 echo "SUB 3"
11902 tar cf archive testdir file1.txt
11903 tar t "file1.txt" -f archive | sort
11904
11905 echo "SUB 4"
11906 tar t --no-anchored "file1.txt" -f archive | sort
11907
11908 echo "SUB 5"
11909 tar t --anchored "file1.txt" -f archive | sort
11910
11911 rm -rf testdir file1.txt
11912
11913 )
11914 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11915 at_status=$? at_failed=false
11916 $at_check_filter
11917 at_fn_diff_devnull "$at_stderr" || at_failed=:
11918 echo >>"$at_stdout"; $as_echo "testdir/
11919 testdir/file2
11920 SUB 1
11921 testdir/
11922 testdir/file2
11923 SUB 2
11924 testdir/
11925 testdir/file1.txt
11926 testdir/file2
11927 SUB 3
11928 file1.txt
11929 SUB 4
11930 file1.txt
11931 testdir/file1.txt
11932 SUB 5
11933 file1.txt
11934 " | \
11935   $at_diff - "$at_stdout" || at_failed=:
11936 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
11937 $at_failed && at_fn_log_failure
11938 $at_traceon; }
11939
11940
11941
11942
11943   set +x
11944   $at_times_p && times >"$at_times_file"
11945 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11946 read at_status <"$at_status_file"
11947 #AT_STOP_44
11948 #AT_START_45
11949 at_fn_group_banner 45 'exclude03.at:19' \
11950   "exclude: wildcards match slash" "                 " 7
11951 at_xfail=no
11952       test -f $XFAILFILE && at_xfail=yes
11953 (
11954   $as_echo "45. $at_setup_line: testing $at_desc ..."
11955   $at_traceon
11956
11957
11958
11959
11960
11961   { set +x
11962 $as_echo "$at_srcdir/exclude03.at:22:
11963 mkdir v7
11964 (cd v7
11965 TEST_TAR_FORMAT=v7
11966 export TEST_TAR_FORMAT
11967 TAR_OPTIONS=\"-H v7\"
11968 export TAR_OPTIONS
11969 rm -rf *
11970
11971
11972 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11973
11974
11975 rm -rf testdir
11976 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
11977 touch testdir/\\*f\\*1
11978 touch testdir/dir1/file1
11979 touch testdir/dir1/\\*
11980 touch testdir/dir2/file2
11981 touch testdir/dir2/\\*
11982 touch testdir/dir3/file3
11983 touch testdir/dir3/\\*
11984
11985 tar cf archive --exclude='testdir*f*1' \\
11986                --no-wildcards-match-slash \\
11987                --exclude='testdir*f*2' \\
11988                --wildcards-match-slash \\
11989                --exclude='testdir*f*3' \\
11990                testdir
11991 tar tf archive | sort
11992
11993 echo \"NEXT\"
11994 tar cf archive testdir
11995 tar t --wildcards 'testdir/*f*1' -f archive | sort
11996
11997 echo \"NEXT\"
11998 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
11999
12000 echo \"NEXT\"
12001 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12002
12003 rm -rf testdir
12004
12005 )"
12006 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
12007 ( $at_check_trace;
12008 mkdir v7
12009 (cd v7
12010 TEST_TAR_FORMAT=v7
12011 export TEST_TAR_FORMAT
12012 TAR_OPTIONS="-H v7"
12013 export TAR_OPTIONS
12014 rm -rf *
12015
12016
12017 test -z "`sort < /dev/null 2>&1`" || exit 77
12018
12019
12020 rm -rf testdir
12021 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12022 touch testdir/\*f\*1
12023 touch testdir/dir1/file1
12024 touch testdir/dir1/\*
12025 touch testdir/dir2/file2
12026 touch testdir/dir2/\*
12027 touch testdir/dir3/file3
12028 touch testdir/dir3/\*
12029
12030 tar cf archive --exclude='testdir*f*1' \
12031                --no-wildcards-match-slash \
12032                --exclude='testdir*f*2' \
12033                --wildcards-match-slash \
12034                --exclude='testdir*f*3' \
12035                testdir
12036 tar tf archive | sort
12037
12038 echo "NEXT"
12039 tar cf archive testdir
12040 tar t --wildcards 'testdir/*f*1' -f archive | sort
12041
12042 echo "NEXT"
12043 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12044
12045 echo "NEXT"
12046 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12047
12048 rm -rf testdir
12049
12050 )
12051 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12052 at_status=$? at_failed=false
12053 $at_check_filter
12054 at_fn_diff_devnull "$at_stderr" || at_failed=:
12055 echo >>"$at_stdout"; $as_echo "testdir/
12056 testdir/dir1/
12057 testdir/dir1/*
12058 testdir/dir2/
12059 testdir/dir2/*
12060 testdir/dir2/file2
12061 testdir/dir3/
12062 testdir/dir3/*
12063 NEXT
12064 testdir/*f*1
12065 testdir/dir1/file1
12066 NEXT
12067 testdir/*f*1
12068 NEXT
12069 testdir/*f*1
12070 testdir/dir1/file1
12071 " | \
12072   $at_diff - "$at_stdout" || at_failed=:
12073 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
12074 $at_failed && at_fn_log_failure
12075 $at_traceon; }
12076
12077               { set +x
12078 $as_echo "$at_srcdir/exclude03.at:22:
12079 mkdir oldgnu
12080 (cd oldgnu
12081 TEST_TAR_FORMAT=oldgnu
12082 export TEST_TAR_FORMAT
12083 TAR_OPTIONS=\"-H oldgnu\"
12084 export TAR_OPTIONS
12085 rm -rf *
12086
12087
12088 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12089
12090
12091 rm -rf testdir
12092 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12093 touch testdir/\\*f\\*1
12094 touch testdir/dir1/file1
12095 touch testdir/dir1/\\*
12096 touch testdir/dir2/file2
12097 touch testdir/dir2/\\*
12098 touch testdir/dir3/file3
12099 touch testdir/dir3/\\*
12100
12101 tar cf archive --exclude='testdir*f*1' \\
12102                --no-wildcards-match-slash \\
12103                --exclude='testdir*f*2' \\
12104                --wildcards-match-slash \\
12105                --exclude='testdir*f*3' \\
12106                testdir
12107 tar tf archive | sort
12108
12109 echo \"NEXT\"
12110 tar cf archive testdir
12111 tar t --wildcards 'testdir/*f*1' -f archive | sort
12112
12113 echo \"NEXT\"
12114 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12115
12116 echo \"NEXT\"
12117 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12118
12119 rm -rf testdir
12120
12121 )"
12122 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
12123 ( $at_check_trace;
12124 mkdir oldgnu
12125 (cd oldgnu
12126 TEST_TAR_FORMAT=oldgnu
12127 export TEST_TAR_FORMAT
12128 TAR_OPTIONS="-H oldgnu"
12129 export TAR_OPTIONS
12130 rm -rf *
12131
12132
12133 test -z "`sort < /dev/null 2>&1`" || exit 77
12134
12135
12136 rm -rf testdir
12137 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12138 touch testdir/\*f\*1
12139 touch testdir/dir1/file1
12140 touch testdir/dir1/\*
12141 touch testdir/dir2/file2
12142 touch testdir/dir2/\*
12143 touch testdir/dir3/file3
12144 touch testdir/dir3/\*
12145
12146 tar cf archive --exclude='testdir*f*1' \
12147                --no-wildcards-match-slash \
12148                --exclude='testdir*f*2' \
12149                --wildcards-match-slash \
12150                --exclude='testdir*f*3' \
12151                testdir
12152 tar tf archive | sort
12153
12154 echo "NEXT"
12155 tar cf archive testdir
12156 tar t --wildcards 'testdir/*f*1' -f archive | sort
12157
12158 echo "NEXT"
12159 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12160
12161 echo "NEXT"
12162 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12163
12164 rm -rf testdir
12165
12166 )
12167 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12168 at_status=$? at_failed=false
12169 $at_check_filter
12170 at_fn_diff_devnull "$at_stderr" || at_failed=:
12171 echo >>"$at_stdout"; $as_echo "testdir/
12172 testdir/dir1/
12173 testdir/dir1/*
12174 testdir/dir2/
12175 testdir/dir2/*
12176 testdir/dir2/file2
12177 testdir/dir3/
12178 testdir/dir3/*
12179 NEXT
12180 testdir/*f*1
12181 testdir/dir1/file1
12182 NEXT
12183 testdir/*f*1
12184 NEXT
12185 testdir/*f*1
12186 testdir/dir1/file1
12187 " | \
12188   $at_diff - "$at_stdout" || at_failed=:
12189 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
12190 $at_failed && at_fn_log_failure
12191 $at_traceon; }
12192
12193               { set +x
12194 $as_echo "$at_srcdir/exclude03.at:22:
12195 mkdir ustar
12196 (cd ustar
12197 TEST_TAR_FORMAT=ustar
12198 export TEST_TAR_FORMAT
12199 TAR_OPTIONS=\"-H ustar\"
12200 export TAR_OPTIONS
12201 rm -rf *
12202
12203
12204 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12205
12206
12207 rm -rf testdir
12208 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12209 touch testdir/\\*f\\*1
12210 touch testdir/dir1/file1
12211 touch testdir/dir1/\\*
12212 touch testdir/dir2/file2
12213 touch testdir/dir2/\\*
12214 touch testdir/dir3/file3
12215 touch testdir/dir3/\\*
12216
12217 tar cf archive --exclude='testdir*f*1' \\
12218                --no-wildcards-match-slash \\
12219                --exclude='testdir*f*2' \\
12220                --wildcards-match-slash \\
12221                --exclude='testdir*f*3' \\
12222                testdir
12223 tar tf archive | sort
12224
12225 echo \"NEXT\"
12226 tar cf archive testdir
12227 tar t --wildcards 'testdir/*f*1' -f archive | sort
12228
12229 echo \"NEXT\"
12230 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12231
12232 echo \"NEXT\"
12233 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12234
12235 rm -rf testdir
12236
12237 )"
12238 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
12239 ( $at_check_trace;
12240 mkdir ustar
12241 (cd ustar
12242 TEST_TAR_FORMAT=ustar
12243 export TEST_TAR_FORMAT
12244 TAR_OPTIONS="-H ustar"
12245 export TAR_OPTIONS
12246 rm -rf *
12247
12248
12249 test -z "`sort < /dev/null 2>&1`" || exit 77
12250
12251
12252 rm -rf testdir
12253 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12254 touch testdir/\*f\*1
12255 touch testdir/dir1/file1
12256 touch testdir/dir1/\*
12257 touch testdir/dir2/file2
12258 touch testdir/dir2/\*
12259 touch testdir/dir3/file3
12260 touch testdir/dir3/\*
12261
12262 tar cf archive --exclude='testdir*f*1' \
12263                --no-wildcards-match-slash \
12264                --exclude='testdir*f*2' \
12265                --wildcards-match-slash \
12266                --exclude='testdir*f*3' \
12267                testdir
12268 tar tf archive | sort
12269
12270 echo "NEXT"
12271 tar cf archive testdir
12272 tar t --wildcards 'testdir/*f*1' -f archive | sort
12273
12274 echo "NEXT"
12275 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12276
12277 echo "NEXT"
12278 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12279
12280 rm -rf testdir
12281
12282 )
12283 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12284 at_status=$? at_failed=false
12285 $at_check_filter
12286 at_fn_diff_devnull "$at_stderr" || at_failed=:
12287 echo >>"$at_stdout"; $as_echo "testdir/
12288 testdir/dir1/
12289 testdir/dir1/*
12290 testdir/dir2/
12291 testdir/dir2/*
12292 testdir/dir2/file2
12293 testdir/dir3/
12294 testdir/dir3/*
12295 NEXT
12296 testdir/*f*1
12297 testdir/dir1/file1
12298 NEXT
12299 testdir/*f*1
12300 NEXT
12301 testdir/*f*1
12302 testdir/dir1/file1
12303 " | \
12304   $at_diff - "$at_stdout" || at_failed=:
12305 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
12306 $at_failed && at_fn_log_failure
12307 $at_traceon; }
12308
12309               { set +x
12310 $as_echo "$at_srcdir/exclude03.at:22:
12311 mkdir posix
12312 (cd posix
12313 TEST_TAR_FORMAT=posix
12314 export TEST_TAR_FORMAT
12315 TAR_OPTIONS=\"-H posix\"
12316 export TAR_OPTIONS
12317 rm -rf *
12318
12319
12320 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12321
12322
12323 rm -rf testdir
12324 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12325 touch testdir/\\*f\\*1
12326 touch testdir/dir1/file1
12327 touch testdir/dir1/\\*
12328 touch testdir/dir2/file2
12329 touch testdir/dir2/\\*
12330 touch testdir/dir3/file3
12331 touch testdir/dir3/\\*
12332
12333 tar cf archive --exclude='testdir*f*1' \\
12334                --no-wildcards-match-slash \\
12335                --exclude='testdir*f*2' \\
12336                --wildcards-match-slash \\
12337                --exclude='testdir*f*3' \\
12338                testdir
12339 tar tf archive | sort
12340
12341 echo \"NEXT\"
12342 tar cf archive testdir
12343 tar t --wildcards 'testdir/*f*1' -f archive | sort
12344
12345 echo \"NEXT\"
12346 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12347
12348 echo \"NEXT\"
12349 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12350
12351 rm -rf testdir
12352
12353 )"
12354 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
12355 ( $at_check_trace;
12356 mkdir posix
12357 (cd posix
12358 TEST_TAR_FORMAT=posix
12359 export TEST_TAR_FORMAT
12360 TAR_OPTIONS="-H posix"
12361 export TAR_OPTIONS
12362 rm -rf *
12363
12364
12365 test -z "`sort < /dev/null 2>&1`" || exit 77
12366
12367
12368 rm -rf testdir
12369 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12370 touch testdir/\*f\*1
12371 touch testdir/dir1/file1
12372 touch testdir/dir1/\*
12373 touch testdir/dir2/file2
12374 touch testdir/dir2/\*
12375 touch testdir/dir3/file3
12376 touch testdir/dir3/\*
12377
12378 tar cf archive --exclude='testdir*f*1' \
12379                --no-wildcards-match-slash \
12380                --exclude='testdir*f*2' \
12381                --wildcards-match-slash \
12382                --exclude='testdir*f*3' \
12383                testdir
12384 tar tf archive | sort
12385
12386 echo "NEXT"
12387 tar cf archive testdir
12388 tar t --wildcards 'testdir/*f*1' -f archive | sort
12389
12390 echo "NEXT"
12391 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12392
12393 echo "NEXT"
12394 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12395
12396 rm -rf testdir
12397
12398 )
12399 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12400 at_status=$? at_failed=false
12401 $at_check_filter
12402 at_fn_diff_devnull "$at_stderr" || at_failed=:
12403 echo >>"$at_stdout"; $as_echo "testdir/
12404 testdir/dir1/
12405 testdir/dir1/*
12406 testdir/dir2/
12407 testdir/dir2/*
12408 testdir/dir2/file2
12409 testdir/dir3/
12410 testdir/dir3/*
12411 NEXT
12412 testdir/*f*1
12413 testdir/dir1/file1
12414 NEXT
12415 testdir/*f*1
12416 NEXT
12417 testdir/*f*1
12418 testdir/dir1/file1
12419 " | \
12420   $at_diff - "$at_stdout" || at_failed=:
12421 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
12422 $at_failed && at_fn_log_failure
12423 $at_traceon; }
12424
12425               { set +x
12426 $as_echo "$at_srcdir/exclude03.at:22:
12427 mkdir gnu
12428 (cd gnu
12429 TEST_TAR_FORMAT=gnu
12430 export TEST_TAR_FORMAT
12431 TAR_OPTIONS=\"-H gnu\"
12432 export TAR_OPTIONS
12433 rm -rf *
12434
12435
12436 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12437
12438
12439 rm -rf testdir
12440 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12441 touch testdir/\\*f\\*1
12442 touch testdir/dir1/file1
12443 touch testdir/dir1/\\*
12444 touch testdir/dir2/file2
12445 touch testdir/dir2/\\*
12446 touch testdir/dir3/file3
12447 touch testdir/dir3/\\*
12448
12449 tar cf archive --exclude='testdir*f*1' \\
12450                --no-wildcards-match-slash \\
12451                --exclude='testdir*f*2' \\
12452                --wildcards-match-slash \\
12453                --exclude='testdir*f*3' \\
12454                testdir
12455 tar tf archive | sort
12456
12457 echo \"NEXT\"
12458 tar cf archive testdir
12459 tar t --wildcards 'testdir/*f*1' -f archive | sort
12460
12461 echo \"NEXT\"
12462 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12463
12464 echo \"NEXT\"
12465 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12466
12467 rm -rf testdir
12468
12469 )"
12470 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
12471 ( $at_check_trace;
12472 mkdir gnu
12473 (cd gnu
12474 TEST_TAR_FORMAT=gnu
12475 export TEST_TAR_FORMAT
12476 TAR_OPTIONS="-H gnu"
12477 export TAR_OPTIONS
12478 rm -rf *
12479
12480
12481 test -z "`sort < /dev/null 2>&1`" || exit 77
12482
12483
12484 rm -rf testdir
12485 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
12486 touch testdir/\*f\*1
12487 touch testdir/dir1/file1
12488 touch testdir/dir1/\*
12489 touch testdir/dir2/file2
12490 touch testdir/dir2/\*
12491 touch testdir/dir3/file3
12492 touch testdir/dir3/\*
12493
12494 tar cf archive --exclude='testdir*f*1' \
12495                --no-wildcards-match-slash \
12496                --exclude='testdir*f*2' \
12497                --wildcards-match-slash \
12498                --exclude='testdir*f*3' \
12499                testdir
12500 tar tf archive | sort
12501
12502 echo "NEXT"
12503 tar cf archive testdir
12504 tar t --wildcards 'testdir/*f*1' -f archive | sort
12505
12506 echo "NEXT"
12507 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
12508
12509 echo "NEXT"
12510 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
12511
12512 rm -rf testdir
12513
12514 )
12515 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12516 at_status=$? at_failed=false
12517 $at_check_filter
12518 at_fn_diff_devnull "$at_stderr" || at_failed=:
12519 echo >>"$at_stdout"; $as_echo "testdir/
12520 testdir/dir1/
12521 testdir/dir1/*
12522 testdir/dir2/
12523 testdir/dir2/*
12524 testdir/dir2/file2
12525 testdir/dir3/
12526 testdir/dir3/*
12527 NEXT
12528 testdir/*f*1
12529 testdir/dir1/file1
12530 NEXT
12531 testdir/*f*1
12532 NEXT
12533 testdir/*f*1
12534 testdir/dir1/file1
12535 " | \
12536   $at_diff - "$at_stdout" || at_failed=:
12537 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
12538 $at_failed && at_fn_log_failure
12539 $at_traceon; }
12540
12541
12542
12543
12544   set +x
12545   $at_times_p && times >"$at_times_file"
12546 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12547 read at_status <"$at_status_file"
12548 #AT_STOP_45
12549 #AT_START_46
12550 at_fn_group_banner 46 'exclude04.at:19' \
12551   "exclude: case insensitive" "                      " 7
12552 at_xfail=no
12553       test -f $XFAILFILE && at_xfail=yes
12554 (
12555   $as_echo "46. $at_setup_line: testing $at_desc ..."
12556   $at_traceon
12557
12558
12559
12560
12561
12562   { set +x
12563 $as_echo "$at_srcdir/exclude04.at:22:
12564 mkdir v7
12565 (cd v7
12566 TEST_TAR_FORMAT=v7
12567 export TEST_TAR_FORMAT
12568 TAR_OPTIONS=\"-H v7\"
12569 export TAR_OPTIONS
12570 rm -rf *
12571
12572
12573 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12574
12575
12576 rm -rf testdir
12577 mkdir -p testdir/dir
12578 touch testdir/file1
12579 touch testdir/file2
12580 touch testdir/file3
12581 touch testdir/file4
12582 touch testdir/dir/File1
12583 touch testdir/dir/File2
12584 touch testdir/dir/File3
12585 touch testdir/dir/File4
12586
12587 tar cf archive --exclude=FILE2 \\
12588                --exclude=file1 \\
12589                --ignore-case \\
12590                --exclude=file3 \\
12591                --no-ignore-case \\
12592                --exclude=FILE2 \\
12593                --exclude=file4 \\
12594                testdir
12595 tar tf archive | sort
12596
12597 echo \"SUB 1\"
12598 tar cf archive testdir
12599 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
12600
12601 echo \"SUB 2\"
12602 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
12603
12604 echo \"SUB 3\"
12605 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
12606
12607 rm -rf testdir
12608
12609 )"
12610 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
12611 ( $at_check_trace;
12612 mkdir v7
12613 (cd v7
12614 TEST_TAR_FORMAT=v7
12615 export TEST_TAR_FORMAT
12616 TAR_OPTIONS="-H v7"
12617 export TAR_OPTIONS
12618 rm -rf *
12619
12620
12621 test -z "`sort < /dev/null 2>&1`" || exit 77
12622
12623
12624 rm -rf testdir
12625 mkdir -p testdir/dir
12626 touch testdir/file1
12627 touch testdir/file2
12628 touch testdir/file3
12629 touch testdir/file4
12630 touch testdir/dir/File1
12631 touch testdir/dir/File2
12632 touch testdir/dir/File3
12633 touch testdir/dir/File4
12634
12635 tar cf archive --exclude=FILE2 \
12636                --exclude=file1 \
12637                --ignore-case \
12638                --exclude=file3 \
12639                --no-ignore-case \
12640                --exclude=FILE2 \
12641                --exclude=file4 \
12642                testdir
12643 tar tf archive | sort
12644
12645 echo "SUB 1"
12646 tar cf archive testdir
12647 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
12648
12649 echo "SUB 2"
12650 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
12651
12652 echo "SUB 3"
12653 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
12654
12655 rm -rf testdir
12656
12657 )
12658 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12659 at_status=$? at_failed=false
12660 $at_check_filter
12661 at_fn_diff_devnull "$at_stderr" || at_failed=:
12662 echo >>"$at_stdout"; $as_echo "testdir/
12663 testdir/dir/
12664 testdir/dir/File1
12665 testdir/dir/File2
12666 testdir/dir/File4
12667 testdir/file2
12668 SUB 1
12669 testdir/dir/File2
12670 SUB 2
12671 testdir/dir/File2
12672 testdir/file2
12673 SUB 3
12674 testdir/dir/File2
12675 " | \
12676   $at_diff - "$at_stdout" || at_failed=:
12677 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
12678 $at_failed && at_fn_log_failure
12679 $at_traceon; }
12680
12681               { set +x
12682 $as_echo "$at_srcdir/exclude04.at:22:
12683 mkdir oldgnu
12684 (cd oldgnu
12685 TEST_TAR_FORMAT=oldgnu
12686 export TEST_TAR_FORMAT
12687 TAR_OPTIONS=\"-H oldgnu\"
12688 export TAR_OPTIONS
12689 rm -rf *
12690
12691
12692 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12693
12694
12695 rm -rf testdir
12696 mkdir -p testdir/dir
12697 touch testdir/file1
12698 touch testdir/file2
12699 touch testdir/file3
12700 touch testdir/file4
12701 touch testdir/dir/File1
12702 touch testdir/dir/File2
12703 touch testdir/dir/File3
12704 touch testdir/dir/File4
12705
12706 tar cf archive --exclude=FILE2 \\
12707                --exclude=file1 \\
12708                --ignore-case \\
12709                --exclude=file3 \\
12710                --no-ignore-case \\
12711                --exclude=FILE2 \\
12712                --exclude=file4 \\
12713                testdir
12714 tar tf archive | sort
12715
12716 echo \"SUB 1\"
12717 tar cf archive testdir
12718 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
12719
12720 echo \"SUB 2\"
12721 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
12722
12723 echo \"SUB 3\"
12724 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
12725
12726 rm -rf testdir
12727
12728 )"
12729 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
12730 ( $at_check_trace;
12731 mkdir oldgnu
12732 (cd oldgnu
12733 TEST_TAR_FORMAT=oldgnu
12734 export TEST_TAR_FORMAT
12735 TAR_OPTIONS="-H oldgnu"
12736 export TAR_OPTIONS
12737 rm -rf *
12738
12739
12740 test -z "`sort < /dev/null 2>&1`" || exit 77
12741
12742
12743 rm -rf testdir
12744 mkdir -p testdir/dir
12745 touch testdir/file1
12746 touch testdir/file2
12747 touch testdir/file3
12748 touch testdir/file4
12749 touch testdir/dir/File1
12750 touch testdir/dir/File2
12751 touch testdir/dir/File3
12752 touch testdir/dir/File4
12753
12754 tar cf archive --exclude=FILE2 \
12755                --exclude=file1 \
12756                --ignore-case \
12757                --exclude=file3 \
12758                --no-ignore-case \
12759                --exclude=FILE2 \
12760                --exclude=file4 \
12761                testdir
12762 tar tf archive | sort
12763
12764 echo "SUB 1"
12765 tar cf archive testdir
12766 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
12767
12768 echo "SUB 2"
12769 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
12770
12771 echo "SUB 3"
12772 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
12773
12774 rm -rf testdir
12775
12776 )
12777 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12778 at_status=$? at_failed=false
12779 $at_check_filter
12780 at_fn_diff_devnull "$at_stderr" || at_failed=:
12781 echo >>"$at_stdout"; $as_echo "testdir/
12782 testdir/dir/
12783 testdir/dir/File1
12784 testdir/dir/File2
12785 testdir/dir/File4
12786 testdir/file2
12787 SUB 1
12788 testdir/dir/File2
12789 SUB 2
12790 testdir/dir/File2
12791 testdir/file2
12792 SUB 3
12793 testdir/dir/File2
12794 " | \
12795   $at_diff - "$at_stdout" || at_failed=:
12796 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
12797 $at_failed && at_fn_log_failure
12798 $at_traceon; }
12799
12800               { set +x
12801 $as_echo "$at_srcdir/exclude04.at:22:
12802 mkdir ustar
12803 (cd ustar
12804 TEST_TAR_FORMAT=ustar
12805 export TEST_TAR_FORMAT
12806 TAR_OPTIONS=\"-H ustar\"
12807 export TAR_OPTIONS
12808 rm -rf *
12809
12810
12811 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12812
12813
12814 rm -rf testdir
12815 mkdir -p testdir/dir
12816 touch testdir/file1
12817 touch testdir/file2
12818 touch testdir/file3
12819 touch testdir/file4
12820 touch testdir/dir/File1
12821 touch testdir/dir/File2
12822 touch testdir/dir/File3
12823 touch testdir/dir/File4
12824
12825 tar cf archive --exclude=FILE2 \\
12826                --exclude=file1 \\
12827                --ignore-case \\
12828                --exclude=file3 \\
12829                --no-ignore-case \\
12830                --exclude=FILE2 \\
12831                --exclude=file4 \\
12832                testdir
12833 tar tf archive | sort
12834
12835 echo \"SUB 1\"
12836 tar cf archive testdir
12837 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
12838
12839 echo \"SUB 2\"
12840 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
12841
12842 echo \"SUB 3\"
12843 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
12844
12845 rm -rf testdir
12846
12847 )"
12848 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
12849 ( $at_check_trace;
12850 mkdir ustar
12851 (cd ustar
12852 TEST_TAR_FORMAT=ustar
12853 export TEST_TAR_FORMAT
12854 TAR_OPTIONS="-H ustar"
12855 export TAR_OPTIONS
12856 rm -rf *
12857
12858
12859 test -z "`sort < /dev/null 2>&1`" || exit 77
12860
12861
12862 rm -rf testdir
12863 mkdir -p testdir/dir
12864 touch testdir/file1
12865 touch testdir/file2
12866 touch testdir/file3
12867 touch testdir/file4
12868 touch testdir/dir/File1
12869 touch testdir/dir/File2
12870 touch testdir/dir/File3
12871 touch testdir/dir/File4
12872
12873 tar cf archive --exclude=FILE2 \
12874                --exclude=file1 \
12875                --ignore-case \
12876                --exclude=file3 \
12877                --no-ignore-case \
12878                --exclude=FILE2 \
12879                --exclude=file4 \
12880                testdir
12881 tar tf archive | sort
12882
12883 echo "SUB 1"
12884 tar cf archive testdir
12885 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
12886
12887 echo "SUB 2"
12888 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
12889
12890 echo "SUB 3"
12891 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
12892
12893 rm -rf testdir
12894
12895 )
12896 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12897 at_status=$? at_failed=false
12898 $at_check_filter
12899 at_fn_diff_devnull "$at_stderr" || at_failed=:
12900 echo >>"$at_stdout"; $as_echo "testdir/
12901 testdir/dir/
12902 testdir/dir/File1
12903 testdir/dir/File2
12904 testdir/dir/File4
12905 testdir/file2
12906 SUB 1
12907 testdir/dir/File2
12908 SUB 2
12909 testdir/dir/File2
12910 testdir/file2
12911 SUB 3
12912 testdir/dir/File2
12913 " | \
12914   $at_diff - "$at_stdout" || at_failed=:
12915 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
12916 $at_failed && at_fn_log_failure
12917 $at_traceon; }
12918
12919               { set +x
12920 $as_echo "$at_srcdir/exclude04.at:22:
12921 mkdir posix
12922 (cd posix
12923 TEST_TAR_FORMAT=posix
12924 export TEST_TAR_FORMAT
12925 TAR_OPTIONS=\"-H posix\"
12926 export TAR_OPTIONS
12927 rm -rf *
12928
12929
12930 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12931
12932
12933 rm -rf testdir
12934 mkdir -p testdir/dir
12935 touch testdir/file1
12936 touch testdir/file2
12937 touch testdir/file3
12938 touch testdir/file4
12939 touch testdir/dir/File1
12940 touch testdir/dir/File2
12941 touch testdir/dir/File3
12942 touch testdir/dir/File4
12943
12944 tar cf archive --exclude=FILE2 \\
12945                --exclude=file1 \\
12946                --ignore-case \\
12947                --exclude=file3 \\
12948                --no-ignore-case \\
12949                --exclude=FILE2 \\
12950                --exclude=file4 \\
12951                testdir
12952 tar tf archive | sort
12953
12954 echo \"SUB 1\"
12955 tar cf archive testdir
12956 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
12957
12958 echo \"SUB 2\"
12959 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
12960
12961 echo \"SUB 3\"
12962 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
12963
12964 rm -rf testdir
12965
12966 )"
12967 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
12968 ( $at_check_trace;
12969 mkdir posix
12970 (cd posix
12971 TEST_TAR_FORMAT=posix
12972 export TEST_TAR_FORMAT
12973 TAR_OPTIONS="-H posix"
12974 export TAR_OPTIONS
12975 rm -rf *
12976
12977
12978 test -z "`sort < /dev/null 2>&1`" || exit 77
12979
12980
12981 rm -rf testdir
12982 mkdir -p testdir/dir
12983 touch testdir/file1
12984 touch testdir/file2
12985 touch testdir/file3
12986 touch testdir/file4
12987 touch testdir/dir/File1
12988 touch testdir/dir/File2
12989 touch testdir/dir/File3
12990 touch testdir/dir/File4
12991
12992 tar cf archive --exclude=FILE2 \
12993                --exclude=file1 \
12994                --ignore-case \
12995                --exclude=file3 \
12996                --no-ignore-case \
12997                --exclude=FILE2 \
12998                --exclude=file4 \
12999                testdir
13000 tar tf archive | sort
13001
13002 echo "SUB 1"
13003 tar cf archive testdir
13004 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
13005
13006 echo "SUB 2"
13007 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
13008
13009 echo "SUB 3"
13010 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
13011
13012 rm -rf testdir
13013
13014 )
13015 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13016 at_status=$? at_failed=false
13017 $at_check_filter
13018 at_fn_diff_devnull "$at_stderr" || at_failed=:
13019 echo >>"$at_stdout"; $as_echo "testdir/
13020 testdir/dir/
13021 testdir/dir/File1
13022 testdir/dir/File2
13023 testdir/dir/File4
13024 testdir/file2
13025 SUB 1
13026 testdir/dir/File2
13027 SUB 2
13028 testdir/dir/File2
13029 testdir/file2
13030 SUB 3
13031 testdir/dir/File2
13032 " | \
13033   $at_diff - "$at_stdout" || at_failed=:
13034 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
13035 $at_failed && at_fn_log_failure
13036 $at_traceon; }
13037
13038               { set +x
13039 $as_echo "$at_srcdir/exclude04.at:22:
13040 mkdir gnu
13041 (cd gnu
13042 TEST_TAR_FORMAT=gnu
13043 export TEST_TAR_FORMAT
13044 TAR_OPTIONS=\"-H gnu\"
13045 export TAR_OPTIONS
13046 rm -rf *
13047
13048
13049 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13050
13051
13052 rm -rf testdir
13053 mkdir -p testdir/dir
13054 touch testdir/file1
13055 touch testdir/file2
13056 touch testdir/file3
13057 touch testdir/file4
13058 touch testdir/dir/File1
13059 touch testdir/dir/File2
13060 touch testdir/dir/File3
13061 touch testdir/dir/File4
13062
13063 tar cf archive --exclude=FILE2 \\
13064                --exclude=file1 \\
13065                --ignore-case \\
13066                --exclude=file3 \\
13067                --no-ignore-case \\
13068                --exclude=FILE2 \\
13069                --exclude=file4 \\
13070                testdir
13071 tar tf archive | sort
13072
13073 echo \"SUB 1\"
13074 tar cf archive testdir
13075 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
13076
13077 echo \"SUB 2\"
13078 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
13079
13080 echo \"SUB 3\"
13081 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
13082
13083 rm -rf testdir
13084
13085 )"
13086 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
13087 ( $at_check_trace;
13088 mkdir gnu
13089 (cd gnu
13090 TEST_TAR_FORMAT=gnu
13091 export TEST_TAR_FORMAT
13092 TAR_OPTIONS="-H gnu"
13093 export TAR_OPTIONS
13094 rm -rf *
13095
13096
13097 test -z "`sort < /dev/null 2>&1`" || exit 77
13098
13099
13100 rm -rf testdir
13101 mkdir -p testdir/dir
13102 touch testdir/file1
13103 touch testdir/file2
13104 touch testdir/file3
13105 touch testdir/file4
13106 touch testdir/dir/File1
13107 touch testdir/dir/File2
13108 touch testdir/dir/File3
13109 touch testdir/dir/File4
13110
13111 tar cf archive --exclude=FILE2 \
13112                --exclude=file1 \
13113                --ignore-case \
13114                --exclude=file3 \
13115                --no-ignore-case \
13116                --exclude=FILE2 \
13117                --exclude=file4 \
13118                testdir
13119 tar tf archive | sort
13120
13121 echo "SUB 1"
13122 tar cf archive testdir
13123 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
13124
13125 echo "SUB 2"
13126 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
13127
13128 echo "SUB 3"
13129 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
13130
13131 rm -rf testdir
13132
13133 )
13134 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13135 at_status=$? at_failed=false
13136 $at_check_filter
13137 at_fn_diff_devnull "$at_stderr" || at_failed=:
13138 echo >>"$at_stdout"; $as_echo "testdir/
13139 testdir/dir/
13140 testdir/dir/File1
13141 testdir/dir/File2
13142 testdir/dir/File4
13143 testdir/file2
13144 SUB 1
13145 testdir/dir/File2
13146 SUB 2
13147 testdir/dir/File2
13148 testdir/file2
13149 SUB 3
13150 testdir/dir/File2
13151 " | \
13152   $at_diff - "$at_stdout" || at_failed=:
13153 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
13154 $at_failed && at_fn_log_failure
13155 $at_traceon; }
13156
13157
13158
13159
13160   set +x
13161   $at_times_p && times >"$at_times_file"
13162 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13163 read at_status <"$at_status_file"
13164 #AT_STOP_46
13165 #AT_START_47
13166 at_fn_group_banner 47 'exclude05.at:21' \
13167   "exclude: lots of excludes" "                      " 7
13168 at_xfail=no
13169       test -f $XFAILFILE && at_xfail=yes
13170 (
13171   $as_echo "47. $at_setup_line: testing $at_desc ..."
13172   $at_traceon
13173
13174
13175
13176
13177
13178   { set +x
13179 $as_echo "$at_srcdir/exclude05.at:24:
13180 mkdir v7
13181 (cd v7
13182 TEST_TAR_FORMAT=v7
13183 export TEST_TAR_FORMAT
13184 TAR_OPTIONS=\"-H v7\"
13185 export TAR_OPTIONS
13186 rm -rf *
13187
13188
13189 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13190
13191
13192 rm -rf testdir exclfile
13193 mkdir -p testdir
13194 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
13195  while read name
13196  do
13197    genfile --file \$name
13198  done
13199
13200 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
13201
13202 tar cf archive --anchored --exclude-from=exclfile \\
13203                testdir
13204 tar tf archive | sort
13205
13206 echo \"NEXT\"
13207 tar cf archive --exclude-from=exclfile \\
13208                testdir
13209 tar tf archive | sort
13210
13211 rm -rf testdir exclfile
13212
13213 )"
13214 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
13215 ( $at_check_trace;
13216 mkdir v7
13217 (cd v7
13218 TEST_TAR_FORMAT=v7
13219 export TEST_TAR_FORMAT
13220 TAR_OPTIONS="-H v7"
13221 export TAR_OPTIONS
13222 rm -rf *
13223
13224
13225 test -z "`sort < /dev/null 2>&1`" || exit 77
13226
13227
13228 rm -rf testdir exclfile
13229 mkdir -p testdir
13230 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
13231  while read name
13232  do
13233    genfile --file $name
13234  done
13235
13236 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
13237
13238 tar cf archive --anchored --exclude-from=exclfile \
13239                testdir
13240 tar tf archive | sort
13241
13242 echo "NEXT"
13243 tar cf archive --exclude-from=exclfile \
13244                testdir
13245 tar tf archive | sort
13246
13247 rm -rf testdir exclfile
13248
13249 )
13250 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13251 at_status=$? at_failed=false
13252 $at_check_filter
13253 at_fn_diff_devnull "$at_stderr" || at_failed=:
13254 echo >>"$at_stdout"; $as_echo "testdir/
13255 testdir/file10
13256 testdir/file11
13257 testdir/file9
13258 NEXT
13259 testdir/
13260 testdir/file10
13261 testdir/file11
13262 testdir/file9
13263 " | \
13264   $at_diff - "$at_stdout" || at_failed=:
13265 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
13266 $at_failed && at_fn_log_failure
13267 $at_traceon; }
13268
13269               { set +x
13270 $as_echo "$at_srcdir/exclude05.at:24:
13271 mkdir oldgnu
13272 (cd oldgnu
13273 TEST_TAR_FORMAT=oldgnu
13274 export TEST_TAR_FORMAT
13275 TAR_OPTIONS=\"-H oldgnu\"
13276 export TAR_OPTIONS
13277 rm -rf *
13278
13279
13280 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13281
13282
13283 rm -rf testdir exclfile
13284 mkdir -p testdir
13285 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
13286  while read name
13287  do
13288    genfile --file \$name
13289  done
13290
13291 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
13292
13293 tar cf archive --anchored --exclude-from=exclfile \\
13294                testdir
13295 tar tf archive | sort
13296
13297 echo \"NEXT\"
13298 tar cf archive --exclude-from=exclfile \\
13299                testdir
13300 tar tf archive | sort
13301
13302 rm -rf testdir exclfile
13303
13304 )"
13305 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
13306 ( $at_check_trace;
13307 mkdir oldgnu
13308 (cd oldgnu
13309 TEST_TAR_FORMAT=oldgnu
13310 export TEST_TAR_FORMAT
13311 TAR_OPTIONS="-H oldgnu"
13312 export TAR_OPTIONS
13313 rm -rf *
13314
13315
13316 test -z "`sort < /dev/null 2>&1`" || exit 77
13317
13318
13319 rm -rf testdir exclfile
13320 mkdir -p testdir
13321 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
13322  while read name
13323  do
13324    genfile --file $name
13325  done
13326
13327 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
13328
13329 tar cf archive --anchored --exclude-from=exclfile \
13330                testdir
13331 tar tf archive | sort
13332
13333 echo "NEXT"
13334 tar cf archive --exclude-from=exclfile \
13335                testdir
13336 tar tf archive | sort
13337
13338 rm -rf testdir exclfile
13339
13340 )
13341 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13342 at_status=$? at_failed=false
13343 $at_check_filter
13344 at_fn_diff_devnull "$at_stderr" || at_failed=:
13345 echo >>"$at_stdout"; $as_echo "testdir/
13346 testdir/file10
13347 testdir/file11
13348 testdir/file9
13349 NEXT
13350 testdir/
13351 testdir/file10
13352 testdir/file11
13353 testdir/file9
13354 " | \
13355   $at_diff - "$at_stdout" || at_failed=:
13356 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
13357 $at_failed && at_fn_log_failure
13358 $at_traceon; }
13359
13360               { set +x
13361 $as_echo "$at_srcdir/exclude05.at:24:
13362 mkdir ustar
13363 (cd ustar
13364 TEST_TAR_FORMAT=ustar
13365 export TEST_TAR_FORMAT
13366 TAR_OPTIONS=\"-H ustar\"
13367 export TAR_OPTIONS
13368 rm -rf *
13369
13370
13371 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13372
13373
13374 rm -rf testdir exclfile
13375 mkdir -p testdir
13376 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
13377  while read name
13378  do
13379    genfile --file \$name
13380  done
13381
13382 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
13383
13384 tar cf archive --anchored --exclude-from=exclfile \\
13385                testdir
13386 tar tf archive | sort
13387
13388 echo \"NEXT\"
13389 tar cf archive --exclude-from=exclfile \\
13390                testdir
13391 tar tf archive | sort
13392
13393 rm -rf testdir exclfile
13394
13395 )"
13396 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
13397 ( $at_check_trace;
13398 mkdir ustar
13399 (cd ustar
13400 TEST_TAR_FORMAT=ustar
13401 export TEST_TAR_FORMAT
13402 TAR_OPTIONS="-H ustar"
13403 export TAR_OPTIONS
13404 rm -rf *
13405
13406
13407 test -z "`sort < /dev/null 2>&1`" || exit 77
13408
13409
13410 rm -rf testdir exclfile
13411 mkdir -p testdir
13412 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
13413  while read name
13414  do
13415    genfile --file $name
13416  done
13417
13418 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
13419
13420 tar cf archive --anchored --exclude-from=exclfile \
13421                testdir
13422 tar tf archive | sort
13423
13424 echo "NEXT"
13425 tar cf archive --exclude-from=exclfile \
13426                testdir
13427 tar tf archive | sort
13428
13429 rm -rf testdir exclfile
13430
13431 )
13432 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13433 at_status=$? at_failed=false
13434 $at_check_filter
13435 at_fn_diff_devnull "$at_stderr" || at_failed=:
13436 echo >>"$at_stdout"; $as_echo "testdir/
13437 testdir/file10
13438 testdir/file11
13439 testdir/file9
13440 NEXT
13441 testdir/
13442 testdir/file10
13443 testdir/file11
13444 testdir/file9
13445 " | \
13446   $at_diff - "$at_stdout" || at_failed=:
13447 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
13448 $at_failed && at_fn_log_failure
13449 $at_traceon; }
13450
13451               { set +x
13452 $as_echo "$at_srcdir/exclude05.at:24:
13453 mkdir posix
13454 (cd posix
13455 TEST_TAR_FORMAT=posix
13456 export TEST_TAR_FORMAT
13457 TAR_OPTIONS=\"-H posix\"
13458 export TAR_OPTIONS
13459 rm -rf *
13460
13461
13462 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13463
13464
13465 rm -rf testdir exclfile
13466 mkdir -p testdir
13467 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
13468  while read name
13469  do
13470    genfile --file \$name
13471  done
13472
13473 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
13474
13475 tar cf archive --anchored --exclude-from=exclfile \\
13476                testdir
13477 tar tf archive | sort
13478
13479 echo \"NEXT\"
13480 tar cf archive --exclude-from=exclfile \\
13481                testdir
13482 tar tf archive | sort
13483
13484 rm -rf testdir exclfile
13485
13486 )"
13487 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
13488 ( $at_check_trace;
13489 mkdir posix
13490 (cd posix
13491 TEST_TAR_FORMAT=posix
13492 export TEST_TAR_FORMAT
13493 TAR_OPTIONS="-H posix"
13494 export TAR_OPTIONS
13495 rm -rf *
13496
13497
13498 test -z "`sort < /dev/null 2>&1`" || exit 77
13499
13500
13501 rm -rf testdir exclfile
13502 mkdir -p testdir
13503 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
13504  while read name
13505  do
13506    genfile --file $name
13507  done
13508
13509 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
13510
13511 tar cf archive --anchored --exclude-from=exclfile \
13512                testdir
13513 tar tf archive | sort
13514
13515 echo "NEXT"
13516 tar cf archive --exclude-from=exclfile \
13517                testdir
13518 tar tf archive | sort
13519
13520 rm -rf testdir exclfile
13521
13522 )
13523 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13524 at_status=$? at_failed=false
13525 $at_check_filter
13526 at_fn_diff_devnull "$at_stderr" || at_failed=:
13527 echo >>"$at_stdout"; $as_echo "testdir/
13528 testdir/file10
13529 testdir/file11
13530 testdir/file9
13531 NEXT
13532 testdir/
13533 testdir/file10
13534 testdir/file11
13535 testdir/file9
13536 " | \
13537   $at_diff - "$at_stdout" || at_failed=:
13538 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
13539 $at_failed && at_fn_log_failure
13540 $at_traceon; }
13541
13542               { set +x
13543 $as_echo "$at_srcdir/exclude05.at:24:
13544 mkdir gnu
13545 (cd gnu
13546 TEST_TAR_FORMAT=gnu
13547 export TEST_TAR_FORMAT
13548 TAR_OPTIONS=\"-H gnu\"
13549 export TAR_OPTIONS
13550 rm -rf *
13551
13552
13553 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
13554
13555
13556 rm -rf testdir exclfile
13557 mkdir -p testdir
13558 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
13559  while read name
13560  do
13561    genfile --file \$name
13562  done
13563
13564 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
13565
13566 tar cf archive --anchored --exclude-from=exclfile \\
13567                testdir
13568 tar tf archive | sort
13569
13570 echo \"NEXT\"
13571 tar cf archive --exclude-from=exclfile \\
13572                testdir
13573 tar tf archive | sort
13574
13575 rm -rf testdir exclfile
13576
13577 )"
13578 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
13579 ( $at_check_trace;
13580 mkdir gnu
13581 (cd gnu
13582 TEST_TAR_FORMAT=gnu
13583 export TEST_TAR_FORMAT
13584 TAR_OPTIONS="-H gnu"
13585 export TAR_OPTIONS
13586 rm -rf *
13587
13588
13589 test -z "`sort < /dev/null 2>&1`" || exit 77
13590
13591
13592 rm -rf testdir exclfile
13593 mkdir -p testdir
13594 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
13595  while read name
13596  do
13597    genfile --file $name
13598  done
13599
13600 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
13601
13602 tar cf archive --anchored --exclude-from=exclfile \
13603                testdir
13604 tar tf archive | sort
13605
13606 echo "NEXT"
13607 tar cf archive --exclude-from=exclfile \
13608                testdir
13609 tar tf archive | sort
13610
13611 rm -rf testdir exclfile
13612
13613 )
13614 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13615 at_status=$? at_failed=false
13616 $at_check_filter
13617 at_fn_diff_devnull "$at_stderr" || at_failed=:
13618 echo >>"$at_stdout"; $as_echo "testdir/
13619 testdir/file10
13620 testdir/file11
13621 testdir/file9
13622 NEXT
13623 testdir/
13624 testdir/file10
13625 testdir/file11
13626 testdir/file9
13627 " | \
13628   $at_diff - "$at_stdout" || at_failed=:
13629 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
13630 $at_failed && at_fn_log_failure
13631 $at_traceon; }
13632
13633
13634
13635
13636   set +x
13637   $at_times_p && times >"$at_times_file"
13638 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13639 read at_status <"$at_status_file"
13640 #AT_STOP_47
13641 #AT_START_48
13642 at_fn_group_banner 48 'exclude06.at:26' \
13643   "exclude: long files in pax archives" "            " 7
13644 at_xfail=no
13645       test -f $XFAILFILE && at_xfail=yes
13646 (
13647   $as_echo "48. $at_setup_line: testing $at_desc ..."
13648   $at_traceon
13649
13650
13651
13652
13653
13654
13655
13656   { set +x
13657 $as_echo "$at_srcdir/exclude06.at:31:
13658 mkdir pax
13659 (cd pax
13660 TEST_TAR_FORMAT=pax
13661 export TEST_TAR_FORMAT
13662 TAR_OPTIONS=\"-H pax\"
13663 export TAR_OPTIONS
13664 rm -rf *
13665
13666
13667 install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null  || exit 77
13668 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
13669 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
13670
13671 tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
13672 mkdir out
13673 tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
13674 find out -type f
13675 )"
13676 at_fn_check_prepare_notrace 'an embedded newline' "exclude06.at:31"
13677 ( $at_check_trace;
13678 mkdir pax
13679 (cd pax
13680 TEST_TAR_FORMAT=pax
13681 export TEST_TAR_FORMAT
13682 TAR_OPTIONS="-H pax"
13683 export TAR_OPTIONS
13684 rm -rf *
13685
13686
13687 install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null  || exit 77
13688 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
13689 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
13690
13691 tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
13692 mkdir out
13693 tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
13694 find out -type f
13695 )
13696 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13697 at_status=$? at_failed=false
13698 $at_check_filter
13699 at_fn_diff_devnull "$at_stderr" || at_failed=:
13700 echo >>"$at_stdout"; $as_echo "out/one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
13701 " | \
13702   $at_diff - "$at_stdout" || at_failed=:
13703 at_fn_check_status 0 $at_status "$at_srcdir/exclude06.at:31"
13704 $at_failed && at_fn_log_failure
13705 $at_traceon; }
13706
13707
13708
13709
13710
13711   set +x
13712   $at_times_p && times >"$at_times_file"
13713 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13714 read at_status <"$at_status_file"
13715 #AT_STOP_48
13716 #AT_START_49
13717 at_fn_group_banner 49 'exclude07.at:19' \
13718   "exclude: --exclude-backups option" "              " 7
13719 at_xfail=no
13720       test -f $XFAILFILE && at_xfail=yes
13721 (
13722   $as_echo "49. $at_setup_line: testing $at_desc ..."
13723   $at_traceon
13724
13725
13726
13727
13728
13729   { set +x
13730 $as_echo "$at_srcdir/exclude07.at:22:
13731 mkdir v7
13732 (cd v7
13733 TEST_TAR_FORMAT=v7
13734 export TEST_TAR_FORMAT
13735 TAR_OPTIONS=\"-H v7\"
13736 export TAR_OPTIONS
13737 rm -rf *
13738
13739 mkdir dir
13740 genfile --file dir/file
13741 genfile --file dir/file~
13742 genfile --file \"dir/.#file\"
13743 genfile --file \"dir/#file#\"
13744
13745 tar -v -c -f archive --exclude-backups dir
13746 )"
13747 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
13748 ( $at_check_trace;
13749 mkdir v7
13750 (cd v7
13751 TEST_TAR_FORMAT=v7
13752 export TEST_TAR_FORMAT
13753 TAR_OPTIONS="-H v7"
13754 export TAR_OPTIONS
13755 rm -rf *
13756
13757 mkdir dir
13758 genfile --file dir/file
13759 genfile --file dir/file~
13760 genfile --file "dir/.#file"
13761 genfile --file "dir/#file#"
13762
13763 tar -v -c -f archive --exclude-backups dir
13764 )
13765 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13766 at_status=$? at_failed=false
13767 $at_check_filter
13768 at_fn_diff_devnull "$at_stderr" || at_failed=:
13769 echo >>"$at_stdout"; $as_echo "dir/
13770 dir/file
13771 " | \
13772   $at_diff - "$at_stdout" || at_failed=:
13773 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
13774 $at_failed && at_fn_log_failure
13775 $at_traceon; }
13776
13777               { set +x
13778 $as_echo "$at_srcdir/exclude07.at:22:
13779 mkdir oldgnu
13780 (cd oldgnu
13781 TEST_TAR_FORMAT=oldgnu
13782 export TEST_TAR_FORMAT
13783 TAR_OPTIONS=\"-H oldgnu\"
13784 export TAR_OPTIONS
13785 rm -rf *
13786
13787 mkdir dir
13788 genfile --file dir/file
13789 genfile --file dir/file~
13790 genfile --file \"dir/.#file\"
13791 genfile --file \"dir/#file#\"
13792
13793 tar -v -c -f archive --exclude-backups dir
13794 )"
13795 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
13796 ( $at_check_trace;
13797 mkdir oldgnu
13798 (cd oldgnu
13799 TEST_TAR_FORMAT=oldgnu
13800 export TEST_TAR_FORMAT
13801 TAR_OPTIONS="-H oldgnu"
13802 export TAR_OPTIONS
13803 rm -rf *
13804
13805 mkdir dir
13806 genfile --file dir/file
13807 genfile --file dir/file~
13808 genfile --file "dir/.#file"
13809 genfile --file "dir/#file#"
13810
13811 tar -v -c -f archive --exclude-backups dir
13812 )
13813 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13814 at_status=$? at_failed=false
13815 $at_check_filter
13816 at_fn_diff_devnull "$at_stderr" || at_failed=:
13817 echo >>"$at_stdout"; $as_echo "dir/
13818 dir/file
13819 " | \
13820   $at_diff - "$at_stdout" || at_failed=:
13821 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
13822 $at_failed && at_fn_log_failure
13823 $at_traceon; }
13824
13825               { set +x
13826 $as_echo "$at_srcdir/exclude07.at:22:
13827 mkdir ustar
13828 (cd ustar
13829 TEST_TAR_FORMAT=ustar
13830 export TEST_TAR_FORMAT
13831 TAR_OPTIONS=\"-H ustar\"
13832 export TAR_OPTIONS
13833 rm -rf *
13834
13835 mkdir dir
13836 genfile --file dir/file
13837 genfile --file dir/file~
13838 genfile --file \"dir/.#file\"
13839 genfile --file \"dir/#file#\"
13840
13841 tar -v -c -f archive --exclude-backups dir
13842 )"
13843 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
13844 ( $at_check_trace;
13845 mkdir ustar
13846 (cd ustar
13847 TEST_TAR_FORMAT=ustar
13848 export TEST_TAR_FORMAT
13849 TAR_OPTIONS="-H ustar"
13850 export TAR_OPTIONS
13851 rm -rf *
13852
13853 mkdir dir
13854 genfile --file dir/file
13855 genfile --file dir/file~
13856 genfile --file "dir/.#file"
13857 genfile --file "dir/#file#"
13858
13859 tar -v -c -f archive --exclude-backups dir
13860 )
13861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13862 at_status=$? at_failed=false
13863 $at_check_filter
13864 at_fn_diff_devnull "$at_stderr" || at_failed=:
13865 echo >>"$at_stdout"; $as_echo "dir/
13866 dir/file
13867 " | \
13868   $at_diff - "$at_stdout" || at_failed=:
13869 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
13870 $at_failed && at_fn_log_failure
13871 $at_traceon; }
13872
13873               { set +x
13874 $as_echo "$at_srcdir/exclude07.at:22:
13875 mkdir posix
13876 (cd posix
13877 TEST_TAR_FORMAT=posix
13878 export TEST_TAR_FORMAT
13879 TAR_OPTIONS=\"-H posix\"
13880 export TAR_OPTIONS
13881 rm -rf *
13882
13883 mkdir dir
13884 genfile --file dir/file
13885 genfile --file dir/file~
13886 genfile --file \"dir/.#file\"
13887 genfile --file \"dir/#file#\"
13888
13889 tar -v -c -f archive --exclude-backups dir
13890 )"
13891 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
13892 ( $at_check_trace;
13893 mkdir posix
13894 (cd posix
13895 TEST_TAR_FORMAT=posix
13896 export TEST_TAR_FORMAT
13897 TAR_OPTIONS="-H posix"
13898 export TAR_OPTIONS
13899 rm -rf *
13900
13901 mkdir dir
13902 genfile --file dir/file
13903 genfile --file dir/file~
13904 genfile --file "dir/.#file"
13905 genfile --file "dir/#file#"
13906
13907 tar -v -c -f archive --exclude-backups dir
13908 )
13909 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13910 at_status=$? at_failed=false
13911 $at_check_filter
13912 at_fn_diff_devnull "$at_stderr" || at_failed=:
13913 echo >>"$at_stdout"; $as_echo "dir/
13914 dir/file
13915 " | \
13916   $at_diff - "$at_stdout" || at_failed=:
13917 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
13918 $at_failed && at_fn_log_failure
13919 $at_traceon; }
13920
13921               { set +x
13922 $as_echo "$at_srcdir/exclude07.at:22:
13923 mkdir gnu
13924 (cd gnu
13925 TEST_TAR_FORMAT=gnu
13926 export TEST_TAR_FORMAT
13927 TAR_OPTIONS=\"-H gnu\"
13928 export TAR_OPTIONS
13929 rm -rf *
13930
13931 mkdir dir
13932 genfile --file dir/file
13933 genfile --file dir/file~
13934 genfile --file \"dir/.#file\"
13935 genfile --file \"dir/#file#\"
13936
13937 tar -v -c -f archive --exclude-backups dir
13938 )"
13939 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
13940 ( $at_check_trace;
13941 mkdir gnu
13942 (cd gnu
13943 TEST_TAR_FORMAT=gnu
13944 export TEST_TAR_FORMAT
13945 TAR_OPTIONS="-H gnu"
13946 export TAR_OPTIONS
13947 rm -rf *
13948
13949 mkdir dir
13950 genfile --file dir/file
13951 genfile --file dir/file~
13952 genfile --file "dir/.#file"
13953 genfile --file "dir/#file#"
13954
13955 tar -v -c -f archive --exclude-backups dir
13956 )
13957 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13958 at_status=$? at_failed=false
13959 $at_check_filter
13960 at_fn_diff_devnull "$at_stderr" || at_failed=:
13961 echo >>"$at_stdout"; $as_echo "dir/
13962 dir/file
13963 " | \
13964   $at_diff - "$at_stdout" || at_failed=:
13965 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
13966 $at_failed && at_fn_log_failure
13967 $at_traceon; }
13968
13969
13970
13971
13972   set +x
13973   $at_times_p && times >"$at_times_file"
13974 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13975 read at_status <"$at_status_file"
13976 #AT_STOP_49
13977 #AT_START_50
13978 at_fn_group_banner 50 'exclude08.at:36' \
13979   "--exclude-tag option" "                           " 7
13980 at_xfail=no
13981       test -f $XFAILFILE && at_xfail=yes
13982 (
13983   $as_echo "50. $at_setup_line: testing $at_desc ..."
13984   $at_traceon
13985
13986
13987
13988
13989
13990   { set +x
13991 $as_echo "$at_srcdir/exclude08.at:39:
13992 mkdir v7
13993 (cd v7
13994 TEST_TAR_FORMAT=v7
13995 export TEST_TAR_FORMAT
13996 TAR_OPTIONS=\"-H v7\"
13997 export TAR_OPTIONS
13998 rm -rf *
13999
14000
14001 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14002
14003 mkexcltest etest
14004 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14005 )"
14006 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
14007 ( $at_check_trace;
14008 mkdir v7
14009 (cd v7
14010 TEST_TAR_FORMAT=v7
14011 export TEST_TAR_FORMAT
14012 TAR_OPTIONS="-H v7"
14013 export TAR_OPTIONS
14014 rm -rf *
14015
14016
14017 test -z "`sort < /dev/null 2>&1`" || exit 77
14018
14019 mkexcltest etest
14020 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14021 )
14022 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14023 at_status=$? at_failed=false
14024 $at_check_filter
14025 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14026 " | \
14027   $at_diff - "$at_stderr" || at_failed=:
14028 echo >>"$at_stdout"; $as_echo "etest/
14029 etest/subdir/
14030 etest/subdir/excludeme
14031 etest/top-level-file
14032 " | \
14033   $at_diff - "$at_stdout" || at_failed=:
14034 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
14035 $at_failed && at_fn_log_failure
14036 $at_traceon; }
14037
14038               { set +x
14039 $as_echo "$at_srcdir/exclude08.at:39:
14040 mkdir oldgnu
14041 (cd oldgnu
14042 TEST_TAR_FORMAT=oldgnu
14043 export TEST_TAR_FORMAT
14044 TAR_OPTIONS=\"-H oldgnu\"
14045 export TAR_OPTIONS
14046 rm -rf *
14047
14048
14049 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14050
14051 mkexcltest etest
14052 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14053 )"
14054 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
14055 ( $at_check_trace;
14056 mkdir oldgnu
14057 (cd oldgnu
14058 TEST_TAR_FORMAT=oldgnu
14059 export TEST_TAR_FORMAT
14060 TAR_OPTIONS="-H oldgnu"
14061 export TAR_OPTIONS
14062 rm -rf *
14063
14064
14065 test -z "`sort < /dev/null 2>&1`" || exit 77
14066
14067 mkexcltest etest
14068 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14069 )
14070 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14071 at_status=$? at_failed=false
14072 $at_check_filter
14073 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14074 " | \
14075   $at_diff - "$at_stderr" || at_failed=:
14076 echo >>"$at_stdout"; $as_echo "etest/
14077 etest/subdir/
14078 etest/subdir/excludeme
14079 etest/top-level-file
14080 " | \
14081   $at_diff - "$at_stdout" || at_failed=:
14082 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
14083 $at_failed && at_fn_log_failure
14084 $at_traceon; }
14085
14086               { set +x
14087 $as_echo "$at_srcdir/exclude08.at:39:
14088 mkdir ustar
14089 (cd ustar
14090 TEST_TAR_FORMAT=ustar
14091 export TEST_TAR_FORMAT
14092 TAR_OPTIONS=\"-H ustar\"
14093 export TAR_OPTIONS
14094 rm -rf *
14095
14096
14097 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14098
14099 mkexcltest etest
14100 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14101 )"
14102 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
14103 ( $at_check_trace;
14104 mkdir ustar
14105 (cd ustar
14106 TEST_TAR_FORMAT=ustar
14107 export TEST_TAR_FORMAT
14108 TAR_OPTIONS="-H ustar"
14109 export TAR_OPTIONS
14110 rm -rf *
14111
14112
14113 test -z "`sort < /dev/null 2>&1`" || exit 77
14114
14115 mkexcltest etest
14116 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14117 )
14118 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14119 at_status=$? at_failed=false
14120 $at_check_filter
14121 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14122 " | \
14123   $at_diff - "$at_stderr" || at_failed=:
14124 echo >>"$at_stdout"; $as_echo "etest/
14125 etest/subdir/
14126 etest/subdir/excludeme
14127 etest/top-level-file
14128 " | \
14129   $at_diff - "$at_stdout" || at_failed=:
14130 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
14131 $at_failed && at_fn_log_failure
14132 $at_traceon; }
14133
14134               { set +x
14135 $as_echo "$at_srcdir/exclude08.at:39:
14136 mkdir posix
14137 (cd posix
14138 TEST_TAR_FORMAT=posix
14139 export TEST_TAR_FORMAT
14140 TAR_OPTIONS=\"-H posix\"
14141 export TAR_OPTIONS
14142 rm -rf *
14143
14144
14145 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14146
14147 mkexcltest etest
14148 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14149 )"
14150 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
14151 ( $at_check_trace;
14152 mkdir posix
14153 (cd posix
14154 TEST_TAR_FORMAT=posix
14155 export TEST_TAR_FORMAT
14156 TAR_OPTIONS="-H posix"
14157 export TAR_OPTIONS
14158 rm -rf *
14159
14160
14161 test -z "`sort < /dev/null 2>&1`" || exit 77
14162
14163 mkexcltest etest
14164 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14165 )
14166 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14167 at_status=$? at_failed=false
14168 $at_check_filter
14169 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14170 " | \
14171   $at_diff - "$at_stderr" || at_failed=:
14172 echo >>"$at_stdout"; $as_echo "etest/
14173 etest/subdir/
14174 etest/subdir/excludeme
14175 etest/top-level-file
14176 " | \
14177   $at_diff - "$at_stdout" || at_failed=:
14178 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
14179 $at_failed && at_fn_log_failure
14180 $at_traceon; }
14181
14182               { set +x
14183 $as_echo "$at_srcdir/exclude08.at:39:
14184 mkdir gnu
14185 (cd gnu
14186 TEST_TAR_FORMAT=gnu
14187 export TEST_TAR_FORMAT
14188 TAR_OPTIONS=\"-H gnu\"
14189 export TAR_OPTIONS
14190 rm -rf *
14191
14192
14193 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14194
14195 mkexcltest etest
14196 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14197 )"
14198 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
14199 ( $at_check_trace;
14200 mkdir gnu
14201 (cd gnu
14202 TEST_TAR_FORMAT=gnu
14203 export TEST_TAR_FORMAT
14204 TAR_OPTIONS="-H gnu"
14205 export TAR_OPTIONS
14206 rm -rf *
14207
14208
14209 test -z "`sort < /dev/null 2>&1`" || exit 77
14210
14211 mkexcltest etest
14212 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
14213 )
14214 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14215 at_status=$? at_failed=false
14216 $at_check_filter
14217 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14218 " | \
14219   $at_diff - "$at_stderr" || at_failed=:
14220 echo >>"$at_stdout"; $as_echo "etest/
14221 etest/subdir/
14222 etest/subdir/excludeme
14223 etest/top-level-file
14224 " | \
14225   $at_diff - "$at_stdout" || at_failed=:
14226 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
14227 $at_failed && at_fn_log_failure
14228 $at_traceon; }
14229
14230
14231
14232
14233   set +x
14234   $at_times_p && times >"$at_times_file"
14235 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14236 read at_status <"$at_status_file"
14237 #AT_STOP_50
14238 #AT_START_51
14239 at_fn_group_banner 51 'exclude09.at:37' \
14240   "--exclude-tag option and --listed-incremental" "  " 7
14241 at_xfail=no
14242       test -f $XFAILFILE && at_xfail=yes
14243 (
14244   $as_echo "51. $at_setup_line: testing $at_desc ..."
14245   $at_traceon
14246
14247
14248
14249
14250
14251   { set +x
14252 $as_echo "$at_srcdir/exclude09.at:40:
14253 mkdir gnu
14254 (cd gnu
14255 TEST_TAR_FORMAT=gnu
14256 export TEST_TAR_FORMAT
14257 TAR_OPTIONS=\"-H gnu\"
14258 export TAR_OPTIONS
14259 rm -rf *
14260
14261
14262 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14263
14264 mkexcltest etest
14265 tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
14266 )"
14267 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude09.at:40"
14268 ( $at_check_trace;
14269 mkdir gnu
14270 (cd gnu
14271 TEST_TAR_FORMAT=gnu
14272 export TEST_TAR_FORMAT
14273 TAR_OPTIONS="-H gnu"
14274 export TAR_OPTIONS
14275 rm -rf *
14276
14277
14278 test -z "`sort < /dev/null 2>&1`" || exit 77
14279
14280 mkexcltest etest
14281 tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
14282 )
14283 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14284 at_status=$? at_failed=false
14285 $at_check_filter
14286 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
14287 tar: etest/subdir: Directory is new
14288 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
14289 " | \
14290   $at_diff - "$at_stderr" || at_failed=:
14291 echo >>"$at_stdout"; $as_echo "etest/
14292 etest/subdir/
14293 etest/subdir/excludeme
14294 etest/top-level-file
14295 " | \
14296   $at_diff - "$at_stdout" || at_failed=:
14297 at_fn_check_status 0 $at_status "$at_srcdir/exclude09.at:40"
14298 $at_failed && at_fn_log_failure
14299 $at_traceon; }
14300
14301
14302
14303
14304   set +x
14305   $at_times_p && times >"$at_times_file"
14306 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14307 read at_status <"$at_status_file"
14308 #AT_STOP_51
14309 #AT_START_52
14310 at_fn_group_banner 52 'exclude10.at:38' \
14311   "--exclude-tag option in incremental pass" "       " 7
14312 at_xfail=no
14313       test -f $XFAILFILE && at_xfail=yes
14314 (
14315   $as_echo "52. $at_setup_line: testing $at_desc ..."
14316   $at_traceon
14317
14318
14319
14320
14321
14322   { set +x
14323 $as_echo "$at_srcdir/exclude10.at:41:
14324 mkdir gnu
14325 (cd gnu
14326 TEST_TAR_FORMAT=gnu
14327 export TEST_TAR_FORMAT
14328 TAR_OPTIONS=\"-H gnu\"
14329 export TAR_OPTIONS
14330 rm -rf *
14331
14332
14333 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14334
14335 mkexcltest etest
14336 rm etest/subdir/excludeme
14337 decho \"# Level 0\"
14338 tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
14339 touch etest/subdir/excludeme
14340 touch etest/subdir/otherfile
14341
14342 decho \"# Level 1\"
14343 cp snar-0 snar-1
14344 tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
14345 )"
14346 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude10.at:41"
14347 ( $at_check_trace;
14348 mkdir gnu
14349 (cd gnu
14350 TEST_TAR_FORMAT=gnu
14351 export TEST_TAR_FORMAT
14352 TAR_OPTIONS="-H gnu"
14353 export TAR_OPTIONS
14354 rm -rf *
14355
14356
14357 test -z "`sort < /dev/null 2>&1`" || exit 77
14358
14359 mkexcltest etest
14360 rm etest/subdir/excludeme
14361 decho "# Level 0"
14362 tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
14363 touch etest/subdir/excludeme
14364 touch etest/subdir/otherfile
14365
14366 decho "# Level 1"
14367 cp snar-0 snar-1
14368 tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
14369 )
14370 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14371 at_status=$? at_failed=false
14372 $at_check_filter
14373 echo >>"$at_stderr"; $as_echo "# Level 0
14374 tar: etest: Directory is new
14375 tar: etest/subdir: Directory is new
14376 # Level 1
14377 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
14378 " | \
14379   $at_diff - "$at_stderr" || at_failed=:
14380 echo >>"$at_stdout"; $as_echo "# Level 0
14381 etest/
14382 etest/subdir/
14383 etest/subdir/subdir-file
14384 etest/top-level-file
14385 # Level 1
14386 etest/
14387 etest/subdir/
14388 etest/subdir/excludeme
14389 " | \
14390   $at_diff - "$at_stdout" || at_failed=:
14391 at_fn_check_status 0 $at_status "$at_srcdir/exclude10.at:41"
14392 $at_failed && at_fn_log_failure
14393 $at_traceon; }
14394
14395
14396
14397
14398   set +x
14399   $at_times_p && times >"$at_times_file"
14400 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14401 read at_status <"$at_status_file"
14402 #AT_STOP_52
14403 #AT_START_53
14404 at_fn_group_banner 53 'exclude11.at:36' \
14405   "--exclude-tag-under option" "                     " 7
14406 at_xfail=no
14407       test -f $XFAILFILE && at_xfail=yes
14408 (
14409   $as_echo "53. $at_setup_line: testing $at_desc ..."
14410   $at_traceon
14411
14412
14413
14414
14415
14416   { set +x
14417 $as_echo "$at_srcdir/exclude11.at:39:
14418 mkdir v7
14419 (cd v7
14420 TEST_TAR_FORMAT=v7
14421 export TEST_TAR_FORMAT
14422 TAR_OPTIONS=\"-H v7\"
14423 export TAR_OPTIONS
14424 rm -rf *
14425
14426
14427 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14428
14429 mkexcltest etest
14430 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14431 )"
14432 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
14433 ( $at_check_trace;
14434 mkdir v7
14435 (cd v7
14436 TEST_TAR_FORMAT=v7
14437 export TEST_TAR_FORMAT
14438 TAR_OPTIONS="-H v7"
14439 export TAR_OPTIONS
14440 rm -rf *
14441
14442
14443 test -z "`sort < /dev/null 2>&1`" || exit 77
14444
14445 mkexcltest etest
14446 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14447 )
14448 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14449 at_status=$? at_failed=false
14450 $at_check_filter
14451 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14452 " | \
14453   $at_diff - "$at_stderr" || at_failed=:
14454 echo >>"$at_stdout"; $as_echo "etest/
14455 etest/subdir/
14456 etest/top-level-file
14457 " | \
14458   $at_diff - "$at_stdout" || at_failed=:
14459 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
14460 $at_failed && at_fn_log_failure
14461 $at_traceon; }
14462
14463               { set +x
14464 $as_echo "$at_srcdir/exclude11.at:39:
14465 mkdir oldgnu
14466 (cd oldgnu
14467 TEST_TAR_FORMAT=oldgnu
14468 export TEST_TAR_FORMAT
14469 TAR_OPTIONS=\"-H oldgnu\"
14470 export TAR_OPTIONS
14471 rm -rf *
14472
14473
14474 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14475
14476 mkexcltest etest
14477 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14478 )"
14479 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
14480 ( $at_check_trace;
14481 mkdir oldgnu
14482 (cd oldgnu
14483 TEST_TAR_FORMAT=oldgnu
14484 export TEST_TAR_FORMAT
14485 TAR_OPTIONS="-H oldgnu"
14486 export TAR_OPTIONS
14487 rm -rf *
14488
14489
14490 test -z "`sort < /dev/null 2>&1`" || exit 77
14491
14492 mkexcltest etest
14493 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14494 )
14495 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14496 at_status=$? at_failed=false
14497 $at_check_filter
14498 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14499 " | \
14500   $at_diff - "$at_stderr" || at_failed=:
14501 echo >>"$at_stdout"; $as_echo "etest/
14502 etest/subdir/
14503 etest/top-level-file
14504 " | \
14505   $at_diff - "$at_stdout" || at_failed=:
14506 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
14507 $at_failed && at_fn_log_failure
14508 $at_traceon; }
14509
14510               { set +x
14511 $as_echo "$at_srcdir/exclude11.at:39:
14512 mkdir ustar
14513 (cd ustar
14514 TEST_TAR_FORMAT=ustar
14515 export TEST_TAR_FORMAT
14516 TAR_OPTIONS=\"-H ustar\"
14517 export TAR_OPTIONS
14518 rm -rf *
14519
14520
14521 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14522
14523 mkexcltest etest
14524 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14525 )"
14526 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
14527 ( $at_check_trace;
14528 mkdir ustar
14529 (cd ustar
14530 TEST_TAR_FORMAT=ustar
14531 export TEST_TAR_FORMAT
14532 TAR_OPTIONS="-H ustar"
14533 export TAR_OPTIONS
14534 rm -rf *
14535
14536
14537 test -z "`sort < /dev/null 2>&1`" || exit 77
14538
14539 mkexcltest etest
14540 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14541 )
14542 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14543 at_status=$? at_failed=false
14544 $at_check_filter
14545 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14546 " | \
14547   $at_diff - "$at_stderr" || at_failed=:
14548 echo >>"$at_stdout"; $as_echo "etest/
14549 etest/subdir/
14550 etest/top-level-file
14551 " | \
14552   $at_diff - "$at_stdout" || at_failed=:
14553 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
14554 $at_failed && at_fn_log_failure
14555 $at_traceon; }
14556
14557               { set +x
14558 $as_echo "$at_srcdir/exclude11.at:39:
14559 mkdir posix
14560 (cd posix
14561 TEST_TAR_FORMAT=posix
14562 export TEST_TAR_FORMAT
14563 TAR_OPTIONS=\"-H posix\"
14564 export TAR_OPTIONS
14565 rm -rf *
14566
14567
14568 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14569
14570 mkexcltest etest
14571 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14572 )"
14573 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
14574 ( $at_check_trace;
14575 mkdir posix
14576 (cd posix
14577 TEST_TAR_FORMAT=posix
14578 export TEST_TAR_FORMAT
14579 TAR_OPTIONS="-H posix"
14580 export TAR_OPTIONS
14581 rm -rf *
14582
14583
14584 test -z "`sort < /dev/null 2>&1`" || exit 77
14585
14586 mkexcltest etest
14587 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14588 )
14589 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14590 at_status=$? at_failed=false
14591 $at_check_filter
14592 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14593 " | \
14594   $at_diff - "$at_stderr" || at_failed=:
14595 echo >>"$at_stdout"; $as_echo "etest/
14596 etest/subdir/
14597 etest/top-level-file
14598 " | \
14599   $at_diff - "$at_stdout" || at_failed=:
14600 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
14601 $at_failed && at_fn_log_failure
14602 $at_traceon; }
14603
14604               { set +x
14605 $as_echo "$at_srcdir/exclude11.at:39:
14606 mkdir gnu
14607 (cd gnu
14608 TEST_TAR_FORMAT=gnu
14609 export TEST_TAR_FORMAT
14610 TAR_OPTIONS=\"-H gnu\"
14611 export TAR_OPTIONS
14612 rm -rf *
14613
14614
14615 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14616
14617 mkexcltest etest
14618 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14619 )"
14620 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
14621 ( $at_check_trace;
14622 mkdir gnu
14623 (cd gnu
14624 TEST_TAR_FORMAT=gnu
14625 export TEST_TAR_FORMAT
14626 TAR_OPTIONS="-H gnu"
14627 export TAR_OPTIONS
14628 rm -rf *
14629
14630
14631 test -z "`sort < /dev/null 2>&1`" || exit 77
14632
14633 mkexcltest etest
14634 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
14635 )
14636 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14637 at_status=$? at_failed=false
14638 $at_check_filter
14639 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
14640 " | \
14641   $at_diff - "$at_stderr" || at_failed=:
14642 echo >>"$at_stdout"; $as_echo "etest/
14643 etest/subdir/
14644 etest/top-level-file
14645 " | \
14646   $at_diff - "$at_stdout" || at_failed=:
14647 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
14648 $at_failed && at_fn_log_failure
14649 $at_traceon; }
14650
14651
14652
14653
14654   set +x
14655   $at_times_p && times >"$at_times_file"
14656 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14657 read at_status <"$at_status_file"
14658 #AT_STOP_53
14659 #AT_START_54
14660 at_fn_group_banner 54 'exclude12.at:37' \
14661   "--exclude-tag-under and --listed-incremental" "   " 7
14662 at_xfail=no
14663       test -f $XFAILFILE && at_xfail=yes
14664 (
14665   $as_echo "54. $at_setup_line: testing $at_desc ..."
14666   $at_traceon
14667
14668
14669
14670
14671
14672   { set +x
14673 $as_echo "$at_srcdir/exclude12.at:40:
14674 mkdir gnu
14675 (cd gnu
14676 TEST_TAR_FORMAT=gnu
14677 export TEST_TAR_FORMAT
14678 TAR_OPTIONS=\"-H gnu\"
14679 export TAR_OPTIONS
14680 rm -rf *
14681
14682
14683 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14684
14685 mkexcltest etest
14686 tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
14687 )"
14688 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude12.at:40"
14689 ( $at_check_trace;
14690 mkdir gnu
14691 (cd gnu
14692 TEST_TAR_FORMAT=gnu
14693 export TEST_TAR_FORMAT
14694 TAR_OPTIONS="-H gnu"
14695 export TAR_OPTIONS
14696 rm -rf *
14697
14698
14699 test -z "`sort < /dev/null 2>&1`" || exit 77
14700
14701 mkexcltest etest
14702 tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
14703 )
14704 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14705 at_status=$? at_failed=false
14706 $at_check_filter
14707 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
14708 tar: etest/subdir: Directory is new
14709 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
14710 " | \
14711   $at_diff - "$at_stderr" || at_failed=:
14712 echo >>"$at_stdout"; $as_echo "etest/
14713 etest/subdir/
14714 etest/top-level-file
14715 " | \
14716   $at_diff - "$at_stdout" || at_failed=:
14717 at_fn_check_status 0 $at_status "$at_srcdir/exclude12.at:40"
14718 $at_failed && at_fn_log_failure
14719 $at_traceon; }
14720
14721
14722
14723
14724   set +x
14725   $at_times_p && times >"$at_times_file"
14726 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14727 read at_status <"$at_status_file"
14728 #AT_STOP_54
14729 #AT_START_55
14730 at_fn_group_banner 55 'exclude13.at:39' \
14731   "--exclude-tag-under option in incremental pass" " " 7
14732 at_xfail=no
14733       test -f $XFAILFILE && at_xfail=yes
14734 (
14735   $as_echo "55. $at_setup_line: testing $at_desc ..."
14736   $at_traceon
14737
14738
14739
14740
14741
14742   { set +x
14743 $as_echo "$at_srcdir/exclude13.at:42:
14744 mkdir gnu
14745 (cd gnu
14746 TEST_TAR_FORMAT=gnu
14747 export TEST_TAR_FORMAT
14748 TAR_OPTIONS=\"-H gnu\"
14749 export TAR_OPTIONS
14750 rm -rf *
14751
14752
14753 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14754
14755 mkexcltest etest
14756 rm etest/subdir/excludeme
14757 decho \"# Level 0\"
14758 tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
14759 touch etest/subdir/excludeme
14760 touch etest/subdir/otherfile
14761
14762 decho \"# Level 1\"
14763 cp snar-0 snar-1
14764 tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
14765 )"
14766 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude13.at:42"
14767 ( $at_check_trace;
14768 mkdir gnu
14769 (cd gnu
14770 TEST_TAR_FORMAT=gnu
14771 export TEST_TAR_FORMAT
14772 TAR_OPTIONS="-H gnu"
14773 export TAR_OPTIONS
14774 rm -rf *
14775
14776
14777 test -z "`sort < /dev/null 2>&1`" || exit 77
14778
14779 mkexcltest etest
14780 rm etest/subdir/excludeme
14781 decho "# Level 0"
14782 tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
14783 touch etest/subdir/excludeme
14784 touch etest/subdir/otherfile
14785
14786 decho "# Level 1"
14787 cp snar-0 snar-1
14788 tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
14789 )
14790 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14791 at_status=$? at_failed=false
14792 $at_check_filter
14793 echo >>"$at_stderr"; $as_echo "# Level 0
14794 tar: etest: Directory is new
14795 tar: etest/subdir: Directory is new
14796 # Level 1
14797 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
14798 " | \
14799   $at_diff - "$at_stderr" || at_failed=:
14800 echo >>"$at_stdout"; $as_echo "# Level 0
14801 etest/
14802 etest/subdir/
14803 etest/subdir/subdir-file
14804 etest/top-level-file
14805 # Level 1
14806 etest/
14807 etest/subdir/
14808 " | \
14809   $at_diff - "$at_stdout" || at_failed=:
14810 at_fn_check_status 0 $at_status "$at_srcdir/exclude13.at:42"
14811 $at_failed && at_fn_log_failure
14812 $at_traceon; }
14813
14814
14815
14816
14817   set +x
14818   $at_times_p && times >"$at_times_file"
14819 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14820 read at_status <"$at_status_file"
14821 #AT_STOP_55
14822 #AT_START_56
14823 at_fn_group_banner 56 'exclude14.at:36' \
14824   "--exclude-tag-all option" "                       " 7
14825 at_xfail=no
14826       test -f $XFAILFILE && at_xfail=yes
14827 (
14828   $as_echo "56. $at_setup_line: testing $at_desc ..."
14829   $at_traceon
14830
14831
14832
14833
14834
14835   { set +x
14836 $as_echo "$at_srcdir/exclude14.at:39:
14837 mkdir v7
14838 (cd v7
14839 TEST_TAR_FORMAT=v7
14840 export TEST_TAR_FORMAT
14841 TAR_OPTIONS=\"-H v7\"
14842 export TAR_OPTIONS
14843 rm -rf *
14844
14845
14846 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14847
14848 mkexcltest etest
14849 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
14850 )"
14851 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
14852 ( $at_check_trace;
14853 mkdir v7
14854 (cd v7
14855 TEST_TAR_FORMAT=v7
14856 export TEST_TAR_FORMAT
14857 TAR_OPTIONS="-H v7"
14858 export TAR_OPTIONS
14859 rm -rf *
14860
14861
14862 test -z "`sort < /dev/null 2>&1`" || exit 77
14863
14864 mkexcltest etest
14865 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
14866 )
14867 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14868 at_status=$? at_failed=false
14869 $at_check_filter
14870 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
14871 " | \
14872   $at_diff - "$at_stderr" || at_failed=:
14873 echo >>"$at_stdout"; $as_echo "etest/
14874 etest/top-level-file
14875 " | \
14876   $at_diff - "$at_stdout" || at_failed=:
14877 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
14878 $at_failed && at_fn_log_failure
14879 $at_traceon; }
14880
14881               { set +x
14882 $as_echo "$at_srcdir/exclude14.at:39:
14883 mkdir oldgnu
14884 (cd oldgnu
14885 TEST_TAR_FORMAT=oldgnu
14886 export TEST_TAR_FORMAT
14887 TAR_OPTIONS=\"-H oldgnu\"
14888 export TAR_OPTIONS
14889 rm -rf *
14890
14891
14892 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14893
14894 mkexcltest etest
14895 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
14896 )"
14897 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
14898 ( $at_check_trace;
14899 mkdir oldgnu
14900 (cd oldgnu
14901 TEST_TAR_FORMAT=oldgnu
14902 export TEST_TAR_FORMAT
14903 TAR_OPTIONS="-H oldgnu"
14904 export TAR_OPTIONS
14905 rm -rf *
14906
14907
14908 test -z "`sort < /dev/null 2>&1`" || exit 77
14909
14910 mkexcltest etest
14911 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
14912 )
14913 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14914 at_status=$? at_failed=false
14915 $at_check_filter
14916 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
14917 " | \
14918   $at_diff - "$at_stderr" || at_failed=:
14919 echo >>"$at_stdout"; $as_echo "etest/
14920 etest/top-level-file
14921 " | \
14922   $at_diff - "$at_stdout" || at_failed=:
14923 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
14924 $at_failed && at_fn_log_failure
14925 $at_traceon; }
14926
14927               { set +x
14928 $as_echo "$at_srcdir/exclude14.at:39:
14929 mkdir ustar
14930 (cd ustar
14931 TEST_TAR_FORMAT=ustar
14932 export TEST_TAR_FORMAT
14933 TAR_OPTIONS=\"-H ustar\"
14934 export TAR_OPTIONS
14935 rm -rf *
14936
14937
14938 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14939
14940 mkexcltest etest
14941 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
14942 )"
14943 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
14944 ( $at_check_trace;
14945 mkdir ustar
14946 (cd ustar
14947 TEST_TAR_FORMAT=ustar
14948 export TEST_TAR_FORMAT
14949 TAR_OPTIONS="-H ustar"
14950 export TAR_OPTIONS
14951 rm -rf *
14952
14953
14954 test -z "`sort < /dev/null 2>&1`" || exit 77
14955
14956 mkexcltest etest
14957 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
14958 )
14959 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14960 at_status=$? at_failed=false
14961 $at_check_filter
14962 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
14963 " | \
14964   $at_diff - "$at_stderr" || at_failed=:
14965 echo >>"$at_stdout"; $as_echo "etest/
14966 etest/top-level-file
14967 " | \
14968   $at_diff - "$at_stdout" || at_failed=:
14969 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
14970 $at_failed && at_fn_log_failure
14971 $at_traceon; }
14972
14973               { set +x
14974 $as_echo "$at_srcdir/exclude14.at:39:
14975 mkdir posix
14976 (cd posix
14977 TEST_TAR_FORMAT=posix
14978 export TEST_TAR_FORMAT
14979 TAR_OPTIONS=\"-H posix\"
14980 export TAR_OPTIONS
14981 rm -rf *
14982
14983
14984 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14985
14986 mkexcltest etest
14987 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
14988 )"
14989 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
14990 ( $at_check_trace;
14991 mkdir posix
14992 (cd posix
14993 TEST_TAR_FORMAT=posix
14994 export TEST_TAR_FORMAT
14995 TAR_OPTIONS="-H posix"
14996 export TAR_OPTIONS
14997 rm -rf *
14998
14999
15000 test -z "`sort < /dev/null 2>&1`" || exit 77
15001
15002 mkexcltest etest
15003 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
15004 )
15005 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15006 at_status=$? at_failed=false
15007 $at_check_filter
15008 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
15009 " | \
15010   $at_diff - "$at_stderr" || at_failed=:
15011 echo >>"$at_stdout"; $as_echo "etest/
15012 etest/top-level-file
15013 " | \
15014   $at_diff - "$at_stdout" || at_failed=:
15015 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
15016 $at_failed && at_fn_log_failure
15017 $at_traceon; }
15018
15019               { set +x
15020 $as_echo "$at_srcdir/exclude14.at:39:
15021 mkdir gnu
15022 (cd gnu
15023 TEST_TAR_FORMAT=gnu
15024 export TEST_TAR_FORMAT
15025 TAR_OPTIONS=\"-H gnu\"
15026 export TAR_OPTIONS
15027 rm -rf *
15028
15029
15030 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15031
15032 mkexcltest etest
15033 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
15034 )"
15035 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
15036 ( $at_check_trace;
15037 mkdir gnu
15038 (cd gnu
15039 TEST_TAR_FORMAT=gnu
15040 export TEST_TAR_FORMAT
15041 TAR_OPTIONS="-H gnu"
15042 export TAR_OPTIONS
15043 rm -rf *
15044
15045
15046 test -z "`sort < /dev/null 2>&1`" || exit 77
15047
15048 mkexcltest etest
15049 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
15050 )
15051 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15052 at_status=$? at_failed=false
15053 $at_check_filter
15054 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
15055 " | \
15056   $at_diff - "$at_stderr" || at_failed=:
15057 echo >>"$at_stdout"; $as_echo "etest/
15058 etest/top-level-file
15059 " | \
15060   $at_diff - "$at_stdout" || at_failed=:
15061 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
15062 $at_failed && at_fn_log_failure
15063 $at_traceon; }
15064
15065
15066
15067
15068   set +x
15069   $at_times_p && times >"$at_times_file"
15070 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15071 read at_status <"$at_status_file"
15072 #AT_STOP_56
15073 #AT_START_57
15074 at_fn_group_banner 57 'exclude15.at:36' \
15075   "--exclude-tag-all and --listed-incremental" "     " 7
15076 at_xfail=no
15077       test -f $XFAILFILE && at_xfail=yes
15078 (
15079   $as_echo "57. $at_setup_line: testing $at_desc ..."
15080   $at_traceon
15081
15082
15083
15084
15085
15086   { set +x
15087 $as_echo "$at_srcdir/exclude15.at:39:
15088 mkdir gnu
15089 (cd gnu
15090 TEST_TAR_FORMAT=gnu
15091 export TEST_TAR_FORMAT
15092 TAR_OPTIONS=\"-H gnu\"
15093 export TAR_OPTIONS
15094 rm -rf *
15095
15096
15097 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15098
15099 mkexcltest etest
15100 tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
15101 )"
15102 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude15.at:39"
15103 ( $at_check_trace;
15104 mkdir gnu
15105 (cd gnu
15106 TEST_TAR_FORMAT=gnu
15107 export TEST_TAR_FORMAT
15108 TAR_OPTIONS="-H gnu"
15109 export TAR_OPTIONS
15110 rm -rf *
15111
15112
15113 test -z "`sort < /dev/null 2>&1`" || exit 77
15114
15115 mkexcltest etest
15116 tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
15117 )
15118 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15119 at_status=$? at_failed=false
15120 $at_check_filter
15121 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
15122 tar: etest/subdir: Directory is new
15123 tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
15124 " | \
15125   $at_diff - "$at_stderr" || at_failed=:
15126 echo >>"$at_stdout"; $as_echo "etest/
15127 etest/top-level-file
15128 " | \
15129   $at_diff - "$at_stdout" || at_failed=:
15130 at_fn_check_status 0 $at_status "$at_srcdir/exclude15.at:39"
15131 $at_failed && at_fn_log_failure
15132 $at_traceon; }
15133
15134
15135
15136
15137   set +x
15138   $at_times_p && times >"$at_times_file"
15139 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15140 read at_status <"$at_status_file"
15141 #AT_STOP_57
15142 #AT_START_58
15143 at_fn_group_banner 58 'exclude16.at:38' \
15144   "--exclude-tag-all option in incremental pass" "   " 7
15145 at_xfail=no
15146       test -f $XFAILFILE && at_xfail=yes
15147 (
15148   $as_echo "58. $at_setup_line: testing $at_desc ..."
15149   $at_traceon
15150
15151
15152
15153
15154
15155   { set +x
15156 $as_echo "$at_srcdir/exclude16.at:41:
15157 mkdir gnu
15158 (cd gnu
15159 TEST_TAR_FORMAT=gnu
15160 export TEST_TAR_FORMAT
15161 TAR_OPTIONS=\"-H gnu\"
15162 export TAR_OPTIONS
15163 rm -rf *
15164
15165
15166 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
15167
15168 mkexcltest etest
15169 rm etest/subdir/excludeme
15170 decho \"# Level 0\"
15171 tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
15172 touch etest/subdir/excludeme
15173 touch etest/subdir/otherfile
15174
15175 decho \"# Level 1\"
15176 cp snar-0 snar-1
15177 tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
15178 )"
15179 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude16.at:41"
15180 ( $at_check_trace;
15181 mkdir gnu
15182 (cd gnu
15183 TEST_TAR_FORMAT=gnu
15184 export TEST_TAR_FORMAT
15185 TAR_OPTIONS="-H gnu"
15186 export TAR_OPTIONS
15187 rm -rf *
15188
15189
15190 test -z "`sort < /dev/null 2>&1`" || exit 77
15191
15192 mkexcltest etest
15193 rm etest/subdir/excludeme
15194 decho "# Level 0"
15195 tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
15196 touch etest/subdir/excludeme
15197 touch etest/subdir/otherfile
15198
15199 decho "# Level 1"
15200 cp snar-0 snar-1
15201 tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
15202 )
15203 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15204 at_status=$? at_failed=false
15205 $at_check_filter
15206 echo >>"$at_stderr"; $as_echo "# Level 0
15207 tar: etest: Directory is new
15208 tar: etest/subdir: Directory is new
15209 # Level 1
15210 tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
15211 " | \
15212   $at_diff - "$at_stderr" || at_failed=:
15213 echo >>"$at_stdout"; $as_echo "# Level 0
15214 etest/
15215 etest/subdir/
15216 etest/subdir/subdir-file
15217 etest/top-level-file
15218 # Level 1
15219 etest/
15220 " | \
15221   $at_diff - "$at_stdout" || at_failed=:
15222 at_fn_check_status 0 $at_status "$at_srcdir/exclude16.at:41"
15223 $at_failed && at_fn_log_failure
15224 $at_traceon; }
15225
15226
15227
15228
15229   set +x
15230   $at_times_p && times >"$at_times_file"
15231 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15232 read at_status <"$at_status_file"
15233 #AT_STOP_58
15234 #AT_START_59
15235 at_fn_group_banner 59 'delete01.at:24' \
15236   "deleting a member after a big one" "              " 8
15237 at_xfail=no
15238       test -f $XFAILFILE && at_xfail=yes
15239 (
15240   $as_echo "59. $at_setup_line: testing $at_desc ..."
15241   $at_traceon
15242
15243
15244
15245
15246
15247   { set +x
15248 $as_echo "$at_srcdir/delete01.at:27:
15249 mkdir v7
15250 (cd v7
15251 TEST_TAR_FORMAT=v7
15252 export TEST_TAR_FORMAT
15253 TAR_OPTIONS=\"-H v7\"
15254 export TAR_OPTIONS
15255 rm -rf *
15256
15257 genfile -l 50000 --file file1
15258 genfile -l 1024 --file file2
15259 tar cf archive file1 file2
15260 tar f archive --delete file2
15261 tar tf archive)"
15262 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
15263 ( $at_check_trace;
15264 mkdir v7
15265 (cd v7
15266 TEST_TAR_FORMAT=v7
15267 export TEST_TAR_FORMAT
15268 TAR_OPTIONS="-H v7"
15269 export TAR_OPTIONS
15270 rm -rf *
15271
15272 genfile -l 50000 --file file1
15273 genfile -l 1024 --file file2
15274 tar cf archive file1 file2
15275 tar f archive --delete file2
15276 tar tf archive)
15277 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15278 at_status=$? at_failed=false
15279 $at_check_filter
15280 at_fn_diff_devnull "$at_stderr" || at_failed=:
15281 echo >>"$at_stdout"; $as_echo "file1
15282 " | \
15283   $at_diff - "$at_stdout" || at_failed=:
15284 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
15285 $at_failed && at_fn_log_failure
15286 $at_traceon; }
15287
15288               { set +x
15289 $as_echo "$at_srcdir/delete01.at:27:
15290 mkdir oldgnu
15291 (cd oldgnu
15292 TEST_TAR_FORMAT=oldgnu
15293 export TEST_TAR_FORMAT
15294 TAR_OPTIONS=\"-H oldgnu\"
15295 export TAR_OPTIONS
15296 rm -rf *
15297
15298 genfile -l 50000 --file file1
15299 genfile -l 1024 --file file2
15300 tar cf archive file1 file2
15301 tar f archive --delete file2
15302 tar tf archive)"
15303 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
15304 ( $at_check_trace;
15305 mkdir oldgnu
15306 (cd oldgnu
15307 TEST_TAR_FORMAT=oldgnu
15308 export TEST_TAR_FORMAT
15309 TAR_OPTIONS="-H oldgnu"
15310 export TAR_OPTIONS
15311 rm -rf *
15312
15313 genfile -l 50000 --file file1
15314 genfile -l 1024 --file file2
15315 tar cf archive file1 file2
15316 tar f archive --delete file2
15317 tar tf archive)
15318 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15319 at_status=$? at_failed=false
15320 $at_check_filter
15321 at_fn_diff_devnull "$at_stderr" || at_failed=:
15322 echo >>"$at_stdout"; $as_echo "file1
15323 " | \
15324   $at_diff - "$at_stdout" || at_failed=:
15325 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
15326 $at_failed && at_fn_log_failure
15327 $at_traceon; }
15328
15329               { set +x
15330 $as_echo "$at_srcdir/delete01.at:27:
15331 mkdir ustar
15332 (cd ustar
15333 TEST_TAR_FORMAT=ustar
15334 export TEST_TAR_FORMAT
15335 TAR_OPTIONS=\"-H ustar\"
15336 export TAR_OPTIONS
15337 rm -rf *
15338
15339 genfile -l 50000 --file file1
15340 genfile -l 1024 --file file2
15341 tar cf archive file1 file2
15342 tar f archive --delete file2
15343 tar tf archive)"
15344 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
15345 ( $at_check_trace;
15346 mkdir ustar
15347 (cd ustar
15348 TEST_TAR_FORMAT=ustar
15349 export TEST_TAR_FORMAT
15350 TAR_OPTIONS="-H ustar"
15351 export TAR_OPTIONS
15352 rm -rf *
15353
15354 genfile -l 50000 --file file1
15355 genfile -l 1024 --file file2
15356 tar cf archive file1 file2
15357 tar f archive --delete file2
15358 tar tf archive)
15359 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15360 at_status=$? at_failed=false
15361 $at_check_filter
15362 at_fn_diff_devnull "$at_stderr" || at_failed=:
15363 echo >>"$at_stdout"; $as_echo "file1
15364 " | \
15365   $at_diff - "$at_stdout" || at_failed=:
15366 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
15367 $at_failed && at_fn_log_failure
15368 $at_traceon; }
15369
15370               { set +x
15371 $as_echo "$at_srcdir/delete01.at:27:
15372 mkdir posix
15373 (cd posix
15374 TEST_TAR_FORMAT=posix
15375 export TEST_TAR_FORMAT
15376 TAR_OPTIONS=\"-H posix\"
15377 export TAR_OPTIONS
15378 rm -rf *
15379
15380 genfile -l 50000 --file file1
15381 genfile -l 1024 --file file2
15382 tar cf archive file1 file2
15383 tar f archive --delete file2
15384 tar tf archive)"
15385 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
15386 ( $at_check_trace;
15387 mkdir posix
15388 (cd posix
15389 TEST_TAR_FORMAT=posix
15390 export TEST_TAR_FORMAT
15391 TAR_OPTIONS="-H posix"
15392 export TAR_OPTIONS
15393 rm -rf *
15394
15395 genfile -l 50000 --file file1
15396 genfile -l 1024 --file file2
15397 tar cf archive file1 file2
15398 tar f archive --delete file2
15399 tar tf archive)
15400 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15401 at_status=$? at_failed=false
15402 $at_check_filter
15403 at_fn_diff_devnull "$at_stderr" || at_failed=:
15404 echo >>"$at_stdout"; $as_echo "file1
15405 " | \
15406   $at_diff - "$at_stdout" || at_failed=:
15407 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
15408 $at_failed && at_fn_log_failure
15409 $at_traceon; }
15410
15411               { set +x
15412 $as_echo "$at_srcdir/delete01.at:27:
15413 mkdir gnu
15414 (cd gnu
15415 TEST_TAR_FORMAT=gnu
15416 export TEST_TAR_FORMAT
15417 TAR_OPTIONS=\"-H gnu\"
15418 export TAR_OPTIONS
15419 rm -rf *
15420
15421 genfile -l 50000 --file file1
15422 genfile -l 1024 --file file2
15423 tar cf archive file1 file2
15424 tar f archive --delete file2
15425 tar tf archive)"
15426 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:27"
15427 ( $at_check_trace;
15428 mkdir gnu
15429 (cd gnu
15430 TEST_TAR_FORMAT=gnu
15431 export TEST_TAR_FORMAT
15432 TAR_OPTIONS="-H gnu"
15433 export TAR_OPTIONS
15434 rm -rf *
15435
15436 genfile -l 50000 --file file1
15437 genfile -l 1024 --file file2
15438 tar cf archive file1 file2
15439 tar f archive --delete file2
15440 tar tf archive)
15441 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15442 at_status=$? at_failed=false
15443 $at_check_filter
15444 at_fn_diff_devnull "$at_stderr" || at_failed=:
15445 echo >>"$at_stdout"; $as_echo "file1
15446 " | \
15447   $at_diff - "$at_stdout" || at_failed=:
15448 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:27"
15449 $at_failed && at_fn_log_failure
15450 $at_traceon; }
15451
15452
15453
15454
15455   set +x
15456   $at_times_p && times >"$at_times_file"
15457 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15458 read at_status <"$at_status_file"
15459 #AT_STOP_59
15460 #AT_START_60
15461 at_fn_group_banner 60 'delete02.at:24' \
15462   "deleting a member from stdin archive" "           " 8
15463 at_xfail=no
15464       test -f $XFAILFILE && at_xfail=yes
15465 (
15466   $as_echo "60. $at_setup_line: testing $at_desc ..."
15467   $at_traceon
15468
15469
15470
15471
15472
15473   { set +x
15474 $as_echo "$at_srcdir/delete02.at:27:
15475 mkdir v7
15476 (cd v7
15477 TEST_TAR_FORMAT=v7
15478 export TEST_TAR_FORMAT
15479 TAR_OPTIONS=\"-H v7\"
15480 export TAR_OPTIONS
15481 rm -rf *
15482
15483 genfile -l 3073 -p zeros --file 1
15484 cp 1 2
15485 cp 2 3
15486 tar cf archive 1 2 3
15487 tar tf archive
15488 cat archive | tar f - --delete 2 > archive2
15489 echo separator
15490 tar tf archive2)"
15491 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
15492 ( $at_check_trace;
15493 mkdir v7
15494 (cd v7
15495 TEST_TAR_FORMAT=v7
15496 export TEST_TAR_FORMAT
15497 TAR_OPTIONS="-H v7"
15498 export TAR_OPTIONS
15499 rm -rf *
15500
15501 genfile -l 3073 -p zeros --file 1
15502 cp 1 2
15503 cp 2 3
15504 tar cf archive 1 2 3
15505 tar tf archive
15506 cat archive | tar f - --delete 2 > archive2
15507 echo separator
15508 tar tf archive2)
15509 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15510 at_status=$? at_failed=false
15511 $at_check_filter
15512 at_fn_diff_devnull "$at_stderr" || at_failed=:
15513 echo >>"$at_stdout"; $as_echo "1
15514 2
15515 3
15516 separator
15517 1
15518 3
15519 " | \
15520   $at_diff - "$at_stdout" || at_failed=:
15521 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
15522 $at_failed && at_fn_log_failure
15523 $at_traceon; }
15524
15525               { set +x
15526 $as_echo "$at_srcdir/delete02.at:27:
15527 mkdir oldgnu
15528 (cd oldgnu
15529 TEST_TAR_FORMAT=oldgnu
15530 export TEST_TAR_FORMAT
15531 TAR_OPTIONS=\"-H oldgnu\"
15532 export TAR_OPTIONS
15533 rm -rf *
15534
15535 genfile -l 3073 -p zeros --file 1
15536 cp 1 2
15537 cp 2 3
15538 tar cf archive 1 2 3
15539 tar tf archive
15540 cat archive | tar f - --delete 2 > archive2
15541 echo separator
15542 tar tf archive2)"
15543 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
15544 ( $at_check_trace;
15545 mkdir oldgnu
15546 (cd oldgnu
15547 TEST_TAR_FORMAT=oldgnu
15548 export TEST_TAR_FORMAT
15549 TAR_OPTIONS="-H oldgnu"
15550 export TAR_OPTIONS
15551 rm -rf *
15552
15553 genfile -l 3073 -p zeros --file 1
15554 cp 1 2
15555 cp 2 3
15556 tar cf archive 1 2 3
15557 tar tf archive
15558 cat archive | tar f - --delete 2 > archive2
15559 echo separator
15560 tar tf archive2)
15561 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15562 at_status=$? at_failed=false
15563 $at_check_filter
15564 at_fn_diff_devnull "$at_stderr" || at_failed=:
15565 echo >>"$at_stdout"; $as_echo "1
15566 2
15567 3
15568 separator
15569 1
15570 3
15571 " | \
15572   $at_diff - "$at_stdout" || at_failed=:
15573 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
15574 $at_failed && at_fn_log_failure
15575 $at_traceon; }
15576
15577               { set +x
15578 $as_echo "$at_srcdir/delete02.at:27:
15579 mkdir ustar
15580 (cd ustar
15581 TEST_TAR_FORMAT=ustar
15582 export TEST_TAR_FORMAT
15583 TAR_OPTIONS=\"-H ustar\"
15584 export TAR_OPTIONS
15585 rm -rf *
15586
15587 genfile -l 3073 -p zeros --file 1
15588 cp 1 2
15589 cp 2 3
15590 tar cf archive 1 2 3
15591 tar tf archive
15592 cat archive | tar f - --delete 2 > archive2
15593 echo separator
15594 tar tf archive2)"
15595 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
15596 ( $at_check_trace;
15597 mkdir ustar
15598 (cd ustar
15599 TEST_TAR_FORMAT=ustar
15600 export TEST_TAR_FORMAT
15601 TAR_OPTIONS="-H ustar"
15602 export TAR_OPTIONS
15603 rm -rf *
15604
15605 genfile -l 3073 -p zeros --file 1
15606 cp 1 2
15607 cp 2 3
15608 tar cf archive 1 2 3
15609 tar tf archive
15610 cat archive | tar f - --delete 2 > archive2
15611 echo separator
15612 tar tf archive2)
15613 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15614 at_status=$? at_failed=false
15615 $at_check_filter
15616 at_fn_diff_devnull "$at_stderr" || at_failed=:
15617 echo >>"$at_stdout"; $as_echo "1
15618 2
15619 3
15620 separator
15621 1
15622 3
15623 " | \
15624   $at_diff - "$at_stdout" || at_failed=:
15625 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
15626 $at_failed && at_fn_log_failure
15627 $at_traceon; }
15628
15629               { set +x
15630 $as_echo "$at_srcdir/delete02.at:27:
15631 mkdir posix
15632 (cd posix
15633 TEST_TAR_FORMAT=posix
15634 export TEST_TAR_FORMAT
15635 TAR_OPTIONS=\"-H posix\"
15636 export TAR_OPTIONS
15637 rm -rf *
15638
15639 genfile -l 3073 -p zeros --file 1
15640 cp 1 2
15641 cp 2 3
15642 tar cf archive 1 2 3
15643 tar tf archive
15644 cat archive | tar f - --delete 2 > archive2
15645 echo separator
15646 tar tf archive2)"
15647 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
15648 ( $at_check_trace;
15649 mkdir posix
15650 (cd posix
15651 TEST_TAR_FORMAT=posix
15652 export TEST_TAR_FORMAT
15653 TAR_OPTIONS="-H posix"
15654 export TAR_OPTIONS
15655 rm -rf *
15656
15657 genfile -l 3073 -p zeros --file 1
15658 cp 1 2
15659 cp 2 3
15660 tar cf archive 1 2 3
15661 tar tf archive
15662 cat archive | tar f - --delete 2 > archive2
15663 echo separator
15664 tar tf archive2)
15665 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15666 at_status=$? at_failed=false
15667 $at_check_filter
15668 at_fn_diff_devnull "$at_stderr" || at_failed=:
15669 echo >>"$at_stdout"; $as_echo "1
15670 2
15671 3
15672 separator
15673 1
15674 3
15675 " | \
15676   $at_diff - "$at_stdout" || at_failed=:
15677 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
15678 $at_failed && at_fn_log_failure
15679 $at_traceon; }
15680
15681               { set +x
15682 $as_echo "$at_srcdir/delete02.at:27:
15683 mkdir gnu
15684 (cd gnu
15685 TEST_TAR_FORMAT=gnu
15686 export TEST_TAR_FORMAT
15687 TAR_OPTIONS=\"-H gnu\"
15688 export TAR_OPTIONS
15689 rm -rf *
15690
15691 genfile -l 3073 -p zeros --file 1
15692 cp 1 2
15693 cp 2 3
15694 tar cf archive 1 2 3
15695 tar tf archive
15696 cat archive | tar f - --delete 2 > archive2
15697 echo separator
15698 tar tf archive2)"
15699 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:27"
15700 ( $at_check_trace;
15701 mkdir gnu
15702 (cd gnu
15703 TEST_TAR_FORMAT=gnu
15704 export TEST_TAR_FORMAT
15705 TAR_OPTIONS="-H gnu"
15706 export TAR_OPTIONS
15707 rm -rf *
15708
15709 genfile -l 3073 -p zeros --file 1
15710 cp 1 2
15711 cp 2 3
15712 tar cf archive 1 2 3
15713 tar tf archive
15714 cat archive | tar f - --delete 2 > archive2
15715 echo separator
15716 tar tf archive2)
15717 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15718 at_status=$? at_failed=false
15719 $at_check_filter
15720 at_fn_diff_devnull "$at_stderr" || at_failed=:
15721 echo >>"$at_stdout"; $as_echo "1
15722 2
15723 3
15724 separator
15725 1
15726 3
15727 " | \
15728   $at_diff - "$at_stdout" || at_failed=:
15729 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:27"
15730 $at_failed && at_fn_log_failure
15731 $at_traceon; }
15732
15733
15734
15735
15736   set +x
15737   $at_times_p && times >"$at_times_file"
15738 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15739 read at_status <"$at_status_file"
15740 #AT_STOP_60
15741 #AT_START_61
15742 at_fn_group_banner 61 'delete03.at:21' \
15743   "deleting members with long names" "               " 8
15744 at_xfail=no
15745       test -f $XFAILFILE && at_xfail=yes
15746 (
15747   $as_echo "61. $at_setup_line: testing $at_desc ..."
15748   $at_traceon
15749
15750
15751
15752
15753
15754
15755
15756   { set +x
15757 $as_echo "$at_srcdir/delete03.at:26:
15758 mkdir gnu
15759 (cd gnu
15760 TEST_TAR_FORMAT=gnu
15761 export TEST_TAR_FORMAT
15762 TAR_OPTIONS=\"-H gnu\"
15763 export TAR_OPTIONS
15764 rm -rf *
15765
15766
15767 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
15768 rm -f \$prefix*
15769 for i in 1 2 3 4 5 6 7 8 9
15770 do touch \$prefix\$i
15771 done
15772 tar -cf archive ./\$prefix* &&
15773  tar --delete -f archive ./\${prefix}5 &&
15774  tar -tf archive
15775 )"
15776 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
15777 ( $at_check_trace;
15778 mkdir gnu
15779 (cd gnu
15780 TEST_TAR_FORMAT=gnu
15781 export TEST_TAR_FORMAT
15782 TAR_OPTIONS="-H gnu"
15783 export TAR_OPTIONS
15784 rm -rf *
15785
15786
15787 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
15788 rm -f $prefix*
15789 for i in 1 2 3 4 5 6 7 8 9
15790 do touch $prefix$i
15791 done
15792 tar -cf archive ./$prefix* &&
15793  tar --delete -f archive ./${prefix}5 &&
15794  tar -tf archive
15795 )
15796 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15797 at_status=$? at_failed=false
15798 $at_check_filter
15799 at_fn_diff_devnull "$at_stderr" || at_failed=:
15800 echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
15801 ./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
15802 ./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
15803 ./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
15804 ./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
15805 ./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
15806 ./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
15807 ./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
15808 " | \
15809   $at_diff - "$at_stdout" || at_failed=:
15810 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
15811 $at_failed && at_fn_log_failure
15812 $at_traceon; }
15813
15814               { set +x
15815 $as_echo "$at_srcdir/delete03.at:26:
15816 mkdir oldgnu
15817 (cd oldgnu
15818 TEST_TAR_FORMAT=oldgnu
15819 export TEST_TAR_FORMAT
15820 TAR_OPTIONS=\"-H oldgnu\"
15821 export TAR_OPTIONS
15822 rm -rf *
15823
15824
15825 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
15826 rm -f \$prefix*
15827 for i in 1 2 3 4 5 6 7 8 9
15828 do touch \$prefix\$i
15829 done
15830 tar -cf archive ./\$prefix* &&
15831  tar --delete -f archive ./\${prefix}5 &&
15832  tar -tf archive
15833 )"
15834 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
15835 ( $at_check_trace;
15836 mkdir oldgnu
15837 (cd oldgnu
15838 TEST_TAR_FORMAT=oldgnu
15839 export TEST_TAR_FORMAT
15840 TAR_OPTIONS="-H oldgnu"
15841 export TAR_OPTIONS
15842 rm -rf *
15843
15844
15845 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
15846 rm -f $prefix*
15847 for i in 1 2 3 4 5 6 7 8 9
15848 do touch $prefix$i
15849 done
15850 tar -cf archive ./$prefix* &&
15851  tar --delete -f archive ./${prefix}5 &&
15852  tar -tf archive
15853 )
15854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15855 at_status=$? at_failed=false
15856 $at_check_filter
15857 at_fn_diff_devnull "$at_stderr" || at_failed=:
15858 echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
15859 ./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
15860 ./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
15861 ./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
15862 ./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
15863 ./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
15864 ./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
15865 ./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
15866 " | \
15867   $at_diff - "$at_stdout" || at_failed=:
15868 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
15869 $at_failed && at_fn_log_failure
15870 $at_traceon; }
15871
15872               { set +x
15873 $as_echo "$at_srcdir/delete03.at:26:
15874 mkdir posix
15875 (cd posix
15876 TEST_TAR_FORMAT=posix
15877 export TEST_TAR_FORMAT
15878 TAR_OPTIONS=\"-H posix\"
15879 export TAR_OPTIONS
15880 rm -rf *
15881
15882
15883 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
15884 rm -f \$prefix*
15885 for i in 1 2 3 4 5 6 7 8 9
15886 do touch \$prefix\$i
15887 done
15888 tar -cf archive ./\$prefix* &&
15889  tar --delete -f archive ./\${prefix}5 &&
15890  tar -tf archive
15891 )"
15892 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
15893 ( $at_check_trace;
15894 mkdir posix
15895 (cd posix
15896 TEST_TAR_FORMAT=posix
15897 export TEST_TAR_FORMAT
15898 TAR_OPTIONS="-H posix"
15899 export TAR_OPTIONS
15900 rm -rf *
15901
15902
15903 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
15904 rm -f $prefix*
15905 for i in 1 2 3 4 5 6 7 8 9
15906 do touch $prefix$i
15907 done
15908 tar -cf archive ./$prefix* &&
15909  tar --delete -f archive ./${prefix}5 &&
15910  tar -tf archive
15911 )
15912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15913 at_status=$? at_failed=false
15914 $at_check_filter
15915 at_fn_diff_devnull "$at_stderr" || at_failed=:
15916 echo >>"$at_stdout"; $as_echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
15917 ./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
15918 ./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
15919 ./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
15920 ./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
15921 ./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
15922 ./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
15923 ./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
15924 " | \
15925   $at_diff - "$at_stdout" || at_failed=:
15926 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
15927 $at_failed && at_fn_log_failure
15928 $at_traceon; }
15929
15930
15931
15932
15933
15934   set +x
15935   $at_times_p && times >"$at_times_file"
15936 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15937 read at_status <"$at_status_file"
15938 #AT_STOP_61
15939 #AT_START_62
15940 at_fn_group_banner 62 'delete04.at:24' \
15941   "deleting a large last member" "                   " 8
15942 at_xfail=no
15943       test -f $XFAILFILE && at_xfail=yes
15944 (
15945   $as_echo "62. $at_setup_line: testing $at_desc ..."
15946   $at_traceon
15947
15948
15949
15950
15951
15952   { set +x
15953 $as_echo "$at_srcdir/delete04.at:27:
15954 mkdir v7
15955 (cd v7
15956 TEST_TAR_FORMAT=v7
15957 export TEST_TAR_FORMAT
15958 TAR_OPTIONS=\"-H v7\"
15959 export TAR_OPTIONS
15960 rm -rf *
15961
15962 genfile -l      3 -f file1
15963 genfile -l      5 -f file2
15964 genfile -l      3 -f file3
15965 genfile -l      6 -f file4
15966 genfile -l     24 -f file5
15967 genfile -l     13 -f file6
15968 genfile -l   1385 -f file7
15969 genfile -l     30 -f file8
15970 genfile -l     10 -f file9
15971 genfile -l 256000 -f file10
15972 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
15973 tar f archive --delete file10
15974 tar tf archive
15975 )"
15976 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
15977 ( $at_check_trace;
15978 mkdir v7
15979 (cd v7
15980 TEST_TAR_FORMAT=v7
15981 export TEST_TAR_FORMAT
15982 TAR_OPTIONS="-H v7"
15983 export TAR_OPTIONS
15984 rm -rf *
15985
15986 genfile -l      3 -f file1
15987 genfile -l      5 -f file2
15988 genfile -l      3 -f file3
15989 genfile -l      6 -f file4
15990 genfile -l     24 -f file5
15991 genfile -l     13 -f file6
15992 genfile -l   1385 -f file7
15993 genfile -l     30 -f file8
15994 genfile -l     10 -f file9
15995 genfile -l 256000 -f file10
15996 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
15997 tar f archive --delete file10
15998 tar tf archive
15999 )
16000 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16001 at_status=$? at_failed=false
16002 $at_check_filter
16003 at_fn_diff_devnull "$at_stderr" || at_failed=:
16004 echo >>"$at_stdout"; $as_echo "file1
16005 file2
16006 file3
16007 file4
16008 file5
16009 file6
16010 file7
16011 file8
16012 file9
16013 " | \
16014   $at_diff - "$at_stdout" || at_failed=:
16015 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
16016 $at_failed && at_fn_log_failure
16017 $at_traceon; }
16018
16019               { set +x
16020 $as_echo "$at_srcdir/delete04.at:27:
16021 mkdir oldgnu
16022 (cd oldgnu
16023 TEST_TAR_FORMAT=oldgnu
16024 export TEST_TAR_FORMAT
16025 TAR_OPTIONS=\"-H oldgnu\"
16026 export TAR_OPTIONS
16027 rm -rf *
16028
16029 genfile -l      3 -f file1
16030 genfile -l      5 -f file2
16031 genfile -l      3 -f file3
16032 genfile -l      6 -f file4
16033 genfile -l     24 -f file5
16034 genfile -l     13 -f file6
16035 genfile -l   1385 -f file7
16036 genfile -l     30 -f file8
16037 genfile -l     10 -f file9
16038 genfile -l 256000 -f file10
16039 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
16040 tar f archive --delete file10
16041 tar tf archive
16042 )"
16043 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
16044 ( $at_check_trace;
16045 mkdir oldgnu
16046 (cd oldgnu
16047 TEST_TAR_FORMAT=oldgnu
16048 export TEST_TAR_FORMAT
16049 TAR_OPTIONS="-H oldgnu"
16050 export TAR_OPTIONS
16051 rm -rf *
16052
16053 genfile -l      3 -f file1
16054 genfile -l      5 -f file2
16055 genfile -l      3 -f file3
16056 genfile -l      6 -f file4
16057 genfile -l     24 -f file5
16058 genfile -l     13 -f file6
16059 genfile -l   1385 -f file7
16060 genfile -l     30 -f file8
16061 genfile -l     10 -f file9
16062 genfile -l 256000 -f file10
16063 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
16064 tar f archive --delete file10
16065 tar tf archive
16066 )
16067 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16068 at_status=$? at_failed=false
16069 $at_check_filter
16070 at_fn_diff_devnull "$at_stderr" || at_failed=:
16071 echo >>"$at_stdout"; $as_echo "file1
16072 file2
16073 file3
16074 file4
16075 file5
16076 file6
16077 file7
16078 file8
16079 file9
16080 " | \
16081   $at_diff - "$at_stdout" || at_failed=:
16082 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
16083 $at_failed && at_fn_log_failure
16084 $at_traceon; }
16085
16086               { set +x
16087 $as_echo "$at_srcdir/delete04.at:27:
16088 mkdir ustar
16089 (cd ustar
16090 TEST_TAR_FORMAT=ustar
16091 export TEST_TAR_FORMAT
16092 TAR_OPTIONS=\"-H ustar\"
16093 export TAR_OPTIONS
16094 rm -rf *
16095
16096 genfile -l      3 -f file1
16097 genfile -l      5 -f file2
16098 genfile -l      3 -f file3
16099 genfile -l      6 -f file4
16100 genfile -l     24 -f file5
16101 genfile -l     13 -f file6
16102 genfile -l   1385 -f file7
16103 genfile -l     30 -f file8
16104 genfile -l     10 -f file9
16105 genfile -l 256000 -f file10
16106 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
16107 tar f archive --delete file10
16108 tar tf archive
16109 )"
16110 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
16111 ( $at_check_trace;
16112 mkdir ustar
16113 (cd ustar
16114 TEST_TAR_FORMAT=ustar
16115 export TEST_TAR_FORMAT
16116 TAR_OPTIONS="-H ustar"
16117 export TAR_OPTIONS
16118 rm -rf *
16119
16120 genfile -l      3 -f file1
16121 genfile -l      5 -f file2
16122 genfile -l      3 -f file3
16123 genfile -l      6 -f file4
16124 genfile -l     24 -f file5
16125 genfile -l     13 -f file6
16126 genfile -l   1385 -f file7
16127 genfile -l     30 -f file8
16128 genfile -l     10 -f file9
16129 genfile -l 256000 -f file10
16130 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
16131 tar f archive --delete file10
16132 tar tf archive
16133 )
16134 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16135 at_status=$? at_failed=false
16136 $at_check_filter
16137 at_fn_diff_devnull "$at_stderr" || at_failed=:
16138 echo >>"$at_stdout"; $as_echo "file1
16139 file2
16140 file3
16141 file4
16142 file5
16143 file6
16144 file7
16145 file8
16146 file9
16147 " | \
16148   $at_diff - "$at_stdout" || at_failed=:
16149 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
16150 $at_failed && at_fn_log_failure
16151 $at_traceon; }
16152
16153               { set +x
16154 $as_echo "$at_srcdir/delete04.at:27:
16155 mkdir posix
16156 (cd posix
16157 TEST_TAR_FORMAT=posix
16158 export TEST_TAR_FORMAT
16159 TAR_OPTIONS=\"-H posix\"
16160 export TAR_OPTIONS
16161 rm -rf *
16162
16163 genfile -l      3 -f file1
16164 genfile -l      5 -f file2
16165 genfile -l      3 -f file3
16166 genfile -l      6 -f file4
16167 genfile -l     24 -f file5
16168 genfile -l     13 -f file6
16169 genfile -l   1385 -f file7
16170 genfile -l     30 -f file8
16171 genfile -l     10 -f file9
16172 genfile -l 256000 -f file10
16173 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
16174 tar f archive --delete file10
16175 tar tf archive
16176 )"
16177 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
16178 ( $at_check_trace;
16179 mkdir posix
16180 (cd posix
16181 TEST_TAR_FORMAT=posix
16182 export TEST_TAR_FORMAT
16183 TAR_OPTIONS="-H posix"
16184 export TAR_OPTIONS
16185 rm -rf *
16186
16187 genfile -l      3 -f file1
16188 genfile -l      5 -f file2
16189 genfile -l      3 -f file3
16190 genfile -l      6 -f file4
16191 genfile -l     24 -f file5
16192 genfile -l     13 -f file6
16193 genfile -l   1385 -f file7
16194 genfile -l     30 -f file8
16195 genfile -l     10 -f file9
16196 genfile -l 256000 -f file10
16197 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
16198 tar f archive --delete file10
16199 tar tf archive
16200 )
16201 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16202 at_status=$? at_failed=false
16203 $at_check_filter
16204 at_fn_diff_devnull "$at_stderr" || at_failed=:
16205 echo >>"$at_stdout"; $as_echo "file1
16206 file2
16207 file3
16208 file4
16209 file5
16210 file6
16211 file7
16212 file8
16213 file9
16214 " | \
16215   $at_diff - "$at_stdout" || at_failed=:
16216 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
16217 $at_failed && at_fn_log_failure
16218 $at_traceon; }
16219
16220               { set +x
16221 $as_echo "$at_srcdir/delete04.at:27:
16222 mkdir gnu
16223 (cd gnu
16224 TEST_TAR_FORMAT=gnu
16225 export TEST_TAR_FORMAT
16226 TAR_OPTIONS=\"-H gnu\"
16227 export TAR_OPTIONS
16228 rm -rf *
16229
16230 genfile -l      3 -f file1
16231 genfile -l      5 -f file2
16232 genfile -l      3 -f file3
16233 genfile -l      6 -f file4
16234 genfile -l     24 -f file5
16235 genfile -l     13 -f file6
16236 genfile -l   1385 -f file7
16237 genfile -l     30 -f file8
16238 genfile -l     10 -f file9
16239 genfile -l 256000 -f file10
16240 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
16241 tar f archive --delete file10
16242 tar tf archive
16243 )"
16244 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:27"
16245 ( $at_check_trace;
16246 mkdir gnu
16247 (cd gnu
16248 TEST_TAR_FORMAT=gnu
16249 export TEST_TAR_FORMAT
16250 TAR_OPTIONS="-H gnu"
16251 export TAR_OPTIONS
16252 rm -rf *
16253
16254 genfile -l      3 -f file1
16255 genfile -l      5 -f file2
16256 genfile -l      3 -f file3
16257 genfile -l      6 -f file4
16258 genfile -l     24 -f file5
16259 genfile -l     13 -f file6
16260 genfile -l   1385 -f file7
16261 genfile -l     30 -f file8
16262 genfile -l     10 -f file9
16263 genfile -l 256000 -f file10
16264 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
16265 tar f archive --delete file10
16266 tar tf archive
16267 )
16268 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16269 at_status=$? at_failed=false
16270 $at_check_filter
16271 at_fn_diff_devnull "$at_stderr" || at_failed=:
16272 echo >>"$at_stdout"; $as_echo "file1
16273 file2
16274 file3
16275 file4
16276 file5
16277 file6
16278 file7
16279 file8
16280 file9
16281 " | \
16282   $at_diff - "$at_stdout" || at_failed=:
16283 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:27"
16284 $at_failed && at_fn_log_failure
16285 $at_traceon; }
16286
16287
16288
16289
16290   set +x
16291   $at_times_p && times >"$at_times_file"
16292 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16293 read at_status <"$at_status_file"
16294 #AT_STOP_62
16295 #AT_START_63
16296 at_fn_group_banner 63 'delete05.at:28' \
16297   "deleting non-existing member" "                   " 8
16298 at_xfail=no
16299       test -f $XFAILFILE && at_xfail=yes
16300 (
16301   $as_echo "63. $at_setup_line: testing $at_desc ..."
16302   $at_traceon
16303
16304
16305
16306
16307
16308   { set +x
16309 $as_echo "$at_srcdir/delete05.at:31:
16310 mkdir v7
16311 (cd v7
16312 TEST_TAR_FORMAT=v7
16313 export TEST_TAR_FORMAT
16314 TAR_OPTIONS=\"-H v7\"
16315 export TAR_OPTIONS
16316 rm -rf *
16317
16318 genfile -l 1024 -f en
16319 genfile -l 1024 -f to
16320
16321 tar cf archive en to
16322 # Make sure we don't use bogus blocking factor.
16323 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16324 tar --file archive --blocking-factor=20 --delete tre
16325 tar tf archive
16326 )"
16327 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
16328 ( $at_check_trace;
16329 mkdir v7
16330 (cd v7
16331 TEST_TAR_FORMAT=v7
16332 export TEST_TAR_FORMAT
16333 TAR_OPTIONS="-H v7"
16334 export TAR_OPTIONS
16335 rm -rf *
16336
16337 genfile -l 1024 -f en
16338 genfile -l 1024 -f to
16339
16340 tar cf archive en to
16341 # Make sure we don't use bogus blocking factor.
16342 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16343 tar --file archive --blocking-factor=20 --delete tre
16344 tar tf archive
16345 )
16346 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16347 at_status=$? at_failed=false
16348 $at_check_filter
16349 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
16350 tar: Exiting with failure status due to previous errors
16351 " | \
16352   $at_diff - "$at_stderr" || at_failed=:
16353 echo >>"$at_stdout"; $as_echo "en
16354 to
16355 " | \
16356   $at_diff - "$at_stdout" || at_failed=:
16357 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
16358 $at_failed && at_fn_log_failure
16359 $at_traceon; }
16360
16361               { set +x
16362 $as_echo "$at_srcdir/delete05.at:31:
16363 mkdir oldgnu
16364 (cd oldgnu
16365 TEST_TAR_FORMAT=oldgnu
16366 export TEST_TAR_FORMAT
16367 TAR_OPTIONS=\"-H oldgnu\"
16368 export TAR_OPTIONS
16369 rm -rf *
16370
16371 genfile -l 1024 -f en
16372 genfile -l 1024 -f to
16373
16374 tar cf archive en to
16375 # Make sure we don't use bogus blocking factor.
16376 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16377 tar --file archive --blocking-factor=20 --delete tre
16378 tar tf archive
16379 )"
16380 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
16381 ( $at_check_trace;
16382 mkdir oldgnu
16383 (cd oldgnu
16384 TEST_TAR_FORMAT=oldgnu
16385 export TEST_TAR_FORMAT
16386 TAR_OPTIONS="-H oldgnu"
16387 export TAR_OPTIONS
16388 rm -rf *
16389
16390 genfile -l 1024 -f en
16391 genfile -l 1024 -f to
16392
16393 tar cf archive en to
16394 # Make sure we don't use bogus blocking factor.
16395 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16396 tar --file archive --blocking-factor=20 --delete tre
16397 tar tf archive
16398 )
16399 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16400 at_status=$? at_failed=false
16401 $at_check_filter
16402 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
16403 tar: Exiting with failure status due to previous errors
16404 " | \
16405   $at_diff - "$at_stderr" || at_failed=:
16406 echo >>"$at_stdout"; $as_echo "en
16407 to
16408 " | \
16409   $at_diff - "$at_stdout" || at_failed=:
16410 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
16411 $at_failed && at_fn_log_failure
16412 $at_traceon; }
16413
16414               { set +x
16415 $as_echo "$at_srcdir/delete05.at:31:
16416 mkdir ustar
16417 (cd ustar
16418 TEST_TAR_FORMAT=ustar
16419 export TEST_TAR_FORMAT
16420 TAR_OPTIONS=\"-H ustar\"
16421 export TAR_OPTIONS
16422 rm -rf *
16423
16424 genfile -l 1024 -f en
16425 genfile -l 1024 -f to
16426
16427 tar cf archive en to
16428 # Make sure we don't use bogus blocking factor.
16429 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16430 tar --file archive --blocking-factor=20 --delete tre
16431 tar tf archive
16432 )"
16433 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
16434 ( $at_check_trace;
16435 mkdir ustar
16436 (cd ustar
16437 TEST_TAR_FORMAT=ustar
16438 export TEST_TAR_FORMAT
16439 TAR_OPTIONS="-H ustar"
16440 export TAR_OPTIONS
16441 rm -rf *
16442
16443 genfile -l 1024 -f en
16444 genfile -l 1024 -f to
16445
16446 tar cf archive en to
16447 # Make sure we don't use bogus blocking factor.
16448 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16449 tar --file archive --blocking-factor=20 --delete tre
16450 tar tf archive
16451 )
16452 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16453 at_status=$? at_failed=false
16454 $at_check_filter
16455 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
16456 tar: Exiting with failure status due to previous errors
16457 " | \
16458   $at_diff - "$at_stderr" || at_failed=:
16459 echo >>"$at_stdout"; $as_echo "en
16460 to
16461 " | \
16462   $at_diff - "$at_stdout" || at_failed=:
16463 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
16464 $at_failed && at_fn_log_failure
16465 $at_traceon; }
16466
16467               { set +x
16468 $as_echo "$at_srcdir/delete05.at:31:
16469 mkdir posix
16470 (cd posix
16471 TEST_TAR_FORMAT=posix
16472 export TEST_TAR_FORMAT
16473 TAR_OPTIONS=\"-H posix\"
16474 export TAR_OPTIONS
16475 rm -rf *
16476
16477 genfile -l 1024 -f en
16478 genfile -l 1024 -f to
16479
16480 tar cf archive en to
16481 # Make sure we don't use bogus blocking factor.
16482 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16483 tar --file archive --blocking-factor=20 --delete tre
16484 tar tf archive
16485 )"
16486 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
16487 ( $at_check_trace;
16488 mkdir posix
16489 (cd posix
16490 TEST_TAR_FORMAT=posix
16491 export TEST_TAR_FORMAT
16492 TAR_OPTIONS="-H posix"
16493 export TAR_OPTIONS
16494 rm -rf *
16495
16496 genfile -l 1024 -f en
16497 genfile -l 1024 -f to
16498
16499 tar cf archive en to
16500 # Make sure we don't use bogus blocking factor.
16501 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16502 tar --file archive --blocking-factor=20 --delete tre
16503 tar tf archive
16504 )
16505 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16506 at_status=$? at_failed=false
16507 $at_check_filter
16508 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
16509 tar: Exiting with failure status due to previous errors
16510 " | \
16511   $at_diff - "$at_stderr" || at_failed=:
16512 echo >>"$at_stdout"; $as_echo "en
16513 to
16514 " | \
16515   $at_diff - "$at_stdout" || at_failed=:
16516 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
16517 $at_failed && at_fn_log_failure
16518 $at_traceon; }
16519
16520               { set +x
16521 $as_echo "$at_srcdir/delete05.at:31:
16522 mkdir gnu
16523 (cd gnu
16524 TEST_TAR_FORMAT=gnu
16525 export TEST_TAR_FORMAT
16526 TAR_OPTIONS=\"-H gnu\"
16527 export TAR_OPTIONS
16528 rm -rf *
16529
16530 genfile -l 1024 -f en
16531 genfile -l 1024 -f to
16532
16533 tar cf archive en to
16534 # Make sure we don't use bogus blocking factor.
16535 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16536 tar --file archive --blocking-factor=20 --delete tre
16537 tar tf archive
16538 )"
16539 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:31"
16540 ( $at_check_trace;
16541 mkdir gnu
16542 (cd gnu
16543 TEST_TAR_FORMAT=gnu
16544 export TEST_TAR_FORMAT
16545 TAR_OPTIONS="-H gnu"
16546 export TAR_OPTIONS
16547 rm -rf *
16548
16549 genfile -l 1024 -f en
16550 genfile -l 1024 -f to
16551
16552 tar cf archive en to
16553 # Make sure we don't use bogus blocking factor.
16554 # GNU tar up to and including 1.14.91 produced an empty archive this way:
16555 tar --file archive --blocking-factor=20 --delete tre
16556 tar tf archive
16557 )
16558 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16559 at_status=$? at_failed=false
16560 $at_check_filter
16561 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
16562 tar: Exiting with failure status due to previous errors
16563 " | \
16564   $at_diff - "$at_stderr" || at_failed=:
16565 echo >>"$at_stdout"; $as_echo "en
16566 to
16567 " | \
16568   $at_diff - "$at_stdout" || at_failed=:
16569 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:31"
16570 $at_failed && at_fn_log_failure
16571 $at_traceon; }
16572
16573
16574
16575
16576   set +x
16577   $at_times_p && times >"$at_times_file"
16578 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16579 read at_status <"$at_status_file"
16580 #AT_STOP_63
16581 #AT_START_64
16582 at_fn_group_banner 64 'extrac01.at:24' \
16583   "extract over an existing directory" "             " 9
16584 at_xfail=no
16585       test -f $XFAILFILE && at_xfail=yes
16586 (
16587   $as_echo "64. $at_setup_line: testing $at_desc ..."
16588   $at_traceon
16589
16590
16591
16592
16593
16594   { set +x
16595 $as_echo "$at_srcdir/extrac01.at:27:
16596 mkdir v7
16597 (cd v7
16598 TEST_TAR_FORMAT=v7
16599 export TEST_TAR_FORMAT
16600 TAR_OPTIONS=\"-H v7\"
16601 export TAR_OPTIONS
16602 rm -rf *
16603
16604 mkdir directory
16605 touch directory/file
16606 tar cf archive directory || exit 1
16607 tar xf archive --warning=no-timestamp || exit 1
16608 )"
16609 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
16610 ( $at_check_trace;
16611 mkdir v7
16612 (cd v7
16613 TEST_TAR_FORMAT=v7
16614 export TEST_TAR_FORMAT
16615 TAR_OPTIONS="-H v7"
16616 export TAR_OPTIONS
16617 rm -rf *
16618
16619 mkdir directory
16620 touch directory/file
16621 tar cf archive directory || exit 1
16622 tar xf archive --warning=no-timestamp || exit 1
16623 )
16624 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16625 at_status=$? at_failed=false
16626 $at_check_filter
16627 at_fn_diff_devnull "$at_stderr" || at_failed=:
16628 at_fn_diff_devnull "$at_stdout" || at_failed=:
16629 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
16630 $at_failed && at_fn_log_failure
16631 $at_traceon; }
16632
16633               { set +x
16634 $as_echo "$at_srcdir/extrac01.at:27:
16635 mkdir oldgnu
16636 (cd oldgnu
16637 TEST_TAR_FORMAT=oldgnu
16638 export TEST_TAR_FORMAT
16639 TAR_OPTIONS=\"-H oldgnu\"
16640 export TAR_OPTIONS
16641 rm -rf *
16642
16643 mkdir directory
16644 touch directory/file
16645 tar cf archive directory || exit 1
16646 tar xf archive --warning=no-timestamp || exit 1
16647 )"
16648 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
16649 ( $at_check_trace;
16650 mkdir oldgnu
16651 (cd oldgnu
16652 TEST_TAR_FORMAT=oldgnu
16653 export TEST_TAR_FORMAT
16654 TAR_OPTIONS="-H oldgnu"
16655 export TAR_OPTIONS
16656 rm -rf *
16657
16658 mkdir directory
16659 touch directory/file
16660 tar cf archive directory || exit 1
16661 tar xf archive --warning=no-timestamp || exit 1
16662 )
16663 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16664 at_status=$? at_failed=false
16665 $at_check_filter
16666 at_fn_diff_devnull "$at_stderr" || at_failed=:
16667 at_fn_diff_devnull "$at_stdout" || at_failed=:
16668 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
16669 $at_failed && at_fn_log_failure
16670 $at_traceon; }
16671
16672               { set +x
16673 $as_echo "$at_srcdir/extrac01.at:27:
16674 mkdir ustar
16675 (cd ustar
16676 TEST_TAR_FORMAT=ustar
16677 export TEST_TAR_FORMAT
16678 TAR_OPTIONS=\"-H ustar\"
16679 export TAR_OPTIONS
16680 rm -rf *
16681
16682 mkdir directory
16683 touch directory/file
16684 tar cf archive directory || exit 1
16685 tar xf archive --warning=no-timestamp || exit 1
16686 )"
16687 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
16688 ( $at_check_trace;
16689 mkdir ustar
16690 (cd ustar
16691 TEST_TAR_FORMAT=ustar
16692 export TEST_TAR_FORMAT
16693 TAR_OPTIONS="-H ustar"
16694 export TAR_OPTIONS
16695 rm -rf *
16696
16697 mkdir directory
16698 touch directory/file
16699 tar cf archive directory || exit 1
16700 tar xf archive --warning=no-timestamp || exit 1
16701 )
16702 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16703 at_status=$? at_failed=false
16704 $at_check_filter
16705 at_fn_diff_devnull "$at_stderr" || at_failed=:
16706 at_fn_diff_devnull "$at_stdout" || at_failed=:
16707 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
16708 $at_failed && at_fn_log_failure
16709 $at_traceon; }
16710
16711               { set +x
16712 $as_echo "$at_srcdir/extrac01.at:27:
16713 mkdir posix
16714 (cd posix
16715 TEST_TAR_FORMAT=posix
16716 export TEST_TAR_FORMAT
16717 TAR_OPTIONS=\"-H posix\"
16718 export TAR_OPTIONS
16719 rm -rf *
16720
16721 mkdir directory
16722 touch directory/file
16723 tar cf archive directory || exit 1
16724 tar xf archive --warning=no-timestamp || exit 1
16725 )"
16726 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
16727 ( $at_check_trace;
16728 mkdir posix
16729 (cd posix
16730 TEST_TAR_FORMAT=posix
16731 export TEST_TAR_FORMAT
16732 TAR_OPTIONS="-H posix"
16733 export TAR_OPTIONS
16734 rm -rf *
16735
16736 mkdir directory
16737 touch directory/file
16738 tar cf archive directory || exit 1
16739 tar xf archive --warning=no-timestamp || exit 1
16740 )
16741 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16742 at_status=$? at_failed=false
16743 $at_check_filter
16744 at_fn_diff_devnull "$at_stderr" || at_failed=:
16745 at_fn_diff_devnull "$at_stdout" || at_failed=:
16746 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
16747 $at_failed && at_fn_log_failure
16748 $at_traceon; }
16749
16750               { set +x
16751 $as_echo "$at_srcdir/extrac01.at:27:
16752 mkdir gnu
16753 (cd gnu
16754 TEST_TAR_FORMAT=gnu
16755 export TEST_TAR_FORMAT
16756 TAR_OPTIONS=\"-H gnu\"
16757 export TAR_OPTIONS
16758 rm -rf *
16759
16760 mkdir directory
16761 touch directory/file
16762 tar cf archive directory || exit 1
16763 tar xf archive --warning=no-timestamp || exit 1
16764 )"
16765 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:27"
16766 ( $at_check_trace;
16767 mkdir gnu
16768 (cd gnu
16769 TEST_TAR_FORMAT=gnu
16770 export TEST_TAR_FORMAT
16771 TAR_OPTIONS="-H gnu"
16772 export TAR_OPTIONS
16773 rm -rf *
16774
16775 mkdir directory
16776 touch directory/file
16777 tar cf archive directory || exit 1
16778 tar xf archive --warning=no-timestamp || exit 1
16779 )
16780 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16781 at_status=$? at_failed=false
16782 $at_check_filter
16783 at_fn_diff_devnull "$at_stderr" || at_failed=:
16784 at_fn_diff_devnull "$at_stdout" || at_failed=:
16785 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:27"
16786 $at_failed && at_fn_log_failure
16787 $at_traceon; }
16788
16789
16790
16791
16792   set +x
16793   $at_times_p && times >"$at_times_file"
16794 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16795 read at_status <"$at_status_file"
16796 #AT_STOP_64
16797 #AT_START_65
16798 at_fn_group_banner 65 'extrac02.at:24' \
16799   "extracting symlinks over an existing file" "      " 9
16800 at_xfail=no
16801       test -f $XFAILFILE && at_xfail=yes
16802 (
16803   $as_echo "65. $at_setup_line: testing $at_desc ..."
16804   $at_traceon
16805
16806
16807
16808 # FIXME: Skip if symlinks are not supported on the system
16809
16810
16811
16812   { set +x
16813 $as_echo "$at_srcdir/extrac02.at:29:
16814 mkdir v7
16815 (cd v7
16816 TEST_TAR_FORMAT=v7
16817 export TEST_TAR_FORMAT
16818 TAR_OPTIONS=\"-H v7\"
16819 export TAR_OPTIONS
16820 rm -rf *
16821
16822 touch file
16823 ln -s file link 2> /dev/null || ln file link
16824 tar cf archive link
16825 rm link
16826 touch link
16827 tar xf archive
16828 )"
16829 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
16830 ( $at_check_trace;
16831 mkdir v7
16832 (cd v7
16833 TEST_TAR_FORMAT=v7
16834 export TEST_TAR_FORMAT
16835 TAR_OPTIONS="-H v7"
16836 export TAR_OPTIONS
16837 rm -rf *
16838
16839 touch file
16840 ln -s file link 2> /dev/null || ln file link
16841 tar cf archive link
16842 rm link
16843 touch link
16844 tar xf archive
16845 )
16846 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16847 at_status=$? at_failed=false
16848 $at_check_filter
16849 at_fn_diff_devnull "$at_stderr" || at_failed=:
16850 at_fn_diff_devnull "$at_stdout" || at_failed=:
16851 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
16852 $at_failed && at_fn_log_failure
16853 $at_traceon; }
16854
16855               { set +x
16856 $as_echo "$at_srcdir/extrac02.at:29:
16857 mkdir oldgnu
16858 (cd oldgnu
16859 TEST_TAR_FORMAT=oldgnu
16860 export TEST_TAR_FORMAT
16861 TAR_OPTIONS=\"-H oldgnu\"
16862 export TAR_OPTIONS
16863 rm -rf *
16864
16865 touch file
16866 ln -s file link 2> /dev/null || ln file link
16867 tar cf archive link
16868 rm link
16869 touch link
16870 tar xf archive
16871 )"
16872 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
16873 ( $at_check_trace;
16874 mkdir oldgnu
16875 (cd oldgnu
16876 TEST_TAR_FORMAT=oldgnu
16877 export TEST_TAR_FORMAT
16878 TAR_OPTIONS="-H oldgnu"
16879 export TAR_OPTIONS
16880 rm -rf *
16881
16882 touch file
16883 ln -s file link 2> /dev/null || ln file link
16884 tar cf archive link
16885 rm link
16886 touch link
16887 tar xf archive
16888 )
16889 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16890 at_status=$? at_failed=false
16891 $at_check_filter
16892 at_fn_diff_devnull "$at_stderr" || at_failed=:
16893 at_fn_diff_devnull "$at_stdout" || at_failed=:
16894 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
16895 $at_failed && at_fn_log_failure
16896 $at_traceon; }
16897
16898               { set +x
16899 $as_echo "$at_srcdir/extrac02.at:29:
16900 mkdir ustar
16901 (cd ustar
16902 TEST_TAR_FORMAT=ustar
16903 export TEST_TAR_FORMAT
16904 TAR_OPTIONS=\"-H ustar\"
16905 export TAR_OPTIONS
16906 rm -rf *
16907
16908 touch file
16909 ln -s file link 2> /dev/null || ln file link
16910 tar cf archive link
16911 rm link
16912 touch link
16913 tar xf archive
16914 )"
16915 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
16916 ( $at_check_trace;
16917 mkdir ustar
16918 (cd ustar
16919 TEST_TAR_FORMAT=ustar
16920 export TEST_TAR_FORMAT
16921 TAR_OPTIONS="-H ustar"
16922 export TAR_OPTIONS
16923 rm -rf *
16924
16925 touch file
16926 ln -s file link 2> /dev/null || ln file link
16927 tar cf archive link
16928 rm link
16929 touch link
16930 tar xf archive
16931 )
16932 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16933 at_status=$? at_failed=false
16934 $at_check_filter
16935 at_fn_diff_devnull "$at_stderr" || at_failed=:
16936 at_fn_diff_devnull "$at_stdout" || at_failed=:
16937 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
16938 $at_failed && at_fn_log_failure
16939 $at_traceon; }
16940
16941               { set +x
16942 $as_echo "$at_srcdir/extrac02.at:29:
16943 mkdir posix
16944 (cd posix
16945 TEST_TAR_FORMAT=posix
16946 export TEST_TAR_FORMAT
16947 TAR_OPTIONS=\"-H posix\"
16948 export TAR_OPTIONS
16949 rm -rf *
16950
16951 touch file
16952 ln -s file link 2> /dev/null || ln file link
16953 tar cf archive link
16954 rm link
16955 touch link
16956 tar xf archive
16957 )"
16958 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
16959 ( $at_check_trace;
16960 mkdir posix
16961 (cd posix
16962 TEST_TAR_FORMAT=posix
16963 export TEST_TAR_FORMAT
16964 TAR_OPTIONS="-H posix"
16965 export TAR_OPTIONS
16966 rm -rf *
16967
16968 touch file
16969 ln -s file link 2> /dev/null || ln file link
16970 tar cf archive link
16971 rm link
16972 touch link
16973 tar xf archive
16974 )
16975 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16976 at_status=$? at_failed=false
16977 $at_check_filter
16978 at_fn_diff_devnull "$at_stderr" || at_failed=:
16979 at_fn_diff_devnull "$at_stdout" || at_failed=:
16980 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
16981 $at_failed && at_fn_log_failure
16982 $at_traceon; }
16983
16984               { set +x
16985 $as_echo "$at_srcdir/extrac02.at:29:
16986 mkdir gnu
16987 (cd gnu
16988 TEST_TAR_FORMAT=gnu
16989 export TEST_TAR_FORMAT
16990 TAR_OPTIONS=\"-H gnu\"
16991 export TAR_OPTIONS
16992 rm -rf *
16993
16994 touch file
16995 ln -s file link 2> /dev/null || ln file link
16996 tar cf archive link
16997 rm link
16998 touch link
16999 tar xf archive
17000 )"
17001 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:29"
17002 ( $at_check_trace;
17003 mkdir gnu
17004 (cd gnu
17005 TEST_TAR_FORMAT=gnu
17006 export TEST_TAR_FORMAT
17007 TAR_OPTIONS="-H gnu"
17008 export TAR_OPTIONS
17009 rm -rf *
17010
17011 touch file
17012 ln -s file link 2> /dev/null || ln file link
17013 tar cf archive link
17014 rm link
17015 touch link
17016 tar xf archive
17017 )
17018 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17019 at_status=$? at_failed=false
17020 $at_check_filter
17021 at_fn_diff_devnull "$at_stderr" || at_failed=:
17022 at_fn_diff_devnull "$at_stdout" || at_failed=:
17023 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:29"
17024 $at_failed && at_fn_log_failure
17025 $at_traceon; }
17026
17027
17028
17029
17030   set +x
17031   $at_times_p && times >"$at_times_file"
17032 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17033 read at_status <"$at_status_file"
17034 #AT_STOP_65
17035 #AT_START_66
17036 at_fn_group_banner 66 'extrac03.at:23' \
17037   "extraction loops" "                               " 9
17038 at_xfail=no
17039       test -f $XFAILFILE && at_xfail=yes
17040 (
17041   $as_echo "66. $at_setup_line: testing $at_desc ..."
17042   $at_traceon
17043
17044
17045
17046
17047
17048   { set +x
17049 $as_echo "$at_srcdir/extrac03.at:26:
17050 mkdir v7
17051 (cd v7
17052 TEST_TAR_FORMAT=v7
17053 export TEST_TAR_FORMAT
17054 TAR_OPTIONS=\"-H v7\"
17055 export TAR_OPTIONS
17056 rm -rf *
17057
17058 mkdir directory
17059 tar -cPvf archive directory/../directory
17060 echo separator
17061 tar -xPvf archive --warning=no-timestamp)"
17062 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
17063 ( $at_check_trace;
17064 mkdir v7
17065 (cd v7
17066 TEST_TAR_FORMAT=v7
17067 export TEST_TAR_FORMAT
17068 TAR_OPTIONS="-H v7"
17069 export TAR_OPTIONS
17070 rm -rf *
17071
17072 mkdir directory
17073 tar -cPvf archive directory/../directory
17074 echo separator
17075 tar -xPvf archive --warning=no-timestamp)
17076 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17077 at_status=$? at_failed=false
17078 $at_check_filter
17079 at_fn_diff_devnull "$at_stderr" || at_failed=:
17080 echo >>"$at_stdout"; $as_echo "directory/../directory/
17081 separator
17082 directory/../directory/
17083 " | \
17084   $at_diff - "$at_stdout" || at_failed=:
17085 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
17086 $at_failed && at_fn_log_failure
17087 $at_traceon; }
17088
17089               { set +x
17090 $as_echo "$at_srcdir/extrac03.at:26:
17091 mkdir oldgnu
17092 (cd oldgnu
17093 TEST_TAR_FORMAT=oldgnu
17094 export TEST_TAR_FORMAT
17095 TAR_OPTIONS=\"-H oldgnu\"
17096 export TAR_OPTIONS
17097 rm -rf *
17098
17099 mkdir directory
17100 tar -cPvf archive directory/../directory
17101 echo separator
17102 tar -xPvf archive --warning=no-timestamp)"
17103 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
17104 ( $at_check_trace;
17105 mkdir oldgnu
17106 (cd oldgnu
17107 TEST_TAR_FORMAT=oldgnu
17108 export TEST_TAR_FORMAT
17109 TAR_OPTIONS="-H oldgnu"
17110 export TAR_OPTIONS
17111 rm -rf *
17112
17113 mkdir directory
17114 tar -cPvf archive directory/../directory
17115 echo separator
17116 tar -xPvf archive --warning=no-timestamp)
17117 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17118 at_status=$? at_failed=false
17119 $at_check_filter
17120 at_fn_diff_devnull "$at_stderr" || at_failed=:
17121 echo >>"$at_stdout"; $as_echo "directory/../directory/
17122 separator
17123 directory/../directory/
17124 " | \
17125   $at_diff - "$at_stdout" || at_failed=:
17126 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
17127 $at_failed && at_fn_log_failure
17128 $at_traceon; }
17129
17130               { set +x
17131 $as_echo "$at_srcdir/extrac03.at:26:
17132 mkdir ustar
17133 (cd ustar
17134 TEST_TAR_FORMAT=ustar
17135 export TEST_TAR_FORMAT
17136 TAR_OPTIONS=\"-H ustar\"
17137 export TAR_OPTIONS
17138 rm -rf *
17139
17140 mkdir directory
17141 tar -cPvf archive directory/../directory
17142 echo separator
17143 tar -xPvf archive --warning=no-timestamp)"
17144 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
17145 ( $at_check_trace;
17146 mkdir ustar
17147 (cd ustar
17148 TEST_TAR_FORMAT=ustar
17149 export TEST_TAR_FORMAT
17150 TAR_OPTIONS="-H ustar"
17151 export TAR_OPTIONS
17152 rm -rf *
17153
17154 mkdir directory
17155 tar -cPvf archive directory/../directory
17156 echo separator
17157 tar -xPvf archive --warning=no-timestamp)
17158 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17159 at_status=$? at_failed=false
17160 $at_check_filter
17161 at_fn_diff_devnull "$at_stderr" || at_failed=:
17162 echo >>"$at_stdout"; $as_echo "directory/../directory/
17163 separator
17164 directory/../directory/
17165 " | \
17166   $at_diff - "$at_stdout" || at_failed=:
17167 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
17168 $at_failed && at_fn_log_failure
17169 $at_traceon; }
17170
17171               { set +x
17172 $as_echo "$at_srcdir/extrac03.at:26:
17173 mkdir posix
17174 (cd posix
17175 TEST_TAR_FORMAT=posix
17176 export TEST_TAR_FORMAT
17177 TAR_OPTIONS=\"-H posix\"
17178 export TAR_OPTIONS
17179 rm -rf *
17180
17181 mkdir directory
17182 tar -cPvf archive directory/../directory
17183 echo separator
17184 tar -xPvf archive --warning=no-timestamp)"
17185 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
17186 ( $at_check_trace;
17187 mkdir posix
17188 (cd posix
17189 TEST_TAR_FORMAT=posix
17190 export TEST_TAR_FORMAT
17191 TAR_OPTIONS="-H posix"
17192 export TAR_OPTIONS
17193 rm -rf *
17194
17195 mkdir directory
17196 tar -cPvf archive directory/../directory
17197 echo separator
17198 tar -xPvf archive --warning=no-timestamp)
17199 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17200 at_status=$? at_failed=false
17201 $at_check_filter
17202 at_fn_diff_devnull "$at_stderr" || at_failed=:
17203 echo >>"$at_stdout"; $as_echo "directory/../directory/
17204 separator
17205 directory/../directory/
17206 " | \
17207   $at_diff - "$at_stdout" || at_failed=:
17208 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
17209 $at_failed && at_fn_log_failure
17210 $at_traceon; }
17211
17212               { set +x
17213 $as_echo "$at_srcdir/extrac03.at:26:
17214 mkdir gnu
17215 (cd gnu
17216 TEST_TAR_FORMAT=gnu
17217 export TEST_TAR_FORMAT
17218 TAR_OPTIONS=\"-H gnu\"
17219 export TAR_OPTIONS
17220 rm -rf *
17221
17222 mkdir directory
17223 tar -cPvf archive directory/../directory
17224 echo separator
17225 tar -xPvf archive --warning=no-timestamp)"
17226 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
17227 ( $at_check_trace;
17228 mkdir gnu
17229 (cd gnu
17230 TEST_TAR_FORMAT=gnu
17231 export TEST_TAR_FORMAT
17232 TAR_OPTIONS="-H gnu"
17233 export TAR_OPTIONS
17234 rm -rf *
17235
17236 mkdir directory
17237 tar -cPvf archive directory/../directory
17238 echo separator
17239 tar -xPvf archive --warning=no-timestamp)
17240 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17241 at_status=$? at_failed=false
17242 $at_check_filter
17243 at_fn_diff_devnull "$at_stderr" || at_failed=:
17244 echo >>"$at_stdout"; $as_echo "directory/../directory/
17245 separator
17246 directory/../directory/
17247 " | \
17248   $at_diff - "$at_stdout" || at_failed=:
17249 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
17250 $at_failed && at_fn_log_failure
17251 $at_traceon; }
17252
17253
17254
17255
17256   set +x
17257   $at_times_p && times >"$at_times_file"
17258 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17259 read at_status <"$at_status_file"
17260 #AT_STOP_66
17261 #AT_START_67
17262 at_fn_group_banner 67 'extrac04.at:24' \
17263   "extract + fnmatch" "                              " 9
17264 at_xfail=no
17265       test -f $XFAILFILE && at_xfail=yes
17266 (
17267   $as_echo "67. $at_setup_line: testing $at_desc ..."
17268   $at_traceon
17269
17270
17271
17272
17273
17274   { set +x
17275 $as_echo "$at_srcdir/extrac04.at:27:
17276 mkdir v7
17277 (cd v7
17278 TEST_TAR_FORMAT=v7
17279 export TEST_TAR_FORMAT
17280 TAR_OPTIONS=\"-H v7\"
17281 export TAR_OPTIONS
17282 rm -rf *
17283
17284
17285 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
17286
17287 touch file1
17288 mkdir directory
17289 mkdir directory/subdirectory
17290 touch directory/file1
17291 touch directory/file2
17292 touch directory/subdirectory/file1
17293 touch directory/subdirectory/file2
17294 tar -cf archive ./file1 directory
17295 tar -tf archive \\
17296   --exclude='./*1' \\
17297   --exclude='d*/*1' \\
17298   --exclude='d*/s*/*2' | sort
17299 )"
17300 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
17301 ( $at_check_trace;
17302 mkdir v7
17303 (cd v7
17304 TEST_TAR_FORMAT=v7
17305 export TEST_TAR_FORMAT
17306 TAR_OPTIONS="-H v7"
17307 export TAR_OPTIONS
17308 rm -rf *
17309
17310
17311 test -z "`sort < /dev/null 2>&1`" || exit 77
17312
17313 touch file1
17314 mkdir directory
17315 mkdir directory/subdirectory
17316 touch directory/file1
17317 touch directory/file2
17318 touch directory/subdirectory/file1
17319 touch directory/subdirectory/file2
17320 tar -cf archive ./file1 directory
17321 tar -tf archive \
17322   --exclude='./*1' \
17323   --exclude='d*/*1' \
17324   --exclude='d*/s*/*2' | sort
17325 )
17326 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17327 at_status=$? at_failed=false
17328 $at_check_filter
17329 at_fn_diff_devnull "$at_stderr" || at_failed=:
17330 echo >>"$at_stdout"; $as_echo "directory/
17331 directory/file2
17332 directory/subdirectory/
17333 " | \
17334   $at_diff - "$at_stdout" || at_failed=:
17335 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
17336 $at_failed && at_fn_log_failure
17337 $at_traceon; }
17338
17339               { set +x
17340 $as_echo "$at_srcdir/extrac04.at:27:
17341 mkdir oldgnu
17342 (cd oldgnu
17343 TEST_TAR_FORMAT=oldgnu
17344 export TEST_TAR_FORMAT
17345 TAR_OPTIONS=\"-H oldgnu\"
17346 export TAR_OPTIONS
17347 rm -rf *
17348
17349
17350 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
17351
17352 touch file1
17353 mkdir directory
17354 mkdir directory/subdirectory
17355 touch directory/file1
17356 touch directory/file2
17357 touch directory/subdirectory/file1
17358 touch directory/subdirectory/file2
17359 tar -cf archive ./file1 directory
17360 tar -tf archive \\
17361   --exclude='./*1' \\
17362   --exclude='d*/*1' \\
17363   --exclude='d*/s*/*2' | sort
17364 )"
17365 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
17366 ( $at_check_trace;
17367 mkdir oldgnu
17368 (cd oldgnu
17369 TEST_TAR_FORMAT=oldgnu
17370 export TEST_TAR_FORMAT
17371 TAR_OPTIONS="-H oldgnu"
17372 export TAR_OPTIONS
17373 rm -rf *
17374
17375
17376 test -z "`sort < /dev/null 2>&1`" || exit 77
17377
17378 touch file1
17379 mkdir directory
17380 mkdir directory/subdirectory
17381 touch directory/file1
17382 touch directory/file2
17383 touch directory/subdirectory/file1
17384 touch directory/subdirectory/file2
17385 tar -cf archive ./file1 directory
17386 tar -tf archive \
17387   --exclude='./*1' \
17388   --exclude='d*/*1' \
17389   --exclude='d*/s*/*2' | sort
17390 )
17391 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17392 at_status=$? at_failed=false
17393 $at_check_filter
17394 at_fn_diff_devnull "$at_stderr" || at_failed=:
17395 echo >>"$at_stdout"; $as_echo "directory/
17396 directory/file2
17397 directory/subdirectory/
17398 " | \
17399   $at_diff - "$at_stdout" || at_failed=:
17400 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
17401 $at_failed && at_fn_log_failure
17402 $at_traceon; }
17403
17404               { set +x
17405 $as_echo "$at_srcdir/extrac04.at:27:
17406 mkdir ustar
17407 (cd ustar
17408 TEST_TAR_FORMAT=ustar
17409 export TEST_TAR_FORMAT
17410 TAR_OPTIONS=\"-H ustar\"
17411 export TAR_OPTIONS
17412 rm -rf *
17413
17414
17415 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
17416
17417 touch file1
17418 mkdir directory
17419 mkdir directory/subdirectory
17420 touch directory/file1
17421 touch directory/file2
17422 touch directory/subdirectory/file1
17423 touch directory/subdirectory/file2
17424 tar -cf archive ./file1 directory
17425 tar -tf archive \\
17426   --exclude='./*1' \\
17427   --exclude='d*/*1' \\
17428   --exclude='d*/s*/*2' | sort
17429 )"
17430 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
17431 ( $at_check_trace;
17432 mkdir ustar
17433 (cd ustar
17434 TEST_TAR_FORMAT=ustar
17435 export TEST_TAR_FORMAT
17436 TAR_OPTIONS="-H ustar"
17437 export TAR_OPTIONS
17438 rm -rf *
17439
17440
17441 test -z "`sort < /dev/null 2>&1`" || exit 77
17442
17443 touch file1
17444 mkdir directory
17445 mkdir directory/subdirectory
17446 touch directory/file1
17447 touch directory/file2
17448 touch directory/subdirectory/file1
17449 touch directory/subdirectory/file2
17450 tar -cf archive ./file1 directory
17451 tar -tf archive \
17452   --exclude='./*1' \
17453   --exclude='d*/*1' \
17454   --exclude='d*/s*/*2' | sort
17455 )
17456 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17457 at_status=$? at_failed=false
17458 $at_check_filter
17459 at_fn_diff_devnull "$at_stderr" || at_failed=:
17460 echo >>"$at_stdout"; $as_echo "directory/
17461 directory/file2
17462 directory/subdirectory/
17463 " | \
17464   $at_diff - "$at_stdout" || at_failed=:
17465 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
17466 $at_failed && at_fn_log_failure
17467 $at_traceon; }
17468
17469               { set +x
17470 $as_echo "$at_srcdir/extrac04.at:27:
17471 mkdir posix
17472 (cd posix
17473 TEST_TAR_FORMAT=posix
17474 export TEST_TAR_FORMAT
17475 TAR_OPTIONS=\"-H posix\"
17476 export TAR_OPTIONS
17477 rm -rf *
17478
17479
17480 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
17481
17482 touch file1
17483 mkdir directory
17484 mkdir directory/subdirectory
17485 touch directory/file1
17486 touch directory/file2
17487 touch directory/subdirectory/file1
17488 touch directory/subdirectory/file2
17489 tar -cf archive ./file1 directory
17490 tar -tf archive \\
17491   --exclude='./*1' \\
17492   --exclude='d*/*1' \\
17493   --exclude='d*/s*/*2' | sort
17494 )"
17495 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
17496 ( $at_check_trace;
17497 mkdir posix
17498 (cd posix
17499 TEST_TAR_FORMAT=posix
17500 export TEST_TAR_FORMAT
17501 TAR_OPTIONS="-H posix"
17502 export TAR_OPTIONS
17503 rm -rf *
17504
17505
17506 test -z "`sort < /dev/null 2>&1`" || exit 77
17507
17508 touch file1
17509 mkdir directory
17510 mkdir directory/subdirectory
17511 touch directory/file1
17512 touch directory/file2
17513 touch directory/subdirectory/file1
17514 touch directory/subdirectory/file2
17515 tar -cf archive ./file1 directory
17516 tar -tf archive \
17517   --exclude='./*1' \
17518   --exclude='d*/*1' \
17519   --exclude='d*/s*/*2' | sort
17520 )
17521 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17522 at_status=$? at_failed=false
17523 $at_check_filter
17524 at_fn_diff_devnull "$at_stderr" || at_failed=:
17525 echo >>"$at_stdout"; $as_echo "directory/
17526 directory/file2
17527 directory/subdirectory/
17528 " | \
17529   $at_diff - "$at_stdout" || at_failed=:
17530 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
17531 $at_failed && at_fn_log_failure
17532 $at_traceon; }
17533
17534               { set +x
17535 $as_echo "$at_srcdir/extrac04.at:27:
17536 mkdir gnu
17537 (cd gnu
17538 TEST_TAR_FORMAT=gnu
17539 export TEST_TAR_FORMAT
17540 TAR_OPTIONS=\"-H gnu\"
17541 export TAR_OPTIONS
17542 rm -rf *
17543
17544
17545 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
17546
17547 touch file1
17548 mkdir directory
17549 mkdir directory/subdirectory
17550 touch directory/file1
17551 touch directory/file2
17552 touch directory/subdirectory/file1
17553 touch directory/subdirectory/file2
17554 tar -cf archive ./file1 directory
17555 tar -tf archive \\
17556   --exclude='./*1' \\
17557   --exclude='d*/*1' \\
17558   --exclude='d*/s*/*2' | sort
17559 )"
17560 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:27"
17561 ( $at_check_trace;
17562 mkdir gnu
17563 (cd gnu
17564 TEST_TAR_FORMAT=gnu
17565 export TEST_TAR_FORMAT
17566 TAR_OPTIONS="-H gnu"
17567 export TAR_OPTIONS
17568 rm -rf *
17569
17570
17571 test -z "`sort < /dev/null 2>&1`" || exit 77
17572
17573 touch file1
17574 mkdir directory
17575 mkdir directory/subdirectory
17576 touch directory/file1
17577 touch directory/file2
17578 touch directory/subdirectory/file1
17579 touch directory/subdirectory/file2
17580 tar -cf archive ./file1 directory
17581 tar -tf archive \
17582   --exclude='./*1' \
17583   --exclude='d*/*1' \
17584   --exclude='d*/s*/*2' | sort
17585 )
17586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17587 at_status=$? at_failed=false
17588 $at_check_filter
17589 at_fn_diff_devnull "$at_stderr" || at_failed=:
17590 echo >>"$at_stdout"; $as_echo "directory/
17591 directory/file2
17592 directory/subdirectory/
17593 " | \
17594   $at_diff - "$at_stdout" || at_failed=:
17595 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:27"
17596 $at_failed && at_fn_log_failure
17597 $at_traceon; }
17598
17599
17600
17601
17602   set +x
17603   $at_times_p && times >"$at_times_file"
17604 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17605 read at_status <"$at_status_file"
17606 #AT_STOP_67
17607 #AT_START_68
17608 at_fn_group_banner 68 'extrac05.at:31' \
17609   "extracting selected members from pax" "           " 9
17610 at_xfail=no
17611       test -f $XFAILFILE && at_xfail=yes
17612 (
17613   $as_echo "68. $at_setup_line: testing $at_desc ..."
17614   $at_traceon
17615
17616
17617
17618 cat >list <<'_ATEOF'
17619 jeden
17620 cztery
17621 _ATEOF
17622
17623
17624
17625
17626   { set +x
17627 $as_echo "$at_srcdir/extrac05.at:39:
17628 mkdir posix
17629 (cd posix
17630 TEST_TAR_FORMAT=posix
17631 export TEST_TAR_FORMAT
17632 TAR_OPTIONS=\"-H posix\"
17633 export TAR_OPTIONS
17634 rm -rf *
17635
17636 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
17637 genfile --length 118 --file jeden
17638 genfile --length 223 --file dwa
17639 genfile --length 517 --file trzy
17640 genfile --length 110 --file cztery
17641
17642 tar cf archive jeden dwa trzy cztery || exit 1
17643
17644 mkdir dir
17645 cd dir
17646
17647 tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
17648
17649 cd ..
17650 )"
17651 at_fn_check_prepare_notrace 'an embedded newline' "extrac05.at:39"
17652 ( $at_check_trace;
17653 mkdir posix
17654 (cd posix
17655 TEST_TAR_FORMAT=posix
17656 export TEST_TAR_FORMAT
17657 TAR_OPTIONS="-H posix"
17658 export TAR_OPTIONS
17659 rm -rf *
17660
17661 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
17662 genfile --length 118 --file jeden
17663 genfile --length 223 --file dwa
17664 genfile --length 517 --file trzy
17665 genfile --length 110 --file cztery
17666
17667 tar cf archive jeden dwa trzy cztery || exit 1
17668
17669 mkdir dir
17670 cd dir
17671
17672 tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
17673
17674 cd ..
17675 )
17676 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17677 at_status=$? at_failed=false
17678 $at_check_filter
17679 at_fn_diff_devnull "$at_stderr" || at_failed=:
17680 echo >>"$at_stdout"; $as_echo "jeden
17681 cztery
17682 " | \
17683   $at_diff - "$at_stdout" || at_failed=:
17684 at_fn_check_status 0 $at_status "$at_srcdir/extrac05.at:39"
17685 $at_failed && at_fn_log_failure
17686 $at_traceon; }
17687
17688
17689
17690
17691   set +x
17692   $at_times_p && times >"$at_times_file"
17693 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17694 read at_status <"$at_status_file"
17695 #AT_STOP_68
17696 #AT_START_69
17697 at_fn_group_banner 69 'extrac06.at:34' \
17698   "mode of extracted directories" "                  " 9
17699 at_xfail=no
17700       test -f $XFAILFILE && at_xfail=yes
17701 (
17702   $as_echo "69. $at_setup_line: testing $at_desc ..."
17703   $at_traceon
17704
17705
17706
17707
17708
17709   { set +x
17710 $as_echo "$at_srcdir/extrac06.at:37:
17711 mkdir v7
17712 (cd v7
17713 TEST_TAR_FORMAT=v7
17714 export TEST_TAR_FORMAT
17715 TAR_OPTIONS=\"-H v7\"
17716 export TAR_OPTIONS
17717 rm -rf *
17718
17719
17720 # Force umask
17721 umask 022
17722
17723 # Make sure user's umask is honored, even if we are superuser
17724 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
17725
17726 # Create a directory
17727 mkdir directory
17728 chmod 777 directory
17729 genfile --stat=mode:777 directory
17730
17731 # Archive it
17732 tar cf arc directory
17733
17734 # Change its permissions ...
17735 chmod 755 directory
17736 genfile --stat=mode:777 directory
17737
17738 # ... and attempt to restore it twice
17739 tar xf arc directory --warning=no-timestamp
17740 genfile --stat=mode:777 directory
17741
17742 tar xf arc directory --warning=no-timestamp
17743 genfile --stat=mode:777 directory
17744
17745 # After both restores, the directory mode should be 755
17746 )"
17747 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
17748 ( $at_check_trace;
17749 mkdir v7
17750 (cd v7
17751 TEST_TAR_FORMAT=v7
17752 export TEST_TAR_FORMAT
17753 TAR_OPTIONS="-H v7"
17754 export TAR_OPTIONS
17755 rm -rf *
17756
17757
17758 # Force umask
17759 umask 022
17760
17761 # Make sure user's umask is honored, even if we are superuser
17762 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
17763
17764 # Create a directory
17765 mkdir directory
17766 chmod 777 directory
17767 genfile --stat=mode:777 directory
17768
17769 # Archive it
17770 tar cf arc directory
17771
17772 # Change its permissions ...
17773 chmod 755 directory
17774 genfile --stat=mode:777 directory
17775
17776 # ... and attempt to restore it twice
17777 tar xf arc directory --warning=no-timestamp
17778 genfile --stat=mode:777 directory
17779
17780 tar xf arc directory --warning=no-timestamp
17781 genfile --stat=mode:777 directory
17782
17783 # After both restores, the directory mode should be 755
17784 )
17785 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17786 at_status=$? at_failed=false
17787 $at_check_filter
17788 at_fn_diff_devnull "$at_stderr" || at_failed=:
17789 echo >>"$at_stdout"; $as_echo "777
17790 755
17791 755
17792 755
17793 " | \
17794   $at_diff - "$at_stdout" || at_failed=:
17795 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
17796 $at_failed && at_fn_log_failure
17797 $at_traceon; }
17798
17799               { set +x
17800 $as_echo "$at_srcdir/extrac06.at:37:
17801 mkdir oldgnu
17802 (cd oldgnu
17803 TEST_TAR_FORMAT=oldgnu
17804 export TEST_TAR_FORMAT
17805 TAR_OPTIONS=\"-H oldgnu\"
17806 export TAR_OPTIONS
17807 rm -rf *
17808
17809
17810 # Force umask
17811 umask 022
17812
17813 # Make sure user's umask is honored, even if we are superuser
17814 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
17815
17816 # Create a directory
17817 mkdir directory
17818 chmod 777 directory
17819 genfile --stat=mode:777 directory
17820
17821 # Archive it
17822 tar cf arc directory
17823
17824 # Change its permissions ...
17825 chmod 755 directory
17826 genfile --stat=mode:777 directory
17827
17828 # ... and attempt to restore it twice
17829 tar xf arc directory --warning=no-timestamp
17830 genfile --stat=mode:777 directory
17831
17832 tar xf arc directory --warning=no-timestamp
17833 genfile --stat=mode:777 directory
17834
17835 # After both restores, the directory mode should be 755
17836 )"
17837 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
17838 ( $at_check_trace;
17839 mkdir oldgnu
17840 (cd oldgnu
17841 TEST_TAR_FORMAT=oldgnu
17842 export TEST_TAR_FORMAT
17843 TAR_OPTIONS="-H oldgnu"
17844 export TAR_OPTIONS
17845 rm -rf *
17846
17847
17848 # Force umask
17849 umask 022
17850
17851 # Make sure user's umask is honored, even if we are superuser
17852 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
17853
17854 # Create a directory
17855 mkdir directory
17856 chmod 777 directory
17857 genfile --stat=mode:777 directory
17858
17859 # Archive it
17860 tar cf arc directory
17861
17862 # Change its permissions ...
17863 chmod 755 directory
17864 genfile --stat=mode:777 directory
17865
17866 # ... and attempt to restore it twice
17867 tar xf arc directory --warning=no-timestamp
17868 genfile --stat=mode:777 directory
17869
17870 tar xf arc directory --warning=no-timestamp
17871 genfile --stat=mode:777 directory
17872
17873 # After both restores, the directory mode should be 755
17874 )
17875 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17876 at_status=$? at_failed=false
17877 $at_check_filter
17878 at_fn_diff_devnull "$at_stderr" || at_failed=:
17879 echo >>"$at_stdout"; $as_echo "777
17880 755
17881 755
17882 755
17883 " | \
17884   $at_diff - "$at_stdout" || at_failed=:
17885 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
17886 $at_failed && at_fn_log_failure
17887 $at_traceon; }
17888
17889               { set +x
17890 $as_echo "$at_srcdir/extrac06.at:37:
17891 mkdir ustar
17892 (cd ustar
17893 TEST_TAR_FORMAT=ustar
17894 export TEST_TAR_FORMAT
17895 TAR_OPTIONS=\"-H ustar\"
17896 export TAR_OPTIONS
17897 rm -rf *
17898
17899
17900 # Force umask
17901 umask 022
17902
17903 # Make sure user's umask is honored, even if we are superuser
17904 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
17905
17906 # Create a directory
17907 mkdir directory
17908 chmod 777 directory
17909 genfile --stat=mode:777 directory
17910
17911 # Archive it
17912 tar cf arc directory
17913
17914 # Change its permissions ...
17915 chmod 755 directory
17916 genfile --stat=mode:777 directory
17917
17918 # ... and attempt to restore it twice
17919 tar xf arc directory --warning=no-timestamp
17920 genfile --stat=mode:777 directory
17921
17922 tar xf arc directory --warning=no-timestamp
17923 genfile --stat=mode:777 directory
17924
17925 # After both restores, the directory mode should be 755
17926 )"
17927 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
17928 ( $at_check_trace;
17929 mkdir ustar
17930 (cd ustar
17931 TEST_TAR_FORMAT=ustar
17932 export TEST_TAR_FORMAT
17933 TAR_OPTIONS="-H ustar"
17934 export TAR_OPTIONS
17935 rm -rf *
17936
17937
17938 # Force umask
17939 umask 022
17940
17941 # Make sure user's umask is honored, even if we are superuser
17942 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
17943
17944 # Create a directory
17945 mkdir directory
17946 chmod 777 directory
17947 genfile --stat=mode:777 directory
17948
17949 # Archive it
17950 tar cf arc directory
17951
17952 # Change its permissions ...
17953 chmod 755 directory
17954 genfile --stat=mode:777 directory
17955
17956 # ... and attempt to restore it twice
17957 tar xf arc directory --warning=no-timestamp
17958 genfile --stat=mode:777 directory
17959
17960 tar xf arc directory --warning=no-timestamp
17961 genfile --stat=mode:777 directory
17962
17963 # After both restores, the directory mode should be 755
17964 )
17965 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17966 at_status=$? at_failed=false
17967 $at_check_filter
17968 at_fn_diff_devnull "$at_stderr" || at_failed=:
17969 echo >>"$at_stdout"; $as_echo "777
17970 755
17971 755
17972 755
17973 " | \
17974   $at_diff - "$at_stdout" || at_failed=:
17975 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
17976 $at_failed && at_fn_log_failure
17977 $at_traceon; }
17978
17979               { set +x
17980 $as_echo "$at_srcdir/extrac06.at:37:
17981 mkdir posix
17982 (cd posix
17983 TEST_TAR_FORMAT=posix
17984 export TEST_TAR_FORMAT
17985 TAR_OPTIONS=\"-H posix\"
17986 export TAR_OPTIONS
17987 rm -rf *
17988
17989
17990 # Force umask
17991 umask 022
17992
17993 # Make sure user's umask is honored, even if we are superuser
17994 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
17995
17996 # Create a directory
17997 mkdir directory
17998 chmod 777 directory
17999 genfile --stat=mode:777 directory
18000
18001 # Archive it
18002 tar cf arc directory
18003
18004 # Change its permissions ...
18005 chmod 755 directory
18006 genfile --stat=mode:777 directory
18007
18008 # ... and attempt to restore it twice
18009 tar xf arc directory --warning=no-timestamp
18010 genfile --stat=mode:777 directory
18011
18012 tar xf arc directory --warning=no-timestamp
18013 genfile --stat=mode:777 directory
18014
18015 # After both restores, the directory mode should be 755
18016 )"
18017 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
18018 ( $at_check_trace;
18019 mkdir posix
18020 (cd posix
18021 TEST_TAR_FORMAT=posix
18022 export TEST_TAR_FORMAT
18023 TAR_OPTIONS="-H posix"
18024 export TAR_OPTIONS
18025 rm -rf *
18026
18027
18028 # Force umask
18029 umask 022
18030
18031 # Make sure user's umask is honored, even if we are superuser
18032 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
18033
18034 # Create a directory
18035 mkdir directory
18036 chmod 777 directory
18037 genfile --stat=mode:777 directory
18038
18039 # Archive it
18040 tar cf arc directory
18041
18042 # Change its permissions ...
18043 chmod 755 directory
18044 genfile --stat=mode:777 directory
18045
18046 # ... and attempt to restore it twice
18047 tar xf arc directory --warning=no-timestamp
18048 genfile --stat=mode:777 directory
18049
18050 tar xf arc directory --warning=no-timestamp
18051 genfile --stat=mode:777 directory
18052
18053 # After both restores, the directory mode should be 755
18054 )
18055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18056 at_status=$? at_failed=false
18057 $at_check_filter
18058 at_fn_diff_devnull "$at_stderr" || at_failed=:
18059 echo >>"$at_stdout"; $as_echo "777
18060 755
18061 755
18062 755
18063 " | \
18064   $at_diff - "$at_stdout" || at_failed=:
18065 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
18066 $at_failed && at_fn_log_failure
18067 $at_traceon; }
18068
18069               { set +x
18070 $as_echo "$at_srcdir/extrac06.at:37:
18071 mkdir gnu
18072 (cd gnu
18073 TEST_TAR_FORMAT=gnu
18074 export TEST_TAR_FORMAT
18075 TAR_OPTIONS=\"-H gnu\"
18076 export TAR_OPTIONS
18077 rm -rf *
18078
18079
18080 # Force umask
18081 umask 022
18082
18083 # Make sure user's umask is honored, even if we are superuser
18084 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
18085
18086 # Create a directory
18087 mkdir directory
18088 chmod 777 directory
18089 genfile --stat=mode:777 directory
18090
18091 # Archive it
18092 tar cf arc directory
18093
18094 # Change its permissions ...
18095 chmod 755 directory
18096 genfile --stat=mode:777 directory
18097
18098 # ... and attempt to restore it twice
18099 tar xf arc directory --warning=no-timestamp
18100 genfile --stat=mode:777 directory
18101
18102 tar xf arc directory --warning=no-timestamp
18103 genfile --stat=mode:777 directory
18104
18105 # After both restores, the directory mode should be 755
18106 )"
18107 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
18108 ( $at_check_trace;
18109 mkdir gnu
18110 (cd gnu
18111 TEST_TAR_FORMAT=gnu
18112 export TEST_TAR_FORMAT
18113 TAR_OPTIONS="-H gnu"
18114 export TAR_OPTIONS
18115 rm -rf *
18116
18117
18118 # Force umask
18119 umask 022
18120
18121 # Make sure user's umask is honored, even if we are superuser
18122 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
18123
18124 # Create a directory
18125 mkdir directory
18126 chmod 777 directory
18127 genfile --stat=mode:777 directory
18128
18129 # Archive it
18130 tar cf arc directory
18131
18132 # Change its permissions ...
18133 chmod 755 directory
18134 genfile --stat=mode:777 directory
18135
18136 # ... and attempt to restore it twice
18137 tar xf arc directory --warning=no-timestamp
18138 genfile --stat=mode:777 directory
18139
18140 tar xf arc directory --warning=no-timestamp
18141 genfile --stat=mode:777 directory
18142
18143 # After both restores, the directory mode should be 755
18144 )
18145 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18146 at_status=$? at_failed=false
18147 $at_check_filter
18148 at_fn_diff_devnull "$at_stderr" || at_failed=:
18149 echo >>"$at_stdout"; $as_echo "777
18150 755
18151 755
18152 755
18153 " | \
18154   $at_diff - "$at_stdout" || at_failed=:
18155 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
18156 $at_failed && at_fn_log_failure
18157 $at_traceon; }
18158
18159
18160
18161
18162   set +x
18163   $at_times_p && times >"$at_times_file"
18164 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18165 read at_status <"$at_status_file"
18166 #AT_STOP_69
18167 #AT_START_70
18168 at_fn_group_banner 70 'extrac07.at:27' \
18169   "extracting symlinks to a read-only dir" "         " 9
18170 at_xfail=no
18171       test -f $XFAILFILE && at_xfail=yes
18172 (
18173   $as_echo "70. $at_setup_line: testing $at_desc ..."
18174   $at_traceon
18175
18176
18177
18178
18179
18180   { set +x
18181 $as_echo "$at_srcdir/extrac07.at:30:
18182 mkdir ustar
18183 (cd ustar
18184 TEST_TAR_FORMAT=ustar
18185 export TEST_TAR_FORMAT
18186 TAR_OPTIONS=\"-H ustar\"
18187 export TAR_OPTIONS
18188 rm -rf *
18189
18190
18191 echo \"test\" > \$\$
18192 chmod 0 \$\$
18193 cat \$\$ > /dev/null 2>&1
18194 result=\$?
18195 rm -f \$\$
18196 test \$result -eq 0 && exit 77
18197
18198
18199 echo Prepare the directory
18200 mkdir dir
18201 genfile -f foo
18202 cd dir
18203 ln -s ../foo .
18204 cd ..
18205 chmod a-w dir
18206
18207 echo Create the archive
18208 tar cf archive dir || exit 1
18209
18210 chmod +w dir
18211
18212 echo Extract
18213 mkdir out
18214 tar -C out -xvf archive
18215 )"
18216 at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30"
18217 ( $at_check_trace;
18218 mkdir ustar
18219 (cd ustar
18220 TEST_TAR_FORMAT=ustar
18221 export TEST_TAR_FORMAT
18222 TAR_OPTIONS="-H ustar"
18223 export TAR_OPTIONS
18224 rm -rf *
18225
18226
18227 echo "test" > $$
18228 chmod 0 $$
18229 cat $$ > /dev/null 2>&1
18230 result=$?
18231 rm -f $$
18232 test $result -eq 0 && exit 77
18233
18234
18235 echo Prepare the directory
18236 mkdir dir
18237 genfile -f foo
18238 cd dir
18239 ln -s ../foo .
18240 cd ..
18241 chmod a-w dir
18242
18243 echo Create the archive
18244 tar cf archive dir || exit 1
18245
18246 chmod +w dir
18247
18248 echo Extract
18249 mkdir out
18250 tar -C out -xvf archive
18251 )
18252 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18253 at_status=$? at_failed=false
18254 $at_check_filter
18255 at_fn_diff_devnull "$at_stderr" || at_failed=:
18256 echo >>"$at_stdout"; $as_echo "Prepare the directory
18257 Create the archive
18258 Extract
18259 dir/
18260 dir/foo
18261 " | \
18262   $at_diff - "$at_stdout" || at_failed=:
18263 at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30"
18264 $at_failed && at_fn_log_failure
18265 $at_traceon; }
18266
18267
18268  # Testing one format is enough
18269
18270   set +x
18271   $at_times_p && times >"$at_times_file"
18272 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18273 read at_status <"$at_status_file"
18274 #AT_STOP_70
18275 #AT_START_71
18276 at_fn_group_banner 71 'extrac08.at:33' \
18277   "restoring mode on existing directory" "           " 9
18278 at_xfail=no
18279       test -f $XFAILFILE && at_xfail=yes
18280 (
18281   $as_echo "71. $at_setup_line: testing $at_desc ..."
18282   $at_traceon
18283
18284
18285
18286
18287
18288   { set +x
18289 $as_echo "$at_srcdir/extrac08.at:36:
18290 mkdir v7
18291 (cd v7
18292 TEST_TAR_FORMAT=v7
18293 export TEST_TAR_FORMAT
18294 TAR_OPTIONS=\"-H v7\"
18295 export TAR_OPTIONS
18296 rm -rf *
18297
18298 umask 000
18299 mkdir dir
18300 chmod 755 dir
18301 echo bla > dir/file
18302 tar cf test.tar dir
18303 chmod 700 dir
18304 tar xfv test.tar --warning=no-timestamp
18305 genfile --stat=mode.777 dir
18306 )"
18307 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
18308 ( $at_check_trace;
18309 mkdir v7
18310 (cd v7
18311 TEST_TAR_FORMAT=v7
18312 export TEST_TAR_FORMAT
18313 TAR_OPTIONS="-H v7"
18314 export TAR_OPTIONS
18315 rm -rf *
18316
18317 umask 000
18318 mkdir dir
18319 chmod 755 dir
18320 echo bla > dir/file
18321 tar cf test.tar dir
18322 chmod 700 dir
18323 tar xfv test.tar --warning=no-timestamp
18324 genfile --stat=mode.777 dir
18325 )
18326 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18327 at_status=$? at_failed=false
18328 $at_check_filter
18329 at_fn_diff_devnull "$at_stderr" || at_failed=:
18330 echo >>"$at_stdout"; $as_echo "dir/
18331 dir/file
18332 755
18333 " | \
18334   $at_diff - "$at_stdout" || at_failed=:
18335 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
18336 $at_failed && at_fn_log_failure
18337 $at_traceon; }
18338
18339               { set +x
18340 $as_echo "$at_srcdir/extrac08.at:36:
18341 mkdir oldgnu
18342 (cd oldgnu
18343 TEST_TAR_FORMAT=oldgnu
18344 export TEST_TAR_FORMAT
18345 TAR_OPTIONS=\"-H oldgnu\"
18346 export TAR_OPTIONS
18347 rm -rf *
18348
18349 umask 000
18350 mkdir dir
18351 chmod 755 dir
18352 echo bla > dir/file
18353 tar cf test.tar dir
18354 chmod 700 dir
18355 tar xfv test.tar --warning=no-timestamp
18356 genfile --stat=mode.777 dir
18357 )"
18358 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
18359 ( $at_check_trace;
18360 mkdir oldgnu
18361 (cd oldgnu
18362 TEST_TAR_FORMAT=oldgnu
18363 export TEST_TAR_FORMAT
18364 TAR_OPTIONS="-H oldgnu"
18365 export TAR_OPTIONS
18366 rm -rf *
18367
18368 umask 000
18369 mkdir dir
18370 chmod 755 dir
18371 echo bla > dir/file
18372 tar cf test.tar dir
18373 chmod 700 dir
18374 tar xfv test.tar --warning=no-timestamp
18375 genfile --stat=mode.777 dir
18376 )
18377 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18378 at_status=$? at_failed=false
18379 $at_check_filter
18380 at_fn_diff_devnull "$at_stderr" || at_failed=:
18381 echo >>"$at_stdout"; $as_echo "dir/
18382 dir/file
18383 755
18384 " | \
18385   $at_diff - "$at_stdout" || at_failed=:
18386 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
18387 $at_failed && at_fn_log_failure
18388 $at_traceon; }
18389
18390               { set +x
18391 $as_echo "$at_srcdir/extrac08.at:36:
18392 mkdir ustar
18393 (cd ustar
18394 TEST_TAR_FORMAT=ustar
18395 export TEST_TAR_FORMAT
18396 TAR_OPTIONS=\"-H ustar\"
18397 export TAR_OPTIONS
18398 rm -rf *
18399
18400 umask 000
18401 mkdir dir
18402 chmod 755 dir
18403 echo bla > dir/file
18404 tar cf test.tar dir
18405 chmod 700 dir
18406 tar xfv test.tar --warning=no-timestamp
18407 genfile --stat=mode.777 dir
18408 )"
18409 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
18410 ( $at_check_trace;
18411 mkdir ustar
18412 (cd ustar
18413 TEST_TAR_FORMAT=ustar
18414 export TEST_TAR_FORMAT
18415 TAR_OPTIONS="-H ustar"
18416 export TAR_OPTIONS
18417 rm -rf *
18418
18419 umask 000
18420 mkdir dir
18421 chmod 755 dir
18422 echo bla > dir/file
18423 tar cf test.tar dir
18424 chmod 700 dir
18425 tar xfv test.tar --warning=no-timestamp
18426 genfile --stat=mode.777 dir
18427 )
18428 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18429 at_status=$? at_failed=false
18430 $at_check_filter
18431 at_fn_diff_devnull "$at_stderr" || at_failed=:
18432 echo >>"$at_stdout"; $as_echo "dir/
18433 dir/file
18434 755
18435 " | \
18436   $at_diff - "$at_stdout" || at_failed=:
18437 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
18438 $at_failed && at_fn_log_failure
18439 $at_traceon; }
18440
18441               { set +x
18442 $as_echo "$at_srcdir/extrac08.at:36:
18443 mkdir posix
18444 (cd posix
18445 TEST_TAR_FORMAT=posix
18446 export TEST_TAR_FORMAT
18447 TAR_OPTIONS=\"-H posix\"
18448 export TAR_OPTIONS
18449 rm -rf *
18450
18451 umask 000
18452 mkdir dir
18453 chmod 755 dir
18454 echo bla > dir/file
18455 tar cf test.tar dir
18456 chmod 700 dir
18457 tar xfv test.tar --warning=no-timestamp
18458 genfile --stat=mode.777 dir
18459 )"
18460 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
18461 ( $at_check_trace;
18462 mkdir posix
18463 (cd posix
18464 TEST_TAR_FORMAT=posix
18465 export TEST_TAR_FORMAT
18466 TAR_OPTIONS="-H posix"
18467 export TAR_OPTIONS
18468 rm -rf *
18469
18470 umask 000
18471 mkdir dir
18472 chmod 755 dir
18473 echo bla > dir/file
18474 tar cf test.tar dir
18475 chmod 700 dir
18476 tar xfv test.tar --warning=no-timestamp
18477 genfile --stat=mode.777 dir
18478 )
18479 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18480 at_status=$? at_failed=false
18481 $at_check_filter
18482 at_fn_diff_devnull "$at_stderr" || at_failed=:
18483 echo >>"$at_stdout"; $as_echo "dir/
18484 dir/file
18485 755
18486 " | \
18487   $at_diff - "$at_stdout" || at_failed=:
18488 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
18489 $at_failed && at_fn_log_failure
18490 $at_traceon; }
18491
18492               { set +x
18493 $as_echo "$at_srcdir/extrac08.at:36:
18494 mkdir gnu
18495 (cd gnu
18496 TEST_TAR_FORMAT=gnu
18497 export TEST_TAR_FORMAT
18498 TAR_OPTIONS=\"-H gnu\"
18499 export TAR_OPTIONS
18500 rm -rf *
18501
18502 umask 000
18503 mkdir dir
18504 chmod 755 dir
18505 echo bla > dir/file
18506 tar cf test.tar dir
18507 chmod 700 dir
18508 tar xfv test.tar --warning=no-timestamp
18509 genfile --stat=mode.777 dir
18510 )"
18511 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
18512 ( $at_check_trace;
18513 mkdir gnu
18514 (cd gnu
18515 TEST_TAR_FORMAT=gnu
18516 export TEST_TAR_FORMAT
18517 TAR_OPTIONS="-H gnu"
18518 export TAR_OPTIONS
18519 rm -rf *
18520
18521 umask 000
18522 mkdir dir
18523 chmod 755 dir
18524 echo bla > dir/file
18525 tar cf test.tar dir
18526 chmod 700 dir
18527 tar xfv test.tar --warning=no-timestamp
18528 genfile --stat=mode.777 dir
18529 )
18530 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18531 at_status=$? at_failed=false
18532 $at_check_filter
18533 at_fn_diff_devnull "$at_stderr" || at_failed=:
18534 echo >>"$at_stdout"; $as_echo "dir/
18535 dir/file
18536 755
18537 " | \
18538   $at_diff - "$at_stdout" || at_failed=:
18539 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
18540 $at_failed && at_fn_log_failure
18541 $at_traceon; }
18542
18543
18544
18545
18546   set +x
18547   $at_times_p && times >"$at_times_file"
18548 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18549 read at_status <"$at_status_file"
18550 #AT_STOP_71
18551 #AT_START_72
18552 at_fn_group_banner 72 'extrac09.at:34' \
18553   "extracting even when . and .. are unreadable" "   " 9
18554 at_xfail=no
18555       test -f $XFAILFILE && at_xfail=yes
18556 (
18557   $as_echo "72. $at_setup_line: testing $at_desc ..."
18558   $at_traceon
18559
18560
18561
18562
18563
18564   { set +x
18565 $as_echo "$at_srcdir/extrac09.at:37:
18566 mkdir gnu
18567 (cd gnu
18568 TEST_TAR_FORMAT=gnu
18569 export TEST_TAR_FORMAT
18570 TAR_OPTIONS=\"-H gnu\"
18571 export TAR_OPTIONS
18572 rm -rf *
18573
18574
18575 echo \"test\" > \$\$
18576 chmod 0 \$\$
18577 cat \$\$ > /dev/null 2>&1
18578 result=\$?
18579 rm -f \$\$
18580 test \$result -eq 0 && exit 77
18581
18582
18583 mkdir dir
18584 mkdir dir/sub
18585 mkdir dir/sub/extract
18586 genfile --file dir/sub/f
18587 cd dir/sub
18588
18589 tar -cf archive.tar f
18590
18591 chmod a-r . ..
18592 tar -xvf archive.tar -C extract f
18593 status=\$?
18594 chmod a+r . ..
18595 cmp f extract/f || status=\$?
18596 exit \$status
18597 )"
18598 at_fn_check_prepare_notrace 'an embedded newline' "extrac09.at:37"
18599 ( $at_check_trace;
18600 mkdir gnu
18601 (cd gnu
18602 TEST_TAR_FORMAT=gnu
18603 export TEST_TAR_FORMAT
18604 TAR_OPTIONS="-H gnu"
18605 export TAR_OPTIONS
18606 rm -rf *
18607
18608
18609 echo "test" > $$
18610 chmod 0 $$
18611 cat $$ > /dev/null 2>&1
18612 result=$?
18613 rm -f $$
18614 test $result -eq 0 && exit 77
18615
18616
18617 mkdir dir
18618 mkdir dir/sub
18619 mkdir dir/sub/extract
18620 genfile --file dir/sub/f
18621 cd dir/sub
18622
18623 tar -cf archive.tar f
18624
18625 chmod a-r . ..
18626 tar -xvf archive.tar -C extract f
18627 status=$?
18628 chmod a+r . ..
18629 cmp f extract/f || status=$?
18630 exit $status
18631 )
18632 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18633 at_status=$? at_failed=false
18634 $at_check_filter
18635 at_fn_diff_devnull "$at_stderr" || at_failed=:
18636 echo >>"$at_stdout"; $as_echo "f
18637 " | \
18638   $at_diff - "$at_stdout" || at_failed=:
18639 at_fn_check_status 0 $at_status "$at_srcdir/extrac09.at:37"
18640 $at_failed && at_fn_log_failure
18641 $at_traceon; }
18642
18643
18644
18645
18646   set +x
18647   $at_times_p && times >"$at_times_file"
18648 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18649 read at_status <"$at_status_file"
18650 #AT_STOP_72
18651 #AT_START_73
18652 at_fn_group_banner 73 'extrac10.at:29' \
18653   "-C and delayed setting of metadata" "             " 9
18654 at_xfail=no
18655       test -f $XFAILFILE && at_xfail=yes
18656 (
18657   $as_echo "73. $at_setup_line: testing $at_desc ..."
18658   $at_traceon
18659
18660
18661
18662
18663
18664   { set +x
18665 $as_echo "$at_srcdir/extrac10.at:32:
18666 mkdir gnu
18667 (cd gnu
18668 TEST_TAR_FORMAT=gnu
18669 export TEST_TAR_FORMAT
18670 TAR_OPTIONS=\"-H gnu\"
18671 export TAR_OPTIONS
18672 rm -rf *
18673
18674 mkdir d x x/y
18675 echo foo >d/d1
18676 echo bar >e
18677
18678 tar -cf archive.tar d e &&
18679 tar -xf archive.tar -C x d -C y e &&
18680 diff -r d x/d &&
18681 diff e x/y/e
18682 )"
18683 at_fn_check_prepare_notrace 'an embedded newline' "extrac10.at:32"
18684 ( $at_check_trace;
18685 mkdir gnu
18686 (cd gnu
18687 TEST_TAR_FORMAT=gnu
18688 export TEST_TAR_FORMAT
18689 TAR_OPTIONS="-H gnu"
18690 export TAR_OPTIONS
18691 rm -rf *
18692
18693 mkdir d x x/y
18694 echo foo >d/d1
18695 echo bar >e
18696
18697 tar -cf archive.tar d e &&
18698 tar -xf archive.tar -C x d -C y e &&
18699 diff -r d x/d &&
18700 diff e x/y/e
18701 )
18702 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18703 at_status=$? at_failed=false
18704 $at_check_filter
18705 at_fn_diff_devnull "$at_stderr" || at_failed=:
18706 at_fn_diff_devnull "$at_stdout" || at_failed=:
18707 at_fn_check_status 0 $at_status "$at_srcdir/extrac10.at:32"
18708 $at_failed && at_fn_log_failure
18709 $at_traceon; }
18710
18711
18712
18713
18714   set +x
18715   $at_times_p && times >"$at_times_file"
18716 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18717 read at_status <"$at_status_file"
18718 #AT_STOP_73
18719 #AT_START_74
18720 at_fn_group_banner 74 'extrac11.at:25' \
18721   "scarce file descriptors" "                        " 9
18722 at_xfail=no
18723       test -f $XFAILFILE && at_xfail=yes
18724 (
18725   $as_echo "74. $at_setup_line: testing $at_desc ..."
18726   $at_traceon
18727
18728
18729
18730
18731
18732   { set +x
18733 $as_echo "$at_srcdir/extrac11.at:28:
18734 mkdir gnu
18735 (cd gnu
18736 TEST_TAR_FORMAT=gnu
18737 export TEST_TAR_FORMAT
18738 TAR_OPTIONS=\"-H gnu\"
18739 export TAR_OPTIONS
18740 rm -rf *
18741
18742 exec </dev/null
18743 dirs='a
18744       a/b
18745       a/b/c
18746       a/b/c/d
18747       a/b/c/d/e
18748       a/b/c/d/e/f
18749       a/b/c/d/e/f/g
18750       a/b/c/d/e/f/g/h
18751       a/b/c/d/e/f/g/h/i
18752       a/b/c/d/e/f/g/h/i/j
18753       a/b/c/d/e/f/g/h/i/j/k
18754 '
18755 files=
18756 mkdir \$dirs dest1 dest2 dest3 || exit
18757 for dir in \$dirs; do
18758   for file in X Y Z; do
18759     echo \$file >\$dir/\$file || exit
18760     files=\"\$files \$file\"
18761   done
18762 done
18763
18764 # Check that \"ulimit\" itself works.  Close file descriptors before
18765 # invoking ulimit, to work around a bug (or a \"feature\") in some shells,
18766 # where they squirrel away dups of file descriptors into FD 10 and up
18767 # before closing the originals.
18768 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
18769    ulimit -n 100 &&
18770    tar -cf archive1.tar a &&
18771    tar -xf archive1.tar -C dest1 a
18772   ) &&
18773   diff -r a dest1/a
18774 ) >/dev/null 2>&1 ||
18775    exit 77
18776
18777 # Another test that \"ulimit\" itself works:
18778 # tar should fail when completely starved of file descriptors.
18779 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
18780    ulimit -n 4 &&
18781    tar -cf archive2.tar a &&
18782    tar -xf archive2.tar -C dest2 a
18783   ) &&
18784   diff -r a dest2/a
18785 ) >/dev/null 2>&1 &&
18786    exit 77
18787
18788 # Tar should work when there are few, but enough, file descriptors.
18789 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
18790    ulimit -n 10 &&
18791    tar -cf archive3.tar a &&
18792    tar -xf archive3.tar -C dest3 a
18793   ) &&
18794   diff -r a dest3/a >/dev/null 2>&1
18795 ) || { diff -r a dest3/a; exit 1; }
18796 )"
18797 at_fn_check_prepare_notrace 'an embedded newline' "extrac11.at:28"
18798 ( $at_check_trace;
18799 mkdir gnu
18800 (cd gnu
18801 TEST_TAR_FORMAT=gnu
18802 export TEST_TAR_FORMAT
18803 TAR_OPTIONS="-H gnu"
18804 export TAR_OPTIONS
18805 rm -rf *
18806
18807 exec </dev/null
18808 dirs='a
18809       a/b
18810       a/b/c
18811       a/b/c/d
18812       a/b/c/d/e
18813       a/b/c/d/e/f
18814       a/b/c/d/e/f/g
18815       a/b/c/d/e/f/g/h
18816       a/b/c/d/e/f/g/h/i
18817       a/b/c/d/e/f/g/h/i/j
18818       a/b/c/d/e/f/g/h/i/j/k
18819 '
18820 files=
18821 mkdir $dirs dest1 dest2 dest3 || exit
18822 for dir in $dirs; do
18823   for file in X Y Z; do
18824     echo $file >$dir/$file || exit
18825     files="$files $file"
18826   done
18827 done
18828
18829 # Check that "ulimit" itself works.  Close file descriptors before
18830 # invoking ulimit, to work around a bug (or a "feature") in some shells,
18831 # where they squirrel away dups of file descriptors into FD 10 and up
18832 # before closing the originals.
18833 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
18834    ulimit -n 100 &&
18835    tar -cf archive1.tar a &&
18836    tar -xf archive1.tar -C dest1 a
18837   ) &&
18838   diff -r a dest1/a
18839 ) >/dev/null 2>&1 ||
18840    exit 77
18841
18842 # Another test that "ulimit" itself works:
18843 # tar should fail when completely starved of file descriptors.
18844 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
18845    ulimit -n 4 &&
18846    tar -cf archive2.tar a &&
18847    tar -xf archive2.tar -C dest2 a
18848   ) &&
18849   diff -r a dest2/a
18850 ) >/dev/null 2>&1 &&
18851    exit 77
18852
18853 # Tar should work when there are few, but enough, file descriptors.
18854 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
18855    ulimit -n 10 &&
18856    tar -cf archive3.tar a &&
18857    tar -xf archive3.tar -C dest3 a
18858   ) &&
18859   diff -r a dest3/a >/dev/null 2>&1
18860 ) || { diff -r a dest3/a; exit 1; }
18861 )
18862 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18863 at_status=$? at_failed=false
18864 $at_check_filter
18865 at_fn_diff_devnull "$at_stderr" || at_failed=:
18866 at_fn_diff_devnull "$at_stdout" || at_failed=:
18867 at_fn_check_status 0 $at_status "$at_srcdir/extrac11.at:28"
18868 $at_failed && at_fn_log_failure
18869 $at_traceon; }
18870
18871
18872
18873
18874   set +x
18875   $at_times_p && times >"$at_times_file"
18876 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18877 read at_status <"$at_status_file"
18878 #AT_STOP_74
18879 #AT_START_75
18880 at_fn_group_banner 75 'extrac12.at:25' \
18881   "extract dot permissions" "                        " 9
18882 at_xfail=no
18883       test -f $XFAILFILE && at_xfail=yes
18884 (
18885   $as_echo "75. $at_setup_line: testing $at_desc ..."
18886   $at_traceon
18887
18888
18889
18890
18891
18892   { set +x
18893 $as_echo "$at_srcdir/extrac12.at:28:
18894 mkdir gnu
18895 (cd gnu
18896 TEST_TAR_FORMAT=gnu
18897 export TEST_TAR_FORMAT
18898 TAR_OPTIONS=\"-H gnu\"
18899 export TAR_OPTIONS
18900 rm -rf *
18901
18902 mkdir src dst
18903 echo file1 >src/file1
18904 echo file2 >src/file2
18905 chmod a-w src
18906
18907 tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
18908 tar -xf archive.tar -C dst &&
18909 cmp src/file1 dst/file1 &&
18910 cmp src/file2 dst/file2
18911 )"
18912 at_fn_check_prepare_notrace 'an embedded newline' "extrac12.at:28"
18913 ( $at_check_trace;
18914 mkdir gnu
18915 (cd gnu
18916 TEST_TAR_FORMAT=gnu
18917 export TEST_TAR_FORMAT
18918 TAR_OPTIONS="-H gnu"
18919 export TAR_OPTIONS
18920 rm -rf *
18921
18922 mkdir src dst
18923 echo file1 >src/file1
18924 echo file2 >src/file2
18925 chmod a-w src
18926
18927 tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
18928 tar -xf archive.tar -C dst &&
18929 cmp src/file1 dst/file1 &&
18930 cmp src/file2 dst/file2
18931 )
18932 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18933 at_status=$? at_failed=false
18934 $at_check_filter
18935 at_fn_diff_devnull "$at_stderr" || at_failed=:
18936 at_fn_diff_devnull "$at_stdout" || at_failed=:
18937 at_fn_check_status 0 $at_status "$at_srcdir/extrac12.at:28"
18938 $at_failed && at_fn_log_failure
18939 $at_traceon; }
18940
18941
18942
18943
18944   set +x
18945   $at_times_p && times >"$at_times_file"
18946 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18947 read at_status <"$at_status_file"
18948 #AT_STOP_75
18949 #AT_START_76
18950 at_fn_group_banner 76 'extrac13.at:26' \
18951   "extract over symlinks" "                          " 9
18952 at_xfail=no
18953       test -f $XFAILFILE && at_xfail=yes
18954 (
18955   $as_echo "76. $at_setup_line: testing $at_desc ..."
18956   $at_traceon
18957
18958
18959
18960
18961
18962   { set +x
18963 $as_echo "$at_srcdir/extrac13.at:29:
18964 mkdir gnu
18965 (cd gnu
18966 TEST_TAR_FORMAT=gnu
18967 export TEST_TAR_FORMAT
18968 TAR_OPTIONS=\"-H gnu\"
18969 export TAR_OPTIONS
18970 rm -rf *
18971
18972 mkdir src dst1 dst2 dst3
18973 echo file1 >src/file1
18974 ln -s target1 dst1/file1
18975 echo target1 >dst1/target1
18976 echo target1 >target1
18977
18978 tar -cf archive.tar -C src . &&
18979 tar -xf archive.tar -C dst1 --warning=no-timestamp &&
18980 diff src/file1 dst1/file1 &&
18981 diff target1 dst1/target1
18982
18983 ln -s target1 dst2/file1
18984 echo target1 >dst2/target1
18985 tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
18986 diff src/file1 dst2/file1 &&
18987 diff target1 dst2/target1
18988
18989 ln -s target1 dst3/file1
18990 echo target1 >dst3/target1
18991 tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
18992 diff src/file1 dst3/file1 &&
18993 diff src/file1 dst3/target1
18994 )"
18995 at_fn_check_prepare_notrace 'an embedded newline' "extrac13.at:29"
18996 ( $at_check_trace;
18997 mkdir gnu
18998 (cd gnu
18999 TEST_TAR_FORMAT=gnu
19000 export TEST_TAR_FORMAT
19001 TAR_OPTIONS="-H gnu"
19002 export TAR_OPTIONS
19003 rm -rf *
19004
19005 mkdir src dst1 dst2 dst3
19006 echo file1 >src/file1
19007 ln -s target1 dst1/file1
19008 echo target1 >dst1/target1
19009 echo target1 >target1
19010
19011 tar -cf archive.tar -C src . &&
19012 tar -xf archive.tar -C dst1 --warning=no-timestamp &&
19013 diff src/file1 dst1/file1 &&
19014 diff target1 dst1/target1
19015
19016 ln -s target1 dst2/file1
19017 echo target1 >dst2/target1
19018 tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
19019 diff src/file1 dst2/file1 &&
19020 diff target1 dst2/target1
19021
19022 ln -s target1 dst3/file1
19023 echo target1 >dst3/target1
19024 tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
19025 diff src/file1 dst3/file1 &&
19026 diff src/file1 dst3/target1
19027 )
19028 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19029 at_status=$? at_failed=false
19030 $at_check_filter
19031 at_fn_diff_devnull "$at_stderr" || at_failed=:
19032 at_fn_diff_devnull "$at_stdout" || at_failed=:
19033 at_fn_check_status 0 $at_status "$at_srcdir/extrac13.at:29"
19034 $at_failed && at_fn_log_failure
19035 $at_traceon; }
19036
19037
19038
19039
19040   set +x
19041   $at_times_p && times >"$at_times_file"
19042 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19043 read at_status <"$at_status_file"
19044 #AT_STOP_76
19045 #AT_START_77
19046 at_fn_group_banner 77 'extrac14.at:25' \
19047   "extract -C symlink" "                             " 9
19048 at_xfail=no
19049       test -f $XFAILFILE && at_xfail=yes
19050 (
19051   $as_echo "77. $at_setup_line: testing $at_desc ..."
19052   $at_traceon
19053
19054
19055
19056
19057
19058   { set +x
19059 $as_echo "$at_srcdir/extrac14.at:28:
19060 mkdir gnu
19061 (cd gnu
19062 TEST_TAR_FORMAT=gnu
19063 export TEST_TAR_FORMAT
19064 TAR_OPTIONS=\"-H gnu\"
19065 export TAR_OPTIONS
19066 rm -rf *
19067
19068 mkdir dest
19069 ln -s dest symlink
19070 echo foo >foo
19071 tar -cf archive.tar foo &&
19072 tar -xf archive.tar -C symlink --warning=no-timestamp &&
19073 cmp foo dest/foo
19074 )"
19075 at_fn_check_prepare_notrace 'an embedded newline' "extrac14.at:28"
19076 ( $at_check_trace;
19077 mkdir gnu
19078 (cd gnu
19079 TEST_TAR_FORMAT=gnu
19080 export TEST_TAR_FORMAT
19081 TAR_OPTIONS="-H gnu"
19082 export TAR_OPTIONS
19083 rm -rf *
19084
19085 mkdir dest
19086 ln -s dest symlink
19087 echo foo >foo
19088 tar -cf archive.tar foo &&
19089 tar -xf archive.tar -C symlink --warning=no-timestamp &&
19090 cmp foo dest/foo
19091 )
19092 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19093 at_status=$? at_failed=false
19094 $at_check_filter
19095 at_fn_diff_devnull "$at_stderr" || at_failed=:
19096 at_fn_diff_devnull "$at_stdout" || at_failed=:
19097 at_fn_check_status 0 $at_status "$at_srcdir/extrac14.at:28"
19098 $at_failed && at_fn_log_failure
19099 $at_traceon; }
19100
19101
19102
19103
19104   set +x
19105   $at_times_p && times >"$at_times_file"
19106 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19107 read at_status <"$at_status_file"
19108 #AT_STOP_77
19109 #AT_START_78
19110 at_fn_group_banner 78 'extrac15.at:25' \
19111   "extract parent mkdir failure" "                   " 9
19112 at_xfail=no
19113       test -f $XFAILFILE && at_xfail=yes
19114 (
19115   $as_echo "78. $at_setup_line: testing $at_desc ..."
19116   $at_traceon
19117
19118
19119
19120
19121
19122   { set +x
19123 $as_echo "$at_srcdir/extrac15.at:28:
19124 mkdir gnu
19125 (cd gnu
19126 TEST_TAR_FORMAT=gnu
19127 export TEST_TAR_FORMAT
19128 TAR_OPTIONS=\"-H gnu\"
19129 export TAR_OPTIONS
19130 rm -rf *
19131
19132
19133 echo \"test\" > \$\$
19134 chmod 0 \$\$
19135 cat \$\$ > /dev/null 2>&1
19136 result=\$?
19137 rm -f \$\$
19138 test \$result -eq 0 && exit 77
19139
19140
19141 mkdir src src/a src/a/b dest dest/a
19142 touch src/a/b/c
19143 chmod a-w dest/a
19144
19145 tar -cf archive.tar -C src a/b/c &&
19146 if tar -xf archive.tar -C dest a/b/c
19147 then (exit 1)
19148 else (exit 0)
19149 fi
19150 )"
19151 at_fn_check_prepare_notrace 'an embedded newline' "extrac15.at:28"
19152 ( $at_check_trace;
19153 mkdir gnu
19154 (cd gnu
19155 TEST_TAR_FORMAT=gnu
19156 export TEST_TAR_FORMAT
19157 TAR_OPTIONS="-H gnu"
19158 export TAR_OPTIONS
19159 rm -rf *
19160
19161
19162 echo "test" > $$
19163 chmod 0 $$
19164 cat $$ > /dev/null 2>&1
19165 result=$?
19166 rm -f $$
19167 test $result -eq 0 && exit 77
19168
19169
19170 mkdir src src/a src/a/b dest dest/a
19171 touch src/a/b/c
19172 chmod a-w dest/a
19173
19174 tar -cf archive.tar -C src a/b/c &&
19175 if tar -xf archive.tar -C dest a/b/c
19176 then (exit 1)
19177 else (exit 0)
19178 fi
19179 )
19180 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19181 at_status=$? at_failed=false
19182 $at_check_filter
19183 echo >>"$at_stderr"; $as_echo "tar: a/b: Cannot mkdir: Permission denied
19184 tar: a/b/c: Cannot open: No such file or directory
19185 tar: Exiting with failure status due to previous errors
19186 " | \
19187   $at_diff - "$at_stderr" || at_failed=:
19188 at_fn_diff_devnull "$at_stdout" || at_failed=:
19189 at_fn_check_status 0 $at_status "$at_srcdir/extrac15.at:28"
19190 $at_failed && at_fn_log_failure
19191 $at_traceon; }
19192
19193
19194
19195
19196   set +x
19197   $at_times_p && times >"$at_times_file"
19198 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19199 read at_status <"$at_status_file"
19200 #AT_STOP_78
19201 #AT_START_79
19202 at_fn_group_banner 79 'extrac16.at:26' \
19203   "extract empty directory with -C" "                " 9
19204 at_xfail=no
19205       test -f $XFAILFILE && at_xfail=yes
19206 (
19207   $as_echo "79. $at_setup_line: testing $at_desc ..."
19208   $at_traceon
19209
19210
19211
19212
19213
19214   { set +x
19215 $as_echo "$at_srcdir/extrac16.at:29:
19216 mkdir gnu
19217 (cd gnu
19218 TEST_TAR_FORMAT=gnu
19219 export TEST_TAR_FORMAT
19220 TAR_OPTIONS=\"-H gnu\"
19221 export TAR_OPTIONS
19222 rm -rf *
19223
19224 mkdir src src/a src/a/b dest
19225 touch src/a/c
19226
19227 tar -cf archive.tar -C src a &&
19228 tar -xf archive.tar -C dest
19229 )"
19230 at_fn_check_prepare_notrace 'an embedded newline' "extrac16.at:29"
19231 ( $at_check_trace;
19232 mkdir gnu
19233 (cd gnu
19234 TEST_TAR_FORMAT=gnu
19235 export TEST_TAR_FORMAT
19236 TAR_OPTIONS="-H gnu"
19237 export TAR_OPTIONS
19238 rm -rf *
19239
19240 mkdir src src/a src/a/b dest
19241 touch src/a/c
19242
19243 tar -cf archive.tar -C src a &&
19244 tar -xf archive.tar -C dest
19245 )
19246 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19247 at_status=$? at_failed=false
19248 $at_check_filter
19249 at_fn_diff_devnull "$at_stderr" || at_failed=:
19250 at_fn_diff_devnull "$at_stdout" || at_failed=:
19251 at_fn_check_status 0 $at_status "$at_srcdir/extrac16.at:29"
19252 $at_failed && at_fn_log_failure
19253 $at_traceon; }
19254
19255
19256
19257
19258   set +x
19259   $at_times_p && times >"$at_times_file"
19260 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19261 read at_status <"$at_status_file"
19262 #AT_STOP_79
19263 #AT_START_80
19264 at_fn_group_banner 80 'extrac17.at:21' \
19265   "name matching/transformation ordering" "          " 9
19266 at_xfail=no
19267       test -f $XFAILFILE && at_xfail=yes
19268 (
19269   $as_echo "80. $at_setup_line: testing $at_desc ..."
19270   $at_traceon
19271
19272
19273
19274 # Description: Tar 1.24 changed the ordering of name matching and
19275 # name transformation so that the former saw already transformed
19276 # file names (see commit 9c194c99 and exclude06.at).  This reverted
19277 # ordering made it impossible to match file names in certain cases.
19278 # In particular, the testcase below would not extract anything.
19279 #
19280 # Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
19281 # References: <x6r5fd9jye@gzp>, <20101026175126.29028@Pirx.gnu.org.ua>
19282 #             http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
19283
19284
19285
19286   { set +x
19287 $as_echo "$at_srcdir/extrac17.at:34:
19288 mkdir v7
19289 (cd v7
19290 TEST_TAR_FORMAT=v7
19291 export TEST_TAR_FORMAT
19292 TAR_OPTIONS=\"-H v7\"
19293 export TAR_OPTIONS
19294 rm -rf *
19295
19296 mkdir dir dir/subdir1 dir/subdir2 out
19297 genfile --file dir/subdir1/file1
19298 genfile --file dir/subdir2/file2
19299
19300 tar cf dir.tar dir
19301
19302 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
19303   dir/subdir1/
19304 )"
19305 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
19306 ( $at_check_trace;
19307 mkdir v7
19308 (cd v7
19309 TEST_TAR_FORMAT=v7
19310 export TEST_TAR_FORMAT
19311 TAR_OPTIONS="-H v7"
19312 export TAR_OPTIONS
19313 rm -rf *
19314
19315 mkdir dir dir/subdir1 dir/subdir2 out
19316 genfile --file dir/subdir1/file1
19317 genfile --file dir/subdir2/file2
19318
19319 tar cf dir.tar dir
19320
19321 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
19322   dir/subdir1/
19323 )
19324 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19325 at_status=$? at_failed=false
19326 $at_check_filter
19327 at_fn_diff_devnull "$at_stderr" || at_failed=:
19328 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
19329 " | \
19330   $at_diff - "$at_stdout" || at_failed=:
19331 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
19332 $at_failed && at_fn_log_failure
19333 $at_traceon; }
19334
19335               { set +x
19336 $as_echo "$at_srcdir/extrac17.at:34:
19337 mkdir oldgnu
19338 (cd oldgnu
19339 TEST_TAR_FORMAT=oldgnu
19340 export TEST_TAR_FORMAT
19341 TAR_OPTIONS=\"-H oldgnu\"
19342 export TAR_OPTIONS
19343 rm -rf *
19344
19345 mkdir dir dir/subdir1 dir/subdir2 out
19346 genfile --file dir/subdir1/file1
19347 genfile --file dir/subdir2/file2
19348
19349 tar cf dir.tar dir
19350
19351 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
19352   dir/subdir1/
19353 )"
19354 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
19355 ( $at_check_trace;
19356 mkdir oldgnu
19357 (cd oldgnu
19358 TEST_TAR_FORMAT=oldgnu
19359 export TEST_TAR_FORMAT
19360 TAR_OPTIONS="-H oldgnu"
19361 export TAR_OPTIONS
19362 rm -rf *
19363
19364 mkdir dir dir/subdir1 dir/subdir2 out
19365 genfile --file dir/subdir1/file1
19366 genfile --file dir/subdir2/file2
19367
19368 tar cf dir.tar dir
19369
19370 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
19371   dir/subdir1/
19372 )
19373 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19374 at_status=$? at_failed=false
19375 $at_check_filter
19376 at_fn_diff_devnull "$at_stderr" || at_failed=:
19377 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
19378 " | \
19379   $at_diff - "$at_stdout" || at_failed=:
19380 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
19381 $at_failed && at_fn_log_failure
19382 $at_traceon; }
19383
19384               { set +x
19385 $as_echo "$at_srcdir/extrac17.at:34:
19386 mkdir ustar
19387 (cd ustar
19388 TEST_TAR_FORMAT=ustar
19389 export TEST_TAR_FORMAT
19390 TAR_OPTIONS=\"-H ustar\"
19391 export TAR_OPTIONS
19392 rm -rf *
19393
19394 mkdir dir dir/subdir1 dir/subdir2 out
19395 genfile --file dir/subdir1/file1
19396 genfile --file dir/subdir2/file2
19397
19398 tar cf dir.tar dir
19399
19400 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
19401   dir/subdir1/
19402 )"
19403 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
19404 ( $at_check_trace;
19405 mkdir ustar
19406 (cd ustar
19407 TEST_TAR_FORMAT=ustar
19408 export TEST_TAR_FORMAT
19409 TAR_OPTIONS="-H ustar"
19410 export TAR_OPTIONS
19411 rm -rf *
19412
19413 mkdir dir dir/subdir1 dir/subdir2 out
19414 genfile --file dir/subdir1/file1
19415 genfile --file dir/subdir2/file2
19416
19417 tar cf dir.tar dir
19418
19419 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
19420   dir/subdir1/
19421 )
19422 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19423 at_status=$? at_failed=false
19424 $at_check_filter
19425 at_fn_diff_devnull "$at_stderr" || at_failed=:
19426 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
19427 " | \
19428   $at_diff - "$at_stdout" || at_failed=:
19429 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
19430 $at_failed && at_fn_log_failure
19431 $at_traceon; }
19432
19433               { set +x
19434 $as_echo "$at_srcdir/extrac17.at:34:
19435 mkdir posix
19436 (cd posix
19437 TEST_TAR_FORMAT=posix
19438 export TEST_TAR_FORMAT
19439 TAR_OPTIONS=\"-H posix\"
19440 export TAR_OPTIONS
19441 rm -rf *
19442
19443 mkdir dir dir/subdir1 dir/subdir2 out
19444 genfile --file dir/subdir1/file1
19445 genfile --file dir/subdir2/file2
19446
19447 tar cf dir.tar dir
19448
19449 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
19450   dir/subdir1/
19451 )"
19452 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
19453 ( $at_check_trace;
19454 mkdir posix
19455 (cd posix
19456 TEST_TAR_FORMAT=posix
19457 export TEST_TAR_FORMAT
19458 TAR_OPTIONS="-H posix"
19459 export TAR_OPTIONS
19460 rm -rf *
19461
19462 mkdir dir dir/subdir1 dir/subdir2 out
19463 genfile --file dir/subdir1/file1
19464 genfile --file dir/subdir2/file2
19465
19466 tar cf dir.tar dir
19467
19468 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
19469   dir/subdir1/
19470 )
19471 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19472 at_status=$? at_failed=false
19473 $at_check_filter
19474 at_fn_diff_devnull "$at_stderr" || at_failed=:
19475 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
19476 " | \
19477   $at_diff - "$at_stdout" || at_failed=:
19478 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
19479 $at_failed && at_fn_log_failure
19480 $at_traceon; }
19481
19482               { set +x
19483 $as_echo "$at_srcdir/extrac17.at:34:
19484 mkdir gnu
19485 (cd gnu
19486 TEST_TAR_FORMAT=gnu
19487 export TEST_TAR_FORMAT
19488 TAR_OPTIONS=\"-H gnu\"
19489 export TAR_OPTIONS
19490 rm -rf *
19491
19492 mkdir dir dir/subdir1 dir/subdir2 out
19493 genfile --file dir/subdir1/file1
19494 genfile --file dir/subdir2/file2
19495
19496 tar cf dir.tar dir
19497
19498 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
19499   dir/subdir1/
19500 )"
19501 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
19502 ( $at_check_trace;
19503 mkdir gnu
19504 (cd gnu
19505 TEST_TAR_FORMAT=gnu
19506 export TEST_TAR_FORMAT
19507 TAR_OPTIONS="-H gnu"
19508 export TAR_OPTIONS
19509 rm -rf *
19510
19511 mkdir dir dir/subdir1 dir/subdir2 out
19512 genfile --file dir/subdir1/file1
19513 genfile --file dir/subdir2/file2
19514
19515 tar cf dir.tar dir
19516
19517 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
19518   dir/subdir1/
19519 )
19520 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19521 at_status=$? at_failed=false
19522 $at_check_filter
19523 at_fn_diff_devnull "$at_stderr" || at_failed=:
19524 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
19525 " | \
19526   $at_diff - "$at_stdout" || at_failed=:
19527 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
19528 $at_failed && at_fn_log_failure
19529 $at_traceon; }
19530
19531
19532
19533
19534   set +x
19535   $at_times_p && times >"$at_times_file"
19536 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19537 read at_status <"$at_status_file"
19538 #AT_STOP_80
19539 #AT_START_81
19540 at_fn_group_banner 81 'extrac18.at:34' \
19541   "keep-old-files" "                                 " 9
19542 at_xfail=no
19543       test -f $XFAILFILE && at_xfail=yes
19544 (
19545   $as_echo "81. $at_setup_line: testing $at_desc ..."
19546   $at_traceon
19547
19548
19549
19550
19551
19552   { set +x
19553 $as_echo "$at_srcdir/extrac18.at:37:
19554 mkdir v7
19555 (cd v7
19556 TEST_TAR_FORMAT=v7
19557 export TEST_TAR_FORMAT
19558 TAR_OPTIONS=\"-H v7\"
19559 export TAR_OPTIONS
19560 rm -rf *
19561
19562 mkdir dir
19563 cd dir
19564 echo 'Old file a' > a
19565 echo 'Old file b' > b
19566
19567 tar cf ../archive .
19568
19569 rm b
19570 echo 'File a' > a
19571
19572 tar -x -k -f ../archive
19573 echo status=\$?
19574
19575 cat a
19576 )"
19577 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
19578 ( $at_check_trace;
19579 mkdir v7
19580 (cd v7
19581 TEST_TAR_FORMAT=v7
19582 export TEST_TAR_FORMAT
19583 TAR_OPTIONS="-H v7"
19584 export TAR_OPTIONS
19585 rm -rf *
19586
19587 mkdir dir
19588 cd dir
19589 echo 'Old file a' > a
19590 echo 'Old file b' > b
19591
19592 tar cf ../archive .
19593
19594 rm b
19595 echo 'File a' > a
19596
19597 tar -x -k -f ../archive
19598 echo status=$?
19599
19600 cat a
19601 )
19602 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19603 at_status=$? at_failed=false
19604 $at_check_filter
19605 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
19606 tar: Exiting with failure status due to previous errors
19607 " | \
19608   $at_diff - "$at_stderr" || at_failed=:
19609 echo >>"$at_stdout"; $as_echo "status=2
19610 File a
19611 " | \
19612   $at_diff - "$at_stdout" || at_failed=:
19613 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
19614 $at_failed && at_fn_log_failure
19615 $at_traceon; }
19616
19617               { set +x
19618 $as_echo "$at_srcdir/extrac18.at:37:
19619 mkdir oldgnu
19620 (cd oldgnu
19621 TEST_TAR_FORMAT=oldgnu
19622 export TEST_TAR_FORMAT
19623 TAR_OPTIONS=\"-H oldgnu\"
19624 export TAR_OPTIONS
19625 rm -rf *
19626
19627 mkdir dir
19628 cd dir
19629 echo 'Old file a' > a
19630 echo 'Old file b' > b
19631
19632 tar cf ../archive .
19633
19634 rm b
19635 echo 'File a' > a
19636
19637 tar -x -k -f ../archive
19638 echo status=\$?
19639
19640 cat a
19641 )"
19642 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
19643 ( $at_check_trace;
19644 mkdir oldgnu
19645 (cd oldgnu
19646 TEST_TAR_FORMAT=oldgnu
19647 export TEST_TAR_FORMAT
19648 TAR_OPTIONS="-H oldgnu"
19649 export TAR_OPTIONS
19650 rm -rf *
19651
19652 mkdir dir
19653 cd dir
19654 echo 'Old file a' > a
19655 echo 'Old file b' > b
19656
19657 tar cf ../archive .
19658
19659 rm b
19660 echo 'File a' > a
19661
19662 tar -x -k -f ../archive
19663 echo status=$?
19664
19665 cat a
19666 )
19667 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19668 at_status=$? at_failed=false
19669 $at_check_filter
19670 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
19671 tar: Exiting with failure status due to previous errors
19672 " | \
19673   $at_diff - "$at_stderr" || at_failed=:
19674 echo >>"$at_stdout"; $as_echo "status=2
19675 File a
19676 " | \
19677   $at_diff - "$at_stdout" || at_failed=:
19678 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
19679 $at_failed && at_fn_log_failure
19680 $at_traceon; }
19681
19682               { set +x
19683 $as_echo "$at_srcdir/extrac18.at:37:
19684 mkdir ustar
19685 (cd ustar
19686 TEST_TAR_FORMAT=ustar
19687 export TEST_TAR_FORMAT
19688 TAR_OPTIONS=\"-H ustar\"
19689 export TAR_OPTIONS
19690 rm -rf *
19691
19692 mkdir dir
19693 cd dir
19694 echo 'Old file a' > a
19695 echo 'Old file b' > b
19696
19697 tar cf ../archive .
19698
19699 rm b
19700 echo 'File a' > a
19701
19702 tar -x -k -f ../archive
19703 echo status=\$?
19704
19705 cat a
19706 )"
19707 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
19708 ( $at_check_trace;
19709 mkdir ustar
19710 (cd ustar
19711 TEST_TAR_FORMAT=ustar
19712 export TEST_TAR_FORMAT
19713 TAR_OPTIONS="-H ustar"
19714 export TAR_OPTIONS
19715 rm -rf *
19716
19717 mkdir dir
19718 cd dir
19719 echo 'Old file a' > a
19720 echo 'Old file b' > b
19721
19722 tar cf ../archive .
19723
19724 rm b
19725 echo 'File a' > a
19726
19727 tar -x -k -f ../archive
19728 echo status=$?
19729
19730 cat a
19731 )
19732 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19733 at_status=$? at_failed=false
19734 $at_check_filter
19735 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
19736 tar: Exiting with failure status due to previous errors
19737 " | \
19738   $at_diff - "$at_stderr" || at_failed=:
19739 echo >>"$at_stdout"; $as_echo "status=2
19740 File a
19741 " | \
19742   $at_diff - "$at_stdout" || at_failed=:
19743 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
19744 $at_failed && at_fn_log_failure
19745 $at_traceon; }
19746
19747               { set +x
19748 $as_echo "$at_srcdir/extrac18.at:37:
19749 mkdir posix
19750 (cd posix
19751 TEST_TAR_FORMAT=posix
19752 export TEST_TAR_FORMAT
19753 TAR_OPTIONS=\"-H posix\"
19754 export TAR_OPTIONS
19755 rm -rf *
19756
19757 mkdir dir
19758 cd dir
19759 echo 'Old file a' > a
19760 echo 'Old file b' > b
19761
19762 tar cf ../archive .
19763
19764 rm b
19765 echo 'File a' > a
19766
19767 tar -x -k -f ../archive
19768 echo status=\$?
19769
19770 cat a
19771 )"
19772 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
19773 ( $at_check_trace;
19774 mkdir posix
19775 (cd posix
19776 TEST_TAR_FORMAT=posix
19777 export TEST_TAR_FORMAT
19778 TAR_OPTIONS="-H posix"
19779 export TAR_OPTIONS
19780 rm -rf *
19781
19782 mkdir dir
19783 cd dir
19784 echo 'Old file a' > a
19785 echo 'Old file b' > b
19786
19787 tar cf ../archive .
19788
19789 rm b
19790 echo 'File a' > a
19791
19792 tar -x -k -f ../archive
19793 echo status=$?
19794
19795 cat a
19796 )
19797 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19798 at_status=$? at_failed=false
19799 $at_check_filter
19800 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
19801 tar: Exiting with failure status due to previous errors
19802 " | \
19803   $at_diff - "$at_stderr" || at_failed=:
19804 echo >>"$at_stdout"; $as_echo "status=2
19805 File a
19806 " | \
19807   $at_diff - "$at_stdout" || at_failed=:
19808 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
19809 $at_failed && at_fn_log_failure
19810 $at_traceon; }
19811
19812               { set +x
19813 $as_echo "$at_srcdir/extrac18.at:37:
19814 mkdir gnu
19815 (cd gnu
19816 TEST_TAR_FORMAT=gnu
19817 export TEST_TAR_FORMAT
19818 TAR_OPTIONS=\"-H gnu\"
19819 export TAR_OPTIONS
19820 rm -rf *
19821
19822 mkdir dir
19823 cd dir
19824 echo 'Old file a' > a
19825 echo 'Old file b' > b
19826
19827 tar cf ../archive .
19828
19829 rm b
19830 echo 'File a' > a
19831
19832 tar -x -k -f ../archive
19833 echo status=\$?
19834
19835 cat a
19836 )"
19837 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
19838 ( $at_check_trace;
19839 mkdir gnu
19840 (cd gnu
19841 TEST_TAR_FORMAT=gnu
19842 export TEST_TAR_FORMAT
19843 TAR_OPTIONS="-H gnu"
19844 export TAR_OPTIONS
19845 rm -rf *
19846
19847 mkdir dir
19848 cd dir
19849 echo 'Old file a' > a
19850 echo 'Old file b' > b
19851
19852 tar cf ../archive .
19853
19854 rm b
19855 echo 'File a' > a
19856
19857 tar -x -k -f ../archive
19858 echo status=$?
19859
19860 cat a
19861 )
19862 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19863 at_status=$? at_failed=false
19864 $at_check_filter
19865 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
19866 tar: Exiting with failure status due to previous errors
19867 " | \
19868   $at_diff - "$at_stderr" || at_failed=:
19869 echo >>"$at_stdout"; $as_echo "status=2
19870 File a
19871 " | \
19872   $at_diff - "$at_stdout" || at_failed=:
19873 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
19874 $at_failed && at_fn_log_failure
19875 $at_traceon; }
19876
19877
19878
19879
19880   set +x
19881   $at_times_p && times >"$at_times_file"
19882 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19883 read at_status <"$at_status_file"
19884 #AT_STOP_81
19885 #AT_START_82
19886 at_fn_group_banner 82 'extrac19.at:21' \
19887   "skip-old-files" "                                 " 9
19888 at_xfail=no
19889       test -f $XFAILFILE && at_xfail=yes
19890 (
19891   $as_echo "82. $at_setup_line: testing $at_desc ..."
19892   $at_traceon
19893
19894
19895
19896
19897
19898   { set +x
19899 $as_echo "$at_srcdir/extrac19.at:24:
19900 mkdir v7
19901 (cd v7
19902 TEST_TAR_FORMAT=v7
19903 export TEST_TAR_FORMAT
19904 TAR_OPTIONS=\"-H v7\"
19905 export TAR_OPTIONS
19906 rm -rf *
19907
19908 mkdir dir
19909 cd dir
19910 echo 'Old file a' > a
19911 echo 'Old file b' > b
19912
19913 tar cf ../archive .
19914
19915 rm b
19916 echo 'File a' > a
19917
19918 tar -x --skip-old-files -f ../archive
19919 echo status=\$?
19920
19921 cat a
19922 )"
19923 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
19924 ( $at_check_trace;
19925 mkdir v7
19926 (cd v7
19927 TEST_TAR_FORMAT=v7
19928 export TEST_TAR_FORMAT
19929 TAR_OPTIONS="-H v7"
19930 export TAR_OPTIONS
19931 rm -rf *
19932
19933 mkdir dir
19934 cd dir
19935 echo 'Old file a' > a
19936 echo 'Old file b' > b
19937
19938 tar cf ../archive .
19939
19940 rm b
19941 echo 'File a' > a
19942
19943 tar -x --skip-old-files -f ../archive
19944 echo status=$?
19945
19946 cat a
19947 )
19948 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19949 at_status=$? at_failed=false
19950 $at_check_filter
19951 at_fn_diff_devnull "$at_stderr" || at_failed=:
19952 echo >>"$at_stdout"; $as_echo "status=0
19953 File a
19954 " | \
19955   $at_diff - "$at_stdout" || at_failed=:
19956 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
19957 $at_failed && at_fn_log_failure
19958 $at_traceon; }
19959
19960               { set +x
19961 $as_echo "$at_srcdir/extrac19.at:24:
19962 mkdir oldgnu
19963 (cd oldgnu
19964 TEST_TAR_FORMAT=oldgnu
19965 export TEST_TAR_FORMAT
19966 TAR_OPTIONS=\"-H oldgnu\"
19967 export TAR_OPTIONS
19968 rm -rf *
19969
19970 mkdir dir
19971 cd dir
19972 echo 'Old file a' > a
19973 echo 'Old file b' > b
19974
19975 tar cf ../archive .
19976
19977 rm b
19978 echo 'File a' > a
19979
19980 tar -x --skip-old-files -f ../archive
19981 echo status=\$?
19982
19983 cat a
19984 )"
19985 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
19986 ( $at_check_trace;
19987 mkdir oldgnu
19988 (cd oldgnu
19989 TEST_TAR_FORMAT=oldgnu
19990 export TEST_TAR_FORMAT
19991 TAR_OPTIONS="-H oldgnu"
19992 export TAR_OPTIONS
19993 rm -rf *
19994
19995 mkdir dir
19996 cd dir
19997 echo 'Old file a' > a
19998 echo 'Old file b' > b
19999
20000 tar cf ../archive .
20001
20002 rm b
20003 echo 'File a' > a
20004
20005 tar -x --skip-old-files -f ../archive
20006 echo status=$?
20007
20008 cat a
20009 )
20010 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20011 at_status=$? at_failed=false
20012 $at_check_filter
20013 at_fn_diff_devnull "$at_stderr" || at_failed=:
20014 echo >>"$at_stdout"; $as_echo "status=0
20015 File a
20016 " | \
20017   $at_diff - "$at_stdout" || at_failed=:
20018 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
20019 $at_failed && at_fn_log_failure
20020 $at_traceon; }
20021
20022               { set +x
20023 $as_echo "$at_srcdir/extrac19.at:24:
20024 mkdir ustar
20025 (cd ustar
20026 TEST_TAR_FORMAT=ustar
20027 export TEST_TAR_FORMAT
20028 TAR_OPTIONS=\"-H ustar\"
20029 export TAR_OPTIONS
20030 rm -rf *
20031
20032 mkdir dir
20033 cd dir
20034 echo 'Old file a' > a
20035 echo 'Old file b' > b
20036
20037 tar cf ../archive .
20038
20039 rm b
20040 echo 'File a' > a
20041
20042 tar -x --skip-old-files -f ../archive
20043 echo status=\$?
20044
20045 cat a
20046 )"
20047 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
20048 ( $at_check_trace;
20049 mkdir ustar
20050 (cd ustar
20051 TEST_TAR_FORMAT=ustar
20052 export TEST_TAR_FORMAT
20053 TAR_OPTIONS="-H ustar"
20054 export TAR_OPTIONS
20055 rm -rf *
20056
20057 mkdir dir
20058 cd dir
20059 echo 'Old file a' > a
20060 echo 'Old file b' > b
20061
20062 tar cf ../archive .
20063
20064 rm b
20065 echo 'File a' > a
20066
20067 tar -x --skip-old-files -f ../archive
20068 echo status=$?
20069
20070 cat a
20071 )
20072 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20073 at_status=$? at_failed=false
20074 $at_check_filter
20075 at_fn_diff_devnull "$at_stderr" || at_failed=:
20076 echo >>"$at_stdout"; $as_echo "status=0
20077 File a
20078 " | \
20079   $at_diff - "$at_stdout" || at_failed=:
20080 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
20081 $at_failed && at_fn_log_failure
20082 $at_traceon; }
20083
20084               { set +x
20085 $as_echo "$at_srcdir/extrac19.at:24:
20086 mkdir posix
20087 (cd posix
20088 TEST_TAR_FORMAT=posix
20089 export TEST_TAR_FORMAT
20090 TAR_OPTIONS=\"-H posix\"
20091 export TAR_OPTIONS
20092 rm -rf *
20093
20094 mkdir dir
20095 cd dir
20096 echo 'Old file a' > a
20097 echo 'Old file b' > b
20098
20099 tar cf ../archive .
20100
20101 rm b
20102 echo 'File a' > a
20103
20104 tar -x --skip-old-files -f ../archive
20105 echo status=\$?
20106
20107 cat a
20108 )"
20109 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
20110 ( $at_check_trace;
20111 mkdir posix
20112 (cd posix
20113 TEST_TAR_FORMAT=posix
20114 export TEST_TAR_FORMAT
20115 TAR_OPTIONS="-H posix"
20116 export TAR_OPTIONS
20117 rm -rf *
20118
20119 mkdir dir
20120 cd dir
20121 echo 'Old file a' > a
20122 echo 'Old file b' > b
20123
20124 tar cf ../archive .
20125
20126 rm b
20127 echo 'File a' > a
20128
20129 tar -x --skip-old-files -f ../archive
20130 echo status=$?
20131
20132 cat a
20133 )
20134 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20135 at_status=$? at_failed=false
20136 $at_check_filter
20137 at_fn_diff_devnull "$at_stderr" || at_failed=:
20138 echo >>"$at_stdout"; $as_echo "status=0
20139 File a
20140 " | \
20141   $at_diff - "$at_stdout" || at_failed=:
20142 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
20143 $at_failed && at_fn_log_failure
20144 $at_traceon; }
20145
20146               { set +x
20147 $as_echo "$at_srcdir/extrac19.at:24:
20148 mkdir gnu
20149 (cd gnu
20150 TEST_TAR_FORMAT=gnu
20151 export TEST_TAR_FORMAT
20152 TAR_OPTIONS=\"-H gnu\"
20153 export TAR_OPTIONS
20154 rm -rf *
20155
20156 mkdir dir
20157 cd dir
20158 echo 'Old file a' > a
20159 echo 'Old file b' > b
20160
20161 tar cf ../archive .
20162
20163 rm b
20164 echo 'File a' > a
20165
20166 tar -x --skip-old-files -f ../archive
20167 echo status=\$?
20168
20169 cat a
20170 )"
20171 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
20172 ( $at_check_trace;
20173 mkdir gnu
20174 (cd gnu
20175 TEST_TAR_FORMAT=gnu
20176 export TEST_TAR_FORMAT
20177 TAR_OPTIONS="-H gnu"
20178 export TAR_OPTIONS
20179 rm -rf *
20180
20181 mkdir dir
20182 cd dir
20183 echo 'Old file a' > a
20184 echo 'Old file b' > b
20185
20186 tar cf ../archive .
20187
20188 rm b
20189 echo 'File a' > a
20190
20191 tar -x --skip-old-files -f ../archive
20192 echo status=$?
20193
20194 cat a
20195 )
20196 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20197 at_status=$? at_failed=false
20198 $at_check_filter
20199 at_fn_diff_devnull "$at_stderr" || at_failed=:
20200 echo >>"$at_stdout"; $as_echo "status=0
20201 File a
20202 " | \
20203   $at_diff - "$at_stdout" || at_failed=:
20204 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
20205 $at_failed && at_fn_log_failure
20206 $at_traceon; }
20207
20208
20209
20210
20211   set +x
20212   $at_times_p && times >"$at_times_file"
20213 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20214 read at_status <"$at_status_file"
20215 #AT_STOP_82
20216 #AT_START_83
20217 at_fn_group_banner 83 'backup01.at:33' \
20218   "extracting existing dir with --backup" "          " 9
20219 at_xfail=no
20220       test -f $XFAILFILE && at_xfail=yes
20221 (
20222   $as_echo "83. $at_setup_line: testing $at_desc ..."
20223   $at_traceon
20224
20225
20226
20227
20228
20229   { set +x
20230 $as_echo "$at_srcdir/backup01.at:36:
20231 mkdir v7
20232 (cd v7
20233 TEST_TAR_FORMAT=v7
20234 export TEST_TAR_FORMAT
20235 TAR_OPTIONS=\"-H v7\"
20236 export TAR_OPTIONS
20237 rm -rf *
20238
20239 unset VERSION_CONTROL
20240 mkdir dir1 dir2
20241 echo bla > dir1/file1
20242 tar cf test.tar dir1 dir2
20243 tar xfv test.tar --backup --warning=no-timestamp
20244 )"
20245 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
20246 ( $at_check_trace;
20247 mkdir v7
20248 (cd v7
20249 TEST_TAR_FORMAT=v7
20250 export TEST_TAR_FORMAT
20251 TAR_OPTIONS="-H v7"
20252 export TAR_OPTIONS
20253 rm -rf *
20254
20255 unset VERSION_CONTROL
20256 mkdir dir1 dir2
20257 echo bla > dir1/file1
20258 tar cf test.tar dir1 dir2
20259 tar xfv test.tar --backup --warning=no-timestamp
20260 )
20261 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20262 at_status=$? at_failed=false
20263 $at_check_filter
20264 at_fn_diff_devnull "$at_stderr" || at_failed=:
20265 echo >>"$at_stdout"; $as_echo "dir1/
20266 dir1/file1
20267 Renaming 'dir1/file1' to 'dir1/file1~'
20268 dir2/
20269 " | \
20270   $at_diff - "$at_stdout" || at_failed=:
20271 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
20272 $at_failed && at_fn_log_failure
20273 $at_traceon; }
20274
20275               { set +x
20276 $as_echo "$at_srcdir/backup01.at:36:
20277 mkdir oldgnu
20278 (cd oldgnu
20279 TEST_TAR_FORMAT=oldgnu
20280 export TEST_TAR_FORMAT
20281 TAR_OPTIONS=\"-H oldgnu\"
20282 export TAR_OPTIONS
20283 rm -rf *
20284
20285 unset VERSION_CONTROL
20286 mkdir dir1 dir2
20287 echo bla > dir1/file1
20288 tar cf test.tar dir1 dir2
20289 tar xfv test.tar --backup --warning=no-timestamp
20290 )"
20291 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
20292 ( $at_check_trace;
20293 mkdir oldgnu
20294 (cd oldgnu
20295 TEST_TAR_FORMAT=oldgnu
20296 export TEST_TAR_FORMAT
20297 TAR_OPTIONS="-H oldgnu"
20298 export TAR_OPTIONS
20299 rm -rf *
20300
20301 unset VERSION_CONTROL
20302 mkdir dir1 dir2
20303 echo bla > dir1/file1
20304 tar cf test.tar dir1 dir2
20305 tar xfv test.tar --backup --warning=no-timestamp
20306 )
20307 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20308 at_status=$? at_failed=false
20309 $at_check_filter
20310 at_fn_diff_devnull "$at_stderr" || at_failed=:
20311 echo >>"$at_stdout"; $as_echo "dir1/
20312 dir1/file1
20313 Renaming 'dir1/file1' to 'dir1/file1~'
20314 dir2/
20315 " | \
20316   $at_diff - "$at_stdout" || at_failed=:
20317 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
20318 $at_failed && at_fn_log_failure
20319 $at_traceon; }
20320
20321               { set +x
20322 $as_echo "$at_srcdir/backup01.at:36:
20323 mkdir ustar
20324 (cd ustar
20325 TEST_TAR_FORMAT=ustar
20326 export TEST_TAR_FORMAT
20327 TAR_OPTIONS=\"-H ustar\"
20328 export TAR_OPTIONS
20329 rm -rf *
20330
20331 unset VERSION_CONTROL
20332 mkdir dir1 dir2
20333 echo bla > dir1/file1
20334 tar cf test.tar dir1 dir2
20335 tar xfv test.tar --backup --warning=no-timestamp
20336 )"
20337 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
20338 ( $at_check_trace;
20339 mkdir ustar
20340 (cd ustar
20341 TEST_TAR_FORMAT=ustar
20342 export TEST_TAR_FORMAT
20343 TAR_OPTIONS="-H ustar"
20344 export TAR_OPTIONS
20345 rm -rf *
20346
20347 unset VERSION_CONTROL
20348 mkdir dir1 dir2
20349 echo bla > dir1/file1
20350 tar cf test.tar dir1 dir2
20351 tar xfv test.tar --backup --warning=no-timestamp
20352 )
20353 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20354 at_status=$? at_failed=false
20355 $at_check_filter
20356 at_fn_diff_devnull "$at_stderr" || at_failed=:
20357 echo >>"$at_stdout"; $as_echo "dir1/
20358 dir1/file1
20359 Renaming 'dir1/file1' to 'dir1/file1~'
20360 dir2/
20361 " | \
20362   $at_diff - "$at_stdout" || at_failed=:
20363 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
20364 $at_failed && at_fn_log_failure
20365 $at_traceon; }
20366
20367               { set +x
20368 $as_echo "$at_srcdir/backup01.at:36:
20369 mkdir posix
20370 (cd posix
20371 TEST_TAR_FORMAT=posix
20372 export TEST_TAR_FORMAT
20373 TAR_OPTIONS=\"-H posix\"
20374 export TAR_OPTIONS
20375 rm -rf *
20376
20377 unset VERSION_CONTROL
20378 mkdir dir1 dir2
20379 echo bla > dir1/file1
20380 tar cf test.tar dir1 dir2
20381 tar xfv test.tar --backup --warning=no-timestamp
20382 )"
20383 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
20384 ( $at_check_trace;
20385 mkdir posix
20386 (cd posix
20387 TEST_TAR_FORMAT=posix
20388 export TEST_TAR_FORMAT
20389 TAR_OPTIONS="-H posix"
20390 export TAR_OPTIONS
20391 rm -rf *
20392
20393 unset VERSION_CONTROL
20394 mkdir dir1 dir2
20395 echo bla > dir1/file1
20396 tar cf test.tar dir1 dir2
20397 tar xfv test.tar --backup --warning=no-timestamp
20398 )
20399 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20400 at_status=$? at_failed=false
20401 $at_check_filter
20402 at_fn_diff_devnull "$at_stderr" || at_failed=:
20403 echo >>"$at_stdout"; $as_echo "dir1/
20404 dir1/file1
20405 Renaming 'dir1/file1' to 'dir1/file1~'
20406 dir2/
20407 " | \
20408   $at_diff - "$at_stdout" || at_failed=:
20409 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
20410 $at_failed && at_fn_log_failure
20411 $at_traceon; }
20412
20413               { set +x
20414 $as_echo "$at_srcdir/backup01.at:36:
20415 mkdir gnu
20416 (cd gnu
20417 TEST_TAR_FORMAT=gnu
20418 export TEST_TAR_FORMAT
20419 TAR_OPTIONS=\"-H gnu\"
20420 export TAR_OPTIONS
20421 rm -rf *
20422
20423 unset VERSION_CONTROL
20424 mkdir dir1 dir2
20425 echo bla > dir1/file1
20426 tar cf test.tar dir1 dir2
20427 tar xfv test.tar --backup --warning=no-timestamp
20428 )"
20429 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
20430 ( $at_check_trace;
20431 mkdir gnu
20432 (cd gnu
20433 TEST_TAR_FORMAT=gnu
20434 export TEST_TAR_FORMAT
20435 TAR_OPTIONS="-H gnu"
20436 export TAR_OPTIONS
20437 rm -rf *
20438
20439 unset VERSION_CONTROL
20440 mkdir dir1 dir2
20441 echo bla > dir1/file1
20442 tar cf test.tar dir1 dir2
20443 tar xfv test.tar --backup --warning=no-timestamp
20444 )
20445 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20446 at_status=$? at_failed=false
20447 $at_check_filter
20448 at_fn_diff_devnull "$at_stderr" || at_failed=:
20449 echo >>"$at_stdout"; $as_echo "dir1/
20450 dir1/file1
20451 Renaming 'dir1/file1' to 'dir1/file1~'
20452 dir2/
20453 " | \
20454   $at_diff - "$at_stdout" || at_failed=:
20455 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
20456 $at_failed && at_fn_log_failure
20457 $at_traceon; }
20458
20459
20460
20461
20462   set +x
20463   $at_times_p && times >"$at_times_file"
20464 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20465 read at_status <"$at_status_file"
20466 #AT_STOP_83
20467 #AT_START_84
20468 at_fn_group_banner 84 'label01.at:21' \
20469   "single-volume label" "                            " 10
20470 at_xfail=no
20471       test -f $XFAILFILE && at_xfail=yes
20472 (
20473   $as_echo "84. $at_setup_line: testing $at_desc ..."
20474   $at_traceon
20475
20476
20477
20478
20479
20480   { set +x
20481 $as_echo "$at_srcdir/label01.at:24:
20482 mkdir gnu
20483 (cd gnu
20484 TEST_TAR_FORMAT=gnu
20485 export TEST_TAR_FORMAT
20486 TAR_OPTIONS=\"-H gnu\"
20487 export TAR_OPTIONS
20488 rm -rf *
20489
20490 genfile --file foo
20491 genfile --file bar
20492 tar -cf archive --label=Test foo bar
20493 tar tf archive
20494 )"
20495 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
20496 ( $at_check_trace;
20497 mkdir gnu
20498 (cd gnu
20499 TEST_TAR_FORMAT=gnu
20500 export TEST_TAR_FORMAT
20501 TAR_OPTIONS="-H gnu"
20502 export TAR_OPTIONS
20503 rm -rf *
20504
20505 genfile --file foo
20506 genfile --file bar
20507 tar -cf archive --label=Test foo bar
20508 tar tf archive
20509 )
20510 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20511 at_status=$? at_failed=false
20512 $at_check_filter
20513 at_fn_diff_devnull "$at_stderr" || at_failed=:
20514 echo >>"$at_stdout"; $as_echo "Test
20515 foo
20516 bar
20517 " | \
20518   $at_diff - "$at_stdout" || at_failed=:
20519 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
20520 $at_failed && at_fn_log_failure
20521 $at_traceon; }
20522
20523               { set +x
20524 $as_echo "$at_srcdir/label01.at:24:
20525 mkdir oldgnu
20526 (cd oldgnu
20527 TEST_TAR_FORMAT=oldgnu
20528 export TEST_TAR_FORMAT
20529 TAR_OPTIONS=\"-H oldgnu\"
20530 export TAR_OPTIONS
20531 rm -rf *
20532
20533 genfile --file foo
20534 genfile --file bar
20535 tar -cf archive --label=Test foo bar
20536 tar tf archive
20537 )"
20538 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
20539 ( $at_check_trace;
20540 mkdir oldgnu
20541 (cd oldgnu
20542 TEST_TAR_FORMAT=oldgnu
20543 export TEST_TAR_FORMAT
20544 TAR_OPTIONS="-H oldgnu"
20545 export TAR_OPTIONS
20546 rm -rf *
20547
20548 genfile --file foo
20549 genfile --file bar
20550 tar -cf archive --label=Test foo bar
20551 tar tf archive
20552 )
20553 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20554 at_status=$? at_failed=false
20555 $at_check_filter
20556 at_fn_diff_devnull "$at_stderr" || at_failed=:
20557 echo >>"$at_stdout"; $as_echo "Test
20558 foo
20559 bar
20560 " | \
20561   $at_diff - "$at_stdout" || at_failed=:
20562 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
20563 $at_failed && at_fn_log_failure
20564 $at_traceon; }
20565
20566               { set +x
20567 $as_echo "$at_srcdir/label01.at:24:
20568 mkdir posix
20569 (cd posix
20570 TEST_TAR_FORMAT=posix
20571 export TEST_TAR_FORMAT
20572 TAR_OPTIONS=\"-H posix\"
20573 export TAR_OPTIONS
20574 rm -rf *
20575
20576 genfile --file foo
20577 genfile --file bar
20578 tar -cf archive --label=Test foo bar
20579 tar tf archive
20580 )"
20581 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
20582 ( $at_check_trace;
20583 mkdir posix
20584 (cd posix
20585 TEST_TAR_FORMAT=posix
20586 export TEST_TAR_FORMAT
20587 TAR_OPTIONS="-H posix"
20588 export TAR_OPTIONS
20589 rm -rf *
20590
20591 genfile --file foo
20592 genfile --file bar
20593 tar -cf archive --label=Test foo bar
20594 tar tf archive
20595 )
20596 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20597 at_status=$? at_failed=false
20598 $at_check_filter
20599 at_fn_diff_devnull "$at_stderr" || at_failed=:
20600 echo >>"$at_stdout"; $as_echo "Test
20601 foo
20602 bar
20603 " | \
20604   $at_diff - "$at_stdout" || at_failed=:
20605 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
20606 $at_failed && at_fn_log_failure
20607 $at_traceon; }
20608
20609
20610
20611
20612   set +x
20613   $at_times_p && times >"$at_times_file"
20614 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20615 read at_status <"$at_status_file"
20616 #AT_STOP_84
20617 #AT_START_85
20618 at_fn_group_banner 85 'label02.at:21' \
20619   "multi-volume label" "                             " 10
20620 at_xfail=no
20621       test -f $XFAILFILE && at_xfail=yes
20622 (
20623   $as_echo "85. $at_setup_line: testing $at_desc ..."
20624   $at_traceon
20625
20626
20627
20628
20629
20630   { set +x
20631 $as_echo "$at_srcdir/label02.at:24:
20632 mkdir gnu
20633 (cd gnu
20634 TEST_TAR_FORMAT=gnu
20635 export TEST_TAR_FORMAT
20636 TAR_OPTIONS=\"-H gnu\"
20637 export TAR_OPTIONS
20638 rm -rf *
20639
20640 exec <&-
20641 genfile --length 0 --file foo
20642 genfile --length 12288 --file bar
20643 genfile --length 12288 --file baz
20644 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
20645 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
20646 )"
20647 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
20648 ( $at_check_trace;
20649 mkdir gnu
20650 (cd gnu
20651 TEST_TAR_FORMAT=gnu
20652 export TEST_TAR_FORMAT
20653 TAR_OPTIONS="-H gnu"
20654 export TAR_OPTIONS
20655 rm -rf *
20656
20657 exec <&-
20658 genfile --length 0 --file foo
20659 genfile --length 12288 --file bar
20660 genfile --length 12288 --file baz
20661 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
20662 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
20663 )
20664 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20665 at_status=$? at_failed=false
20666 $at_check_filter
20667 at_fn_diff_devnull "$at_stderr" || at_failed=:
20668 echo >>"$at_stdout"; $as_echo "Test Volume 1
20669 foo
20670 bar
20671 baz
20672 " | \
20673   $at_diff - "$at_stdout" || at_failed=:
20674 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
20675 $at_failed && at_fn_log_failure
20676 $at_traceon; }
20677
20678               { set +x
20679 $as_echo "$at_srcdir/label02.at:24:
20680 mkdir oldgnu
20681 (cd oldgnu
20682 TEST_TAR_FORMAT=oldgnu
20683 export TEST_TAR_FORMAT
20684 TAR_OPTIONS=\"-H oldgnu\"
20685 export TAR_OPTIONS
20686 rm -rf *
20687
20688 exec <&-
20689 genfile --length 0 --file foo
20690 genfile --length 12288 --file bar
20691 genfile --length 12288 --file baz
20692 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
20693 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
20694 )"
20695 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
20696 ( $at_check_trace;
20697 mkdir oldgnu
20698 (cd oldgnu
20699 TEST_TAR_FORMAT=oldgnu
20700 export TEST_TAR_FORMAT
20701 TAR_OPTIONS="-H oldgnu"
20702 export TAR_OPTIONS
20703 rm -rf *
20704
20705 exec <&-
20706 genfile --length 0 --file foo
20707 genfile --length 12288 --file bar
20708 genfile --length 12288 --file baz
20709 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
20710 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
20711 )
20712 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20713 at_status=$? at_failed=false
20714 $at_check_filter
20715 at_fn_diff_devnull "$at_stderr" || at_failed=:
20716 echo >>"$at_stdout"; $as_echo "Test Volume 1
20717 foo
20718 bar
20719 baz
20720 " | \
20721   $at_diff - "$at_stdout" || at_failed=:
20722 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
20723 $at_failed && at_fn_log_failure
20724 $at_traceon; }
20725
20726               { set +x
20727 $as_echo "$at_srcdir/label02.at:24:
20728 mkdir posix
20729 (cd posix
20730 TEST_TAR_FORMAT=posix
20731 export TEST_TAR_FORMAT
20732 TAR_OPTIONS=\"-H posix\"
20733 export TAR_OPTIONS
20734 rm -rf *
20735
20736 exec <&-
20737 genfile --length 0 --file foo
20738 genfile --length 12288 --file bar
20739 genfile --length 12288 --file baz
20740 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
20741 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
20742 )"
20743 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
20744 ( $at_check_trace;
20745 mkdir posix
20746 (cd posix
20747 TEST_TAR_FORMAT=posix
20748 export TEST_TAR_FORMAT
20749 TAR_OPTIONS="-H posix"
20750 export TAR_OPTIONS
20751 rm -rf *
20752
20753 exec <&-
20754 genfile --length 0 --file foo
20755 genfile --length 12288 --file bar
20756 genfile --length 12288 --file baz
20757 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
20758 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
20759 )
20760 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20761 at_status=$? at_failed=false
20762 $at_check_filter
20763 at_fn_diff_devnull "$at_stderr" || at_failed=:
20764 echo >>"$at_stdout"; $as_echo "Test Volume 1
20765 foo
20766 bar
20767 baz
20768 " | \
20769   $at_diff - "$at_stdout" || at_failed=:
20770 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
20771 $at_failed && at_fn_log_failure
20772 $at_traceon; }
20773
20774
20775
20776
20777   set +x
20778   $at_times_p && times >"$at_times_file"
20779 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20780 read at_status <"$at_status_file"
20781 #AT_STOP_85
20782 #AT_START_86
20783 at_fn_group_banner 86 'label03.at:27' \
20784   "test-label option" "                              " 10
20785 at_xfail=no
20786       test -f $XFAILFILE && at_xfail=yes
20787 (
20788   $as_echo "86. $at_setup_line: testing $at_desc ..."
20789   $at_traceon
20790
20791
20792
20793
20794
20795   { set +x
20796 $as_echo "$at_srcdir/label03.at:30:
20797 mkdir gnu
20798 (cd gnu
20799 TEST_TAR_FORMAT=gnu
20800 export TEST_TAR_FORMAT
20801 TAR_OPTIONS=\"-H gnu\"
20802 export TAR_OPTIONS
20803 rm -rf *
20804
20805 exec <&-
20806 genfile --file file
20807 tar -c --label='iamalabel' --file iamanarchive file
20808 tar -c --file unlabeled.tar file
20809 decho \"# Display label\"
20810 tar --test-label --file=iamanarchive; echo \$?
20811 decho \"# Display label: unlabeled\"
20812 tar --test-label --file=unlabeled.tar; echo \$?
20813 decho \"# Test label: success\"
20814 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
20815 decho \"# Test label: failure\"
20816 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
20817 decho \"# Test label: unlabeled\"
20818 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
20819 decho \"# Test label, verbose: success\"
20820 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
20821 decho \"# Test label, verbose: failure\"
20822 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
20823 decho \"# Test label: multiple arguments\"
20824 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
20825 decho \"# Test label: wildcards\"
20826 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
20827 )"
20828 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
20829 ( $at_check_trace;
20830 mkdir gnu
20831 (cd gnu
20832 TEST_TAR_FORMAT=gnu
20833 export TEST_TAR_FORMAT
20834 TAR_OPTIONS="-H gnu"
20835 export TAR_OPTIONS
20836 rm -rf *
20837
20838 exec <&-
20839 genfile --file file
20840 tar -c --label='iamalabel' --file iamanarchive file
20841 tar -c --file unlabeled.tar file
20842 decho "# Display label"
20843 tar --test-label --file=iamanarchive; echo $?
20844 decho "# Display label: unlabeled"
20845 tar --test-label --file=unlabeled.tar; echo $?
20846 decho "# Test label: success"
20847 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
20848 decho "# Test label: failure"
20849 tar --test-label --file=iamanarchive 'amalabel'; echo $?
20850 decho "# Test label: unlabeled"
20851 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
20852 decho "# Test label, verbose: success"
20853 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
20854 decho "# Test label, verbose: failure"
20855 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
20856 decho "# Test label: multiple arguments"
20857 tar --test-label --file=iamanarchive a iamalabel b; echo $?
20858 decho "# Test label: wildcards"
20859 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
20860 )
20861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20862 at_status=$? at_failed=false
20863 $at_check_filter
20864 echo >>"$at_stderr"; $as_echo "# Display label
20865 # Display label: unlabeled
20866 # Test label: success
20867 # Test label: failure
20868 # Test label: unlabeled
20869 # Test label, verbose: success
20870 # Test label, verbose: failure
20871 tar: Archive label mismatch
20872 # Test label: multiple arguments
20873 # Test label: wildcards
20874 " | \
20875   $at_diff - "$at_stderr" || at_failed=:
20876 echo >>"$at_stdout"; $as_echo "# Display label
20877 iamalabel
20878 0
20879 # Display label: unlabeled
20880 0
20881 # Test label: success
20882 0
20883 # Test label: failure
20884 1
20885 # Test label: unlabeled
20886 1
20887 # Test label, verbose: success
20888 iamalabel
20889 0
20890 # Test label, verbose: failure
20891 iamalabel
20892 1
20893 # Test label: multiple arguments
20894 0
20895 # Test label: wildcards
20896 0
20897 " | \
20898   $at_diff - "$at_stdout" || at_failed=:
20899 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
20900 $at_failed && at_fn_log_failure
20901 $at_traceon; }
20902
20903               { set +x
20904 $as_echo "$at_srcdir/label03.at:30:
20905 mkdir oldgnu
20906 (cd oldgnu
20907 TEST_TAR_FORMAT=oldgnu
20908 export TEST_TAR_FORMAT
20909 TAR_OPTIONS=\"-H oldgnu\"
20910 export TAR_OPTIONS
20911 rm -rf *
20912
20913 exec <&-
20914 genfile --file file
20915 tar -c --label='iamalabel' --file iamanarchive file
20916 tar -c --file unlabeled.tar file
20917 decho \"# Display label\"
20918 tar --test-label --file=iamanarchive; echo \$?
20919 decho \"# Display label: unlabeled\"
20920 tar --test-label --file=unlabeled.tar; echo \$?
20921 decho \"# Test label: success\"
20922 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
20923 decho \"# Test label: failure\"
20924 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
20925 decho \"# Test label: unlabeled\"
20926 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
20927 decho \"# Test label, verbose: success\"
20928 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
20929 decho \"# Test label, verbose: failure\"
20930 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
20931 decho \"# Test label: multiple arguments\"
20932 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
20933 decho \"# Test label: wildcards\"
20934 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
20935 )"
20936 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
20937 ( $at_check_trace;
20938 mkdir oldgnu
20939 (cd oldgnu
20940 TEST_TAR_FORMAT=oldgnu
20941 export TEST_TAR_FORMAT
20942 TAR_OPTIONS="-H oldgnu"
20943 export TAR_OPTIONS
20944 rm -rf *
20945
20946 exec <&-
20947 genfile --file file
20948 tar -c --label='iamalabel' --file iamanarchive file
20949 tar -c --file unlabeled.tar file
20950 decho "# Display label"
20951 tar --test-label --file=iamanarchive; echo $?
20952 decho "# Display label: unlabeled"
20953 tar --test-label --file=unlabeled.tar; echo $?
20954 decho "# Test label: success"
20955 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
20956 decho "# Test label: failure"
20957 tar --test-label --file=iamanarchive 'amalabel'; echo $?
20958 decho "# Test label: unlabeled"
20959 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
20960 decho "# Test label, verbose: success"
20961 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
20962 decho "# Test label, verbose: failure"
20963 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
20964 decho "# Test label: multiple arguments"
20965 tar --test-label --file=iamanarchive a iamalabel b; echo $?
20966 decho "# Test label: wildcards"
20967 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
20968 )
20969 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20970 at_status=$? at_failed=false
20971 $at_check_filter
20972 echo >>"$at_stderr"; $as_echo "# Display label
20973 # Display label: unlabeled
20974 # Test label: success
20975 # Test label: failure
20976 # Test label: unlabeled
20977 # Test label, verbose: success
20978 # Test label, verbose: failure
20979 tar: Archive label mismatch
20980 # Test label: multiple arguments
20981 # Test label: wildcards
20982 " | \
20983   $at_diff - "$at_stderr" || at_failed=:
20984 echo >>"$at_stdout"; $as_echo "# Display label
20985 iamalabel
20986 0
20987 # Display label: unlabeled
20988 0
20989 # Test label: success
20990 0
20991 # Test label: failure
20992 1
20993 # Test label: unlabeled
20994 1
20995 # Test label, verbose: success
20996 iamalabel
20997 0
20998 # Test label, verbose: failure
20999 iamalabel
21000 1
21001 # Test label: multiple arguments
21002 0
21003 # Test label: wildcards
21004 0
21005 " | \
21006   $at_diff - "$at_stdout" || at_failed=:
21007 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
21008 $at_failed && at_fn_log_failure
21009 $at_traceon; }
21010
21011               { set +x
21012 $as_echo "$at_srcdir/label03.at:30:
21013 mkdir posix
21014 (cd posix
21015 TEST_TAR_FORMAT=posix
21016 export TEST_TAR_FORMAT
21017 TAR_OPTIONS=\"-H posix\"
21018 export TAR_OPTIONS
21019 rm -rf *
21020
21021 exec <&-
21022 genfile --file file
21023 tar -c --label='iamalabel' --file iamanarchive file
21024 tar -c --file unlabeled.tar file
21025 decho \"# Display label\"
21026 tar --test-label --file=iamanarchive; echo \$?
21027 decho \"# Display label: unlabeled\"
21028 tar --test-label --file=unlabeled.tar; echo \$?
21029 decho \"# Test label: success\"
21030 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
21031 decho \"# Test label: failure\"
21032 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
21033 decho \"# Test label: unlabeled\"
21034 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
21035 decho \"# Test label, verbose: success\"
21036 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
21037 decho \"# Test label, verbose: failure\"
21038 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
21039 decho \"# Test label: multiple arguments\"
21040 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
21041 decho \"# Test label: wildcards\"
21042 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
21043 )"
21044 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
21045 ( $at_check_trace;
21046 mkdir posix
21047 (cd posix
21048 TEST_TAR_FORMAT=posix
21049 export TEST_TAR_FORMAT
21050 TAR_OPTIONS="-H posix"
21051 export TAR_OPTIONS
21052 rm -rf *
21053
21054 exec <&-
21055 genfile --file file
21056 tar -c --label='iamalabel' --file iamanarchive file
21057 tar -c --file unlabeled.tar file
21058 decho "# Display label"
21059 tar --test-label --file=iamanarchive; echo $?
21060 decho "# Display label: unlabeled"
21061 tar --test-label --file=unlabeled.tar; echo $?
21062 decho "# Test label: success"
21063 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
21064 decho "# Test label: failure"
21065 tar --test-label --file=iamanarchive 'amalabel'; echo $?
21066 decho "# Test label: unlabeled"
21067 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
21068 decho "# Test label, verbose: success"
21069 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
21070 decho "# Test label, verbose: failure"
21071 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
21072 decho "# Test label: multiple arguments"
21073 tar --test-label --file=iamanarchive a iamalabel b; echo $?
21074 decho "# Test label: wildcards"
21075 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
21076 )
21077 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21078 at_status=$? at_failed=false
21079 $at_check_filter
21080 echo >>"$at_stderr"; $as_echo "# Display label
21081 # Display label: unlabeled
21082 # Test label: success
21083 # Test label: failure
21084 # Test label: unlabeled
21085 # Test label, verbose: success
21086 # Test label, verbose: failure
21087 tar: Archive label mismatch
21088 # Test label: multiple arguments
21089 # Test label: wildcards
21090 " | \
21091   $at_diff - "$at_stderr" || at_failed=:
21092 echo >>"$at_stdout"; $as_echo "# Display label
21093 iamalabel
21094 0
21095 # Display label: unlabeled
21096 0
21097 # Test label: success
21098 0
21099 # Test label: failure
21100 1
21101 # Test label: unlabeled
21102 1
21103 # Test label, verbose: success
21104 iamalabel
21105 0
21106 # Test label, verbose: failure
21107 iamalabel
21108 1
21109 # Test label: multiple arguments
21110 0
21111 # Test label: wildcards
21112 0
21113 " | \
21114   $at_diff - "$at_stdout" || at_failed=:
21115 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
21116 $at_failed && at_fn_log_failure
21117 $at_traceon; }
21118
21119
21120
21121
21122   set +x
21123   $at_times_p && times >"$at_times_file"
21124 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21125 read at_status <"$at_status_file"
21126 #AT_STOP_86
21127 #AT_START_87
21128 at_fn_group_banner 87 'label04.at:27' \
21129   "label with non-create option" "                   " 10
21130 at_xfail=no
21131       test -f $XFAILFILE && at_xfail=yes
21132 (
21133   $as_echo "87. $at_setup_line: testing $at_desc ..."
21134   $at_traceon
21135
21136
21137
21138
21139
21140   { set +x
21141 $as_echo "$at_srcdir/label04.at:30:
21142 mkdir gnu
21143 (cd gnu
21144 TEST_TAR_FORMAT=gnu
21145 export TEST_TAR_FORMAT
21146 TAR_OPTIONS=\"-H gnu\"
21147 export TAR_OPTIONS
21148 rm -rf *
21149
21150 exec <&-
21151 genfile --file file
21152 decho \"# Create volume\"
21153 tar -c -f archive --label='New volume' file
21154 decho \"# Update: wrong label\"
21155 tar -rf archive --label='My volume' file; echo \$?
21156 decho \"# Update: right label\"
21157 tar -rf archive --label='New volume' file
21158 )"
21159 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
21160 ( $at_check_trace;
21161 mkdir gnu
21162 (cd gnu
21163 TEST_TAR_FORMAT=gnu
21164 export TEST_TAR_FORMAT
21165 TAR_OPTIONS="-H gnu"
21166 export TAR_OPTIONS
21167 rm -rf *
21168
21169 exec <&-
21170 genfile --file file
21171 decho "# Create volume"
21172 tar -c -f archive --label='New volume' file
21173 decho "# Update: wrong label"
21174 tar -rf archive --label='My volume' file; echo $?
21175 decho "# Update: right label"
21176 tar -rf archive --label='New volume' file
21177 )
21178 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21179 at_status=$? at_failed=false
21180 $at_check_filter
21181 echo >>"$at_stderr"; $as_echo "# Create volume
21182 # Update: wrong label
21183 tar: Volume 'New volume' does not match 'My volume'
21184 tar: Error is not recoverable: exiting now
21185 # Update: right label
21186 " | \
21187   $at_diff - "$at_stderr" || at_failed=:
21188 echo >>"$at_stdout"; $as_echo "# Create volume
21189 # Update: wrong label
21190 2
21191 # Update: right label
21192 " | \
21193   $at_diff - "$at_stdout" || at_failed=:
21194 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
21195 $at_failed && at_fn_log_failure
21196 $at_traceon; }
21197
21198               { set +x
21199 $as_echo "$at_srcdir/label04.at:30:
21200 mkdir oldgnu
21201 (cd oldgnu
21202 TEST_TAR_FORMAT=oldgnu
21203 export TEST_TAR_FORMAT
21204 TAR_OPTIONS=\"-H oldgnu\"
21205 export TAR_OPTIONS
21206 rm -rf *
21207
21208 exec <&-
21209 genfile --file file
21210 decho \"# Create volume\"
21211 tar -c -f archive --label='New volume' file
21212 decho \"# Update: wrong label\"
21213 tar -rf archive --label='My volume' file; echo \$?
21214 decho \"# Update: right label\"
21215 tar -rf archive --label='New volume' file
21216 )"
21217 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
21218 ( $at_check_trace;
21219 mkdir oldgnu
21220 (cd oldgnu
21221 TEST_TAR_FORMAT=oldgnu
21222 export TEST_TAR_FORMAT
21223 TAR_OPTIONS="-H oldgnu"
21224 export TAR_OPTIONS
21225 rm -rf *
21226
21227 exec <&-
21228 genfile --file file
21229 decho "# Create volume"
21230 tar -c -f archive --label='New volume' file
21231 decho "# Update: wrong label"
21232 tar -rf archive --label='My volume' file; echo $?
21233 decho "# Update: right label"
21234 tar -rf archive --label='New volume' file
21235 )
21236 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21237 at_status=$? at_failed=false
21238 $at_check_filter
21239 echo >>"$at_stderr"; $as_echo "# Create volume
21240 # Update: wrong label
21241 tar: Volume 'New volume' does not match 'My volume'
21242 tar: Error is not recoverable: exiting now
21243 # Update: right label
21244 " | \
21245   $at_diff - "$at_stderr" || at_failed=:
21246 echo >>"$at_stdout"; $as_echo "# Create volume
21247 # Update: wrong label
21248 2
21249 # Update: right label
21250 " | \
21251   $at_diff - "$at_stdout" || at_failed=:
21252 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
21253 $at_failed && at_fn_log_failure
21254 $at_traceon; }
21255
21256               { set +x
21257 $as_echo "$at_srcdir/label04.at:30:
21258 mkdir posix
21259 (cd posix
21260 TEST_TAR_FORMAT=posix
21261 export TEST_TAR_FORMAT
21262 TAR_OPTIONS=\"-H posix\"
21263 export TAR_OPTIONS
21264 rm -rf *
21265
21266 exec <&-
21267 genfile --file file
21268 decho \"# Create volume\"
21269 tar -c -f archive --label='New volume' file
21270 decho \"# Update: wrong label\"
21271 tar -rf archive --label='My volume' file; echo \$?
21272 decho \"# Update: right label\"
21273 tar -rf archive --label='New volume' file
21274 )"
21275 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
21276 ( $at_check_trace;
21277 mkdir posix
21278 (cd posix
21279 TEST_TAR_FORMAT=posix
21280 export TEST_TAR_FORMAT
21281 TAR_OPTIONS="-H posix"
21282 export TAR_OPTIONS
21283 rm -rf *
21284
21285 exec <&-
21286 genfile --file file
21287 decho "# Create volume"
21288 tar -c -f archive --label='New volume' file
21289 decho "# Update: wrong label"
21290 tar -rf archive --label='My volume' file; echo $?
21291 decho "# Update: right label"
21292 tar -rf archive --label='New volume' file
21293 )
21294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21295 at_status=$? at_failed=false
21296 $at_check_filter
21297 echo >>"$at_stderr"; $as_echo "# Create volume
21298 # Update: wrong label
21299 tar: Volume 'New volume' does not match 'My volume'
21300 tar: Error is not recoverable: exiting now
21301 # Update: right label
21302 " | \
21303   $at_diff - "$at_stderr" || at_failed=:
21304 echo >>"$at_stdout"; $as_echo "# Create volume
21305 # Update: wrong label
21306 2
21307 # Update: right label
21308 " | \
21309   $at_diff - "$at_stdout" || at_failed=:
21310 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
21311 $at_failed && at_fn_log_failure
21312 $at_traceon; }
21313
21314
21315
21316
21317   set +x
21318   $at_times_p && times >"$at_times_file"
21319 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21320 read at_status <"$at_status_file"
21321 #AT_STOP_87
21322 #AT_START_88
21323 at_fn_group_banner 88 'label05.at:24' \
21324   "label with non-create option" "                   " 10
21325 at_xfail=no
21326       test -f $XFAILFILE && at_xfail=yes
21327 (
21328   $as_echo "88. $at_setup_line: testing $at_desc ..."
21329   $at_traceon
21330
21331
21332
21333
21334
21335   { set +x
21336 $as_echo "$at_srcdir/label05.at:27:
21337 mkdir gnu
21338 (cd gnu
21339 TEST_TAR_FORMAT=gnu
21340 export TEST_TAR_FORMAT
21341 TAR_OPTIONS=\"-H gnu\"
21342 export TAR_OPTIONS
21343 rm -rf *
21344
21345 exec <&-
21346 genfile --file file
21347 decho \"# Create volume\"
21348 tar -c -f archive file
21349 decho \"# Update: wrong label\"
21350 tar -rf archive --label='My volume' file; echo \$?
21351 decho \"# Update: right label\"
21352 tar -rf archive file
21353 )"
21354 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
21355 ( $at_check_trace;
21356 mkdir gnu
21357 (cd gnu
21358 TEST_TAR_FORMAT=gnu
21359 export TEST_TAR_FORMAT
21360 TAR_OPTIONS="-H gnu"
21361 export TAR_OPTIONS
21362 rm -rf *
21363
21364 exec <&-
21365 genfile --file file
21366 decho "# Create volume"
21367 tar -c -f archive file
21368 decho "# Update: wrong label"
21369 tar -rf archive --label='My volume' file; echo $?
21370 decho "# Update: right label"
21371 tar -rf archive file
21372 )
21373 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21374 at_status=$? at_failed=false
21375 $at_check_filter
21376 echo >>"$at_stderr"; $as_echo "# Create volume
21377 # Update: wrong label
21378 tar: Archive not labeled to match 'My volume'
21379 tar: Error is not recoverable: exiting now
21380 # Update: right label
21381 " | \
21382   $at_diff - "$at_stderr" || at_failed=:
21383 echo >>"$at_stdout"; $as_echo "# Create volume
21384 # Update: wrong label
21385 2
21386 # Update: right label
21387 " | \
21388   $at_diff - "$at_stdout" || at_failed=:
21389 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
21390 $at_failed && at_fn_log_failure
21391 $at_traceon; }
21392
21393               { set +x
21394 $as_echo "$at_srcdir/label05.at:27:
21395 mkdir oldgnu
21396 (cd oldgnu
21397 TEST_TAR_FORMAT=oldgnu
21398 export TEST_TAR_FORMAT
21399 TAR_OPTIONS=\"-H oldgnu\"
21400 export TAR_OPTIONS
21401 rm -rf *
21402
21403 exec <&-
21404 genfile --file file
21405 decho \"# Create volume\"
21406 tar -c -f archive file
21407 decho \"# Update: wrong label\"
21408 tar -rf archive --label='My volume' file; echo \$?
21409 decho \"# Update: right label\"
21410 tar -rf archive file
21411 )"
21412 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
21413 ( $at_check_trace;
21414 mkdir oldgnu
21415 (cd oldgnu
21416 TEST_TAR_FORMAT=oldgnu
21417 export TEST_TAR_FORMAT
21418 TAR_OPTIONS="-H oldgnu"
21419 export TAR_OPTIONS
21420 rm -rf *
21421
21422 exec <&-
21423 genfile --file file
21424 decho "# Create volume"
21425 tar -c -f archive file
21426 decho "# Update: wrong label"
21427 tar -rf archive --label='My volume' file; echo $?
21428 decho "# Update: right label"
21429 tar -rf archive file
21430 )
21431 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21432 at_status=$? at_failed=false
21433 $at_check_filter
21434 echo >>"$at_stderr"; $as_echo "# Create volume
21435 # Update: wrong label
21436 tar: Archive not labeled to match 'My volume'
21437 tar: Error is not recoverable: exiting now
21438 # Update: right label
21439 " | \
21440   $at_diff - "$at_stderr" || at_failed=:
21441 echo >>"$at_stdout"; $as_echo "# Create volume
21442 # Update: wrong label
21443 2
21444 # Update: right label
21445 " | \
21446   $at_diff - "$at_stdout" || at_failed=:
21447 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
21448 $at_failed && at_fn_log_failure
21449 $at_traceon; }
21450
21451               { set +x
21452 $as_echo "$at_srcdir/label05.at:27:
21453 mkdir posix
21454 (cd posix
21455 TEST_TAR_FORMAT=posix
21456 export TEST_TAR_FORMAT
21457 TAR_OPTIONS=\"-H posix\"
21458 export TAR_OPTIONS
21459 rm -rf *
21460
21461 exec <&-
21462 genfile --file file
21463 decho \"# Create volume\"
21464 tar -c -f archive file
21465 decho \"# Update: wrong label\"
21466 tar -rf archive --label='My volume' file; echo \$?
21467 decho \"# Update: right label\"
21468 tar -rf archive file
21469 )"
21470 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
21471 ( $at_check_trace;
21472 mkdir posix
21473 (cd posix
21474 TEST_TAR_FORMAT=posix
21475 export TEST_TAR_FORMAT
21476 TAR_OPTIONS="-H posix"
21477 export TAR_OPTIONS
21478 rm -rf *
21479
21480 exec <&-
21481 genfile --file file
21482 decho "# Create volume"
21483 tar -c -f archive file
21484 decho "# Update: wrong label"
21485 tar -rf archive --label='My volume' file; echo $?
21486 decho "# Update: right label"
21487 tar -rf archive file
21488 )
21489 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21490 at_status=$? at_failed=false
21491 $at_check_filter
21492 echo >>"$at_stderr"; $as_echo "# Create volume
21493 # Update: wrong label
21494 tar: Archive not labeled to match 'My volume'
21495 tar: Error is not recoverable: exiting now
21496 # Update: right label
21497 " | \
21498   $at_diff - "$at_stderr" || at_failed=:
21499 echo >>"$at_stdout"; $as_echo "# Create volume
21500 # Update: wrong label
21501 2
21502 # Update: right label
21503 " | \
21504   $at_diff - "$at_stdout" || at_failed=:
21505 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
21506 $at_failed && at_fn_log_failure
21507 $at_traceon; }
21508
21509
21510
21511
21512   set +x
21513   $at_times_p && times >"$at_times_file"
21514 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21515 read at_status <"$at_status_file"
21516 #AT_STOP_88
21517 #AT_START_89
21518 at_fn_group_banner 89 'incremental.at:23' \
21519   "incremental" "                                    " 11
21520 at_xfail=no
21521       test -f $XFAILFILE && at_xfail=yes
21522 (
21523   $as_echo "89. $at_setup_line: testing $at_desc ..."
21524   $at_traceon
21525
21526
21527
21528
21529
21530   { set +x
21531 $as_echo "$at_srcdir/incremental.at:26:
21532 mkdir gnu
21533 (cd gnu
21534 TEST_TAR_FORMAT=gnu
21535 export TEST_TAR_FORMAT
21536 TAR_OPTIONS=\"-H gnu\"
21537 export TAR_OPTIONS
21538 rm -rf *
21539
21540 ckmtime || exit 77
21541
21542 mkdir structure
21543 echo x >structure/file
21544
21545 # On Nextstep (and perhaps other 4.3BSD systems),
21546 # a newly created file's ctime isn't updated
21547 # until the next sync or stat operation on the file.
21548 ls -l structure/file >/dev/null
21549
21550 # If the time of an initial backup and the creation time of a file contained
21551 # in that backup are the same, the file will be backed up again when an
21552 # incremental backup is done, because the incremental backup backs up
21553 # files created \"on or after\" the initial backup time.  Without the sleep
21554 # command, behaviour of tar becomes variable, depending whether the system
21555 # clock ticked over to the next second between creating the file and
21556 # backing it up.
21557 sleep 1
21558
21559 tar cf archive --listed=list structure
21560 tar cfv archive --listed=list structure
21561 echo separator
21562 # ReiserFS often offsets the timestamps of newly created files
21563 # 1 second to the past.  Try to compensate for it, until a better
21564 # solution is found.
21565 sleep 2
21566 echo y >structure/file
21567 tar cfv archive --listed=list structure
21568 )"
21569 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
21570 ( $at_check_trace;
21571 mkdir gnu
21572 (cd gnu
21573 TEST_TAR_FORMAT=gnu
21574 export TEST_TAR_FORMAT
21575 TAR_OPTIONS="-H gnu"
21576 export TAR_OPTIONS
21577 rm -rf *
21578
21579 ckmtime || exit 77
21580
21581 mkdir structure
21582 echo x >structure/file
21583
21584 # On Nextstep (and perhaps other 4.3BSD systems),
21585 # a newly created file's ctime isn't updated
21586 # until the next sync or stat operation on the file.
21587 ls -l structure/file >/dev/null
21588
21589 # If the time of an initial backup and the creation time of a file contained
21590 # in that backup are the same, the file will be backed up again when an
21591 # incremental backup is done, because the incremental backup backs up
21592 # files created "on or after" the initial backup time.  Without the sleep
21593 # command, behaviour of tar becomes variable, depending whether the system
21594 # clock ticked over to the next second between creating the file and
21595 # backing it up.
21596 sleep 1
21597
21598 tar cf archive --listed=list structure
21599 tar cfv archive --listed=list structure
21600 echo separator
21601 # ReiserFS often offsets the timestamps of newly created files
21602 # 1 second to the past.  Try to compensate for it, until a better
21603 # solution is found.
21604 sleep 2
21605 echo y >structure/file
21606 tar cfv archive --listed=list structure
21607 )
21608 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21609 at_status=$? at_failed=false
21610 $at_check_filter
21611 at_fn_diff_devnull "$at_stderr" || at_failed=:
21612 echo >>"$at_stdout"; $as_echo "structure/
21613 separator
21614 structure/
21615 structure/file
21616 " | \
21617   $at_diff - "$at_stdout" || at_failed=:
21618 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
21619 $at_failed && at_fn_log_failure
21620 $at_traceon; }
21621
21622               { set +x
21623 $as_echo "$at_srcdir/incremental.at:26:
21624 mkdir oldgnu
21625 (cd oldgnu
21626 TEST_TAR_FORMAT=oldgnu
21627 export TEST_TAR_FORMAT
21628 TAR_OPTIONS=\"-H oldgnu\"
21629 export TAR_OPTIONS
21630 rm -rf *
21631
21632 ckmtime || exit 77
21633
21634 mkdir structure
21635 echo x >structure/file
21636
21637 # On Nextstep (and perhaps other 4.3BSD systems),
21638 # a newly created file's ctime isn't updated
21639 # until the next sync or stat operation on the file.
21640 ls -l structure/file >/dev/null
21641
21642 # If the time of an initial backup and the creation time of a file contained
21643 # in that backup are the same, the file will be backed up again when an
21644 # incremental backup is done, because the incremental backup backs up
21645 # files created \"on or after\" the initial backup time.  Without the sleep
21646 # command, behaviour of tar becomes variable, depending whether the system
21647 # clock ticked over to the next second between creating the file and
21648 # backing it up.
21649 sleep 1
21650
21651 tar cf archive --listed=list structure
21652 tar cfv archive --listed=list structure
21653 echo separator
21654 # ReiserFS often offsets the timestamps of newly created files
21655 # 1 second to the past.  Try to compensate for it, until a better
21656 # solution is found.
21657 sleep 2
21658 echo y >structure/file
21659 tar cfv archive --listed=list structure
21660 )"
21661 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
21662 ( $at_check_trace;
21663 mkdir oldgnu
21664 (cd oldgnu
21665 TEST_TAR_FORMAT=oldgnu
21666 export TEST_TAR_FORMAT
21667 TAR_OPTIONS="-H oldgnu"
21668 export TAR_OPTIONS
21669 rm -rf *
21670
21671 ckmtime || exit 77
21672
21673 mkdir structure
21674 echo x >structure/file
21675
21676 # On Nextstep (and perhaps other 4.3BSD systems),
21677 # a newly created file's ctime isn't updated
21678 # until the next sync or stat operation on the file.
21679 ls -l structure/file >/dev/null
21680
21681 # If the time of an initial backup and the creation time of a file contained
21682 # in that backup are the same, the file will be backed up again when an
21683 # incremental backup is done, because the incremental backup backs up
21684 # files created "on or after" the initial backup time.  Without the sleep
21685 # command, behaviour of tar becomes variable, depending whether the system
21686 # clock ticked over to the next second between creating the file and
21687 # backing it up.
21688 sleep 1
21689
21690 tar cf archive --listed=list structure
21691 tar cfv archive --listed=list structure
21692 echo separator
21693 # ReiserFS often offsets the timestamps of newly created files
21694 # 1 second to the past.  Try to compensate for it, until a better
21695 # solution is found.
21696 sleep 2
21697 echo y >structure/file
21698 tar cfv archive --listed=list structure
21699 )
21700 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21701 at_status=$? at_failed=false
21702 $at_check_filter
21703 at_fn_diff_devnull "$at_stderr" || at_failed=:
21704 echo >>"$at_stdout"; $as_echo "structure/
21705 separator
21706 structure/
21707 structure/file
21708 " | \
21709   $at_diff - "$at_stdout" || at_failed=:
21710 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
21711 $at_failed && at_fn_log_failure
21712 $at_traceon; }
21713
21714               { set +x
21715 $as_echo "$at_srcdir/incremental.at:26:
21716 mkdir posix
21717 (cd posix
21718 TEST_TAR_FORMAT=posix
21719 export TEST_TAR_FORMAT
21720 TAR_OPTIONS=\"-H posix\"
21721 export TAR_OPTIONS
21722 rm -rf *
21723
21724 ckmtime || exit 77
21725
21726 mkdir structure
21727 echo x >structure/file
21728
21729 # On Nextstep (and perhaps other 4.3BSD systems),
21730 # a newly created file's ctime isn't updated
21731 # until the next sync or stat operation on the file.
21732 ls -l structure/file >/dev/null
21733
21734 # If the time of an initial backup and the creation time of a file contained
21735 # in that backup are the same, the file will be backed up again when an
21736 # incremental backup is done, because the incremental backup backs up
21737 # files created \"on or after\" the initial backup time.  Without the sleep
21738 # command, behaviour of tar becomes variable, depending whether the system
21739 # clock ticked over to the next second between creating the file and
21740 # backing it up.
21741 sleep 1
21742
21743 tar cf archive --listed=list structure
21744 tar cfv archive --listed=list structure
21745 echo separator
21746 # ReiserFS often offsets the timestamps of newly created files
21747 # 1 second to the past.  Try to compensate for it, until a better
21748 # solution is found.
21749 sleep 2
21750 echo y >structure/file
21751 tar cfv archive --listed=list structure
21752 )"
21753 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
21754 ( $at_check_trace;
21755 mkdir posix
21756 (cd posix
21757 TEST_TAR_FORMAT=posix
21758 export TEST_TAR_FORMAT
21759 TAR_OPTIONS="-H posix"
21760 export TAR_OPTIONS
21761 rm -rf *
21762
21763 ckmtime || exit 77
21764
21765 mkdir structure
21766 echo x >structure/file
21767
21768 # On Nextstep (and perhaps other 4.3BSD systems),
21769 # a newly created file's ctime isn't updated
21770 # until the next sync or stat operation on the file.
21771 ls -l structure/file >/dev/null
21772
21773 # If the time of an initial backup and the creation time of a file contained
21774 # in that backup are the same, the file will be backed up again when an
21775 # incremental backup is done, because the incremental backup backs up
21776 # files created "on or after" the initial backup time.  Without the sleep
21777 # command, behaviour of tar becomes variable, depending whether the system
21778 # clock ticked over to the next second between creating the file and
21779 # backing it up.
21780 sleep 1
21781
21782 tar cf archive --listed=list structure
21783 tar cfv archive --listed=list structure
21784 echo separator
21785 # ReiserFS often offsets the timestamps of newly created files
21786 # 1 second to the past.  Try to compensate for it, until a better
21787 # solution is found.
21788 sleep 2
21789 echo y >structure/file
21790 tar cfv archive --listed=list structure
21791 )
21792 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21793 at_status=$? at_failed=false
21794 $at_check_filter
21795 at_fn_diff_devnull "$at_stderr" || at_failed=:
21796 echo >>"$at_stdout"; $as_echo "structure/
21797 separator
21798 structure/
21799 structure/file
21800 " | \
21801   $at_diff - "$at_stdout" || at_failed=:
21802 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
21803 $at_failed && at_fn_log_failure
21804 $at_traceon; }
21805
21806
21807
21808
21809   set +x
21810   $at_times_p && times >"$at_times_file"
21811 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21812 read at_status <"$at_status_file"
21813 #AT_STOP_89
21814 #AT_START_90
21815 at_fn_group_banner 90 'incr01.at:27' \
21816   "restore broken symlinks from incremental" "       " 11
21817 at_xfail=no
21818       test -f $XFAILFILE && at_xfail=yes
21819 (
21820   $as_echo "90. $at_setup_line: testing $at_desc ..."
21821   $at_traceon
21822
21823
21824
21825
21826
21827   { set +x
21828 $as_echo "$at_srcdir/incr01.at:30:
21829 mkdir gnu
21830 (cd gnu
21831 TEST_TAR_FORMAT=gnu
21832 export TEST_TAR_FORMAT
21833 TAR_OPTIONS=\"-H gnu\"
21834 export TAR_OPTIONS
21835 rm -rf *
21836
21837 ckmtime || exit 77
21838
21839 mkdir directory
21840 \$as_ln_s foo directory/bar
21841
21842 tar -cf archive.0 -g db directory
21843 rm directory/bar
21844 tar -cf archive.1 -g db directory
21845
21846 mv directory orig
21847
21848 tar xvfg archive.0 /dev/null --warning=no-timestamp
21849 echo separator
21850 tar xvfg archive.1 /dev/null --warning=no-timestamp
21851 )"
21852 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
21853 ( $at_check_trace;
21854 mkdir gnu
21855 (cd gnu
21856 TEST_TAR_FORMAT=gnu
21857 export TEST_TAR_FORMAT
21858 TAR_OPTIONS="-H gnu"
21859 export TAR_OPTIONS
21860 rm -rf *
21861
21862 ckmtime || exit 77
21863
21864 mkdir directory
21865 $as_ln_s foo directory/bar
21866
21867 tar -cf archive.0 -g db directory
21868 rm directory/bar
21869 tar -cf archive.1 -g db directory
21870
21871 mv directory orig
21872
21873 tar xvfg archive.0 /dev/null --warning=no-timestamp
21874 echo separator
21875 tar xvfg archive.1 /dev/null --warning=no-timestamp
21876 )
21877 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21878 at_status=$? at_failed=false
21879 $at_check_filter
21880 at_fn_diff_devnull "$at_stderr" || at_failed=:
21881 echo >>"$at_stdout"; $as_echo "directory/
21882 directory/bar
21883 separator
21884 directory/
21885 tar: Deleting 'directory/bar'
21886 " | \
21887   $at_diff - "$at_stdout" || at_failed=:
21888 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
21889 $at_failed && at_fn_log_failure
21890 $at_traceon; }
21891
21892               { set +x
21893 $as_echo "$at_srcdir/incr01.at:30:
21894 mkdir oldgnu
21895 (cd oldgnu
21896 TEST_TAR_FORMAT=oldgnu
21897 export TEST_TAR_FORMAT
21898 TAR_OPTIONS=\"-H oldgnu\"
21899 export TAR_OPTIONS
21900 rm -rf *
21901
21902 ckmtime || exit 77
21903
21904 mkdir directory
21905 \$as_ln_s foo directory/bar
21906
21907 tar -cf archive.0 -g db directory
21908 rm directory/bar
21909 tar -cf archive.1 -g db directory
21910
21911 mv directory orig
21912
21913 tar xvfg archive.0 /dev/null --warning=no-timestamp
21914 echo separator
21915 tar xvfg archive.1 /dev/null --warning=no-timestamp
21916 )"
21917 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
21918 ( $at_check_trace;
21919 mkdir oldgnu
21920 (cd oldgnu
21921 TEST_TAR_FORMAT=oldgnu
21922 export TEST_TAR_FORMAT
21923 TAR_OPTIONS="-H oldgnu"
21924 export TAR_OPTIONS
21925 rm -rf *
21926
21927 ckmtime || exit 77
21928
21929 mkdir directory
21930 $as_ln_s foo directory/bar
21931
21932 tar -cf archive.0 -g db directory
21933 rm directory/bar
21934 tar -cf archive.1 -g db directory
21935
21936 mv directory orig
21937
21938 tar xvfg archive.0 /dev/null --warning=no-timestamp
21939 echo separator
21940 tar xvfg archive.1 /dev/null --warning=no-timestamp
21941 )
21942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21943 at_status=$? at_failed=false
21944 $at_check_filter
21945 at_fn_diff_devnull "$at_stderr" || at_failed=:
21946 echo >>"$at_stdout"; $as_echo "directory/
21947 directory/bar
21948 separator
21949 directory/
21950 tar: Deleting 'directory/bar'
21951 " | \
21952   $at_diff - "$at_stdout" || at_failed=:
21953 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
21954 $at_failed && at_fn_log_failure
21955 $at_traceon; }
21956
21957               { set +x
21958 $as_echo "$at_srcdir/incr01.at:30:
21959 mkdir posix
21960 (cd posix
21961 TEST_TAR_FORMAT=posix
21962 export TEST_TAR_FORMAT
21963 TAR_OPTIONS=\"-H posix\"
21964 export TAR_OPTIONS
21965 rm -rf *
21966
21967 ckmtime || exit 77
21968
21969 mkdir directory
21970 \$as_ln_s foo directory/bar
21971
21972 tar -cf archive.0 -g db directory
21973 rm directory/bar
21974 tar -cf archive.1 -g db directory
21975
21976 mv directory orig
21977
21978 tar xvfg archive.0 /dev/null --warning=no-timestamp
21979 echo separator
21980 tar xvfg archive.1 /dev/null --warning=no-timestamp
21981 )"
21982 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
21983 ( $at_check_trace;
21984 mkdir posix
21985 (cd posix
21986 TEST_TAR_FORMAT=posix
21987 export TEST_TAR_FORMAT
21988 TAR_OPTIONS="-H posix"
21989 export TAR_OPTIONS
21990 rm -rf *
21991
21992 ckmtime || exit 77
21993
21994 mkdir directory
21995 $as_ln_s foo directory/bar
21996
21997 tar -cf archive.0 -g db directory
21998 rm directory/bar
21999 tar -cf archive.1 -g db directory
22000
22001 mv directory orig
22002
22003 tar xvfg archive.0 /dev/null --warning=no-timestamp
22004 echo separator
22005 tar xvfg archive.1 /dev/null --warning=no-timestamp
22006 )
22007 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22008 at_status=$? at_failed=false
22009 $at_check_filter
22010 at_fn_diff_devnull "$at_stderr" || at_failed=:
22011 echo >>"$at_stdout"; $as_echo "directory/
22012 directory/bar
22013 separator
22014 directory/
22015 tar: Deleting 'directory/bar'
22016 " | \
22017   $at_diff - "$at_stdout" || at_failed=:
22018 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
22019 $at_failed && at_fn_log_failure
22020 $at_traceon; }
22021
22022
22023
22024
22025   set +x
22026   $at_times_p && times >"$at_times_file"
22027 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22028 read at_status <"$at_status_file"
22029 #AT_STOP_90
22030 #AT_START_91
22031 at_fn_group_banner 91 'incr02.at:32' \
22032   "restoring timestamps from incremental" "          " 11
22033 at_xfail=no
22034       test -f $XFAILFILE && at_xfail=yes
22035 (
22036   $as_echo "91. $at_setup_line: testing $at_desc ..."
22037   $at_traceon
22038
22039
22040
22041
22042
22043   { set +x
22044 $as_echo "$at_srcdir/incr02.at:35:
22045 mkdir gnu
22046 (cd gnu
22047 TEST_TAR_FORMAT=gnu
22048 export TEST_TAR_FORMAT
22049 TAR_OPTIONS=\"-H gnu\"
22050 export TAR_OPTIONS
22051 rm -rf *
22052
22053 ckmtime || exit 77
22054 # Create directory structure
22055 mkdir dir
22056 mkdir dir/subdir1
22057 mkdir dir/subdir2
22058 genfile --length 10 --file dir/subdir1/file
22059
22060 # Save mtime for later comparison
22061 genfile --stat=mtime dir/subdir1 > ts
22062
22063 # Create an archive. Using incremental mode makes sure the
22064 # archive will have a directory-first member ordering,
22065 # i.e.:
22066 # dir/
22067 # dir/subdir1/
22068 # dir/subdir2/
22069 # dir/subdir1/foofile
22070 #
22071 # When restoring from this directory structure, 'dir/subdir2/' used to
22072 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
22073 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
22074 # latter clobbered the directory timestamp.
22075
22076 tar -cf archive -g db dir
22077
22078 # Move away the directory
22079 mv dir orig
22080
22081 # Wait enough time for timestamps to differ in case of failure.
22082 sleep 5
22083
22084 # Restore the directory
22085 tar -xf archive dir
22086
22087 # Check the timestamp
22088 genfile --stat=mtime dir/subdir1 | diff ts -
22089 )"
22090 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
22091 ( $at_check_trace;
22092 mkdir gnu
22093 (cd gnu
22094 TEST_TAR_FORMAT=gnu
22095 export TEST_TAR_FORMAT
22096 TAR_OPTIONS="-H gnu"
22097 export TAR_OPTIONS
22098 rm -rf *
22099
22100 ckmtime || exit 77
22101 # Create directory structure
22102 mkdir dir
22103 mkdir dir/subdir1
22104 mkdir dir/subdir2
22105 genfile --length 10 --file dir/subdir1/file
22106
22107 # Save mtime for later comparison
22108 genfile --stat=mtime dir/subdir1 > ts
22109
22110 # Create an archive. Using incremental mode makes sure the
22111 # archive will have a directory-first member ordering,
22112 # i.e.:
22113 # dir/
22114 # dir/subdir1/
22115 # dir/subdir2/
22116 # dir/subdir1/foofile
22117 #
22118 # When restoring from this directory structure, 'dir/subdir2/' used to
22119 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
22120 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
22121 # latter clobbered the directory timestamp.
22122
22123 tar -cf archive -g db dir
22124
22125 # Move away the directory
22126 mv dir orig
22127
22128 # Wait enough time for timestamps to differ in case of failure.
22129 sleep 5
22130
22131 # Restore the directory
22132 tar -xf archive dir
22133
22134 # Check the timestamp
22135 genfile --stat=mtime dir/subdir1 | diff ts -
22136 )
22137 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22138 at_status=$? at_failed=false
22139 $at_check_filter
22140 at_fn_diff_devnull "$at_stderr" || at_failed=:
22141 at_fn_diff_devnull "$at_stdout" || at_failed=:
22142 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
22143 $at_failed && at_fn_log_failure
22144 $at_traceon; }
22145
22146               { set +x
22147 $as_echo "$at_srcdir/incr02.at:35:
22148 mkdir oldgnu
22149 (cd oldgnu
22150 TEST_TAR_FORMAT=oldgnu
22151 export TEST_TAR_FORMAT
22152 TAR_OPTIONS=\"-H oldgnu\"
22153 export TAR_OPTIONS
22154 rm -rf *
22155
22156 ckmtime || exit 77
22157 # Create directory structure
22158 mkdir dir
22159 mkdir dir/subdir1
22160 mkdir dir/subdir2
22161 genfile --length 10 --file dir/subdir1/file
22162
22163 # Save mtime for later comparison
22164 genfile --stat=mtime dir/subdir1 > ts
22165
22166 # Create an archive. Using incremental mode makes sure the
22167 # archive will have a directory-first member ordering,
22168 # i.e.:
22169 # dir/
22170 # dir/subdir1/
22171 # dir/subdir2/
22172 # dir/subdir1/foofile
22173 #
22174 # When restoring from this directory structure, 'dir/subdir2/' used to
22175 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
22176 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
22177 # latter clobbered the directory timestamp.
22178
22179 tar -cf archive -g db dir
22180
22181 # Move away the directory
22182 mv dir orig
22183
22184 # Wait enough time for timestamps to differ in case of failure.
22185 sleep 5
22186
22187 # Restore the directory
22188 tar -xf archive dir
22189
22190 # Check the timestamp
22191 genfile --stat=mtime dir/subdir1 | diff ts -
22192 )"
22193 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
22194 ( $at_check_trace;
22195 mkdir oldgnu
22196 (cd oldgnu
22197 TEST_TAR_FORMAT=oldgnu
22198 export TEST_TAR_FORMAT
22199 TAR_OPTIONS="-H oldgnu"
22200 export TAR_OPTIONS
22201 rm -rf *
22202
22203 ckmtime || exit 77
22204 # Create directory structure
22205 mkdir dir
22206 mkdir dir/subdir1
22207 mkdir dir/subdir2
22208 genfile --length 10 --file dir/subdir1/file
22209
22210 # Save mtime for later comparison
22211 genfile --stat=mtime dir/subdir1 > ts
22212
22213 # Create an archive. Using incremental mode makes sure the
22214 # archive will have a directory-first member ordering,
22215 # i.e.:
22216 # dir/
22217 # dir/subdir1/
22218 # dir/subdir2/
22219 # dir/subdir1/foofile
22220 #
22221 # When restoring from this directory structure, 'dir/subdir2/' used to
22222 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
22223 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
22224 # latter clobbered the directory timestamp.
22225
22226 tar -cf archive -g db dir
22227
22228 # Move away the directory
22229 mv dir orig
22230
22231 # Wait enough time for timestamps to differ in case of failure.
22232 sleep 5
22233
22234 # Restore the directory
22235 tar -xf archive dir
22236
22237 # Check the timestamp
22238 genfile --stat=mtime dir/subdir1 | diff ts -
22239 )
22240 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22241 at_status=$? at_failed=false
22242 $at_check_filter
22243 at_fn_diff_devnull "$at_stderr" || at_failed=:
22244 at_fn_diff_devnull "$at_stdout" || at_failed=:
22245 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
22246 $at_failed && at_fn_log_failure
22247 $at_traceon; }
22248
22249               { set +x
22250 $as_echo "$at_srcdir/incr02.at:35:
22251 mkdir posix
22252 (cd posix
22253 TEST_TAR_FORMAT=posix
22254 export TEST_TAR_FORMAT
22255 TAR_OPTIONS=\"-H posix\"
22256 export TAR_OPTIONS
22257 rm -rf *
22258
22259 ckmtime || exit 77
22260 # Create directory structure
22261 mkdir dir
22262 mkdir dir/subdir1
22263 mkdir dir/subdir2
22264 genfile --length 10 --file dir/subdir1/file
22265
22266 # Save mtime for later comparison
22267 genfile --stat=mtime dir/subdir1 > ts
22268
22269 # Create an archive. Using incremental mode makes sure the
22270 # archive will have a directory-first member ordering,
22271 # i.e.:
22272 # dir/
22273 # dir/subdir1/
22274 # dir/subdir2/
22275 # dir/subdir1/foofile
22276 #
22277 # When restoring from this directory structure, 'dir/subdir2/' used to
22278 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
22279 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
22280 # latter clobbered the directory timestamp.
22281
22282 tar -cf archive -g db dir
22283
22284 # Move away the directory
22285 mv dir orig
22286
22287 # Wait enough time for timestamps to differ in case of failure.
22288 sleep 5
22289
22290 # Restore the directory
22291 tar -xf archive dir
22292
22293 # Check the timestamp
22294 genfile --stat=mtime dir/subdir1 | diff ts -
22295 )"
22296 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
22297 ( $at_check_trace;
22298 mkdir posix
22299 (cd posix
22300 TEST_TAR_FORMAT=posix
22301 export TEST_TAR_FORMAT
22302 TAR_OPTIONS="-H posix"
22303 export TAR_OPTIONS
22304 rm -rf *
22305
22306 ckmtime || exit 77
22307 # Create directory structure
22308 mkdir dir
22309 mkdir dir/subdir1
22310 mkdir dir/subdir2
22311 genfile --length 10 --file dir/subdir1/file
22312
22313 # Save mtime for later comparison
22314 genfile --stat=mtime dir/subdir1 > ts
22315
22316 # Create an archive. Using incremental mode makes sure the
22317 # archive will have a directory-first member ordering,
22318 # i.e.:
22319 # dir/
22320 # dir/subdir1/
22321 # dir/subdir2/
22322 # dir/subdir1/foofile
22323 #
22324 # When restoring from this directory structure, 'dir/subdir2/' used to
22325 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
22326 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
22327 # latter clobbered the directory timestamp.
22328
22329 tar -cf archive -g db dir
22330
22331 # Move away the directory
22332 mv dir orig
22333
22334 # Wait enough time for timestamps to differ in case of failure.
22335 sleep 5
22336
22337 # Restore the directory
22338 tar -xf archive dir
22339
22340 # Check the timestamp
22341 genfile --stat=mtime dir/subdir1 | diff ts -
22342 )
22343 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22344 at_status=$? at_failed=false
22345 $at_check_filter
22346 at_fn_diff_devnull "$at_stderr" || at_failed=:
22347 at_fn_diff_devnull "$at_stdout" || at_failed=:
22348 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
22349 $at_failed && at_fn_log_failure
22350 $at_traceon; }
22351
22352
22353
22354
22355   set +x
22356   $at_times_p && times >"$at_times_file"
22357 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22358 read at_status <"$at_status_file"
22359 #AT_STOP_91
22360 #AT_START_92
22361 at_fn_group_banner 92 'listed01.at:27' \
22362   "--listed for individual files" "                  " 11
22363 at_xfail=no
22364       test -f $XFAILFILE && at_xfail=yes
22365 (
22366   $as_echo "92. $at_setup_line: testing $at_desc ..."
22367   $at_traceon
22368
22369
22370
22371
22372
22373   { set +x
22374 $as_echo "$at_srcdir/listed01.at:30:
22375 mkdir gnu
22376 (cd gnu
22377 TEST_TAR_FORMAT=gnu
22378 export TEST_TAR_FORMAT
22379 TAR_OPTIONS=\"-H gnu\"
22380 export TAR_OPTIONS
22381 rm -rf *
22382
22383 ckmtime || exit 77
22384
22385 mkdir directory
22386 genfile --length 10240 --pattern zeros --file directory/file1
22387 # Let the things settle
22388 sleep 1
22389
22390 tar --create \\
22391     --file=archive.1 \\
22392     --listed-incremental=listing \\
22393     directory/file*
22394
22395 tar tf archive.1 || exit 1
22396
22397 sleep 2
22398
22399 genfile --length 10240 --pattern zeros --file directory/file2
22400
22401 echo \"separator\"
22402 cp listing listing.old
22403 tar --create \\
22404     --file=archive.2 \\
22405     --listed-incremental=listing \\
22406     directory/file* || exit 1
22407
22408 tar tf archive.2 || exit 1
22409 )"
22410 at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:30"
22411 ( $at_check_trace;
22412 mkdir gnu
22413 (cd gnu
22414 TEST_TAR_FORMAT=gnu
22415 export TEST_TAR_FORMAT
22416 TAR_OPTIONS="-H gnu"
22417 export TAR_OPTIONS
22418 rm -rf *
22419
22420 ckmtime || exit 77
22421
22422 mkdir directory
22423 genfile --length 10240 --pattern zeros --file directory/file1
22424 # Let the things settle
22425 sleep 1
22426
22427 tar --create \
22428     --file=archive.1 \
22429     --listed-incremental=listing \
22430     directory/file*
22431
22432 tar tf archive.1 || exit 1
22433
22434 sleep 2
22435
22436 genfile --length 10240 --pattern zeros --file directory/file2
22437
22438 echo "separator"
22439 cp listing listing.old
22440 tar --create \
22441     --file=archive.2 \
22442     --listed-incremental=listing \
22443     directory/file* || exit 1
22444
22445 tar tf archive.2 || exit 1
22446 )
22447 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22448 at_status=$? at_failed=false
22449 $at_check_filter
22450 at_fn_diff_devnull "$at_stderr" || at_failed=:
22451 echo >>"$at_stdout"; $as_echo "directory/file1
22452 separator
22453 directory/file2
22454 " | \
22455   $at_diff - "$at_stdout" || at_failed=:
22456 at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:30"
22457 $at_failed && at_fn_log_failure
22458 $at_traceon; }
22459
22460               { set +x
22461 $as_echo "$at_srcdir/listed01.at:30:
22462 mkdir oldgnu
22463 (cd oldgnu
22464 TEST_TAR_FORMAT=oldgnu
22465 export TEST_TAR_FORMAT
22466 TAR_OPTIONS=\"-H oldgnu\"
22467 export TAR_OPTIONS
22468 rm -rf *
22469
22470 ckmtime || exit 77
22471
22472 mkdir directory
22473 genfile --length 10240 --pattern zeros --file directory/file1
22474 # Let the things settle
22475 sleep 1
22476
22477 tar --create \\
22478     --file=archive.1 \\
22479     --listed-incremental=listing \\
22480     directory/file*
22481
22482 tar tf archive.1 || exit 1
22483
22484 sleep 2
22485
22486 genfile --length 10240 --pattern zeros --file directory/file2
22487
22488 echo \"separator\"
22489 cp listing listing.old
22490 tar --create \\
22491     --file=archive.2 \\
22492     --listed-incremental=listing \\
22493     directory/file* || exit 1
22494
22495 tar tf archive.2 || exit 1
22496 )"
22497 at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:30"
22498 ( $at_check_trace;
22499 mkdir oldgnu
22500 (cd oldgnu
22501 TEST_TAR_FORMAT=oldgnu
22502 export TEST_TAR_FORMAT
22503 TAR_OPTIONS="-H oldgnu"
22504 export TAR_OPTIONS
22505 rm -rf *
22506
22507 ckmtime || exit 77
22508
22509 mkdir directory
22510 genfile --length 10240 --pattern zeros --file directory/file1
22511 # Let the things settle
22512 sleep 1
22513
22514 tar --create \
22515     --file=archive.1 \
22516     --listed-incremental=listing \
22517     directory/file*
22518
22519 tar tf archive.1 || exit 1
22520
22521 sleep 2
22522
22523 genfile --length 10240 --pattern zeros --file directory/file2
22524
22525 echo "separator"
22526 cp listing listing.old
22527 tar --create \
22528     --file=archive.2 \
22529     --listed-incremental=listing \
22530     directory/file* || exit 1
22531
22532 tar tf archive.2 || exit 1
22533 )
22534 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22535 at_status=$? at_failed=false
22536 $at_check_filter
22537 at_fn_diff_devnull "$at_stderr" || at_failed=:
22538 echo >>"$at_stdout"; $as_echo "directory/file1
22539 separator
22540 directory/file2
22541 " | \
22542   $at_diff - "$at_stdout" || at_failed=:
22543 at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:30"
22544 $at_failed && at_fn_log_failure
22545 $at_traceon; }
22546
22547
22548
22549
22550   set +x
22551   $at_times_p && times >"$at_times_file"
22552 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22553 read at_status <"$at_status_file"
22554 #AT_STOP_92
22555 #AT_START_93
22556 at_fn_group_banner 93 'listed02.at:29' \
22557   "working --listed" "                               " 11
22558 at_xfail=no
22559       test -f $XFAILFILE && at_xfail=yes
22560 (
22561   $as_echo "93. $at_setup_line: testing $at_desc ..."
22562   $at_traceon
22563
22564
22565
22566
22567
22568   { set +x
22569 $as_echo "$at_srcdir/listed02.at:32:
22570 mkdir gnu
22571 (cd gnu
22572 TEST_TAR_FORMAT=gnu
22573 export TEST_TAR_FORMAT
22574 TAR_OPTIONS=\"-H gnu\"
22575 export TAR_OPTIONS
22576 rm -rf *
22577
22578 ckmtime || exit 77
22579
22580 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22581
22582 echo Create directories
22583
22584 mkdir tart
22585 sleep 1
22586 mkdir tart/c0
22587 sleep 1
22588 mkdir tart/c1
22589 sleep 1
22590
22591 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
22592 do
22593   echo File \$file > \$file
22594   sleep 1
22595 done
22596
22597 sleep 1
22598 echo Creating main archive
22599 echo >&2 \"Creating main archive\"
22600 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
22601
22602 # The above prints two lines to stderr announcing the new directories c0 and c1.
22603 # Ensure that they appear in this script's stderr in sorted order.
22604 sort err 1>&2; rm -f err
22605
22606 sleep 1
22607 echo Modifying filesystem
22608 rm tart/a1
22609
22610 mv tart/b1 tart/b2
22611 mv tart/c1 tart/c2
22612 touch tart/c2/ca3
22613
22614 echo Directory contents
22615 find tart -print | sort 2>/dev/null
22616
22617 sleep 1
22618 echo Creating incremental archive
22619 echo >&2 \"Creating incremental archive\"
22620 cp -p tart.incr1 tart.incr2
22621 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
22622
22623 sleep 1
22624
22625 rm -rf tart/*
22626 echo Extracting main archive
22627 echo >&2 \"Extracting main archive\"
22628 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
22629 echo Extracting incremental archive
22630 # This command should produce three messages about deletion
22631 # of the existing files, that may appear in any order. Piping
22632 # to sort makes sure we don't depend on any particular ordering.
22633 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
22634
22635 echo Final files:
22636 find tart -print | sort 2>/dev/null
22637 )"
22638 at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:32"
22639 ( $at_check_trace;
22640 mkdir gnu
22641 (cd gnu
22642 TEST_TAR_FORMAT=gnu
22643 export TEST_TAR_FORMAT
22644 TAR_OPTIONS="-H gnu"
22645 export TAR_OPTIONS
22646 rm -rf *
22647
22648 ckmtime || exit 77
22649
22650 test -z "`sort < /dev/null 2>&1`" || exit 77
22651
22652 echo Create directories
22653
22654 mkdir tart
22655 sleep 1
22656 mkdir tart/c0
22657 sleep 1
22658 mkdir tart/c1
22659 sleep 1
22660
22661 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
22662 do
22663   echo File $file > $file
22664   sleep 1
22665 done
22666
22667 sleep 1
22668 echo Creating main archive
22669 echo >&2 "Creating main archive"
22670 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
22671
22672 # The above prints two lines to stderr announcing the new directories c0 and c1.
22673 # Ensure that they appear in this script's stderr in sorted order.
22674 sort err 1>&2; rm -f err
22675
22676 sleep 1
22677 echo Modifying filesystem
22678 rm tart/a1
22679
22680 mv tart/b1 tart/b2
22681 mv tart/c1 tart/c2
22682 touch tart/c2/ca3
22683
22684 echo Directory contents
22685 find tart -print | sort 2>/dev/null
22686
22687 sleep 1
22688 echo Creating incremental archive
22689 echo >&2 "Creating incremental archive"
22690 cp -p tart.incr1 tart.incr2
22691 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
22692
22693 sleep 1
22694
22695 rm -rf tart/*
22696 echo Extracting main archive
22697 echo >&2 "Extracting main archive"
22698 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
22699 echo Extracting incremental archive
22700 # This command should produce three messages about deletion
22701 # of the existing files, that may appear in any order. Piping
22702 # to sort makes sure we don't depend on any particular ordering.
22703 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
22704
22705 echo Final files:
22706 find tart -print | sort 2>/dev/null
22707 )
22708 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22709 at_status=$? at_failed=false
22710 $at_check_filter
22711 echo >>"$at_stderr"; $as_echo "Creating main archive
22712 tar: tart/c0: Directory is new
22713 tar: tart/c1: Directory is new
22714 tar: tart: Directory is new
22715 Creating incremental archive
22716 tar: tart/c2: Directory has been renamed from 'tart/c1'
22717 Extracting main archive
22718 " | \
22719   $at_diff - "$at_stderr" || at_failed=:
22720 echo >>"$at_stdout"; $as_echo "Create directories
22721 Creating main archive
22722 tart/
22723 tart/c0/
22724 tart/c1/
22725 tart/a1
22726 tart/b1
22727 tart/c0/cq1
22728 tart/c0/cq2
22729 tart/c1/ca1
22730 tart/c1/ca2
22731 Modifying filesystem
22732 Directory contents
22733 tart
22734 tart/b2
22735 tart/c0
22736 tart/c0/cq1
22737 tart/c0/cq2
22738 tart/c2
22739 tart/c2/ca1
22740 tart/c2/ca2
22741 tart/c2/ca3
22742 Creating incremental archive
22743 tart/
22744 tart/c0/
22745 tart/c2/
22746 tart/b2
22747 tart/c2/ca3
22748 Extracting main archive
22749 tart/
22750 tart/c0/
22751 tart/c1/
22752 tart/a1
22753 tart/b1
22754 tart/c0/cq1
22755 tart/c0/cq2
22756 tart/c1/ca1
22757 tart/c1/ca2
22758 Extracting incremental archive
22759 tar: Deleting 'tart/a1'
22760 tar: Deleting 'tart/b1'
22761 tart/
22762 tart/b2
22763 tart/c0/
22764 tart/c2/
22765 tart/c2/ca3
22766 Final files:
22767 tart
22768 tart/b2
22769 tart/c0
22770 tart/c0/cq1
22771 tart/c0/cq2
22772 tart/c2
22773 tart/c2/ca1
22774 tart/c2/ca2
22775 tart/c2/ca3
22776 " | \
22777   $at_diff - "$at_stdout" || at_failed=:
22778 at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:32"
22779 $at_failed && at_fn_log_failure
22780 $at_traceon; }
22781
22782               { set +x
22783 $as_echo "$at_srcdir/listed02.at:32:
22784 mkdir oldgnu
22785 (cd oldgnu
22786 TEST_TAR_FORMAT=oldgnu
22787 export TEST_TAR_FORMAT
22788 TAR_OPTIONS=\"-H oldgnu\"
22789 export TAR_OPTIONS
22790 rm -rf *
22791
22792 ckmtime || exit 77
22793
22794 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22795
22796 echo Create directories
22797
22798 mkdir tart
22799 sleep 1
22800 mkdir tart/c0
22801 sleep 1
22802 mkdir tart/c1
22803 sleep 1
22804
22805 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
22806 do
22807   echo File \$file > \$file
22808   sleep 1
22809 done
22810
22811 sleep 1
22812 echo Creating main archive
22813 echo >&2 \"Creating main archive\"
22814 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
22815
22816 # The above prints two lines to stderr announcing the new directories c0 and c1.
22817 # Ensure that they appear in this script's stderr in sorted order.
22818 sort err 1>&2; rm -f err
22819
22820 sleep 1
22821 echo Modifying filesystem
22822 rm tart/a1
22823
22824 mv tart/b1 tart/b2
22825 mv tart/c1 tart/c2
22826 touch tart/c2/ca3
22827
22828 echo Directory contents
22829 find tart -print | sort 2>/dev/null
22830
22831 sleep 1
22832 echo Creating incremental archive
22833 echo >&2 \"Creating incremental archive\"
22834 cp -p tart.incr1 tart.incr2
22835 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
22836
22837 sleep 1
22838
22839 rm -rf tart/*
22840 echo Extracting main archive
22841 echo >&2 \"Extracting main archive\"
22842 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
22843 echo Extracting incremental archive
22844 # This command should produce three messages about deletion
22845 # of the existing files, that may appear in any order. Piping
22846 # to sort makes sure we don't depend on any particular ordering.
22847 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
22848
22849 echo Final files:
22850 find tart -print | sort 2>/dev/null
22851 )"
22852 at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:32"
22853 ( $at_check_trace;
22854 mkdir oldgnu
22855 (cd oldgnu
22856 TEST_TAR_FORMAT=oldgnu
22857 export TEST_TAR_FORMAT
22858 TAR_OPTIONS="-H oldgnu"
22859 export TAR_OPTIONS
22860 rm -rf *
22861
22862 ckmtime || exit 77
22863
22864 test -z "`sort < /dev/null 2>&1`" || exit 77
22865
22866 echo Create directories
22867
22868 mkdir tart
22869 sleep 1
22870 mkdir tart/c0
22871 sleep 1
22872 mkdir tart/c1
22873 sleep 1
22874
22875 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
22876 do
22877   echo File $file > $file
22878   sleep 1
22879 done
22880
22881 sleep 1
22882 echo Creating main archive
22883 echo >&2 "Creating main archive"
22884 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
22885
22886 # The above prints two lines to stderr announcing the new directories c0 and c1.
22887 # Ensure that they appear in this script's stderr in sorted order.
22888 sort err 1>&2; rm -f err
22889
22890 sleep 1
22891 echo Modifying filesystem
22892 rm tart/a1
22893
22894 mv tart/b1 tart/b2
22895 mv tart/c1 tart/c2
22896 touch tart/c2/ca3
22897
22898 echo Directory contents
22899 find tart -print | sort 2>/dev/null
22900
22901 sleep 1
22902 echo Creating incremental archive
22903 echo >&2 "Creating incremental archive"
22904 cp -p tart.incr1 tart.incr2
22905 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
22906
22907 sleep 1
22908
22909 rm -rf tart/*
22910 echo Extracting main archive
22911 echo >&2 "Extracting main archive"
22912 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
22913 echo Extracting incremental archive
22914 # This command should produce three messages about deletion
22915 # of the existing files, that may appear in any order. Piping
22916 # to sort makes sure we don't depend on any particular ordering.
22917 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
22918
22919 echo Final files:
22920 find tart -print | sort 2>/dev/null
22921 )
22922 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22923 at_status=$? at_failed=false
22924 $at_check_filter
22925 echo >>"$at_stderr"; $as_echo "Creating main archive
22926 tar: tart/c0: Directory is new
22927 tar: tart/c1: Directory is new
22928 tar: tart: Directory is new
22929 Creating incremental archive
22930 tar: tart/c2: Directory has been renamed from 'tart/c1'
22931 Extracting main archive
22932 " | \
22933   $at_diff - "$at_stderr" || at_failed=:
22934 echo >>"$at_stdout"; $as_echo "Create directories
22935 Creating main archive
22936 tart/
22937 tart/c0/
22938 tart/c1/
22939 tart/a1
22940 tart/b1
22941 tart/c0/cq1
22942 tart/c0/cq2
22943 tart/c1/ca1
22944 tart/c1/ca2
22945 Modifying filesystem
22946 Directory contents
22947 tart
22948 tart/b2
22949 tart/c0
22950 tart/c0/cq1
22951 tart/c0/cq2
22952 tart/c2
22953 tart/c2/ca1
22954 tart/c2/ca2
22955 tart/c2/ca3
22956 Creating incremental archive
22957 tart/
22958 tart/c0/
22959 tart/c2/
22960 tart/b2
22961 tart/c2/ca3
22962 Extracting main archive
22963 tart/
22964 tart/c0/
22965 tart/c1/
22966 tart/a1
22967 tart/b1
22968 tart/c0/cq1
22969 tart/c0/cq2
22970 tart/c1/ca1
22971 tart/c1/ca2
22972 Extracting incremental archive
22973 tar: Deleting 'tart/a1'
22974 tar: Deleting 'tart/b1'
22975 tart/
22976 tart/b2
22977 tart/c0/
22978 tart/c2/
22979 tart/c2/ca3
22980 Final files:
22981 tart
22982 tart/b2
22983 tart/c0
22984 tart/c0/cq1
22985 tart/c0/cq2
22986 tart/c2
22987 tart/c2/ca1
22988 tart/c2/ca2
22989 tart/c2/ca3
22990 " | \
22991   $at_diff - "$at_stdout" || at_failed=:
22992 at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:32"
22993 $at_failed && at_fn_log_failure
22994 $at_traceon; }
22995
22996
22997
22998
22999   set +x
23000   $at_times_p && times >"$at_times_file"
23001 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23002 read at_status <"$at_status_file"
23003 #AT_STOP_93
23004 #AT_START_94
23005 at_fn_group_banner 94 'listed03.at:24' \
23006   "incremental dump when the parent directory is unreadable" "" 11
23007 at_xfail=no
23008       test -f $XFAILFILE && at_xfail=yes
23009 (
23010   $as_echo "94. $at_setup_line: testing $at_desc ..."
23011   $at_traceon
23012
23013
23014
23015
23016
23017   { set +x
23018 $as_echo "$at_srcdir/listed03.at:27:
23019 mkdir gnu
23020 (cd gnu
23021 TEST_TAR_FORMAT=gnu
23022 export TEST_TAR_FORMAT
23023 TAR_OPTIONS=\"-H gnu\"
23024 export TAR_OPTIONS
23025 rm -rf *
23026
23027 ckmtime || exit 77
23028
23029 echo \"test\" > \$\$
23030 chmod 0 \$\$
23031 cat \$\$ > /dev/null 2>&1
23032 result=\$?
23033 rm -f \$\$
23034 test \$result -eq 0 && exit 77
23035
23036
23037 mkdir dir
23038 mkdir dir/sub
23039 mkdir dir/sub/a
23040 genfile --file dir/sub/a/file
23041 cd dir/sub
23042
23043 chmod a-r ..
23044 tar -c -f archive.tar --listed-incremental=db.1 -v a 2>err
23045 status=\$?
23046 chmod a+r ..
23047 if test \$status -eq 2; then
23048   grep '^tar: \\.: Cannot getcwd' err >/dev/null 2>&1 && exit 77
23049 fi
23050 cat err >&2
23051 exit \$status
23052 )"
23053 at_fn_check_prepare_notrace 'an embedded newline' "listed03.at:27"
23054 ( $at_check_trace;
23055 mkdir gnu
23056 (cd gnu
23057 TEST_TAR_FORMAT=gnu
23058 export TEST_TAR_FORMAT
23059 TAR_OPTIONS="-H gnu"
23060 export TAR_OPTIONS
23061 rm -rf *
23062
23063 ckmtime || exit 77
23064
23065 echo "test" > $$
23066 chmod 0 $$
23067 cat $$ > /dev/null 2>&1
23068 result=$?
23069 rm -f $$
23070 test $result -eq 0 && exit 77
23071
23072
23073 mkdir dir
23074 mkdir dir/sub
23075 mkdir dir/sub/a
23076 genfile --file dir/sub/a/file
23077 cd dir/sub
23078
23079 chmod a-r ..
23080 tar -c -f archive.tar --listed-incremental=db.1 -v a 2>err
23081 status=$?
23082 chmod a+r ..
23083 if test $status -eq 2; then
23084   grep '^tar: \.: Cannot getcwd' err >/dev/null 2>&1 && exit 77
23085 fi
23086 cat err >&2
23087 exit $status
23088 )
23089 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23090 at_status=$? at_failed=false
23091 $at_check_filter
23092 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
23093 " | \
23094   $at_diff - "$at_stderr" || at_failed=:
23095 echo >>"$at_stdout"; $as_echo "a/
23096 a/file
23097 " | \
23098   $at_diff - "$at_stdout" || at_failed=:
23099 at_fn_check_status 0 $at_status "$at_srcdir/listed03.at:27"
23100 $at_failed && at_fn_log_failure
23101 $at_traceon; }
23102
23103
23104
23105
23106   set +x
23107   $at_times_p && times >"$at_times_file"
23108 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23109 read at_status <"$at_status_file"
23110 #AT_STOP_94
23111 #AT_START_95
23112 at_fn_group_banner 95 'listed04.at:26' \
23113   "--listed-incremental and --one-file-system" "     " 11
23114 at_xfail=no
23115       test -f $XFAILFILE && at_xfail=yes
23116 (
23117   $as_echo "95. $at_setup_line: testing $at_desc ..."
23118   $at_traceon
23119
23120
23121
23122
23123
23124   { set +x
23125 $as_echo "$at_srcdir/listed04.at:29:
23126 mkdir gnu
23127 (cd gnu
23128 TEST_TAR_FORMAT=gnu
23129 export TEST_TAR_FORMAT
23130 TAR_OPTIONS=\"-H gnu\"
23131 export TAR_OPTIONS
23132 rm -rf *
23133
23134 ckmtime || exit 77
23135 mkdir dir
23136 echo a >dir/a
23137 echo b >dir/b
23138
23139 tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
23140 tar -tf archive.tar || exit
23141 )"
23142 at_fn_check_prepare_notrace 'an embedded newline' "listed04.at:29"
23143 ( $at_check_trace;
23144 mkdir gnu
23145 (cd gnu
23146 TEST_TAR_FORMAT=gnu
23147 export TEST_TAR_FORMAT
23148 TAR_OPTIONS="-H gnu"
23149 export TAR_OPTIONS
23150 rm -rf *
23151
23152 ckmtime || exit 77
23153 mkdir dir
23154 echo a >dir/a
23155 echo b >dir/b
23156
23157 tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
23158 tar -tf archive.tar || exit
23159 )
23160 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23161 at_status=$? at_failed=false
23162 $at_check_filter
23163 echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
23164 " | \
23165   $at_diff - "$at_stderr" || at_failed=:
23166 echo >>"$at_stdout"; $as_echo "dir/
23167 dir/a
23168 dir/b
23169 dir/
23170 dir/a
23171 dir/b
23172 " | \
23173   $at_diff - "$at_stdout" || at_failed=:
23174 at_fn_check_status 0 $at_status "$at_srcdir/listed04.at:29"
23175 $at_failed && at_fn_log_failure
23176 $at_traceon; }
23177
23178
23179
23180
23181   set +x
23182   $at_times_p && times >"$at_times_file"
23183 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23184 read at_status <"$at_status_file"
23185 #AT_STOP_95
23186 #AT_START_96
23187 at_fn_group_banner 96 'listed05.at:33' \
23188   "--listed-incremental and remounted directories" " " 11
23189 at_xfail=no
23190       test -f $XFAILFILE && at_xfail=yes
23191 (
23192   $as_echo "96. $at_setup_line: testing $at_desc ..."
23193   $at_traceon
23194
23195
23196
23197
23198
23199   { set +x
23200 $as_echo "$at_srcdir/listed05.at:36:
23201 mkdir gnu
23202 (cd gnu
23203 TEST_TAR_FORMAT=gnu
23204 export TEST_TAR_FORMAT
23205 TAR_OPTIONS=\"-H gnu\"
23206 export TAR_OPTIONS
23207 rm -rf *
23208
23209 ckmtime || exit 77
23210
23211 echo \"test\" > \$\$
23212 chmod 0 \$\$
23213 cat \$\$ > /dev/null 2>&1
23214 result=\$?
23215 rm -f \$\$
23216 test \$result -eq 0 || exit 77
23217
23218 options=\"-C tartest --create --one-file-system --verbose\"
23219 rm -rf archive-01.snar archive-01.tar tartest subdir
23220
23221 # Create initial structure
23222 mkdir tartest
23223 echo \"hi\" > tartest/top-level-file
23224 mkdir tartest/subdir
23225 echo \"hi\" > tartest/subdir/subdir-file
23226
23227 echo \"# Level 0\"
23228 tar \$options --file archive-0.tar --listed-incremental=archive-0.snar .
23229
23230 echo \"# Remount\"
23231 mv tartest/subdir .
23232 mkdir tartest/subdir
23233 mount -t ramfs none tartest/subdir || exit 77
23234 tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
23235
23236 echo \"# Level 1\"
23237 cp archive-0.snar archive-1.snar
23238 tar \$options --file archive-1.tar --listed-incremental=archive-1.snar .
23239
23240 umount tartest/subdir
23241 )"
23242 at_fn_check_prepare_notrace 'an embedded newline' "listed05.at:36"
23243 ( $at_check_trace;
23244 mkdir gnu
23245 (cd gnu
23246 TEST_TAR_FORMAT=gnu
23247 export TEST_TAR_FORMAT
23248 TAR_OPTIONS="-H gnu"
23249 export TAR_OPTIONS
23250 rm -rf *
23251
23252 ckmtime || exit 77
23253
23254 echo "test" > $$
23255 chmod 0 $$
23256 cat $$ > /dev/null 2>&1
23257 result=$?
23258 rm -f $$
23259 test $result -eq 0 || exit 77
23260
23261 options="-C tartest --create --one-file-system --verbose"
23262 rm -rf archive-01.snar archive-01.tar tartest subdir
23263
23264 # Create initial structure
23265 mkdir tartest
23266 echo "hi" > tartest/top-level-file
23267 mkdir tartest/subdir
23268 echo "hi" > tartest/subdir/subdir-file
23269
23270 echo "# Level 0"
23271 tar $options --file archive-0.tar --listed-incremental=archive-0.snar .
23272
23273 echo "# Remount"
23274 mv tartest/subdir .
23275 mkdir tartest/subdir
23276 mount -t ramfs none tartest/subdir || exit 77
23277 tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
23278
23279 echo "# Level 1"
23280 cp archive-0.snar archive-1.snar
23281 tar $options --file archive-1.tar --listed-incremental=archive-1.snar .
23282
23283 umount tartest/subdir
23284 )
23285 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23286 at_status=$? at_failed=false
23287 $at_check_filter
23288 echo >>"$at_stderr"; $as_echo "tar: .: Directory is new
23289 tar: ./subdir: Directory is new
23290 tar: ./subdir: directory is on a different filesystem; not dumped
23291 " | \
23292   $at_diff - "$at_stderr" || at_failed=:
23293 echo >>"$at_stdout"; $as_echo "# Level 0
23294 ./
23295 ./subdir/
23296 ./top-level-file
23297 ./subdir/subdir-file
23298 # Remount
23299 # Level 1
23300 ./
23301 ./subdir/
23302 " | \
23303   $at_diff - "$at_stdout" || at_failed=:
23304 at_fn_check_status 0 $at_status "$at_srcdir/listed05.at:36"
23305 $at_failed && at_fn_log_failure
23306 $at_traceon; }
23307
23308
23309
23310
23311   set +x
23312   $at_times_p && times >"$at_times_file"
23313 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23314 read at_status <"$at_status_file"
23315 #AT_STOP_96
23316 #AT_START_97
23317 at_fn_group_banner 97 'incr03.at:29' \
23318   "renamed files in incrementals" "                  " 11
23319 at_xfail=no
23320       test -f $XFAILFILE && at_xfail=yes
23321 (
23322   $as_echo "97. $at_setup_line: testing $at_desc ..."
23323   $at_traceon
23324
23325
23326
23327
23328
23329   { set +x
23330 $as_echo "$at_srcdir/incr03.at:32:
23331 mkdir gnu
23332 (cd gnu
23333 TEST_TAR_FORMAT=gnu
23334 export TEST_TAR_FORMAT
23335 TAR_OPTIONS=\"-H gnu\"
23336 export TAR_OPTIONS
23337 rm -rf *
23338
23339 ckmtime || exit 77
23340
23341 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23342
23343 mkdir directory
23344 genfile --file=directory/x
23345 genfile --file=directory/y
23346
23347 sleep 1
23348
23349 tar -cf archive.1 -g db directory
23350
23351 mv directory/x directory/z
23352 cp db db.old
23353 tar -cf archive.2 -g db directory
23354
23355 mv directory orig
23356
23357 echo Listing of archive.1
23358 tar -tf archive.1 | sort
23359 echo Listing of archive.2
23360 tar -tf archive.2 | sort
23361
23362 echo Directory after first restore
23363 tar -xf archive.1 -g db --warning=no-timestamp
23364 find directory | sort
23365
23366 echo Directory after second restore
23367 tar -xf archive.2 -g db --warning=no-timestamp
23368 find directory | sort
23369 )"
23370 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32"
23371 ( $at_check_trace;
23372 mkdir gnu
23373 (cd gnu
23374 TEST_TAR_FORMAT=gnu
23375 export TEST_TAR_FORMAT
23376 TAR_OPTIONS="-H gnu"
23377 export TAR_OPTIONS
23378 rm -rf *
23379
23380 ckmtime || exit 77
23381
23382 test -z "`sort < /dev/null 2>&1`" || exit 77
23383
23384 mkdir directory
23385 genfile --file=directory/x
23386 genfile --file=directory/y
23387
23388 sleep 1
23389
23390 tar -cf archive.1 -g db directory
23391
23392 mv directory/x directory/z
23393 cp db db.old
23394 tar -cf archive.2 -g db directory
23395
23396 mv directory orig
23397
23398 echo Listing of archive.1
23399 tar -tf archive.1 | sort
23400 echo Listing of archive.2
23401 tar -tf archive.2 | sort
23402
23403 echo Directory after first restore
23404 tar -xf archive.1 -g db --warning=no-timestamp
23405 find directory | sort
23406
23407 echo Directory after second restore
23408 tar -xf archive.2 -g db --warning=no-timestamp
23409 find directory | sort
23410 )
23411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23412 at_status=$? at_failed=false
23413 $at_check_filter
23414 at_fn_diff_devnull "$at_stderr" || at_failed=:
23415 echo >>"$at_stdout"; $as_echo "Listing of archive.1
23416 directory/
23417 directory/x
23418 directory/y
23419 Listing of archive.2
23420 directory/
23421 directory/z
23422 Directory after first restore
23423 directory
23424 directory/x
23425 directory/y
23426 Directory after second restore
23427 directory
23428 directory/y
23429 directory/z
23430 " | \
23431   $at_diff - "$at_stdout" || at_failed=:
23432 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32"
23433 $at_failed && at_fn_log_failure
23434 $at_traceon; }
23435
23436               { set +x
23437 $as_echo "$at_srcdir/incr03.at:32:
23438 mkdir oldgnu
23439 (cd oldgnu
23440 TEST_TAR_FORMAT=oldgnu
23441 export TEST_TAR_FORMAT
23442 TAR_OPTIONS=\"-H oldgnu\"
23443 export TAR_OPTIONS
23444 rm -rf *
23445
23446 ckmtime || exit 77
23447
23448 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23449
23450 mkdir directory
23451 genfile --file=directory/x
23452 genfile --file=directory/y
23453
23454 sleep 1
23455
23456 tar -cf archive.1 -g db directory
23457
23458 mv directory/x directory/z
23459 cp db db.old
23460 tar -cf archive.2 -g db directory
23461
23462 mv directory orig
23463
23464 echo Listing of archive.1
23465 tar -tf archive.1 | sort
23466 echo Listing of archive.2
23467 tar -tf archive.2 | sort
23468
23469 echo Directory after first restore
23470 tar -xf archive.1 -g db --warning=no-timestamp
23471 find directory | sort
23472
23473 echo Directory after second restore
23474 tar -xf archive.2 -g db --warning=no-timestamp
23475 find directory | sort
23476 )"
23477 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32"
23478 ( $at_check_trace;
23479 mkdir oldgnu
23480 (cd oldgnu
23481 TEST_TAR_FORMAT=oldgnu
23482 export TEST_TAR_FORMAT
23483 TAR_OPTIONS="-H oldgnu"
23484 export TAR_OPTIONS
23485 rm -rf *
23486
23487 ckmtime || exit 77
23488
23489 test -z "`sort < /dev/null 2>&1`" || exit 77
23490
23491 mkdir directory
23492 genfile --file=directory/x
23493 genfile --file=directory/y
23494
23495 sleep 1
23496
23497 tar -cf archive.1 -g db directory
23498
23499 mv directory/x directory/z
23500 cp db db.old
23501 tar -cf archive.2 -g db directory
23502
23503 mv directory orig
23504
23505 echo Listing of archive.1
23506 tar -tf archive.1 | sort
23507 echo Listing of archive.2
23508 tar -tf archive.2 | sort
23509
23510 echo Directory after first restore
23511 tar -xf archive.1 -g db --warning=no-timestamp
23512 find directory | sort
23513
23514 echo Directory after second restore
23515 tar -xf archive.2 -g db --warning=no-timestamp
23516 find directory | sort
23517 )
23518 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23519 at_status=$? at_failed=false
23520 $at_check_filter
23521 at_fn_diff_devnull "$at_stderr" || at_failed=:
23522 echo >>"$at_stdout"; $as_echo "Listing of archive.1
23523 directory/
23524 directory/x
23525 directory/y
23526 Listing of archive.2
23527 directory/
23528 directory/z
23529 Directory after first restore
23530 directory
23531 directory/x
23532 directory/y
23533 Directory after second restore
23534 directory
23535 directory/y
23536 directory/z
23537 " | \
23538   $at_diff - "$at_stdout" || at_failed=:
23539 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32"
23540 $at_failed && at_fn_log_failure
23541 $at_traceon; }
23542
23543               { set +x
23544 $as_echo "$at_srcdir/incr03.at:32:
23545 mkdir posix
23546 (cd posix
23547 TEST_TAR_FORMAT=posix
23548 export TEST_TAR_FORMAT
23549 TAR_OPTIONS=\"-H posix\"
23550 export TAR_OPTIONS
23551 rm -rf *
23552
23553 ckmtime || exit 77
23554
23555 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23556
23557 mkdir directory
23558 genfile --file=directory/x
23559 genfile --file=directory/y
23560
23561 sleep 1
23562
23563 tar -cf archive.1 -g db directory
23564
23565 mv directory/x directory/z
23566 cp db db.old
23567 tar -cf archive.2 -g db directory
23568
23569 mv directory orig
23570
23571 echo Listing of archive.1
23572 tar -tf archive.1 | sort
23573 echo Listing of archive.2
23574 tar -tf archive.2 | sort
23575
23576 echo Directory after first restore
23577 tar -xf archive.1 -g db --warning=no-timestamp
23578 find directory | sort
23579
23580 echo Directory after second restore
23581 tar -xf archive.2 -g db --warning=no-timestamp
23582 find directory | sort
23583 )"
23584 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:32"
23585 ( $at_check_trace;
23586 mkdir posix
23587 (cd posix
23588 TEST_TAR_FORMAT=posix
23589 export TEST_TAR_FORMAT
23590 TAR_OPTIONS="-H posix"
23591 export TAR_OPTIONS
23592 rm -rf *
23593
23594 ckmtime || exit 77
23595
23596 test -z "`sort < /dev/null 2>&1`" || exit 77
23597
23598 mkdir directory
23599 genfile --file=directory/x
23600 genfile --file=directory/y
23601
23602 sleep 1
23603
23604 tar -cf archive.1 -g db directory
23605
23606 mv directory/x directory/z
23607 cp db db.old
23608 tar -cf archive.2 -g db directory
23609
23610 mv directory orig
23611
23612 echo Listing of archive.1
23613 tar -tf archive.1 | sort
23614 echo Listing of archive.2
23615 tar -tf archive.2 | sort
23616
23617 echo Directory after first restore
23618 tar -xf archive.1 -g db --warning=no-timestamp
23619 find directory | sort
23620
23621 echo Directory after second restore
23622 tar -xf archive.2 -g db --warning=no-timestamp
23623 find directory | sort
23624 )
23625 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23626 at_status=$? at_failed=false
23627 $at_check_filter
23628 at_fn_diff_devnull "$at_stderr" || at_failed=:
23629 echo >>"$at_stdout"; $as_echo "Listing of archive.1
23630 directory/
23631 directory/x
23632 directory/y
23633 Listing of archive.2
23634 directory/
23635 directory/z
23636 Directory after first restore
23637 directory
23638 directory/x
23639 directory/y
23640 Directory after second restore
23641 directory
23642 directory/y
23643 directory/z
23644 " | \
23645   $at_diff - "$at_stdout" || at_failed=:
23646 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:32"
23647 $at_failed && at_fn_log_failure
23648 $at_traceon; }
23649
23650
23651
23652
23653   set +x
23654   $at_times_p && times >"$at_times_file"
23655 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23656 read at_status <"$at_status_file"
23657 #AT_STOP_97
23658 #AT_START_98
23659 at_fn_group_banner 98 'incr04.at:30' \
23660   "proper icontents initialization" "                " 11
23661 at_xfail=no
23662       test -f $XFAILFILE && at_xfail=yes
23663 (
23664   $as_echo "98. $at_setup_line: testing $at_desc ..."
23665   $at_traceon
23666
23667
23668
23669
23670
23671
23672
23673   { set +x
23674 $as_echo "$at_srcdir/incr04.at:35:
23675 mkdir gnu
23676 (cd gnu
23677 TEST_TAR_FORMAT=gnu
23678 export TEST_TAR_FORMAT
23679 TAR_OPTIONS=\"-H gnu\"
23680 export TAR_OPTIONS
23681 rm -rf *
23682
23683 ckmtime || exit 77
23684
23685 install-sh -d a/b >/dev/null  || exit 77
23686 awk 'BEGIN {
23687   for (i=1;i<=142;i++)
23688     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
23689   }' < /dev/null | genfile --files-from -
23690
23691 sleep 1
23692
23693 echo \"Initial dump\"
23694 tar cvf a0.tar -g a.sna a
23695 mv a/b a/c
23696 echo \"Incremental dump\"
23697 tar cvf a1.tar -g a.sna a
23698 )"
23699 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35"
23700 ( $at_check_trace;
23701 mkdir gnu
23702 (cd gnu
23703 TEST_TAR_FORMAT=gnu
23704 export TEST_TAR_FORMAT
23705 TAR_OPTIONS="-H gnu"
23706 export TAR_OPTIONS
23707 rm -rf *
23708
23709 ckmtime || exit 77
23710
23711 install-sh -d a/b >/dev/null  || exit 77
23712 awk 'BEGIN {
23713   for (i=1;i<=142;i++)
23714     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
23715   }' < /dev/null | genfile --files-from -
23716
23717 sleep 1
23718
23719 echo "Initial dump"
23720 tar cvf a0.tar -g a.sna a
23721 mv a/b a/c
23722 echo "Incremental dump"
23723 tar cvf a1.tar -g a.sna a
23724 )
23725 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23726 at_status=$? at_failed=false
23727 $at_check_filter
23728 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
23729 tar: a/b: Directory is new
23730 tar: a/c: Directory has been renamed from 'a/b'
23731 " | \
23732   $at_diff - "$at_stderr" || at_failed=:
23733 echo >>"$at_stdout"; $as_echo "Initial dump
23734 a/
23735 a/b/
23736 a/b/one_31_chars_long_file_name_001
23737 a/b/one_31_chars_long_file_name_002
23738 a/b/one_31_chars_long_file_name_003
23739 a/b/one_31_chars_long_file_name_004
23740 a/b/one_31_chars_long_file_name_005
23741 a/b/one_31_chars_long_file_name_006
23742 a/b/one_31_chars_long_file_name_007
23743 a/b/one_31_chars_long_file_name_008
23744 a/b/one_31_chars_long_file_name_009
23745 a/b/one_31_chars_long_file_name_010
23746 a/b/one_31_chars_long_file_name_011
23747 a/b/one_31_chars_long_file_name_012
23748 a/b/one_31_chars_long_file_name_013
23749 a/b/one_31_chars_long_file_name_014
23750 a/b/one_31_chars_long_file_name_015
23751 a/b/one_31_chars_long_file_name_016
23752 a/b/one_31_chars_long_file_name_017
23753 a/b/one_31_chars_long_file_name_018
23754 a/b/one_31_chars_long_file_name_019
23755 a/b/one_31_chars_long_file_name_020
23756 a/b/one_31_chars_long_file_name_021
23757 a/b/one_31_chars_long_file_name_022
23758 a/b/one_31_chars_long_file_name_023
23759 a/b/one_31_chars_long_file_name_024
23760 a/b/one_31_chars_long_file_name_025
23761 a/b/one_31_chars_long_file_name_026
23762 a/b/one_31_chars_long_file_name_027
23763 a/b/one_31_chars_long_file_name_028
23764 a/b/one_31_chars_long_file_name_029
23765 a/b/one_31_chars_long_file_name_030
23766 a/b/one_31_chars_long_file_name_031
23767 a/b/one_31_chars_long_file_name_032
23768 a/b/one_31_chars_long_file_name_033
23769 a/b/one_31_chars_long_file_name_034
23770 a/b/one_31_chars_long_file_name_035
23771 a/b/one_31_chars_long_file_name_036
23772 a/b/one_31_chars_long_file_name_037
23773 a/b/one_31_chars_long_file_name_038
23774 a/b/one_31_chars_long_file_name_039
23775 a/b/one_31_chars_long_file_name_040
23776 a/b/one_31_chars_long_file_name_041
23777 a/b/one_31_chars_long_file_name_042
23778 a/b/one_31_chars_long_file_name_043
23779 a/b/one_31_chars_long_file_name_044
23780 a/b/one_31_chars_long_file_name_045
23781 a/b/one_31_chars_long_file_name_046
23782 a/b/one_31_chars_long_file_name_047
23783 a/b/one_31_chars_long_file_name_048
23784 a/b/one_31_chars_long_file_name_049
23785 a/b/one_31_chars_long_file_name_050
23786 a/b/one_31_chars_long_file_name_051
23787 a/b/one_31_chars_long_file_name_052
23788 a/b/one_31_chars_long_file_name_053
23789 a/b/one_31_chars_long_file_name_054
23790 a/b/one_31_chars_long_file_name_055
23791 a/b/one_31_chars_long_file_name_056
23792 a/b/one_31_chars_long_file_name_057
23793 a/b/one_31_chars_long_file_name_058
23794 a/b/one_31_chars_long_file_name_059
23795 a/b/one_31_chars_long_file_name_060
23796 a/b/one_31_chars_long_file_name_061
23797 a/b/one_31_chars_long_file_name_062
23798 a/b/one_31_chars_long_file_name_063
23799 a/b/one_31_chars_long_file_name_064
23800 a/b/one_31_chars_long_file_name_065
23801 a/b/one_31_chars_long_file_name_066
23802 a/b/one_31_chars_long_file_name_067
23803 a/b/one_31_chars_long_file_name_068
23804 a/b/one_31_chars_long_file_name_069
23805 a/b/one_31_chars_long_file_name_070
23806 a/b/one_31_chars_long_file_name_071
23807 a/b/one_31_chars_long_file_name_072
23808 a/b/one_31_chars_long_file_name_073
23809 a/b/one_31_chars_long_file_name_074
23810 a/b/one_31_chars_long_file_name_075
23811 a/b/one_31_chars_long_file_name_076
23812 a/b/one_31_chars_long_file_name_077
23813 a/b/one_31_chars_long_file_name_078
23814 a/b/one_31_chars_long_file_name_079
23815 a/b/one_31_chars_long_file_name_080
23816 a/b/one_31_chars_long_file_name_081
23817 a/b/one_31_chars_long_file_name_082
23818 a/b/one_31_chars_long_file_name_083
23819 a/b/one_31_chars_long_file_name_084
23820 a/b/one_31_chars_long_file_name_085
23821 a/b/one_31_chars_long_file_name_086
23822 a/b/one_31_chars_long_file_name_087
23823 a/b/one_31_chars_long_file_name_088
23824 a/b/one_31_chars_long_file_name_089
23825 a/b/one_31_chars_long_file_name_090
23826 a/b/one_31_chars_long_file_name_091
23827 a/b/one_31_chars_long_file_name_092
23828 a/b/one_31_chars_long_file_name_093
23829 a/b/one_31_chars_long_file_name_094
23830 a/b/one_31_chars_long_file_name_095
23831 a/b/one_31_chars_long_file_name_096
23832 a/b/one_31_chars_long_file_name_097
23833 a/b/one_31_chars_long_file_name_098
23834 a/b/one_31_chars_long_file_name_099
23835 a/b/one_31_chars_long_file_name_100
23836 a/b/one_31_chars_long_file_name_101
23837 a/b/one_31_chars_long_file_name_102
23838 a/b/one_31_chars_long_file_name_103
23839 a/b/one_31_chars_long_file_name_104
23840 a/b/one_31_chars_long_file_name_105
23841 a/b/one_31_chars_long_file_name_106
23842 a/b/one_31_chars_long_file_name_107
23843 a/b/one_31_chars_long_file_name_108
23844 a/b/one_31_chars_long_file_name_109
23845 a/b/one_31_chars_long_file_name_110
23846 a/b/one_31_chars_long_file_name_111
23847 a/b/one_31_chars_long_file_name_112
23848 a/b/one_31_chars_long_file_name_113
23849 a/b/one_31_chars_long_file_name_114
23850 a/b/one_31_chars_long_file_name_115
23851 a/b/one_31_chars_long_file_name_116
23852 a/b/one_31_chars_long_file_name_117
23853 a/b/one_31_chars_long_file_name_118
23854 a/b/one_31_chars_long_file_name_119
23855 a/b/one_31_chars_long_file_name_120
23856 a/b/one_31_chars_long_file_name_121
23857 a/b/one_31_chars_long_file_name_122
23858 a/b/one_31_chars_long_file_name_123
23859 a/b/one_31_chars_long_file_name_124
23860 a/b/one_31_chars_long_file_name_125
23861 a/b/one_31_chars_long_file_name_126
23862 a/b/one_31_chars_long_file_name_127
23863 a/b/one_31_chars_long_file_name_128
23864 a/b/one_31_chars_long_file_name_129
23865 a/b/one_31_chars_long_file_name_130
23866 a/b/one_31_chars_long_file_name_131
23867 a/b/one_31_chars_long_file_name_132
23868 a/b/one_31_chars_long_file_name_133
23869 a/b/one_31_chars_long_file_name_134
23870 a/b/one_31_chars_long_file_name_135
23871 a/b/one_31_chars_long_file_name_136
23872 a/b/one_31_chars_long_file_name_137
23873 a/b/one_31_chars_long_file_name_138
23874 a/b/one_31_chars_long_file_name_139
23875 a/b/one_31_chars_long_file_name_140
23876 a/b/one_31_chars_long_file_name_141
23877 a/b/one_31_chars_long_file_name_142
23878 Incremental dump
23879 a/
23880 a/c/
23881 " | \
23882   $at_diff - "$at_stdout" || at_failed=:
23883 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35"
23884 $at_failed && at_fn_log_failure
23885 $at_traceon; }
23886
23887               { set +x
23888 $as_echo "$at_srcdir/incr04.at:35:
23889 mkdir oldgnu
23890 (cd oldgnu
23891 TEST_TAR_FORMAT=oldgnu
23892 export TEST_TAR_FORMAT
23893 TAR_OPTIONS=\"-H oldgnu\"
23894 export TAR_OPTIONS
23895 rm -rf *
23896
23897 ckmtime || exit 77
23898
23899 install-sh -d a/b >/dev/null  || exit 77
23900 awk 'BEGIN {
23901   for (i=1;i<=142;i++)
23902     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
23903   }' < /dev/null | genfile --files-from -
23904
23905 sleep 1
23906
23907 echo \"Initial dump\"
23908 tar cvf a0.tar -g a.sna a
23909 mv a/b a/c
23910 echo \"Incremental dump\"
23911 tar cvf a1.tar -g a.sna a
23912 )"
23913 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35"
23914 ( $at_check_trace;
23915 mkdir oldgnu
23916 (cd oldgnu
23917 TEST_TAR_FORMAT=oldgnu
23918 export TEST_TAR_FORMAT
23919 TAR_OPTIONS="-H oldgnu"
23920 export TAR_OPTIONS
23921 rm -rf *
23922
23923 ckmtime || exit 77
23924
23925 install-sh -d a/b >/dev/null  || exit 77
23926 awk 'BEGIN {
23927   for (i=1;i<=142;i++)
23928     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
23929   }' < /dev/null | genfile --files-from -
23930
23931 sleep 1
23932
23933 echo "Initial dump"
23934 tar cvf a0.tar -g a.sna a
23935 mv a/b a/c
23936 echo "Incremental dump"
23937 tar cvf a1.tar -g a.sna a
23938 )
23939 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23940 at_status=$? at_failed=false
23941 $at_check_filter
23942 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
23943 tar: a/b: Directory is new
23944 tar: a/c: Directory has been renamed from 'a/b'
23945 " | \
23946   $at_diff - "$at_stderr" || at_failed=:
23947 echo >>"$at_stdout"; $as_echo "Initial dump
23948 a/
23949 a/b/
23950 a/b/one_31_chars_long_file_name_001
23951 a/b/one_31_chars_long_file_name_002
23952 a/b/one_31_chars_long_file_name_003
23953 a/b/one_31_chars_long_file_name_004
23954 a/b/one_31_chars_long_file_name_005
23955 a/b/one_31_chars_long_file_name_006
23956 a/b/one_31_chars_long_file_name_007
23957 a/b/one_31_chars_long_file_name_008
23958 a/b/one_31_chars_long_file_name_009
23959 a/b/one_31_chars_long_file_name_010
23960 a/b/one_31_chars_long_file_name_011
23961 a/b/one_31_chars_long_file_name_012
23962 a/b/one_31_chars_long_file_name_013
23963 a/b/one_31_chars_long_file_name_014
23964 a/b/one_31_chars_long_file_name_015
23965 a/b/one_31_chars_long_file_name_016
23966 a/b/one_31_chars_long_file_name_017
23967 a/b/one_31_chars_long_file_name_018
23968 a/b/one_31_chars_long_file_name_019
23969 a/b/one_31_chars_long_file_name_020
23970 a/b/one_31_chars_long_file_name_021
23971 a/b/one_31_chars_long_file_name_022
23972 a/b/one_31_chars_long_file_name_023
23973 a/b/one_31_chars_long_file_name_024
23974 a/b/one_31_chars_long_file_name_025
23975 a/b/one_31_chars_long_file_name_026
23976 a/b/one_31_chars_long_file_name_027
23977 a/b/one_31_chars_long_file_name_028
23978 a/b/one_31_chars_long_file_name_029
23979 a/b/one_31_chars_long_file_name_030
23980 a/b/one_31_chars_long_file_name_031
23981 a/b/one_31_chars_long_file_name_032
23982 a/b/one_31_chars_long_file_name_033
23983 a/b/one_31_chars_long_file_name_034
23984 a/b/one_31_chars_long_file_name_035
23985 a/b/one_31_chars_long_file_name_036
23986 a/b/one_31_chars_long_file_name_037
23987 a/b/one_31_chars_long_file_name_038
23988 a/b/one_31_chars_long_file_name_039
23989 a/b/one_31_chars_long_file_name_040
23990 a/b/one_31_chars_long_file_name_041
23991 a/b/one_31_chars_long_file_name_042
23992 a/b/one_31_chars_long_file_name_043
23993 a/b/one_31_chars_long_file_name_044
23994 a/b/one_31_chars_long_file_name_045
23995 a/b/one_31_chars_long_file_name_046
23996 a/b/one_31_chars_long_file_name_047
23997 a/b/one_31_chars_long_file_name_048
23998 a/b/one_31_chars_long_file_name_049
23999 a/b/one_31_chars_long_file_name_050
24000 a/b/one_31_chars_long_file_name_051
24001 a/b/one_31_chars_long_file_name_052
24002 a/b/one_31_chars_long_file_name_053
24003 a/b/one_31_chars_long_file_name_054
24004 a/b/one_31_chars_long_file_name_055
24005 a/b/one_31_chars_long_file_name_056
24006 a/b/one_31_chars_long_file_name_057
24007 a/b/one_31_chars_long_file_name_058
24008 a/b/one_31_chars_long_file_name_059
24009 a/b/one_31_chars_long_file_name_060
24010 a/b/one_31_chars_long_file_name_061
24011 a/b/one_31_chars_long_file_name_062
24012 a/b/one_31_chars_long_file_name_063
24013 a/b/one_31_chars_long_file_name_064
24014 a/b/one_31_chars_long_file_name_065
24015 a/b/one_31_chars_long_file_name_066
24016 a/b/one_31_chars_long_file_name_067
24017 a/b/one_31_chars_long_file_name_068
24018 a/b/one_31_chars_long_file_name_069
24019 a/b/one_31_chars_long_file_name_070
24020 a/b/one_31_chars_long_file_name_071
24021 a/b/one_31_chars_long_file_name_072
24022 a/b/one_31_chars_long_file_name_073
24023 a/b/one_31_chars_long_file_name_074
24024 a/b/one_31_chars_long_file_name_075
24025 a/b/one_31_chars_long_file_name_076
24026 a/b/one_31_chars_long_file_name_077
24027 a/b/one_31_chars_long_file_name_078
24028 a/b/one_31_chars_long_file_name_079
24029 a/b/one_31_chars_long_file_name_080
24030 a/b/one_31_chars_long_file_name_081
24031 a/b/one_31_chars_long_file_name_082
24032 a/b/one_31_chars_long_file_name_083
24033 a/b/one_31_chars_long_file_name_084
24034 a/b/one_31_chars_long_file_name_085
24035 a/b/one_31_chars_long_file_name_086
24036 a/b/one_31_chars_long_file_name_087
24037 a/b/one_31_chars_long_file_name_088
24038 a/b/one_31_chars_long_file_name_089
24039 a/b/one_31_chars_long_file_name_090
24040 a/b/one_31_chars_long_file_name_091
24041 a/b/one_31_chars_long_file_name_092
24042 a/b/one_31_chars_long_file_name_093
24043 a/b/one_31_chars_long_file_name_094
24044 a/b/one_31_chars_long_file_name_095
24045 a/b/one_31_chars_long_file_name_096
24046 a/b/one_31_chars_long_file_name_097
24047 a/b/one_31_chars_long_file_name_098
24048 a/b/one_31_chars_long_file_name_099
24049 a/b/one_31_chars_long_file_name_100
24050 a/b/one_31_chars_long_file_name_101
24051 a/b/one_31_chars_long_file_name_102
24052 a/b/one_31_chars_long_file_name_103
24053 a/b/one_31_chars_long_file_name_104
24054 a/b/one_31_chars_long_file_name_105
24055 a/b/one_31_chars_long_file_name_106
24056 a/b/one_31_chars_long_file_name_107
24057 a/b/one_31_chars_long_file_name_108
24058 a/b/one_31_chars_long_file_name_109
24059 a/b/one_31_chars_long_file_name_110
24060 a/b/one_31_chars_long_file_name_111
24061 a/b/one_31_chars_long_file_name_112
24062 a/b/one_31_chars_long_file_name_113
24063 a/b/one_31_chars_long_file_name_114
24064 a/b/one_31_chars_long_file_name_115
24065 a/b/one_31_chars_long_file_name_116
24066 a/b/one_31_chars_long_file_name_117
24067 a/b/one_31_chars_long_file_name_118
24068 a/b/one_31_chars_long_file_name_119
24069 a/b/one_31_chars_long_file_name_120
24070 a/b/one_31_chars_long_file_name_121
24071 a/b/one_31_chars_long_file_name_122
24072 a/b/one_31_chars_long_file_name_123
24073 a/b/one_31_chars_long_file_name_124
24074 a/b/one_31_chars_long_file_name_125
24075 a/b/one_31_chars_long_file_name_126
24076 a/b/one_31_chars_long_file_name_127
24077 a/b/one_31_chars_long_file_name_128
24078 a/b/one_31_chars_long_file_name_129
24079 a/b/one_31_chars_long_file_name_130
24080 a/b/one_31_chars_long_file_name_131
24081 a/b/one_31_chars_long_file_name_132
24082 a/b/one_31_chars_long_file_name_133
24083 a/b/one_31_chars_long_file_name_134
24084 a/b/one_31_chars_long_file_name_135
24085 a/b/one_31_chars_long_file_name_136
24086 a/b/one_31_chars_long_file_name_137
24087 a/b/one_31_chars_long_file_name_138
24088 a/b/one_31_chars_long_file_name_139
24089 a/b/one_31_chars_long_file_name_140
24090 a/b/one_31_chars_long_file_name_141
24091 a/b/one_31_chars_long_file_name_142
24092 Incremental dump
24093 a/
24094 a/c/
24095 " | \
24096   $at_diff - "$at_stdout" || at_failed=:
24097 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35"
24098 $at_failed && at_fn_log_failure
24099 $at_traceon; }
24100
24101               { set +x
24102 $as_echo "$at_srcdir/incr04.at:35:
24103 mkdir posix
24104 (cd posix
24105 TEST_TAR_FORMAT=posix
24106 export TEST_TAR_FORMAT
24107 TAR_OPTIONS=\"-H posix\"
24108 export TAR_OPTIONS
24109 rm -rf *
24110
24111 ckmtime || exit 77
24112
24113 install-sh -d a/b >/dev/null  || exit 77
24114 awk 'BEGIN {
24115   for (i=1;i<=142;i++)
24116     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
24117   }' < /dev/null | genfile --files-from -
24118
24119 sleep 1
24120
24121 echo \"Initial dump\"
24122 tar cvf a0.tar -g a.sna a
24123 mv a/b a/c
24124 echo \"Incremental dump\"
24125 tar cvf a1.tar -g a.sna a
24126 )"
24127 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:35"
24128 ( $at_check_trace;
24129 mkdir posix
24130 (cd posix
24131 TEST_TAR_FORMAT=posix
24132 export TEST_TAR_FORMAT
24133 TAR_OPTIONS="-H posix"
24134 export TAR_OPTIONS
24135 rm -rf *
24136
24137 ckmtime || exit 77
24138
24139 install-sh -d a/b >/dev/null  || exit 77
24140 awk 'BEGIN {
24141   for (i=1;i<=142;i++)
24142     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
24143   }' < /dev/null | genfile --files-from -
24144
24145 sleep 1
24146
24147 echo "Initial dump"
24148 tar cvf a0.tar -g a.sna a
24149 mv a/b a/c
24150 echo "Incremental dump"
24151 tar cvf a1.tar -g a.sna a
24152 )
24153 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24154 at_status=$? at_failed=false
24155 $at_check_filter
24156 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
24157 tar: a/b: Directory is new
24158 tar: a/c: Directory has been renamed from 'a/b'
24159 " | \
24160   $at_diff - "$at_stderr" || at_failed=:
24161 echo >>"$at_stdout"; $as_echo "Initial dump
24162 a/
24163 a/b/
24164 a/b/one_31_chars_long_file_name_001
24165 a/b/one_31_chars_long_file_name_002
24166 a/b/one_31_chars_long_file_name_003
24167 a/b/one_31_chars_long_file_name_004
24168 a/b/one_31_chars_long_file_name_005
24169 a/b/one_31_chars_long_file_name_006
24170 a/b/one_31_chars_long_file_name_007
24171 a/b/one_31_chars_long_file_name_008
24172 a/b/one_31_chars_long_file_name_009
24173 a/b/one_31_chars_long_file_name_010
24174 a/b/one_31_chars_long_file_name_011
24175 a/b/one_31_chars_long_file_name_012
24176 a/b/one_31_chars_long_file_name_013
24177 a/b/one_31_chars_long_file_name_014
24178 a/b/one_31_chars_long_file_name_015
24179 a/b/one_31_chars_long_file_name_016
24180 a/b/one_31_chars_long_file_name_017
24181 a/b/one_31_chars_long_file_name_018
24182 a/b/one_31_chars_long_file_name_019
24183 a/b/one_31_chars_long_file_name_020
24184 a/b/one_31_chars_long_file_name_021
24185 a/b/one_31_chars_long_file_name_022
24186 a/b/one_31_chars_long_file_name_023
24187 a/b/one_31_chars_long_file_name_024
24188 a/b/one_31_chars_long_file_name_025
24189 a/b/one_31_chars_long_file_name_026
24190 a/b/one_31_chars_long_file_name_027
24191 a/b/one_31_chars_long_file_name_028
24192 a/b/one_31_chars_long_file_name_029
24193 a/b/one_31_chars_long_file_name_030
24194 a/b/one_31_chars_long_file_name_031
24195 a/b/one_31_chars_long_file_name_032
24196 a/b/one_31_chars_long_file_name_033
24197 a/b/one_31_chars_long_file_name_034
24198 a/b/one_31_chars_long_file_name_035
24199 a/b/one_31_chars_long_file_name_036
24200 a/b/one_31_chars_long_file_name_037
24201 a/b/one_31_chars_long_file_name_038
24202 a/b/one_31_chars_long_file_name_039
24203 a/b/one_31_chars_long_file_name_040
24204 a/b/one_31_chars_long_file_name_041
24205 a/b/one_31_chars_long_file_name_042
24206 a/b/one_31_chars_long_file_name_043
24207 a/b/one_31_chars_long_file_name_044
24208 a/b/one_31_chars_long_file_name_045
24209 a/b/one_31_chars_long_file_name_046
24210 a/b/one_31_chars_long_file_name_047
24211 a/b/one_31_chars_long_file_name_048
24212 a/b/one_31_chars_long_file_name_049
24213 a/b/one_31_chars_long_file_name_050
24214 a/b/one_31_chars_long_file_name_051
24215 a/b/one_31_chars_long_file_name_052
24216 a/b/one_31_chars_long_file_name_053
24217 a/b/one_31_chars_long_file_name_054
24218 a/b/one_31_chars_long_file_name_055
24219 a/b/one_31_chars_long_file_name_056
24220 a/b/one_31_chars_long_file_name_057
24221 a/b/one_31_chars_long_file_name_058
24222 a/b/one_31_chars_long_file_name_059
24223 a/b/one_31_chars_long_file_name_060
24224 a/b/one_31_chars_long_file_name_061
24225 a/b/one_31_chars_long_file_name_062
24226 a/b/one_31_chars_long_file_name_063
24227 a/b/one_31_chars_long_file_name_064
24228 a/b/one_31_chars_long_file_name_065
24229 a/b/one_31_chars_long_file_name_066
24230 a/b/one_31_chars_long_file_name_067
24231 a/b/one_31_chars_long_file_name_068
24232 a/b/one_31_chars_long_file_name_069
24233 a/b/one_31_chars_long_file_name_070
24234 a/b/one_31_chars_long_file_name_071
24235 a/b/one_31_chars_long_file_name_072
24236 a/b/one_31_chars_long_file_name_073
24237 a/b/one_31_chars_long_file_name_074
24238 a/b/one_31_chars_long_file_name_075
24239 a/b/one_31_chars_long_file_name_076
24240 a/b/one_31_chars_long_file_name_077
24241 a/b/one_31_chars_long_file_name_078
24242 a/b/one_31_chars_long_file_name_079
24243 a/b/one_31_chars_long_file_name_080
24244 a/b/one_31_chars_long_file_name_081
24245 a/b/one_31_chars_long_file_name_082
24246 a/b/one_31_chars_long_file_name_083
24247 a/b/one_31_chars_long_file_name_084
24248 a/b/one_31_chars_long_file_name_085
24249 a/b/one_31_chars_long_file_name_086
24250 a/b/one_31_chars_long_file_name_087
24251 a/b/one_31_chars_long_file_name_088
24252 a/b/one_31_chars_long_file_name_089
24253 a/b/one_31_chars_long_file_name_090
24254 a/b/one_31_chars_long_file_name_091
24255 a/b/one_31_chars_long_file_name_092
24256 a/b/one_31_chars_long_file_name_093
24257 a/b/one_31_chars_long_file_name_094
24258 a/b/one_31_chars_long_file_name_095
24259 a/b/one_31_chars_long_file_name_096
24260 a/b/one_31_chars_long_file_name_097
24261 a/b/one_31_chars_long_file_name_098
24262 a/b/one_31_chars_long_file_name_099
24263 a/b/one_31_chars_long_file_name_100
24264 a/b/one_31_chars_long_file_name_101
24265 a/b/one_31_chars_long_file_name_102
24266 a/b/one_31_chars_long_file_name_103
24267 a/b/one_31_chars_long_file_name_104
24268 a/b/one_31_chars_long_file_name_105
24269 a/b/one_31_chars_long_file_name_106
24270 a/b/one_31_chars_long_file_name_107
24271 a/b/one_31_chars_long_file_name_108
24272 a/b/one_31_chars_long_file_name_109
24273 a/b/one_31_chars_long_file_name_110
24274 a/b/one_31_chars_long_file_name_111
24275 a/b/one_31_chars_long_file_name_112
24276 a/b/one_31_chars_long_file_name_113
24277 a/b/one_31_chars_long_file_name_114
24278 a/b/one_31_chars_long_file_name_115
24279 a/b/one_31_chars_long_file_name_116
24280 a/b/one_31_chars_long_file_name_117
24281 a/b/one_31_chars_long_file_name_118
24282 a/b/one_31_chars_long_file_name_119
24283 a/b/one_31_chars_long_file_name_120
24284 a/b/one_31_chars_long_file_name_121
24285 a/b/one_31_chars_long_file_name_122
24286 a/b/one_31_chars_long_file_name_123
24287 a/b/one_31_chars_long_file_name_124
24288 a/b/one_31_chars_long_file_name_125
24289 a/b/one_31_chars_long_file_name_126
24290 a/b/one_31_chars_long_file_name_127
24291 a/b/one_31_chars_long_file_name_128
24292 a/b/one_31_chars_long_file_name_129
24293 a/b/one_31_chars_long_file_name_130
24294 a/b/one_31_chars_long_file_name_131
24295 a/b/one_31_chars_long_file_name_132
24296 a/b/one_31_chars_long_file_name_133
24297 a/b/one_31_chars_long_file_name_134
24298 a/b/one_31_chars_long_file_name_135
24299 a/b/one_31_chars_long_file_name_136
24300 a/b/one_31_chars_long_file_name_137
24301 a/b/one_31_chars_long_file_name_138
24302 a/b/one_31_chars_long_file_name_139
24303 a/b/one_31_chars_long_file_name_140
24304 a/b/one_31_chars_long_file_name_141
24305 a/b/one_31_chars_long_file_name_142
24306 Incremental dump
24307 a/
24308 a/c/
24309 " | \
24310   $at_diff - "$at_stdout" || at_failed=:
24311 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:35"
24312 $at_failed && at_fn_log_failure
24313 $at_traceon; }
24314
24315
24316
24317
24318
24319   set +x
24320   $at_times_p && times >"$at_times_file"
24321 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24322 read at_status <"$at_status_file"
24323 #AT_STOP_98
24324 #AT_START_99
24325 at_fn_group_banner 99 'incr05.at:21' \
24326   "incremental dumps with -C" "                      " 11
24327 at_xfail=no
24328       test -f $XFAILFILE && at_xfail=yes
24329 (
24330   $as_echo "99. $at_setup_line: testing $at_desc ..."
24331   $at_traceon
24332
24333
24334
24335
24336
24337   { set +x
24338 $as_echo "$at_srcdir/incr05.at:24:
24339 mkdir gnu
24340 (cd gnu
24341 TEST_TAR_FORMAT=gnu
24342 export TEST_TAR_FORMAT
24343 TAR_OPTIONS=\"-H gnu\"
24344 export TAR_OPTIONS
24345 rm -rf *
24346
24347 ckmtime || exit 77
24348 mkdir dir
24349 mkdir dir/sub
24350 genfile --file dir/file1
24351 genfile --file dir/sub/file2
24352
24353 echo Level 0
24354 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24355
24356 genfile --file dir/file3
24357 echo Level 1
24358 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24359 )"
24360 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
24361 ( $at_check_trace;
24362 mkdir gnu
24363 (cd gnu
24364 TEST_TAR_FORMAT=gnu
24365 export TEST_TAR_FORMAT
24366 TAR_OPTIONS="-H gnu"
24367 export TAR_OPTIONS
24368 rm -rf *
24369
24370 ckmtime || exit 77
24371 mkdir dir
24372 mkdir dir/sub
24373 genfile --file dir/file1
24374 genfile --file dir/sub/file2
24375
24376 echo Level 0
24377 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24378
24379 genfile --file dir/file3
24380 echo Level 1
24381 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24382 )
24383 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24384 at_status=$? at_failed=false
24385 $at_check_filter
24386 at_fn_diff_devnull "$at_stderr" || at_failed=:
24387 echo >>"$at_stdout"; $as_echo "Level 0
24388 ./
24389 ./sub/
24390 ./file1
24391 ./sub/file2
24392 Level 1
24393 ./
24394 ./sub/
24395 ./file3
24396 " | \
24397   $at_diff - "$at_stdout" || at_failed=:
24398 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
24399 $at_failed && at_fn_log_failure
24400 $at_traceon; }
24401
24402               { set +x
24403 $as_echo "$at_srcdir/incr05.at:24:
24404 mkdir oldgnu
24405 (cd oldgnu
24406 TEST_TAR_FORMAT=oldgnu
24407 export TEST_TAR_FORMAT
24408 TAR_OPTIONS=\"-H oldgnu\"
24409 export TAR_OPTIONS
24410 rm -rf *
24411
24412 ckmtime || exit 77
24413 mkdir dir
24414 mkdir dir/sub
24415 genfile --file dir/file1
24416 genfile --file dir/sub/file2
24417
24418 echo Level 0
24419 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24420
24421 genfile --file dir/file3
24422 echo Level 1
24423 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24424 )"
24425 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
24426 ( $at_check_trace;
24427 mkdir oldgnu
24428 (cd oldgnu
24429 TEST_TAR_FORMAT=oldgnu
24430 export TEST_TAR_FORMAT
24431 TAR_OPTIONS="-H oldgnu"
24432 export TAR_OPTIONS
24433 rm -rf *
24434
24435 ckmtime || exit 77
24436 mkdir dir
24437 mkdir dir/sub
24438 genfile --file dir/file1
24439 genfile --file dir/sub/file2
24440
24441 echo Level 0
24442 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24443
24444 genfile --file dir/file3
24445 echo Level 1
24446 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24447 )
24448 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24449 at_status=$? at_failed=false
24450 $at_check_filter
24451 at_fn_diff_devnull "$at_stderr" || at_failed=:
24452 echo >>"$at_stdout"; $as_echo "Level 0
24453 ./
24454 ./sub/
24455 ./file1
24456 ./sub/file2
24457 Level 1
24458 ./
24459 ./sub/
24460 ./file3
24461 " | \
24462   $at_diff - "$at_stdout" || at_failed=:
24463 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
24464 $at_failed && at_fn_log_failure
24465 $at_traceon; }
24466
24467               { set +x
24468 $as_echo "$at_srcdir/incr05.at:24:
24469 mkdir posix
24470 (cd posix
24471 TEST_TAR_FORMAT=posix
24472 export TEST_TAR_FORMAT
24473 TAR_OPTIONS=\"-H posix\"
24474 export TAR_OPTIONS
24475 rm -rf *
24476
24477 ckmtime || exit 77
24478 mkdir dir
24479 mkdir dir/sub
24480 genfile --file dir/file1
24481 genfile --file dir/sub/file2
24482
24483 echo Level 0
24484 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24485
24486 genfile --file dir/file3
24487 echo Level 1
24488 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24489 )"
24490 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
24491 ( $at_check_trace;
24492 mkdir posix
24493 (cd posix
24494 TEST_TAR_FORMAT=posix
24495 export TEST_TAR_FORMAT
24496 TAR_OPTIONS="-H posix"
24497 export TAR_OPTIONS
24498 rm -rf *
24499
24500 ckmtime || exit 77
24501 mkdir dir
24502 mkdir dir/sub
24503 genfile --file dir/file1
24504 genfile --file dir/sub/file2
24505
24506 echo Level 0
24507 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24508
24509 genfile --file dir/file3
24510 echo Level 1
24511 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
24512 )
24513 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24514 at_status=$? at_failed=false
24515 $at_check_filter
24516 at_fn_diff_devnull "$at_stderr" || at_failed=:
24517 echo >>"$at_stdout"; $as_echo "Level 0
24518 ./
24519 ./sub/
24520 ./file1
24521 ./sub/file2
24522 Level 1
24523 ./
24524 ./sub/
24525 ./file3
24526 " | \
24527   $at_diff - "$at_stdout" || at_failed=:
24528 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
24529 $at_failed && at_fn_log_failure
24530 $at_traceon; }
24531
24532
24533
24534
24535   set +x
24536   $at_times_p && times >"$at_times_file"
24537 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24538 read at_status <"$at_status_file"
24539 #AT_STOP_99
24540 #AT_START_100
24541 at_fn_group_banner 100 'incr06.at:21' \
24542   "incremental dumps of nested directories" "        " 11
24543 at_xfail=no
24544       test -f $XFAILFILE && at_xfail=yes
24545 (
24546   $as_echo "100. $at_setup_line: testing $at_desc ..."
24547   $at_traceon
24548
24549
24550
24551
24552
24553   { set +x
24554 $as_echo "$at_srcdir/incr06.at:24:
24555 mkdir gnu
24556 (cd gnu
24557 TEST_TAR_FORMAT=gnu
24558 export TEST_TAR_FORMAT
24559 TAR_OPTIONS=\"-H gnu\"
24560 export TAR_OPTIONS
24561 rm -rf *
24562
24563 ckmtime || exit 77
24564 mkdir dir
24565 mkdir dir/sub
24566 mkdir dir/sub/a
24567 mkdir dir/sub/b
24568 genfile --file dir/file1
24569 genfile --file dir/sub/file2
24570 genfile --file dir/sub/a/file3
24571
24572 echo Level 0 . sub
24573 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24574 echo Level 0 sub .
24575 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24576
24577 mkdir dir/c
24578 genfile --file dir/sub/b/file4
24579
24580 echo Level 1 . sub
24581 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24582 echo Level 1 sub .
24583 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24584 )"
24585 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
24586 ( $at_check_trace;
24587 mkdir gnu
24588 (cd gnu
24589 TEST_TAR_FORMAT=gnu
24590 export TEST_TAR_FORMAT
24591 TAR_OPTIONS="-H gnu"
24592 export TAR_OPTIONS
24593 rm -rf *
24594
24595 ckmtime || exit 77
24596 mkdir dir
24597 mkdir dir/sub
24598 mkdir dir/sub/a
24599 mkdir dir/sub/b
24600 genfile --file dir/file1
24601 genfile --file dir/sub/file2
24602 genfile --file dir/sub/a/file3
24603
24604 echo Level 0 . sub
24605 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24606 echo Level 0 sub .
24607 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24608
24609 mkdir dir/c
24610 genfile --file dir/sub/b/file4
24611
24612 echo Level 1 . sub
24613 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24614 echo Level 1 sub .
24615 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24616 )
24617 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24618 at_status=$? at_failed=false
24619 $at_check_filter
24620 at_fn_diff_devnull "$at_stderr" || at_failed=:
24621 echo >>"$at_stdout"; $as_echo "Level 0 . sub
24622 ./
24623 sub/
24624 sub/a/
24625 sub/b/
24626 ./file1
24627 sub/file2
24628 sub/a/file3
24629 Level 0 sub .
24630 ./
24631 sub/
24632 sub/a/
24633 sub/b/
24634 ./file1
24635 sub/file2
24636 sub/a/file3
24637 Level 1 . sub
24638 ./
24639 ./c/
24640 sub/
24641 sub/a/
24642 sub/b/
24643 sub/b/file4
24644 Level 1 sub .
24645 ./
24646 ./c/
24647 sub/
24648 sub/a/
24649 sub/b/
24650 sub/b/file4
24651 " | \
24652   $at_diff - "$at_stdout" || at_failed=:
24653 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
24654 $at_failed && at_fn_log_failure
24655 $at_traceon; }
24656
24657               { set +x
24658 $as_echo "$at_srcdir/incr06.at:24:
24659 mkdir oldgnu
24660 (cd oldgnu
24661 TEST_TAR_FORMAT=oldgnu
24662 export TEST_TAR_FORMAT
24663 TAR_OPTIONS=\"-H oldgnu\"
24664 export TAR_OPTIONS
24665 rm -rf *
24666
24667 ckmtime || exit 77
24668 mkdir dir
24669 mkdir dir/sub
24670 mkdir dir/sub/a
24671 mkdir dir/sub/b
24672 genfile --file dir/file1
24673 genfile --file dir/sub/file2
24674 genfile --file dir/sub/a/file3
24675
24676 echo Level 0 . sub
24677 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24678 echo Level 0 sub .
24679 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24680
24681 mkdir dir/c
24682 genfile --file dir/sub/b/file4
24683
24684 echo Level 1 . sub
24685 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24686 echo Level 1 sub .
24687 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24688 )"
24689 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
24690 ( $at_check_trace;
24691 mkdir oldgnu
24692 (cd oldgnu
24693 TEST_TAR_FORMAT=oldgnu
24694 export TEST_TAR_FORMAT
24695 TAR_OPTIONS="-H oldgnu"
24696 export TAR_OPTIONS
24697 rm -rf *
24698
24699 ckmtime || exit 77
24700 mkdir dir
24701 mkdir dir/sub
24702 mkdir dir/sub/a
24703 mkdir dir/sub/b
24704 genfile --file dir/file1
24705 genfile --file dir/sub/file2
24706 genfile --file dir/sub/a/file3
24707
24708 echo Level 0 . sub
24709 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24710 echo Level 0 sub .
24711 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24712
24713 mkdir dir/c
24714 genfile --file dir/sub/b/file4
24715
24716 echo Level 1 . sub
24717 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24718 echo Level 1 sub .
24719 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24720 )
24721 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24722 at_status=$? at_failed=false
24723 $at_check_filter
24724 at_fn_diff_devnull "$at_stderr" || at_failed=:
24725 echo >>"$at_stdout"; $as_echo "Level 0 . sub
24726 ./
24727 sub/
24728 sub/a/
24729 sub/b/
24730 ./file1
24731 sub/file2
24732 sub/a/file3
24733 Level 0 sub .
24734 ./
24735 sub/
24736 sub/a/
24737 sub/b/
24738 ./file1
24739 sub/file2
24740 sub/a/file3
24741 Level 1 . sub
24742 ./
24743 ./c/
24744 sub/
24745 sub/a/
24746 sub/b/
24747 sub/b/file4
24748 Level 1 sub .
24749 ./
24750 ./c/
24751 sub/
24752 sub/a/
24753 sub/b/
24754 sub/b/file4
24755 " | \
24756   $at_diff - "$at_stdout" || at_failed=:
24757 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
24758 $at_failed && at_fn_log_failure
24759 $at_traceon; }
24760
24761               { set +x
24762 $as_echo "$at_srcdir/incr06.at:24:
24763 mkdir posix
24764 (cd posix
24765 TEST_TAR_FORMAT=posix
24766 export TEST_TAR_FORMAT
24767 TAR_OPTIONS=\"-H posix\"
24768 export TAR_OPTIONS
24769 rm -rf *
24770
24771 ckmtime || exit 77
24772 mkdir dir
24773 mkdir dir/sub
24774 mkdir dir/sub/a
24775 mkdir dir/sub/b
24776 genfile --file dir/file1
24777 genfile --file dir/sub/file2
24778 genfile --file dir/sub/a/file3
24779
24780 echo Level 0 . sub
24781 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24782 echo Level 0 sub .
24783 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24784
24785 mkdir dir/c
24786 genfile --file dir/sub/b/file4
24787
24788 echo Level 1 . sub
24789 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24790 echo Level 1 sub .
24791 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24792 )"
24793 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
24794 ( $at_check_trace;
24795 mkdir posix
24796 (cd posix
24797 TEST_TAR_FORMAT=posix
24798 export TEST_TAR_FORMAT
24799 TAR_OPTIONS="-H posix"
24800 export TAR_OPTIONS
24801 rm -rf *
24802
24803 ckmtime || exit 77
24804 mkdir dir
24805 mkdir dir/sub
24806 mkdir dir/sub/a
24807 mkdir dir/sub/b
24808 genfile --file dir/file1
24809 genfile --file dir/sub/file2
24810 genfile --file dir/sub/a/file3
24811
24812 echo Level 0 . sub
24813 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24814 echo Level 0 sub .
24815 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24816
24817 mkdir dir/c
24818 genfile --file dir/sub/b/file4
24819
24820 echo Level 1 . sub
24821 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
24822 echo Level 1 sub .
24823 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
24824 )
24825 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24826 at_status=$? at_failed=false
24827 $at_check_filter
24828 at_fn_diff_devnull "$at_stderr" || at_failed=:
24829 echo >>"$at_stdout"; $as_echo "Level 0 . sub
24830 ./
24831 sub/
24832 sub/a/
24833 sub/b/
24834 ./file1
24835 sub/file2
24836 sub/a/file3
24837 Level 0 sub .
24838 ./
24839 sub/
24840 sub/a/
24841 sub/b/
24842 ./file1
24843 sub/file2
24844 sub/a/file3
24845 Level 1 . sub
24846 ./
24847 ./c/
24848 sub/
24849 sub/a/
24850 sub/b/
24851 sub/b/file4
24852 Level 1 sub .
24853 ./
24854 ./c/
24855 sub/
24856 sub/a/
24857 sub/b/
24858 sub/b/file4
24859 " | \
24860   $at_diff - "$at_stdout" || at_failed=:
24861 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
24862 $at_failed && at_fn_log_failure
24863 $at_traceon; }
24864
24865
24866
24867
24868   set +x
24869   $at_times_p && times >"$at_times_file"
24870 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24871 read at_status <"$at_status_file"
24872 #AT_STOP_100
24873 #AT_START_101
24874 at_fn_group_banner 101 'incr07.at:18' \
24875   "incremental restores with -C" "                   " 11
24876 at_xfail=no
24877       test -f $XFAILFILE && at_xfail=yes
24878 (
24879   $as_echo "101. $at_setup_line: testing $at_desc ..."
24880   $at_traceon
24881
24882
24883
24884 # Tar 1.26 had problems extracting from incremental restores when given
24885 # the -C option.  The code in incremen.c:try_purge_directory and
24886 # misc.c:remove_any_file was using savedir(), which ignored eventual changes
24887 # in the current working directory and caused the malfunctioning.
24888 #
24889 # The problem was reported by Piotr Rotter on 2013-03-22.
24890 #
24891 # This testcase is based on scripts provided by Piotr Rotter and Nathan
24892 # Stratton Treadway.
24893 #
24894 # References: <514C8F56.90900@active24.pl>,
24895 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00036.html,
24896 #             <20130326181922.GZ3732@shire.ontko.com>,
24897 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00042.html,
24898 #             <20130327051828.GA3732@shire.ontko.com>,
24899 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00043.html,
24900 #             <20130327054957.GB3732@shire.ontko.com>,
24901 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00044.html
24902
24903
24904
24905   { set +x
24906 $as_echo "$at_srcdir/incr07.at:40:
24907 mkdir gnu
24908 (cd gnu
24909 TEST_TAR_FORMAT=gnu
24910 export TEST_TAR_FORMAT
24911 TAR_OPTIONS=\"-H gnu\"
24912 export TAR_OPTIONS
24913 rm -rf *
24914
24915 ckmtime || exit 77
24916 mkdir dirA
24917 echo 'a' > dirA/a
24918 echo 'a' > dirA/b
24919
24920 decho C0
24921 tar -g test.snar -vcf test.0.tar dirA
24922
24923 echo 'a' > dirA/c
24924 decho C1
24925 tar -g test.snar -vcf test.1.tar dirA
24926
24927 rm -f dirA/a
24928 decho C2
24929 tar -g test.snar -vcf test.2.tar dirA
24930
24931 mkdir ext
24932 rm -rf dirA
24933
24934 decho E0
24935 tar -g test.snar -vxf test.0.tar -C ext/
24936 decho E1
24937 tar -g test.snar -vxf test.1.tar -C ext/
24938
24939 decho E2
24940 tar -g test.snar -vxf test.2.tar -C ext/
24941
24942 mkdir ext/dirA/dirB
24943 touch ext/dirA/dirB/file
24944
24945 decho E3
24946 tar -g test.snar -vxf test.2.tar -C ext/
24947
24948 echo FIN
24949 test -d dirA && echo >&2 \"toplevel dirA exists\"
24950 exit 0
24951 )"
24952 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
24953 ( $at_check_trace;
24954 mkdir gnu
24955 (cd gnu
24956 TEST_TAR_FORMAT=gnu
24957 export TEST_TAR_FORMAT
24958 TAR_OPTIONS="-H gnu"
24959 export TAR_OPTIONS
24960 rm -rf *
24961
24962 ckmtime || exit 77
24963 mkdir dirA
24964 echo 'a' > dirA/a
24965 echo 'a' > dirA/b
24966
24967 decho C0
24968 tar -g test.snar -vcf test.0.tar dirA
24969
24970 echo 'a' > dirA/c
24971 decho C1
24972 tar -g test.snar -vcf test.1.tar dirA
24973
24974 rm -f dirA/a
24975 decho C2
24976 tar -g test.snar -vcf test.2.tar dirA
24977
24978 mkdir ext
24979 rm -rf dirA
24980
24981 decho E0
24982 tar -g test.snar -vxf test.0.tar -C ext/
24983 decho E1
24984 tar -g test.snar -vxf test.1.tar -C ext/
24985
24986 decho E2
24987 tar -g test.snar -vxf test.2.tar -C ext/
24988
24989 mkdir ext/dirA/dirB
24990 touch ext/dirA/dirB/file
24991
24992 decho E3
24993 tar -g test.snar -vxf test.2.tar -C ext/
24994
24995 echo FIN
24996 test -d dirA && echo >&2 "toplevel dirA exists"
24997 exit 0
24998 )
24999 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25000 at_status=$? at_failed=false
25001 $at_check_filter
25002 echo >>"$at_stderr"; $as_echo "C0
25003 tar: dirA: Directory is new
25004 C1
25005 C2
25006 E0
25007 E1
25008 E2
25009 E3
25010 " | \
25011   $at_diff - "$at_stderr" || at_failed=:
25012 echo >>"$at_stdout"; $as_echo "C0
25013 dirA/
25014 dirA/a
25015 dirA/b
25016 C1
25017 dirA/
25018 dirA/c
25019 C2
25020 dirA/
25021 E0
25022 dirA/
25023 dirA/a
25024 dirA/b
25025 E1
25026 dirA/
25027 dirA/c
25028 E2
25029 dirA/
25030 tar: Deleting 'dirA/a'
25031 E3
25032 dirA/
25033 tar: Deleting 'dirA/dirB'
25034 FIN
25035 " | \
25036   $at_diff - "$at_stdout" || at_failed=:
25037 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
25038 $at_failed && at_fn_log_failure
25039 $at_traceon; }
25040
25041               { set +x
25042 $as_echo "$at_srcdir/incr07.at:40:
25043 mkdir oldgnu
25044 (cd oldgnu
25045 TEST_TAR_FORMAT=oldgnu
25046 export TEST_TAR_FORMAT
25047 TAR_OPTIONS=\"-H oldgnu\"
25048 export TAR_OPTIONS
25049 rm -rf *
25050
25051 ckmtime || exit 77
25052 mkdir dirA
25053 echo 'a' > dirA/a
25054 echo 'a' > dirA/b
25055
25056 decho C0
25057 tar -g test.snar -vcf test.0.tar dirA
25058
25059 echo 'a' > dirA/c
25060 decho C1
25061 tar -g test.snar -vcf test.1.tar dirA
25062
25063 rm -f dirA/a
25064 decho C2
25065 tar -g test.snar -vcf test.2.tar dirA
25066
25067 mkdir ext
25068 rm -rf dirA
25069
25070 decho E0
25071 tar -g test.snar -vxf test.0.tar -C ext/
25072 decho E1
25073 tar -g test.snar -vxf test.1.tar -C ext/
25074
25075 decho E2
25076 tar -g test.snar -vxf test.2.tar -C ext/
25077
25078 mkdir ext/dirA/dirB
25079 touch ext/dirA/dirB/file
25080
25081 decho E3
25082 tar -g test.snar -vxf test.2.tar -C ext/
25083
25084 echo FIN
25085 test -d dirA && echo >&2 \"toplevel dirA exists\"
25086 exit 0
25087 )"
25088 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
25089 ( $at_check_trace;
25090 mkdir oldgnu
25091 (cd oldgnu
25092 TEST_TAR_FORMAT=oldgnu
25093 export TEST_TAR_FORMAT
25094 TAR_OPTIONS="-H oldgnu"
25095 export TAR_OPTIONS
25096 rm -rf *
25097
25098 ckmtime || exit 77
25099 mkdir dirA
25100 echo 'a' > dirA/a
25101 echo 'a' > dirA/b
25102
25103 decho C0
25104 tar -g test.snar -vcf test.0.tar dirA
25105
25106 echo 'a' > dirA/c
25107 decho C1
25108 tar -g test.snar -vcf test.1.tar dirA
25109
25110 rm -f dirA/a
25111 decho C2
25112 tar -g test.snar -vcf test.2.tar dirA
25113
25114 mkdir ext
25115 rm -rf dirA
25116
25117 decho E0
25118 tar -g test.snar -vxf test.0.tar -C ext/
25119 decho E1
25120 tar -g test.snar -vxf test.1.tar -C ext/
25121
25122 decho E2
25123 tar -g test.snar -vxf test.2.tar -C ext/
25124
25125 mkdir ext/dirA/dirB
25126 touch ext/dirA/dirB/file
25127
25128 decho E3
25129 tar -g test.snar -vxf test.2.tar -C ext/
25130
25131 echo FIN
25132 test -d dirA && echo >&2 "toplevel dirA exists"
25133 exit 0
25134 )
25135 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25136 at_status=$? at_failed=false
25137 $at_check_filter
25138 echo >>"$at_stderr"; $as_echo "C0
25139 tar: dirA: Directory is new
25140 C1
25141 C2
25142 E0
25143 E1
25144 E2
25145 E3
25146 " | \
25147   $at_diff - "$at_stderr" || at_failed=:
25148 echo >>"$at_stdout"; $as_echo "C0
25149 dirA/
25150 dirA/a
25151 dirA/b
25152 C1
25153 dirA/
25154 dirA/c
25155 C2
25156 dirA/
25157 E0
25158 dirA/
25159 dirA/a
25160 dirA/b
25161 E1
25162 dirA/
25163 dirA/c
25164 E2
25165 dirA/
25166 tar: Deleting 'dirA/a'
25167 E3
25168 dirA/
25169 tar: Deleting 'dirA/dirB'
25170 FIN
25171 " | \
25172   $at_diff - "$at_stdout" || at_failed=:
25173 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
25174 $at_failed && at_fn_log_failure
25175 $at_traceon; }
25176
25177               { set +x
25178 $as_echo "$at_srcdir/incr07.at:40:
25179 mkdir posix
25180 (cd posix
25181 TEST_TAR_FORMAT=posix
25182 export TEST_TAR_FORMAT
25183 TAR_OPTIONS=\"-H posix\"
25184 export TAR_OPTIONS
25185 rm -rf *
25186
25187 ckmtime || exit 77
25188 mkdir dirA
25189 echo 'a' > dirA/a
25190 echo 'a' > dirA/b
25191
25192 decho C0
25193 tar -g test.snar -vcf test.0.tar dirA
25194
25195 echo 'a' > dirA/c
25196 decho C1
25197 tar -g test.snar -vcf test.1.tar dirA
25198
25199 rm -f dirA/a
25200 decho C2
25201 tar -g test.snar -vcf test.2.tar dirA
25202
25203 mkdir ext
25204 rm -rf dirA
25205
25206 decho E0
25207 tar -g test.snar -vxf test.0.tar -C ext/
25208 decho E1
25209 tar -g test.snar -vxf test.1.tar -C ext/
25210
25211 decho E2
25212 tar -g test.snar -vxf test.2.tar -C ext/
25213
25214 mkdir ext/dirA/dirB
25215 touch ext/dirA/dirB/file
25216
25217 decho E3
25218 tar -g test.snar -vxf test.2.tar -C ext/
25219
25220 echo FIN
25221 test -d dirA && echo >&2 \"toplevel dirA exists\"
25222 exit 0
25223 )"
25224 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
25225 ( $at_check_trace;
25226 mkdir posix
25227 (cd posix
25228 TEST_TAR_FORMAT=posix
25229 export TEST_TAR_FORMAT
25230 TAR_OPTIONS="-H posix"
25231 export TAR_OPTIONS
25232 rm -rf *
25233
25234 ckmtime || exit 77
25235 mkdir dirA
25236 echo 'a' > dirA/a
25237 echo 'a' > dirA/b
25238
25239 decho C0
25240 tar -g test.snar -vcf test.0.tar dirA
25241
25242 echo 'a' > dirA/c
25243 decho C1
25244 tar -g test.snar -vcf test.1.tar dirA
25245
25246 rm -f dirA/a
25247 decho C2
25248 tar -g test.snar -vcf test.2.tar dirA
25249
25250 mkdir ext
25251 rm -rf dirA
25252
25253 decho E0
25254 tar -g test.snar -vxf test.0.tar -C ext/
25255 decho E1
25256 tar -g test.snar -vxf test.1.tar -C ext/
25257
25258 decho E2
25259 tar -g test.snar -vxf test.2.tar -C ext/
25260
25261 mkdir ext/dirA/dirB
25262 touch ext/dirA/dirB/file
25263
25264 decho E3
25265 tar -g test.snar -vxf test.2.tar -C ext/
25266
25267 echo FIN
25268 test -d dirA && echo >&2 "toplevel dirA exists"
25269 exit 0
25270 )
25271 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25272 at_status=$? at_failed=false
25273 $at_check_filter
25274 echo >>"$at_stderr"; $as_echo "C0
25275 tar: dirA: Directory is new
25276 C1
25277 C2
25278 E0
25279 E1
25280 E2
25281 E3
25282 " | \
25283   $at_diff - "$at_stderr" || at_failed=:
25284 echo >>"$at_stdout"; $as_echo "C0
25285 dirA/
25286 dirA/a
25287 dirA/b
25288 C1
25289 dirA/
25290 dirA/c
25291 C2
25292 dirA/
25293 E0
25294 dirA/
25295 dirA/a
25296 dirA/b
25297 E1
25298 dirA/
25299 dirA/c
25300 E2
25301 dirA/
25302 tar: Deleting 'dirA/a'
25303 E3
25304 dirA/
25305 tar: Deleting 'dirA/dirB'
25306 FIN
25307 " | \
25308   $at_diff - "$at_stdout" || at_failed=:
25309 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
25310 $at_failed && at_fn_log_failure
25311 $at_traceon; }
25312
25313
25314
25315
25316   set +x
25317   $at_times_p && times >"$at_times_file"
25318 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25319 read at_status <"$at_status_file"
25320 #AT_STOP_101
25321 #AT_START_102
25322 at_fn_group_banner 102 'incr08.at:38' \
25323   "filename normalization" "                         " 11
25324 at_xfail=no
25325       test -f $XFAILFILE && at_xfail=yes
25326 (
25327   $as_echo "102. $at_setup_line: testing $at_desc ..."
25328   $at_traceon
25329
25330
25331
25332
25333
25334   { set +x
25335 $as_echo "$at_srcdir/incr08.at:41:
25336 mkdir gnu
25337 (cd gnu
25338 TEST_TAR_FORMAT=gnu
25339 export TEST_TAR_FORMAT
25340 TAR_OPTIONS=\"-H gnu\"
25341 export TAR_OPTIONS
25342 rm -rf *
25343
25344 ckmtime || exit 77
25345
25346 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
25347
25348 mkdir tartest
25349 cd tartest
25350 mkdir foo
25351 mkdir foo/subdir
25352 mkdir foo/subdir/dir1
25353 mkdir subdir
25354 mkdir subdir/dir2
25355 decho A
25356 find .|sort
25357
25358 decho B
25359 DIR=\`pwd\`
25360 tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . \$DIR 2>../err |\\
25361   sed \"s|\$DIR|ABSPATH|\"
25362 sed \"s|\$DIR|ABSPATH|\" ../err >&2
25363 )"
25364 at_fn_check_prepare_notrace 'a `...` command substitution' "incr08.at:41"
25365 ( $at_check_trace;
25366 mkdir gnu
25367 (cd gnu
25368 TEST_TAR_FORMAT=gnu
25369 export TEST_TAR_FORMAT
25370 TAR_OPTIONS="-H gnu"
25371 export TAR_OPTIONS
25372 rm -rf *
25373
25374 ckmtime || exit 77
25375
25376 test -z "`sort < /dev/null 2>&1`" || exit 77
25377
25378 mkdir tartest
25379 cd tartest
25380 mkdir foo
25381 mkdir foo/subdir
25382 mkdir foo/subdir/dir1
25383 mkdir subdir
25384 mkdir subdir/dir2
25385 decho A
25386 find .|sort
25387
25388 decho B
25389 DIR=`pwd`
25390 tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . $DIR 2>../err |\
25391   sed "s|$DIR|ABSPATH|"
25392 sed "s|$DIR|ABSPATH|" ../err >&2
25393 )
25394 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25395 at_status=$? at_failed=false
25396 $at_check_filter
25397 echo >>"$at_stderr"; $as_echo "A
25398 B
25399 tar: .: Directory is new
25400 tar: ./subdir: Directory is new
25401 tar: ./subdir/dir1: Directory is new
25402 tar: ABSPATH: Directory is new
25403 tar: ABSPATH/subdir: Directory is new
25404 tar: ABSPATH/subdir/dir2: Directory is new
25405 tar: Removing leading \`/' from member names
25406 " | \
25407   $at_diff - "$at_stderr" || at_failed=:
25408 echo >>"$at_stdout"; $as_echo "A
25409 .
25410 ./foo
25411 ./foo/subdir
25412 ./foo/subdir/dir1
25413 ./subdir
25414 ./subdir/dir2
25415 B
25416 ./
25417 ./subdir/
25418 ./subdir/dir1/
25419 ABSPATH/
25420 ABSPATH/subdir/
25421 ABSPATH/subdir/dir2/
25422 " | \
25423   $at_diff - "$at_stdout" || at_failed=:
25424 at_fn_check_status 0 $at_status "$at_srcdir/incr08.at:41"
25425 $at_failed && at_fn_log_failure
25426 $at_traceon; }
25427
25428
25429
25430
25431   set +x
25432   $at_times_p && times >"$at_times_file"
25433 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25434 read at_status <"$at_status_file"
25435 #AT_STOP_102
25436 #AT_START_103
25437 at_fn_group_banner 103 'incr09.at:26' \
25438   "incremental with alternating -C" "                " 11
25439 at_xfail=no
25440       test -f $XFAILFILE && at_xfail=yes
25441 (
25442   $as_echo "103. $at_setup_line: testing $at_desc ..."
25443   $at_traceon
25444
25445
25446
25447
25448
25449   { set +x
25450 $as_echo "$at_srcdir/incr09.at:29:
25451 mkdir gnu
25452 (cd gnu
25453 TEST_TAR_FORMAT=gnu
25454 export TEST_TAR_FORMAT
25455 TAR_OPTIONS=\"-H gnu\"
25456 export TAR_OPTIONS
25457 rm -rf *
25458
25459 ckmtime || exit 77
25460
25461 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
25462
25463 mkdir foo bar middle
25464 echo foo/foo_file > foo/foo_file
25465 echo bar/bar_file > bar/bar_file
25466 echo middle/file > middle/middle_file
25467 decho A
25468 tar -cvf foo.tar --incremental -C foo . -C \`pwd\` middle  -C bar .
25469
25470 rm foo.tar
25471 >toplevel_file
25472 decho B
25473 tar -cvf foo.tar --incremental -C foo . -C \`pwd\` toplevel_file  -C bar .
25474 )"
25475 at_fn_check_prepare_notrace 'a `...` command substitution' "incr09.at:29"
25476 ( $at_check_trace;
25477 mkdir gnu
25478 (cd gnu
25479 TEST_TAR_FORMAT=gnu
25480 export TEST_TAR_FORMAT
25481 TAR_OPTIONS="-H gnu"
25482 export TAR_OPTIONS
25483 rm -rf *
25484
25485 ckmtime || exit 77
25486
25487 test -z "`sort < /dev/null 2>&1`" || exit 77
25488
25489 mkdir foo bar middle
25490 echo foo/foo_file > foo/foo_file
25491 echo bar/bar_file > bar/bar_file
25492 echo middle/file > middle/middle_file
25493 decho A
25494 tar -cvf foo.tar --incremental -C foo . -C `pwd` middle  -C bar .
25495
25496 rm foo.tar
25497 >toplevel_file
25498 decho B
25499 tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file  -C bar .
25500 )
25501 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25502 at_status=$? at_failed=false
25503 $at_check_filter
25504 echo >>"$at_stderr"; $as_echo "A
25505 tar: .: Directory is new
25506 tar: middle: Directory is new
25507 tar: .: Directory is new
25508 B
25509 tar: .: Directory is new
25510 tar: .: Directory is new
25511 " | \
25512   $at_diff - "$at_stderr" || at_failed=:
25513 echo >>"$at_stdout"; $as_echo "A
25514 ./
25515 ./
25516 middle/
25517 ./bar_file
25518 ./foo_file
25519 middle/middle_file
25520 B
25521 ./
25522 ./
25523 toplevel_file
25524 ./bar_file
25525 ./foo_file
25526 " | \
25527   $at_diff - "$at_stdout" || at_failed=:
25528 at_fn_check_status 0 $at_status "$at_srcdir/incr09.at:29"
25529 $at_failed && at_fn_log_failure
25530 $at_traceon; }
25531
25532
25533
25534
25535   set +x
25536   $at_times_p && times >"$at_times_file"
25537 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25538 read at_status <"$at_status_file"
25539 #AT_STOP_103
25540 #AT_START_104
25541 at_fn_group_banner 104 'incr10.at:18' \
25542   "concatenated incremental archives (deletes)" "    " 11
25543 at_xfail=no
25544       test -f $XFAILFILE && at_xfail=yes
25545 (
25546   $as_echo "104. $at_setup_line: testing $at_desc ..."
25547   $at_traceon
25548
25549
25550
25551 # Description: Extraction from concatenated incremental archives
25552 # produced spurious error messages when trying to set file ownership
25553 # and permissions on deleted directories.
25554 # Reported by: Alex Efros <powerman@powerman.name>
25555 # References: <20150411224008.GO24600@home.power>
25556 #             http://lists.gnu.org/archive/html/bug-tar/2015-04/msg00003.html
25557
25558
25559
25560   { set +x
25561 $as_echo "$at_srcdir/incr10.at:28:
25562 mkdir gnu
25563 (cd gnu
25564 TEST_TAR_FORMAT=gnu
25565 export TEST_TAR_FORMAT
25566 TAR_OPTIONS=\"-H gnu\"
25567 export TAR_OPTIONS
25568 rm -rf *
25569
25570 ckmtime || exit 77
25571 mkdir in
25572 mkdir in/dir
25573 decho Level 0
25574 tar -cvf 1.tar -g snap -C in .
25575 rmdir in/dir
25576 decho Level 1
25577 tar -cvf 2.tar -g snap -C in .
25578 cp 1.tar full.tar
25579 decho Concat
25580 tar -A 2.tar -f full.tar -g /dev/null
25581 decho Extract
25582 mkdir out
25583 tar -xvf full.tar -g /dev/null -C out
25584 )"
25585 at_fn_check_prepare_notrace 'an embedded newline' "incr10.at:28"
25586 ( $at_check_trace;
25587 mkdir gnu
25588 (cd gnu
25589 TEST_TAR_FORMAT=gnu
25590 export TEST_TAR_FORMAT
25591 TAR_OPTIONS="-H gnu"
25592 export TAR_OPTIONS
25593 rm -rf *
25594
25595 ckmtime || exit 77
25596 mkdir in
25597 mkdir in/dir
25598 decho Level 0
25599 tar -cvf 1.tar -g snap -C in .
25600 rmdir in/dir
25601 decho Level 1
25602 tar -cvf 2.tar -g snap -C in .
25603 cp 1.tar full.tar
25604 decho Concat
25605 tar -A 2.tar -f full.tar -g /dev/null
25606 decho Extract
25607 mkdir out
25608 tar -xvf full.tar -g /dev/null -C out
25609 )
25610 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25611 at_status=$? at_failed=false
25612 $at_check_filter
25613 echo >>"$at_stderr"; $as_echo "Level 0
25614 tar: .: Directory is new
25615 tar: ./dir: Directory is new
25616 Level 1
25617 Concat
25618 Extract
25619 " | \
25620   $at_diff - "$at_stderr" || at_failed=:
25621 echo >>"$at_stdout"; $as_echo "Level 0
25622 ./
25623 ./dir/
25624 Level 1
25625 ./
25626 Concat
25627 Extract
25628 ./
25629 ./dir/
25630 ./
25631 tar: Deleting './dir'
25632 " | \
25633   $at_diff - "$at_stdout" || at_failed=:
25634 at_fn_check_status 0 $at_status "$at_srcdir/incr10.at:28"
25635 $at_failed && at_fn_log_failure
25636 $at_traceon; }
25637
25638
25639
25640
25641   set +x
25642   $at_times_p && times >"$at_times_file"
25643 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25644 read at_status <"$at_status_file"
25645 #AT_STOP_104
25646 #AT_START_105
25647 at_fn_group_banner 105 'incr11.at:25' \
25648   "concatenated incremental archives (renames)" "    " 11
25649 at_xfail=no
25650       test -f $XFAILFILE && at_xfail=yes
25651 (
25652   $as_echo "105. $at_setup_line: testing $at_desc ..."
25653   $at_traceon
25654
25655
25656
25657
25658
25659   { set +x
25660 $as_echo "$at_srcdir/incr11.at:28:
25661 mkdir gnu
25662 (cd gnu
25663 TEST_TAR_FORMAT=gnu
25664 export TEST_TAR_FORMAT
25665 TAR_OPTIONS=\"-H gnu\"
25666 export TAR_OPTIONS
25667 rm -rf *
25668
25669 ckmtime || exit 77
25670
25671 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
25672
25673
25674 install-sh -d data/dir >/dev/null && genfile --file data/dir/file || exit 77
25675 decho Level 0
25676 tar -cvf full.tar -g snap -C data .
25677 decho Level 1
25678 mv data/dir data/dir2
25679 tar -cvf incr.tar -g snap -C data .
25680 decho Concat
25681 cp full.tar full2.tar
25682 tar -A -f full2.tar incr.tar
25683 decho Extract
25684 mkdir out
25685 tar -xvf full2.tar -g /dev/null -C out
25686 decho List
25687 find out | sort
25688 )"
25689 at_fn_check_prepare_notrace 'a `...` command substitution' "incr11.at:28"
25690 ( $at_check_trace;
25691 mkdir gnu
25692 (cd gnu
25693 TEST_TAR_FORMAT=gnu
25694 export TEST_TAR_FORMAT
25695 TAR_OPTIONS="-H gnu"
25696 export TAR_OPTIONS
25697 rm -rf *
25698
25699 ckmtime || exit 77
25700
25701 test -z "`sort < /dev/null 2>&1`" || exit 77
25702
25703
25704 install-sh -d data/dir >/dev/null && genfile --file data/dir/file || exit 77
25705 decho Level 0
25706 tar -cvf full.tar -g snap -C data .
25707 decho Level 1
25708 mv data/dir data/dir2
25709 tar -cvf incr.tar -g snap -C data .
25710 decho Concat
25711 cp full.tar full2.tar
25712 tar -A -f full2.tar incr.tar
25713 decho Extract
25714 mkdir out
25715 tar -xvf full2.tar -g /dev/null -C out
25716 decho List
25717 find out | sort
25718 )
25719 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25720 at_status=$? at_failed=false
25721 $at_check_filter
25722 echo >>"$at_stderr"; $as_echo "Level 0
25723 tar: .: Directory is new
25724 tar: ./dir: Directory is new
25725 Level 1
25726 tar: ./dir2: Directory has been renamed from './dir'
25727 Concat
25728 Extract
25729 List
25730 " | \
25731   $at_diff - "$at_stderr" || at_failed=:
25732 echo >>"$at_stdout"; $as_echo "Level 0
25733 ./
25734 ./dir/
25735 ./dir/file
25736 Level 1
25737 ./
25738 ./dir2/
25739 Concat
25740 Extract
25741 ./
25742 ./dir/
25743 ./dir/file
25744 ./
25745 ./dir2/
25746 List
25747 out
25748 out/dir2
25749 out/dir2/file
25750 " | \
25751   $at_diff - "$at_stdout" || at_failed=:
25752 at_fn_check_status 0 $at_status "$at_srcdir/incr11.at:28"
25753 $at_failed && at_fn_log_failure
25754 $at_traceon; }
25755
25756
25757
25758
25759   set +x
25760   $at_times_p && times >"$at_times_file"
25761 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25762 read at_status <"$at_status_file"
25763 #AT_STOP_105
25764 #AT_START_106
25765 at_fn_group_banner 106 'filerem01.at:36' \
25766   "file removed as we read it (ca. 22 seconds)" "    " 12
25767 at_xfail=no
25768       test -f $XFAILFILE && at_xfail=yes
25769 (
25770   $as_echo "106. $at_setup_line: testing $at_desc ..."
25771   $at_traceon
25772
25773
25774
25775
25776
25777   { set +x
25778 $as_echo "$at_srcdir/filerem01.at:39:
25779 mkdir gnu
25780 (cd gnu
25781 TEST_TAR_FORMAT=gnu
25782 export TEST_TAR_FORMAT
25783 TAR_OPTIONS=\"-H gnu\"
25784 export TAR_OPTIONS
25785 rm -rf *
25786
25787 mkdir dir
25788 mkdir dir/sub
25789 genfile --file dir/file1
25790 genfile --file dir/sub/file2
25791
25792 genfile --run --checkpoint=3 --unlink dir/file1 -- \\
25793        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
25794        --checkpoint-action='echo' -c -f archive.tar \\
25795        --listed-incremental db -v dir >/dev/null
25796 )"
25797 at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
25798 ( $at_check_trace;
25799 mkdir gnu
25800 (cd gnu
25801 TEST_TAR_FORMAT=gnu
25802 export TEST_TAR_FORMAT
25803 TAR_OPTIONS="-H gnu"
25804 export TAR_OPTIONS
25805 rm -rf *
25806
25807 mkdir dir
25808 mkdir dir/sub
25809 genfile --file dir/file1
25810 genfile --file dir/sub/file2
25811
25812 genfile --run --checkpoint=3 --unlink dir/file1 -- \
25813        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
25814        --checkpoint-action='echo' -c -f archive.tar \
25815        --listed-incremental db -v dir >/dev/null
25816 )
25817 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25818 at_status=$? at_failed=false
25819 $at_check_filter
25820 echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
25821 tar: dir/sub: Directory is new
25822 tar: dir/file1: File removed before we read it
25823 " | \
25824   $at_diff - "$at_stderr" || at_failed=:
25825 echo stdout:; cat "$at_stdout"
25826 at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
25827 $at_failed && at_fn_log_failure
25828 $at_traceon; }
25829
25830               { set +x
25831 $as_echo "$at_srcdir/filerem01.at:39:
25832 mkdir posix
25833 (cd posix
25834 TEST_TAR_FORMAT=posix
25835 export TEST_TAR_FORMAT
25836 TAR_OPTIONS=\"-H posix\"
25837 export TAR_OPTIONS
25838 rm -rf *
25839
25840 mkdir dir
25841 mkdir dir/sub
25842 genfile --file dir/file1
25843 genfile --file dir/sub/file2
25844
25845 genfile --run --checkpoint=3 --unlink dir/file1 -- \\
25846        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
25847        --checkpoint-action='echo' -c -f archive.tar \\
25848        --listed-incremental db -v dir >/dev/null
25849 )"
25850 at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
25851 ( $at_check_trace;
25852 mkdir posix
25853 (cd posix
25854 TEST_TAR_FORMAT=posix
25855 export TEST_TAR_FORMAT
25856 TAR_OPTIONS="-H posix"
25857 export TAR_OPTIONS
25858 rm -rf *
25859
25860 mkdir dir
25861 mkdir dir/sub
25862 genfile --file dir/file1
25863 genfile --file dir/sub/file2
25864
25865 genfile --run --checkpoint=3 --unlink dir/file1 -- \
25866        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
25867        --checkpoint-action='echo' -c -f archive.tar \
25868        --listed-incremental db -v dir >/dev/null
25869 )
25870 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25871 at_status=$? at_failed=false
25872 $at_check_filter
25873 echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
25874 tar: dir/sub: Directory is new
25875 tar: dir/file1: File removed before we read it
25876 " | \
25877   $at_diff - "$at_stderr" || at_failed=:
25878 echo stdout:; cat "$at_stdout"
25879 at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
25880 $at_failed && at_fn_log_failure
25881 $at_traceon; }
25882
25883
25884
25885
25886 # Timing information:
25887 #
25888 # For -Hgnu the above command line takes about 8 seconds to execute and
25889 # produces:
25890 #
25891 # tar: dir: Directory is new
25892 # tar: dir/sub: Directory is new
25893 # dir/
25894 # tar: Write checkpoint 1
25895 # tar: Write checkpoint 2
25896 # dir/sub/
25897 # tar: Write checkpoint 3
25898 # tar: Write checkpoint 4
25899 # dir/file1
25900 # tar: Write checkpoint 5
25901 # dir/sub/file2
25902 # tar: Write checkpoint 6
25903 # tar: Write checkpoint 7
25904 # tar: Write checkpoint 8
25905 #
25906 # For -Hposix the above command line takes about 14 seconds to execute and
25907 # produces:
25908 #
25909 # ./tar: dir: Directory is new
25910 # ./tar: dir/sub: Directory is new
25911 # dir/
25912 # ./tar: Write checkpoint 1
25913 # ./tar: Write checkpoint 2
25914 # ./tar: Write checkpoint 3
25915 # dir/sub/
25916 # ./tar: Write checkpoint 4
25917 # ./tar: Write checkpoint 5
25918 # ./tar: Write checkpoint 6
25919 # dir/file1
25920 # ./tar: Write checkpoint 7
25921 # ./tar: Write checkpoint 8
25922 # ./tar: Write checkpoint 9
25923 # dir/sub/file2
25924 # ./tar: Write checkpoint 10
25925 # ./tar: Write checkpoint 11
25926 # ./tar: Write checkpoint 12
25927 # ./tar: Write checkpoint 13
25928 # ./tar: Write checkpoint 14
25929
25930
25931   set +x
25932   $at_times_p && times >"$at_times_file"
25933 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25934 read at_status <"$at_status_file"
25935 #AT_STOP_106
25936 #AT_START_107
25937 at_fn_group_banner 107 'filerem02.at:26' \
25938   "toplevel file removed (ca. 24 seconds)" "         " 12
25939 at_xfail=no
25940       test -f $XFAILFILE && at_xfail=yes
25941 (
25942   $as_echo "107. $at_setup_line: testing $at_desc ..."
25943   $at_traceon
25944
25945
25946
25947
25948
25949   { set +x
25950 $as_echo "$at_srcdir/filerem02.at:29:
25951 mkdir gnu
25952 (cd gnu
25953 TEST_TAR_FORMAT=gnu
25954 export TEST_TAR_FORMAT
25955 TAR_OPTIONS=\"-H gnu\"
25956 export TAR_OPTIONS
25957 rm -rf *
25958
25959 mkdir dir
25960 mkdir dir/sub
25961 genfile --file dir/file1
25962 genfile --file dir/sub/file2
25963 mkdir dir2
25964 genfile --file dir2/file1
25965
25966 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
25967        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
25968        --checkpoint-action='echo' -c -f archive.tar \\
25969        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
25970 )"
25971 at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
25972 ( $at_check_trace;
25973 mkdir gnu
25974 (cd gnu
25975 TEST_TAR_FORMAT=gnu
25976 export TEST_TAR_FORMAT
25977 TAR_OPTIONS="-H gnu"
25978 export TAR_OPTIONS
25979 rm -rf *
25980
25981 mkdir dir
25982 mkdir dir/sub
25983 genfile --file dir/file1
25984 genfile --file dir/sub/file2
25985 mkdir dir2
25986 genfile --file dir2/file1
25987
25988 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
25989        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
25990        --checkpoint-action='echo' -c -f archive.tar \
25991        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
25992 )
25993 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25994 at_status=$? at_failed=false
25995 $at_check_filter
25996 echo stderr:; cat "$at_stderr"
25997 echo stdout:; cat "$at_stdout"
25998 at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
25999 $at_failed && at_fn_log_failure
26000 $at_traceon; }
26001
26002               { set +x
26003 $as_echo "$at_srcdir/filerem02.at:29:
26004 mkdir posix
26005 (cd posix
26006 TEST_TAR_FORMAT=posix
26007 export TEST_TAR_FORMAT
26008 TAR_OPTIONS=\"-H posix\"
26009 export TAR_OPTIONS
26010 rm -rf *
26011
26012 mkdir dir
26013 mkdir dir/sub
26014 genfile --file dir/file1
26015 genfile --file dir/sub/file2
26016 mkdir dir2
26017 genfile --file dir2/file1
26018
26019 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
26020        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
26021        --checkpoint-action='echo' -c -f archive.tar \\
26022        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
26023 )"
26024 at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
26025 ( $at_check_trace;
26026 mkdir posix
26027 (cd posix
26028 TEST_TAR_FORMAT=posix
26029 export TEST_TAR_FORMAT
26030 TAR_OPTIONS="-H posix"
26031 export TAR_OPTIONS
26032 rm -rf *
26033
26034 mkdir dir
26035 mkdir dir/sub
26036 genfile --file dir/file1
26037 genfile --file dir/sub/file2
26038 mkdir dir2
26039 genfile --file dir2/file1
26040
26041 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
26042        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
26043        --checkpoint-action='echo' -c -f archive.tar \
26044        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
26045 )
26046 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26047 at_status=$? at_failed=false
26048 $at_check_filter
26049 echo stderr:; cat "$at_stderr"
26050 echo stdout:; cat "$at_stdout"
26051 at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
26052 $at_failed && at_fn_log_failure
26053 $at_traceon; }
26054
26055
26056
26057
26058 # Ignore stdout and stderr because their contents depend on
26059 # the file system implementation.
26060
26061 # Timing information: see filerem01.at
26062
26063   set +x
26064   $at_times_p && times >"$at_times_file"
26065 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26066 read at_status <"$at_status_file"
26067 #AT_STOP_107
26068 #AT_START_108
26069 at_fn_group_banner 108 'rename01.at:25' \
26070   "renamed dirs in incrementals" "                   " 13
26071 at_xfail=no
26072       test -f $XFAILFILE && at_xfail=yes
26073 (
26074   $as_echo "108. $at_setup_line: testing $at_desc ..."
26075   $at_traceon
26076
26077
26078
26079
26080
26081   { set +x
26082 $as_echo "$at_srcdir/rename01.at:28:
26083 mkdir gnu
26084 (cd gnu
26085 TEST_TAR_FORMAT=gnu
26086 export TEST_TAR_FORMAT
26087 TAR_OPTIONS=\"-H gnu\"
26088 export TAR_OPTIONS
26089 rm -rf *
26090
26091
26092 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
26093
26094
26095 mkdir foo
26096 genfile --file foo/file1
26097 genfile --file foo/file2
26098 mkdir foo/bar
26099 genfile --file foo/bar/file
26100
26101 echo \"Creating base archive\"
26102 tar -g incr -cf arch.1 -v foo
26103
26104 mv foo/bar foo/baz
26105
26106 echo \"Creating incremental archive\"
26107 tar -g incr -cf arch.2 -v foo
26108
26109 mv foo old
26110
26111 tar xfg arch.1 /dev/null
26112
26113 echo \"Begin directory listing 1\"
26114 find foo | sort
26115 echo \"End directory listing 1\"
26116
26117 tar xfg arch.2 /dev/null
26118 echo Begin directory listing 2
26119 find foo | sort
26120 echo End directory listing 2
26121 )"
26122 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28"
26123 ( $at_check_trace;
26124 mkdir gnu
26125 (cd gnu
26126 TEST_TAR_FORMAT=gnu
26127 export TEST_TAR_FORMAT
26128 TAR_OPTIONS="-H gnu"
26129 export TAR_OPTIONS
26130 rm -rf *
26131
26132
26133 test -z "`sort < /dev/null 2>&1`" || exit 77
26134
26135
26136 mkdir foo
26137 genfile --file foo/file1
26138 genfile --file foo/file2
26139 mkdir foo/bar
26140 genfile --file foo/bar/file
26141
26142 echo "Creating base archive"
26143 tar -g incr -cf arch.1 -v foo
26144
26145 mv foo/bar foo/baz
26146
26147 echo "Creating incremental archive"
26148 tar -g incr -cf arch.2 -v foo
26149
26150 mv foo old
26151
26152 tar xfg arch.1 /dev/null
26153
26154 echo "Begin directory listing 1"
26155 find foo | sort
26156 echo "End directory listing 1"
26157
26158 tar xfg arch.2 /dev/null
26159 echo Begin directory listing 2
26160 find foo | sort
26161 echo End directory listing 2
26162 )
26163 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26164 at_status=$? at_failed=false
26165 $at_check_filter
26166 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
26167 tar: foo/bar: Directory is new
26168 tar: foo/baz: Directory has been renamed from 'foo/bar'
26169 " | \
26170   $at_diff - "$at_stderr" || at_failed=:
26171 echo >>"$at_stdout"; $as_echo "Creating base archive
26172 foo/
26173 foo/bar/
26174 foo/file1
26175 foo/file2
26176 foo/bar/file
26177 Creating incremental archive
26178 foo/
26179 foo/baz/
26180 Begin directory listing 1
26181 foo
26182 foo/bar
26183 foo/bar/file
26184 foo/file1
26185 foo/file2
26186 End directory listing 1
26187 Begin directory listing 2
26188 foo
26189 foo/baz
26190 foo/baz/file
26191 foo/file1
26192 foo/file2
26193 End directory listing 2
26194 " | \
26195   $at_diff - "$at_stdout" || at_failed=:
26196 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28"
26197 $at_failed && at_fn_log_failure
26198 $at_traceon; }
26199
26200               { set +x
26201 $as_echo "$at_srcdir/rename01.at:28:
26202 mkdir oldgnu
26203 (cd oldgnu
26204 TEST_TAR_FORMAT=oldgnu
26205 export TEST_TAR_FORMAT
26206 TAR_OPTIONS=\"-H oldgnu\"
26207 export TAR_OPTIONS
26208 rm -rf *
26209
26210
26211 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
26212
26213
26214 mkdir foo
26215 genfile --file foo/file1
26216 genfile --file foo/file2
26217 mkdir foo/bar
26218 genfile --file foo/bar/file
26219
26220 echo \"Creating base archive\"
26221 tar -g incr -cf arch.1 -v foo
26222
26223 mv foo/bar foo/baz
26224
26225 echo \"Creating incremental archive\"
26226 tar -g incr -cf arch.2 -v foo
26227
26228 mv foo old
26229
26230 tar xfg arch.1 /dev/null
26231
26232 echo \"Begin directory listing 1\"
26233 find foo | sort
26234 echo \"End directory listing 1\"
26235
26236 tar xfg arch.2 /dev/null
26237 echo Begin directory listing 2
26238 find foo | sort
26239 echo End directory listing 2
26240 )"
26241 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28"
26242 ( $at_check_trace;
26243 mkdir oldgnu
26244 (cd oldgnu
26245 TEST_TAR_FORMAT=oldgnu
26246 export TEST_TAR_FORMAT
26247 TAR_OPTIONS="-H oldgnu"
26248 export TAR_OPTIONS
26249 rm -rf *
26250
26251
26252 test -z "`sort < /dev/null 2>&1`" || exit 77
26253
26254
26255 mkdir foo
26256 genfile --file foo/file1
26257 genfile --file foo/file2
26258 mkdir foo/bar
26259 genfile --file foo/bar/file
26260
26261 echo "Creating base archive"
26262 tar -g incr -cf arch.1 -v foo
26263
26264 mv foo/bar foo/baz
26265
26266 echo "Creating incremental archive"
26267 tar -g incr -cf arch.2 -v foo
26268
26269 mv foo old
26270
26271 tar xfg arch.1 /dev/null
26272
26273 echo "Begin directory listing 1"
26274 find foo | sort
26275 echo "End directory listing 1"
26276
26277 tar xfg arch.2 /dev/null
26278 echo Begin directory listing 2
26279 find foo | sort
26280 echo End directory listing 2
26281 )
26282 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26283 at_status=$? at_failed=false
26284 $at_check_filter
26285 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
26286 tar: foo/bar: Directory is new
26287 tar: foo/baz: Directory has been renamed from 'foo/bar'
26288 " | \
26289   $at_diff - "$at_stderr" || at_failed=:
26290 echo >>"$at_stdout"; $as_echo "Creating base archive
26291 foo/
26292 foo/bar/
26293 foo/file1
26294 foo/file2
26295 foo/bar/file
26296 Creating incremental archive
26297 foo/
26298 foo/baz/
26299 Begin directory listing 1
26300 foo
26301 foo/bar
26302 foo/bar/file
26303 foo/file1
26304 foo/file2
26305 End directory listing 1
26306 Begin directory listing 2
26307 foo
26308 foo/baz
26309 foo/baz/file
26310 foo/file1
26311 foo/file2
26312 End directory listing 2
26313 " | \
26314   $at_diff - "$at_stdout" || at_failed=:
26315 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28"
26316 $at_failed && at_fn_log_failure
26317 $at_traceon; }
26318
26319               { set +x
26320 $as_echo "$at_srcdir/rename01.at:28:
26321 mkdir posix
26322 (cd posix
26323 TEST_TAR_FORMAT=posix
26324 export TEST_TAR_FORMAT
26325 TAR_OPTIONS=\"-H posix\"
26326 export TAR_OPTIONS
26327 rm -rf *
26328
26329
26330 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
26331
26332
26333 mkdir foo
26334 genfile --file foo/file1
26335 genfile --file foo/file2
26336 mkdir foo/bar
26337 genfile --file foo/bar/file
26338
26339 echo \"Creating base archive\"
26340 tar -g incr -cf arch.1 -v foo
26341
26342 mv foo/bar foo/baz
26343
26344 echo \"Creating incremental archive\"
26345 tar -g incr -cf arch.2 -v foo
26346
26347 mv foo old
26348
26349 tar xfg arch.1 /dev/null
26350
26351 echo \"Begin directory listing 1\"
26352 find foo | sort
26353 echo \"End directory listing 1\"
26354
26355 tar xfg arch.2 /dev/null
26356 echo Begin directory listing 2
26357 find foo | sort
26358 echo End directory listing 2
26359 )"
26360 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:28"
26361 ( $at_check_trace;
26362 mkdir posix
26363 (cd posix
26364 TEST_TAR_FORMAT=posix
26365 export TEST_TAR_FORMAT
26366 TAR_OPTIONS="-H posix"
26367 export TAR_OPTIONS
26368 rm -rf *
26369
26370
26371 test -z "`sort < /dev/null 2>&1`" || exit 77
26372
26373
26374 mkdir foo
26375 genfile --file foo/file1
26376 genfile --file foo/file2
26377 mkdir foo/bar
26378 genfile --file foo/bar/file
26379
26380 echo "Creating base archive"
26381 tar -g incr -cf arch.1 -v foo
26382
26383 mv foo/bar foo/baz
26384
26385 echo "Creating incremental archive"
26386 tar -g incr -cf arch.2 -v foo
26387
26388 mv foo old
26389
26390 tar xfg arch.1 /dev/null
26391
26392 echo "Begin directory listing 1"
26393 find foo | sort
26394 echo "End directory listing 1"
26395
26396 tar xfg arch.2 /dev/null
26397 echo Begin directory listing 2
26398 find foo | sort
26399 echo End directory listing 2
26400 )
26401 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26402 at_status=$? at_failed=false
26403 $at_check_filter
26404 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
26405 tar: foo/bar: Directory is new
26406 tar: foo/baz: Directory has been renamed from 'foo/bar'
26407 " | \
26408   $at_diff - "$at_stderr" || at_failed=:
26409 echo >>"$at_stdout"; $as_echo "Creating base archive
26410 foo/
26411 foo/bar/
26412 foo/file1
26413 foo/file2
26414 foo/bar/file
26415 Creating incremental archive
26416 foo/
26417 foo/baz/
26418 Begin directory listing 1
26419 foo
26420 foo/bar
26421 foo/bar/file
26422 foo/file1
26423 foo/file2
26424 End directory listing 1
26425 Begin directory listing 2
26426 foo
26427 foo/baz
26428 foo/baz/file
26429 foo/file1
26430 foo/file2
26431 End directory listing 2
26432 " | \
26433   $at_diff - "$at_stdout" || at_failed=:
26434 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:28"
26435 $at_failed && at_fn_log_failure
26436 $at_traceon; }
26437
26438
26439
26440
26441   set +x
26442   $at_times_p && times >"$at_times_file"
26443 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26444 read at_status <"$at_status_file"
26445 #AT_STOP_108
26446 #AT_START_109
26447 at_fn_group_banner 109 'rename02.at:25' \
26448   "move between hierarchies" "                       " 13
26449 at_xfail=no
26450       test -f $XFAILFILE && at_xfail=yes
26451 (
26452   $as_echo "109. $at_setup_line: testing $at_desc ..."
26453   $at_traceon
26454
26455
26456
26457
26458
26459   { set +x
26460 $as_echo "$at_srcdir/rename02.at:28:
26461 mkdir gnu
26462 (cd gnu
26463 TEST_TAR_FORMAT=gnu
26464 export TEST_TAR_FORMAT
26465 TAR_OPTIONS=\"-H gnu\"
26466 export TAR_OPTIONS
26467 rm -rf *
26468
26469
26470 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
26471
26472 mkdir foo
26473 genfile --file foo/file1
26474 genfile --file foo/file2
26475 mkdir foo/bar
26476 genfile --file foo/bar/file.r
26477 mkdir foo/bar/baz
26478 genfile --file foo/bar/baz/file.z
26479
26480 sleep 1
26481
26482 echo \"Creating base archive\"
26483 tar -g incr -cf arch.1 -v foo
26484
26485 mv foo/bar/baz foo
26486
26487 echo \"Creating incremental archive\"
26488 tar -g incr -cf arch.2 -v foo
26489
26490 mv foo old
26491
26492 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
26493 sort tmperr >&2
26494
26495 echo \"Begin directory listing 1\"
26496 find foo | sort
26497 echo \"End directory listing 1\"
26498
26499 tar xfgv arch.2 /dev/null --warning=no-timestamp
26500 echo Begin directory listing 2
26501 find foo | sort
26502 echo End directory listing 2
26503 )"
26504 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28"
26505 ( $at_check_trace;
26506 mkdir gnu
26507 (cd gnu
26508 TEST_TAR_FORMAT=gnu
26509 export TEST_TAR_FORMAT
26510 TAR_OPTIONS="-H gnu"
26511 export TAR_OPTIONS
26512 rm -rf *
26513
26514
26515 test -z "`sort < /dev/null 2>&1`" || exit 77
26516
26517 mkdir foo
26518 genfile --file foo/file1
26519 genfile --file foo/file2
26520 mkdir foo/bar
26521 genfile --file foo/bar/file.r
26522 mkdir foo/bar/baz
26523 genfile --file foo/bar/baz/file.z
26524
26525 sleep 1
26526
26527 echo "Creating base archive"
26528 tar -g incr -cf arch.1 -v foo
26529
26530 mv foo/bar/baz foo
26531
26532 echo "Creating incremental archive"
26533 tar -g incr -cf arch.2 -v foo
26534
26535 mv foo old
26536
26537 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
26538 sort tmperr >&2
26539
26540 echo "Begin directory listing 1"
26541 find foo | sort
26542 echo "End directory listing 1"
26543
26544 tar xfgv arch.2 /dev/null --warning=no-timestamp
26545 echo Begin directory listing 2
26546 find foo | sort
26547 echo End directory listing 2
26548 )
26549 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26550 at_status=$? at_failed=false
26551 $at_check_filter
26552 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
26553 tar: foo/bar: Directory is new
26554 tar: foo/bar/baz: Directory is new
26555 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
26556 " | \
26557   $at_diff - "$at_stderr" || at_failed=:
26558 echo >>"$at_stdout"; $as_echo "Creating base archive
26559 foo/
26560 foo/bar/
26561 foo/bar/baz/
26562 foo/file1
26563 foo/file2
26564 foo/bar/file.r
26565 foo/bar/baz/file.z
26566 Creating incremental archive
26567 foo/
26568 foo/bar/
26569 foo/baz/
26570 Begin directory listing 1
26571 foo
26572 foo/bar
26573 foo/bar/baz
26574 foo/bar/baz/file.z
26575 foo/bar/file.r
26576 foo/file1
26577 foo/file2
26578 End directory listing 1
26579 foo/
26580 foo/bar/
26581 foo/baz/
26582 Begin directory listing 2
26583 foo
26584 foo/bar
26585 foo/bar/file.r
26586 foo/baz
26587 foo/baz/file.z
26588 foo/file1
26589 foo/file2
26590 End directory listing 2
26591 " | \
26592   $at_diff - "$at_stdout" || at_failed=:
26593 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28"
26594 $at_failed && at_fn_log_failure
26595 $at_traceon; }
26596
26597               { set +x
26598 $as_echo "$at_srcdir/rename02.at:28:
26599 mkdir oldgnu
26600 (cd oldgnu
26601 TEST_TAR_FORMAT=oldgnu
26602 export TEST_TAR_FORMAT
26603 TAR_OPTIONS=\"-H oldgnu\"
26604 export TAR_OPTIONS
26605 rm -rf *
26606
26607
26608 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
26609
26610 mkdir foo
26611 genfile --file foo/file1
26612 genfile --file foo/file2
26613 mkdir foo/bar
26614 genfile --file foo/bar/file.r
26615 mkdir foo/bar/baz
26616 genfile --file foo/bar/baz/file.z
26617
26618 sleep 1
26619
26620 echo \"Creating base archive\"
26621 tar -g incr -cf arch.1 -v foo
26622
26623 mv foo/bar/baz foo
26624
26625 echo \"Creating incremental archive\"
26626 tar -g incr -cf arch.2 -v foo
26627
26628 mv foo old
26629
26630 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
26631 sort tmperr >&2
26632
26633 echo \"Begin directory listing 1\"
26634 find foo | sort
26635 echo \"End directory listing 1\"
26636
26637 tar xfgv arch.2 /dev/null --warning=no-timestamp
26638 echo Begin directory listing 2
26639 find foo | sort
26640 echo End directory listing 2
26641 )"
26642 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28"
26643 ( $at_check_trace;
26644 mkdir oldgnu
26645 (cd oldgnu
26646 TEST_TAR_FORMAT=oldgnu
26647 export TEST_TAR_FORMAT
26648 TAR_OPTIONS="-H oldgnu"
26649 export TAR_OPTIONS
26650 rm -rf *
26651
26652
26653 test -z "`sort < /dev/null 2>&1`" || exit 77
26654
26655 mkdir foo
26656 genfile --file foo/file1
26657 genfile --file foo/file2
26658 mkdir foo/bar
26659 genfile --file foo/bar/file.r
26660 mkdir foo/bar/baz
26661 genfile --file foo/bar/baz/file.z
26662
26663 sleep 1
26664
26665 echo "Creating base archive"
26666 tar -g incr -cf arch.1 -v foo
26667
26668 mv foo/bar/baz foo
26669
26670 echo "Creating incremental archive"
26671 tar -g incr -cf arch.2 -v foo
26672
26673 mv foo old
26674
26675 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
26676 sort tmperr >&2
26677
26678 echo "Begin directory listing 1"
26679 find foo | sort
26680 echo "End directory listing 1"
26681
26682 tar xfgv arch.2 /dev/null --warning=no-timestamp
26683 echo Begin directory listing 2
26684 find foo | sort
26685 echo End directory listing 2
26686 )
26687 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26688 at_status=$? at_failed=false
26689 $at_check_filter
26690 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
26691 tar: foo/bar: Directory is new
26692 tar: foo/bar/baz: Directory is new
26693 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
26694 " | \
26695   $at_diff - "$at_stderr" || at_failed=:
26696 echo >>"$at_stdout"; $as_echo "Creating base archive
26697 foo/
26698 foo/bar/
26699 foo/bar/baz/
26700 foo/file1
26701 foo/file2
26702 foo/bar/file.r
26703 foo/bar/baz/file.z
26704 Creating incremental archive
26705 foo/
26706 foo/bar/
26707 foo/baz/
26708 Begin directory listing 1
26709 foo
26710 foo/bar
26711 foo/bar/baz
26712 foo/bar/baz/file.z
26713 foo/bar/file.r
26714 foo/file1
26715 foo/file2
26716 End directory listing 1
26717 foo/
26718 foo/bar/
26719 foo/baz/
26720 Begin directory listing 2
26721 foo
26722 foo/bar
26723 foo/bar/file.r
26724 foo/baz
26725 foo/baz/file.z
26726 foo/file1
26727 foo/file2
26728 End directory listing 2
26729 " | \
26730   $at_diff - "$at_stdout" || at_failed=:
26731 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28"
26732 $at_failed && at_fn_log_failure
26733 $at_traceon; }
26734
26735               { set +x
26736 $as_echo "$at_srcdir/rename02.at:28:
26737 mkdir posix
26738 (cd posix
26739 TEST_TAR_FORMAT=posix
26740 export TEST_TAR_FORMAT
26741 TAR_OPTIONS=\"-H posix\"
26742 export TAR_OPTIONS
26743 rm -rf *
26744
26745
26746 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
26747
26748 mkdir foo
26749 genfile --file foo/file1
26750 genfile --file foo/file2
26751 mkdir foo/bar
26752 genfile --file foo/bar/file.r
26753 mkdir foo/bar/baz
26754 genfile --file foo/bar/baz/file.z
26755
26756 sleep 1
26757
26758 echo \"Creating base archive\"
26759 tar -g incr -cf arch.1 -v foo
26760
26761 mv foo/bar/baz foo
26762
26763 echo \"Creating incremental archive\"
26764 tar -g incr -cf arch.2 -v foo
26765
26766 mv foo old
26767
26768 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
26769 sort tmperr >&2
26770
26771 echo \"Begin directory listing 1\"
26772 find foo | sort
26773 echo \"End directory listing 1\"
26774
26775 tar xfgv arch.2 /dev/null --warning=no-timestamp
26776 echo Begin directory listing 2
26777 find foo | sort
26778 echo End directory listing 2
26779 )"
26780 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:28"
26781 ( $at_check_trace;
26782 mkdir posix
26783 (cd posix
26784 TEST_TAR_FORMAT=posix
26785 export TEST_TAR_FORMAT
26786 TAR_OPTIONS="-H posix"
26787 export TAR_OPTIONS
26788 rm -rf *
26789
26790
26791 test -z "`sort < /dev/null 2>&1`" || exit 77
26792
26793 mkdir foo
26794 genfile --file foo/file1
26795 genfile --file foo/file2
26796 mkdir foo/bar
26797 genfile --file foo/bar/file.r
26798 mkdir foo/bar/baz
26799 genfile --file foo/bar/baz/file.z
26800
26801 sleep 1
26802
26803 echo "Creating base archive"
26804 tar -g incr -cf arch.1 -v foo
26805
26806 mv foo/bar/baz foo
26807
26808 echo "Creating incremental archive"
26809 tar -g incr -cf arch.2 -v foo
26810
26811 mv foo old
26812
26813 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
26814 sort tmperr >&2
26815
26816 echo "Begin directory listing 1"
26817 find foo | sort
26818 echo "End directory listing 1"
26819
26820 tar xfgv arch.2 /dev/null --warning=no-timestamp
26821 echo Begin directory listing 2
26822 find foo | sort
26823 echo End directory listing 2
26824 )
26825 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26826 at_status=$? at_failed=false
26827 $at_check_filter
26828 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
26829 tar: foo/bar: Directory is new
26830 tar: foo/bar/baz: Directory is new
26831 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
26832 " | \
26833   $at_diff - "$at_stderr" || at_failed=:
26834 echo >>"$at_stdout"; $as_echo "Creating base archive
26835 foo/
26836 foo/bar/
26837 foo/bar/baz/
26838 foo/file1
26839 foo/file2
26840 foo/bar/file.r
26841 foo/bar/baz/file.z
26842 Creating incremental archive
26843 foo/
26844 foo/bar/
26845 foo/baz/
26846 Begin directory listing 1
26847 foo
26848 foo/bar
26849 foo/bar/baz
26850 foo/bar/baz/file.z
26851 foo/bar/file.r
26852 foo/file1
26853 foo/file2
26854 End directory listing 1
26855 foo/
26856 foo/bar/
26857 foo/baz/
26858 Begin directory listing 2
26859 foo
26860 foo/bar
26861 foo/bar/file.r
26862 foo/baz
26863 foo/baz/file.z
26864 foo/file1
26865 foo/file2
26866 End directory listing 2
26867 " | \
26868   $at_diff - "$at_stdout" || at_failed=:
26869 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:28"
26870 $at_failed && at_fn_log_failure
26871 $at_traceon; }
26872
26873
26874
26875
26876   set +x
26877   $at_times_p && times >"$at_times_file"
26878 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26879 read at_status <"$at_status_file"
26880 #AT_STOP_109
26881 #AT_START_110
26882 at_fn_group_banner 110 'rename03.at:24' \
26883   "cyclic renames" "                                 " 13
26884 at_xfail=no
26885       test -f $XFAILFILE && at_xfail=yes
26886 (
26887   $as_echo "110. $at_setup_line: testing $at_desc ..."
26888   $at_traceon
26889
26890
26891
26892
26893
26894   { set +x
26895 $as_echo "$at_srcdir/rename03.at:27:
26896 mkdir gnu
26897 (cd gnu
26898 TEST_TAR_FORMAT=gnu
26899 export TEST_TAR_FORMAT
26900 TAR_OPTIONS=\"-H gnu\"
26901 export TAR_OPTIONS
26902 rm -rf *
26903
26904
26905 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
26906
26907
26908 mkdir foo
26909 genfile --file foo/file1
26910 genfile --file foo/file2
26911
26912 mkdir foo/a
26913 genfile --file foo/a/filea
26914
26915 mkdir foo/b
26916 genfile --file foo/b/fileb
26917
26918 mkdir foo/c
26919 genfile --file foo/c/filec
26920
26921 sleep 1
26922
26923 echo \"First dump\"
26924 echo \"First dump\">&2
26925 tar -g incr -cf arch.1 -v foo 2>tmperr
26926 sort tmperr >&2
26927
26928 # Shuffle directories:
26929 (cd foo
26930 mv a \$\$
26931 mv c a
26932 mv b c
26933 mv \$\$ b)
26934
26935 echo \"Second dump\"
26936 echo \"Second dump\" >&2
26937 tar -g incr -cf arch.2 -v foo 2>tmperr
26938 sort tmperr >&2
26939
26940 tar xfg arch.1 /dev/null --warning=no-timestamp
26941
26942 echo \"Begin directory listing 1\"
26943 find foo | sort
26944 echo \"End directory listing 1\"
26945
26946 tar xfgv arch.2 /dev/null --warning=no-timestamp
26947 echo Begin directory listing 2
26948 find foo | sort
26949 echo End directory listing 2
26950 )"
26951 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27"
26952 ( $at_check_trace;
26953 mkdir gnu
26954 (cd gnu
26955 TEST_TAR_FORMAT=gnu
26956 export TEST_TAR_FORMAT
26957 TAR_OPTIONS="-H gnu"
26958 export TAR_OPTIONS
26959 rm -rf *
26960
26961
26962 test -z "`sort < /dev/null 2>&1`" || exit 77
26963
26964
26965 mkdir foo
26966 genfile --file foo/file1
26967 genfile --file foo/file2
26968
26969 mkdir foo/a
26970 genfile --file foo/a/filea
26971
26972 mkdir foo/b
26973 genfile --file foo/b/fileb
26974
26975 mkdir foo/c
26976 genfile --file foo/c/filec
26977
26978 sleep 1
26979
26980 echo "First dump"
26981 echo "First dump">&2
26982 tar -g incr -cf arch.1 -v foo 2>tmperr
26983 sort tmperr >&2
26984
26985 # Shuffle directories:
26986 (cd foo
26987 mv a $$
26988 mv c a
26989 mv b c
26990 mv $$ b)
26991
26992 echo "Second dump"
26993 echo "Second dump" >&2
26994 tar -g incr -cf arch.2 -v foo 2>tmperr
26995 sort tmperr >&2
26996
26997 tar xfg arch.1 /dev/null --warning=no-timestamp
26998
26999 echo "Begin directory listing 1"
27000 find foo | sort
27001 echo "End directory listing 1"
27002
27003 tar xfgv arch.2 /dev/null --warning=no-timestamp
27004 echo Begin directory listing 2
27005 find foo | sort
27006 echo End directory listing 2
27007 )
27008 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27009 at_status=$? at_failed=false
27010 $at_check_filter
27011 echo >>"$at_stderr"; $as_echo "First dump
27012 tar: foo/a: Directory is new
27013 tar: foo/b: Directory is new
27014 tar: foo/c: Directory is new
27015 tar: foo: Directory is new
27016 Second dump
27017 tar: foo/a: Directory has been renamed from 'foo/c'
27018 tar: foo/b: Directory has been renamed from 'foo/a'
27019 tar: foo/c: Directory has been renamed from 'foo/b'
27020 " | \
27021   $at_diff - "$at_stderr" || at_failed=:
27022 echo >>"$at_stdout"; $as_echo "First dump
27023 foo/
27024 foo/a/
27025 foo/b/
27026 foo/c/
27027 foo/file1
27028 foo/file2
27029 foo/a/filea
27030 foo/b/fileb
27031 foo/c/filec
27032 Second dump
27033 foo/
27034 foo/a/
27035 foo/b/
27036 foo/c/
27037 Begin directory listing 1
27038 foo
27039 foo/a
27040 foo/a/filea
27041 foo/b
27042 foo/b/fileb
27043 foo/c
27044 foo/c/filec
27045 foo/file1
27046 foo/file2
27047 End directory listing 1
27048 foo/
27049 foo/a/
27050 foo/b/
27051 foo/c/
27052 Begin directory listing 2
27053 foo
27054 foo/a
27055 foo/a/filec
27056 foo/b
27057 foo/b/filea
27058 foo/c
27059 foo/c/fileb
27060 foo/file1
27061 foo/file2
27062 End directory listing 2
27063 " | \
27064   $at_diff - "$at_stdout" || at_failed=:
27065 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27"
27066 $at_failed && at_fn_log_failure
27067 $at_traceon; }
27068
27069               { set +x
27070 $as_echo "$at_srcdir/rename03.at:27:
27071 mkdir oldgnu
27072 (cd oldgnu
27073 TEST_TAR_FORMAT=oldgnu
27074 export TEST_TAR_FORMAT
27075 TAR_OPTIONS=\"-H oldgnu\"
27076 export TAR_OPTIONS
27077 rm -rf *
27078
27079
27080 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27081
27082
27083 mkdir foo
27084 genfile --file foo/file1
27085 genfile --file foo/file2
27086
27087 mkdir foo/a
27088 genfile --file foo/a/filea
27089
27090 mkdir foo/b
27091 genfile --file foo/b/fileb
27092
27093 mkdir foo/c
27094 genfile --file foo/c/filec
27095
27096 sleep 1
27097
27098 echo \"First dump\"
27099 echo \"First dump\">&2
27100 tar -g incr -cf arch.1 -v foo 2>tmperr
27101 sort tmperr >&2
27102
27103 # Shuffle directories:
27104 (cd foo
27105 mv a \$\$
27106 mv c a
27107 mv b c
27108 mv \$\$ b)
27109
27110 echo \"Second dump\"
27111 echo \"Second dump\" >&2
27112 tar -g incr -cf arch.2 -v foo 2>tmperr
27113 sort tmperr >&2
27114
27115 tar xfg arch.1 /dev/null --warning=no-timestamp
27116
27117 echo \"Begin directory listing 1\"
27118 find foo | sort
27119 echo \"End directory listing 1\"
27120
27121 tar xfgv arch.2 /dev/null --warning=no-timestamp
27122 echo Begin directory listing 2
27123 find foo | sort
27124 echo End directory listing 2
27125 )"
27126 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27"
27127 ( $at_check_trace;
27128 mkdir oldgnu
27129 (cd oldgnu
27130 TEST_TAR_FORMAT=oldgnu
27131 export TEST_TAR_FORMAT
27132 TAR_OPTIONS="-H oldgnu"
27133 export TAR_OPTIONS
27134 rm -rf *
27135
27136
27137 test -z "`sort < /dev/null 2>&1`" || exit 77
27138
27139
27140 mkdir foo
27141 genfile --file foo/file1
27142 genfile --file foo/file2
27143
27144 mkdir foo/a
27145 genfile --file foo/a/filea
27146
27147 mkdir foo/b
27148 genfile --file foo/b/fileb
27149
27150 mkdir foo/c
27151 genfile --file foo/c/filec
27152
27153 sleep 1
27154
27155 echo "First dump"
27156 echo "First dump">&2
27157 tar -g incr -cf arch.1 -v foo 2>tmperr
27158 sort tmperr >&2
27159
27160 # Shuffle directories:
27161 (cd foo
27162 mv a $$
27163 mv c a
27164 mv b c
27165 mv $$ b)
27166
27167 echo "Second dump"
27168 echo "Second dump" >&2
27169 tar -g incr -cf arch.2 -v foo 2>tmperr
27170 sort tmperr >&2
27171
27172 tar xfg arch.1 /dev/null --warning=no-timestamp
27173
27174 echo "Begin directory listing 1"
27175 find foo | sort
27176 echo "End directory listing 1"
27177
27178 tar xfgv arch.2 /dev/null --warning=no-timestamp
27179 echo Begin directory listing 2
27180 find foo | sort
27181 echo End directory listing 2
27182 )
27183 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27184 at_status=$? at_failed=false
27185 $at_check_filter
27186 echo >>"$at_stderr"; $as_echo "First dump
27187 tar: foo/a: Directory is new
27188 tar: foo/b: Directory is new
27189 tar: foo/c: Directory is new
27190 tar: foo: Directory is new
27191 Second dump
27192 tar: foo/a: Directory has been renamed from 'foo/c'
27193 tar: foo/b: Directory has been renamed from 'foo/a'
27194 tar: foo/c: Directory has been renamed from 'foo/b'
27195 " | \
27196   $at_diff - "$at_stderr" || at_failed=:
27197 echo >>"$at_stdout"; $as_echo "First dump
27198 foo/
27199 foo/a/
27200 foo/b/
27201 foo/c/
27202 foo/file1
27203 foo/file2
27204 foo/a/filea
27205 foo/b/fileb
27206 foo/c/filec
27207 Second dump
27208 foo/
27209 foo/a/
27210 foo/b/
27211 foo/c/
27212 Begin directory listing 1
27213 foo
27214 foo/a
27215 foo/a/filea
27216 foo/b
27217 foo/b/fileb
27218 foo/c
27219 foo/c/filec
27220 foo/file1
27221 foo/file2
27222 End directory listing 1
27223 foo/
27224 foo/a/
27225 foo/b/
27226 foo/c/
27227 Begin directory listing 2
27228 foo
27229 foo/a
27230 foo/a/filec
27231 foo/b
27232 foo/b/filea
27233 foo/c
27234 foo/c/fileb
27235 foo/file1
27236 foo/file2
27237 End directory listing 2
27238 " | \
27239   $at_diff - "$at_stdout" || at_failed=:
27240 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27"
27241 $at_failed && at_fn_log_failure
27242 $at_traceon; }
27243
27244               { set +x
27245 $as_echo "$at_srcdir/rename03.at:27:
27246 mkdir posix
27247 (cd posix
27248 TEST_TAR_FORMAT=posix
27249 export TEST_TAR_FORMAT
27250 TAR_OPTIONS=\"-H posix\"
27251 export TAR_OPTIONS
27252 rm -rf *
27253
27254
27255 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27256
27257
27258 mkdir foo
27259 genfile --file foo/file1
27260 genfile --file foo/file2
27261
27262 mkdir foo/a
27263 genfile --file foo/a/filea
27264
27265 mkdir foo/b
27266 genfile --file foo/b/fileb
27267
27268 mkdir foo/c
27269 genfile --file foo/c/filec
27270
27271 sleep 1
27272
27273 echo \"First dump\"
27274 echo \"First dump\">&2
27275 tar -g incr -cf arch.1 -v foo 2>tmperr
27276 sort tmperr >&2
27277
27278 # Shuffle directories:
27279 (cd foo
27280 mv a \$\$
27281 mv c a
27282 mv b c
27283 mv \$\$ b)
27284
27285 echo \"Second dump\"
27286 echo \"Second dump\" >&2
27287 tar -g incr -cf arch.2 -v foo 2>tmperr
27288 sort tmperr >&2
27289
27290 tar xfg arch.1 /dev/null --warning=no-timestamp
27291
27292 echo \"Begin directory listing 1\"
27293 find foo | sort
27294 echo \"End directory listing 1\"
27295
27296 tar xfgv arch.2 /dev/null --warning=no-timestamp
27297 echo Begin directory listing 2
27298 find foo | sort
27299 echo End directory listing 2
27300 )"
27301 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:27"
27302 ( $at_check_trace;
27303 mkdir posix
27304 (cd posix
27305 TEST_TAR_FORMAT=posix
27306 export TEST_TAR_FORMAT
27307 TAR_OPTIONS="-H posix"
27308 export TAR_OPTIONS
27309 rm -rf *
27310
27311
27312 test -z "`sort < /dev/null 2>&1`" || exit 77
27313
27314
27315 mkdir foo
27316 genfile --file foo/file1
27317 genfile --file foo/file2
27318
27319 mkdir foo/a
27320 genfile --file foo/a/filea
27321
27322 mkdir foo/b
27323 genfile --file foo/b/fileb
27324
27325 mkdir foo/c
27326 genfile --file foo/c/filec
27327
27328 sleep 1
27329
27330 echo "First dump"
27331 echo "First dump">&2
27332 tar -g incr -cf arch.1 -v foo 2>tmperr
27333 sort tmperr >&2
27334
27335 # Shuffle directories:
27336 (cd foo
27337 mv a $$
27338 mv c a
27339 mv b c
27340 mv $$ b)
27341
27342 echo "Second dump"
27343 echo "Second dump" >&2
27344 tar -g incr -cf arch.2 -v foo 2>tmperr
27345 sort tmperr >&2
27346
27347 tar xfg arch.1 /dev/null --warning=no-timestamp
27348
27349 echo "Begin directory listing 1"
27350 find foo | sort
27351 echo "End directory listing 1"
27352
27353 tar xfgv arch.2 /dev/null --warning=no-timestamp
27354 echo Begin directory listing 2
27355 find foo | sort
27356 echo End directory listing 2
27357 )
27358 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27359 at_status=$? at_failed=false
27360 $at_check_filter
27361 echo >>"$at_stderr"; $as_echo "First dump
27362 tar: foo/a: Directory is new
27363 tar: foo/b: Directory is new
27364 tar: foo/c: Directory is new
27365 tar: foo: Directory is new
27366 Second dump
27367 tar: foo/a: Directory has been renamed from 'foo/c'
27368 tar: foo/b: Directory has been renamed from 'foo/a'
27369 tar: foo/c: Directory has been renamed from 'foo/b'
27370 " | \
27371   $at_diff - "$at_stderr" || at_failed=:
27372 echo >>"$at_stdout"; $as_echo "First dump
27373 foo/
27374 foo/a/
27375 foo/b/
27376 foo/c/
27377 foo/file1
27378 foo/file2
27379 foo/a/filea
27380 foo/b/fileb
27381 foo/c/filec
27382 Second dump
27383 foo/
27384 foo/a/
27385 foo/b/
27386 foo/c/
27387 Begin directory listing 1
27388 foo
27389 foo/a
27390 foo/a/filea
27391 foo/b
27392 foo/b/fileb
27393 foo/c
27394 foo/c/filec
27395 foo/file1
27396 foo/file2
27397 End directory listing 1
27398 foo/
27399 foo/a/
27400 foo/b/
27401 foo/c/
27402 Begin directory listing 2
27403 foo
27404 foo/a
27405 foo/a/filec
27406 foo/b
27407 foo/b/filea
27408 foo/c
27409 foo/c/fileb
27410 foo/file1
27411 foo/file2
27412 End directory listing 2
27413 " | \
27414   $at_diff - "$at_stdout" || at_failed=:
27415 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:27"
27416 $at_failed && at_fn_log_failure
27417 $at_traceon; }
27418
27419
27420
27421
27422   set +x
27423   $at_times_p && times >"$at_times_file"
27424 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27425 read at_status <"$at_status_file"
27426 #AT_STOP_110
27427 #AT_START_111
27428 at_fn_group_banner 111 'rename04.at:27' \
27429   "renamed directory containing subdirectories" "    " 13
27430 at_xfail=no
27431       test -f $XFAILFILE && at_xfail=yes
27432 (
27433   $as_echo "111. $at_setup_line: testing $at_desc ..."
27434   $at_traceon
27435
27436
27437
27438
27439
27440   { set +x
27441 $as_echo "$at_srcdir/rename04.at:30:
27442 mkdir gnu
27443 (cd gnu
27444 TEST_TAR_FORMAT=gnu
27445 export TEST_TAR_FORMAT
27446 TAR_OPTIONS=\"-H gnu\"
27447 export TAR_OPTIONS
27448 rm -rf *
27449
27450
27451 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27452
27453
27454 decho Creating directory structure
27455 mkdir directory
27456 mkdir directory/subdir
27457 genfile --file=directory/file
27458
27459 decho Creating initial archive
27460 tar -cf archive.1 -g db.1 directory
27461
27462 decho Renaming
27463 mv directory dir
27464
27465 decho Creating incremental archive
27466 cp db.1 db.2
27467 tar -cf archive.2 -g db.2 dir
27468
27469 mv dir orig
27470
27471 decho First restore
27472 tar -xf archive.1 -g db.1
27473 find directory | sort
27474
27475 decho Second restore
27476 tar -xf archive.2 -g db.2
27477 find dir | sort
27478 )"
27479 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
27480 ( $at_check_trace;
27481 mkdir gnu
27482 (cd gnu
27483 TEST_TAR_FORMAT=gnu
27484 export TEST_TAR_FORMAT
27485 TAR_OPTIONS="-H gnu"
27486 export TAR_OPTIONS
27487 rm -rf *
27488
27489
27490 test -z "`sort < /dev/null 2>&1`" || exit 77
27491
27492
27493 decho Creating directory structure
27494 mkdir directory
27495 mkdir directory/subdir
27496 genfile --file=directory/file
27497
27498 decho Creating initial archive
27499 tar -cf archive.1 -g db.1 directory
27500
27501 decho Renaming
27502 mv directory dir
27503
27504 decho Creating incremental archive
27505 cp db.1 db.2
27506 tar -cf archive.2 -g db.2 dir
27507
27508 mv dir orig
27509
27510 decho First restore
27511 tar -xf archive.1 -g db.1
27512 find directory | sort
27513
27514 decho Second restore
27515 tar -xf archive.2 -g db.2
27516 find dir | sort
27517 )
27518 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27519 at_status=$? at_failed=false
27520 $at_check_filter
27521 echo >>"$at_stderr"; $as_echo "Creating directory structure
27522 Creating initial archive
27523 Renaming
27524 Creating incremental archive
27525 First restore
27526 Second restore
27527 " | \
27528   $at_diff - "$at_stderr" || at_failed=:
27529 echo >>"$at_stdout"; $as_echo "Creating directory structure
27530 Creating initial archive
27531 Renaming
27532 Creating incremental archive
27533 First restore
27534 directory
27535 directory/file
27536 directory/subdir
27537 Second restore
27538 dir
27539 dir/subdir
27540 " | \
27541   $at_diff - "$at_stdout" || at_failed=:
27542 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
27543 $at_failed && at_fn_log_failure
27544 $at_traceon; }
27545
27546               { set +x
27547 $as_echo "$at_srcdir/rename04.at:30:
27548 mkdir oldgnu
27549 (cd oldgnu
27550 TEST_TAR_FORMAT=oldgnu
27551 export TEST_TAR_FORMAT
27552 TAR_OPTIONS=\"-H oldgnu\"
27553 export TAR_OPTIONS
27554 rm -rf *
27555
27556
27557 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27558
27559
27560 decho Creating directory structure
27561 mkdir directory
27562 mkdir directory/subdir
27563 genfile --file=directory/file
27564
27565 decho Creating initial archive
27566 tar -cf archive.1 -g db.1 directory
27567
27568 decho Renaming
27569 mv directory dir
27570
27571 decho Creating incremental archive
27572 cp db.1 db.2
27573 tar -cf archive.2 -g db.2 dir
27574
27575 mv dir orig
27576
27577 decho First restore
27578 tar -xf archive.1 -g db.1
27579 find directory | sort
27580
27581 decho Second restore
27582 tar -xf archive.2 -g db.2
27583 find dir | sort
27584 )"
27585 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
27586 ( $at_check_trace;
27587 mkdir oldgnu
27588 (cd oldgnu
27589 TEST_TAR_FORMAT=oldgnu
27590 export TEST_TAR_FORMAT
27591 TAR_OPTIONS="-H oldgnu"
27592 export TAR_OPTIONS
27593 rm -rf *
27594
27595
27596 test -z "`sort < /dev/null 2>&1`" || exit 77
27597
27598
27599 decho Creating directory structure
27600 mkdir directory
27601 mkdir directory/subdir
27602 genfile --file=directory/file
27603
27604 decho Creating initial archive
27605 tar -cf archive.1 -g db.1 directory
27606
27607 decho Renaming
27608 mv directory dir
27609
27610 decho Creating incremental archive
27611 cp db.1 db.2
27612 tar -cf archive.2 -g db.2 dir
27613
27614 mv dir orig
27615
27616 decho First restore
27617 tar -xf archive.1 -g db.1
27618 find directory | sort
27619
27620 decho Second restore
27621 tar -xf archive.2 -g db.2
27622 find dir | sort
27623 )
27624 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27625 at_status=$? at_failed=false
27626 $at_check_filter
27627 echo >>"$at_stderr"; $as_echo "Creating directory structure
27628 Creating initial archive
27629 Renaming
27630 Creating incremental archive
27631 First restore
27632 Second restore
27633 " | \
27634   $at_diff - "$at_stderr" || at_failed=:
27635 echo >>"$at_stdout"; $as_echo "Creating directory structure
27636 Creating initial archive
27637 Renaming
27638 Creating incremental archive
27639 First restore
27640 directory
27641 directory/file
27642 directory/subdir
27643 Second restore
27644 dir
27645 dir/subdir
27646 " | \
27647   $at_diff - "$at_stdout" || at_failed=:
27648 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
27649 $at_failed && at_fn_log_failure
27650 $at_traceon; }
27651
27652               { set +x
27653 $as_echo "$at_srcdir/rename04.at:30:
27654 mkdir posix
27655 (cd posix
27656 TEST_TAR_FORMAT=posix
27657 export TEST_TAR_FORMAT
27658 TAR_OPTIONS=\"-H posix\"
27659 export TAR_OPTIONS
27660 rm -rf *
27661
27662
27663 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27664
27665
27666 decho Creating directory structure
27667 mkdir directory
27668 mkdir directory/subdir
27669 genfile --file=directory/file
27670
27671 decho Creating initial archive
27672 tar -cf archive.1 -g db.1 directory
27673
27674 decho Renaming
27675 mv directory dir
27676
27677 decho Creating incremental archive
27678 cp db.1 db.2
27679 tar -cf archive.2 -g db.2 dir
27680
27681 mv dir orig
27682
27683 decho First restore
27684 tar -xf archive.1 -g db.1
27685 find directory | sort
27686
27687 decho Second restore
27688 tar -xf archive.2 -g db.2
27689 find dir | sort
27690 )"
27691 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
27692 ( $at_check_trace;
27693 mkdir posix
27694 (cd posix
27695 TEST_TAR_FORMAT=posix
27696 export TEST_TAR_FORMAT
27697 TAR_OPTIONS="-H posix"
27698 export TAR_OPTIONS
27699 rm -rf *
27700
27701
27702 test -z "`sort < /dev/null 2>&1`" || exit 77
27703
27704
27705 decho Creating directory structure
27706 mkdir directory
27707 mkdir directory/subdir
27708 genfile --file=directory/file
27709
27710 decho Creating initial archive
27711 tar -cf archive.1 -g db.1 directory
27712
27713 decho Renaming
27714 mv directory dir
27715
27716 decho Creating incremental archive
27717 cp db.1 db.2
27718 tar -cf archive.2 -g db.2 dir
27719
27720 mv dir orig
27721
27722 decho First restore
27723 tar -xf archive.1 -g db.1
27724 find directory | sort
27725
27726 decho Second restore
27727 tar -xf archive.2 -g db.2
27728 find dir | sort
27729 )
27730 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27731 at_status=$? at_failed=false
27732 $at_check_filter
27733 echo >>"$at_stderr"; $as_echo "Creating directory structure
27734 Creating initial archive
27735 Renaming
27736 Creating incremental archive
27737 First restore
27738 Second restore
27739 " | \
27740   $at_diff - "$at_stderr" || at_failed=:
27741 echo >>"$at_stdout"; $as_echo "Creating directory structure
27742 Creating initial archive
27743 Renaming
27744 Creating incremental archive
27745 First restore
27746 directory
27747 directory/file
27748 directory/subdir
27749 Second restore
27750 dir
27751 dir/subdir
27752 " | \
27753   $at_diff - "$at_stdout" || at_failed=:
27754 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
27755 $at_failed && at_fn_log_failure
27756 $at_traceon; }
27757
27758
27759
27760
27761   set +x
27762   $at_times_p && times >"$at_times_file"
27763 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27764 read at_status <"$at_status_file"
27765 #AT_STOP_111
27766 #AT_START_112
27767 at_fn_group_banner 112 'rename05.at:24' \
27768   "renamed subdirectories" "                         " 13
27769 at_xfail=no
27770       test -f $XFAILFILE && at_xfail=yes
27771 (
27772   $as_echo "112. $at_setup_line: testing $at_desc ..."
27773   $at_traceon
27774
27775
27776
27777
27778
27779   { set +x
27780 $as_echo "$at_srcdir/rename05.at:27:
27781 mkdir gnu
27782 (cd gnu
27783 TEST_TAR_FORMAT=gnu
27784 export TEST_TAR_FORMAT
27785 TAR_OPTIONS=\"-H gnu\"
27786 export TAR_OPTIONS
27787 rm -rf *
27788
27789
27790 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27791
27792
27793 decho Creating directory structure
27794 mkdir directory
27795 mkdir directory/subdir
27796 genfile --file=directory/file
27797
27798 decho Creating initial archive
27799 tar -cf archive.1 -g db.1 directory
27800
27801 decho Renaming
27802 mv directory/subdir directory/subdir.0
27803 mv directory dir
27804
27805 decho Creating incremental archive
27806 cp db.1 db.2
27807 tar -cf archive.2 -g db.2 dir
27808
27809 mv dir orig
27810
27811 decho First restore
27812 tar -xf archive.1 -g db.1 --warning=no-timestamp
27813 find directory | sort
27814
27815 decho Second restore
27816 tar -xf archive.2 -g db.2 --warning=no-timestamp
27817 find dir | sort
27818 )"
27819 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
27820 ( $at_check_trace;
27821 mkdir gnu
27822 (cd gnu
27823 TEST_TAR_FORMAT=gnu
27824 export TEST_TAR_FORMAT
27825 TAR_OPTIONS="-H gnu"
27826 export TAR_OPTIONS
27827 rm -rf *
27828
27829
27830 test -z "`sort < /dev/null 2>&1`" || exit 77
27831
27832
27833 decho Creating directory structure
27834 mkdir directory
27835 mkdir directory/subdir
27836 genfile --file=directory/file
27837
27838 decho Creating initial archive
27839 tar -cf archive.1 -g db.1 directory
27840
27841 decho Renaming
27842 mv directory/subdir directory/subdir.0
27843 mv directory dir
27844
27845 decho Creating incremental archive
27846 cp db.1 db.2
27847 tar -cf archive.2 -g db.2 dir
27848
27849 mv dir orig
27850
27851 decho First restore
27852 tar -xf archive.1 -g db.1 --warning=no-timestamp
27853 find directory | sort
27854
27855 decho Second restore
27856 tar -xf archive.2 -g db.2 --warning=no-timestamp
27857 find dir | sort
27858 )
27859 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27860 at_status=$? at_failed=false
27861 $at_check_filter
27862 echo >>"$at_stderr"; $as_echo "Creating directory structure
27863 Creating initial archive
27864 Renaming
27865 Creating incremental archive
27866 First restore
27867 Second restore
27868 " | \
27869   $at_diff - "$at_stderr" || at_failed=:
27870 echo >>"$at_stdout"; $as_echo "Creating directory structure
27871 Creating initial archive
27872 Renaming
27873 Creating incremental archive
27874 First restore
27875 directory
27876 directory/file
27877 directory/subdir
27878 Second restore
27879 dir
27880 dir/subdir.0
27881 " | \
27882   $at_diff - "$at_stdout" || at_failed=:
27883 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
27884 $at_failed && at_fn_log_failure
27885 $at_traceon; }
27886
27887               { set +x
27888 $as_echo "$at_srcdir/rename05.at:27:
27889 mkdir oldgnu
27890 (cd oldgnu
27891 TEST_TAR_FORMAT=oldgnu
27892 export TEST_TAR_FORMAT
27893 TAR_OPTIONS=\"-H oldgnu\"
27894 export TAR_OPTIONS
27895 rm -rf *
27896
27897
27898 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
27899
27900
27901 decho Creating directory structure
27902 mkdir directory
27903 mkdir directory/subdir
27904 genfile --file=directory/file
27905
27906 decho Creating initial archive
27907 tar -cf archive.1 -g db.1 directory
27908
27909 decho Renaming
27910 mv directory/subdir directory/subdir.0
27911 mv directory dir
27912
27913 decho Creating incremental archive
27914 cp db.1 db.2
27915 tar -cf archive.2 -g db.2 dir
27916
27917 mv dir orig
27918
27919 decho First restore
27920 tar -xf archive.1 -g db.1 --warning=no-timestamp
27921 find directory | sort
27922
27923 decho Second restore
27924 tar -xf archive.2 -g db.2 --warning=no-timestamp
27925 find dir | sort
27926 )"
27927 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
27928 ( $at_check_trace;
27929 mkdir oldgnu
27930 (cd oldgnu
27931 TEST_TAR_FORMAT=oldgnu
27932 export TEST_TAR_FORMAT
27933 TAR_OPTIONS="-H oldgnu"
27934 export TAR_OPTIONS
27935 rm -rf *
27936
27937
27938 test -z "`sort < /dev/null 2>&1`" || exit 77
27939
27940
27941 decho Creating directory structure
27942 mkdir directory
27943 mkdir directory/subdir
27944 genfile --file=directory/file
27945
27946 decho Creating initial archive
27947 tar -cf archive.1 -g db.1 directory
27948
27949 decho Renaming
27950 mv directory/subdir directory/subdir.0
27951 mv directory dir
27952
27953 decho Creating incremental archive
27954 cp db.1 db.2
27955 tar -cf archive.2 -g db.2 dir
27956
27957 mv dir orig
27958
27959 decho First restore
27960 tar -xf archive.1 -g db.1 --warning=no-timestamp
27961 find directory | sort
27962
27963 decho Second restore
27964 tar -xf archive.2 -g db.2 --warning=no-timestamp
27965 find dir | sort
27966 )
27967 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27968 at_status=$? at_failed=false
27969 $at_check_filter
27970 echo >>"$at_stderr"; $as_echo "Creating directory structure
27971 Creating initial archive
27972 Renaming
27973 Creating incremental archive
27974 First restore
27975 Second restore
27976 " | \
27977   $at_diff - "$at_stderr" || at_failed=:
27978 echo >>"$at_stdout"; $as_echo "Creating directory structure
27979 Creating initial archive
27980 Renaming
27981 Creating incremental archive
27982 First restore
27983 directory
27984 directory/file
27985 directory/subdir
27986 Second restore
27987 dir
27988 dir/subdir.0
27989 " | \
27990   $at_diff - "$at_stdout" || at_failed=:
27991 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
27992 $at_failed && at_fn_log_failure
27993 $at_traceon; }
27994
27995               { set +x
27996 $as_echo "$at_srcdir/rename05.at:27:
27997 mkdir posix
27998 (cd posix
27999 TEST_TAR_FORMAT=posix
28000 export TEST_TAR_FORMAT
28001 TAR_OPTIONS=\"-H posix\"
28002 export TAR_OPTIONS
28003 rm -rf *
28004
28005
28006 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
28007
28008
28009 decho Creating directory structure
28010 mkdir directory
28011 mkdir directory/subdir
28012 genfile --file=directory/file
28013
28014 decho Creating initial archive
28015 tar -cf archive.1 -g db.1 directory
28016
28017 decho Renaming
28018 mv directory/subdir directory/subdir.0
28019 mv directory dir
28020
28021 decho Creating incremental archive
28022 cp db.1 db.2
28023 tar -cf archive.2 -g db.2 dir
28024
28025 mv dir orig
28026
28027 decho First restore
28028 tar -xf archive.1 -g db.1 --warning=no-timestamp
28029 find directory | sort
28030
28031 decho Second restore
28032 tar -xf archive.2 -g db.2 --warning=no-timestamp
28033 find dir | sort
28034 )"
28035 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
28036 ( $at_check_trace;
28037 mkdir posix
28038 (cd posix
28039 TEST_TAR_FORMAT=posix
28040 export TEST_TAR_FORMAT
28041 TAR_OPTIONS="-H posix"
28042 export TAR_OPTIONS
28043 rm -rf *
28044
28045
28046 test -z "`sort < /dev/null 2>&1`" || exit 77
28047
28048
28049 decho Creating directory structure
28050 mkdir directory
28051 mkdir directory/subdir
28052 genfile --file=directory/file
28053
28054 decho Creating initial archive
28055 tar -cf archive.1 -g db.1 directory
28056
28057 decho Renaming
28058 mv directory/subdir directory/subdir.0
28059 mv directory dir
28060
28061 decho Creating incremental archive
28062 cp db.1 db.2
28063 tar -cf archive.2 -g db.2 dir
28064
28065 mv dir orig
28066
28067 decho First restore
28068 tar -xf archive.1 -g db.1 --warning=no-timestamp
28069 find directory | sort
28070
28071 decho Second restore
28072 tar -xf archive.2 -g db.2 --warning=no-timestamp
28073 find dir | sort
28074 )
28075 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28076 at_status=$? at_failed=false
28077 $at_check_filter
28078 echo >>"$at_stderr"; $as_echo "Creating directory structure
28079 Creating initial archive
28080 Renaming
28081 Creating incremental archive
28082 First restore
28083 Second restore
28084 " | \
28085   $at_diff - "$at_stderr" || at_failed=:
28086 echo >>"$at_stdout"; $as_echo "Creating directory structure
28087 Creating initial archive
28088 Renaming
28089 Creating incremental archive
28090 First restore
28091 directory
28092 directory/file
28093 directory/subdir
28094 Second restore
28095 dir
28096 dir/subdir.0
28097 " | \
28098   $at_diff - "$at_stdout" || at_failed=:
28099 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
28100 $at_failed && at_fn_log_failure
28101 $at_traceon; }
28102
28103
28104
28105
28106   set +x
28107   $at_times_p && times >"$at_times_file"
28108 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28109 read at_status <"$at_status_file"
28110 #AT_STOP_112
28111 #AT_START_113
28112 at_fn_group_banner 113 'chtype.at:27' \
28113   "changed file types in incrementals" "             " 13
28114 at_xfail=no
28115       test -f $XFAILFILE && at_xfail=yes
28116 (
28117   $as_echo "113. $at_setup_line: testing $at_desc ..."
28118   $at_traceon
28119
28120
28121
28122
28123
28124   { set +x
28125 $as_echo "$at_srcdir/chtype.at:30:
28126 mkdir gnu
28127 (cd gnu
28128 TEST_TAR_FORMAT=gnu
28129 export TEST_TAR_FORMAT
28130 TAR_OPTIONS=\"-H gnu\"
28131 export TAR_OPTIONS
28132 rm -rf *
28133
28134
28135 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
28136
28137
28138 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
28139 mkdir directory/a
28140 genfile --file directory/a/a
28141
28142 echo First backup
28143 tar --create --file=archive.1 --listed-incremental=db.1 directory
28144
28145 sleep 2
28146
28147 # Remove directory b and create a file with this name.
28148 # Previous versions were not able to restore over this file.
28149 rm -r directory/b
28150 genfile --file directory/b
28151 genfile --file directory/a/b
28152
28153 echo Second backup
28154 tar --create --file=archive.2 --listed-incremental=db.2 directory
28155
28156 # Delete a
28157 rm -r directory
28158
28159 echo Restore archive.1
28160 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
28161 echo Restore archive.2
28162 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
28163 find directory | sort
28164 )"
28165 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
28166 ( $at_check_trace;
28167 mkdir gnu
28168 (cd gnu
28169 TEST_TAR_FORMAT=gnu
28170 export TEST_TAR_FORMAT
28171 TAR_OPTIONS="-H gnu"
28172 export TAR_OPTIONS
28173 rm -rf *
28174
28175
28176 test -z "`sort < /dev/null 2>&1`" || exit 77
28177
28178
28179 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
28180 mkdir directory/a
28181 genfile --file directory/a/a
28182
28183 echo First backup
28184 tar --create --file=archive.1 --listed-incremental=db.1 directory
28185
28186 sleep 2
28187
28188 # Remove directory b and create a file with this name.
28189 # Previous versions were not able to restore over this file.
28190 rm -r directory/b
28191 genfile --file directory/b
28192 genfile --file directory/a/b
28193
28194 echo Second backup
28195 tar --create --file=archive.2 --listed-incremental=db.2 directory
28196
28197 # Delete a
28198 rm -r directory
28199
28200 echo Restore archive.1
28201 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
28202 echo Restore archive.2
28203 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
28204 find directory | sort
28205 )
28206 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28207 at_status=$? at_failed=false
28208 $at_check_filter
28209 at_fn_diff_devnull "$at_stderr" || at_failed=:
28210 echo >>"$at_stdout"; $as_echo "First backup
28211 Second backup
28212 Restore archive.1
28213 Restore archive.2
28214 directory
28215 directory/a
28216 directory/a/a
28217 directory/a/b
28218 directory/b
28219 " | \
28220   $at_diff - "$at_stdout" || at_failed=:
28221 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
28222 $at_failed && at_fn_log_failure
28223 $at_traceon; }
28224
28225               { set +x
28226 $as_echo "$at_srcdir/chtype.at:30:
28227 mkdir oldgnu
28228 (cd oldgnu
28229 TEST_TAR_FORMAT=oldgnu
28230 export TEST_TAR_FORMAT
28231 TAR_OPTIONS=\"-H oldgnu\"
28232 export TAR_OPTIONS
28233 rm -rf *
28234
28235
28236 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
28237
28238
28239 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
28240 mkdir directory/a
28241 genfile --file directory/a/a
28242
28243 echo First backup
28244 tar --create --file=archive.1 --listed-incremental=db.1 directory
28245
28246 sleep 2
28247
28248 # Remove directory b and create a file with this name.
28249 # Previous versions were not able to restore over this file.
28250 rm -r directory/b
28251 genfile --file directory/b
28252 genfile --file directory/a/b
28253
28254 echo Second backup
28255 tar --create --file=archive.2 --listed-incremental=db.2 directory
28256
28257 # Delete a
28258 rm -r directory
28259
28260 echo Restore archive.1
28261 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
28262 echo Restore archive.2
28263 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
28264 find directory | sort
28265 )"
28266 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
28267 ( $at_check_trace;
28268 mkdir oldgnu
28269 (cd oldgnu
28270 TEST_TAR_FORMAT=oldgnu
28271 export TEST_TAR_FORMAT
28272 TAR_OPTIONS="-H oldgnu"
28273 export TAR_OPTIONS
28274 rm -rf *
28275
28276
28277 test -z "`sort < /dev/null 2>&1`" || exit 77
28278
28279
28280 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
28281 mkdir directory/a
28282 genfile --file directory/a/a
28283
28284 echo First backup
28285 tar --create --file=archive.1 --listed-incremental=db.1 directory
28286
28287 sleep 2
28288
28289 # Remove directory b and create a file with this name.
28290 # Previous versions were not able to restore over this file.
28291 rm -r directory/b
28292 genfile --file directory/b
28293 genfile --file directory/a/b
28294
28295 echo Second backup
28296 tar --create --file=archive.2 --listed-incremental=db.2 directory
28297
28298 # Delete a
28299 rm -r directory
28300
28301 echo Restore archive.1
28302 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
28303 echo Restore archive.2
28304 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
28305 find directory | sort
28306 )
28307 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28308 at_status=$? at_failed=false
28309 $at_check_filter
28310 at_fn_diff_devnull "$at_stderr" || at_failed=:
28311 echo >>"$at_stdout"; $as_echo "First backup
28312 Second backup
28313 Restore archive.1
28314 Restore archive.2
28315 directory
28316 directory/a
28317 directory/a/a
28318 directory/a/b
28319 directory/b
28320 " | \
28321   $at_diff - "$at_stdout" || at_failed=:
28322 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
28323 $at_failed && at_fn_log_failure
28324 $at_traceon; }
28325
28326               { set +x
28327 $as_echo "$at_srcdir/chtype.at:30:
28328 mkdir posix
28329 (cd posix
28330 TEST_TAR_FORMAT=posix
28331 export TEST_TAR_FORMAT
28332 TAR_OPTIONS=\"-H posix\"
28333 export TAR_OPTIONS
28334 rm -rf *
28335
28336
28337 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
28338
28339
28340 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
28341 mkdir directory/a
28342 genfile --file directory/a/a
28343
28344 echo First backup
28345 tar --create --file=archive.1 --listed-incremental=db.1 directory
28346
28347 sleep 2
28348
28349 # Remove directory b and create a file with this name.
28350 # Previous versions were not able to restore over this file.
28351 rm -r directory/b
28352 genfile --file directory/b
28353 genfile --file directory/a/b
28354
28355 echo Second backup
28356 tar --create --file=archive.2 --listed-incremental=db.2 directory
28357
28358 # Delete a
28359 rm -r directory
28360
28361 echo Restore archive.1
28362 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
28363 echo Restore archive.2
28364 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
28365 find directory | sort
28366 )"
28367 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
28368 ( $at_check_trace;
28369 mkdir posix
28370 (cd posix
28371 TEST_TAR_FORMAT=posix
28372 export TEST_TAR_FORMAT
28373 TAR_OPTIONS="-H posix"
28374 export TAR_OPTIONS
28375 rm -rf *
28376
28377
28378 test -z "`sort < /dev/null 2>&1`" || exit 77
28379
28380
28381 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
28382 mkdir directory/a
28383 genfile --file directory/a/a
28384
28385 echo First backup
28386 tar --create --file=archive.1 --listed-incremental=db.1 directory
28387
28388 sleep 2
28389
28390 # Remove directory b and create a file with this name.
28391 # Previous versions were not able to restore over this file.
28392 rm -r directory/b
28393 genfile --file directory/b
28394 genfile --file directory/a/b
28395
28396 echo Second backup
28397 tar --create --file=archive.2 --listed-incremental=db.2 directory
28398
28399 # Delete a
28400 rm -r directory
28401
28402 echo Restore archive.1
28403 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
28404 echo Restore archive.2
28405 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
28406 find directory | sort
28407 )
28408 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28409 at_status=$? at_failed=false
28410 $at_check_filter
28411 at_fn_diff_devnull "$at_stderr" || at_failed=:
28412 echo >>"$at_stdout"; $as_echo "First backup
28413 Second backup
28414 Restore archive.1
28415 Restore archive.2
28416 directory
28417 directory/a
28418 directory/a/a
28419 directory/a/b
28420 directory/b
28421 " | \
28422   $at_diff - "$at_stdout" || at_failed=:
28423 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
28424 $at_failed && at_fn_log_failure
28425 $at_traceon; }
28426
28427
28428
28429
28430   set +x
28431   $at_times_p && times >"$at_times_file"
28432 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28433 read at_status <"$at_status_file"
28434 #AT_STOP_113
28435 #AT_START_114
28436 at_fn_group_banner 114 'ignfail.at:24' \
28437   "ignfail" "                                        " 14
28438 at_xfail=no
28439       test -f $XFAILFILE && at_xfail=yes
28440 (
28441   $as_echo "114. $at_setup_line: testing $at_desc ..."
28442   $at_traceon
28443
28444
28445
28446
28447
28448   { set +x
28449 $as_echo "$at_srcdir/ignfail.at:27:
28450 mkdir v7
28451 (cd v7
28452 TEST_TAR_FORMAT=v7
28453 export TEST_TAR_FORMAT
28454 TAR_OPTIONS=\"-H v7\"
28455 export TAR_OPTIONS
28456 rm -rf *
28457
28458 # The test is meaningless for super-user.
28459
28460 echo \"test\" > \$\$
28461 chmod 0 \$\$
28462 cat \$\$ > /dev/null 2>&1
28463 result=\$?
28464 rm -f \$\$
28465 test \$result -eq 0 && exit 77
28466
28467
28468 touch file
28469 mkdir directory
28470 touch directory/file
28471
28472 echo 1>&2 -----
28473 chmod 000 file
28474 tar cf archive file
28475 status=\$?
28476 chmod 600 file
28477 test \$status = 2 || exit 1
28478
28479 echo 1>&2 -----
28480 chmod 000 file
28481 tar cf archive --ignore-failed-read file || exit 1
28482 status=\$?
28483 chmod 600 file
28484 test \$status = 0 || exit 1
28485
28486 echo 1>&2 -----
28487 chmod 000 directory
28488 tar cf archive directory
28489 status=\$?
28490 chmod 700 directory
28491 test \$status = 2 || exit 1
28492
28493 echo 1>&2 -----
28494 chmod 000 directory
28495 tar cf archive --ignore-failed-read directory || exit 1
28496 status=\$?
28497 chmod 700 directory
28498 test \$status = 0
28499 )"
28500 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
28501 ( $at_check_trace;
28502 mkdir v7
28503 (cd v7
28504 TEST_TAR_FORMAT=v7
28505 export TEST_TAR_FORMAT
28506 TAR_OPTIONS="-H v7"
28507 export TAR_OPTIONS
28508 rm -rf *
28509
28510 # The test is meaningless for super-user.
28511
28512 echo "test" > $$
28513 chmod 0 $$
28514 cat $$ > /dev/null 2>&1
28515 result=$?
28516 rm -f $$
28517 test $result -eq 0 && exit 77
28518
28519
28520 touch file
28521 mkdir directory
28522 touch directory/file
28523
28524 echo 1>&2 -----
28525 chmod 000 file
28526 tar cf archive file
28527 status=$?
28528 chmod 600 file
28529 test $status = 2 || exit 1
28530
28531 echo 1>&2 -----
28532 chmod 000 file
28533 tar cf archive --ignore-failed-read file || exit 1
28534 status=$?
28535 chmod 600 file
28536 test $status = 0 || exit 1
28537
28538 echo 1>&2 -----
28539 chmod 000 directory
28540 tar cf archive directory
28541 status=$?
28542 chmod 700 directory
28543 test $status = 2 || exit 1
28544
28545 echo 1>&2 -----
28546 chmod 000 directory
28547 tar cf archive --ignore-failed-read directory || exit 1
28548 status=$?
28549 chmod 700 directory
28550 test $status = 0
28551 )
28552 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28553 at_status=$? at_failed=false
28554 $at_check_filter
28555 echo >>"$at_stderr"; $as_echo "-----
28556 tar: file: Cannot open: Permission denied
28557 tar: Exiting with failure status due to previous errors
28558 -----
28559 tar: file: Warning: Cannot open: Permission denied
28560 -----
28561 tar: directory: Cannot open: Permission denied
28562 tar: Exiting with failure status due to previous errors
28563 -----
28564 tar: directory: Warning: Cannot open: Permission denied
28565 " | \
28566   $at_diff - "$at_stderr" || at_failed=:
28567 at_fn_diff_devnull "$at_stdout" || at_failed=:
28568 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
28569 $at_failed && at_fn_log_failure
28570 $at_traceon; }
28571
28572               { set +x
28573 $as_echo "$at_srcdir/ignfail.at:27:
28574 mkdir oldgnu
28575 (cd oldgnu
28576 TEST_TAR_FORMAT=oldgnu
28577 export TEST_TAR_FORMAT
28578 TAR_OPTIONS=\"-H oldgnu\"
28579 export TAR_OPTIONS
28580 rm -rf *
28581
28582 # The test is meaningless for super-user.
28583
28584 echo \"test\" > \$\$
28585 chmod 0 \$\$
28586 cat \$\$ > /dev/null 2>&1
28587 result=\$?
28588 rm -f \$\$
28589 test \$result -eq 0 && exit 77
28590
28591
28592 touch file
28593 mkdir directory
28594 touch directory/file
28595
28596 echo 1>&2 -----
28597 chmod 000 file
28598 tar cf archive file
28599 status=\$?
28600 chmod 600 file
28601 test \$status = 2 || exit 1
28602
28603 echo 1>&2 -----
28604 chmod 000 file
28605 tar cf archive --ignore-failed-read file || exit 1
28606 status=\$?
28607 chmod 600 file
28608 test \$status = 0 || exit 1
28609
28610 echo 1>&2 -----
28611 chmod 000 directory
28612 tar cf archive directory
28613 status=\$?
28614 chmod 700 directory
28615 test \$status = 2 || exit 1
28616
28617 echo 1>&2 -----
28618 chmod 000 directory
28619 tar cf archive --ignore-failed-read directory || exit 1
28620 status=\$?
28621 chmod 700 directory
28622 test \$status = 0
28623 )"
28624 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
28625 ( $at_check_trace;
28626 mkdir oldgnu
28627 (cd oldgnu
28628 TEST_TAR_FORMAT=oldgnu
28629 export TEST_TAR_FORMAT
28630 TAR_OPTIONS="-H oldgnu"
28631 export TAR_OPTIONS
28632 rm -rf *
28633
28634 # The test is meaningless for super-user.
28635
28636 echo "test" > $$
28637 chmod 0 $$
28638 cat $$ > /dev/null 2>&1
28639 result=$?
28640 rm -f $$
28641 test $result -eq 0 && exit 77
28642
28643
28644 touch file
28645 mkdir directory
28646 touch directory/file
28647
28648 echo 1>&2 -----
28649 chmod 000 file
28650 tar cf archive file
28651 status=$?
28652 chmod 600 file
28653 test $status = 2 || exit 1
28654
28655 echo 1>&2 -----
28656 chmod 000 file
28657 tar cf archive --ignore-failed-read file || exit 1
28658 status=$?
28659 chmod 600 file
28660 test $status = 0 || exit 1
28661
28662 echo 1>&2 -----
28663 chmod 000 directory
28664 tar cf archive directory
28665 status=$?
28666 chmod 700 directory
28667 test $status = 2 || exit 1
28668
28669 echo 1>&2 -----
28670 chmod 000 directory
28671 tar cf archive --ignore-failed-read directory || exit 1
28672 status=$?
28673 chmod 700 directory
28674 test $status = 0
28675 )
28676 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28677 at_status=$? at_failed=false
28678 $at_check_filter
28679 echo >>"$at_stderr"; $as_echo "-----
28680 tar: file: Cannot open: Permission denied
28681 tar: Exiting with failure status due to previous errors
28682 -----
28683 tar: file: Warning: Cannot open: Permission denied
28684 -----
28685 tar: directory: Cannot open: Permission denied
28686 tar: Exiting with failure status due to previous errors
28687 -----
28688 tar: directory: Warning: Cannot open: Permission denied
28689 " | \
28690   $at_diff - "$at_stderr" || at_failed=:
28691 at_fn_diff_devnull "$at_stdout" || at_failed=:
28692 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
28693 $at_failed && at_fn_log_failure
28694 $at_traceon; }
28695
28696               { set +x
28697 $as_echo "$at_srcdir/ignfail.at:27:
28698 mkdir ustar
28699 (cd ustar
28700 TEST_TAR_FORMAT=ustar
28701 export TEST_TAR_FORMAT
28702 TAR_OPTIONS=\"-H ustar\"
28703 export TAR_OPTIONS
28704 rm -rf *
28705
28706 # The test is meaningless for super-user.
28707
28708 echo \"test\" > \$\$
28709 chmod 0 \$\$
28710 cat \$\$ > /dev/null 2>&1
28711 result=\$?
28712 rm -f \$\$
28713 test \$result -eq 0 && exit 77
28714
28715
28716 touch file
28717 mkdir directory
28718 touch directory/file
28719
28720 echo 1>&2 -----
28721 chmod 000 file
28722 tar cf archive file
28723 status=\$?
28724 chmod 600 file
28725 test \$status = 2 || exit 1
28726
28727 echo 1>&2 -----
28728 chmod 000 file
28729 tar cf archive --ignore-failed-read file || exit 1
28730 status=\$?
28731 chmod 600 file
28732 test \$status = 0 || exit 1
28733
28734 echo 1>&2 -----
28735 chmod 000 directory
28736 tar cf archive directory
28737 status=\$?
28738 chmod 700 directory
28739 test \$status = 2 || exit 1
28740
28741 echo 1>&2 -----
28742 chmod 000 directory
28743 tar cf archive --ignore-failed-read directory || exit 1
28744 status=\$?
28745 chmod 700 directory
28746 test \$status = 0
28747 )"
28748 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
28749 ( $at_check_trace;
28750 mkdir ustar
28751 (cd ustar
28752 TEST_TAR_FORMAT=ustar
28753 export TEST_TAR_FORMAT
28754 TAR_OPTIONS="-H ustar"
28755 export TAR_OPTIONS
28756 rm -rf *
28757
28758 # The test is meaningless for super-user.
28759
28760 echo "test" > $$
28761 chmod 0 $$
28762 cat $$ > /dev/null 2>&1
28763 result=$?
28764 rm -f $$
28765 test $result -eq 0 && exit 77
28766
28767
28768 touch file
28769 mkdir directory
28770 touch directory/file
28771
28772 echo 1>&2 -----
28773 chmod 000 file
28774 tar cf archive file
28775 status=$?
28776 chmod 600 file
28777 test $status = 2 || exit 1
28778
28779 echo 1>&2 -----
28780 chmod 000 file
28781 tar cf archive --ignore-failed-read file || exit 1
28782 status=$?
28783 chmod 600 file
28784 test $status = 0 || exit 1
28785
28786 echo 1>&2 -----
28787 chmod 000 directory
28788 tar cf archive directory
28789 status=$?
28790 chmod 700 directory
28791 test $status = 2 || exit 1
28792
28793 echo 1>&2 -----
28794 chmod 000 directory
28795 tar cf archive --ignore-failed-read directory || exit 1
28796 status=$?
28797 chmod 700 directory
28798 test $status = 0
28799 )
28800 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28801 at_status=$? at_failed=false
28802 $at_check_filter
28803 echo >>"$at_stderr"; $as_echo "-----
28804 tar: file: Cannot open: Permission denied
28805 tar: Exiting with failure status due to previous errors
28806 -----
28807 tar: file: Warning: Cannot open: Permission denied
28808 -----
28809 tar: directory: Cannot open: Permission denied
28810 tar: Exiting with failure status due to previous errors
28811 -----
28812 tar: directory: Warning: Cannot open: Permission denied
28813 " | \
28814   $at_diff - "$at_stderr" || at_failed=:
28815 at_fn_diff_devnull "$at_stdout" || at_failed=:
28816 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
28817 $at_failed && at_fn_log_failure
28818 $at_traceon; }
28819
28820               { set +x
28821 $as_echo "$at_srcdir/ignfail.at:27:
28822 mkdir posix
28823 (cd posix
28824 TEST_TAR_FORMAT=posix
28825 export TEST_TAR_FORMAT
28826 TAR_OPTIONS=\"-H posix\"
28827 export TAR_OPTIONS
28828 rm -rf *
28829
28830 # The test is meaningless for super-user.
28831
28832 echo \"test\" > \$\$
28833 chmod 0 \$\$
28834 cat \$\$ > /dev/null 2>&1
28835 result=\$?
28836 rm -f \$\$
28837 test \$result -eq 0 && exit 77
28838
28839
28840 touch file
28841 mkdir directory
28842 touch directory/file
28843
28844 echo 1>&2 -----
28845 chmod 000 file
28846 tar cf archive file
28847 status=\$?
28848 chmod 600 file
28849 test \$status = 2 || exit 1
28850
28851 echo 1>&2 -----
28852 chmod 000 file
28853 tar cf archive --ignore-failed-read file || exit 1
28854 status=\$?
28855 chmod 600 file
28856 test \$status = 0 || exit 1
28857
28858 echo 1>&2 -----
28859 chmod 000 directory
28860 tar cf archive directory
28861 status=\$?
28862 chmod 700 directory
28863 test \$status = 2 || exit 1
28864
28865 echo 1>&2 -----
28866 chmod 000 directory
28867 tar cf archive --ignore-failed-read directory || exit 1
28868 status=\$?
28869 chmod 700 directory
28870 test \$status = 0
28871 )"
28872 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
28873 ( $at_check_trace;
28874 mkdir posix
28875 (cd posix
28876 TEST_TAR_FORMAT=posix
28877 export TEST_TAR_FORMAT
28878 TAR_OPTIONS="-H posix"
28879 export TAR_OPTIONS
28880 rm -rf *
28881
28882 # The test is meaningless for super-user.
28883
28884 echo "test" > $$
28885 chmod 0 $$
28886 cat $$ > /dev/null 2>&1
28887 result=$?
28888 rm -f $$
28889 test $result -eq 0 && exit 77
28890
28891
28892 touch file
28893 mkdir directory
28894 touch directory/file
28895
28896 echo 1>&2 -----
28897 chmod 000 file
28898 tar cf archive file
28899 status=$?
28900 chmod 600 file
28901 test $status = 2 || exit 1
28902
28903 echo 1>&2 -----
28904 chmod 000 file
28905 tar cf archive --ignore-failed-read file || exit 1
28906 status=$?
28907 chmod 600 file
28908 test $status = 0 || exit 1
28909
28910 echo 1>&2 -----
28911 chmod 000 directory
28912 tar cf archive directory
28913 status=$?
28914 chmod 700 directory
28915 test $status = 2 || exit 1
28916
28917 echo 1>&2 -----
28918 chmod 000 directory
28919 tar cf archive --ignore-failed-read directory || exit 1
28920 status=$?
28921 chmod 700 directory
28922 test $status = 0
28923 )
28924 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28925 at_status=$? at_failed=false
28926 $at_check_filter
28927 echo >>"$at_stderr"; $as_echo "-----
28928 tar: file: Cannot open: Permission denied
28929 tar: Exiting with failure status due to previous errors
28930 -----
28931 tar: file: Warning: Cannot open: Permission denied
28932 -----
28933 tar: directory: Cannot open: Permission denied
28934 tar: Exiting with failure status due to previous errors
28935 -----
28936 tar: directory: Warning: Cannot open: Permission denied
28937 " | \
28938   $at_diff - "$at_stderr" || at_failed=:
28939 at_fn_diff_devnull "$at_stdout" || at_failed=:
28940 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
28941 $at_failed && at_fn_log_failure
28942 $at_traceon; }
28943
28944               { set +x
28945 $as_echo "$at_srcdir/ignfail.at:27:
28946 mkdir gnu
28947 (cd gnu
28948 TEST_TAR_FORMAT=gnu
28949 export TEST_TAR_FORMAT
28950 TAR_OPTIONS=\"-H gnu\"
28951 export TAR_OPTIONS
28952 rm -rf *
28953
28954 # The test is meaningless for super-user.
28955
28956 echo \"test\" > \$\$
28957 chmod 0 \$\$
28958 cat \$\$ > /dev/null 2>&1
28959 result=\$?
28960 rm -f \$\$
28961 test \$result -eq 0 && exit 77
28962
28963
28964 touch file
28965 mkdir directory
28966 touch directory/file
28967
28968 echo 1>&2 -----
28969 chmod 000 file
28970 tar cf archive file
28971 status=\$?
28972 chmod 600 file
28973 test \$status = 2 || exit 1
28974
28975 echo 1>&2 -----
28976 chmod 000 file
28977 tar cf archive --ignore-failed-read file || exit 1
28978 status=\$?
28979 chmod 600 file
28980 test \$status = 0 || exit 1
28981
28982 echo 1>&2 -----
28983 chmod 000 directory
28984 tar cf archive directory
28985 status=\$?
28986 chmod 700 directory
28987 test \$status = 2 || exit 1
28988
28989 echo 1>&2 -----
28990 chmod 000 directory
28991 tar cf archive --ignore-failed-read directory || exit 1
28992 status=\$?
28993 chmod 700 directory
28994 test \$status = 0
28995 )"
28996 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:27"
28997 ( $at_check_trace;
28998 mkdir gnu
28999 (cd gnu
29000 TEST_TAR_FORMAT=gnu
29001 export TEST_TAR_FORMAT
29002 TAR_OPTIONS="-H gnu"
29003 export TAR_OPTIONS
29004 rm -rf *
29005
29006 # The test is meaningless for super-user.
29007
29008 echo "test" > $$
29009 chmod 0 $$
29010 cat $$ > /dev/null 2>&1
29011 result=$?
29012 rm -f $$
29013 test $result -eq 0 && exit 77
29014
29015
29016 touch file
29017 mkdir directory
29018 touch directory/file
29019
29020 echo 1>&2 -----
29021 chmod 000 file
29022 tar cf archive file
29023 status=$?
29024 chmod 600 file
29025 test $status = 2 || exit 1
29026
29027 echo 1>&2 -----
29028 chmod 000 file
29029 tar cf archive --ignore-failed-read file || exit 1
29030 status=$?
29031 chmod 600 file
29032 test $status = 0 || exit 1
29033
29034 echo 1>&2 -----
29035 chmod 000 directory
29036 tar cf archive directory
29037 status=$?
29038 chmod 700 directory
29039 test $status = 2 || exit 1
29040
29041 echo 1>&2 -----
29042 chmod 000 directory
29043 tar cf archive --ignore-failed-read directory || exit 1
29044 status=$?
29045 chmod 700 directory
29046 test $status = 0
29047 )
29048 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29049 at_status=$? at_failed=false
29050 $at_check_filter
29051 echo >>"$at_stderr"; $as_echo "-----
29052 tar: file: Cannot open: Permission denied
29053 tar: Exiting with failure status due to previous errors
29054 -----
29055 tar: file: Warning: Cannot open: Permission denied
29056 -----
29057 tar: directory: Cannot open: Permission denied
29058 tar: Exiting with failure status due to previous errors
29059 -----
29060 tar: directory: Warning: Cannot open: Permission denied
29061 " | \
29062   $at_diff - "$at_stderr" || at_failed=:
29063 at_fn_diff_devnull "$at_stdout" || at_failed=:
29064 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:27"
29065 $at_failed && at_fn_log_failure
29066 $at_traceon; }
29067
29068
29069
29070
29071   set +x
29072   $at_times_p && times >"$at_times_file"
29073 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29074 read at_status <"$at_status_file"
29075 #AT_STOP_114
29076 #AT_START_115
29077 at_fn_group_banner 115 'link01.at:34' \
29078   "link count gt 2" "                                " 15
29079 at_xfail=no
29080       test -f $XFAILFILE && at_xfail=yes
29081 (
29082   $as_echo "115. $at_setup_line: testing $at_desc ..."
29083   $at_traceon
29084
29085
29086
29087
29088
29089   { set +x
29090 $as_echo "$at_srcdir/link01.at:37:
29091 mkdir v7
29092 (cd v7
29093 TEST_TAR_FORMAT=v7
29094 export TEST_TAR_FORMAT
29095 TAR_OPTIONS=\"-H v7\"
29096 export TAR_OPTIONS
29097 rm -rf *
29098
29099 mkdir directory
29100 mkdir directory/test1
29101 mkdir directory/test2
29102
29103 echo TEST > directory/test1/test.txt
29104 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29105
29106 tar cf archive directory/test1/test.txt directory/test1/test.txt
29107
29108 rm -r directory
29109 tar xf archive --warning=no-timestamp
29110
29111 ls directory/test1
29112 )"
29113 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
29114 ( $at_check_trace;
29115 mkdir v7
29116 (cd v7
29117 TEST_TAR_FORMAT=v7
29118 export TEST_TAR_FORMAT
29119 TAR_OPTIONS="-H v7"
29120 export TAR_OPTIONS
29121 rm -rf *
29122
29123 mkdir directory
29124 mkdir directory/test1
29125 mkdir directory/test2
29126
29127 echo TEST > directory/test1/test.txt
29128 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29129
29130 tar cf archive directory/test1/test.txt directory/test1/test.txt
29131
29132 rm -r directory
29133 tar xf archive --warning=no-timestamp
29134
29135 ls directory/test1
29136 )
29137 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29138 at_status=$? at_failed=false
29139 $at_check_filter
29140 at_fn_diff_devnull "$at_stderr" || at_failed=:
29141 echo >>"$at_stdout"; $as_echo "test.txt
29142 " | \
29143   $at_diff - "$at_stdout" || at_failed=:
29144 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
29145 $at_failed && at_fn_log_failure
29146 $at_traceon; }
29147
29148               { set +x
29149 $as_echo "$at_srcdir/link01.at:37:
29150 mkdir oldgnu
29151 (cd oldgnu
29152 TEST_TAR_FORMAT=oldgnu
29153 export TEST_TAR_FORMAT
29154 TAR_OPTIONS=\"-H oldgnu\"
29155 export TAR_OPTIONS
29156 rm -rf *
29157
29158 mkdir directory
29159 mkdir directory/test1
29160 mkdir directory/test2
29161
29162 echo TEST > directory/test1/test.txt
29163 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29164
29165 tar cf archive directory/test1/test.txt directory/test1/test.txt
29166
29167 rm -r directory
29168 tar xf archive --warning=no-timestamp
29169
29170 ls directory/test1
29171 )"
29172 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
29173 ( $at_check_trace;
29174 mkdir oldgnu
29175 (cd oldgnu
29176 TEST_TAR_FORMAT=oldgnu
29177 export TEST_TAR_FORMAT
29178 TAR_OPTIONS="-H oldgnu"
29179 export TAR_OPTIONS
29180 rm -rf *
29181
29182 mkdir directory
29183 mkdir directory/test1
29184 mkdir directory/test2
29185
29186 echo TEST > directory/test1/test.txt
29187 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29188
29189 tar cf archive directory/test1/test.txt directory/test1/test.txt
29190
29191 rm -r directory
29192 tar xf archive --warning=no-timestamp
29193
29194 ls directory/test1
29195 )
29196 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29197 at_status=$? at_failed=false
29198 $at_check_filter
29199 at_fn_diff_devnull "$at_stderr" || at_failed=:
29200 echo >>"$at_stdout"; $as_echo "test.txt
29201 " | \
29202   $at_diff - "$at_stdout" || at_failed=:
29203 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
29204 $at_failed && at_fn_log_failure
29205 $at_traceon; }
29206
29207               { set +x
29208 $as_echo "$at_srcdir/link01.at:37:
29209 mkdir ustar
29210 (cd ustar
29211 TEST_TAR_FORMAT=ustar
29212 export TEST_TAR_FORMAT
29213 TAR_OPTIONS=\"-H ustar\"
29214 export TAR_OPTIONS
29215 rm -rf *
29216
29217 mkdir directory
29218 mkdir directory/test1
29219 mkdir directory/test2
29220
29221 echo TEST > directory/test1/test.txt
29222 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29223
29224 tar cf archive directory/test1/test.txt directory/test1/test.txt
29225
29226 rm -r directory
29227 tar xf archive --warning=no-timestamp
29228
29229 ls directory/test1
29230 )"
29231 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
29232 ( $at_check_trace;
29233 mkdir ustar
29234 (cd ustar
29235 TEST_TAR_FORMAT=ustar
29236 export TEST_TAR_FORMAT
29237 TAR_OPTIONS="-H ustar"
29238 export TAR_OPTIONS
29239 rm -rf *
29240
29241 mkdir directory
29242 mkdir directory/test1
29243 mkdir directory/test2
29244
29245 echo TEST > directory/test1/test.txt
29246 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29247
29248 tar cf archive directory/test1/test.txt directory/test1/test.txt
29249
29250 rm -r directory
29251 tar xf archive --warning=no-timestamp
29252
29253 ls directory/test1
29254 )
29255 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29256 at_status=$? at_failed=false
29257 $at_check_filter
29258 at_fn_diff_devnull "$at_stderr" || at_failed=:
29259 echo >>"$at_stdout"; $as_echo "test.txt
29260 " | \
29261   $at_diff - "$at_stdout" || at_failed=:
29262 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
29263 $at_failed && at_fn_log_failure
29264 $at_traceon; }
29265
29266               { set +x
29267 $as_echo "$at_srcdir/link01.at:37:
29268 mkdir posix
29269 (cd posix
29270 TEST_TAR_FORMAT=posix
29271 export TEST_TAR_FORMAT
29272 TAR_OPTIONS=\"-H posix\"
29273 export TAR_OPTIONS
29274 rm -rf *
29275
29276 mkdir directory
29277 mkdir directory/test1
29278 mkdir directory/test2
29279
29280 echo TEST > directory/test1/test.txt
29281 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29282
29283 tar cf archive directory/test1/test.txt directory/test1/test.txt
29284
29285 rm -r directory
29286 tar xf archive --warning=no-timestamp
29287
29288 ls directory/test1
29289 )"
29290 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
29291 ( $at_check_trace;
29292 mkdir posix
29293 (cd posix
29294 TEST_TAR_FORMAT=posix
29295 export TEST_TAR_FORMAT
29296 TAR_OPTIONS="-H posix"
29297 export TAR_OPTIONS
29298 rm -rf *
29299
29300 mkdir directory
29301 mkdir directory/test1
29302 mkdir directory/test2
29303
29304 echo TEST > directory/test1/test.txt
29305 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29306
29307 tar cf archive directory/test1/test.txt directory/test1/test.txt
29308
29309 rm -r directory
29310 tar xf archive --warning=no-timestamp
29311
29312 ls directory/test1
29313 )
29314 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29315 at_status=$? at_failed=false
29316 $at_check_filter
29317 at_fn_diff_devnull "$at_stderr" || at_failed=:
29318 echo >>"$at_stdout"; $as_echo "test.txt
29319 " | \
29320   $at_diff - "$at_stdout" || at_failed=:
29321 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
29322 $at_failed && at_fn_log_failure
29323 $at_traceon; }
29324
29325               { set +x
29326 $as_echo "$at_srcdir/link01.at:37:
29327 mkdir gnu
29328 (cd gnu
29329 TEST_TAR_FORMAT=gnu
29330 export TEST_TAR_FORMAT
29331 TAR_OPTIONS=\"-H gnu\"
29332 export TAR_OPTIONS
29333 rm -rf *
29334
29335 mkdir directory
29336 mkdir directory/test1
29337 mkdir directory/test2
29338
29339 echo TEST > directory/test1/test.txt
29340 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29341
29342 tar cf archive directory/test1/test.txt directory/test1/test.txt
29343
29344 rm -r directory
29345 tar xf archive --warning=no-timestamp
29346
29347 ls directory/test1
29348 )"
29349 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:37"
29350 ( $at_check_trace;
29351 mkdir gnu
29352 (cd gnu
29353 TEST_TAR_FORMAT=gnu
29354 export TEST_TAR_FORMAT
29355 TAR_OPTIONS="-H gnu"
29356 export TAR_OPTIONS
29357 rm -rf *
29358
29359 mkdir directory
29360 mkdir directory/test1
29361 mkdir directory/test2
29362
29363 echo TEST > directory/test1/test.txt
29364 ln directory/test1/test.txt directory/test2/test.txt || exit 77
29365
29366 tar cf archive directory/test1/test.txt directory/test1/test.txt
29367
29368 rm -r directory
29369 tar xf archive --warning=no-timestamp
29370
29371 ls directory/test1
29372 )
29373 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29374 at_status=$? at_failed=false
29375 $at_check_filter
29376 at_fn_diff_devnull "$at_stderr" || at_failed=:
29377 echo >>"$at_stdout"; $as_echo "test.txt
29378 " | \
29379   $at_diff - "$at_stdout" || at_failed=:
29380 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:37"
29381 $at_failed && at_fn_log_failure
29382 $at_traceon; }
29383
29384
29385
29386
29387   set +x
29388   $at_times_p && times >"$at_times_file"
29389 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29390 read at_status <"$at_status_file"
29391 #AT_STOP_115
29392 #AT_START_116
29393 at_fn_group_banner 116 'link02.at:32' \
29394   "preserve hard links with --remove-files" "        " 15
29395 at_xfail=no
29396       test -f $XFAILFILE && at_xfail=yes
29397 (
29398   $as_echo "116. $at_setup_line: testing $at_desc ..."
29399   $at_traceon
29400
29401
29402
29403
29404
29405   { set +x
29406 $as_echo "$at_srcdir/link02.at:35:
29407 mkdir v7
29408 (cd v7
29409 TEST_TAR_FORMAT=v7
29410 export TEST_TAR_FORMAT
29411 TAR_OPTIONS=\"-H v7\"
29412 export TAR_OPTIONS
29413 rm -rf *
29414
29415 genfile -l 64 -f file1
29416 ln file1 file2
29417 ln file2 file3
29418 ln file3 file4
29419 tar -c -f archive --remove-files file1 file2 file3 file4
29420 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29421 )"
29422 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
29423 ( $at_check_trace;
29424 mkdir v7
29425 (cd v7
29426 TEST_TAR_FORMAT=v7
29427 export TEST_TAR_FORMAT
29428 TAR_OPTIONS="-H v7"
29429 export TAR_OPTIONS
29430 rm -rf *
29431
29432 genfile -l 64 -f file1
29433 ln file1 file2
29434 ln file2 file3
29435 ln file3 file4
29436 tar -c -f archive --remove-files file1 file2 file3 file4
29437 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29438 )
29439 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29440 at_status=$? at_failed=false
29441 $at_check_filter
29442 at_fn_diff_devnull "$at_stderr" || at_failed=:
29443 echo >>"$at_stdout"; $as_echo "file1
29444 file1
29445 file1
29446 " | \
29447   $at_diff - "$at_stdout" || at_failed=:
29448 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
29449 $at_failed && at_fn_log_failure
29450 $at_traceon; }
29451
29452               { set +x
29453 $as_echo "$at_srcdir/link02.at:35:
29454 mkdir oldgnu
29455 (cd oldgnu
29456 TEST_TAR_FORMAT=oldgnu
29457 export TEST_TAR_FORMAT
29458 TAR_OPTIONS=\"-H oldgnu\"
29459 export TAR_OPTIONS
29460 rm -rf *
29461
29462 genfile -l 64 -f file1
29463 ln file1 file2
29464 ln file2 file3
29465 ln file3 file4
29466 tar -c -f archive --remove-files file1 file2 file3 file4
29467 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29468 )"
29469 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
29470 ( $at_check_trace;
29471 mkdir oldgnu
29472 (cd oldgnu
29473 TEST_TAR_FORMAT=oldgnu
29474 export TEST_TAR_FORMAT
29475 TAR_OPTIONS="-H oldgnu"
29476 export TAR_OPTIONS
29477 rm -rf *
29478
29479 genfile -l 64 -f file1
29480 ln file1 file2
29481 ln file2 file3
29482 ln file3 file4
29483 tar -c -f archive --remove-files file1 file2 file3 file4
29484 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29485 )
29486 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29487 at_status=$? at_failed=false
29488 $at_check_filter
29489 at_fn_diff_devnull "$at_stderr" || at_failed=:
29490 echo >>"$at_stdout"; $as_echo "file1
29491 file1
29492 file1
29493 " | \
29494   $at_diff - "$at_stdout" || at_failed=:
29495 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
29496 $at_failed && at_fn_log_failure
29497 $at_traceon; }
29498
29499               { set +x
29500 $as_echo "$at_srcdir/link02.at:35:
29501 mkdir ustar
29502 (cd ustar
29503 TEST_TAR_FORMAT=ustar
29504 export TEST_TAR_FORMAT
29505 TAR_OPTIONS=\"-H ustar\"
29506 export TAR_OPTIONS
29507 rm -rf *
29508
29509 genfile -l 64 -f file1
29510 ln file1 file2
29511 ln file2 file3
29512 ln file3 file4
29513 tar -c -f archive --remove-files file1 file2 file3 file4
29514 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29515 )"
29516 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
29517 ( $at_check_trace;
29518 mkdir ustar
29519 (cd ustar
29520 TEST_TAR_FORMAT=ustar
29521 export TEST_TAR_FORMAT
29522 TAR_OPTIONS="-H ustar"
29523 export TAR_OPTIONS
29524 rm -rf *
29525
29526 genfile -l 64 -f file1
29527 ln file1 file2
29528 ln file2 file3
29529 ln file3 file4
29530 tar -c -f archive --remove-files file1 file2 file3 file4
29531 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29532 )
29533 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29534 at_status=$? at_failed=false
29535 $at_check_filter
29536 at_fn_diff_devnull "$at_stderr" || at_failed=:
29537 echo >>"$at_stdout"; $as_echo "file1
29538 file1
29539 file1
29540 " | \
29541   $at_diff - "$at_stdout" || at_failed=:
29542 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
29543 $at_failed && at_fn_log_failure
29544 $at_traceon; }
29545
29546               { set +x
29547 $as_echo "$at_srcdir/link02.at:35:
29548 mkdir posix
29549 (cd posix
29550 TEST_TAR_FORMAT=posix
29551 export TEST_TAR_FORMAT
29552 TAR_OPTIONS=\"-H posix\"
29553 export TAR_OPTIONS
29554 rm -rf *
29555
29556 genfile -l 64 -f file1
29557 ln file1 file2
29558 ln file2 file3
29559 ln file3 file4
29560 tar -c -f archive --remove-files file1 file2 file3 file4
29561 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29562 )"
29563 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
29564 ( $at_check_trace;
29565 mkdir posix
29566 (cd posix
29567 TEST_TAR_FORMAT=posix
29568 export TEST_TAR_FORMAT
29569 TAR_OPTIONS="-H posix"
29570 export TAR_OPTIONS
29571 rm -rf *
29572
29573 genfile -l 64 -f file1
29574 ln file1 file2
29575 ln file2 file3
29576 ln file3 file4
29577 tar -c -f archive --remove-files file1 file2 file3 file4
29578 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29579 )
29580 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29581 at_status=$? at_failed=false
29582 $at_check_filter
29583 at_fn_diff_devnull "$at_stderr" || at_failed=:
29584 echo >>"$at_stdout"; $as_echo "file1
29585 file1
29586 file1
29587 " | \
29588   $at_diff - "$at_stdout" || at_failed=:
29589 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
29590 $at_failed && at_fn_log_failure
29591 $at_traceon; }
29592
29593               { set +x
29594 $as_echo "$at_srcdir/link02.at:35:
29595 mkdir gnu
29596 (cd gnu
29597 TEST_TAR_FORMAT=gnu
29598 export TEST_TAR_FORMAT
29599 TAR_OPTIONS=\"-H gnu\"
29600 export TAR_OPTIONS
29601 rm -rf *
29602
29603 genfile -l 64 -f file1
29604 ln file1 file2
29605 ln file2 file3
29606 ln file3 file4
29607 tar -c -f archive --remove-files file1 file2 file3 file4
29608 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29609 )"
29610 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
29611 ( $at_check_trace;
29612 mkdir gnu
29613 (cd gnu
29614 TEST_TAR_FORMAT=gnu
29615 export TEST_TAR_FORMAT
29616 TAR_OPTIONS="-H gnu"
29617 export TAR_OPTIONS
29618 rm -rf *
29619
29620 genfile -l 64 -f file1
29621 ln file1 file2
29622 ln file2 file3
29623 ln file3 file4
29624 tar -c -f archive --remove-files file1 file2 file3 file4
29625 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
29626 )
29627 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29628 at_status=$? at_failed=false
29629 $at_check_filter
29630 at_fn_diff_devnull "$at_stderr" || at_failed=:
29631 echo >>"$at_stdout"; $as_echo "file1
29632 file1
29633 file1
29634 " | \
29635   $at_diff - "$at_stdout" || at_failed=:
29636 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
29637 $at_failed && at_fn_log_failure
29638 $at_traceon; }
29639
29640
29641
29642
29643   set +x
29644   $at_times_p && times >"$at_times_file"
29645 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29646 read at_status <"$at_status_file"
29647 #AT_STOP_116
29648 #AT_START_117
29649 at_fn_group_banner 117 'link03.at:24' \
29650   "working -l with --remove-files" "                 " 15
29651 at_xfail=no
29652       test -f $XFAILFILE && at_xfail=yes
29653 (
29654   $as_echo "117. $at_setup_line: testing $at_desc ..."
29655   $at_traceon
29656
29657
29658
29659
29660
29661
29662
29663   { set +x
29664 $as_echo "$at_srcdir/link03.at:34:
29665 mkdir v7
29666 (cd v7
29667 TEST_TAR_FORMAT=v7
29668 export TEST_TAR_FORMAT
29669 TAR_OPTIONS=\"-H v7\"
29670 export TAR_OPTIONS
29671 rm -rf *
29672
29673
29674 genfile -l 64 -f file1
29675 ln file1 file2
29676 ln file2 file3
29677 ln file3 file4
29678
29679 echo archive.1
29680 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29681
29682 genfile -l 64 -f file1
29683 ln file1 file2
29684 ln file2 file3
29685 ln file3 file4
29686
29687 echo archive.2
29688 tar -c -f archive.2 -l --remove-files file1 file2 file3
29689 echo testing archive.2
29690 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29691 )"
29692 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
29693 ( $at_check_trace;
29694 mkdir v7
29695 (cd v7
29696 TEST_TAR_FORMAT=v7
29697 export TEST_TAR_FORMAT
29698 TAR_OPTIONS="-H v7"
29699 export TAR_OPTIONS
29700 rm -rf *
29701
29702
29703 genfile -l 64 -f file1
29704 ln file1 file2
29705 ln file2 file3
29706 ln file3 file4
29707
29708 echo archive.1
29709 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29710
29711 genfile -l 64 -f file1
29712 ln file1 file2
29713 ln file2 file3
29714 ln file3 file4
29715
29716 echo archive.2
29717 tar -c -f archive.2 -l --remove-files file1 file2 file3
29718 echo testing archive.2
29719 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29720 )
29721 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29722 at_status=$? at_failed=false
29723 $at_check_filter
29724 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
29725 " | \
29726   $at_diff - "$at_stderr" || at_failed=:
29727 echo >>"$at_stdout"; $as_echo "archive.1
29728 archive.2
29729 testing archive.2
29730 file1
29731 file1
29732 " | \
29733   $at_diff - "$at_stdout" || at_failed=:
29734 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
29735 $at_failed && at_fn_log_failure
29736 $at_traceon; }
29737
29738               { set +x
29739 $as_echo "$at_srcdir/link03.at:34:
29740 mkdir oldgnu
29741 (cd oldgnu
29742 TEST_TAR_FORMAT=oldgnu
29743 export TEST_TAR_FORMAT
29744 TAR_OPTIONS=\"-H oldgnu\"
29745 export TAR_OPTIONS
29746 rm -rf *
29747
29748
29749 genfile -l 64 -f file1
29750 ln file1 file2
29751 ln file2 file3
29752 ln file3 file4
29753
29754 echo archive.1
29755 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29756
29757 genfile -l 64 -f file1
29758 ln file1 file2
29759 ln file2 file3
29760 ln file3 file4
29761
29762 echo archive.2
29763 tar -c -f archive.2 -l --remove-files file1 file2 file3
29764 echo testing archive.2
29765 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29766 )"
29767 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
29768 ( $at_check_trace;
29769 mkdir oldgnu
29770 (cd oldgnu
29771 TEST_TAR_FORMAT=oldgnu
29772 export TEST_TAR_FORMAT
29773 TAR_OPTIONS="-H oldgnu"
29774 export TAR_OPTIONS
29775 rm -rf *
29776
29777
29778 genfile -l 64 -f file1
29779 ln file1 file2
29780 ln file2 file3
29781 ln file3 file4
29782
29783 echo archive.1
29784 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29785
29786 genfile -l 64 -f file1
29787 ln file1 file2
29788 ln file2 file3
29789 ln file3 file4
29790
29791 echo archive.2
29792 tar -c -f archive.2 -l --remove-files file1 file2 file3
29793 echo testing archive.2
29794 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29795 )
29796 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29797 at_status=$? at_failed=false
29798 $at_check_filter
29799 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
29800 " | \
29801   $at_diff - "$at_stderr" || at_failed=:
29802 echo >>"$at_stdout"; $as_echo "archive.1
29803 archive.2
29804 testing archive.2
29805 file1
29806 file1
29807 " | \
29808   $at_diff - "$at_stdout" || at_failed=:
29809 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
29810 $at_failed && at_fn_log_failure
29811 $at_traceon; }
29812
29813               { set +x
29814 $as_echo "$at_srcdir/link03.at:34:
29815 mkdir ustar
29816 (cd ustar
29817 TEST_TAR_FORMAT=ustar
29818 export TEST_TAR_FORMAT
29819 TAR_OPTIONS=\"-H ustar\"
29820 export TAR_OPTIONS
29821 rm -rf *
29822
29823
29824 genfile -l 64 -f file1
29825 ln file1 file2
29826 ln file2 file3
29827 ln file3 file4
29828
29829 echo archive.1
29830 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29831
29832 genfile -l 64 -f file1
29833 ln file1 file2
29834 ln file2 file3
29835 ln file3 file4
29836
29837 echo archive.2
29838 tar -c -f archive.2 -l --remove-files file1 file2 file3
29839 echo testing archive.2
29840 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29841 )"
29842 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
29843 ( $at_check_trace;
29844 mkdir ustar
29845 (cd ustar
29846 TEST_TAR_FORMAT=ustar
29847 export TEST_TAR_FORMAT
29848 TAR_OPTIONS="-H ustar"
29849 export TAR_OPTIONS
29850 rm -rf *
29851
29852
29853 genfile -l 64 -f file1
29854 ln file1 file2
29855 ln file2 file3
29856 ln file3 file4
29857
29858 echo archive.1
29859 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29860
29861 genfile -l 64 -f file1
29862 ln file1 file2
29863 ln file2 file3
29864 ln file3 file4
29865
29866 echo archive.2
29867 tar -c -f archive.2 -l --remove-files file1 file2 file3
29868 echo testing archive.2
29869 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29870 )
29871 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29872 at_status=$? at_failed=false
29873 $at_check_filter
29874 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
29875 " | \
29876   $at_diff - "$at_stderr" || at_failed=:
29877 echo >>"$at_stdout"; $as_echo "archive.1
29878 archive.2
29879 testing archive.2
29880 file1
29881 file1
29882 " | \
29883   $at_diff - "$at_stdout" || at_failed=:
29884 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
29885 $at_failed && at_fn_log_failure
29886 $at_traceon; }
29887
29888               { set +x
29889 $as_echo "$at_srcdir/link03.at:34:
29890 mkdir posix
29891 (cd posix
29892 TEST_TAR_FORMAT=posix
29893 export TEST_TAR_FORMAT
29894 TAR_OPTIONS=\"-H posix\"
29895 export TAR_OPTIONS
29896 rm -rf *
29897
29898
29899 genfile -l 64 -f file1
29900 ln file1 file2
29901 ln file2 file3
29902 ln file3 file4
29903
29904 echo archive.1
29905 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29906
29907 genfile -l 64 -f file1
29908 ln file1 file2
29909 ln file2 file3
29910 ln file3 file4
29911
29912 echo archive.2
29913 tar -c -f archive.2 -l --remove-files file1 file2 file3
29914 echo testing archive.2
29915 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29916 )"
29917 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
29918 ( $at_check_trace;
29919 mkdir posix
29920 (cd posix
29921 TEST_TAR_FORMAT=posix
29922 export TEST_TAR_FORMAT
29923 TAR_OPTIONS="-H posix"
29924 export TAR_OPTIONS
29925 rm -rf *
29926
29927
29928 genfile -l 64 -f file1
29929 ln file1 file2
29930 ln file2 file3
29931 ln file3 file4
29932
29933 echo archive.1
29934 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29935
29936 genfile -l 64 -f file1
29937 ln file1 file2
29938 ln file2 file3
29939 ln file3 file4
29940
29941 echo archive.2
29942 tar -c -f archive.2 -l --remove-files file1 file2 file3
29943 echo testing archive.2
29944 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29945 )
29946 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29947 at_status=$? at_failed=false
29948 $at_check_filter
29949 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
29950 " | \
29951   $at_diff - "$at_stderr" || at_failed=:
29952 echo >>"$at_stdout"; $as_echo "archive.1
29953 archive.2
29954 testing archive.2
29955 file1
29956 file1
29957 " | \
29958   $at_diff - "$at_stdout" || at_failed=:
29959 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
29960 $at_failed && at_fn_log_failure
29961 $at_traceon; }
29962
29963               { set +x
29964 $as_echo "$at_srcdir/link03.at:34:
29965 mkdir gnu
29966 (cd gnu
29967 TEST_TAR_FORMAT=gnu
29968 export TEST_TAR_FORMAT
29969 TAR_OPTIONS=\"-H gnu\"
29970 export TAR_OPTIONS
29971 rm -rf *
29972
29973
29974 genfile -l 64 -f file1
29975 ln file1 file2
29976 ln file2 file3
29977 ln file3 file4
29978
29979 echo archive.1
29980 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
29981
29982 genfile -l 64 -f file1
29983 ln file1 file2
29984 ln file2 file3
29985 ln file3 file4
29986
29987 echo archive.2
29988 tar -c -f archive.2 -l --remove-files file1 file2 file3
29989 echo testing archive.2
29990 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
29991 )"
29992 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
29993 ( $at_check_trace;
29994 mkdir gnu
29995 (cd gnu
29996 TEST_TAR_FORMAT=gnu
29997 export TEST_TAR_FORMAT
29998 TAR_OPTIONS="-H gnu"
29999 export TAR_OPTIONS
30000 rm -rf *
30001
30002
30003 genfile -l 64 -f file1
30004 ln file1 file2
30005 ln file2 file3
30006 ln file3 file4
30007
30008 echo archive.1
30009 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
30010
30011 genfile -l 64 -f file1
30012 ln file1 file2
30013 ln file2 file3
30014 ln file3 file4
30015
30016 echo archive.2
30017 tar -c -f archive.2 -l --remove-files file1 file2 file3
30018 echo testing archive.2
30019 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
30020 )
30021 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30022 at_status=$? at_failed=false
30023 $at_check_filter
30024 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
30025 " | \
30026   $at_diff - "$at_stderr" || at_failed=:
30027 echo >>"$at_stdout"; $as_echo "archive.1
30028 archive.2
30029 testing archive.2
30030 file1
30031 file1
30032 " | \
30033   $at_diff - "$at_stdout" || at_failed=:
30034 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
30035 $at_failed && at_fn_log_failure
30036 $at_traceon; }
30037
30038
30039
30040
30041
30042   set +x
30043   $at_times_p && times >"$at_times_file"
30044 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30045 read at_status <"$at_status_file"
30046 #AT_STOP_117
30047 #AT_START_118
30048 at_fn_group_banner 118 'link04.at:29' \
30049   "link count is 1 but multiple occurrences" "       " 15
30050 at_xfail=no
30051       test -f $XFAILFILE && at_xfail=yes
30052 (
30053   $as_echo "118. $at_setup_line: testing $at_desc ..."
30054   $at_traceon
30055
30056
30057
30058
30059
30060   { set +x
30061 $as_echo "$at_srcdir/link04.at:32:
30062 mkdir v7
30063 (cd v7
30064 TEST_TAR_FORMAT=v7
30065 export TEST_TAR_FORMAT
30066 TAR_OPTIONS=\"-H v7\"
30067 export TAR_OPTIONS
30068 rm -rf *
30069
30070 mkdir dir
30071 echo TEST > dir/file
30072 ln -s file dir/symlink || exit 77
30073
30074 tar cf archive dir dir
30075 tar tvf archive | sed '
30076   s,.*[0-9] dir/,dir/,
30077 ' | sort
30078
30079 echo --
30080
30081 tar cfl archive dir dir
30082
30083 echo ==
30084
30085 tar chf archive dir
30086 tar tvf archive | sed '
30087   s,.*[0-9] dir/,dir/,
30088   s,file,FOO,g
30089   s,symlink,FOO,g
30090 ' | sort
30091 )"
30092 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
30093 ( $at_check_trace;
30094 mkdir v7
30095 (cd v7
30096 TEST_TAR_FORMAT=v7
30097 export TEST_TAR_FORMAT
30098 TAR_OPTIONS="-H v7"
30099 export TAR_OPTIONS
30100 rm -rf *
30101
30102 mkdir dir
30103 echo TEST > dir/file
30104 ln -s file dir/symlink || exit 77
30105
30106 tar cf archive dir dir
30107 tar tvf archive | sed '
30108   s,.*[0-9] dir/,dir/,
30109 ' | sort
30110
30111 echo --
30112
30113 tar cfl archive dir dir
30114
30115 echo ==
30116
30117 tar chf archive dir
30118 tar tvf archive | sed '
30119   s,.*[0-9] dir/,dir/,
30120   s,file,FOO,g
30121   s,symlink,FOO,g
30122 ' | sort
30123 )
30124 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30125 at_status=$? at_failed=false
30126 $at_check_filter
30127 at_fn_diff_devnull "$at_stderr" || at_failed=:
30128 echo >>"$at_stdout"; $as_echo "dir/
30129 dir/
30130 dir/file
30131 dir/file link to dir/file
30132 dir/symlink -> file
30133 dir/symlink link to dir/symlink
30134 --
30135 ==
30136 dir/
30137 dir/FOO
30138 dir/FOO link to dir/FOO
30139 " | \
30140   $at_diff - "$at_stdout" || at_failed=:
30141 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
30142 $at_failed && at_fn_log_failure
30143 $at_traceon; }
30144
30145               { set +x
30146 $as_echo "$at_srcdir/link04.at:32:
30147 mkdir oldgnu
30148 (cd oldgnu
30149 TEST_TAR_FORMAT=oldgnu
30150 export TEST_TAR_FORMAT
30151 TAR_OPTIONS=\"-H oldgnu\"
30152 export TAR_OPTIONS
30153 rm -rf *
30154
30155 mkdir dir
30156 echo TEST > dir/file
30157 ln -s file dir/symlink || exit 77
30158
30159 tar cf archive dir dir
30160 tar tvf archive | sed '
30161   s,.*[0-9] dir/,dir/,
30162 ' | sort
30163
30164 echo --
30165
30166 tar cfl archive dir dir
30167
30168 echo ==
30169
30170 tar chf archive dir
30171 tar tvf archive | sed '
30172   s,.*[0-9] dir/,dir/,
30173   s,file,FOO,g
30174   s,symlink,FOO,g
30175 ' | sort
30176 )"
30177 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
30178 ( $at_check_trace;
30179 mkdir oldgnu
30180 (cd oldgnu
30181 TEST_TAR_FORMAT=oldgnu
30182 export TEST_TAR_FORMAT
30183 TAR_OPTIONS="-H oldgnu"
30184 export TAR_OPTIONS
30185 rm -rf *
30186
30187 mkdir dir
30188 echo TEST > dir/file
30189 ln -s file dir/symlink || exit 77
30190
30191 tar cf archive dir dir
30192 tar tvf archive | sed '
30193   s,.*[0-9] dir/,dir/,
30194 ' | sort
30195
30196 echo --
30197
30198 tar cfl archive dir dir
30199
30200 echo ==
30201
30202 tar chf archive dir
30203 tar tvf archive | sed '
30204   s,.*[0-9] dir/,dir/,
30205   s,file,FOO,g
30206   s,symlink,FOO,g
30207 ' | sort
30208 )
30209 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30210 at_status=$? at_failed=false
30211 $at_check_filter
30212 at_fn_diff_devnull "$at_stderr" || at_failed=:
30213 echo >>"$at_stdout"; $as_echo "dir/
30214 dir/
30215 dir/file
30216 dir/file link to dir/file
30217 dir/symlink -> file
30218 dir/symlink link to dir/symlink
30219 --
30220 ==
30221 dir/
30222 dir/FOO
30223 dir/FOO link to dir/FOO
30224 " | \
30225   $at_diff - "$at_stdout" || at_failed=:
30226 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
30227 $at_failed && at_fn_log_failure
30228 $at_traceon; }
30229
30230               { set +x
30231 $as_echo "$at_srcdir/link04.at:32:
30232 mkdir ustar
30233 (cd ustar
30234 TEST_TAR_FORMAT=ustar
30235 export TEST_TAR_FORMAT
30236 TAR_OPTIONS=\"-H ustar\"
30237 export TAR_OPTIONS
30238 rm -rf *
30239
30240 mkdir dir
30241 echo TEST > dir/file
30242 ln -s file dir/symlink || exit 77
30243
30244 tar cf archive dir dir
30245 tar tvf archive | sed '
30246   s,.*[0-9] dir/,dir/,
30247 ' | sort
30248
30249 echo --
30250
30251 tar cfl archive dir dir
30252
30253 echo ==
30254
30255 tar chf archive dir
30256 tar tvf archive | sed '
30257   s,.*[0-9] dir/,dir/,
30258   s,file,FOO,g
30259   s,symlink,FOO,g
30260 ' | sort
30261 )"
30262 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
30263 ( $at_check_trace;
30264 mkdir ustar
30265 (cd ustar
30266 TEST_TAR_FORMAT=ustar
30267 export TEST_TAR_FORMAT
30268 TAR_OPTIONS="-H ustar"
30269 export TAR_OPTIONS
30270 rm -rf *
30271
30272 mkdir dir
30273 echo TEST > dir/file
30274 ln -s file dir/symlink || exit 77
30275
30276 tar cf archive dir dir
30277 tar tvf archive | sed '
30278   s,.*[0-9] dir/,dir/,
30279 ' | sort
30280
30281 echo --
30282
30283 tar cfl archive dir dir
30284
30285 echo ==
30286
30287 tar chf archive dir
30288 tar tvf archive | sed '
30289   s,.*[0-9] dir/,dir/,
30290   s,file,FOO,g
30291   s,symlink,FOO,g
30292 ' | sort
30293 )
30294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30295 at_status=$? at_failed=false
30296 $at_check_filter
30297 at_fn_diff_devnull "$at_stderr" || at_failed=:
30298 echo >>"$at_stdout"; $as_echo "dir/
30299 dir/
30300 dir/file
30301 dir/file link to dir/file
30302 dir/symlink -> file
30303 dir/symlink link to dir/symlink
30304 --
30305 ==
30306 dir/
30307 dir/FOO
30308 dir/FOO link to dir/FOO
30309 " | \
30310   $at_diff - "$at_stdout" || at_failed=:
30311 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
30312 $at_failed && at_fn_log_failure
30313 $at_traceon; }
30314
30315               { set +x
30316 $as_echo "$at_srcdir/link04.at:32:
30317 mkdir posix
30318 (cd posix
30319 TEST_TAR_FORMAT=posix
30320 export TEST_TAR_FORMAT
30321 TAR_OPTIONS=\"-H posix\"
30322 export TAR_OPTIONS
30323 rm -rf *
30324
30325 mkdir dir
30326 echo TEST > dir/file
30327 ln -s file dir/symlink || exit 77
30328
30329 tar cf archive dir dir
30330 tar tvf archive | sed '
30331   s,.*[0-9] dir/,dir/,
30332 ' | sort
30333
30334 echo --
30335
30336 tar cfl archive dir dir
30337
30338 echo ==
30339
30340 tar chf archive dir
30341 tar tvf archive | sed '
30342   s,.*[0-9] dir/,dir/,
30343   s,file,FOO,g
30344   s,symlink,FOO,g
30345 ' | sort
30346 )"
30347 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
30348 ( $at_check_trace;
30349 mkdir posix
30350 (cd posix
30351 TEST_TAR_FORMAT=posix
30352 export TEST_TAR_FORMAT
30353 TAR_OPTIONS="-H posix"
30354 export TAR_OPTIONS
30355 rm -rf *
30356
30357 mkdir dir
30358 echo TEST > dir/file
30359 ln -s file dir/symlink || exit 77
30360
30361 tar cf archive dir dir
30362 tar tvf archive | sed '
30363   s,.*[0-9] dir/,dir/,
30364 ' | sort
30365
30366 echo --
30367
30368 tar cfl archive dir dir
30369
30370 echo ==
30371
30372 tar chf archive dir
30373 tar tvf archive | sed '
30374   s,.*[0-9] dir/,dir/,
30375   s,file,FOO,g
30376   s,symlink,FOO,g
30377 ' | sort
30378 )
30379 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30380 at_status=$? at_failed=false
30381 $at_check_filter
30382 at_fn_diff_devnull "$at_stderr" || at_failed=:
30383 echo >>"$at_stdout"; $as_echo "dir/
30384 dir/
30385 dir/file
30386 dir/file link to dir/file
30387 dir/symlink -> file
30388 dir/symlink link to dir/symlink
30389 --
30390 ==
30391 dir/
30392 dir/FOO
30393 dir/FOO link to dir/FOO
30394 " | \
30395   $at_diff - "$at_stdout" || at_failed=:
30396 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
30397 $at_failed && at_fn_log_failure
30398 $at_traceon; }
30399
30400               { set +x
30401 $as_echo "$at_srcdir/link04.at:32:
30402 mkdir gnu
30403 (cd gnu
30404 TEST_TAR_FORMAT=gnu
30405 export TEST_TAR_FORMAT
30406 TAR_OPTIONS=\"-H gnu\"
30407 export TAR_OPTIONS
30408 rm -rf *
30409
30410 mkdir dir
30411 echo TEST > dir/file
30412 ln -s file dir/symlink || exit 77
30413
30414 tar cf archive dir dir
30415 tar tvf archive | sed '
30416   s,.*[0-9] dir/,dir/,
30417 ' | sort
30418
30419 echo --
30420
30421 tar cfl archive dir dir
30422
30423 echo ==
30424
30425 tar chf archive dir
30426 tar tvf archive | sed '
30427   s,.*[0-9] dir/,dir/,
30428   s,file,FOO,g
30429   s,symlink,FOO,g
30430 ' | sort
30431 )"
30432 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
30433 ( $at_check_trace;
30434 mkdir gnu
30435 (cd gnu
30436 TEST_TAR_FORMAT=gnu
30437 export TEST_TAR_FORMAT
30438 TAR_OPTIONS="-H gnu"
30439 export TAR_OPTIONS
30440 rm -rf *
30441
30442 mkdir dir
30443 echo TEST > dir/file
30444 ln -s file dir/symlink || exit 77
30445
30446 tar cf archive dir dir
30447 tar tvf archive | sed '
30448   s,.*[0-9] dir/,dir/,
30449 ' | sort
30450
30451 echo --
30452
30453 tar cfl archive dir dir
30454
30455 echo ==
30456
30457 tar chf archive dir
30458 tar tvf archive | sed '
30459   s,.*[0-9] dir/,dir/,
30460   s,file,FOO,g
30461   s,symlink,FOO,g
30462 ' | sort
30463 )
30464 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30465 at_status=$? at_failed=false
30466 $at_check_filter
30467 at_fn_diff_devnull "$at_stderr" || at_failed=:
30468 echo >>"$at_stdout"; $as_echo "dir/
30469 dir/
30470 dir/file
30471 dir/file link to dir/file
30472 dir/symlink -> file
30473 dir/symlink link to dir/symlink
30474 --
30475 ==
30476 dir/
30477 dir/FOO
30478 dir/FOO link to dir/FOO
30479 " | \
30480   $at_diff - "$at_stdout" || at_failed=:
30481 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
30482 $at_failed && at_fn_log_failure
30483 $at_traceon; }
30484
30485
30486
30487
30488   set +x
30489   $at_times_p && times >"$at_times_file"
30490 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30491 read at_status <"$at_status_file"
30492 #AT_STOP_118
30493 #AT_START_119
30494 at_fn_group_banner 119 'longv7.at:25' \
30495   "long names in V7 archives" "                      " 16
30496 at_xfail=no
30497       test -f $XFAILFILE && at_xfail=yes
30498 (
30499   $as_echo "119. $at_setup_line: testing $at_desc ..."
30500   $at_traceon
30501
30502
30503
30504
30505
30506
30507
30508
30509   { set +x
30510 $as_echo "$at_srcdir/longv7.at:31:
30511 mkdir v7
30512 (cd v7
30513 TEST_TAR_FORMAT=v7
30514 export TEST_TAR_FORMAT
30515 TAR_OPTIONS=\"-H v7\"
30516 export TAR_OPTIONS
30517 rm -rf *
30518
30519 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
30520 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
30521
30522 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
30523 echo separator
30524 tar tf archive
30525 )"
30526 at_fn_check_prepare_notrace 'an embedded newline' "longv7.at:31"
30527 ( $at_check_trace;
30528 mkdir v7
30529 (cd v7
30530 TEST_TAR_FORMAT=v7
30531 export TEST_TAR_FORMAT
30532 TAR_OPTIONS="-H v7"
30533 export TAR_OPTIONS
30534 rm -rf *
30535
30536 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
30537 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
30538
30539 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
30540 echo separator
30541 tar tf archive
30542 )
30543 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30544 at_status=$? at_failed=false
30545 $at_check_filter
30546 echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c: file name is too long (max 99); not dumped
30547 tar: Exiting with failure status due to previous errors
30548 " | \
30549   $at_diff - "$at_stderr" || at_failed=:
30550 echo >>"$at_stdout"; $as_echo "separator
30551 this_is_a_very_long_name_for_a_directory_which_causes_problems/
30552 " | \
30553   $at_diff - "$at_stdout" || at_failed=:
30554 at_fn_check_status 0 $at_status "$at_srcdir/longv7.at:31"
30555 $at_failed && at_fn_log_failure
30556 $at_traceon; }
30557
30558
30559
30560
30561
30562
30563   set +x
30564   $at_times_p && times >"$at_times_file"
30565 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30566 read at_status <"$at_status_file"
30567 #AT_STOP_119
30568 #AT_START_120
30569 at_fn_group_banner 120 'long01.at:28' \
30570   "long file names divisible by block size" "        " 16
30571 at_xfail=no
30572       test -f $XFAILFILE && at_xfail=yes
30573 (
30574   $as_echo "120. $at_setup_line: testing $at_desc ..."
30575   $at_traceon
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585   { set +x
30586 $as_echo "$at_srcdir/long01.at:36:
30587 mkdir gnu
30588 (cd gnu
30589 TEST_TAR_FORMAT=gnu
30590 export TEST_TAR_FORMAT
30591 TAR_OPTIONS=\"-H gnu\"
30592 export TAR_OPTIONS
30593 rm -rf *
30594
30595
30596 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
30597 echo test > endfile
30598
30599 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
30600 tar tf archive)"
30601 at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
30602 ( $at_check_trace;
30603 mkdir gnu
30604 (cd gnu
30605 TEST_TAR_FORMAT=gnu
30606 export TEST_TAR_FORMAT
30607 TAR_OPTIONS="-H gnu"
30608 export TAR_OPTIONS
30609 rm -rf *
30610
30611
30612 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
30613 echo test > endfile
30614
30615 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
30616 tar tf archive)
30617 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30618 at_status=$? at_failed=false
30619 $at_check_filter
30620 at_fn_diff_devnull "$at_stderr" || at_failed=:
30621 echo >>"$at_stdout"; $as_echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde
30622 endfile
30623 " | \
30624   $at_diff - "$at_stdout" || at_failed=:
30625 at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
30626 $at_failed && at_fn_log_failure
30627 $at_traceon; }
30628
30629               { set +x
30630 $as_echo "$at_srcdir/long01.at:36:
30631 mkdir oldgnu
30632 (cd oldgnu
30633 TEST_TAR_FORMAT=oldgnu
30634 export TEST_TAR_FORMAT
30635 TAR_OPTIONS=\"-H oldgnu\"
30636 export TAR_OPTIONS
30637 rm -rf *
30638
30639
30640 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
30641 echo test > endfile
30642
30643 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
30644 tar tf archive)"
30645 at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
30646 ( $at_check_trace;
30647 mkdir oldgnu
30648 (cd oldgnu
30649 TEST_TAR_FORMAT=oldgnu
30650 export TEST_TAR_FORMAT
30651 TAR_OPTIONS="-H oldgnu"
30652 export TAR_OPTIONS
30653 rm -rf *
30654
30655
30656 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
30657 echo test > endfile
30658
30659 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
30660 tar tf archive)
30661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30662 at_status=$? at_failed=false
30663 $at_check_filter
30664 at_fn_diff_devnull "$at_stderr" || at_failed=:
30665 echo >>"$at_stdout"; $as_echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde
30666 endfile
30667 " | \
30668   $at_diff - "$at_stdout" || at_failed=:
30669 at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
30670 $at_failed && at_fn_log_failure
30671 $at_traceon; }
30672
30673
30674
30675
30676
30677
30678   set +x
30679   $at_times_p && times >"$at_times_file"
30680 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30681 read at_status <"$at_status_file"
30682 #AT_STOP_120
30683 #AT_START_121
30684 at_fn_group_banner 121 'lustar01.at:21' \
30685   "ustar: unsplittable file name" "                  " 16
30686 at_xfail=no
30687       test -f $XFAILFILE && at_xfail=yes
30688 (
30689   $as_echo "121. $at_setup_line: testing $at_desc ..."
30690   $at_traceon
30691
30692
30693
30694
30695
30696
30697
30698   { set +x
30699 $as_echo "$at_srcdir/lustar01.at:27:
30700 mkdir ustar
30701 (cd ustar
30702 TEST_TAR_FORMAT=ustar
30703 export TEST_TAR_FORMAT
30704 TAR_OPTIONS=\"-H ustar\"
30705 export TAR_OPTIONS
30706 rm -rf *
30707
30708 genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77
30709 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix
30710 )"
30711 at_fn_check_prepare_notrace 'an embedded newline' "lustar01.at:27"
30712 ( $at_check_trace;
30713 mkdir ustar
30714 (cd ustar
30715 TEST_TAR_FORMAT=ustar
30716 export TEST_TAR_FORMAT
30717 TAR_OPTIONS="-H ustar"
30718 export TAR_OPTIONS
30719 rm -rf *
30720
30721 genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77
30722 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix
30723 )
30724 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30725 at_status=$? at_failed=false
30726 $at_check_filter
30727 echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix: file name is too long (cannot be split); not dumped
30728 tar: Exiting with failure status due to previous errors
30729 " | \
30730   $at_diff - "$at_stderr" || at_failed=:
30731 at_fn_diff_devnull "$at_stdout" || at_failed=:
30732 at_fn_check_status 2 $at_status "$at_srcdir/lustar01.at:27"
30733 $at_failed && at_fn_log_failure
30734 $at_traceon; }
30735
30736
30737
30738
30739
30740   set +x
30741   $at_times_p && times >"$at_times_file"
30742 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30743 read at_status <"$at_status_file"
30744 #AT_STOP_121
30745 #AT_START_122
30746 at_fn_group_banner 122 'lustar02.at:21' \
30747   "ustar: unsplittable path name" "                  " 16
30748 at_xfail=no
30749       test -f $XFAILFILE && at_xfail=yes
30750 (
30751   $as_echo "122. $at_setup_line: testing $at_desc ..."
30752   $at_traceon
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764   { set +x
30765 $as_echo "$at_srcdir/lustar02.at:32:
30766 mkdir ustar
30767 (cd ustar
30768 TEST_TAR_FORMAT=ustar
30769 export TEST_TAR_FORMAT
30770 TAR_OPTIONS=\"-H ustar\"
30771 export TAR_OPTIONS
30772 rm -rf *
30773
30774
30775 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77
30776 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
30777 )"
30778 at_fn_check_prepare_notrace 'an embedded newline' "lustar02.at:32"
30779 ( $at_check_trace;
30780 mkdir ustar
30781 (cd ustar
30782 TEST_TAR_FORMAT=ustar
30783 export TEST_TAR_FORMAT
30784 TAR_OPTIONS="-H ustar"
30785 export TAR_OPTIONS
30786 rm -rf *
30787
30788
30789 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77
30790 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
30791 )
30792 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30793 at_status=$? at_failed=false
30794 $at_check_filter
30795 echo >>"$at_stderr"; $as_echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/: file name is too long (cannot be split); not dumped
30796 tar: Exiting with failure status due to previous errors
30797 " | \
30798   $at_diff - "$at_stderr" || at_failed=:
30799 at_fn_diff_devnull "$at_stdout" || at_failed=:
30800 at_fn_check_status 2 $at_status "$at_srcdir/lustar02.at:32"
30801 $at_failed && at_fn_log_failure
30802 $at_traceon; }
30803
30804
30805
30806
30807
30808
30809
30810
30811   set +x
30812   $at_times_p && times >"$at_times_file"
30813 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30814 read at_status <"$at_status_file"
30815 #AT_STOP_122
30816 #AT_START_123
30817 at_fn_group_banner 123 'lustar03.at:21' \
30818   "ustar: splitting long names" "                    " 16
30819 at_xfail=no
30820       test -f $XFAILFILE && at_xfail=yes
30821 (
30822   $as_echo "123. $at_setup_line: testing $at_desc ..."
30823   $at_traceon
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833   { set +x
30834 $as_echo "$at_srcdir/lustar03.at:29:
30835 mkdir ustar
30836 (cd ustar
30837 TEST_TAR_FORMAT=ustar
30838 export TEST_TAR_FORMAT
30839 TAR_OPTIONS=\"-H ustar\"
30840 export TAR_OPTIONS
30841 rm -rf *
30842
30843
30844 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77
30845 echo \"Create archive\"
30846 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
30847 echo \"List archive\"
30848 tar tf archive)"
30849 at_fn_check_prepare_notrace 'an embedded newline' "lustar03.at:29"
30850 ( $at_check_trace;
30851 mkdir ustar
30852 (cd ustar
30853 TEST_TAR_FORMAT=ustar
30854 export TEST_TAR_FORMAT
30855 TAR_OPTIONS="-H ustar"
30856 export TAR_OPTIONS
30857 rm -rf *
30858
30859
30860 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77
30861 echo "Create archive"
30862 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
30863 echo "List archive"
30864 tar tf archive)
30865 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30866 at_status=$? at_failed=false
30867 $at_check_filter
30868 at_fn_diff_devnull "$at_stderr" || at_failed=:
30869 echo >>"$at_stdout"; $as_echo "Create archive
30870 List archive
30871 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/
30872 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
30873 " | \
30874   $at_diff - "$at_stdout" || at_failed=:
30875 at_fn_check_status 0 $at_status "$at_srcdir/lustar03.at:29"
30876 $at_failed && at_fn_log_failure
30877 $at_traceon; }
30878
30879
30880
30881
30882
30883
30884   set +x
30885   $at_times_p && times >"$at_times_file"
30886 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30887 read at_status <"$at_status_file"
30888 #AT_STOP_123
30889 #AT_START_124
30890 at_fn_group_banner 124 'old.at:23' \
30891   "old archives" "                                   " 16
30892 at_xfail=no
30893 (
30894   $as_echo "124. $at_setup_line: testing $at_desc ..."
30895   $at_traceon
30896
30897
30898
30899 unset TAR_OPTIONS
30900 { set +x
30901 $as_echo "$at_srcdir/old.at:27:
30902 mkdir directory
30903 tar cfvo archive directory || exit 1
30904 tar tf archive
30905 "
30906 at_fn_check_prepare_notrace 'an embedded newline' "old.at:27"
30907 ( $at_check_trace;
30908 mkdir directory
30909 tar cfvo archive directory || exit 1
30910 tar tf archive
30911
30912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30913 at_status=$? at_failed=false
30914 $at_check_filter
30915 at_fn_diff_devnull "$at_stderr" || at_failed=:
30916 echo >>"$at_stdout"; $as_echo "directory/
30917 directory/
30918 " | \
30919   $at_diff - "$at_stdout" || at_failed=:
30920 at_fn_check_status 0 $at_status "$at_srcdir/old.at:27"
30921 $at_failed && at_fn_log_failure
30922 $at_traceon; }
30923
30924
30925   set +x
30926   $at_times_p && times >"$at_times_file"
30927 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30928 read at_status <"$at_status_file"
30929 #AT_STOP_124
30930 #AT_START_125
30931 at_fn_group_banner 125 'time01.at:20' \
30932   "time: tricky time stamps" "                       " 16
30933 at_xfail=no
30934       test -f $XFAILFILE && at_xfail=yes
30935 (
30936   $as_echo "125. $at_setup_line: testing $at_desc ..."
30937   $at_traceon
30938
30939
30940
30941
30942
30943   { set +x
30944 $as_echo "$at_srcdir/time01.at:23:
30945 mkdir pax
30946 (cd pax
30947 TEST_TAR_FORMAT=pax
30948 export TEST_TAR_FORMAT
30949 TAR_OPTIONS=\"-H pax\"
30950 export TAR_OPTIONS
30951 rm -rf *
30952
30953 export TZ=UTC0
30954 mkdir dir
30955
30956 # Test files with time stamps that are near common sources of error,
30957 # typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
30958 # Use GNU-style @ notation for very large time stamps, since they
30959 # typically don't render into years correctly due to int overflow.
30960 for s in \\
30961   @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \\
30962   0000-01-01T00:00:00 0000-01-01T00:00:01 \\
30963   0000-01-02T00:00:00 \\
30964   1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \\
30965   1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \\
30966   1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \\
30967   1901-12-14T20:45:51 \\
30968   1969-12-31T23:59:58 1969-12-31T23:59:59 \\
30969   1970-01-01T00:00:00 1970-01-01T00:00:01 \\
30970   2038-01-18T03:14:07 \\
30971   2038-01-19T03:14:07 2038-01-19T03:14:08 \\
30972   2106-02-07T06:28:15 2106-02-07T06:28:16 \\
30973   2242-03-16T12:56:31 2242-03-16T12:56:32 \\
30974   9999-12-31T23:59:58 9999-12-31T23:59:59 \\
30975   @9223372036854775807 @9223372036854775808
30976 do
30977   # Skip a time stamp \$s if it's out of range for this platform,
30978   # of if it uses a notation that this platform does not recognize.
30979   touch -d \$s dir/f\$s >/dev/null 2>&1 || continue
30980
30981   # Likewise for \$s.1.  If \$s is the most negative time stamp and
30982   # time stamps are signed, then \$s.1 is out of range.
30983   touch -d \$s.1 dir/f\$s.\$ns >/dev/null 2>&1 || continue
30984
30985   for frac in   01 001 00001 000001 0000001 00000001 000000001 0000000001 \\
30986               9 99 999 99999 999999 9999999 99999999 999999999 9999999999
30987   do
30988     touch -d \$s.\$frac dir/f\$s.\$frac
30989   done
30990 done
30991
30992 tar -c -f archive.tar dir
30993 tar -d -f archive.tar dir
30994 )"
30995 at_fn_check_prepare_notrace 'an embedded newline' "time01.at:23"
30996 ( $at_check_trace;
30997 mkdir pax
30998 (cd pax
30999 TEST_TAR_FORMAT=pax
31000 export TEST_TAR_FORMAT
31001 TAR_OPTIONS="-H pax"
31002 export TAR_OPTIONS
31003 rm -rf *
31004
31005 export TZ=UTC0
31006 mkdir dir
31007
31008 # Test files with time stamps that are near common sources of error,
31009 # typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
31010 # Use GNU-style @ notation for very large time stamps, since they
31011 # typically don't render into years correctly due to int overflow.
31012 for s in \
31013   @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \
31014   0000-01-01T00:00:00 0000-01-01T00:00:01 \
31015   0000-01-02T00:00:00 \
31016   1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \
31017   1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \
31018   1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \
31019   1901-12-14T20:45:51 \
31020   1969-12-31T23:59:58 1969-12-31T23:59:59 \
31021   1970-01-01T00:00:00 1970-01-01T00:00:01 \
31022   2038-01-18T03:14:07 \
31023   2038-01-19T03:14:07 2038-01-19T03:14:08 \
31024   2106-02-07T06:28:15 2106-02-07T06:28:16 \
31025   2242-03-16T12:56:31 2242-03-16T12:56:32 \
31026   9999-12-31T23:59:58 9999-12-31T23:59:59 \
31027   @9223372036854775807 @9223372036854775808
31028 do
31029   # Skip a time stamp $s if it's out of range for this platform,
31030   # of if it uses a notation that this platform does not recognize.
31031   touch -d $s dir/f$s >/dev/null 2>&1 || continue
31032
31033   # Likewise for $s.1.  If $s is the most negative time stamp and
31034   # time stamps are signed, then $s.1 is out of range.
31035   touch -d $s.1 dir/f$s.$ns >/dev/null 2>&1 || continue
31036
31037   for frac in   01 001 00001 000001 0000001 00000001 000000001 0000000001 \
31038               9 99 999 99999 999999 9999999 99999999 999999999 9999999999
31039   do
31040     touch -d $s.$frac dir/f$s.$frac
31041   done
31042 done
31043
31044 tar -c -f archive.tar dir
31045 tar -d -f archive.tar dir
31046 )
31047 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31048 at_status=$? at_failed=false
31049 $at_check_filter
31050 at_fn_diff_devnull "$at_stderr" || at_failed=:
31051 at_fn_diff_devnull "$at_stdout" || at_failed=:
31052 at_fn_check_status 0 $at_status "$at_srcdir/time01.at:23"
31053 $at_failed && at_fn_log_failure
31054 $at_traceon; }
31055
31056
31057
31058
31059   set +x
31060   $at_times_p && times >"$at_times_file"
31061 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31062 read at_status <"$at_status_file"
31063 #AT_STOP_125
31064 #AT_START_126
31065 at_fn_group_banner 126 'time02.at:20' \
31066   "time: clamping mtime" "                           " 16
31067 at_xfail=no
31068       test -f $XFAILFILE && at_xfail=yes
31069 (
31070   $as_echo "126. $at_setup_line: testing $at_desc ..."
31071   $at_traceon
31072
31073
31074
31075
31076
31077   { set +x
31078 $as_echo "$at_srcdir/time02.at:23:
31079 mkdir pax
31080 (cd pax
31081 TEST_TAR_FORMAT=pax
31082 export TEST_TAR_FORMAT
31083 TAR_OPTIONS=\"-H pax\"
31084 export TAR_OPTIONS
31085 rm -rf *
31086
31087
31088 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31089
31090 export TZ=UTC0
31091 mkdir dir
31092
31093 touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || exit 77
31094 touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || exit 77
31095 touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || exit 77
31096 touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || exit 77
31097
31098 tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir
31099 tar -d -f archive.tar dir|sort
31100 )"
31101 at_fn_check_prepare_notrace 'a `...` command substitution' "time02.at:23"
31102 ( $at_check_trace;
31103 mkdir pax
31104 (cd pax
31105 TEST_TAR_FORMAT=pax
31106 export TEST_TAR_FORMAT
31107 TAR_OPTIONS="-H pax"
31108 export TAR_OPTIONS
31109 rm -rf *
31110
31111
31112 test -z "`sort < /dev/null 2>&1`" || exit 77
31113
31114 export TZ=UTC0
31115 mkdir dir
31116
31117 touch -d 2015-12-01T00:00:00 dir/a >/dev/null 2>&1 || exit 77
31118 touch -d 2016-01-01T00:00:00 dir/b >/dev/null 2>&1 || exit 77
31119 touch -d 2016-02-01T00:00:00 dir/c >/dev/null 2>&1 || exit 77
31120 touch -d 2038-01-01T00:00:00 dir/d >/dev/null 2>&1 || exit 77
31121
31122 tar -c --mtime 2016-01-15T00:00:00 --clamp-mtime -f archive.tar dir
31123 tar -d -f archive.tar dir|sort
31124 )
31125 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31126 at_status=$? at_failed=false
31127 $at_check_filter
31128 at_fn_diff_devnull "$at_stderr" || at_failed=:
31129 echo >>"$at_stdout"; $as_echo "dir/c: Mod time differs
31130 dir/d: Mod time differs
31131 " | \
31132   $at_diff - "$at_stdout" || at_failed=:
31133 at_fn_check_status 0 $at_status "$at_srcdir/time02.at:23"
31134 $at_failed && at_fn_log_failure
31135 $at_traceon; }
31136
31137
31138
31139
31140   set +x
31141   $at_times_p && times >"$at_times_file"
31142 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31143 read at_status <"$at_status_file"
31144 #AT_STOP_126
31145 #AT_START_127
31146 at_fn_group_banner 127 'multiv01.at:24' \
31147   "multivolume dumps from pipes" "                   " 17
31148 at_xfail=no
31149       test -f $XFAILFILE && at_xfail=yes
31150 (
31151   $as_echo "127. $at_setup_line: testing $at_desc ..."
31152   $at_traceon
31153
31154
31155
31156 # Fixme: should be configurable
31157 #  TRUSS=truss -o /tmp/tr
31158 #  TRUSS=strace
31159
31160
31161
31162   { set +x
31163 $as_echo "$at_srcdir/multiv01.at:31:
31164 mkdir gnu
31165 (cd gnu
31166 TEST_TAR_FORMAT=gnu
31167 export TEST_TAR_FORMAT
31168 TAR_OPTIONS=\"-H gnu\"
31169 export TAR_OPTIONS
31170 rm -rf *
31171
31172 exec <&-
31173 genfile --length 7168 --file file1
31174
31175 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
31176               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
31177   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
31178   for count in 2 3 4 5 6 7 8 ; do
31179     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
31180   done
31181 done >file2
31182
31183 if test \$TEST_TAR_FORMAT = pax; then
31184   TAPE_LENGTH=11
31185 else
31186   TAPE_LENGTH=10
31187 fi
31188
31189 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
31190   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
31191
31192 mkdir extract-dir-pipe
31193 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
31194 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
31195       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
31196       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
31197
31198 cmp file1 extract-dir-pipe/file1
31199 cmp file2 extract-dir-pipe/file2
31200 )"
31201 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
31202 ( $at_check_trace;
31203 mkdir gnu
31204 (cd gnu
31205 TEST_TAR_FORMAT=gnu
31206 export TEST_TAR_FORMAT
31207 TAR_OPTIONS="-H gnu"
31208 export TAR_OPTIONS
31209 rm -rf *
31210
31211 exec <&-
31212 genfile --length 7168 --file file1
31213
31214 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
31215               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
31216   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
31217   for count in 2 3 4 5 6 7 8 ; do
31218     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
31219   done
31220 done >file2
31221
31222 if test $TEST_TAR_FORMAT = pax; then
31223   TAPE_LENGTH=11
31224 else
31225   TAPE_LENGTH=10
31226 fi
31227
31228 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
31229   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
31230
31231 mkdir extract-dir-pipe
31232 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
31233 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
31234       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
31235       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
31236
31237 cmp file1 extract-dir-pipe/file1
31238 cmp file2 extract-dir-pipe/file2
31239 )
31240 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31241 at_status=$? at_failed=false
31242 $at_check_filter
31243 at_fn_diff_devnull "$at_stderr" || at_failed=:
31244 at_fn_diff_devnull "$at_stdout" || at_failed=:
31245 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
31246 $at_failed && at_fn_log_failure
31247 $at_traceon; }
31248
31249               { set +x
31250 $as_echo "$at_srcdir/multiv01.at:31:
31251 mkdir oldgnu
31252 (cd oldgnu
31253 TEST_TAR_FORMAT=oldgnu
31254 export TEST_TAR_FORMAT
31255 TAR_OPTIONS=\"-H oldgnu\"
31256 export TAR_OPTIONS
31257 rm -rf *
31258
31259 exec <&-
31260 genfile --length 7168 --file file1
31261
31262 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
31263               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
31264   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
31265   for count in 2 3 4 5 6 7 8 ; do
31266     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
31267   done
31268 done >file2
31269
31270 if test \$TEST_TAR_FORMAT = pax; then
31271   TAPE_LENGTH=11
31272 else
31273   TAPE_LENGTH=10
31274 fi
31275
31276 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
31277   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
31278
31279 mkdir extract-dir-pipe
31280 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
31281 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
31282       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
31283       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
31284
31285 cmp file1 extract-dir-pipe/file1
31286 cmp file2 extract-dir-pipe/file2
31287 )"
31288 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
31289 ( $at_check_trace;
31290 mkdir oldgnu
31291 (cd oldgnu
31292 TEST_TAR_FORMAT=oldgnu
31293 export TEST_TAR_FORMAT
31294 TAR_OPTIONS="-H oldgnu"
31295 export TAR_OPTIONS
31296 rm -rf *
31297
31298 exec <&-
31299 genfile --length 7168 --file file1
31300
31301 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
31302               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
31303   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
31304   for count in 2 3 4 5 6 7 8 ; do
31305     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
31306   done
31307 done >file2
31308
31309 if test $TEST_TAR_FORMAT = pax; then
31310   TAPE_LENGTH=11
31311 else
31312   TAPE_LENGTH=10
31313 fi
31314
31315 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
31316   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
31317
31318 mkdir extract-dir-pipe
31319 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
31320 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
31321       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
31322       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
31323
31324 cmp file1 extract-dir-pipe/file1
31325 cmp file2 extract-dir-pipe/file2
31326 )
31327 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31328 at_status=$? at_failed=false
31329 $at_check_filter
31330 at_fn_diff_devnull "$at_stderr" || at_failed=:
31331 at_fn_diff_devnull "$at_stdout" || at_failed=:
31332 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
31333 $at_failed && at_fn_log_failure
31334 $at_traceon; }
31335
31336               { set +x
31337 $as_echo "$at_srcdir/multiv01.at:31:
31338 mkdir pax
31339 (cd pax
31340 TEST_TAR_FORMAT=pax
31341 export TEST_TAR_FORMAT
31342 TAR_OPTIONS=\"-H pax\"
31343 export TAR_OPTIONS
31344 rm -rf *
31345
31346 exec <&-
31347 genfile --length 7168 --file file1
31348
31349 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
31350               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
31351   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
31352   for count in 2 3 4 5 6 7 8 ; do
31353     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
31354   done
31355 done >file2
31356
31357 if test \$TEST_TAR_FORMAT = pax; then
31358   TAPE_LENGTH=11
31359 else
31360   TAPE_LENGTH=10
31361 fi
31362
31363 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
31364   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
31365
31366 mkdir extract-dir-pipe
31367 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
31368 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
31369       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
31370       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
31371
31372 cmp file1 extract-dir-pipe/file1
31373 cmp file2 extract-dir-pipe/file2
31374 )"
31375 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
31376 ( $at_check_trace;
31377 mkdir pax
31378 (cd pax
31379 TEST_TAR_FORMAT=pax
31380 export TEST_TAR_FORMAT
31381 TAR_OPTIONS="-H pax"
31382 export TAR_OPTIONS
31383 rm -rf *
31384
31385 exec <&-
31386 genfile --length 7168 --file file1
31387
31388 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
31389               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
31390   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
31391   for count in 2 3 4 5 6 7 8 ; do
31392     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
31393   done
31394 done >file2
31395
31396 if test $TEST_TAR_FORMAT = pax; then
31397   TAPE_LENGTH=11
31398 else
31399   TAPE_LENGTH=10
31400 fi
31401
31402 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
31403   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
31404
31405 mkdir extract-dir-pipe
31406 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
31407 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
31408       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
31409       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
31410
31411 cmp file1 extract-dir-pipe/file1
31412 cmp file2 extract-dir-pipe/file2
31413 )
31414 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31415 at_status=$? at_failed=false
31416 $at_check_filter
31417 at_fn_diff_devnull "$at_stderr" || at_failed=:
31418 at_fn_diff_devnull "$at_stdout" || at_failed=:
31419 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
31420 $at_failed && at_fn_log_failure
31421 $at_traceon; }
31422
31423
31424
31425
31426   set +x
31427   $at_times_p && times >"$at_times_file"
31428 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31429 read at_status <"$at_status_file"
31430 #AT_STOP_127
31431 #AT_START_128
31432 at_fn_group_banner 128 'multiv02.at:29' \
31433   "skipping a straddling member" "                   " 17
31434 at_xfail=no
31435       test -f $XFAILFILE && at_xfail=yes
31436 (
31437   $as_echo "128. $at_setup_line: testing $at_desc ..."
31438   $at_traceon
31439
31440
31441
31442
31443
31444   { set +x
31445 $as_echo "$at_srcdir/multiv02.at:32:
31446 mkdir gnu
31447 (cd gnu
31448 TEST_TAR_FORMAT=gnu
31449 export TEST_TAR_FORMAT
31450 TAR_OPTIONS=\"-H gnu\"
31451 export TAR_OPTIONS
31452 rm -rf *
31453
31454 genfile --length 10240 --file en
31455 genfile --length 20000 --file to
31456 genfile --length 20000 --file tre
31457 genfile --length 10240 --file fire
31458
31459 exec <&-
31460
31461 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
31462 echo separator
31463 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
31464 )"
31465 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32"
31466 ( $at_check_trace;
31467 mkdir gnu
31468 (cd gnu
31469 TEST_TAR_FORMAT=gnu
31470 export TEST_TAR_FORMAT
31471 TAR_OPTIONS="-H gnu"
31472 export TAR_OPTIONS
31473 rm -rf *
31474
31475 genfile --length 10240 --file en
31476 genfile --length 20000 --file to
31477 genfile --length 20000 --file tre
31478 genfile --length 10240 --file fire
31479
31480 exec <&-
31481
31482 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
31483 echo separator
31484 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
31485 )
31486 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31487 at_status=$? at_failed=false
31488 $at_check_filter
31489 at_fn_diff_devnull "$at_stderr" || at_failed=:
31490 echo >>"$at_stdout"; $as_echo "separator
31491 en
31492 " | \
31493   $at_diff - "$at_stdout" || at_failed=:
31494 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32"
31495 $at_failed && at_fn_log_failure
31496 $at_traceon; }
31497
31498               { set +x
31499 $as_echo "$at_srcdir/multiv02.at:32:
31500 mkdir oldgnu
31501 (cd oldgnu
31502 TEST_TAR_FORMAT=oldgnu
31503 export TEST_TAR_FORMAT
31504 TAR_OPTIONS=\"-H oldgnu\"
31505 export TAR_OPTIONS
31506 rm -rf *
31507
31508 genfile --length 10240 --file en
31509 genfile --length 20000 --file to
31510 genfile --length 20000 --file tre
31511 genfile --length 10240 --file fire
31512
31513 exec <&-
31514
31515 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
31516 echo separator
31517 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
31518 )"
31519 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32"
31520 ( $at_check_trace;
31521 mkdir oldgnu
31522 (cd oldgnu
31523 TEST_TAR_FORMAT=oldgnu
31524 export TEST_TAR_FORMAT
31525 TAR_OPTIONS="-H oldgnu"
31526 export TAR_OPTIONS
31527 rm -rf *
31528
31529 genfile --length 10240 --file en
31530 genfile --length 20000 --file to
31531 genfile --length 20000 --file tre
31532 genfile --length 10240 --file fire
31533
31534 exec <&-
31535
31536 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
31537 echo separator
31538 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
31539 )
31540 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31541 at_status=$? at_failed=false
31542 $at_check_filter
31543 at_fn_diff_devnull "$at_stderr" || at_failed=:
31544 echo >>"$at_stdout"; $as_echo "separator
31545 en
31546 " | \
31547   $at_diff - "$at_stdout" || at_failed=:
31548 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32"
31549 $at_failed && at_fn_log_failure
31550 $at_traceon; }
31551
31552               { set +x
31553 $as_echo "$at_srcdir/multiv02.at:32:
31554 mkdir pax
31555 (cd pax
31556 TEST_TAR_FORMAT=pax
31557 export TEST_TAR_FORMAT
31558 TAR_OPTIONS=\"-H pax\"
31559 export TAR_OPTIONS
31560 rm -rf *
31561
31562 genfile --length 10240 --file en
31563 genfile --length 20000 --file to
31564 genfile --length 20000 --file tre
31565 genfile --length 10240 --file fire
31566
31567 exec <&-
31568
31569 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
31570 echo separator
31571 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
31572 )"
31573 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:32"
31574 ( $at_check_trace;
31575 mkdir pax
31576 (cd pax
31577 TEST_TAR_FORMAT=pax
31578 export TEST_TAR_FORMAT
31579 TAR_OPTIONS="-H pax"
31580 export TAR_OPTIONS
31581 rm -rf *
31582
31583 genfile --length 10240 --file en
31584 genfile --length 20000 --file to
31585 genfile --length 20000 --file tre
31586 genfile --length 10240 --file fire
31587
31588 exec <&-
31589
31590 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
31591 echo separator
31592 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
31593 )
31594 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31595 at_status=$? at_failed=false
31596 $at_check_filter
31597 at_fn_diff_devnull "$at_stderr" || at_failed=:
31598 echo >>"$at_stdout"; $as_echo "separator
31599 en
31600 " | \
31601   $at_diff - "$at_stdout" || at_failed=:
31602 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:32"
31603 $at_failed && at_fn_log_failure
31604 $at_traceon; }
31605
31606
31607
31608
31609   set +x
31610   $at_times_p && times >"$at_times_file"
31611 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31612 read at_status <"$at_status_file"
31613 #AT_STOP_128
31614 #AT_START_129
31615 at_fn_group_banner 129 'multiv03.at:30' \
31616   "MV archive & long filenames" "                    " 17
31617 at_xfail=no
31618       test -f $XFAILFILE && at_xfail=yes
31619 (
31620   $as_echo "129. $at_setup_line: testing $at_desc ..."
31621   $at_traceon
31622
31623
31624
31625
31626
31627   { set +x
31628 $as_echo "$at_srcdir/multiv03.at:33:
31629 mkdir gnu
31630 (cd gnu
31631 TEST_TAR_FORMAT=gnu
31632 export TEST_TAR_FORMAT
31633 TAR_OPTIONS=\"-H gnu\"
31634 export TAR_OPTIONS
31635 rm -rf *
31636
31637 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
31638 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
31639
31640 cat > ../experr <<EOF
31641 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
31642 tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
31643 EOF
31644
31645 cat > ../expout <<EOF
31646 \$AFILE
31647 separator-1
31648 separator-2
31649 EOF
31650
31651 genfile --length 15360 --file \$AFILE
31652
31653 exec <&-
31654
31655 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
31656 tar -tM -f arch.1 -f arch.2 || exit 1
31657
31658 echo separator-1
31659
31660 genfile --length 15360 --file \$BFILE
31661 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
31662
31663 echo separator-2
31664 mv \$BFILE bfile
31665 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
31666 cmp \$BFILE bfile
31667 )"
31668 at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
31669 ( $at_check_trace;
31670 mkdir gnu
31671 (cd gnu
31672 TEST_TAR_FORMAT=gnu
31673 export TEST_TAR_FORMAT
31674 TAR_OPTIONS="-H gnu"
31675 export TAR_OPTIONS
31676 rm -rf *
31677
31678 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
31679 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
31680
31681 cat > ../experr <<EOF
31682 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
31683 tar: '$BFILE' is possibly continued on this volume: header contains truncated name
31684 EOF
31685
31686 cat > ../expout <<EOF
31687 $AFILE
31688 separator-1
31689 separator-2
31690 EOF
31691
31692 genfile --length 15360 --file $AFILE
31693
31694 exec <&-
31695
31696 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
31697 tar -tM -f arch.1 -f arch.2 || exit 1
31698
31699 echo separator-1
31700
31701 genfile --length 15360 --file $BFILE
31702 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
31703
31704 echo separator-2
31705 mv $BFILE bfile
31706 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
31707 cmp $BFILE bfile
31708 )
31709 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31710 at_status=$? at_failed=false
31711 $at_check_filter
31712 $at_diff experr "$at_stderr" || at_failed=:
31713 $at_diff expout "$at_stdout" || at_failed=:
31714 at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
31715 $at_failed && at_fn_log_failure
31716 $at_traceon; }
31717
31718               { set +x
31719 $as_echo "$at_srcdir/multiv03.at:33:
31720 mkdir oldgnu
31721 (cd oldgnu
31722 TEST_TAR_FORMAT=oldgnu
31723 export TEST_TAR_FORMAT
31724 TAR_OPTIONS=\"-H oldgnu\"
31725 export TAR_OPTIONS
31726 rm -rf *
31727
31728 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
31729 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
31730
31731 cat > ../experr <<EOF
31732 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
31733 tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
31734 EOF
31735
31736 cat > ../expout <<EOF
31737 \$AFILE
31738 separator-1
31739 separator-2
31740 EOF
31741
31742 genfile --length 15360 --file \$AFILE
31743
31744 exec <&-
31745
31746 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
31747 tar -tM -f arch.1 -f arch.2 || exit 1
31748
31749 echo separator-1
31750
31751 genfile --length 15360 --file \$BFILE
31752 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
31753
31754 echo separator-2
31755 mv \$BFILE bfile
31756 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
31757 cmp \$BFILE bfile
31758 )"
31759 at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
31760 ( $at_check_trace;
31761 mkdir oldgnu
31762 (cd oldgnu
31763 TEST_TAR_FORMAT=oldgnu
31764 export TEST_TAR_FORMAT
31765 TAR_OPTIONS="-H oldgnu"
31766 export TAR_OPTIONS
31767 rm -rf *
31768
31769 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
31770 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
31771
31772 cat > ../experr <<EOF
31773 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
31774 tar: '$BFILE' is possibly continued on this volume: header contains truncated name
31775 EOF
31776
31777 cat > ../expout <<EOF
31778 $AFILE
31779 separator-1
31780 separator-2
31781 EOF
31782
31783 genfile --length 15360 --file $AFILE
31784
31785 exec <&-
31786
31787 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
31788 tar -tM -f arch.1 -f arch.2 || exit 1
31789
31790 echo separator-1
31791
31792 genfile --length 15360 --file $BFILE
31793 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
31794
31795 echo separator-2
31796 mv $BFILE bfile
31797 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
31798 cmp $BFILE bfile
31799 )
31800 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31801 at_status=$? at_failed=false
31802 $at_check_filter
31803 $at_diff experr "$at_stderr" || at_failed=:
31804 $at_diff expout "$at_stdout" || at_failed=:
31805 at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
31806 $at_failed && at_fn_log_failure
31807 $at_traceon; }
31808
31809
31810
31811
31812   set +x
31813   $at_times_p && times >"$at_times_file"
31814 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31815 read at_status <"$at_status_file"
31816 #AT_STOP_129
31817 #AT_START_130
31818 at_fn_group_banner 130 'multiv04.at:36' \
31819   "split directory members in a MV archive" "        " 17
31820 at_xfail=no
31821       test -f $XFAILFILE && at_xfail=yes
31822 (
31823   $as_echo "130. $at_setup_line: testing $at_desc ..."
31824   $at_traceon
31825
31826
31827
31828
31829
31830   { set +x
31831 $as_echo "$at_srcdir/multiv04.at:39:
31832 mkdir gnu
31833 (cd gnu
31834 TEST_TAR_FORMAT=gnu
31835 export TEST_TAR_FORMAT
31836 TAR_OPTIONS=\"-H gnu\"
31837 export TAR_OPTIONS
31838 rm -rf *
31839
31840
31841 mkdir directory
31842 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
31843
31844 exec <&-
31845
31846 sleep 2
31847
31848 tar --listed-incremental=list -c -f archive.a directory
31849
31850 sleep 2
31851
31852 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
31853
31854 echo separator
31855
31856 tar -MRt -f arc.1 -f arc.2)"
31857 at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
31858 ( $at_check_trace;
31859 mkdir gnu
31860 (cd gnu
31861 TEST_TAR_FORMAT=gnu
31862 export TEST_TAR_FORMAT
31863 TAR_OPTIONS="-H gnu"
31864 export TAR_OPTIONS
31865 rm -rf *
31866
31867
31868 mkdir directory
31869 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
31870
31871 exec <&-
31872
31873 sleep 2
31874
31875 tar --listed-incremental=list -c -f archive.a directory
31876
31877 sleep 2
31878
31879 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
31880
31881 echo separator
31882
31883 tar -MRt -f arc.1 -f arc.2)
31884 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31885 at_status=$? at_failed=false
31886 $at_check_filter
31887 at_fn_diff_devnull "$at_stderr" || at_failed=:
31888 echo >>"$at_stdout"; $as_echo "directory/
31889 separator
31890 block 0: directory/
31891 block 35: ** Block of NULs **
31892 " | \
31893   $at_diff - "$at_stdout" || at_failed=:
31894 at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
31895 $at_failed && at_fn_log_failure
31896 $at_traceon; }
31897
31898               { set +x
31899 $as_echo "$at_srcdir/multiv04.at:39:
31900 mkdir oldgnu
31901 (cd oldgnu
31902 TEST_TAR_FORMAT=oldgnu
31903 export TEST_TAR_FORMAT
31904 TAR_OPTIONS=\"-H oldgnu\"
31905 export TAR_OPTIONS
31906 rm -rf *
31907
31908
31909 mkdir directory
31910 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
31911
31912 exec <&-
31913
31914 sleep 2
31915
31916 tar --listed-incremental=list -c -f archive.a directory
31917
31918 sleep 2
31919
31920 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
31921
31922 echo separator
31923
31924 tar -MRt -f arc.1 -f arc.2)"
31925 at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
31926 ( $at_check_trace;
31927 mkdir oldgnu
31928 (cd oldgnu
31929 TEST_TAR_FORMAT=oldgnu
31930 export TEST_TAR_FORMAT
31931 TAR_OPTIONS="-H oldgnu"
31932 export TAR_OPTIONS
31933 rm -rf *
31934
31935
31936 mkdir directory
31937 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
31938
31939 exec <&-
31940
31941 sleep 2
31942
31943 tar --listed-incremental=list -c -f archive.a directory
31944
31945 sleep 2
31946
31947 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
31948
31949 echo separator
31950
31951 tar -MRt -f arc.1 -f arc.2)
31952 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31953 at_status=$? at_failed=false
31954 $at_check_filter
31955 at_fn_diff_devnull "$at_stderr" || at_failed=:
31956 echo >>"$at_stdout"; $as_echo "directory/
31957 separator
31958 block 0: directory/
31959 block 35: ** Block of NULs **
31960 " | \
31961   $at_diff - "$at_stdout" || at_failed=:
31962 at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
31963 $at_failed && at_fn_log_failure
31964 $at_traceon; }
31965
31966
31967
31968
31969   set +x
31970   $at_times_p && times >"$at_times_file"
31971 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31972 read at_status <"$at_status_file"
31973 #AT_STOP_130
31974 #AT_START_131
31975 at_fn_group_banner 131 'multiv05.at:26' \
31976   "Restoring after an out of sync volume" "          " 17
31977 at_xfail=no
31978       test -f $XFAILFILE && at_xfail=yes
31979 (
31980   $as_echo "131. $at_setup_line: testing $at_desc ..."
31981   $at_traceon
31982
31983
31984
31985
31986
31987
31988   { set +x
31989 $as_echo "$at_srcdir/multiv05.at:30:
31990 mkdir gnu
31991 (cd gnu
31992 TEST_TAR_FORMAT=gnu
31993 export TEST_TAR_FORMAT
31994 TAR_OPTIONS=\"-H gnu\"
31995 export TAR_OPTIONS
31996 rm -rf *
31997
31998 exec <&-
31999
32000 genfile --length 250k --file jeden
32001 genfile --length 250k --file dwa
32002 genfile --length 250k --file trzy
32003 genfile --length 250k --file cztery
32004 genfile --length 250k --file piec
32005 genfile --length 250k --file szesc
32006
32007
32008 echo Creating archive
32009 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
32010 echo separator
32011 mkdir bak
32012 mv jeden dwa trzy cztery piec szesc bak
32013 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
32014 echo Diffing jeden
32015    cmp bak/jeden jeden || exit 1
32016 echo Diffing dwa
32017    cmp bak/dwa dwa || exit 1
32018 echo Diffing trzy
32019    cmp bak/trzy trzy || exit 1
32020 echo Diffing cztery
32021    cmp bak/cztery cztery || exit 1
32022 echo Diffing piec
32023    cmp bak/piec piec || exit 1
32024 echo Diffing szesc
32025    cmp bak/szesc szesc || exit 1
32026 )"
32027 at_fn_check_prepare_notrace 'an embedded newline' "multiv05.at:30"
32028 ( $at_check_trace;
32029 mkdir gnu
32030 (cd gnu
32031 TEST_TAR_FORMAT=gnu
32032 export TEST_TAR_FORMAT
32033 TAR_OPTIONS="-H gnu"
32034 export TAR_OPTIONS
32035 rm -rf *
32036
32037 exec <&-
32038
32039 genfile --length 250k --file jeden
32040 genfile --length 250k --file dwa
32041 genfile --length 250k --file trzy
32042 genfile --length 250k --file cztery
32043 genfile --length 250k --file piec
32044 genfile --length 250k --file szesc
32045
32046
32047 echo Creating archive
32048 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
32049 echo separator
32050 mkdir bak
32051 mv jeden dwa trzy cztery piec szesc bak
32052 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
32053 echo Diffing jeden
32054    cmp bak/jeden jeden || exit 1
32055 echo Diffing dwa
32056    cmp bak/dwa dwa || exit 1
32057 echo Diffing trzy
32058    cmp bak/trzy trzy || exit 1
32059 echo Diffing cztery
32060    cmp bak/cztery cztery || exit 1
32061 echo Diffing piec
32062    cmp bak/piec piec || exit 1
32063 echo Diffing szesc
32064    cmp bak/szesc szesc || exit 1
32065 )
32066 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32067 at_status=$? at_failed=false
32068 $at_check_filter
32069 echo >>"$at_stderr"; $as_echo "tar: 'trzy' is not continued on this volume
32070 " | \
32071   $at_diff - "$at_stderr" || at_failed=:
32072 echo >>"$at_stdout"; $as_echo "Creating archive
32073 separator
32074 jeden
32075 dwa
32076 trzy
32077 cztery
32078 piec
32079 szesc
32080 Diffing jeden
32081 Diffing dwa
32082 Diffing trzy
32083 Diffing cztery
32084 Diffing piec
32085 Diffing szesc
32086 " | \
32087   $at_diff - "$at_stdout" || at_failed=:
32088 at_fn_check_status 0 $at_status "$at_srcdir/multiv05.at:30"
32089 $at_failed && at_fn_log_failure
32090 $at_traceon; }
32091
32092
32093
32094
32095
32096   set +x
32097   $at_times_p && times >"$at_times_file"
32098 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32099 read at_status <"$at_status_file"
32100 #AT_STOP_131
32101 #AT_START_132
32102 at_fn_group_banner 132 'multiv06.at:27' \
32103   "Multivolumes with L=record_size" "                " 17
32104 at_xfail=no
32105       test -f $XFAILFILE && at_xfail=yes
32106 (
32107   $as_echo "132. $at_setup_line: testing $at_desc ..."
32108   $at_traceon
32109
32110
32111
32112
32113
32114   { set +x
32115 $as_echo "$at_srcdir/multiv06.at:30:
32116 mkdir gnu
32117 (cd gnu
32118 TEST_TAR_FORMAT=gnu
32119 export TEST_TAR_FORMAT
32120 TAR_OPTIONS=\"-H gnu\"
32121 export TAR_OPTIONS
32122 rm -rf *
32123
32124 exec <&-
32125 decho Creating file
32126 genfile --length 20139 --file file
32127 decho Creating archive
32128 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
32129 decho Testing archive
32130 tar -t -M -farc.1 -farc.2 -farc.3)"
32131 at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
32132 ( $at_check_trace;
32133 mkdir gnu
32134 (cd gnu
32135 TEST_TAR_FORMAT=gnu
32136 export TEST_TAR_FORMAT
32137 TAR_OPTIONS="-H gnu"
32138 export TAR_OPTIONS
32139 rm -rf *
32140
32141 exec <&-
32142 decho Creating file
32143 genfile --length 20139 --file file
32144 decho Creating archive
32145 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
32146 decho Testing archive
32147 tar -t -M -farc.1 -farc.2 -farc.3)
32148 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32149 at_status=$? at_failed=false
32150 $at_check_filter
32151 echo >>"$at_stderr"; $as_echo "Creating file
32152 Creating archive
32153 Testing archive
32154 " | \
32155   $at_diff - "$at_stderr" || at_failed=:
32156 echo >>"$at_stdout"; $as_echo "Creating file
32157 Creating archive
32158 Testing archive
32159 file
32160 " | \
32161   $at_diff - "$at_stdout" || at_failed=:
32162 at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
32163 $at_failed && at_fn_log_failure
32164 $at_traceon; }
32165
32166               { set +x
32167 $as_echo "$at_srcdir/multiv06.at:30:
32168 mkdir pax
32169 (cd pax
32170 TEST_TAR_FORMAT=pax
32171 export TEST_TAR_FORMAT
32172 TAR_OPTIONS=\"-H pax\"
32173 export TAR_OPTIONS
32174 rm -rf *
32175
32176 exec <&-
32177 decho Creating file
32178 genfile --length 20139 --file file
32179 decho Creating archive
32180 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
32181 decho Testing archive
32182 tar -t -M -farc.1 -farc.2 -farc.3)"
32183 at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
32184 ( $at_check_trace;
32185 mkdir pax
32186 (cd pax
32187 TEST_TAR_FORMAT=pax
32188 export TEST_TAR_FORMAT
32189 TAR_OPTIONS="-H pax"
32190 export TAR_OPTIONS
32191 rm -rf *
32192
32193 exec <&-
32194 decho Creating file
32195 genfile --length 20139 --file file
32196 decho Creating archive
32197 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
32198 decho Testing archive
32199 tar -t -M -farc.1 -farc.2 -farc.3)
32200 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32201 at_status=$? at_failed=false
32202 $at_check_filter
32203 echo >>"$at_stderr"; $as_echo "Creating file
32204 Creating archive
32205 Testing archive
32206 " | \
32207   $at_diff - "$at_stderr" || at_failed=:
32208 echo >>"$at_stdout"; $as_echo "Creating file
32209 Creating archive
32210 Testing archive
32211 file
32212 " | \
32213   $at_diff - "$at_stdout" || at_failed=:
32214 at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
32215 $at_failed && at_fn_log_failure
32216 $at_traceon; }
32217
32218
32219
32220
32221   set +x
32222   $at_times_p && times >"$at_times_file"
32223 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32224 read at_status <"$at_status_file"
32225 #AT_STOP_132
32226 #AT_START_133
32227 at_fn_group_banner 133 'multiv07.at:28' \
32228   "volumes split at an extended header" "            " 17
32229 at_xfail=no
32230       test -f $XFAILFILE && at_xfail=yes
32231 (
32232   $as_echo "133. $at_setup_line: testing $at_desc ..."
32233   $at_traceon
32234
32235
32236
32237 { set +x
32238 $as_echo "$at_srcdir/multiv07.at:31:
32239
32240
32241 test -z \"\$TEST_DATA_DIR\" && exit 77
32242 tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
32243
32244 test -z \"\$TEST_DATA_DIR\" && exit 77
32245 tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
32246
32247 exec <&-
32248
32249 cd \$TEST_DATA_DIR
32250 tar -t -M -fxsplit-1.tar -fxsplit-2.tar
32251 "
32252 at_fn_check_prepare_notrace 'an embedded newline' "multiv07.at:31"
32253 ( $at_check_trace;
32254
32255
32256 test -z "$TEST_DATA_DIR" && exit 77
32257 tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
32258
32259 test -z "$TEST_DATA_DIR" && exit 77
32260 tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
32261
32262 exec <&-
32263
32264 cd $TEST_DATA_DIR
32265 tar -t -M -fxsplit-1.tar -fxsplit-2.tar
32266
32267 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32268 at_status=$? at_failed=false
32269 $at_check_filter
32270 at_fn_diff_devnull "$at_stderr" || at_failed=:
32271 echo >>"$at_stdout"; $as_echo "Archive volumes split at an extended header Volume 1
32272 foo
32273 bar
32274 " | \
32275   $at_diff - "$at_stdout" || at_failed=:
32276 at_fn_check_status 0 $at_status "$at_srcdir/multiv07.at:31"
32277 $at_failed && at_fn_log_failure
32278 $at_traceon; }
32279
32280
32281   set +x
32282   $at_times_p && times >"$at_times_file"
32283 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32284 read at_status <"$at_status_file"
32285 #AT_STOP_133
32286 #AT_START_134
32287 at_fn_group_banner 134 'multiv08.at:25' \
32288   "multivolume header creation" "                    " 17
32289 at_xfail=no
32290       test -f $XFAILFILE && at_xfail=yes
32291 (
32292   $as_echo "134. $at_setup_line: testing $at_desc ..."
32293   $at_traceon
32294
32295
32296
32297
32298
32299   { set +x
32300 $as_echo "$at_srcdir/multiv08.at:28:
32301 mkdir gnu
32302 (cd gnu
32303 TEST_TAR_FORMAT=gnu
32304 export TEST_TAR_FORMAT
32305 TAR_OPTIONS=\"-H gnu\"
32306 export TAR_OPTIONS
32307 rm -rf *
32308
32309 genfile --length 9472 --file a
32310 genfile --length 9984 --file b
32311 decho Creating
32312 tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
32313 decho Testing
32314 tar -tMR -f A.tar -f B.tar -f C.tar
32315 )"
32316 at_fn_check_prepare_notrace 'an embedded newline' "multiv08.at:28"
32317 ( $at_check_trace;
32318 mkdir gnu
32319 (cd gnu
32320 TEST_TAR_FORMAT=gnu
32321 export TEST_TAR_FORMAT
32322 TAR_OPTIONS="-H gnu"
32323 export TAR_OPTIONS
32324 rm -rf *
32325
32326 genfile --length 9472 --file a
32327 genfile --length 9984 --file b
32328 decho Creating
32329 tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
32330 decho Testing
32331 tar -tMR -f A.tar -f B.tar -f C.tar
32332 )
32333 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32334 at_status=$? at_failed=false
32335 $at_check_filter
32336 echo >>"$at_stderr"; $as_echo "Creating
32337 Testing
32338 " | \
32339   $at_diff - "$at_stderr" || at_failed=:
32340 echo >>"$at_stdout"; $as_echo "Creating
32341 Testing
32342 block 0: a
32343 block 21: b
32344 block 43: ** Block of NULs **
32345 " | \
32346   $at_diff - "$at_stdout" || at_failed=:
32347 at_fn_check_status 0 $at_status "$at_srcdir/multiv08.at:28"
32348 $at_failed && at_fn_log_failure
32349 $at_traceon; }
32350
32351
32352
32353
32354   set +x
32355   $at_times_p && times >"$at_times_file"
32356 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32357 read at_status <"$at_status_file"
32358 #AT_STOP_134
32359 #AT_START_135
32360 at_fn_group_banner 135 'multiv09.at:26' \
32361   "bad next volume" "                                " 17
32362 at_xfail=no
32363       test -f $XFAILFILE && at_xfail=yes
32364 (
32365   $as_echo "135. $at_setup_line: testing $at_desc ..."
32366   $at_traceon
32367
32368
32369
32370 # filename of length 100 characters
32371
32372
32373
32374
32375   { set +x
32376 $as_echo "$at_srcdir/multiv09.at:33:
32377 mkdir v7
32378 (cd v7
32379 TEST_TAR_FORMAT=v7
32380 export TEST_TAR_FORMAT
32381 TAR_OPTIONS=\"-H v7\"
32382 export TAR_OPTIONS
32383 rm -rf *
32384
32385 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32386 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
32387 echo \"created\"
32388 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32389 y
32390 q
32391 EOF
32392 )"
32393 at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
32394 ( $at_check_trace;
32395 mkdir v7
32396 (cd v7
32397 TEST_TAR_FORMAT=v7
32398 export TEST_TAR_FORMAT
32399 TAR_OPTIONS="-H v7"
32400 export TAR_OPTIONS
32401 rm -rf *
32402
32403 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32404 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
32405 echo "created"
32406 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32407 y
32408 q
32409 EOF
32410 )
32411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32412 at_status=$? at_failed=false
32413 $at_check_filter
32414 at_fn_diff_devnull "$at_stderr" || at_failed=:
32415 echo >>"$at_stdout"; $as_echo "created
32416 " | \
32417   $at_diff - "$at_stdout" || at_failed=:
32418 at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
32419 $at_failed && at_fn_log_failure
32420 $at_traceon; }
32421
32422               { set +x
32423 $as_echo "$at_srcdir/multiv09.at:33:
32424 mkdir oldgnu
32425 (cd oldgnu
32426 TEST_TAR_FORMAT=oldgnu
32427 export TEST_TAR_FORMAT
32428 TAR_OPTIONS=\"-H oldgnu\"
32429 export TAR_OPTIONS
32430 rm -rf *
32431
32432 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32433 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
32434 echo \"created\"
32435 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32436 y
32437 q
32438 EOF
32439 )"
32440 at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
32441 ( $at_check_trace;
32442 mkdir oldgnu
32443 (cd oldgnu
32444 TEST_TAR_FORMAT=oldgnu
32445 export TEST_TAR_FORMAT
32446 TAR_OPTIONS="-H oldgnu"
32447 export TAR_OPTIONS
32448 rm -rf *
32449
32450 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32451 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
32452 echo "created"
32453 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32454 y
32455 q
32456 EOF
32457 )
32458 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32459 at_status=$? at_failed=false
32460 $at_check_filter
32461 at_fn_diff_devnull "$at_stderr" || at_failed=:
32462 echo >>"$at_stdout"; $as_echo "created
32463 " | \
32464   $at_diff - "$at_stdout" || at_failed=:
32465 at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
32466 $at_failed && at_fn_log_failure
32467 $at_traceon; }
32468
32469               { set +x
32470 $as_echo "$at_srcdir/multiv09.at:33:
32471 mkdir ustar
32472 (cd ustar
32473 TEST_TAR_FORMAT=ustar
32474 export TEST_TAR_FORMAT
32475 TAR_OPTIONS=\"-H ustar\"
32476 export TAR_OPTIONS
32477 rm -rf *
32478
32479 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32480 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
32481 echo \"created\"
32482 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32483 y
32484 q
32485 EOF
32486 )"
32487 at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
32488 ( $at_check_trace;
32489 mkdir ustar
32490 (cd ustar
32491 TEST_TAR_FORMAT=ustar
32492 export TEST_TAR_FORMAT
32493 TAR_OPTIONS="-H ustar"
32494 export TAR_OPTIONS
32495 rm -rf *
32496
32497 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32498 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
32499 echo "created"
32500 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32501 y
32502 q
32503 EOF
32504 )
32505 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32506 at_status=$? at_failed=false
32507 $at_check_filter
32508 at_fn_diff_devnull "$at_stderr" || at_failed=:
32509 echo >>"$at_stdout"; $as_echo "created
32510 " | \
32511   $at_diff - "$at_stdout" || at_failed=:
32512 at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
32513 $at_failed && at_fn_log_failure
32514 $at_traceon; }
32515
32516               { set +x
32517 $as_echo "$at_srcdir/multiv09.at:33:
32518 mkdir posix
32519 (cd posix
32520 TEST_TAR_FORMAT=posix
32521 export TEST_TAR_FORMAT
32522 TAR_OPTIONS=\"-H posix\"
32523 export TAR_OPTIONS
32524 rm -rf *
32525
32526 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32527 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
32528 echo \"created\"
32529 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32530 y
32531 q
32532 EOF
32533 )"
32534 at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
32535 ( $at_check_trace;
32536 mkdir posix
32537 (cd posix
32538 TEST_TAR_FORMAT=posix
32539 export TEST_TAR_FORMAT
32540 TAR_OPTIONS="-H posix"
32541 export TAR_OPTIONS
32542 rm -rf *
32543
32544 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32545 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
32546 echo "created"
32547 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32548 y
32549 q
32550 EOF
32551 )
32552 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32553 at_status=$? at_failed=false
32554 $at_check_filter
32555 at_fn_diff_devnull "$at_stderr" || at_failed=:
32556 echo >>"$at_stdout"; $as_echo "created
32557 " | \
32558   $at_diff - "$at_stdout" || at_failed=:
32559 at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
32560 $at_failed && at_fn_log_failure
32561 $at_traceon; }
32562
32563               { set +x
32564 $as_echo "$at_srcdir/multiv09.at:33:
32565 mkdir gnu
32566 (cd gnu
32567 TEST_TAR_FORMAT=gnu
32568 export TEST_TAR_FORMAT
32569 TAR_OPTIONS=\"-H gnu\"
32570 export TAR_OPTIONS
32571 rm -rf *
32572
32573 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32574 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit \$?
32575 echo \"created\"
32576 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32577 y
32578 q
32579 EOF
32580 )"
32581 at_fn_check_prepare_notrace 'an embedded newline' "multiv09.at:33"
32582 ( $at_check_trace;
32583 mkdir gnu
32584 (cd gnu
32585 TEST_TAR_FORMAT=gnu
32586 export TEST_TAR_FORMAT
32587 TAR_OPTIONS="-H gnu"
32588 export TAR_OPTIONS
32589 rm -rf *
32590
32591 genfile --length 2000000 --file aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
32592 tar --format=gnu -cM --tape-length 1M -f A.tar -f B.tar aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || exit $?
32593 echo "created"
32594 tar --format=gnu -xM -f A.tar 2>/dev/null <<EOF
32595 y
32596 q
32597 EOF
32598 )
32599 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32600 at_status=$? at_failed=false
32601 $at_check_filter
32602 at_fn_diff_devnull "$at_stderr" || at_failed=:
32603 echo >>"$at_stdout"; $as_echo "created
32604 " | \
32605   $at_diff - "$at_stdout" || at_failed=:
32606 at_fn_check_status 2 $at_status "$at_srcdir/multiv09.at:33"
32607 $at_failed && at_fn_log_failure
32608 $at_traceon; }
32609
32610
32611
32612
32613   set +x
32614   $at_times_p && times >"$at_times_file"
32615 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32616 read at_status <"$at_status_file"
32617 #AT_STOP_135
32618 #AT_START_136
32619 at_fn_group_banner 136 'owner.at:21' \
32620   "--owner and --group" "                            " 18
32621 at_xfail=no
32622       test -f $XFAILFILE && at_xfail=yes
32623 (
32624   $as_echo "136. $at_setup_line: testing $at_desc ..."
32625   $at_traceon
32626
32627
32628
32629
32630
32631   { set +x
32632 $as_echo "$at_srcdir/owner.at:24:
32633 mkdir gnu
32634 (cd gnu
32635 TEST_TAR_FORMAT=gnu
32636 export TEST_TAR_FORMAT
32637 TAR_OPTIONS=\"-H gnu\"
32638 export TAR_OPTIONS
32639 rm -rf *
32640
32641 export TZ=UTC0
32642
32643 genfile --file a
32644
32645 tar --owner=\"Joe the Plumber:1234\" \\
32646     --group=\"Plumber's Union:5678\" \\
32647     --mtime='@0' \\
32648     --mode='u=rw,go=r' \\
32649     -cf arc a
32650
32651 tar -tvf arc
32652 tar --numeric-owner -tvf arc
32653 )"
32654 at_fn_check_prepare_notrace 'an embedded newline' "owner.at:24"
32655 ( $at_check_trace;
32656 mkdir gnu
32657 (cd gnu
32658 TEST_TAR_FORMAT=gnu
32659 export TEST_TAR_FORMAT
32660 TAR_OPTIONS="-H gnu"
32661 export TAR_OPTIONS
32662 rm -rf *
32663
32664 export TZ=UTC0
32665
32666 genfile --file a
32667
32668 tar --owner="Joe the Plumber:1234" \
32669     --group="Plumber's Union:5678" \
32670     --mtime='@0' \
32671     --mode='u=rw,go=r' \
32672     -cf arc a
32673
32674 tar -tvf arc
32675 tar --numeric-owner -tvf arc
32676 )
32677 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32678 at_status=$? at_failed=false
32679 $at_check_filter
32680 at_fn_diff_devnull "$at_stderr" || at_failed=:
32681 echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
32682 -rw-r--r-- 1234/5678         0 1970-01-01 00:00 a
32683 " | \
32684   $at_diff - "$at_stdout" || at_failed=:
32685 at_fn_check_status 0 $at_status "$at_srcdir/owner.at:24"
32686 $at_failed && at_fn_log_failure
32687 $at_traceon; }
32688
32689
32690
32691
32692   set +x
32693   $at_times_p && times >"$at_times_file"
32694 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32695 read at_status <"$at_status_file"
32696 #AT_STOP_136
32697 #AT_START_137
32698 at_fn_group_banner 137 'map.at:21' \
32699   "--owner-map and --group-map" "                    " 18
32700 at_xfail=no
32701       test -f $XFAILFILE && at_xfail=yes
32702 (
32703   $as_echo "137. $at_setup_line: testing $at_desc ..."
32704   $at_traceon
32705
32706
32707
32708
32709
32710   { set +x
32711 $as_echo "$at_srcdir/map.at:24:
32712 mkdir gnu
32713 (cd gnu
32714 TEST_TAR_FORMAT=gnu
32715 export TEST_TAR_FORMAT
32716 TAR_OPTIONS=\"-H gnu\"
32717 export TAR_OPTIONS
32718 rm -rf *
32719
32720 export TZ=UTC0
32721
32722 genfile --file a
32723 set -- \`genfile --stat=uid,gid a\`
32724 cat > uid.map <<EOT
32725 # Owner mapping
32726 +\$1    \"Joe the Plumber:1234\"
32727 EOT
32728 # Group mapping
32729 cat > gid.map <<EOT
32730 +\$2    \"Plumber's Union:5678\"
32731 EOT
32732
32733 tar --owner-map=uid.map\\
32734     --group-map=gid.map\\
32735     --owner=\"Fallback Owner:4321\" \\
32736     --group=\"Fallback Group:8765\" \\
32737     --mtime='@0' \\
32738     --mode='u=rw,go=r' \\
32739     -cf 1.tar a
32740
32741 tar -tvf 1.tar
32742 tar --numeric-owner -tvf 1.tar
32743
32744 > uid.map
32745 > gid.map
32746
32747 tar --owner-map=uid.map\\
32748     --group-map=gid.map\\
32749     --owner=\"Fallback Owner:4321\" \\
32750     --group=\"Fallback Group:8765\" \\
32751     --mtime='@0' \\
32752     --mode='u=rw,go=r' \\
32753     -cf 2.tar a
32754
32755 tar -tvf 2.tar
32756 tar --numeric-owner -tvf 2.tar
32757 )"
32758 at_fn_check_prepare_notrace 'a `...` command substitution' "map.at:24"
32759 ( $at_check_trace;
32760 mkdir gnu
32761 (cd gnu
32762 TEST_TAR_FORMAT=gnu
32763 export TEST_TAR_FORMAT
32764 TAR_OPTIONS="-H gnu"
32765 export TAR_OPTIONS
32766 rm -rf *
32767
32768 export TZ=UTC0
32769
32770 genfile --file a
32771 set -- `genfile --stat=uid,gid a`
32772 cat > uid.map <<EOT
32773 # Owner mapping
32774 +$1     "Joe the Plumber:1234"
32775 EOT
32776 # Group mapping
32777 cat > gid.map <<EOT
32778 +$2     "Plumber's Union:5678"
32779 EOT
32780
32781 tar --owner-map=uid.map\
32782     --group-map=gid.map\
32783     --owner="Fallback Owner:4321" \
32784     --group="Fallback Group:8765" \
32785     --mtime='@0' \
32786     --mode='u=rw,go=r' \
32787     -cf 1.tar a
32788
32789 tar -tvf 1.tar
32790 tar --numeric-owner -tvf 1.tar
32791
32792 > uid.map
32793 > gid.map
32794
32795 tar --owner-map=uid.map\
32796     --group-map=gid.map\
32797     --owner="Fallback Owner:4321" \
32798     --group="Fallback Group:8765" \
32799     --mtime='@0' \
32800     --mode='u=rw,go=r' \
32801     -cf 2.tar a
32802
32803 tar -tvf 2.tar
32804 tar --numeric-owner -tvf 2.tar
32805 )
32806 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32807 at_status=$? at_failed=false
32808 $at_check_filter
32809 at_fn_diff_devnull "$at_stderr" || at_failed=:
32810 echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
32811 -rw-r--r-- 1234/5678         0 1970-01-01 00:00 a
32812 -rw-r--r-- Fallback Owner/Fallback Group 0 1970-01-01 00:00 a
32813 -rw-r--r-- 4321/8765         0 1970-01-01 00:00 a
32814 " | \
32815   $at_diff - "$at_stdout" || at_failed=:
32816 at_fn_check_status 0 $at_status "$at_srcdir/map.at:24"
32817 $at_failed && at_fn_log_failure
32818 $at_traceon; }
32819
32820
32821
32822
32823   set +x
32824   $at_times_p && times >"$at_times_file"
32825 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32826 read at_status <"$at_status_file"
32827 #AT_STOP_137
32828 #AT_START_138
32829 at_fn_group_banner 138 'sparse01.at:22' \
32830   "sparse files" "                                   " 19
32831 at_xfail=no
32832       test -f $XFAILFILE && at_xfail=yes
32833 (
32834   $as_echo "138. $at_setup_line: testing $at_desc ..."
32835   $at_traceon
32836
32837
32838
32839
32840
32841   { set +x
32842 $as_echo "$at_srcdir/sparse01.at:25:
32843 mkdir posix
32844 (cd posix
32845 TEST_TAR_FORMAT=posix
32846 export TEST_TAR_FORMAT
32847 TAR_OPTIONS=\"-H posix\"
32848 export TAR_OPTIONS
32849 rm -rf *
32850
32851 genfile --length 1000 -f begin
32852 genfile --length 1000 -f end
32853 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
32854 tar -c -f archive --sparse begin sparsefile end || exit 1
32855 echo separator
32856
32857 tar tfv archive
32858 echo separator
32859 mkdir directory
32860 tar Cxf directory archive --warning=no-timestamp
32861 genfile --stat=name,size sparsefile
32862 cmp sparsefile directory/sparsefile
32863 )"
32864 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25"
32865 ( $at_check_trace;
32866 mkdir posix
32867 (cd posix
32868 TEST_TAR_FORMAT=posix
32869 export TEST_TAR_FORMAT
32870 TAR_OPTIONS="-H posix"
32871 export TAR_OPTIONS
32872 rm -rf *
32873
32874 genfile --length 1000 -f begin
32875 genfile --length 1000 -f end
32876 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
32877 tar -c -f archive --sparse begin sparsefile end || exit 1
32878 echo separator
32879
32880 tar tfv archive
32881 echo separator
32882 mkdir directory
32883 tar Cxf directory archive --warning=no-timestamp
32884 genfile --stat=name,size sparsefile
32885 cmp sparsefile directory/sparsefile
32886 )
32887 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32888 at_status=$? at_failed=false
32889 $at_check_filter
32890 at_fn_diff_devnull "$at_stderr" || at_failed=:
32891 echo stdout:; tee stdout <"$at_stdout"
32892 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25"
32893 $at_failed && at_fn_log_failure
32894 $at_traceon; }
32895
32896               { set +x
32897 $as_echo "$at_srcdir/sparse01.at:25:
32898 mkdir gnu
32899 (cd gnu
32900 TEST_TAR_FORMAT=gnu
32901 export TEST_TAR_FORMAT
32902 TAR_OPTIONS=\"-H gnu\"
32903 export TAR_OPTIONS
32904 rm -rf *
32905
32906 genfile --length 1000 -f begin
32907 genfile --length 1000 -f end
32908 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
32909 tar -c -f archive --sparse begin sparsefile end || exit 1
32910 echo separator
32911
32912 tar tfv archive
32913 echo separator
32914 mkdir directory
32915 tar Cxf directory archive --warning=no-timestamp
32916 genfile --stat=name,size sparsefile
32917 cmp sparsefile directory/sparsefile
32918 )"
32919 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25"
32920 ( $at_check_trace;
32921 mkdir gnu
32922 (cd gnu
32923 TEST_TAR_FORMAT=gnu
32924 export TEST_TAR_FORMAT
32925 TAR_OPTIONS="-H gnu"
32926 export TAR_OPTIONS
32927 rm -rf *
32928
32929 genfile --length 1000 -f begin
32930 genfile --length 1000 -f end
32931 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
32932 tar -c -f archive --sparse begin sparsefile end || exit 1
32933 echo separator
32934
32935 tar tfv archive
32936 echo separator
32937 mkdir directory
32938 tar Cxf directory archive --warning=no-timestamp
32939 genfile --stat=name,size sparsefile
32940 cmp sparsefile directory/sparsefile
32941 )
32942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32943 at_status=$? at_failed=false
32944 $at_check_filter
32945 at_fn_diff_devnull "$at_stderr" || at_failed=:
32946 echo stdout:; tee stdout <"$at_stdout"
32947 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25"
32948 $at_failed && at_fn_log_failure
32949 $at_traceon; }
32950
32951               { set +x
32952 $as_echo "$at_srcdir/sparse01.at:25:
32953 mkdir oldgnu
32954 (cd oldgnu
32955 TEST_TAR_FORMAT=oldgnu
32956 export TEST_TAR_FORMAT
32957 TAR_OPTIONS=\"-H oldgnu\"
32958 export TAR_OPTIONS
32959 rm -rf *
32960
32961 genfile --length 1000 -f begin
32962 genfile --length 1000 -f end
32963 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
32964 tar -c -f archive --sparse begin sparsefile end || exit 1
32965 echo separator
32966
32967 tar tfv archive
32968 echo separator
32969 mkdir directory
32970 tar Cxf directory archive --warning=no-timestamp
32971 genfile --stat=name,size sparsefile
32972 cmp sparsefile directory/sparsefile
32973 )"
32974 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:25"
32975 ( $at_check_trace;
32976 mkdir oldgnu
32977 (cd oldgnu
32978 TEST_TAR_FORMAT=oldgnu
32979 export TEST_TAR_FORMAT
32980 TAR_OPTIONS="-H oldgnu"
32981 export TAR_OPTIONS
32982 rm -rf *
32983
32984 genfile --length 1000 -f begin
32985 genfile --length 1000 -f end
32986 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
32987 tar -c -f archive --sparse begin sparsefile end || exit 1
32988 echo separator
32989
32990 tar tfv archive
32991 echo separator
32992 mkdir directory
32993 tar Cxf directory archive --warning=no-timestamp
32994 genfile --stat=name,size sparsefile
32995 cmp sparsefile directory/sparsefile
32996 )
32997 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32998 at_status=$? at_failed=false
32999 $at_check_filter
33000 at_fn_diff_devnull "$at_stderr" || at_failed=:
33001 echo stdout:; tee stdout <"$at_stdout"
33002 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:25"
33003 $at_failed && at_fn_log_failure
33004 $at_traceon; }
33005
33006
33007
33008
33009
33010 cat >stdout.re <<'_ATEOF'
33011 separator
33012 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
33013 -rw-r--r-- ^ ^ *  *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
33014 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
33015 separator
33016 sparsefile 10344448
33017 _ATEOF
33018
33019 awk '{print NR " " $0}' stdout > $$.1
33020 awk '{print NR " " $0}' stdout.re | join - $$.1 |
33021 while read NUM RE LINE
33022 do
33023   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
33024 done
33025
33026
33027   set +x
33028   $at_times_p && times >"$at_times_file"
33029 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33030 read at_status <"$at_status_file"
33031 #AT_STOP_138
33032 #AT_START_139
33033 at_fn_group_banner 139 'sparse02.at:22' \
33034   "extracting sparse file over a pipe" "             " 19
33035 at_xfail=no
33036       test -f $XFAILFILE && at_xfail=yes
33037 (
33038   $as_echo "139. $at_setup_line: testing $at_desc ..."
33039   $at_traceon
33040
33041
33042
33043 # Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
33044 # References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
33045 # http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
33046
33047
33048
33049   { set +x
33050 $as_echo "$at_srcdir/sparse02.at:29:
33051 mkdir posix
33052 (cd posix
33053 TEST_TAR_FORMAT=posix
33054 export TEST_TAR_FORMAT
33055 TAR_OPTIONS=\"-H posix\"
33056 export TAR_OPTIONS
33057 rm -rf *
33058
33059 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
33060 tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
33061 echo separator
33062
33063 tar xfO archive | cat - > sparsecopy || exit 1
33064 cmp sparsefile sparsecopy
33065 )"
33066 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29"
33067 ( $at_check_trace;
33068 mkdir posix
33069 (cd posix
33070 TEST_TAR_FORMAT=posix
33071 export TEST_TAR_FORMAT
33072 TAR_OPTIONS="-H posix"
33073 export TAR_OPTIONS
33074 rm -rf *
33075
33076 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
33077 tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
33078 echo separator
33079
33080 tar xfO archive | cat - > sparsecopy || exit 1
33081 cmp sparsefile sparsecopy
33082 )
33083 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33084 at_status=$? at_failed=false
33085 $at_check_filter
33086 at_fn_diff_devnull "$at_stderr" || at_failed=:
33087 echo >>"$at_stdout"; $as_echo "separator
33088 " | \
33089   $at_diff - "$at_stdout" || at_failed=:
33090 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29"
33091 $at_failed && at_fn_log_failure
33092 $at_traceon; }
33093
33094               { set +x
33095 $as_echo "$at_srcdir/sparse02.at:29:
33096 mkdir gnu
33097 (cd gnu
33098 TEST_TAR_FORMAT=gnu
33099 export TEST_TAR_FORMAT
33100 TAR_OPTIONS=\"-H gnu\"
33101 export TAR_OPTIONS
33102 rm -rf *
33103
33104 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
33105 tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
33106 echo separator
33107
33108 tar xfO archive | cat - > sparsecopy || exit 1
33109 cmp sparsefile sparsecopy
33110 )"
33111 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29"
33112 ( $at_check_trace;
33113 mkdir gnu
33114 (cd gnu
33115 TEST_TAR_FORMAT=gnu
33116 export TEST_TAR_FORMAT
33117 TAR_OPTIONS="-H gnu"
33118 export TAR_OPTIONS
33119 rm -rf *
33120
33121 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
33122 tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
33123 echo separator
33124
33125 tar xfO archive | cat - > sparsecopy || exit 1
33126 cmp sparsefile sparsecopy
33127 )
33128 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33129 at_status=$? at_failed=false
33130 $at_check_filter
33131 at_fn_diff_devnull "$at_stderr" || at_failed=:
33132 echo >>"$at_stdout"; $as_echo "separator
33133 " | \
33134   $at_diff - "$at_stdout" || at_failed=:
33135 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29"
33136 $at_failed && at_fn_log_failure
33137 $at_traceon; }
33138
33139               { set +x
33140 $as_echo "$at_srcdir/sparse02.at:29:
33141 mkdir oldgnu
33142 (cd oldgnu
33143 TEST_TAR_FORMAT=oldgnu
33144 export TEST_TAR_FORMAT
33145 TAR_OPTIONS=\"-H oldgnu\"
33146 export TAR_OPTIONS
33147 rm -rf *
33148
33149 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
33150 tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
33151 echo separator
33152
33153 tar xfO archive | cat - > sparsecopy || exit 1
33154 cmp sparsefile sparsecopy
33155 )"
33156 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:29"
33157 ( $at_check_trace;
33158 mkdir oldgnu
33159 (cd oldgnu
33160 TEST_TAR_FORMAT=oldgnu
33161 export TEST_TAR_FORMAT
33162 TAR_OPTIONS="-H oldgnu"
33163 export TAR_OPTIONS
33164 rm -rf *
33165
33166 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
33167 tar --hole-detection=raw -c -f archive --sparse sparsefile || exit 1
33168 echo separator
33169
33170 tar xfO archive | cat - > sparsecopy || exit 1
33171 cmp sparsefile sparsecopy
33172 )
33173 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33174 at_status=$? at_failed=false
33175 $at_check_filter
33176 at_fn_diff_devnull "$at_stderr" || at_failed=:
33177 echo >>"$at_stdout"; $as_echo "separator
33178 " | \
33179   $at_diff - "$at_stdout" || at_failed=:
33180 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:29"
33181 $at_failed && at_fn_log_failure
33182 $at_traceon; }
33183
33184
33185
33186
33187   set +x
33188   $at_times_p && times >"$at_times_file"
33189 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33190 read at_status <"$at_status_file"
33191 #AT_STOP_139
33192 #AT_START_140
33193 at_fn_group_banner 140 'sparse03.at:21' \
33194   "storing sparse files > 8G" "                      " 19
33195 at_xfail=no
33196       test -f $XFAILFILE && at_xfail=yes
33197 (
33198   $as_echo "140. $at_setup_line: testing $at_desc ..."
33199   $at_traceon
33200
33201
33202
33203 # Tar 1.15.1 incorrectly computed sparse member size if the extended
33204 # PAX header contained size keyword.
33205 # References: <87vf46nb36.fsf@penguin.cs.ucla.edu>
33206 # http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
33207
33208
33209
33210   { set +x
33211 $as_echo "$at_srcdir/sparse03.at:29:
33212 mkdir posix
33213 (cd posix
33214 TEST_TAR_FORMAT=posix
33215 export TEST_TAR_FORMAT
33216 TAR_OPTIONS=\"-H posix\"
33217 export TAR_OPTIONS
33218 rm -rf *
33219
33220 genfile --length 1000 --file begin
33221 genfile --length 1000 --file end
33222 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
33223 tar -c -f archive --sparse begin sparsefile end || exit 1
33224 echo separator
33225
33226 tar tfv archive
33227 echo separator
33228 mkdir directory
33229 tar Cxf directory archive
33230 genfile --stat=name,size sparsefile
33231 cmp sparsefile directory/sparsefile
33232 )"
33233 at_fn_check_prepare_notrace 'an embedded newline' "sparse03.at:29"
33234 ( $at_check_trace;
33235 mkdir posix
33236 (cd posix
33237 TEST_TAR_FORMAT=posix
33238 export TEST_TAR_FORMAT
33239 TAR_OPTIONS="-H posix"
33240 export TAR_OPTIONS
33241 rm -rf *
33242
33243 genfile --length 1000 --file begin
33244 genfile --length 1000 --file end
33245 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
33246 tar -c -f archive --sparse begin sparsefile end || exit 1
33247 echo separator
33248
33249 tar tfv archive
33250 echo separator
33251 mkdir directory
33252 tar Cxf directory archive
33253 genfile --stat=name,size sparsefile
33254 cmp sparsefile directory/sparsefile
33255 )
33256 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33257 at_status=$? at_failed=false
33258 $at_check_filter
33259 at_fn_diff_devnull "$at_stderr" || at_failed=:
33260 echo stdout:; tee stdout <"$at_stdout"
33261 at_fn_check_status 0 $at_status "$at_srcdir/sparse03.at:29"
33262 $at_failed && at_fn_log_failure
33263 $at_traceon; }
33264
33265
33266
33267
33268
33269 cat >stdout.re <<'_ATEOF'
33270 separator
33271 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
33272 -rw-r--r-- ^ ^ *  *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
33273 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
33274 separator
33275 sparsefile 8589935104
33276 _ATEOF
33277
33278 awk '{print NR " " $0}' stdout > $$.1
33279 awk '{print NR " " $0}' stdout.re | join - $$.1 |
33280 while read NUM RE LINE
33281 do
33282   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
33283 done
33284
33285
33286   set +x
33287   $at_times_p && times >"$at_times_file"
33288 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33289 read at_status <"$at_status_file"
33290 #AT_STOP_140
33291 #AT_START_141
33292 at_fn_group_banner 141 'sparse04.at:21' \
33293   "storing long sparse file names" "                 " 19
33294 at_xfail=no
33295       test -f $XFAILFILE && at_xfail=yes
33296 (
33297   $as_echo "141. $at_setup_line: testing $at_desc ..."
33298   $at_traceon
33299
33300
33301
33302 # Description: Tar versions from 1.15.92 to 1.25 would incorrectly
33303 # store sparse file names longer than 100 characters in pax mode.
33304 # Namely, the 'path' keyword of the produced PAX header would contain the
33305 # crafted name of the header itself, instead of that of the file.
33306 # Reported by: Kamil Dudka <kdudka@redhat.com>
33307 # References: <201011250026.44908.kdudka@redhat.com>,
33308 #             http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html
33309
33310
33311
33312
33313
33314   { set +x
33315 $as_echo "$at_srcdir/sparse04.at:35:
33316 mkdir pax
33317 (cd pax
33318 TEST_TAR_FORMAT=pax
33319 export TEST_TAR_FORMAT
33320 TAR_OPTIONS=\"-H pax\"
33321 export TAR_OPTIONS
33322 rm -rf *
33323
33324 genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
33325 tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
33326 )"
33327 at_fn_check_prepare_notrace 'an embedded newline' "sparse04.at:35"
33328 ( $at_check_trace;
33329 mkdir pax
33330 (cd pax
33331 TEST_TAR_FORMAT=pax
33332 export TEST_TAR_FORMAT
33333 TAR_OPTIONS="-H pax"
33334 export TAR_OPTIONS
33335 rm -rf *
33336
33337 genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
33338 tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
33339 )
33340 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33341 at_status=$? at_failed=false
33342 $at_check_filter
33343 at_fn_diff_devnull "$at_stderr" || at_failed=:
33344 echo >>"$at_stdout"; $as_echo "123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
33345 " | \
33346   $at_diff - "$at_stdout" || at_failed=:
33347 at_fn_check_status 0 $at_status "$at_srcdir/sparse04.at:35"
33348 $at_failed && at_fn_log_failure
33349 $at_traceon; }
33350
33351
33352
33353
33354
33355   set +x
33356   $at_times_p && times >"$at_times_file"
33357 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33358 read at_status <"$at_status_file"
33359 #AT_STOP_141
33360 #AT_START_142
33361 at_fn_group_banner 142 'sparse05.at:21' \
33362   "listing sparse files bigger than 2^33 B" "        " 19
33363 at_xfail=no
33364       test -f $XFAILFILE && at_xfail=yes
33365 (
33366   $as_echo "142. $at_setup_line: testing $at_desc ..."
33367   $at_traceon
33368
33369
33370
33371 # Description: If an archive in POSIX.1-2001 archive contained a sparse file
33372 # member whose real size (excluding zero blocks) is bigger than 2^33 bytes,
33373 # tar 1.28 would incorrectly list the real member size.
33374 # Reported by: Pavel Raiskup <praiskup@redhat.com>
33375 # References: <1359119879.15037.4.camel@raiskup>,
33376 #             http://lists.gnu.org/archive/html/bug-tar/2013-01/msg00001.html
33377
33378
33379
33380   { set +x
33381 $as_echo "$at_srcdir/sparse05.at:31:
33382 mkdir pax
33383 (cd pax
33384 TEST_TAR_FORMAT=pax
33385 export TEST_TAR_FORMAT
33386 TAR_OPTIONS=\"-H pax\"
33387 export TAR_OPTIONS
33388 rm -rf *
33389
33390 cat >mapfile <<'_ATEOF'
33391 0 =2560
33392 10M =2560
33393 10M =2560
33394 10M =2560
33395 10M =2560
33396 10M =2560
33397 10M =2560
33398 10M =2560
33399 10M =2560
33400 10M =2560
33401 10M =2560
33402 10M =2560
33403 10M =2560
33404 10M =2560
33405 10M =2560
33406 10M =2560
33407 10M =2560
33408 10M =2560
33409 10M =2560
33410 10M =2560
33411 10M =2560
33412 10M =2560
33413 10M =2560
33414 10M =2560
33415 10M =2560
33416 10M =2560
33417 10M =2560
33418 10M =2560
33419 10M =2560
33420 10M =2560
33421 10M =2560
33422 10M =2560
33423 10M =2560
33424 10M =2560
33425 10M =2560
33426 10M =2560
33427 10M =2560
33428 10M =2560
33429 10M =2560
33430 10M =2560
33431 10M =2560
33432 10M =2560
33433 10M =2560
33434 10M =2560
33435 10M =2560
33436 10M =2560
33437 10M =2560
33438 10M =2560
33439 10M =2560
33440 10M =2560
33441 10M =2560
33442 10M =2560
33443 10M =2560
33444 10M =2560
33445 10M =2560
33446 10M =2560
33447 10M =2560
33448 10M =2560
33449 10M =2560
33450 10M =2560
33451 10M =2560
33452 10M =2560
33453 10M =2560
33454 10M =2560
33455 10M =2560
33456 10M =2560
33457 10M =2560
33458 10M =2560
33459 10M =2560
33460 10M =2560
33461 10M =2560
33462 10M =2560
33463 10M =2560
33464 10M =2560
33465 10M =2560
33466 10M =2560
33467 10M =2560
33468 10M =2560
33469 10M =2560
33470 10M =2560
33471 10M =2560
33472 10M =2560
33473 10M =2560
33474 10M =2560
33475 10M =2560
33476 10M =2560
33477 10M =2560
33478 10M =2560
33479 10M =2560
33480 10M =2560
33481 10M =2560
33482 10M =2560
33483 10M =2560
33484 10M =2560
33485 10M =2560
33486 10M =2560
33487 10M =2560
33488 10M =2560
33489 10M =2560
33490 10M =2560
33491 10M =2560
33492 10M =2560
33493 10M =2560
33494 10M =2560
33495 10M =2560
33496 10M =2560
33497 10M =2560
33498 10M =2560
33499 10M =2560
33500 10M =2560
33501 10M =2560
33502 10M =2560
33503 10M =2560
33504 10M =2560
33505 10M =2560
33506 10M =2560
33507 10M =2560
33508 10M =2560
33509 10M =2560
33510 10M =2560
33511 10M =2560
33512 10M =2560
33513 10M =2560
33514 10M =2560
33515 10M =2560
33516 10M =2560
33517 10M =2560
33518 10M =2560
33519 10M =2560
33520 10M =2560
33521 10M =2560
33522 10M =2560
33523 10M =2560
33524 10M =2560
33525 10M =2560
33526 10M =2560
33527 10M =2560
33528 10M =2560
33529 10M =2560
33530 10M =2560
33531 10M =2560
33532 10M =2560
33533 10M =2560
33534 10M =2560
33535 10M =2560
33536 10M =2560
33537 10M =2560
33538 10M =2560
33539 10M =2560
33540 10M =2560
33541 10M =2560
33542 10M =2560
33543 10M =2560
33544 10M =2560
33545 10M =2560
33546 10M =2560
33547 10M =2560
33548 10M =2560
33549 10M =2560
33550 10M =2560
33551 10M =2560
33552 10M =2560
33553 10M =2560
33554 10M =2560
33555 10M =2560
33556 10M =2560
33557 10M =2560
33558 10M =2560
33559 10M =2560
33560 10M =2560
33561 10M =2560
33562 10M =2560
33563 10M =2560
33564 10M =2560
33565 10M =2560
33566 10M =2560
33567 10M =2560
33568 10M =2560
33569 10M =2560
33570 10M =2560
33571 10M =2560
33572 10M =2560
33573 10M =2560
33574 10M =2560
33575 10M =2560
33576 10M =2560
33577 10M =2560
33578 10M =2560
33579 10M =2560
33580 10M =2560
33581 10M =2560
33582 10M =2560
33583 10M =2560
33584 10M =2560
33585 10M =2560
33586 10M =2560
33587 10M =2560
33588 10M =2560
33589 10M =2560
33590 10M =2560
33591 10M =2560
33592 10M =2560
33593 10M =2560
33594 10M =2560
33595 10M =2560
33596 10M =2560
33597 10M =2560
33598 10M =2560
33599 10M =2560
33600 10M =2560
33601 10M =2560
33602 10M =2560
33603 10M =2560
33604 10M =2560
33605 10M =2560
33606 10M =2560
33607 10M =2560
33608 10M =2560
33609 10M =2560
33610 10M =2560
33611 10M =2560
33612 10M =2560
33613 10M =2560
33614 10M =2560
33615 10M =2560
33616 10M =2560
33617 10M =2560
33618 10M =2560
33619 10M =2560
33620 10M =2560
33621 10M =2560
33622 10M =2560
33623 10M =2560
33624 10M =2560
33625 10M =2560
33626 10M =2560
33627 10M =2560
33628 10M =2560
33629 10M =2560
33630 10M =2560
33631 10M =2560
33632 10M =2560
33633 10M =2560
33634 10M =2560
33635 10M =2560
33636 10M =2560
33637 10M =2560
33638 10M =2560
33639 10M =2560
33640 10M =2560
33641 10M =2560
33642 10M =2560
33643 10M =2560
33644 10M =2560
33645 10M =2560
33646 10M =2560
33647 10M =2560
33648 10M =2560
33649 10M =2560
33650 10M =2560
33651 10M =2560
33652 10M =2560
33653 10M =2560
33654 10M =2560
33655 10M =2560
33656 10M =2560
33657 10M =2560
33658 10M =2560
33659 10M =2560
33660 10M =2560
33661 10M =2560
33662 10M =2560
33663 10M =2560
33664 10M =2560
33665 10M =2560
33666 10M =2560
33667 10M =2560
33668 10M =2560
33669 10M =2560
33670 10M =2560
33671 10M =2560
33672 10M =2560
33673 10M =2560
33674 10M =2560
33675 10M =2560
33676 10M =2560
33677 10M =2560
33678 10M =2560
33679 10M =2560
33680 10M =2560
33681 10M =2560
33682 10M =2560
33683 10M =2560
33684 10M =2560
33685 10M =2560
33686 10M =2560
33687 10M =2560
33688 10M =2560
33689 10M =2560
33690 10M =2560
33691 10M =2560
33692 10M =2560
33693 10M =2560
33694 10M =2560
33695 10M =2560
33696 10M =2560
33697 10M =2560
33698 10M =2560
33699 10M =2560
33700 10M =2560
33701 10M =2560
33702 10M =2560
33703 10M =2560
33704 10M =2560
33705 10M =2560
33706 10M =2560
33707 10M =2560
33708 10M =2560
33709 10M =2560
33710 10M =2560
33711 10M =2560
33712 10M =2560
33713 10M =2560
33714 10M =2560
33715 10M =2560
33716 10M =2560
33717 10M =2560
33718 10M =2560
33719 10M =2560
33720 10M =2560
33721 10M =2560
33722 10M =2560
33723 10M =2560
33724 10M =2560
33725 10M =2560
33726 10M =2560
33727 10M =2560
33728 10M =2560
33729 10M =2560
33730 10M =2560
33731 10M =2560
33732 10M =2560
33733 10M =2560
33734 10M =2560
33735 10M =2560
33736 10M =2560
33737 10M =2560
33738 10M =2560
33739 10M =2560
33740 10M =2560
33741 10M =2560
33742 10M =2560
33743 10M =2560
33744 10M =2560
33745 10M =2560
33746 10M =2560
33747 10M =2560
33748 10M =2560
33749 10M =2560
33750 10M =2560
33751 10M =2560
33752 10M =2560
33753 10M =2560
33754 10M =2560
33755 10M =2560
33756 10M =2560
33757 10M =2560
33758 10M =2560
33759 10M =2560
33760 10M =2560
33761 10M =2560
33762 10M =2560
33763 10M =2560
33764 10M =2560
33765 10M =2560
33766 10M =2560
33767 10M =2560
33768 10M =2560
33769 10M =2560
33770 10M =2560
33771 10M =2560
33772 10M =2560
33773 10M =2560
33774 10M =2560
33775 10M =2560
33776 10M =2560
33777 10M =2560
33778 10M =2560
33779 10M =2560
33780 10M =2560
33781 10M =2560
33782 10M =2560
33783 10M =2560
33784 10M =2560
33785 10M =2560
33786 10M =2560
33787 10M =2560
33788 10M =2560
33789 10M =2560
33790 10M =2560
33791 10M =2560
33792 10M =2560
33793 10M =2560
33794 10M =2560
33795 10M =2560
33796 10M =2560
33797 10M =2560
33798 10M =2560
33799 10M =2560
33800 10M =2560
33801 10M =2560
33802 10M =2560
33803 10M =2560
33804 10M =2560
33805 10M =2560
33806 10M =2560
33807 10M =2560
33808 10M =2560
33809 10M =2560
33810 10M =2560
33811 10M =2560
33812 10M =2560
33813 10M =2560
33814 10M =2560
33815 10M =2560
33816 10M =2560
33817 10M =2560
33818 10M =2560
33819 10M =2560
33820 10M =2560
33821 10M =2560
33822 10M =2560
33823 10M =2560
33824 10M =2560
33825 10M =2560
33826 10M =2560
33827 10M =2560
33828 10M =2560
33829 10M =2560
33830 10M =2560
33831 10M =2560
33832 10M =2560
33833 10M =2560
33834 10M =2560
33835 10M =2560
33836 10M =2560
33837 10M =2560
33838 10M =2560
33839 10M =2560
33840 10M =2560
33841 10M =2560
33842 10M =2560
33843 10M =2560
33844 10M =2560
33845 10M =2560
33846 10M =2560
33847 10M =2560
33848 10M =2560
33849 10M =2560
33850 10M =2560
33851 10M =2560
33852 10M =2560
33853 10M =2560
33854 10M =2560
33855 10M =2560
33856 10M =2560
33857 10M =2560
33858 10M =2560
33859 10M =2560
33860 10M =2560
33861 10M =2560
33862 10M =2560
33863 10M =2560
33864 10M =2560
33865 10M =2560
33866 10M =2560
33867 10M =2560
33868 10M =2560
33869 10M =2560
33870 10M =2560
33871 10M =2560
33872 10M =2560
33873 10M =2560
33874 10M =2560
33875 10M =2560
33876 10M =2560
33877 10M =2560
33878 10M =2560
33879 10M =2560
33880 10M =2560
33881 10M =2560
33882 10M =2560
33883 10M =2560
33884 10M =2560
33885 10M =2560
33886 10M =2560
33887 10M =2560
33888 10M =2560
33889 10M =2560
33890 10M =2560
33891 10M =2560
33892 10M =2560
33893 10M =2560
33894 10M =2560
33895 10M =2560
33896 10M =2560
33897 10M =2560
33898 10M =2560
33899 10M =2560
33900 10M =2560
33901 10M =2560
33902 10M =2560
33903 10M =2560
33904 10M =2560
33905 10M =2560
33906 10M =2560
33907 10M =2560
33908 10M =2560
33909 10M =2560
33910 10M =2560
33911 10M =2560
33912 10M =2560
33913 10M =2560
33914 10M =2560
33915 10M =2560
33916 10M =2560
33917 10M =2560
33918 10M =2560
33919 10M =2560
33920 10M =2560
33921 10M =2560
33922 10M =2560
33923 10M =2560
33924 10M =2560
33925 10M =2560
33926 10M =2560
33927 10M =2560
33928 10M =2560
33929 10M =2560
33930 10M =2560
33931 10M =2560
33932 10M =2560
33933 10M =2560
33934 10M =2560
33935 10M =2560
33936 10M =2560
33937 10M =2560
33938 10M =2560
33939 10M =2560
33940 10M =2560
33941 10M =2560
33942 10M =2560
33943 10M =2560
33944 10M =2560
33945 10M =2560
33946 10M =2560
33947 10M =2560
33948 10M =2560
33949 10M =2560
33950 10M =2560
33951 10M =2560
33952 10M =2560
33953 10M =2560
33954 10M =2560
33955 10M =2560
33956 10M =2560
33957 10M =2560
33958 10M =2560
33959 10M =2560
33960 10M =2560
33961 10M =2560
33962 10M =2560
33963 10M =2560
33964 10M =2560
33965 10M =2560
33966 10M =2560
33967 10M =2560
33968 10M =2560
33969 10M =2560
33970 10M =2560
33971 10M =2560
33972 10M =2560
33973 10M =2560
33974 10M =2560
33975 10M =2560
33976 10M =2560
33977 10M =2560
33978 10M =2560
33979 10M =2560
33980 10M =2560
33981 10M =2560
33982 10M =2560
33983 10M =2560
33984 10M =2560
33985 10M =2560
33986 10M =2560
33987 10M =2560
33988 10M =2560
33989 10M =2560
33990 10M =2560
33991 10M =2560
33992 10M =2560
33993 10M =2560
33994 10M =2560
33995 10M =2560
33996 10M =2560
33997 10M =2560
33998 10M =2560
33999 10M =2560
34000 10M =2560
34001 10M =2560
34002 10M =2560
34003 10M =2560
34004 10M =2560
34005 10M =2560
34006 10M =2560
34007 10M =2560
34008 10M =2560
34009 10M =2560
34010 10M =2560
34011 10M =2560
34012 10M =2560
34013 10M =2560
34014 10M =2560
34015 10M =2560
34016 10M =2560
34017 10M =2560
34018 10M =2560
34019 10M =2560
34020 10M =2560
34021 10M =2560
34022 10M =2560
34023 10M =2560
34024 10M =2560
34025 10M =2560
34026 10M =2560
34027 10M =2560
34028 10M =2560
34029 10M =2560
34030 10M =2560
34031 10M =2560
34032 10M =2560
34033 10M =2560
34034 10M =2560
34035 10M =2560
34036 10M =2560
34037 10M =2560
34038 10M =2560
34039 10M =2560
34040 10M =2560
34041 10M =2560
34042 10M =2560
34043 10M =2560
34044 10M =2560
34045 10M =2560
34046 10M =2560
34047 10M =2560
34048 10M =2560
34049 10M =2560
34050 10M =2560
34051 10M =2560
34052 10M =2560
34053 10M =2560
34054 10M =2560
34055 10M =2560
34056 10M =2560
34057 10M =2560
34058 10M =2560
34059 10M =2560
34060 10M =2560
34061 10M =2560
34062 10M =2560
34063 10M =2560
34064 10M =2560
34065 10M =2560
34066 10M =2560
34067 10M =2560
34068 10M =2560
34069 10M =2560
34070 10M =2560
34071 10M =2560
34072 10M =2560
34073 10M =2560
34074 10M =2560
34075 10M =2560
34076 10M =2560
34077 10M =2560
34078 10M =2560
34079 10M =2560
34080 10M =2560
34081 10M =2560
34082 10M =2560
34083 10M =2560
34084 10M =2560
34085 10M =2560
34086 10M =2560
34087 10M =2560
34088 10M =2560
34089 10M =2560
34090 10M =2560
34091 10M =2560
34092 10M =2560
34093 10M =2560
34094 10M =2560
34095 10M =2560
34096 10M =2560
34097 10M =2560
34098 10M =2560
34099 10M =2560
34100 10M =2560
34101 10M =2560
34102 10M =2560
34103 10M =2560
34104 10M =2560
34105 10M =2560
34106 10M =2560
34107 10M =2560
34108 10M =2560
34109 10M =2560
34110 10M =2560
34111 10M =2560
34112 10M =2560
34113 10M =2560
34114 10M =2560
34115 10M =2560
34116 10M =2560
34117 10M =2560
34118 10M =2560
34119 10M =2560
34120 10M =2560
34121 10M =2560
34122 10M =2560
34123 10M =2560
34124 10M =2560
34125 10M =2560
34126 10M =2560
34127 10M =2560
34128 10M =2560
34129 10M =2560
34130 10M =2560
34131 10M =2560
34132 10M =2560
34133 10M =2560
34134 10M =2560
34135 10M =2560
34136 10M =2560
34137 10M =2560
34138 10M =2560
34139 10M =2560
34140 10M =2560
34141 10M =2560
34142 10M =2560
34143 10M =2560
34144 10M =2560
34145 10M =2560
34146 10M =2560
34147 10M =2560
34148 10M =2560
34149 10M =2560
34150 10M =2560
34151 10M =2560
34152 10M =2560
34153 10M =2560
34154 10M =2560
34155 10M =2560
34156 10M =2560
34157 10M =2560
34158 10M =2560
34159 10M =2560
34160 10M =2560
34161 10M =2560
34162 10M =2560
34163 10M =2560
34164 10M =2560
34165 10M =2560
34166 10M =2560
34167 10M =2560
34168 10M =2560
34169 10M =2560
34170 10M =2560
34171 10M =2560
34172 10M =2560
34173 10M =2560
34174 10M =2560
34175 10M =2560
34176 10M =2560
34177 10M =2560
34178 10M =2560
34179 10M =2560
34180 10M =2560
34181 10M =2560
34182 10M =2560
34183 10M =2560
34184 10M =2560
34185 10M =2560
34186 10M =2560
34187 10M =2560
34188 10M =2560
34189 10M =2560
34190 10M =2560
34191 10M =2560
34192 10M =2560
34193 10M =2560
34194 10M =2560
34195 10M =2560
34196 10M =2560
34197 10M =2560
34198 10M =2560
34199 10M =2560
34200 10M =2560
34201 10M =2560
34202 10M =2560
34203 10M =2560
34204 10M =2560
34205 10M =2560
34206 10M =2560
34207 10M =2560
34208 10M =2560
34209 10M =2560
34210 10M =2560
34211 10M =2560
34212 10M =2560
34213 10M =2560
34214 10M =2560
34215 10M =2560
34216 10M =2560
34217 10M =2560
34218 10M =2560
34219 10M =2560
34220 10M =2560
34221 10M =2560
34222 10M =2560
34223 10M =2560
34224 10M =2560
34225 10M =2560
34226 10M =2560
34227 10M =2560
34228 10M =2560
34229 10M =2560
34230 10M =2560
34231 10M =2560
34232 10M =2560
34233 10M =2560
34234 10M =2560
34235 10M =2560
34236 10M =2560
34237 10M =2560
34238 10M =2560
34239 10M =2560
34240 10M =2560
34241 10M =2560
34242 10M =2560
34243 10M =2560
34244 10M =2560
34245 10M =2560
34246 10M =2560
34247 10M =2560
34248 10M =2560
34249 10M =2560
34250 10M =2560
34251 10M =2560
34252 10M =2560
34253 10M =2560
34254 10M =2560
34255 10M =2560
34256 10M =2560
34257 10M =2560
34258 10M =2560
34259 10M =2560
34260 10M =2560
34261 10M =2560
34262 10M =2560
34263 10M =2560
34264 10M =2560
34265 10M =2560
34266 10M =2560
34267 10M =2560
34268 10M =2560
34269 10M =2560
34270 10M =2560
34271 10M =2560
34272 10M =2560
34273 10M =2560
34274 10M =2560
34275 10M =2560
34276 10M =2560
34277 10M =2560
34278 10M =2560
34279 10M =2560
34280 10M =2560
34281 10M =2560
34282 10M =2560
34283 10M =2560
34284 10M =2560
34285 10M =2560
34286 10M =2560
34287 10M =2560
34288 10M =2560
34289 10M =2560
34290 10M =2560
34291 10M =2560
34292 10M =2560
34293 10M =2560
34294 10M =2560
34295 10M =2560
34296 10M =2560
34297 10M =2560
34298 10M =2560
34299 10M =2560
34300 10M =2560
34301 10M =2560
34302 10M =2560
34303 10M =2560
34304 10M =2560
34305 10M =2560
34306 10M =2560
34307 10M =2560
34308 10M =2560
34309 10M =2560
34310 10M =2560
34311 10M =2560
34312 10M =2560
34313 10M =2560
34314 10M =2560
34315 10M =2560
34316 10M =2560
34317 10M =2560
34318 10M =2560
34319 10M =2560
34320 10M =2560
34321 10M =2560
34322 10M =2560
34323 10M =2560
34324 10M =2560
34325 10M =2560
34326 10M =2560
34327 10M =2560
34328 10M =2560
34329 10M =2560
34330 10M =2560
34331 10M =2560
34332 10M =2560
34333 10M =2560
34334 10M =2560
34335 10M =2560
34336 10M =2560
34337 10M =2560
34338 10M =2560
34339 10M =2560
34340 10M =2560
34341 10M =2560
34342 10M =2560
34343 10M =2560
34344 10M =2560
34345 10M =2560
34346 10M =2560
34347 10M =2560
34348 10M =2560
34349 10M =2560
34350 10M =2560
34351 10M =2560
34352 10M =2560
34353 10M =2560
34354 10M =2560
34355 10M =2560
34356 10M =2560
34357 10M =2560
34358 10M =2560
34359 10M =2560
34360 10M =2560
34361 10M =2560
34362 10M =2560
34363 10M =2560
34364 10M =2560
34365 10M =2560
34366 10M =2560
34367 10M =2560
34368 10M =2560
34369 10M =2560
34370 10M =2560
34371 10M =2560
34372 10M =2560
34373 10M =2560
34374 10M =2560
34375 10M =2560
34376 10M =2560
34377 10M =2560
34378 10M =2560
34379 10M =2560
34380 10M =2560
34381 10M =2560
34382 10M =2560
34383 10M =2560
34384 10M =2560
34385 10M =2560
34386 10M =2560
34387 10M =2560
34388 10M =2560
34389 10M =2560
34390 10M =2560
34391 _ATEOF
34392
34393 genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77
34394 tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print \$3, \$(NF) }'
34395 )"
34396 at_fn_check_prepare_notrace 'a $(...) command substitution' "sparse05.at:31"
34397 ( $at_check_trace;
34398 mkdir pax
34399 (cd pax
34400 TEST_TAR_FORMAT=pax
34401 export TEST_TAR_FORMAT
34402 TAR_OPTIONS="-H pax"
34403 export TAR_OPTIONS
34404 rm -rf *
34405
34406 cat >mapfile <<'_ATEOF'
34407 0 =2560
34408 10M =2560
34409 10M =2560
34410 10M =2560
34411 10M =2560
34412 10M =2560
34413 10M =2560
34414 10M =2560
34415 10M =2560
34416 10M =2560
34417 10M =2560
34418 10M =2560
34419 10M =2560
34420 10M =2560
34421 10M =2560
34422 10M =2560
34423 10M =2560
34424 10M =2560
34425 10M =2560
34426 10M =2560
34427 10M =2560
34428 10M =2560
34429 10M =2560
34430 10M =2560
34431 10M =2560
34432 10M =2560
34433 10M =2560
34434 10M =2560
34435 10M =2560
34436 10M =2560
34437 10M =2560
34438 10M =2560
34439 10M =2560
34440 10M =2560
34441 10M =2560
34442 10M =2560
34443 10M =2560
34444 10M =2560
34445 10M =2560
34446 10M =2560
34447 10M =2560
34448 10M =2560
34449 10M =2560
34450 10M =2560
34451 10M =2560
34452 10M =2560
34453 10M =2560
34454 10M =2560
34455 10M =2560
34456 10M =2560
34457 10M =2560
34458 10M =2560
34459 10M =2560
34460 10M =2560
34461 10M =2560
34462 10M =2560
34463 10M =2560
34464 10M =2560
34465 10M =2560
34466 10M =2560
34467 10M =2560
34468 10M =2560
34469 10M =2560
34470 10M =2560
34471 10M =2560
34472 10M =2560
34473 10M =2560
34474 10M =2560
34475 10M =2560
34476 10M =2560
34477 10M =2560
34478 10M =2560
34479 10M =2560
34480 10M =2560
34481 10M =2560
34482 10M =2560
34483 10M =2560
34484 10M =2560
34485 10M =2560
34486 10M =2560
34487 10M =2560
34488 10M =2560
34489 10M =2560
34490 10M =2560
34491 10M =2560
34492 10M =2560
34493 10M =2560
34494 10M =2560
34495 10M =2560
34496 10M =2560
34497 10M =2560
34498 10M =2560
34499 10M =2560
34500 10M =2560
34501 10M =2560
34502 10M =2560
34503 10M =2560
34504 10M =2560
34505 10M =2560
34506 10M =2560
34507 10M =2560
34508 10M =2560
34509 10M =2560
34510 10M =2560
34511 10M =2560
34512 10M =2560
34513 10M =2560
34514 10M =2560
34515 10M =2560
34516 10M =2560
34517 10M =2560
34518 10M =2560
34519 10M =2560
34520 10M =2560
34521 10M =2560
34522 10M =2560
34523 10M =2560
34524 10M =2560
34525 10M =2560
34526 10M =2560
34527 10M =2560
34528 10M =2560
34529 10M =2560
34530 10M =2560
34531 10M =2560
34532 10M =2560
34533 10M =2560
34534 10M =2560
34535 10M =2560
34536 10M =2560
34537 10M =2560
34538 10M =2560
34539 10M =2560
34540 10M =2560
34541 10M =2560
34542 10M =2560
34543 10M =2560
34544 10M =2560
34545 10M =2560
34546 10M =2560
34547 10M =2560
34548 10M =2560
34549 10M =2560
34550 10M =2560
34551 10M =2560
34552 10M =2560
34553 10M =2560
34554 10M =2560
34555 10M =2560
34556 10M =2560
34557 10M =2560
34558 10M =2560
34559 10M =2560
34560 10M =2560
34561 10M =2560
34562 10M =2560
34563 10M =2560
34564 10M =2560
34565 10M =2560
34566 10M =2560
34567 10M =2560
34568 10M =2560
34569 10M =2560
34570 10M =2560
34571 10M =2560
34572 10M =2560
34573 10M =2560
34574 10M =2560
34575 10M =2560
34576 10M =2560
34577 10M =2560
34578 10M =2560
34579 10M =2560
34580 10M =2560
34581 10M =2560
34582 10M =2560
34583 10M =2560
34584 10M =2560
34585 10M =2560
34586 10M =2560
34587 10M =2560
34588 10M =2560
34589 10M =2560
34590 10M =2560
34591 10M =2560
34592 10M =2560
34593 10M =2560
34594 10M =2560
34595 10M =2560
34596 10M =2560
34597 10M =2560
34598 10M =2560
34599 10M =2560
34600 10M =2560
34601 10M =2560
34602 10M =2560
34603 10M =2560
34604 10M =2560
34605 10M =2560
34606 10M =2560
34607 10M =2560
34608 10M =2560
34609 10M =2560
34610 10M =2560
34611 10M =2560
34612 10M =2560
34613 10M =2560
34614 10M =2560
34615 10M =2560
34616 10M =2560
34617 10M =2560
34618 10M =2560
34619 10M =2560
34620 10M =2560
34621 10M =2560
34622 10M =2560
34623 10M =2560
34624 10M =2560
34625 10M =2560
34626 10M =2560
34627 10M =2560
34628 10M =2560
34629 10M =2560
34630 10M =2560
34631 10M =2560
34632 10M =2560
34633 10M =2560
34634 10M =2560
34635 10M =2560
34636 10M =2560
34637 10M =2560
34638 10M =2560
34639 10M =2560
34640 10M =2560
34641 10M =2560
34642 10M =2560
34643 10M =2560
34644 10M =2560
34645 10M =2560
34646 10M =2560
34647 10M =2560
34648 10M =2560
34649 10M =2560
34650 10M =2560
34651 10M =2560
34652 10M =2560
34653 10M =2560
34654 10M =2560
34655 10M =2560
34656 10M =2560
34657 10M =2560
34658 10M =2560
34659 10M =2560
34660 10M =2560
34661 10M =2560
34662 10M =2560
34663 10M =2560
34664 10M =2560
34665 10M =2560
34666 10M =2560
34667 10M =2560
34668 10M =2560
34669 10M =2560
34670 10M =2560
34671 10M =2560
34672 10M =2560
34673 10M =2560
34674 10M =2560
34675 10M =2560
34676 10M =2560
34677 10M =2560
34678 10M =2560
34679 10M =2560
34680 10M =2560
34681 10M =2560
34682 10M =2560
34683 10M =2560
34684 10M =2560
34685 10M =2560
34686 10M =2560
34687 10M =2560
34688 10M =2560
34689 10M =2560
34690 10M =2560
34691 10M =2560
34692 10M =2560
34693 10M =2560
34694 10M =2560
34695 10M =2560
34696 10M =2560
34697 10M =2560
34698 10M =2560
34699 10M =2560
34700 10M =2560
34701 10M =2560
34702 10M =2560
34703 10M =2560
34704 10M =2560
34705 10M =2560
34706 10M =2560
34707 10M =2560
34708 10M =2560
34709 10M =2560
34710 10M =2560
34711 10M =2560
34712 10M =2560
34713 10M =2560
34714 10M =2560
34715 10M =2560
34716 10M =2560
34717 10M =2560
34718 10M =2560
34719 10M =2560
34720 10M =2560
34721 10M =2560
34722 10M =2560
34723 10M =2560
34724 10M =2560
34725 10M =2560
34726 10M =2560
34727 10M =2560
34728 10M =2560
34729 10M =2560
34730 10M =2560
34731 10M =2560
34732 10M =2560
34733 10M =2560
34734 10M =2560
34735 10M =2560
34736 10M =2560
34737 10M =2560
34738 10M =2560
34739 10M =2560
34740 10M =2560
34741 10M =2560
34742 10M =2560
34743 10M =2560
34744 10M =2560
34745 10M =2560
34746 10M =2560
34747 10M =2560
34748 10M =2560
34749 10M =2560
34750 10M =2560
34751 10M =2560
34752 10M =2560
34753 10M =2560
34754 10M =2560
34755 10M =2560
34756 10M =2560
34757 10M =2560
34758 10M =2560
34759 10M =2560
34760 10M =2560
34761 10M =2560
34762 10M =2560
34763 10M =2560
34764 10M =2560
34765 10M =2560
34766 10M =2560
34767 10M =2560
34768 10M =2560
34769 10M =2560
34770 10M =2560
34771 10M =2560
34772 10M =2560
34773 10M =2560
34774 10M =2560
34775 10M =2560
34776 10M =2560
34777 10M =2560
34778 10M =2560
34779 10M =2560
34780 10M =2560
34781 10M =2560
34782 10M =2560
34783 10M =2560
34784 10M =2560
34785 10M =2560
34786 10M =2560
34787 10M =2560
34788 10M =2560
34789 10M =2560
34790 10M =2560
34791 10M =2560
34792 10M =2560
34793 10M =2560
34794 10M =2560
34795 10M =2560
34796 10M =2560
34797 10M =2560
34798 10M =2560
34799 10M =2560
34800 10M =2560
34801 10M =2560
34802 10M =2560
34803 10M =2560
34804 10M =2560
34805 10M =2560
34806 10M =2560
34807 10M =2560
34808 10M =2560
34809 10M =2560
34810 10M =2560
34811 10M =2560
34812 10M =2560
34813 10M =2560
34814 10M =2560
34815 10M =2560
34816 10M =2560
34817 10M =2560
34818 10M =2560
34819 10M =2560
34820 10M =2560
34821 10M =2560
34822 10M =2560
34823 10M =2560
34824 10M =2560
34825 10M =2560
34826 10M =2560
34827 10M =2560
34828 10M =2560
34829 10M =2560
34830 10M =2560
34831 10M =2560
34832 10M =2560
34833 10M =2560
34834 10M =2560
34835 10M =2560
34836 10M =2560
34837 10M =2560
34838 10M =2560
34839 10M =2560
34840 10M =2560
34841 10M =2560
34842 10M =2560
34843 10M =2560
34844 10M =2560
34845 10M =2560
34846 10M =2560
34847 10M =2560
34848 10M =2560
34849 10M =2560
34850 10M =2560
34851 10M =2560
34852 10M =2560
34853 10M =2560
34854 10M =2560
34855 10M =2560
34856 10M =2560
34857 10M =2560
34858 10M =2560
34859 10M =2560
34860 10M =2560
34861 10M =2560
34862 10M =2560
34863 10M =2560
34864 10M =2560
34865 10M =2560
34866 10M =2560
34867 10M =2560
34868 10M =2560
34869 10M =2560
34870 10M =2560
34871 10M =2560
34872 10M =2560
34873 10M =2560
34874 10M =2560
34875 10M =2560
34876 10M =2560
34877 10M =2560
34878 10M =2560
34879 10M =2560
34880 10M =2560
34881 10M =2560
34882 10M =2560
34883 10M =2560
34884 10M =2560
34885 10M =2560
34886 10M =2560
34887 10M =2560
34888 10M =2560
34889 10M =2560
34890 10M =2560
34891 10M =2560
34892 10M =2560
34893 10M =2560
34894 10M =2560
34895 10M =2560
34896 10M =2560
34897 10M =2560
34898 10M =2560
34899 10M =2560
34900 10M =2560
34901 10M =2560
34902 10M =2560
34903 10M =2560
34904 10M =2560
34905 10M =2560
34906 10M =2560
34907 10M =2560
34908 10M =2560
34909 10M =2560
34910 10M =2560
34911 10M =2560
34912 10M =2560
34913 10M =2560
34914 10M =2560
34915 10M =2560
34916 10M =2560
34917 10M =2560
34918 10M =2560
34919 10M =2560
34920 10M =2560
34921 10M =2560
34922 10M =2560
34923 10M =2560
34924 10M =2560
34925 10M =2560
34926 10M =2560
34927 10M =2560
34928 10M =2560
34929 10M =2560
34930 10M =2560
34931 10M =2560
34932 10M =2560
34933 10M =2560
34934 10M =2560
34935 10M =2560
34936 10M =2560
34937 10M =2560
34938 10M =2560
34939 10M =2560
34940 10M =2560
34941 10M =2560
34942 10M =2560
34943 10M =2560
34944 10M =2560
34945 10M =2560
34946 10M =2560
34947 10M =2560
34948 10M =2560
34949 10M =2560
34950 10M =2560
34951 10M =2560
34952 10M =2560
34953 10M =2560
34954 10M =2560
34955 10M =2560
34956 10M =2560
34957 10M =2560
34958 10M =2560
34959 10M =2560
34960 10M =2560
34961 10M =2560
34962 10M =2560
34963 10M =2560
34964 10M =2560
34965 10M =2560
34966 10M =2560
34967 10M =2560
34968 10M =2560
34969 10M =2560
34970 10M =2560
34971 10M =2560
34972 10M =2560
34973 10M =2560
34974 10M =2560
34975 10M =2560
34976 10M =2560
34977 10M =2560
34978 10M =2560
34979 10M =2560
34980 10M =2560
34981 10M =2560
34982 10M =2560
34983 10M =2560
34984 10M =2560
34985 10M =2560
34986 10M =2560
34987 10M =2560
34988 10M =2560
34989 10M =2560
34990 10M =2560
34991 10M =2560
34992 10M =2560
34993 10M =2560
34994 10M =2560
34995 10M =2560
34996 10M =2560
34997 10M =2560
34998 10M =2560
34999 10M =2560
35000 10M =2560
35001 10M =2560
35002 10M =2560
35003 10M =2560
35004 10M =2560
35005 10M =2560
35006 10M =2560
35007 10M =2560
35008 10M =2560
35009 10M =2560
35010 10M =2560
35011 10M =2560
35012 10M =2560
35013 10M =2560
35014 10M =2560
35015 10M =2560
35016 10M =2560
35017 10M =2560
35018 10M =2560
35019 10M =2560
35020 10M =2560
35021 10M =2560
35022 10M =2560
35023 10M =2560
35024 10M =2560
35025 10M =2560
35026 10M =2560
35027 10M =2560
35028 10M =2560
35029 10M =2560
35030 10M =2560
35031 10M =2560
35032 10M =2560
35033 10M =2560
35034 10M =2560
35035 10M =2560
35036 10M =2560
35037 10M =2560
35038 10M =2560
35039 10M =2560
35040 10M =2560
35041 10M =2560
35042 10M =2560
35043 10M =2560
35044 10M =2560
35045 10M =2560
35046 10M =2560
35047 10M =2560
35048 10M =2560
35049 10M =2560
35050 10M =2560
35051 10M =2560
35052 10M =2560
35053 10M =2560
35054 10M =2560
35055 10M =2560
35056 10M =2560
35057 10M =2560
35058 10M =2560
35059 10M =2560
35060 10M =2560
35061 10M =2560
35062 10M =2560
35063 10M =2560
35064 10M =2560
35065 10M =2560
35066 10M =2560
35067 10M =2560
35068 10M =2560
35069 10M =2560
35070 10M =2560
35071 10M =2560
35072 10M =2560
35073 10M =2560
35074 10M =2560
35075 10M =2560
35076 10M =2560
35077 10M =2560
35078 10M =2560
35079 10M =2560
35080 10M =2560
35081 10M =2560
35082 10M =2560
35083 10M =2560
35084 10M =2560
35085 10M =2560
35086 10M =2560
35087 10M =2560
35088 10M =2560
35089 10M =2560
35090 10M =2560
35091 10M =2560
35092 10M =2560
35093 10M =2560
35094 10M =2560
35095 10M =2560
35096 10M =2560
35097 10M =2560
35098 10M =2560
35099 10M =2560
35100 10M =2560
35101 10M =2560
35102 10M =2560
35103 10M =2560
35104 10M =2560
35105 10M =2560
35106 10M =2560
35107 10M =2560
35108 10M =2560
35109 10M =2560
35110 10M =2560
35111 10M =2560
35112 10M =2560
35113 10M =2560
35114 10M =2560
35115 10M =2560
35116 10M =2560
35117 10M =2560
35118 10M =2560
35119 10M =2560
35120 10M =2560
35121 10M =2560
35122 10M =2560
35123 10M =2560
35124 10M =2560
35125 10M =2560
35126 10M =2560
35127 10M =2560
35128 10M =2560
35129 10M =2560
35130 10M =2560
35131 10M =2560
35132 10M =2560
35133 10M =2560
35134 10M =2560
35135 10M =2560
35136 10M =2560
35137 10M =2560
35138 10M =2560
35139 10M =2560
35140 10M =2560
35141 10M =2560
35142 10M =2560
35143 10M =2560
35144 10M =2560
35145 10M =2560
35146 10M =2560
35147 10M =2560
35148 10M =2560
35149 10M =2560
35150 10M =2560
35151 10M =2560
35152 10M =2560
35153 10M =2560
35154 10M =2560
35155 10M =2560
35156 10M =2560
35157 10M =2560
35158 10M =2560
35159 10M =2560
35160 10M =2560
35161 10M =2560
35162 10M =2560
35163 10M =2560
35164 10M =2560
35165 10M =2560
35166 10M =2560
35167 10M =2560
35168 10M =2560
35169 10M =2560
35170 10M =2560
35171 10M =2560
35172 10M =2560
35173 10M =2560
35174 10M =2560
35175 10M =2560
35176 10M =2560
35177 10M =2560
35178 10M =2560
35179 10M =2560
35180 10M =2560
35181 10M =2560
35182 10M =2560
35183 10M =2560
35184 10M =2560
35185 10M =2560
35186 10M =2560
35187 10M =2560
35188 10M =2560
35189 10M =2560
35190 10M =2560
35191 10M =2560
35192 10M =2560
35193 10M =2560
35194 10M =2560
35195 10M =2560
35196 10M =2560
35197 10M =2560
35198 10M =2560
35199 10M =2560
35200 10M =2560
35201 10M =2560
35202 10M =2560
35203 10M =2560
35204 10M =2560
35205 10M =2560
35206 10M =2560
35207 10M =2560
35208 10M =2560
35209 10M =2560
35210 10M =2560
35211 10M =2560
35212 10M =2560
35213 10M =2560
35214 10M =2560
35215 10M =2560
35216 10M =2560
35217 10M =2560
35218 10M =2560
35219 10M =2560
35220 10M =2560
35221 10M =2560
35222 10M =2560
35223 10M =2560
35224 10M =2560
35225 10M =2560
35226 10M =2560
35227 10M =2560
35228 10M =2560
35229 10M =2560
35230 10M =2560
35231 10M =2560
35232 10M =2560
35233 10M =2560
35234 10M =2560
35235 10M =2560
35236 10M =2560
35237 10M =2560
35238 10M =2560
35239 10M =2560
35240 10M =2560
35241 10M =2560
35242 10M =2560
35243 10M =2560
35244 10M =2560
35245 10M =2560
35246 10M =2560
35247 10M =2560
35248 10M =2560
35249 10M =2560
35250 10M =2560
35251 10M =2560
35252 10M =2560
35253 10M =2560
35254 10M =2560
35255 10M =2560
35256 10M =2560
35257 10M =2560
35258 10M =2560
35259 10M =2560
35260 10M =2560
35261 10M =2560
35262 10M =2560
35263 10M =2560
35264 10M =2560
35265 10M =2560
35266 10M =2560
35267 10M =2560
35268 10M =2560
35269 10M =2560
35270 10M =2560
35271 10M =2560
35272 10M =2560
35273 10M =2560
35274 10M =2560
35275 10M =2560
35276 10M =2560
35277 10M =2560
35278 10M =2560
35279 10M =2560
35280 10M =2560
35281 10M =2560
35282 10M =2560
35283 10M =2560
35284 10M =2560
35285 10M =2560
35286 10M =2560
35287 10M =2560
35288 10M =2560
35289 10M =2560
35290 10M =2560
35291 10M =2560
35292 10M =2560
35293 10M =2560
35294 10M =2560
35295 10M =2560
35296 10M =2560
35297 10M =2560
35298 10M =2560
35299 10M =2560
35300 10M =2560
35301 10M =2560
35302 10M =2560
35303 10M =2560
35304 10M =2560
35305 10M =2560
35306 10M =2560
35307 10M =2560
35308 10M =2560
35309 10M =2560
35310 10M =2560
35311 10M =2560
35312 10M =2560
35313 10M =2560
35314 10M =2560
35315 10M =2560
35316 10M =2560
35317 10M =2560
35318 10M =2560
35319 10M =2560
35320 10M =2560
35321 10M =2560
35322 10M =2560
35323 10M =2560
35324 10M =2560
35325 10M =2560
35326 10M =2560
35327 10M =2560
35328 10M =2560
35329 10M =2560
35330 10M =2560
35331 10M =2560
35332 10M =2560
35333 10M =2560
35334 10M =2560
35335 10M =2560
35336 10M =2560
35337 10M =2560
35338 10M =2560
35339 10M =2560
35340 10M =2560
35341 10M =2560
35342 10M =2560
35343 10M =2560
35344 10M =2560
35345 10M =2560
35346 10M =2560
35347 10M =2560
35348 10M =2560
35349 10M =2560
35350 10M =2560
35351 10M =2560
35352 10M =2560
35353 10M =2560
35354 10M =2560
35355 10M =2560
35356 10M =2560
35357 10M =2560
35358 10M =2560
35359 10M =2560
35360 10M =2560
35361 10M =2560
35362 10M =2560
35363 10M =2560
35364 10M =2560
35365 10M =2560
35366 10M =2560
35367 10M =2560
35368 10M =2560
35369 10M =2560
35370 10M =2560
35371 10M =2560
35372 10M =2560
35373 10M =2560
35374 10M =2560
35375 10M =2560
35376 10M =2560
35377 10M =2560
35378 10M =2560
35379 10M =2560
35380 10M =2560
35381 10M =2560
35382 10M =2560
35383 10M =2560
35384 10M =2560
35385 10M =2560
35386 10M =2560
35387 10M =2560
35388 10M =2560
35389 10M =2560
35390 10M =2560
35391 10M =2560
35392 10M =2560
35393 10M =2560
35394 10M =2560
35395 10M =2560
35396 10M =2560
35397 10M =2560
35398 10M =2560
35399 10M =2560
35400 10M =2560
35401 10M =2560
35402 10M =2560
35403 10M =2560
35404 10M =2560
35405 10M =2560
35406 10M =2560
35407 _ATEOF
35408
35409 genfile --sparse --file BIGFILE --block-size 4K - < mapfile || exit 77
35410 tar -f - -c --sparse --posix BIGFILE | tar tvf - | awk '{ print $3, $(NF) }'
35411 )
35412 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35413 at_status=$? at_failed=false
35414 $at_check_filter
35415 at_fn_diff_devnull "$at_stderr" || at_failed=:
35416 echo >>"$at_stdout"; $as_echo "20961034240 BIGFILE
35417 " | \
35418   $at_diff - "$at_stdout" || at_failed=:
35419 at_fn_check_status 0 $at_status "$at_srcdir/sparse05.at:31"
35420 $at_failed && at_fn_log_failure
35421 $at_traceon; }
35422
35423
35424
35425
35426   set +x
35427   $at_times_p && times >"$at_times_file"
35428 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35429 read at_status <"$at_status_file"
35430 #AT_STOP_142
35431 #AT_START_143
35432 at_fn_group_banner 143 'sparse06.at:21' \
35433   "storing sparse file using seek method" "          " 19
35434 at_xfail=no
35435       test -f $XFAILFILE && at_xfail=yes
35436 (
35437   $as_echo "143. $at_setup_line: testing $at_desc ..."
35438   $at_traceon
35439
35440
35441
35442
35443
35444
35445
35446   { set +x
35447 $as_echo "$at_srcdir/sparse06.at:32:
35448 mkdir posix
35449 (cd posix
35450 TEST_TAR_FORMAT=posix
35451 export TEST_TAR_FORMAT
35452 TAR_OPTIONS=\"-H posix\"
35453 export TAR_OPTIONS
35454 rm -rf *
35455
35456
35457 checkseekhole || exit 77
35458
35459
35460 TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=seek\"
35461 genfile --sparse --file bigsparse 0 ABC 8G DEF
35462 tar -cSf a bigsparse
35463 test \$? -eq 0 || exit 1
35464
35465
35466 rm -rf out archive.tar smallsparse && mkdir out
35467 genfile --sparse --quiet --file smallsparse 0 ABC
35468 tar -cSf archive.tar smallsparse
35469 tar -xf archive.tar -C out
35470 cmp smallsparse out/smallsparse
35471
35472
35473 rm -rf out archive.tar smallsparse && mkdir out
35474 genfile --sparse --quiet --file smallsparse 0 ABC 10M
35475 tar -cSf archive.tar smallsparse
35476 tar -xf archive.tar -C out
35477 cmp smallsparse out/smallsparse
35478
35479
35480 rm -rf out archive.tar smallsparse && mkdir out
35481 genfile --sparse --quiet --file smallsparse 0 ABC 10M DEF
35482 tar -cSf archive.tar smallsparse
35483 tar -xf archive.tar -C out
35484 cmp smallsparse out/smallsparse
35485
35486
35487
35488 rm -rf out archive.tar smallsparse && mkdir out
35489 genfile --sparse --quiet --file smallsparse 10M
35490 tar -cSf archive.tar smallsparse
35491 tar -xf archive.tar -C out
35492 cmp smallsparse out/smallsparse
35493
35494
35495 rm -rf out archive.tar smallsparse && mkdir out
35496 genfile --sparse --quiet --file smallsparse 10M ABC
35497 tar -cSf archive.tar smallsparse
35498 tar -xf archive.tar -C out
35499 cmp smallsparse out/smallsparse
35500
35501
35502 rm -rf out archive.tar smallsparse && mkdir out
35503 genfile --sparse --quiet --file smallsparse 10M ABC 20M
35504 tar -cSf archive.tar smallsparse
35505 tar -xf archive.tar -C out
35506 cmp smallsparse out/smallsparse
35507
35508
35509
35510 rm -rf out archive.tar smallsparse && mkdir out
35511 genfile --sparse --quiet --file smallsparse 10M DEF 20M GHI 30M JKL 40M
35512 tar -cSf archive.tar smallsparse
35513 tar -xf archive.tar -C out
35514 cmp smallsparse out/smallsparse
35515
35516
35517 )"
35518 at_fn_check_prepare_notrace 'an embedded newline' "sparse06.at:32"
35519 ( $at_check_trace;
35520 mkdir posix
35521 (cd posix
35522 TEST_TAR_FORMAT=posix
35523 export TEST_TAR_FORMAT
35524 TAR_OPTIONS="-H posix"
35525 export TAR_OPTIONS
35526 rm -rf *
35527
35528
35529 checkseekhole || exit 77
35530
35531
35532 TAR_OPTIONS="$TAR_OPTIONS --hole-detection=seek"
35533 genfile --sparse --file bigsparse 0 ABC 8G DEF
35534 tar -cSf a bigsparse
35535 test $? -eq 0 || exit 1
35536
35537
35538 rm -rf out archive.tar smallsparse && mkdir out
35539 genfile --sparse --quiet --file smallsparse 0 ABC
35540 tar -cSf archive.tar smallsparse
35541 tar -xf archive.tar -C out
35542 cmp smallsparse out/smallsparse
35543
35544
35545 rm -rf out archive.tar smallsparse && mkdir out
35546 genfile --sparse --quiet --file smallsparse 0 ABC 10M
35547 tar -cSf archive.tar smallsparse
35548 tar -xf archive.tar -C out
35549 cmp smallsparse out/smallsparse
35550
35551
35552 rm -rf out archive.tar smallsparse && mkdir out
35553 genfile --sparse --quiet --file smallsparse 0 ABC 10M DEF
35554 tar -cSf archive.tar smallsparse
35555 tar -xf archive.tar -C out
35556 cmp smallsparse out/smallsparse
35557
35558
35559
35560 rm -rf out archive.tar smallsparse && mkdir out
35561 genfile --sparse --quiet --file smallsparse 10M
35562 tar -cSf archive.tar smallsparse
35563 tar -xf archive.tar -C out
35564 cmp smallsparse out/smallsparse
35565
35566
35567 rm -rf out archive.tar smallsparse && mkdir out
35568 genfile --sparse --quiet --file smallsparse 10M ABC
35569 tar -cSf archive.tar smallsparse
35570 tar -xf archive.tar -C out
35571 cmp smallsparse out/smallsparse
35572
35573
35574 rm -rf out archive.tar smallsparse && mkdir out
35575 genfile --sparse --quiet --file smallsparse 10M ABC 20M
35576 tar -cSf archive.tar smallsparse
35577 tar -xf archive.tar -C out
35578 cmp smallsparse out/smallsparse
35579
35580
35581
35582 rm -rf out archive.tar smallsparse && mkdir out
35583 genfile --sparse --quiet --file smallsparse 10M DEF 20M GHI 30M JKL 40M
35584 tar -cSf archive.tar smallsparse
35585 tar -xf archive.tar -C out
35586 cmp smallsparse out/smallsparse
35587
35588
35589 )
35590 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35591 at_status=$? at_failed=false
35592 $at_check_filter
35593 at_fn_diff_devnull "$at_stderr" || at_failed=:
35594 at_fn_diff_devnull "$at_stdout" || at_failed=:
35595 at_fn_check_status 0 $at_status "$at_srcdir/sparse06.at:32"
35596 $at_failed && at_fn_log_failure
35597 $at_traceon; }
35598
35599
35600
35601
35602   set +x
35603   $at_times_p && times >"$at_times_file"
35604 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35605 read at_status <"$at_status_file"
35606 #AT_STOP_143
35607 #AT_START_144
35608 at_fn_group_banner 144 'sparsemv.at:21' \
35609   "sparse files in MV archives" "                    " 19
35610 at_xfail=no
35611       test -f $XFAILFILE && at_xfail=yes
35612 (
35613   $as_echo "144. $at_setup_line: testing $at_desc ..."
35614   $at_traceon
35615
35616
35617
35618 # Check if sparse files are correctly split between GNU multi-volume
35619 # archives.
35620 # There are two cases: the file can be split within an empty (null) block,
35621 # or within a data block. Since null blocks are not archived, the first
35622 # case means the file is split between two consecutive data blocks.
35623 #
35624
35625
35626
35627   { set +x
35628 $as_echo "$at_srcdir/sparsemv.at:31:
35629 mkdir gnu
35630 (cd gnu
35631 TEST_TAR_FORMAT=gnu
35632 export TEST_TAR_FORMAT
35633 TAR_OPTIONS=\"-H gnu\"
35634 export TAR_OPTIONS
35635 rm -rf *
35636
35637 exec <&-
35638 TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
35639 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
35640 echo \"Pass 1: Split between data blocks\"
35641 echo \"Create archive\"
35642 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
35643 echo \"Test archive\"
35644 tar --record-size=512 -t -M -f arc.1 -f arc.2
35645 echo \"Compare archive\"
35646 tar --record-size=512 -d -M -f arc.1 -f arc.2
35647
35648 echo \"Pass 2: Split within a data block\"
35649 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
35650 echo \"Create archive\"
35651 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
35652 echo \"Test archive\"
35653 tar --record-size=512 -t -M -f arc.1 -f arc.2
35654 echo \"Compare archive\"
35655 tar --record-size=512 -d -M -f arc.1 -f arc.2
35656 )"
35657 at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
35658 ( $at_check_trace;
35659 mkdir gnu
35660 (cd gnu
35661 TEST_TAR_FORMAT=gnu
35662 export TEST_TAR_FORMAT
35663 TAR_OPTIONS="-H gnu"
35664 export TAR_OPTIONS
35665 rm -rf *
35666
35667 exec <&-
35668 TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
35669 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
35670 echo "Pass 1: Split between data blocks"
35671 echo "Create archive"
35672 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
35673 echo "Test archive"
35674 tar --record-size=512 -t -M -f arc.1 -f arc.2
35675 echo "Compare archive"
35676 tar --record-size=512 -d -M -f arc.1 -f arc.2
35677
35678 echo "Pass 2: Split within a data block"
35679 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
35680 echo "Create archive"
35681 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
35682 echo "Test archive"
35683 tar --record-size=512 -t -M -f arc.1 -f arc.2
35684 echo "Compare archive"
35685 tar --record-size=512 -d -M -f arc.1 -f arc.2
35686 )
35687 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35688 at_status=$? at_failed=false
35689 $at_check_filter
35690 at_fn_diff_devnull "$at_stderr" || at_failed=:
35691 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
35692 Create archive
35693 Test archive
35694 sparsefile
35695 Compare archive
35696 Pass 2: Split within a data block
35697 Create archive
35698 Test archive
35699 sparsefile
35700 Compare archive
35701 " | \
35702   $at_diff - "$at_stdout" || at_failed=:
35703 at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
35704 $at_failed && at_fn_log_failure
35705 $at_traceon; }
35706
35707               { set +x
35708 $as_echo "$at_srcdir/sparsemv.at:31:
35709 mkdir oldgnu
35710 (cd oldgnu
35711 TEST_TAR_FORMAT=oldgnu
35712 export TEST_TAR_FORMAT
35713 TAR_OPTIONS=\"-H oldgnu\"
35714 export TAR_OPTIONS
35715 rm -rf *
35716
35717 exec <&-
35718 TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
35719 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
35720 echo \"Pass 1: Split between data blocks\"
35721 echo \"Create archive\"
35722 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
35723 echo \"Test archive\"
35724 tar --record-size=512 -t -M -f arc.1 -f arc.2
35725 echo \"Compare archive\"
35726 tar --record-size=512 -d -M -f arc.1 -f arc.2
35727
35728 echo \"Pass 2: Split within a data block\"
35729 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
35730 echo \"Create archive\"
35731 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
35732 echo \"Test archive\"
35733 tar --record-size=512 -t -M -f arc.1 -f arc.2
35734 echo \"Compare archive\"
35735 tar --record-size=512 -d -M -f arc.1 -f arc.2
35736 )"
35737 at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
35738 ( $at_check_trace;
35739 mkdir oldgnu
35740 (cd oldgnu
35741 TEST_TAR_FORMAT=oldgnu
35742 export TEST_TAR_FORMAT
35743 TAR_OPTIONS="-H oldgnu"
35744 export TAR_OPTIONS
35745 rm -rf *
35746
35747 exec <&-
35748 TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
35749 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
35750 echo "Pass 1: Split between data blocks"
35751 echo "Create archive"
35752 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
35753 echo "Test archive"
35754 tar --record-size=512 -t -M -f arc.1 -f arc.2
35755 echo "Compare archive"
35756 tar --record-size=512 -d -M -f arc.1 -f arc.2
35757
35758 echo "Pass 2: Split within a data block"
35759 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
35760 echo "Create archive"
35761 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
35762 echo "Test archive"
35763 tar --record-size=512 -t -M -f arc.1 -f arc.2
35764 echo "Compare archive"
35765 tar --record-size=512 -d -M -f arc.1 -f arc.2
35766 )
35767 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35768 at_status=$? at_failed=false
35769 $at_check_filter
35770 at_fn_diff_devnull "$at_stderr" || at_failed=:
35771 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
35772 Create archive
35773 Test archive
35774 sparsefile
35775 Compare archive
35776 Pass 2: Split within a data block
35777 Create archive
35778 Test archive
35779 sparsefile
35780 Compare archive
35781 " | \
35782   $at_diff - "$at_stdout" || at_failed=:
35783 at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
35784 $at_failed && at_fn_log_failure
35785 $at_traceon; }
35786
35787
35788
35789
35790   set +x
35791   $at_times_p && times >"$at_times_file"
35792 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35793 read at_status <"$at_status_file"
35794 #AT_STOP_144
35795 #AT_START_145
35796 at_fn_group_banner 145 'spmvp00.at:21' \
35797   "sparse files in PAX MV archives, v.0.0" "         " 19
35798 at_xfail=no
35799       test -f $XFAILFILE && at_xfail=yes
35800 (
35801   $as_echo "145. $at_setup_line: testing $at_desc ..."
35802   $at_traceon
35803
35804
35805
35806
35807
35808
35809   { set +x
35810 $as_echo "$at_srcdir/spmvp00.at:24:
35811 mkdir pax
35812 (cd pax
35813 TEST_TAR_FORMAT=pax
35814 export TEST_TAR_FORMAT
35815 TAR_OPTIONS=\"-H pax\"
35816 export TAR_OPTIONS
35817 rm -rf *
35818
35819 exec <&-
35820 TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
35821 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
35822 echo \"Pass 1: Split between data blocks\"
35823 echo \"Create archive\"
35824 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
35825 echo \"Test archive\"
35826 tar -t -M -f arc.1 -f arc.2 -f arc.3
35827 echo \"Compare archive\"
35828 tar -d -M -f arc.1 -f arc.2 -f arc.3
35829
35830 echo \"Pass 2: Split within a data block\"
35831 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
35832 echo \"Create archive\"
35833 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
35834 echo \"Test archive\"
35835 tar -t -M -f arc.1 -f arc.2 -f arc.3
35836 echo \"Compare archive\"
35837 tar -d -M -f arc.1 -f arc.2 -f arc.3
35838 )"
35839 at_fn_check_prepare_notrace 'an embedded newline' "spmvp00.at:24"
35840 ( $at_check_trace;
35841 mkdir pax
35842 (cd pax
35843 TEST_TAR_FORMAT=pax
35844 export TEST_TAR_FORMAT
35845 TAR_OPTIONS="-H pax"
35846 export TAR_OPTIONS
35847 rm -rf *
35848
35849 exec <&-
35850 TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
35851 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
35852 echo "Pass 1: Split between data blocks"
35853 echo "Create archive"
35854 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
35855 echo "Test archive"
35856 tar -t -M -f arc.1 -f arc.2 -f arc.3
35857 echo "Compare archive"
35858 tar -d -M -f arc.1 -f arc.2 -f arc.3
35859
35860 echo "Pass 2: Split within a data block"
35861 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
35862 echo "Create archive"
35863 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
35864 echo "Test archive"
35865 tar -t -M -f arc.1 -f arc.2 -f arc.3
35866 echo "Compare archive"
35867 tar -d -M -f arc.1 -f arc.2 -f arc.3
35868 )
35869 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35870 at_status=$? at_failed=false
35871 $at_check_filter
35872 at_fn_diff_devnull "$at_stderr" || at_failed=:
35873 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
35874 Create archive
35875 Test archive
35876 sparsefile
35877 Compare archive
35878 Pass 2: Split within a data block
35879 Create archive
35880 Test archive
35881 sparsefile
35882 Compare archive
35883 " | \
35884   $at_diff - "$at_stdout" || at_failed=:
35885 at_fn_check_status 0 $at_status "$at_srcdir/spmvp00.at:24"
35886 $at_failed && at_fn_log_failure
35887 $at_traceon; }
35888
35889
35890
35891
35892   set +x
35893   $at_times_p && times >"$at_times_file"
35894 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35895 read at_status <"$at_status_file"
35896 #AT_STOP_145
35897 #AT_START_146
35898 at_fn_group_banner 146 'spmvp01.at:21' \
35899   "sparse files in PAX MV archives, v.0.1" "         " 19
35900 at_xfail=no
35901       test -f $XFAILFILE && at_xfail=yes
35902 (
35903   $as_echo "146. $at_setup_line: testing $at_desc ..."
35904   $at_traceon
35905
35906
35907
35908
35909
35910
35911   { set +x
35912 $as_echo "$at_srcdir/spmvp01.at:24:
35913 mkdir pax
35914 (cd pax
35915 TEST_TAR_FORMAT=pax
35916 export TEST_TAR_FORMAT
35917 TAR_OPTIONS=\"-H pax\"
35918 export TAR_OPTIONS
35919 rm -rf *
35920
35921 exec <&-
35922 TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
35923 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
35924 echo \"Pass 1: Split between data blocks\"
35925 echo \"Create archive\"
35926 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
35927 echo \"Test archive\"
35928 tar -t -M -f arc.1 -f arc.2 -f arc.3
35929 echo \"Compare archive\"
35930 tar -d -M -f arc.1 -f arc.2 -f arc.3
35931
35932 echo \"Pass 2: Split within a data block\"
35933 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
35934 echo \"Create archive\"
35935 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
35936 echo \"Test archive\"
35937 tar -t -M -f arc.1 -f arc.2 -f arc.3
35938 echo \"Compare archive\"
35939 tar -d -M -f arc.1 -f arc.2 -f arc.3
35940 )"
35941 at_fn_check_prepare_notrace 'an embedded newline' "spmvp01.at:24"
35942 ( $at_check_trace;
35943 mkdir pax
35944 (cd pax
35945 TEST_TAR_FORMAT=pax
35946 export TEST_TAR_FORMAT
35947 TAR_OPTIONS="-H pax"
35948 export TAR_OPTIONS
35949 rm -rf *
35950
35951 exec <&-
35952 TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
35953 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
35954 echo "Pass 1: Split between data blocks"
35955 echo "Create archive"
35956 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
35957 echo "Test archive"
35958 tar -t -M -f arc.1 -f arc.2 -f arc.3
35959 echo "Compare archive"
35960 tar -d -M -f arc.1 -f arc.2 -f arc.3
35961
35962 echo "Pass 2: Split within a data block"
35963 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
35964 echo "Create archive"
35965 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
35966 echo "Test archive"
35967 tar -t -M -f arc.1 -f arc.2 -f arc.3
35968 echo "Compare archive"
35969 tar -d -M -f arc.1 -f arc.2 -f arc.3
35970 )
35971 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35972 at_status=$? at_failed=false
35973 $at_check_filter
35974 at_fn_diff_devnull "$at_stderr" || at_failed=:
35975 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
35976 Create archive
35977 Test archive
35978 sparsefile
35979 Compare archive
35980 Pass 2: Split within a data block
35981 Create archive
35982 Test archive
35983 sparsefile
35984 Compare archive
35985 " | \
35986   $at_diff - "$at_stdout" || at_failed=:
35987 at_fn_check_status 0 $at_status "$at_srcdir/spmvp01.at:24"
35988 $at_failed && at_fn_log_failure
35989 $at_traceon; }
35990
35991
35992
35993
35994   set +x
35995   $at_times_p && times >"$at_times_file"
35996 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35997 read at_status <"$at_status_file"
35998 #AT_STOP_146
35999 #AT_START_147
36000 at_fn_group_banner 147 'spmvp10.at:21' \
36001   "sparse files in PAX MV archives, v.1.0" "         " 19
36002 at_xfail=no
36003       test -f $XFAILFILE && at_xfail=yes
36004 (
36005   $as_echo "147. $at_setup_line: testing $at_desc ..."
36006   $at_traceon
36007
36008
36009
36010
36011
36012
36013   { set +x
36014 $as_echo "$at_srcdir/spmvp10.at:24:
36015 mkdir pax
36016 (cd pax
36017 TEST_TAR_FORMAT=pax
36018 export TEST_TAR_FORMAT
36019 TAR_OPTIONS=\"-H pax\"
36020 export TAR_OPTIONS
36021 rm -rf *
36022
36023 exec <&-
36024 TAR_OPTIONS=\"\$TAR_OPTIONS --hole-detection=raw\"
36025 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
36026 echo \"Pass 1: Split between data blocks\"
36027 echo \"Create archive\"
36028 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
36029 echo \"Test archive\"
36030 tar -t -M -f arc.1 -f arc.2 -f arc.3
36031 echo \"Compare archive\"
36032 tar -d -M -f arc.1 -f arc.2 -f arc.3
36033
36034 echo \"Pass 2: Split within a data block\"
36035 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
36036 echo \"Create archive\"
36037 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
36038 echo \"Test archive\"
36039 tar -t -M -f arc.1 -f arc.2 -f arc.3
36040 echo \"Compare archive\"
36041 tar -d -M -f arc.1 -f arc.2 -f arc.3
36042 )"
36043 at_fn_check_prepare_notrace 'an embedded newline' "spmvp10.at:24"
36044 ( $at_check_trace;
36045 mkdir pax
36046 (cd pax
36047 TEST_TAR_FORMAT=pax
36048 export TEST_TAR_FORMAT
36049 TAR_OPTIONS="-H pax"
36050 export TAR_OPTIONS
36051 rm -rf *
36052
36053 exec <&-
36054 TAR_OPTIONS="$TAR_OPTIONS --hole-detection=raw"
36055 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
36056 echo "Pass 1: Split between data blocks"
36057 echo "Create archive"
36058 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
36059 echo "Test archive"
36060 tar -t -M -f arc.1 -f arc.2 -f arc.3
36061 echo "Compare archive"
36062 tar -d -M -f arc.1 -f arc.2 -f arc.3
36063
36064 echo "Pass 2: Split within a data block"
36065 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
36066 echo "Create archive"
36067 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
36068 echo "Test archive"
36069 tar -t -M -f arc.1 -f arc.2 -f arc.3
36070 echo "Compare archive"
36071 tar -d -M -f arc.1 -f arc.2 -f arc.3
36072 )
36073 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36074 at_status=$? at_failed=false
36075 $at_check_filter
36076 at_fn_diff_devnull "$at_stderr" || at_failed=:
36077 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
36078 Create archive
36079 Test archive
36080 sparsefile
36081 Compare archive
36082 Pass 2: Split within a data block
36083 Create archive
36084 Test archive
36085 sparsefile
36086 Compare archive
36087 " | \
36088   $at_diff - "$at_stdout" || at_failed=:
36089 at_fn_check_status 0 $at_status "$at_srcdir/spmvp10.at:24"
36090 $at_failed && at_fn_log_failure
36091 $at_traceon; }
36092
36093
36094
36095
36096   set +x
36097   $at_times_p && times >"$at_times_file"
36098 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36099 read at_status <"$at_status_file"
36100 #AT_STOP_147
36101 #AT_START_148
36102 at_fn_group_banner 148 'update.at:28' \
36103   "update unchanged directories" "                   " 20
36104 at_xfail=no
36105       test -f $XFAILFILE && at_xfail=yes
36106 (
36107   $as_echo "148. $at_setup_line: testing $at_desc ..."
36108   $at_traceon
36109
36110
36111
36112
36113
36114   { set +x
36115 $as_echo "$at_srcdir/update.at:31:
36116 mkdir v7
36117 (cd v7
36118 TEST_TAR_FORMAT=v7
36119 export TEST_TAR_FORMAT
36120 TAR_OPTIONS=\"-H v7\"
36121 export TAR_OPTIONS
36122 rm -rf *
36123
36124
36125 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36126
36127 mkdir directory
36128 genfile --length 10240 --pattern zeros --file directory/file1
36129 genfile --length 10240 --pattern default --file directory/file2
36130
36131 tar cf archive directory || exit 1
36132 echo separator
36133 tar uf archive directory || exit 1
36134 echo separator
36135 tar tf archive | sort || exit 1
36136 )"
36137 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
36138 ( $at_check_trace;
36139 mkdir v7
36140 (cd v7
36141 TEST_TAR_FORMAT=v7
36142 export TEST_TAR_FORMAT
36143 TAR_OPTIONS="-H v7"
36144 export TAR_OPTIONS
36145 rm -rf *
36146
36147
36148 test -z "`sort < /dev/null 2>&1`" || exit 77
36149
36150 mkdir directory
36151 genfile --length 10240 --pattern zeros --file directory/file1
36152 genfile --length 10240 --pattern default --file directory/file2
36153
36154 tar cf archive directory || exit 1
36155 echo separator
36156 tar uf archive directory || exit 1
36157 echo separator
36158 tar tf archive | sort || exit 1
36159 )
36160 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36161 at_status=$? at_failed=false
36162 $at_check_filter
36163 at_fn_diff_devnull "$at_stderr" || at_failed=:
36164 echo >>"$at_stdout"; $as_echo "separator
36165 separator
36166 directory/
36167 directory/file1
36168 directory/file2
36169 " | \
36170   $at_diff - "$at_stdout" || at_failed=:
36171 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
36172 $at_failed && at_fn_log_failure
36173 $at_traceon; }
36174
36175               { set +x
36176 $as_echo "$at_srcdir/update.at:31:
36177 mkdir oldgnu
36178 (cd oldgnu
36179 TEST_TAR_FORMAT=oldgnu
36180 export TEST_TAR_FORMAT
36181 TAR_OPTIONS=\"-H oldgnu\"
36182 export TAR_OPTIONS
36183 rm -rf *
36184
36185
36186 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36187
36188 mkdir directory
36189 genfile --length 10240 --pattern zeros --file directory/file1
36190 genfile --length 10240 --pattern default --file directory/file2
36191
36192 tar cf archive directory || exit 1
36193 echo separator
36194 tar uf archive directory || exit 1
36195 echo separator
36196 tar tf archive | sort || exit 1
36197 )"
36198 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
36199 ( $at_check_trace;
36200 mkdir oldgnu
36201 (cd oldgnu
36202 TEST_TAR_FORMAT=oldgnu
36203 export TEST_TAR_FORMAT
36204 TAR_OPTIONS="-H oldgnu"
36205 export TAR_OPTIONS
36206 rm -rf *
36207
36208
36209 test -z "`sort < /dev/null 2>&1`" || exit 77
36210
36211 mkdir directory
36212 genfile --length 10240 --pattern zeros --file directory/file1
36213 genfile --length 10240 --pattern default --file directory/file2
36214
36215 tar cf archive directory || exit 1
36216 echo separator
36217 tar uf archive directory || exit 1
36218 echo separator
36219 tar tf archive | sort || exit 1
36220 )
36221 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36222 at_status=$? at_failed=false
36223 $at_check_filter
36224 at_fn_diff_devnull "$at_stderr" || at_failed=:
36225 echo >>"$at_stdout"; $as_echo "separator
36226 separator
36227 directory/
36228 directory/file1
36229 directory/file2
36230 " | \
36231   $at_diff - "$at_stdout" || at_failed=:
36232 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
36233 $at_failed && at_fn_log_failure
36234 $at_traceon; }
36235
36236               { set +x
36237 $as_echo "$at_srcdir/update.at:31:
36238 mkdir ustar
36239 (cd ustar
36240 TEST_TAR_FORMAT=ustar
36241 export TEST_TAR_FORMAT
36242 TAR_OPTIONS=\"-H ustar\"
36243 export TAR_OPTIONS
36244 rm -rf *
36245
36246
36247 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36248
36249 mkdir directory
36250 genfile --length 10240 --pattern zeros --file directory/file1
36251 genfile --length 10240 --pattern default --file directory/file2
36252
36253 tar cf archive directory || exit 1
36254 echo separator
36255 tar uf archive directory || exit 1
36256 echo separator
36257 tar tf archive | sort || exit 1
36258 )"
36259 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
36260 ( $at_check_trace;
36261 mkdir ustar
36262 (cd ustar
36263 TEST_TAR_FORMAT=ustar
36264 export TEST_TAR_FORMAT
36265 TAR_OPTIONS="-H ustar"
36266 export TAR_OPTIONS
36267 rm -rf *
36268
36269
36270 test -z "`sort < /dev/null 2>&1`" || exit 77
36271
36272 mkdir directory
36273 genfile --length 10240 --pattern zeros --file directory/file1
36274 genfile --length 10240 --pattern default --file directory/file2
36275
36276 tar cf archive directory || exit 1
36277 echo separator
36278 tar uf archive directory || exit 1
36279 echo separator
36280 tar tf archive | sort || exit 1
36281 )
36282 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36283 at_status=$? at_failed=false
36284 $at_check_filter
36285 at_fn_diff_devnull "$at_stderr" || at_failed=:
36286 echo >>"$at_stdout"; $as_echo "separator
36287 separator
36288 directory/
36289 directory/file1
36290 directory/file2
36291 " | \
36292   $at_diff - "$at_stdout" || at_failed=:
36293 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
36294 $at_failed && at_fn_log_failure
36295 $at_traceon; }
36296
36297               { set +x
36298 $as_echo "$at_srcdir/update.at:31:
36299 mkdir posix
36300 (cd posix
36301 TEST_TAR_FORMAT=posix
36302 export TEST_TAR_FORMAT
36303 TAR_OPTIONS=\"-H posix\"
36304 export TAR_OPTIONS
36305 rm -rf *
36306
36307
36308 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36309
36310 mkdir directory
36311 genfile --length 10240 --pattern zeros --file directory/file1
36312 genfile --length 10240 --pattern default --file directory/file2
36313
36314 tar cf archive directory || exit 1
36315 echo separator
36316 tar uf archive directory || exit 1
36317 echo separator
36318 tar tf archive | sort || exit 1
36319 )"
36320 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
36321 ( $at_check_trace;
36322 mkdir posix
36323 (cd posix
36324 TEST_TAR_FORMAT=posix
36325 export TEST_TAR_FORMAT
36326 TAR_OPTIONS="-H posix"
36327 export TAR_OPTIONS
36328 rm -rf *
36329
36330
36331 test -z "`sort < /dev/null 2>&1`" || exit 77
36332
36333 mkdir directory
36334 genfile --length 10240 --pattern zeros --file directory/file1
36335 genfile --length 10240 --pattern default --file directory/file2
36336
36337 tar cf archive directory || exit 1
36338 echo separator
36339 tar uf archive directory || exit 1
36340 echo separator
36341 tar tf archive | sort || exit 1
36342 )
36343 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36344 at_status=$? at_failed=false
36345 $at_check_filter
36346 at_fn_diff_devnull "$at_stderr" || at_failed=:
36347 echo >>"$at_stdout"; $as_echo "separator
36348 separator
36349 directory/
36350 directory/file1
36351 directory/file2
36352 " | \
36353   $at_diff - "$at_stdout" || at_failed=:
36354 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
36355 $at_failed && at_fn_log_failure
36356 $at_traceon; }
36357
36358               { set +x
36359 $as_echo "$at_srcdir/update.at:31:
36360 mkdir gnu
36361 (cd gnu
36362 TEST_TAR_FORMAT=gnu
36363 export TEST_TAR_FORMAT
36364 TAR_OPTIONS=\"-H gnu\"
36365 export TAR_OPTIONS
36366 rm -rf *
36367
36368
36369 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36370
36371 mkdir directory
36372 genfile --length 10240 --pattern zeros --file directory/file1
36373 genfile --length 10240 --pattern default --file directory/file2
36374
36375 tar cf archive directory || exit 1
36376 echo separator
36377 tar uf archive directory || exit 1
36378 echo separator
36379 tar tf archive | sort || exit 1
36380 )"
36381 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
36382 ( $at_check_trace;
36383 mkdir gnu
36384 (cd gnu
36385 TEST_TAR_FORMAT=gnu
36386 export TEST_TAR_FORMAT
36387 TAR_OPTIONS="-H gnu"
36388 export TAR_OPTIONS
36389 rm -rf *
36390
36391
36392 test -z "`sort < /dev/null 2>&1`" || exit 77
36393
36394 mkdir directory
36395 genfile --length 10240 --pattern zeros --file directory/file1
36396 genfile --length 10240 --pattern default --file directory/file2
36397
36398 tar cf archive directory || exit 1
36399 echo separator
36400 tar uf archive directory || exit 1
36401 echo separator
36402 tar tf archive | sort || exit 1
36403 )
36404 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36405 at_status=$? at_failed=false
36406 $at_check_filter
36407 at_fn_diff_devnull "$at_stderr" || at_failed=:
36408 echo >>"$at_stdout"; $as_echo "separator
36409 separator
36410 directory/
36411 directory/file1
36412 directory/file2
36413 " | \
36414   $at_diff - "$at_stdout" || at_failed=:
36415 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
36416 $at_failed && at_fn_log_failure
36417 $at_traceon; }
36418
36419
36420
36421
36422   set +x
36423   $at_times_p && times >"$at_times_file"
36424 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36425 read at_status <"$at_status_file"
36426 #AT_STOP_148
36427 #AT_START_149
36428 at_fn_group_banner 149 'update01.at:29' \
36429   "update directories" "                             " 20
36430 at_xfail=no
36431       test -f $XFAILFILE && at_xfail=yes
36432 (
36433   $as_echo "149. $at_setup_line: testing $at_desc ..."
36434   $at_traceon
36435
36436
36437
36438
36439
36440   { set +x
36441 $as_echo "$at_srcdir/update01.at:32:
36442 mkdir v7
36443 (cd v7
36444 TEST_TAR_FORMAT=v7
36445 export TEST_TAR_FORMAT
36446 TAR_OPTIONS=\"-H v7\"
36447 export TAR_OPTIONS
36448 rm -rf *
36449
36450
36451 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36452
36453 mkdir a
36454 genfile --file a/b
36455
36456 tar cf arc a
36457
36458 echo \"separator\"
36459
36460 sleep 2
36461 genfile --file a/c
36462
36463 tar ufv arc a
36464 echo \"separator\"
36465 tar tf arc | sort || exit 1
36466 )"
36467 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
36468 ( $at_check_trace;
36469 mkdir v7
36470 (cd v7
36471 TEST_TAR_FORMAT=v7
36472 export TEST_TAR_FORMAT
36473 TAR_OPTIONS="-H v7"
36474 export TAR_OPTIONS
36475 rm -rf *
36476
36477
36478 test -z "`sort < /dev/null 2>&1`" || exit 77
36479
36480 mkdir a
36481 genfile --file a/b
36482
36483 tar cf arc a
36484
36485 echo "separator"
36486
36487 sleep 2
36488 genfile --file a/c
36489
36490 tar ufv arc a
36491 echo "separator"
36492 tar tf arc | sort || exit 1
36493 )
36494 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36495 at_status=$? at_failed=false
36496 $at_check_filter
36497 at_fn_diff_devnull "$at_stderr" || at_failed=:
36498 echo >>"$at_stdout"; $as_echo "separator
36499 a/c
36500 separator
36501 a/
36502 a/b
36503 a/c
36504 " | \
36505   $at_diff - "$at_stdout" || at_failed=:
36506 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
36507 $at_failed && at_fn_log_failure
36508 $at_traceon; }
36509
36510               { set +x
36511 $as_echo "$at_srcdir/update01.at:32:
36512 mkdir oldgnu
36513 (cd oldgnu
36514 TEST_TAR_FORMAT=oldgnu
36515 export TEST_TAR_FORMAT
36516 TAR_OPTIONS=\"-H oldgnu\"
36517 export TAR_OPTIONS
36518 rm -rf *
36519
36520
36521 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36522
36523 mkdir a
36524 genfile --file a/b
36525
36526 tar cf arc a
36527
36528 echo \"separator\"
36529
36530 sleep 2
36531 genfile --file a/c
36532
36533 tar ufv arc a
36534 echo \"separator\"
36535 tar tf arc | sort || exit 1
36536 )"
36537 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
36538 ( $at_check_trace;
36539 mkdir oldgnu
36540 (cd oldgnu
36541 TEST_TAR_FORMAT=oldgnu
36542 export TEST_TAR_FORMAT
36543 TAR_OPTIONS="-H oldgnu"
36544 export TAR_OPTIONS
36545 rm -rf *
36546
36547
36548 test -z "`sort < /dev/null 2>&1`" || exit 77
36549
36550 mkdir a
36551 genfile --file a/b
36552
36553 tar cf arc a
36554
36555 echo "separator"
36556
36557 sleep 2
36558 genfile --file a/c
36559
36560 tar ufv arc a
36561 echo "separator"
36562 tar tf arc | sort || exit 1
36563 )
36564 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36565 at_status=$? at_failed=false
36566 $at_check_filter
36567 at_fn_diff_devnull "$at_stderr" || at_failed=:
36568 echo >>"$at_stdout"; $as_echo "separator
36569 a/c
36570 separator
36571 a/
36572 a/b
36573 a/c
36574 " | \
36575   $at_diff - "$at_stdout" || at_failed=:
36576 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
36577 $at_failed && at_fn_log_failure
36578 $at_traceon; }
36579
36580               { set +x
36581 $as_echo "$at_srcdir/update01.at:32:
36582 mkdir ustar
36583 (cd ustar
36584 TEST_TAR_FORMAT=ustar
36585 export TEST_TAR_FORMAT
36586 TAR_OPTIONS=\"-H ustar\"
36587 export TAR_OPTIONS
36588 rm -rf *
36589
36590
36591 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36592
36593 mkdir a
36594 genfile --file a/b
36595
36596 tar cf arc a
36597
36598 echo \"separator\"
36599
36600 sleep 2
36601 genfile --file a/c
36602
36603 tar ufv arc a
36604 echo \"separator\"
36605 tar tf arc | sort || exit 1
36606 )"
36607 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
36608 ( $at_check_trace;
36609 mkdir ustar
36610 (cd ustar
36611 TEST_TAR_FORMAT=ustar
36612 export TEST_TAR_FORMAT
36613 TAR_OPTIONS="-H ustar"
36614 export TAR_OPTIONS
36615 rm -rf *
36616
36617
36618 test -z "`sort < /dev/null 2>&1`" || exit 77
36619
36620 mkdir a
36621 genfile --file a/b
36622
36623 tar cf arc a
36624
36625 echo "separator"
36626
36627 sleep 2
36628 genfile --file a/c
36629
36630 tar ufv arc a
36631 echo "separator"
36632 tar tf arc | sort || exit 1
36633 )
36634 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36635 at_status=$? at_failed=false
36636 $at_check_filter
36637 at_fn_diff_devnull "$at_stderr" || at_failed=:
36638 echo >>"$at_stdout"; $as_echo "separator
36639 a/c
36640 separator
36641 a/
36642 a/b
36643 a/c
36644 " | \
36645   $at_diff - "$at_stdout" || at_failed=:
36646 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
36647 $at_failed && at_fn_log_failure
36648 $at_traceon; }
36649
36650               { set +x
36651 $as_echo "$at_srcdir/update01.at:32:
36652 mkdir posix
36653 (cd posix
36654 TEST_TAR_FORMAT=posix
36655 export TEST_TAR_FORMAT
36656 TAR_OPTIONS=\"-H posix\"
36657 export TAR_OPTIONS
36658 rm -rf *
36659
36660
36661 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36662
36663 mkdir a
36664 genfile --file a/b
36665
36666 tar cf arc a
36667
36668 echo \"separator\"
36669
36670 sleep 2
36671 genfile --file a/c
36672
36673 tar ufv arc a
36674 echo \"separator\"
36675 tar tf arc | sort || exit 1
36676 )"
36677 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
36678 ( $at_check_trace;
36679 mkdir posix
36680 (cd posix
36681 TEST_TAR_FORMAT=posix
36682 export TEST_TAR_FORMAT
36683 TAR_OPTIONS="-H posix"
36684 export TAR_OPTIONS
36685 rm -rf *
36686
36687
36688 test -z "`sort < /dev/null 2>&1`" || exit 77
36689
36690 mkdir a
36691 genfile --file a/b
36692
36693 tar cf arc a
36694
36695 echo "separator"
36696
36697 sleep 2
36698 genfile --file a/c
36699
36700 tar ufv arc a
36701 echo "separator"
36702 tar tf arc | sort || exit 1
36703 )
36704 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36705 at_status=$? at_failed=false
36706 $at_check_filter
36707 at_fn_diff_devnull "$at_stderr" || at_failed=:
36708 echo >>"$at_stdout"; $as_echo "separator
36709 a/c
36710 separator
36711 a/
36712 a/b
36713 a/c
36714 " | \
36715   $at_diff - "$at_stdout" || at_failed=:
36716 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
36717 $at_failed && at_fn_log_failure
36718 $at_traceon; }
36719
36720               { set +x
36721 $as_echo "$at_srcdir/update01.at:32:
36722 mkdir gnu
36723 (cd gnu
36724 TEST_TAR_FORMAT=gnu
36725 export TEST_TAR_FORMAT
36726 TAR_OPTIONS=\"-H gnu\"
36727 export TAR_OPTIONS
36728 rm -rf *
36729
36730
36731 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36732
36733 mkdir a
36734 genfile --file a/b
36735
36736 tar cf arc a
36737
36738 echo \"separator\"
36739
36740 sleep 2
36741 genfile --file a/c
36742
36743 tar ufv arc a
36744 echo \"separator\"
36745 tar tf arc | sort || exit 1
36746 )"
36747 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
36748 ( $at_check_trace;
36749 mkdir gnu
36750 (cd gnu
36751 TEST_TAR_FORMAT=gnu
36752 export TEST_TAR_FORMAT
36753 TAR_OPTIONS="-H gnu"
36754 export TAR_OPTIONS
36755 rm -rf *
36756
36757
36758 test -z "`sort < /dev/null 2>&1`" || exit 77
36759
36760 mkdir a
36761 genfile --file a/b
36762
36763 tar cf arc a
36764
36765 echo "separator"
36766
36767 sleep 2
36768 genfile --file a/c
36769
36770 tar ufv arc a
36771 echo "separator"
36772 tar tf arc | sort || exit 1
36773 )
36774 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36775 at_status=$? at_failed=false
36776 $at_check_filter
36777 at_fn_diff_devnull "$at_stderr" || at_failed=:
36778 echo >>"$at_stdout"; $as_echo "separator
36779 a/c
36780 separator
36781 a/
36782 a/b
36783 a/c
36784 " | \
36785   $at_diff - "$at_stdout" || at_failed=:
36786 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
36787 $at_failed && at_fn_log_failure
36788 $at_traceon; }
36789
36790
36791
36792
36793   set +x
36794   $at_times_p && times >"$at_times_file"
36795 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36796 read at_status <"$at_status_file"
36797 #AT_STOP_149
36798 #AT_START_150
36799 at_fn_group_banner 150 'update02.at:26' \
36800   "update changed files" "                           " 20
36801 at_xfail=no
36802       test -f $XFAILFILE && at_xfail=yes
36803 (
36804   $as_echo "150. $at_setup_line: testing $at_desc ..."
36805   $at_traceon
36806
36807
36808
36809
36810
36811   { set +x
36812 $as_echo "$at_srcdir/update02.at:29:
36813 mkdir v7
36814 (cd v7
36815 TEST_TAR_FORMAT=v7
36816 export TEST_TAR_FORMAT
36817 TAR_OPTIONS=\"-H v7\"
36818 export TAR_OPTIONS
36819 rm -rf *
36820
36821
36822 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36823
36824 mkdir a
36825 genfile --file a/b
36826
36827 tar cf arc a
36828
36829 echo \"separator\"
36830
36831 sleep 2
36832 touch a/b
36833
36834 tar ufv arc a
36835 echo \"separator\"
36836 tar tf arc | sort || exit 1
36837 )"
36838 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
36839 ( $at_check_trace;
36840 mkdir v7
36841 (cd v7
36842 TEST_TAR_FORMAT=v7
36843 export TEST_TAR_FORMAT
36844 TAR_OPTIONS="-H v7"
36845 export TAR_OPTIONS
36846 rm -rf *
36847
36848
36849 test -z "`sort < /dev/null 2>&1`" || exit 77
36850
36851 mkdir a
36852 genfile --file a/b
36853
36854 tar cf arc a
36855
36856 echo "separator"
36857
36858 sleep 2
36859 touch a/b
36860
36861 tar ufv arc a
36862 echo "separator"
36863 tar tf arc | sort || exit 1
36864 )
36865 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36866 at_status=$? at_failed=false
36867 $at_check_filter
36868 at_fn_diff_devnull "$at_stderr" || at_failed=:
36869 echo >>"$at_stdout"; $as_echo "separator
36870 a/b
36871 separator
36872 a/
36873 a/b
36874 a/b
36875 " | \
36876   $at_diff - "$at_stdout" || at_failed=:
36877 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
36878 $at_failed && at_fn_log_failure
36879 $at_traceon; }
36880
36881               { set +x
36882 $as_echo "$at_srcdir/update02.at:29:
36883 mkdir oldgnu
36884 (cd oldgnu
36885 TEST_TAR_FORMAT=oldgnu
36886 export TEST_TAR_FORMAT
36887 TAR_OPTIONS=\"-H oldgnu\"
36888 export TAR_OPTIONS
36889 rm -rf *
36890
36891
36892 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36893
36894 mkdir a
36895 genfile --file a/b
36896
36897 tar cf arc a
36898
36899 echo \"separator\"
36900
36901 sleep 2
36902 touch a/b
36903
36904 tar ufv arc a
36905 echo \"separator\"
36906 tar tf arc | sort || exit 1
36907 )"
36908 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
36909 ( $at_check_trace;
36910 mkdir oldgnu
36911 (cd oldgnu
36912 TEST_TAR_FORMAT=oldgnu
36913 export TEST_TAR_FORMAT
36914 TAR_OPTIONS="-H oldgnu"
36915 export TAR_OPTIONS
36916 rm -rf *
36917
36918
36919 test -z "`sort < /dev/null 2>&1`" || exit 77
36920
36921 mkdir a
36922 genfile --file a/b
36923
36924 tar cf arc a
36925
36926 echo "separator"
36927
36928 sleep 2
36929 touch a/b
36930
36931 tar ufv arc a
36932 echo "separator"
36933 tar tf arc | sort || exit 1
36934 )
36935 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36936 at_status=$? at_failed=false
36937 $at_check_filter
36938 at_fn_diff_devnull "$at_stderr" || at_failed=:
36939 echo >>"$at_stdout"; $as_echo "separator
36940 a/b
36941 separator
36942 a/
36943 a/b
36944 a/b
36945 " | \
36946   $at_diff - "$at_stdout" || at_failed=:
36947 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
36948 $at_failed && at_fn_log_failure
36949 $at_traceon; }
36950
36951               { set +x
36952 $as_echo "$at_srcdir/update02.at:29:
36953 mkdir ustar
36954 (cd ustar
36955 TEST_TAR_FORMAT=ustar
36956 export TEST_TAR_FORMAT
36957 TAR_OPTIONS=\"-H ustar\"
36958 export TAR_OPTIONS
36959 rm -rf *
36960
36961
36962 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
36963
36964 mkdir a
36965 genfile --file a/b
36966
36967 tar cf arc a
36968
36969 echo \"separator\"
36970
36971 sleep 2
36972 touch a/b
36973
36974 tar ufv arc a
36975 echo \"separator\"
36976 tar tf arc | sort || exit 1
36977 )"
36978 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
36979 ( $at_check_trace;
36980 mkdir ustar
36981 (cd ustar
36982 TEST_TAR_FORMAT=ustar
36983 export TEST_TAR_FORMAT
36984 TAR_OPTIONS="-H ustar"
36985 export TAR_OPTIONS
36986 rm -rf *
36987
36988
36989 test -z "`sort < /dev/null 2>&1`" || exit 77
36990
36991 mkdir a
36992 genfile --file a/b
36993
36994 tar cf arc a
36995
36996 echo "separator"
36997
36998 sleep 2
36999 touch a/b
37000
37001 tar ufv arc a
37002 echo "separator"
37003 tar tf arc | sort || exit 1
37004 )
37005 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37006 at_status=$? at_failed=false
37007 $at_check_filter
37008 at_fn_diff_devnull "$at_stderr" || at_failed=:
37009 echo >>"$at_stdout"; $as_echo "separator
37010 a/b
37011 separator
37012 a/
37013 a/b
37014 a/b
37015 " | \
37016   $at_diff - "$at_stdout" || at_failed=:
37017 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
37018 $at_failed && at_fn_log_failure
37019 $at_traceon; }
37020
37021               { set +x
37022 $as_echo "$at_srcdir/update02.at:29:
37023 mkdir posix
37024 (cd posix
37025 TEST_TAR_FORMAT=posix
37026 export TEST_TAR_FORMAT
37027 TAR_OPTIONS=\"-H posix\"
37028 export TAR_OPTIONS
37029 rm -rf *
37030
37031
37032 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
37033
37034 mkdir a
37035 genfile --file a/b
37036
37037 tar cf arc a
37038
37039 echo \"separator\"
37040
37041 sleep 2
37042 touch a/b
37043
37044 tar ufv arc a
37045 echo \"separator\"
37046 tar tf arc | sort || exit 1
37047 )"
37048 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
37049 ( $at_check_trace;
37050 mkdir posix
37051 (cd posix
37052 TEST_TAR_FORMAT=posix
37053 export TEST_TAR_FORMAT
37054 TAR_OPTIONS="-H posix"
37055 export TAR_OPTIONS
37056 rm -rf *
37057
37058
37059 test -z "`sort < /dev/null 2>&1`" || exit 77
37060
37061 mkdir a
37062 genfile --file a/b
37063
37064 tar cf arc a
37065
37066 echo "separator"
37067
37068 sleep 2
37069 touch a/b
37070
37071 tar ufv arc a
37072 echo "separator"
37073 tar tf arc | sort || exit 1
37074 )
37075 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37076 at_status=$? at_failed=false
37077 $at_check_filter
37078 at_fn_diff_devnull "$at_stderr" || at_failed=:
37079 echo >>"$at_stdout"; $as_echo "separator
37080 a/b
37081 separator
37082 a/
37083 a/b
37084 a/b
37085 " | \
37086   $at_diff - "$at_stdout" || at_failed=:
37087 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
37088 $at_failed && at_fn_log_failure
37089 $at_traceon; }
37090
37091               { set +x
37092 $as_echo "$at_srcdir/update02.at:29:
37093 mkdir gnu
37094 (cd gnu
37095 TEST_TAR_FORMAT=gnu
37096 export TEST_TAR_FORMAT
37097 TAR_OPTIONS=\"-H gnu\"
37098 export TAR_OPTIONS
37099 rm -rf *
37100
37101
37102 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
37103
37104 mkdir a
37105 genfile --file a/b
37106
37107 tar cf arc a
37108
37109 echo \"separator\"
37110
37111 sleep 2
37112 touch a/b
37113
37114 tar ufv arc a
37115 echo \"separator\"
37116 tar tf arc | sort || exit 1
37117 )"
37118 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
37119 ( $at_check_trace;
37120 mkdir gnu
37121 (cd gnu
37122 TEST_TAR_FORMAT=gnu
37123 export TEST_TAR_FORMAT
37124 TAR_OPTIONS="-H gnu"
37125 export TAR_OPTIONS
37126 rm -rf *
37127
37128
37129 test -z "`sort < /dev/null 2>&1`" || exit 77
37130
37131 mkdir a
37132 genfile --file a/b
37133
37134 tar cf arc a
37135
37136 echo "separator"
37137
37138 sleep 2
37139 touch a/b
37140
37141 tar ufv arc a
37142 echo "separator"
37143 tar tf arc | sort || exit 1
37144 )
37145 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37146 at_status=$? at_failed=false
37147 $at_check_filter
37148 at_fn_diff_devnull "$at_stderr" || at_failed=:
37149 echo >>"$at_stdout"; $as_echo "separator
37150 a/b
37151 separator
37152 a/
37153 a/b
37154 a/b
37155 " | \
37156   $at_diff - "$at_stdout" || at_failed=:
37157 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
37158 $at_failed && at_fn_log_failure
37159 $at_traceon; }
37160
37161
37162
37163
37164   set +x
37165   $at_times_p && times >"$at_times_file"
37166 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37167 read at_status <"$at_status_file"
37168 #AT_STOP_150
37169 #AT_START_151
37170 at_fn_group_banner 151 'verify.at:25' \
37171   "verify" "                                         " 21
37172 at_xfail=no
37173       test -f $XFAILFILE && at_xfail=yes
37174 (
37175   $as_echo "151. $at_setup_line: testing $at_desc ..."
37176   $at_traceon
37177
37178
37179
37180
37181
37182   { set +x
37183 $as_echo "$at_srcdir/verify.at:28:
37184 mkdir v7
37185 (cd v7
37186 TEST_TAR_FORMAT=v7
37187 export TEST_TAR_FORMAT
37188 TAR_OPTIONS=\"-H v7\"
37189 export TAR_OPTIONS
37190 rm -rf *
37191
37192 touch foo
37193 tar -cvf archive.tar --verify foo
37194 )"
37195 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
37196 ( $at_check_trace;
37197 mkdir v7
37198 (cd v7
37199 TEST_TAR_FORMAT=v7
37200 export TEST_TAR_FORMAT
37201 TAR_OPTIONS="-H v7"
37202 export TAR_OPTIONS
37203 rm -rf *
37204
37205 touch foo
37206 tar -cvf archive.tar --verify foo
37207 )
37208 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37209 at_status=$? at_failed=false
37210 $at_check_filter
37211 at_fn_diff_devnull "$at_stderr" || at_failed=:
37212 echo >>"$at_stdout"; $as_echo "foo
37213 Verify foo
37214 " | \
37215   $at_diff - "$at_stdout" || at_failed=:
37216 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
37217 $at_failed && at_fn_log_failure
37218 $at_traceon; }
37219
37220               { set +x
37221 $as_echo "$at_srcdir/verify.at:28:
37222 mkdir oldgnu
37223 (cd oldgnu
37224 TEST_TAR_FORMAT=oldgnu
37225 export TEST_TAR_FORMAT
37226 TAR_OPTIONS=\"-H oldgnu\"
37227 export TAR_OPTIONS
37228 rm -rf *
37229
37230 touch foo
37231 tar -cvf archive.tar --verify foo
37232 )"
37233 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
37234 ( $at_check_trace;
37235 mkdir oldgnu
37236 (cd oldgnu
37237 TEST_TAR_FORMAT=oldgnu
37238 export TEST_TAR_FORMAT
37239 TAR_OPTIONS="-H oldgnu"
37240 export TAR_OPTIONS
37241 rm -rf *
37242
37243 touch foo
37244 tar -cvf archive.tar --verify foo
37245 )
37246 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37247 at_status=$? at_failed=false
37248 $at_check_filter
37249 at_fn_diff_devnull "$at_stderr" || at_failed=:
37250 echo >>"$at_stdout"; $as_echo "foo
37251 Verify foo
37252 " | \
37253   $at_diff - "$at_stdout" || at_failed=:
37254 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
37255 $at_failed && at_fn_log_failure
37256 $at_traceon; }
37257
37258               { set +x
37259 $as_echo "$at_srcdir/verify.at:28:
37260 mkdir ustar
37261 (cd ustar
37262 TEST_TAR_FORMAT=ustar
37263 export TEST_TAR_FORMAT
37264 TAR_OPTIONS=\"-H ustar\"
37265 export TAR_OPTIONS
37266 rm -rf *
37267
37268 touch foo
37269 tar -cvf archive.tar --verify foo
37270 )"
37271 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
37272 ( $at_check_trace;
37273 mkdir ustar
37274 (cd ustar
37275 TEST_TAR_FORMAT=ustar
37276 export TEST_TAR_FORMAT
37277 TAR_OPTIONS="-H ustar"
37278 export TAR_OPTIONS
37279 rm -rf *
37280
37281 touch foo
37282 tar -cvf archive.tar --verify foo
37283 )
37284 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37285 at_status=$? at_failed=false
37286 $at_check_filter
37287 at_fn_diff_devnull "$at_stderr" || at_failed=:
37288 echo >>"$at_stdout"; $as_echo "foo
37289 Verify foo
37290 " | \
37291   $at_diff - "$at_stdout" || at_failed=:
37292 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
37293 $at_failed && at_fn_log_failure
37294 $at_traceon; }
37295
37296               { set +x
37297 $as_echo "$at_srcdir/verify.at:28:
37298 mkdir posix
37299 (cd posix
37300 TEST_TAR_FORMAT=posix
37301 export TEST_TAR_FORMAT
37302 TAR_OPTIONS=\"-H posix\"
37303 export TAR_OPTIONS
37304 rm -rf *
37305
37306 touch foo
37307 tar -cvf archive.tar --verify foo
37308 )"
37309 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
37310 ( $at_check_trace;
37311 mkdir posix
37312 (cd posix
37313 TEST_TAR_FORMAT=posix
37314 export TEST_TAR_FORMAT
37315 TAR_OPTIONS="-H posix"
37316 export TAR_OPTIONS
37317 rm -rf *
37318
37319 touch foo
37320 tar -cvf archive.tar --verify foo
37321 )
37322 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37323 at_status=$? at_failed=false
37324 $at_check_filter
37325 at_fn_diff_devnull "$at_stderr" || at_failed=:
37326 echo >>"$at_stdout"; $as_echo "foo
37327 Verify foo
37328 " | \
37329   $at_diff - "$at_stdout" || at_failed=:
37330 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
37331 $at_failed && at_fn_log_failure
37332 $at_traceon; }
37333
37334               { set +x
37335 $as_echo "$at_srcdir/verify.at:28:
37336 mkdir gnu
37337 (cd gnu
37338 TEST_TAR_FORMAT=gnu
37339 export TEST_TAR_FORMAT
37340 TAR_OPTIONS=\"-H gnu\"
37341 export TAR_OPTIONS
37342 rm -rf *
37343
37344 touch foo
37345 tar -cvf archive.tar --verify foo
37346 )"
37347 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
37348 ( $at_check_trace;
37349 mkdir gnu
37350 (cd gnu
37351 TEST_TAR_FORMAT=gnu
37352 export TEST_TAR_FORMAT
37353 TAR_OPTIONS="-H gnu"
37354 export TAR_OPTIONS
37355 rm -rf *
37356
37357 touch foo
37358 tar -cvf archive.tar --verify foo
37359 )
37360 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37361 at_status=$? at_failed=false
37362 $at_check_filter
37363 at_fn_diff_devnull "$at_stderr" || at_failed=:
37364 echo >>"$at_stdout"; $as_echo "foo
37365 Verify foo
37366 " | \
37367   $at_diff - "$at_stdout" || at_failed=:
37368 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
37369 $at_failed && at_fn_log_failure
37370 $at_traceon; }
37371
37372
37373
37374
37375   set +x
37376   $at_times_p && times >"$at_times_file"
37377 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37378 read at_status <"$at_status_file"
37379 #AT_STOP_151
37380 #AT_START_152
37381 at_fn_group_banner 152 'volume.at:24' \
37382   "volume" "                                         " 22
37383 at_xfail=no
37384       test -f $XFAILFILE && at_xfail=yes
37385 (
37386   $as_echo "152. $at_setup_line: testing $at_desc ..."
37387   $at_traceon
37388
37389
37390
37391
37392
37393   { set +x
37394 $as_echo "$at_srcdir/volume.at:27:
37395 mkdir gnu
37396 (cd gnu
37397 TEST_TAR_FORMAT=gnu
37398 export TEST_TAR_FORMAT
37399 TAR_OPTIONS=\"-H gnu\"
37400 export TAR_OPTIONS
37401 rm -rf *
37402
37403 tar -cf archive -V label -T /dev/null || exit 1
37404
37405 tar xfV archive label || exit 1
37406 tar xfV archive 'la?el' || exit 1
37407 tar xfV archive 'l*l' || exit 1
37408
37409 echo 1>&2 -----
37410 tar xfV archive lab
37411 test \$? = 2 || exit 1
37412 echo 1>&2 -----
37413 tar xfV archive bel
37414 test \$? = 2 || exit 1
37415 echo 1>&2 -----
37416 tar xfV archive babel
37417 test \$? = 2
37418 )"
37419 at_fn_check_prepare_notrace 'an embedded newline' "volume.at:27"
37420 ( $at_check_trace;
37421 mkdir gnu
37422 (cd gnu
37423 TEST_TAR_FORMAT=gnu
37424 export TEST_TAR_FORMAT
37425 TAR_OPTIONS="-H gnu"
37426 export TAR_OPTIONS
37427 rm -rf *
37428
37429 tar -cf archive -V label -T /dev/null || exit 1
37430
37431 tar xfV archive label || exit 1
37432 tar xfV archive 'la?el' || exit 1
37433 tar xfV archive 'l*l' || exit 1
37434
37435 echo 1>&2 -----
37436 tar xfV archive lab
37437 test $? = 2 || exit 1
37438 echo 1>&2 -----
37439 tar xfV archive bel
37440 test $? = 2 || exit 1
37441 echo 1>&2 -----
37442 tar xfV archive babel
37443 test $? = 2
37444 )
37445 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37446 at_status=$? at_failed=false
37447 $at_check_filter
37448 echo >>"$at_stderr"; $as_echo "-----
37449 tar: Volume 'label' does not match 'lab'
37450 tar: Error is not recoverable: exiting now
37451 -----
37452 tar: Volume 'label' does not match 'bel'
37453 tar: Error is not recoverable: exiting now
37454 -----
37455 tar: Volume 'label' does not match 'babel'
37456 tar: Error is not recoverable: exiting now
37457 " | \
37458   $at_diff - "$at_stderr" || at_failed=:
37459 at_fn_diff_devnull "$at_stdout" || at_failed=:
37460 at_fn_check_status 0 $at_status "$at_srcdir/volume.at:27"
37461 $at_failed && at_fn_log_failure
37462 $at_traceon; }
37463
37464               { set +x
37465 $as_echo "$at_srcdir/volume.at:27:
37466 mkdir oldgnu
37467 (cd oldgnu
37468 TEST_TAR_FORMAT=oldgnu
37469 export TEST_TAR_FORMAT
37470 TAR_OPTIONS=\"-H oldgnu\"
37471 export TAR_OPTIONS
37472 rm -rf *
37473
37474 tar -cf archive -V label -T /dev/null || exit 1
37475
37476 tar xfV archive label || exit 1
37477 tar xfV archive 'la?el' || exit 1
37478 tar xfV archive 'l*l' || exit 1
37479
37480 echo 1>&2 -----
37481 tar xfV archive lab
37482 test \$? = 2 || exit 1
37483 echo 1>&2 -----
37484 tar xfV archive bel
37485 test \$? = 2 || exit 1
37486 echo 1>&2 -----
37487 tar xfV archive babel
37488 test \$? = 2
37489 )"
37490 at_fn_check_prepare_notrace 'an embedded newline' "volume.at:27"
37491 ( $at_check_trace;
37492 mkdir oldgnu
37493 (cd oldgnu
37494 TEST_TAR_FORMAT=oldgnu
37495 export TEST_TAR_FORMAT
37496 TAR_OPTIONS="-H oldgnu"
37497 export TAR_OPTIONS
37498 rm -rf *
37499
37500 tar -cf archive -V label -T /dev/null || exit 1
37501
37502 tar xfV archive label || exit 1
37503 tar xfV archive 'la?el' || exit 1
37504 tar xfV archive 'l*l' || exit 1
37505
37506 echo 1>&2 -----
37507 tar xfV archive lab
37508 test $? = 2 || exit 1
37509 echo 1>&2 -----
37510 tar xfV archive bel
37511 test $? = 2 || exit 1
37512 echo 1>&2 -----
37513 tar xfV archive babel
37514 test $? = 2
37515 )
37516 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37517 at_status=$? at_failed=false
37518 $at_check_filter
37519 echo >>"$at_stderr"; $as_echo "-----
37520 tar: Volume 'label' does not match 'lab'
37521 tar: Error is not recoverable: exiting now
37522 -----
37523 tar: Volume 'label' does not match 'bel'
37524 tar: Error is not recoverable: exiting now
37525 -----
37526 tar: Volume 'label' does not match 'babel'
37527 tar: Error is not recoverable: exiting now
37528 " | \
37529   $at_diff - "$at_stderr" || at_failed=:
37530 at_fn_diff_devnull "$at_stdout" || at_failed=:
37531 at_fn_check_status 0 $at_status "$at_srcdir/volume.at:27"
37532 $at_failed && at_fn_log_failure
37533 $at_traceon; }
37534
37535
37536
37537
37538   set +x
37539   $at_times_p && times >"$at_times_file"
37540 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37541 read at_status <"$at_status_file"
37542 #AT_STOP_152
37543 #AT_START_153
37544 at_fn_group_banner 153 'volsize.at:29' \
37545   "volume header size" "                             " 22
37546 at_xfail=no
37547       test -f $XFAILFILE && at_xfail=yes
37548 (
37549   $as_echo "153. $at_setup_line: testing $at_desc ..."
37550   $at_traceon
37551
37552
37553
37554
37555
37556   { set +x
37557 $as_echo "$at_srcdir/volsize.at:32:
37558 mkdir v7
37559 (cd v7
37560 TEST_TAR_FORMAT=v7
37561 export TEST_TAR_FORMAT
37562 TAR_OPTIONS=\"-H v7\"
37563 export TAR_OPTIONS
37564 rm -rf *
37565
37566
37567 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
37568
37569
37570 test -z \"\$TEST_DATA_DIR\" && exit 77
37571 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
37572
37573 echo Short Listing
37574 tar tf \$TEST_DATA_DIR/abc.tar
37575 echo Verbose Listing
37576 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
37577 echo Extracted directory
37578 tar xf \$TEST_DATA_DIR/abc.tar
37579 find abc|sort
37580 )"
37581 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
37582 ( $at_check_trace;
37583 mkdir v7
37584 (cd v7
37585 TEST_TAR_FORMAT=v7
37586 export TEST_TAR_FORMAT
37587 TAR_OPTIONS="-H v7"
37588 export TAR_OPTIONS
37589 rm -rf *
37590
37591
37592 test -z "`sort < /dev/null 2>&1`" || exit 77
37593
37594
37595 test -z "$TEST_DATA_DIR" && exit 77
37596 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
37597
37598 echo Short Listing
37599 tar tf $TEST_DATA_DIR/abc.tar
37600 echo Verbose Listing
37601 tar --utc -tvf $TEST_DATA_DIR/abc.tar
37602 echo Extracted directory
37603 tar xf $TEST_DATA_DIR/abc.tar
37604 find abc|sort
37605 )
37606 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37607 at_status=$? at_failed=false
37608 $at_check_filter
37609 at_fn_diff_devnull "$at_stderr" || at_failed=:
37610 echo >>"$at_stdout"; $as_echo "Short Listing
37611 abc/not-a-file.gif
37612 abc/CCC
37613 Verbose Listing
37614 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
37615 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
37616 Extracted directory
37617 abc
37618 abc/CCC
37619 " | \
37620   $at_diff - "$at_stdout" || at_failed=:
37621 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
37622 $at_failed && at_fn_log_failure
37623 $at_traceon; }
37624
37625               { set +x
37626 $as_echo "$at_srcdir/volsize.at:32:
37627 mkdir oldgnu
37628 (cd oldgnu
37629 TEST_TAR_FORMAT=oldgnu
37630 export TEST_TAR_FORMAT
37631 TAR_OPTIONS=\"-H oldgnu\"
37632 export TAR_OPTIONS
37633 rm -rf *
37634
37635
37636 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
37637
37638
37639 test -z \"\$TEST_DATA_DIR\" && exit 77
37640 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
37641
37642 echo Short Listing
37643 tar tf \$TEST_DATA_DIR/abc.tar
37644 echo Verbose Listing
37645 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
37646 echo Extracted directory
37647 tar xf \$TEST_DATA_DIR/abc.tar
37648 find abc|sort
37649 )"
37650 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
37651 ( $at_check_trace;
37652 mkdir oldgnu
37653 (cd oldgnu
37654 TEST_TAR_FORMAT=oldgnu
37655 export TEST_TAR_FORMAT
37656 TAR_OPTIONS="-H oldgnu"
37657 export TAR_OPTIONS
37658 rm -rf *
37659
37660
37661 test -z "`sort < /dev/null 2>&1`" || exit 77
37662
37663
37664 test -z "$TEST_DATA_DIR" && exit 77
37665 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
37666
37667 echo Short Listing
37668 tar tf $TEST_DATA_DIR/abc.tar
37669 echo Verbose Listing
37670 tar --utc -tvf $TEST_DATA_DIR/abc.tar
37671 echo Extracted directory
37672 tar xf $TEST_DATA_DIR/abc.tar
37673 find abc|sort
37674 )
37675 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37676 at_status=$? at_failed=false
37677 $at_check_filter
37678 at_fn_diff_devnull "$at_stderr" || at_failed=:
37679 echo >>"$at_stdout"; $as_echo "Short Listing
37680 abc/not-a-file.gif
37681 abc/CCC
37682 Verbose Listing
37683 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
37684 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
37685 Extracted directory
37686 abc
37687 abc/CCC
37688 " | \
37689   $at_diff - "$at_stdout" || at_failed=:
37690 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
37691 $at_failed && at_fn_log_failure
37692 $at_traceon; }
37693
37694               { set +x
37695 $as_echo "$at_srcdir/volsize.at:32:
37696 mkdir ustar
37697 (cd ustar
37698 TEST_TAR_FORMAT=ustar
37699 export TEST_TAR_FORMAT
37700 TAR_OPTIONS=\"-H ustar\"
37701 export TAR_OPTIONS
37702 rm -rf *
37703
37704
37705 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
37706
37707
37708 test -z \"\$TEST_DATA_DIR\" && exit 77
37709 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
37710
37711 echo Short Listing
37712 tar tf \$TEST_DATA_DIR/abc.tar
37713 echo Verbose Listing
37714 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
37715 echo Extracted directory
37716 tar xf \$TEST_DATA_DIR/abc.tar
37717 find abc|sort
37718 )"
37719 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
37720 ( $at_check_trace;
37721 mkdir ustar
37722 (cd ustar
37723 TEST_TAR_FORMAT=ustar
37724 export TEST_TAR_FORMAT
37725 TAR_OPTIONS="-H ustar"
37726 export TAR_OPTIONS
37727 rm -rf *
37728
37729
37730 test -z "`sort < /dev/null 2>&1`" || exit 77
37731
37732
37733 test -z "$TEST_DATA_DIR" && exit 77
37734 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
37735
37736 echo Short Listing
37737 tar tf $TEST_DATA_DIR/abc.tar
37738 echo Verbose Listing
37739 tar --utc -tvf $TEST_DATA_DIR/abc.tar
37740 echo Extracted directory
37741 tar xf $TEST_DATA_DIR/abc.tar
37742 find abc|sort
37743 )
37744 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37745 at_status=$? at_failed=false
37746 $at_check_filter
37747 at_fn_diff_devnull "$at_stderr" || at_failed=:
37748 echo >>"$at_stdout"; $as_echo "Short Listing
37749 abc/not-a-file.gif
37750 abc/CCC
37751 Verbose Listing
37752 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
37753 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
37754 Extracted directory
37755 abc
37756 abc/CCC
37757 " | \
37758   $at_diff - "$at_stdout" || at_failed=:
37759 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
37760 $at_failed && at_fn_log_failure
37761 $at_traceon; }
37762
37763               { set +x
37764 $as_echo "$at_srcdir/volsize.at:32:
37765 mkdir posix
37766 (cd posix
37767 TEST_TAR_FORMAT=posix
37768 export TEST_TAR_FORMAT
37769 TAR_OPTIONS=\"-H posix\"
37770 export TAR_OPTIONS
37771 rm -rf *
37772
37773
37774 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
37775
37776
37777 test -z \"\$TEST_DATA_DIR\" && exit 77
37778 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
37779
37780 echo Short Listing
37781 tar tf \$TEST_DATA_DIR/abc.tar
37782 echo Verbose Listing
37783 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
37784 echo Extracted directory
37785 tar xf \$TEST_DATA_DIR/abc.tar
37786 find abc|sort
37787 )"
37788 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
37789 ( $at_check_trace;
37790 mkdir posix
37791 (cd posix
37792 TEST_TAR_FORMAT=posix
37793 export TEST_TAR_FORMAT
37794 TAR_OPTIONS="-H posix"
37795 export TAR_OPTIONS
37796 rm -rf *
37797
37798
37799 test -z "`sort < /dev/null 2>&1`" || exit 77
37800
37801
37802 test -z "$TEST_DATA_DIR" && exit 77
37803 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
37804
37805 echo Short Listing
37806 tar tf $TEST_DATA_DIR/abc.tar
37807 echo Verbose Listing
37808 tar --utc -tvf $TEST_DATA_DIR/abc.tar
37809 echo Extracted directory
37810 tar xf $TEST_DATA_DIR/abc.tar
37811 find abc|sort
37812 )
37813 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37814 at_status=$? at_failed=false
37815 $at_check_filter
37816 at_fn_diff_devnull "$at_stderr" || at_failed=:
37817 echo >>"$at_stdout"; $as_echo "Short Listing
37818 abc/not-a-file.gif
37819 abc/CCC
37820 Verbose Listing
37821 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
37822 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
37823 Extracted directory
37824 abc
37825 abc/CCC
37826 " | \
37827   $at_diff - "$at_stdout" || at_failed=:
37828 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
37829 $at_failed && at_fn_log_failure
37830 $at_traceon; }
37831
37832               { set +x
37833 $as_echo "$at_srcdir/volsize.at:32:
37834 mkdir gnu
37835 (cd gnu
37836 TEST_TAR_FORMAT=gnu
37837 export TEST_TAR_FORMAT
37838 TAR_OPTIONS=\"-H gnu\"
37839 export TAR_OPTIONS
37840 rm -rf *
37841
37842
37843 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
37844
37845
37846 test -z \"\$TEST_DATA_DIR\" && exit 77
37847 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
37848
37849 echo Short Listing
37850 tar tf \$TEST_DATA_DIR/abc.tar
37851 echo Verbose Listing
37852 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
37853 echo Extracted directory
37854 tar xf \$TEST_DATA_DIR/abc.tar
37855 find abc|sort
37856 )"
37857 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
37858 ( $at_check_trace;
37859 mkdir gnu
37860 (cd gnu
37861 TEST_TAR_FORMAT=gnu
37862 export TEST_TAR_FORMAT
37863 TAR_OPTIONS="-H gnu"
37864 export TAR_OPTIONS
37865 rm -rf *
37866
37867
37868 test -z "`sort < /dev/null 2>&1`" || exit 77
37869
37870
37871 test -z "$TEST_DATA_DIR" && exit 77
37872 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
37873
37874 echo Short Listing
37875 tar tf $TEST_DATA_DIR/abc.tar
37876 echo Verbose Listing
37877 tar --utc -tvf $TEST_DATA_DIR/abc.tar
37878 echo Extracted directory
37879 tar xf $TEST_DATA_DIR/abc.tar
37880 find abc|sort
37881 )
37882 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37883 at_status=$? at_failed=false
37884 $at_check_filter
37885 at_fn_diff_devnull "$at_stderr" || at_failed=:
37886 echo >>"$at_stdout"; $as_echo "Short Listing
37887 abc/not-a-file.gif
37888 abc/CCC
37889 Verbose Listing
37890 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
37891 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
37892 Extracted directory
37893 abc
37894 abc/CCC
37895 " | \
37896   $at_diff - "$at_stdout" || at_failed=:
37897 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
37898 $at_failed && at_fn_log_failure
37899 $at_traceon; }
37900
37901
37902
37903
37904   set +x
37905   $at_times_p && times >"$at_times_file"
37906 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37907 read at_status <"$at_status_file"
37908 #AT_STOP_153
37909 #AT_START_154
37910 at_fn_group_banner 154 'comprec.at:22' \
37911   "compressed format recognition" "                  " 23
37912 at_xfail=no
37913       test -f $XFAILFILE && at_xfail=yes
37914 (
37915   $as_echo "154. $at_setup_line: testing $at_desc ..."
37916   $at_traceon
37917
37918
37919
37920
37921
37922
37923   { set +x
37924 $as_echo "$at_srcdir/comprec.at:26:
37925 mkdir v7
37926 (cd v7
37927 TEST_TAR_FORMAT=v7
37928 export TEST_TAR_FORMAT
37929 TAR_OPTIONS=\"-H v7\"
37930 export TAR_OPTIONS
37931 rm -rf *
37932
37933
37934 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
37935
37936 genfile --length 10240 --file file1
37937 echo \"separator\"
37938 tar cfz archive file1
37939 echo \"separator\"
37940 mv file1 orig
37941 tar xfv archive --warning=no-timestamp
37942 cmp orig file1
37943 )"
37944 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
37945 ( $at_check_trace;
37946 mkdir v7
37947 (cd v7
37948 TEST_TAR_FORMAT=v7
37949 export TEST_TAR_FORMAT
37950 TAR_OPTIONS="-H v7"
37951 export TAR_OPTIONS
37952 rm -rf *
37953
37954
37955 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
37956
37957 genfile --length 10240 --file file1
37958 echo "separator"
37959 tar cfz archive file1
37960 echo "separator"
37961 mv file1 orig
37962 tar xfv archive --warning=no-timestamp
37963 cmp orig file1
37964 )
37965 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37966 at_status=$? at_failed=false
37967 $at_check_filter
37968 at_fn_diff_devnull "$at_stderr" || at_failed=:
37969 echo >>"$at_stdout"; $as_echo "separator
37970 separator
37971 file1
37972 " | \
37973   $at_diff - "$at_stdout" || at_failed=:
37974 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
37975 $at_failed && at_fn_log_failure
37976 $at_traceon; }
37977
37978               { set +x
37979 $as_echo "$at_srcdir/comprec.at:26:
37980 mkdir oldgnu
37981 (cd oldgnu
37982 TEST_TAR_FORMAT=oldgnu
37983 export TEST_TAR_FORMAT
37984 TAR_OPTIONS=\"-H oldgnu\"
37985 export TAR_OPTIONS
37986 rm -rf *
37987
37988
37989 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
37990
37991 genfile --length 10240 --file file1
37992 echo \"separator\"
37993 tar cfz archive file1
37994 echo \"separator\"
37995 mv file1 orig
37996 tar xfv archive --warning=no-timestamp
37997 cmp orig file1
37998 )"
37999 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
38000 ( $at_check_trace;
38001 mkdir oldgnu
38002 (cd oldgnu
38003 TEST_TAR_FORMAT=oldgnu
38004 export TEST_TAR_FORMAT
38005 TAR_OPTIONS="-H oldgnu"
38006 export TAR_OPTIONS
38007 rm -rf *
38008
38009
38010 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
38011
38012 genfile --length 10240 --file file1
38013 echo "separator"
38014 tar cfz archive file1
38015 echo "separator"
38016 mv file1 orig
38017 tar xfv archive --warning=no-timestamp
38018 cmp orig file1
38019 )
38020 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38021 at_status=$? at_failed=false
38022 $at_check_filter
38023 at_fn_diff_devnull "$at_stderr" || at_failed=:
38024 echo >>"$at_stdout"; $as_echo "separator
38025 separator
38026 file1
38027 " | \
38028   $at_diff - "$at_stdout" || at_failed=:
38029 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
38030 $at_failed && at_fn_log_failure
38031 $at_traceon; }
38032
38033               { set +x
38034 $as_echo "$at_srcdir/comprec.at:26:
38035 mkdir ustar
38036 (cd ustar
38037 TEST_TAR_FORMAT=ustar
38038 export TEST_TAR_FORMAT
38039 TAR_OPTIONS=\"-H ustar\"
38040 export TAR_OPTIONS
38041 rm -rf *
38042
38043
38044 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
38045
38046 genfile --length 10240 --file file1
38047 echo \"separator\"
38048 tar cfz archive file1
38049 echo \"separator\"
38050 mv file1 orig
38051 tar xfv archive --warning=no-timestamp
38052 cmp orig file1
38053 )"
38054 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
38055 ( $at_check_trace;
38056 mkdir ustar
38057 (cd ustar
38058 TEST_TAR_FORMAT=ustar
38059 export TEST_TAR_FORMAT
38060 TAR_OPTIONS="-H ustar"
38061 export TAR_OPTIONS
38062 rm -rf *
38063
38064
38065 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
38066
38067 genfile --length 10240 --file file1
38068 echo "separator"
38069 tar cfz archive file1
38070 echo "separator"
38071 mv file1 orig
38072 tar xfv archive --warning=no-timestamp
38073 cmp orig file1
38074 )
38075 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38076 at_status=$? at_failed=false
38077 $at_check_filter
38078 at_fn_diff_devnull "$at_stderr" || at_failed=:
38079 echo >>"$at_stdout"; $as_echo "separator
38080 separator
38081 file1
38082 " | \
38083   $at_diff - "$at_stdout" || at_failed=:
38084 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
38085 $at_failed && at_fn_log_failure
38086 $at_traceon; }
38087
38088               { set +x
38089 $as_echo "$at_srcdir/comprec.at:26:
38090 mkdir posix
38091 (cd posix
38092 TEST_TAR_FORMAT=posix
38093 export TEST_TAR_FORMAT
38094 TAR_OPTIONS=\"-H posix\"
38095 export TAR_OPTIONS
38096 rm -rf *
38097
38098
38099 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
38100
38101 genfile --length 10240 --file file1
38102 echo \"separator\"
38103 tar cfz archive file1
38104 echo \"separator\"
38105 mv file1 orig
38106 tar xfv archive --warning=no-timestamp
38107 cmp orig file1
38108 )"
38109 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
38110 ( $at_check_trace;
38111 mkdir posix
38112 (cd posix
38113 TEST_TAR_FORMAT=posix
38114 export TEST_TAR_FORMAT
38115 TAR_OPTIONS="-H posix"
38116 export TAR_OPTIONS
38117 rm -rf *
38118
38119
38120 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
38121
38122 genfile --length 10240 --file file1
38123 echo "separator"
38124 tar cfz archive file1
38125 echo "separator"
38126 mv file1 orig
38127 tar xfv archive --warning=no-timestamp
38128 cmp orig file1
38129 )
38130 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38131 at_status=$? at_failed=false
38132 $at_check_filter
38133 at_fn_diff_devnull "$at_stderr" || at_failed=:
38134 echo >>"$at_stdout"; $as_echo "separator
38135 separator
38136 file1
38137 " | \
38138   $at_diff - "$at_stdout" || at_failed=:
38139 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
38140 $at_failed && at_fn_log_failure
38141 $at_traceon; }
38142
38143               { set +x
38144 $as_echo "$at_srcdir/comprec.at:26:
38145 mkdir gnu
38146 (cd gnu
38147 TEST_TAR_FORMAT=gnu
38148 export TEST_TAR_FORMAT
38149 TAR_OPTIONS=\"-H gnu\"
38150 export TAR_OPTIONS
38151 rm -rf *
38152
38153
38154 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
38155
38156 genfile --length 10240 --file file1
38157 echo \"separator\"
38158 tar cfz archive file1
38159 echo \"separator\"
38160 mv file1 orig
38161 tar xfv archive --warning=no-timestamp
38162 cmp orig file1
38163 )"
38164 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:26"
38165 ( $at_check_trace;
38166 mkdir gnu
38167 (cd gnu
38168 TEST_TAR_FORMAT=gnu
38169 export TEST_TAR_FORMAT
38170 TAR_OPTIONS="-H gnu"
38171 export TAR_OPTIONS
38172 rm -rf *
38173
38174
38175 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
38176
38177 genfile --length 10240 --file file1
38178 echo "separator"
38179 tar cfz archive file1
38180 echo "separator"
38181 mv file1 orig
38182 tar xfv archive --warning=no-timestamp
38183 cmp orig file1
38184 )
38185 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38186 at_status=$? at_failed=false
38187 $at_check_filter
38188 at_fn_diff_devnull "$at_stderr" || at_failed=:
38189 echo >>"$at_stdout"; $as_echo "separator
38190 separator
38191 file1
38192 " | \
38193   $at_diff - "$at_stdout" || at_failed=:
38194 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:26"
38195 $at_failed && at_fn_log_failure
38196 $at_traceon; }
38197
38198
38199
38200
38201   set +x
38202   $at_times_p && times >"$at_times_file"
38203 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38204 read at_status <"$at_status_file"
38205 #AT_STOP_154
38206 #AT_START_155
38207 at_fn_group_banner 155 'shortfile.at:26' \
38208   "short input files" "                              " 23
38209 at_xfail=no
38210       test -f $XFAILFILE && at_xfail=yes
38211 (
38212   $as_echo "155. $at_setup_line: testing $at_desc ..."
38213   $at_traceon
38214
38215
38216
38217
38218
38219   { set +x
38220 $as_echo "$at_srcdir/shortfile.at:29:
38221 mkdir gnu
38222 (cd gnu
38223 TEST_TAR_FORMAT=gnu
38224 export TEST_TAR_FORMAT
38225 TAR_OPTIONS=\"-H gnu\"
38226 export TAR_OPTIONS
38227 rm -rf *
38228
38229 genfile --length 511 --file foo || exit 5
38230 tar tf foo
38231 )"
38232 at_fn_check_prepare_notrace 'an embedded newline' "shortfile.at:29"
38233 ( $at_check_trace;
38234 mkdir gnu
38235 (cd gnu
38236 TEST_TAR_FORMAT=gnu
38237 export TEST_TAR_FORMAT
38238 TAR_OPTIONS="-H gnu"
38239 export TAR_OPTIONS
38240 rm -rf *
38241
38242 genfile --length 511 --file foo || exit 5
38243 tar tf foo
38244 )
38245 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38246 at_status=$? at_failed=false
38247 $at_check_filter
38248 echo >>"$at_stderr"; $as_echo "tar: This does not look like a tar archive
38249 tar: Exiting with failure status due to previous errors
38250 " | \
38251   $at_diff - "$at_stderr" || at_failed=:
38252 at_fn_diff_devnull "$at_stdout" || at_failed=:
38253 at_fn_check_status 2 $at_status "$at_srcdir/shortfile.at:29"
38254 $at_failed && at_fn_log_failure
38255 $at_traceon; }
38256
38257
38258
38259
38260   set +x
38261   $at_times_p && times >"$at_times_file"
38262 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38263 read at_status <"$at_status_file"
38264 #AT_STOP_155
38265 #AT_START_156
38266 at_fn_group_banner 156 'shortupd.at:31' \
38267   "updating short archives" "                        " 23
38268 at_xfail=no
38269       test -f $XFAILFILE && at_xfail=yes
38270 (
38271   $as_echo "156. $at_setup_line: testing $at_desc ..."
38272   $at_traceon
38273
38274
38275
38276
38277
38278   { set +x
38279 $as_echo "$at_srcdir/shortupd.at:34:
38280 mkdir v7
38281 (cd v7
38282 TEST_TAR_FORMAT=v7
38283 export TEST_TAR_FORMAT
38284 TAR_OPTIONS=\"-H v7\"
38285 export TAR_OPTIONS
38286 rm -rf *
38287
38288 touch foo
38289 tar uf archive foo
38290 )"
38291 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
38292 ( $at_check_trace;
38293 mkdir v7
38294 (cd v7
38295 TEST_TAR_FORMAT=v7
38296 export TEST_TAR_FORMAT
38297 TAR_OPTIONS="-H v7"
38298 export TAR_OPTIONS
38299 rm -rf *
38300
38301 touch foo
38302 tar uf archive foo
38303 )
38304 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38305 at_status=$? at_failed=false
38306 $at_check_filter
38307 at_fn_diff_devnull "$at_stderr" || at_failed=:
38308 at_fn_diff_devnull "$at_stdout" || at_failed=:
38309 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
38310 $at_failed && at_fn_log_failure
38311 $at_traceon; }
38312
38313               { set +x
38314 $as_echo "$at_srcdir/shortupd.at:34:
38315 mkdir oldgnu
38316 (cd oldgnu
38317 TEST_TAR_FORMAT=oldgnu
38318 export TEST_TAR_FORMAT
38319 TAR_OPTIONS=\"-H oldgnu\"
38320 export TAR_OPTIONS
38321 rm -rf *
38322
38323 touch foo
38324 tar uf archive foo
38325 )"
38326 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
38327 ( $at_check_trace;
38328 mkdir oldgnu
38329 (cd oldgnu
38330 TEST_TAR_FORMAT=oldgnu
38331 export TEST_TAR_FORMAT
38332 TAR_OPTIONS="-H oldgnu"
38333 export TAR_OPTIONS
38334 rm -rf *
38335
38336 touch foo
38337 tar uf archive foo
38338 )
38339 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38340 at_status=$? at_failed=false
38341 $at_check_filter
38342 at_fn_diff_devnull "$at_stderr" || at_failed=:
38343 at_fn_diff_devnull "$at_stdout" || at_failed=:
38344 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
38345 $at_failed && at_fn_log_failure
38346 $at_traceon; }
38347
38348               { set +x
38349 $as_echo "$at_srcdir/shortupd.at:34:
38350 mkdir ustar
38351 (cd ustar
38352 TEST_TAR_FORMAT=ustar
38353 export TEST_TAR_FORMAT
38354 TAR_OPTIONS=\"-H ustar\"
38355 export TAR_OPTIONS
38356 rm -rf *
38357
38358 touch foo
38359 tar uf archive foo
38360 )"
38361 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
38362 ( $at_check_trace;
38363 mkdir ustar
38364 (cd ustar
38365 TEST_TAR_FORMAT=ustar
38366 export TEST_TAR_FORMAT
38367 TAR_OPTIONS="-H ustar"
38368 export TAR_OPTIONS
38369 rm -rf *
38370
38371 touch foo
38372 tar uf archive foo
38373 )
38374 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38375 at_status=$? at_failed=false
38376 $at_check_filter
38377 at_fn_diff_devnull "$at_stderr" || at_failed=:
38378 at_fn_diff_devnull "$at_stdout" || at_failed=:
38379 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
38380 $at_failed && at_fn_log_failure
38381 $at_traceon; }
38382
38383               { set +x
38384 $as_echo "$at_srcdir/shortupd.at:34:
38385 mkdir posix
38386 (cd posix
38387 TEST_TAR_FORMAT=posix
38388 export TEST_TAR_FORMAT
38389 TAR_OPTIONS=\"-H posix\"
38390 export TAR_OPTIONS
38391 rm -rf *
38392
38393 touch foo
38394 tar uf archive foo
38395 )"
38396 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
38397 ( $at_check_trace;
38398 mkdir posix
38399 (cd posix
38400 TEST_TAR_FORMAT=posix
38401 export TEST_TAR_FORMAT
38402 TAR_OPTIONS="-H posix"
38403 export TAR_OPTIONS
38404 rm -rf *
38405
38406 touch foo
38407 tar uf archive foo
38408 )
38409 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38410 at_status=$? at_failed=false
38411 $at_check_filter
38412 at_fn_diff_devnull "$at_stderr" || at_failed=:
38413 at_fn_diff_devnull "$at_stdout" || at_failed=:
38414 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
38415 $at_failed && at_fn_log_failure
38416 $at_traceon; }
38417
38418               { set +x
38419 $as_echo "$at_srcdir/shortupd.at:34:
38420 mkdir gnu
38421 (cd gnu
38422 TEST_TAR_FORMAT=gnu
38423 export TEST_TAR_FORMAT
38424 TAR_OPTIONS=\"-H gnu\"
38425 export TAR_OPTIONS
38426 rm -rf *
38427
38428 touch foo
38429 tar uf archive foo
38430 )"
38431 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
38432 ( $at_check_trace;
38433 mkdir gnu
38434 (cd gnu
38435 TEST_TAR_FORMAT=gnu
38436 export TEST_TAR_FORMAT
38437 TAR_OPTIONS="-H gnu"
38438 export TAR_OPTIONS
38439 rm -rf *
38440
38441 touch foo
38442 tar uf archive foo
38443 )
38444 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38445 at_status=$? at_failed=false
38446 $at_check_filter
38447 at_fn_diff_devnull "$at_stderr" || at_failed=:
38448 at_fn_diff_devnull "$at_stdout" || at_failed=:
38449 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
38450 $at_failed && at_fn_log_failure
38451 $at_traceon; }
38452
38453
38454
38455
38456   set +x
38457   $at_times_p && times >"$at_times_file"
38458 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38459 read at_status <"$at_status_file"
38460 #AT_STOP_156
38461 #AT_START_157
38462 at_fn_group_banner 157 'truncate.at:29' \
38463   "truncate" "                                       " 23
38464 at_xfail=no
38465       test -f $XFAILFILE && at_xfail=yes
38466 (
38467   $as_echo "157. $at_setup_line: testing $at_desc ..."
38468   $at_traceon
38469
38470
38471
38472
38473
38474   { set +x
38475 $as_echo "$at_srcdir/truncate.at:32:
38476 mkdir v7
38477 (cd v7
38478 TEST_TAR_FORMAT=v7
38479 export TEST_TAR_FORMAT
38480 TAR_OPTIONS=\"-H v7\"
38481 export TAR_OPTIONS
38482 rm -rf *
38483
38484 genfile --file foo --length 200k
38485 genfile --file baz
38486 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38487 echo Exit status: \$?
38488 echo separator
38489 genfile --file foo --seek 195k --length 5k --pattern=zeros
38490 tar dvf bar)"
38491 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
38492 ( $at_check_trace;
38493 mkdir v7
38494 (cd v7
38495 TEST_TAR_FORMAT=v7
38496 export TEST_TAR_FORMAT
38497 TAR_OPTIONS="-H v7"
38498 export TAR_OPTIONS
38499 rm -rf *
38500
38501 genfile --file foo --length 200k
38502 genfile --file baz
38503 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38504 echo Exit status: $?
38505 echo separator
38506 genfile --file foo --seek 195k --length 5k --pattern=zeros
38507 tar dvf bar)
38508 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38509 at_status=$? at_failed=false
38510 $at_check_filter
38511 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
38512 " | \
38513   $at_diff - "$at_stderr" || at_failed=:
38514 echo >>"$at_stdout"; $as_echo "foo
38515 baz
38516 Exit status: 1
38517 separator
38518 foo
38519 foo: Mod time differs
38520 baz
38521 " | \
38522   $at_diff - "$at_stdout" || at_failed=:
38523 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
38524 $at_failed && at_fn_log_failure
38525 $at_traceon; }
38526
38527               { set +x
38528 $as_echo "$at_srcdir/truncate.at:32:
38529 mkdir oldgnu
38530 (cd oldgnu
38531 TEST_TAR_FORMAT=oldgnu
38532 export TEST_TAR_FORMAT
38533 TAR_OPTIONS=\"-H oldgnu\"
38534 export TAR_OPTIONS
38535 rm -rf *
38536
38537 genfile --file foo --length 200k
38538 genfile --file baz
38539 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38540 echo Exit status: \$?
38541 echo separator
38542 genfile --file foo --seek 195k --length 5k --pattern=zeros
38543 tar dvf bar)"
38544 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
38545 ( $at_check_trace;
38546 mkdir oldgnu
38547 (cd oldgnu
38548 TEST_TAR_FORMAT=oldgnu
38549 export TEST_TAR_FORMAT
38550 TAR_OPTIONS="-H oldgnu"
38551 export TAR_OPTIONS
38552 rm -rf *
38553
38554 genfile --file foo --length 200k
38555 genfile --file baz
38556 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38557 echo Exit status: $?
38558 echo separator
38559 genfile --file foo --seek 195k --length 5k --pattern=zeros
38560 tar dvf bar)
38561 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38562 at_status=$? at_failed=false
38563 $at_check_filter
38564 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
38565 " | \
38566   $at_diff - "$at_stderr" || at_failed=:
38567 echo >>"$at_stdout"; $as_echo "foo
38568 baz
38569 Exit status: 1
38570 separator
38571 foo
38572 foo: Mod time differs
38573 baz
38574 " | \
38575   $at_diff - "$at_stdout" || at_failed=:
38576 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
38577 $at_failed && at_fn_log_failure
38578 $at_traceon; }
38579
38580               { set +x
38581 $as_echo "$at_srcdir/truncate.at:32:
38582 mkdir ustar
38583 (cd ustar
38584 TEST_TAR_FORMAT=ustar
38585 export TEST_TAR_FORMAT
38586 TAR_OPTIONS=\"-H ustar\"
38587 export TAR_OPTIONS
38588 rm -rf *
38589
38590 genfile --file foo --length 200k
38591 genfile --file baz
38592 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38593 echo Exit status: \$?
38594 echo separator
38595 genfile --file foo --seek 195k --length 5k --pattern=zeros
38596 tar dvf bar)"
38597 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
38598 ( $at_check_trace;
38599 mkdir ustar
38600 (cd ustar
38601 TEST_TAR_FORMAT=ustar
38602 export TEST_TAR_FORMAT
38603 TAR_OPTIONS="-H ustar"
38604 export TAR_OPTIONS
38605 rm -rf *
38606
38607 genfile --file foo --length 200k
38608 genfile --file baz
38609 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38610 echo Exit status: $?
38611 echo separator
38612 genfile --file foo --seek 195k --length 5k --pattern=zeros
38613 tar dvf bar)
38614 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38615 at_status=$? at_failed=false
38616 $at_check_filter
38617 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
38618 " | \
38619   $at_diff - "$at_stderr" || at_failed=:
38620 echo >>"$at_stdout"; $as_echo "foo
38621 baz
38622 Exit status: 1
38623 separator
38624 foo
38625 foo: Mod time differs
38626 baz
38627 " | \
38628   $at_diff - "$at_stdout" || at_failed=:
38629 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
38630 $at_failed && at_fn_log_failure
38631 $at_traceon; }
38632
38633               { set +x
38634 $as_echo "$at_srcdir/truncate.at:32:
38635 mkdir posix
38636 (cd posix
38637 TEST_TAR_FORMAT=posix
38638 export TEST_TAR_FORMAT
38639 TAR_OPTIONS=\"-H posix\"
38640 export TAR_OPTIONS
38641 rm -rf *
38642
38643 genfile --file foo --length 200k
38644 genfile --file baz
38645 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38646 echo Exit status: \$?
38647 echo separator
38648 genfile --file foo --seek 195k --length 5k --pattern=zeros
38649 tar dvf bar)"
38650 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
38651 ( $at_check_trace;
38652 mkdir posix
38653 (cd posix
38654 TEST_TAR_FORMAT=posix
38655 export TEST_TAR_FORMAT
38656 TAR_OPTIONS="-H posix"
38657 export TAR_OPTIONS
38658 rm -rf *
38659
38660 genfile --file foo --length 200k
38661 genfile --file baz
38662 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38663 echo Exit status: $?
38664 echo separator
38665 genfile --file foo --seek 195k --length 5k --pattern=zeros
38666 tar dvf bar)
38667 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38668 at_status=$? at_failed=false
38669 $at_check_filter
38670 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
38671 " | \
38672   $at_diff - "$at_stderr" || at_failed=:
38673 echo >>"$at_stdout"; $as_echo "foo
38674 baz
38675 Exit status: 1
38676 separator
38677 foo
38678 foo: Mod time differs
38679 baz
38680 " | \
38681   $at_diff - "$at_stdout" || at_failed=:
38682 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
38683 $at_failed && at_fn_log_failure
38684 $at_traceon; }
38685
38686               { set +x
38687 $as_echo "$at_srcdir/truncate.at:32:
38688 mkdir gnu
38689 (cd gnu
38690 TEST_TAR_FORMAT=gnu
38691 export TEST_TAR_FORMAT
38692 TAR_OPTIONS=\"-H gnu\"
38693 export TAR_OPTIONS
38694 rm -rf *
38695
38696 genfile --file foo --length 200k
38697 genfile --file baz
38698 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38699 echo Exit status: \$?
38700 echo separator
38701 genfile --file foo --seek 195k --length 5k --pattern=zeros
38702 tar dvf bar)"
38703 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
38704 ( $at_check_trace;
38705 mkdir gnu
38706 (cd gnu
38707 TEST_TAR_FORMAT=gnu
38708 export TEST_TAR_FORMAT
38709 TAR_OPTIONS="-H gnu"
38710 export TAR_OPTIONS
38711 rm -rf *
38712
38713 genfile --file foo --length 200k
38714 genfile --file baz
38715 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
38716 echo Exit status: $?
38717 echo separator
38718 genfile --file foo --seek 195k --length 5k --pattern=zeros
38719 tar dvf bar)
38720 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38721 at_status=$? at_failed=false
38722 $at_check_filter
38723 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
38724 " | \
38725   $at_diff - "$at_stderr" || at_failed=:
38726 echo >>"$at_stdout"; $as_echo "foo
38727 baz
38728 Exit status: 1
38729 separator
38730 foo
38731 foo: Mod time differs
38732 baz
38733 " | \
38734   $at_diff - "$at_stdout" || at_failed=:
38735 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
38736 $at_failed && at_fn_log_failure
38737 $at_traceon; }
38738
38739
38740
38741
38742   set +x
38743   $at_times_p && times >"$at_times_file"
38744 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38745 read at_status <"$at_status_file"
38746 #AT_STOP_157
38747 #AT_START_158
38748 at_fn_group_banner 158 'grow.at:24' \
38749   "grow" "                                           " 23
38750 at_xfail=no
38751       test -f $XFAILFILE && at_xfail=yes
38752 (
38753   $as_echo "158. $at_setup_line: testing $at_desc ..."
38754   $at_traceon
38755
38756
38757
38758
38759
38760   { set +x
38761 $as_echo "$at_srcdir/grow.at:27:
38762 mkdir v7
38763 (cd v7
38764 TEST_TAR_FORMAT=v7
38765 export TEST_TAR_FORMAT
38766 TAR_OPTIONS=\"-H v7\"
38767 export TAR_OPTIONS
38768 rm -rf *
38769
38770 genfile --file foo --length 50000k
38771 genfile --file baz
38772 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38773 )"
38774 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
38775 ( $at_check_trace;
38776 mkdir v7
38777 (cd v7
38778 TEST_TAR_FORMAT=v7
38779 export TEST_TAR_FORMAT
38780 TAR_OPTIONS="-H v7"
38781 export TAR_OPTIONS
38782 rm -rf *
38783
38784 genfile --file foo --length 50000k
38785 genfile --file baz
38786 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38787 )
38788 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38789 at_status=$? at_failed=false
38790 $at_check_filter
38791 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
38792 " | \
38793   $at_diff - "$at_stderr" || at_failed=:
38794 echo >>"$at_stdout"; $as_echo "foo
38795 baz
38796 " | \
38797   $at_diff - "$at_stdout" || at_failed=:
38798 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
38799 $at_failed && at_fn_log_failure
38800 $at_traceon; }
38801
38802               { set +x
38803 $as_echo "$at_srcdir/grow.at:27:
38804 mkdir oldgnu
38805 (cd oldgnu
38806 TEST_TAR_FORMAT=oldgnu
38807 export TEST_TAR_FORMAT
38808 TAR_OPTIONS=\"-H oldgnu\"
38809 export TAR_OPTIONS
38810 rm -rf *
38811
38812 genfile --file foo --length 50000k
38813 genfile --file baz
38814 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38815 )"
38816 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
38817 ( $at_check_trace;
38818 mkdir oldgnu
38819 (cd oldgnu
38820 TEST_TAR_FORMAT=oldgnu
38821 export TEST_TAR_FORMAT
38822 TAR_OPTIONS="-H oldgnu"
38823 export TAR_OPTIONS
38824 rm -rf *
38825
38826 genfile --file foo --length 50000k
38827 genfile --file baz
38828 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38829 )
38830 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38831 at_status=$? at_failed=false
38832 $at_check_filter
38833 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
38834 " | \
38835   $at_diff - "$at_stderr" || at_failed=:
38836 echo >>"$at_stdout"; $as_echo "foo
38837 baz
38838 " | \
38839   $at_diff - "$at_stdout" || at_failed=:
38840 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
38841 $at_failed && at_fn_log_failure
38842 $at_traceon; }
38843
38844               { set +x
38845 $as_echo "$at_srcdir/grow.at:27:
38846 mkdir ustar
38847 (cd ustar
38848 TEST_TAR_FORMAT=ustar
38849 export TEST_TAR_FORMAT
38850 TAR_OPTIONS=\"-H ustar\"
38851 export TAR_OPTIONS
38852 rm -rf *
38853
38854 genfile --file foo --length 50000k
38855 genfile --file baz
38856 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38857 )"
38858 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
38859 ( $at_check_trace;
38860 mkdir ustar
38861 (cd ustar
38862 TEST_TAR_FORMAT=ustar
38863 export TEST_TAR_FORMAT
38864 TAR_OPTIONS="-H ustar"
38865 export TAR_OPTIONS
38866 rm -rf *
38867
38868 genfile --file foo --length 50000k
38869 genfile --file baz
38870 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38871 )
38872 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38873 at_status=$? at_failed=false
38874 $at_check_filter
38875 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
38876 " | \
38877   $at_diff - "$at_stderr" || at_failed=:
38878 echo >>"$at_stdout"; $as_echo "foo
38879 baz
38880 " | \
38881   $at_diff - "$at_stdout" || at_failed=:
38882 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
38883 $at_failed && at_fn_log_failure
38884 $at_traceon; }
38885
38886               { set +x
38887 $as_echo "$at_srcdir/grow.at:27:
38888 mkdir posix
38889 (cd posix
38890 TEST_TAR_FORMAT=posix
38891 export TEST_TAR_FORMAT
38892 TAR_OPTIONS=\"-H posix\"
38893 export TAR_OPTIONS
38894 rm -rf *
38895
38896 genfile --file foo --length 50000k
38897 genfile --file baz
38898 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38899 )"
38900 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
38901 ( $at_check_trace;
38902 mkdir posix
38903 (cd posix
38904 TEST_TAR_FORMAT=posix
38905 export TEST_TAR_FORMAT
38906 TAR_OPTIONS="-H posix"
38907 export TAR_OPTIONS
38908 rm -rf *
38909
38910 genfile --file foo --length 50000k
38911 genfile --file baz
38912 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38913 )
38914 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38915 at_status=$? at_failed=false
38916 $at_check_filter
38917 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
38918 " | \
38919   $at_diff - "$at_stderr" || at_failed=:
38920 echo >>"$at_stdout"; $as_echo "foo
38921 baz
38922 " | \
38923   $at_diff - "$at_stdout" || at_failed=:
38924 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
38925 $at_failed && at_fn_log_failure
38926 $at_traceon; }
38927
38928               { set +x
38929 $as_echo "$at_srcdir/grow.at:27:
38930 mkdir gnu
38931 (cd gnu
38932 TEST_TAR_FORMAT=gnu
38933 export TEST_TAR_FORMAT
38934 TAR_OPTIONS=\"-H gnu\"
38935 export TAR_OPTIONS
38936 rm -rf *
38937
38938 genfile --file foo --length 50000k
38939 genfile --file baz
38940 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38941 )"
38942 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
38943 ( $at_check_trace;
38944 mkdir gnu
38945 (cd gnu
38946 TEST_TAR_FORMAT=gnu
38947 export TEST_TAR_FORMAT
38948 TAR_OPTIONS="-H gnu"
38949 export TAR_OPTIONS
38950 rm -rf *
38951
38952 genfile --file foo --length 50000k
38953 genfile --file baz
38954 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
38955 )
38956 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38957 at_status=$? at_failed=false
38958 $at_check_filter
38959 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
38960 " | \
38961   $at_diff - "$at_stderr" || at_failed=:
38962 echo >>"$at_stdout"; $as_echo "foo
38963 baz
38964 " | \
38965   $at_diff - "$at_stdout" || at_failed=:
38966 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
38967 $at_failed && at_fn_log_failure
38968 $at_traceon; }
38969
38970
38971
38972
38973   set +x
38974   $at_times_p && times >"$at_times_file"
38975 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38976 read at_status <"$at_status_file"
38977 #AT_STOP_158
38978 #AT_START_159
38979 at_fn_group_banner 159 'sigpipe.at:21' \
38980   "sigpipe handling" "                               " 23
38981 at_xfail=no
38982 (
38983   $as_echo "159. $at_setup_line: testing $at_desc ..."
38984   $at_traceon
38985
38986
38987
38988 # Description: Tar 1.23 ignored sigpipe which lead to spurious "write
38989 # error" diagnostics when piping output to another programs.
38990 # Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
38991 # References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html
38992 #             <20100319184141.GC30047@wo.int.altlinux.org>
38993
38994 { set +x
38995 $as_echo "$at_srcdir/sigpipe.at:30:
38996
38997 case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
38998 ?*) exit 77;;
38999 esac
39000
39001
39002 genfile --length 2048 --file first
39003 genfile --length 2048 --file second
39004 genfile --length 2049 --file third
39005
39006 tar cf archive first second third
39007
39008 # Discard diagnostics that some shells generate about broken pipes.
39009 (tar tf archive 2>&3 | :) 3>&2 2>/dev/null
39010 "
39011 at_fn_check_prepare_notrace 'a `...` command substitution' "sigpipe.at:30"
39012 ( $at_check_trace;
39013
39014 case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
39015 ?*) exit 77;;
39016 esac
39017
39018
39019 genfile --length 2048 --file first
39020 genfile --length 2048 --file second
39021 genfile --length 2049 --file third
39022
39023 tar cf archive first second third
39024
39025 # Discard diagnostics that some shells generate about broken pipes.
39026 (tar tf archive 2>&3 | :) 3>&2 2>/dev/null
39027
39028 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39029 at_status=$? at_failed=false
39030 $at_check_filter
39031 at_fn_diff_devnull "$at_stderr" || at_failed=:
39032 at_fn_diff_devnull "$at_stdout" || at_failed=:
39033 at_fn_check_status 0 $at_status "$at_srcdir/sigpipe.at:30"
39034 $at_failed && at_fn_log_failure
39035 $at_traceon; }
39036
39037
39038   set +x
39039   $at_times_p && times >"$at_times_file"
39040 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39041 read at_status <"$at_status_file"
39042 #AT_STOP_159
39043 #AT_START_160
39044 at_fn_group_banner 160 'comperr.at:18' \
39045   "compressor program failure" "                     " 23
39046 at_xfail=no
39047       test -f $XFAILFILE && at_xfail=yes
39048 (
39049   $as_echo "160. $at_setup_line: testing $at_desc ..."
39050   $at_traceon
39051
39052
39053
39054 # Description: If the --use-compress-program fails, then it is unsafe
39055 # to assume that the created archive is OK.  Tar should fail with a
39056 # prominent error message.
39057 # Reported by: Ole Tange <tange@gnu.org>
39058 # References: <CA+4vN7wLZ-+LK1t7WMkM_b9f3mV9JTnSuPamPn2ciX5PTN=9Xw@mail.gmail.com>,
39059 #        http://lists.gnu.org/archive/html/bug-tar/2015-03/msg00002.html
39060
39061
39062
39063   { set +x
39064 $as_echo "$at_srcdir/comperr.at:28:
39065 mkdir v7
39066 (cd v7
39067 TEST_TAR_FORMAT=v7
39068 export TEST_TAR_FORMAT
39069 TAR_OPTIONS=\"-H v7\"
39070 export TAR_OPTIONS
39071 rm -rf *
39072
39073 tar --use-compress-program false -cf a.tar . 2>err
39074 rc=\$?
39075 sed -n '\$p' err
39076 exit \$rc
39077 )"
39078 at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
39079 ( $at_check_trace;
39080 mkdir v7
39081 (cd v7
39082 TEST_TAR_FORMAT=v7
39083 export TEST_TAR_FORMAT
39084 TAR_OPTIONS="-H v7"
39085 export TAR_OPTIONS
39086 rm -rf *
39087
39088 tar --use-compress-program false -cf a.tar . 2>err
39089 rc=$?
39090 sed -n '$p' err
39091 exit $rc
39092 )
39093 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39094 at_status=$? at_failed=false
39095 $at_check_filter
39096 at_fn_diff_devnull "$at_stderr" || at_failed=:
39097 echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
39098 " | \
39099   $at_diff - "$at_stdout" || at_failed=:
39100 at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
39101 $at_failed && at_fn_log_failure
39102 $at_traceon; }
39103
39104               { set +x
39105 $as_echo "$at_srcdir/comperr.at:28:
39106 mkdir oldgnu
39107 (cd oldgnu
39108 TEST_TAR_FORMAT=oldgnu
39109 export TEST_TAR_FORMAT
39110 TAR_OPTIONS=\"-H oldgnu\"
39111 export TAR_OPTIONS
39112 rm -rf *
39113
39114 tar --use-compress-program false -cf a.tar . 2>err
39115 rc=\$?
39116 sed -n '\$p' err
39117 exit \$rc
39118 )"
39119 at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
39120 ( $at_check_trace;
39121 mkdir oldgnu
39122 (cd oldgnu
39123 TEST_TAR_FORMAT=oldgnu
39124 export TEST_TAR_FORMAT
39125 TAR_OPTIONS="-H oldgnu"
39126 export TAR_OPTIONS
39127 rm -rf *
39128
39129 tar --use-compress-program false -cf a.tar . 2>err
39130 rc=$?
39131 sed -n '$p' err
39132 exit $rc
39133 )
39134 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39135 at_status=$? at_failed=false
39136 $at_check_filter
39137 at_fn_diff_devnull "$at_stderr" || at_failed=:
39138 echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
39139 " | \
39140   $at_diff - "$at_stdout" || at_failed=:
39141 at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
39142 $at_failed && at_fn_log_failure
39143 $at_traceon; }
39144
39145               { set +x
39146 $as_echo "$at_srcdir/comperr.at:28:
39147 mkdir ustar
39148 (cd ustar
39149 TEST_TAR_FORMAT=ustar
39150 export TEST_TAR_FORMAT
39151 TAR_OPTIONS=\"-H ustar\"
39152 export TAR_OPTIONS
39153 rm -rf *
39154
39155 tar --use-compress-program false -cf a.tar . 2>err
39156 rc=\$?
39157 sed -n '\$p' err
39158 exit \$rc
39159 )"
39160 at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
39161 ( $at_check_trace;
39162 mkdir ustar
39163 (cd ustar
39164 TEST_TAR_FORMAT=ustar
39165 export TEST_TAR_FORMAT
39166 TAR_OPTIONS="-H ustar"
39167 export TAR_OPTIONS
39168 rm -rf *
39169
39170 tar --use-compress-program false -cf a.tar . 2>err
39171 rc=$?
39172 sed -n '$p' err
39173 exit $rc
39174 )
39175 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39176 at_status=$? at_failed=false
39177 $at_check_filter
39178 at_fn_diff_devnull "$at_stderr" || at_failed=:
39179 echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
39180 " | \
39181   $at_diff - "$at_stdout" || at_failed=:
39182 at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
39183 $at_failed && at_fn_log_failure
39184 $at_traceon; }
39185
39186               { set +x
39187 $as_echo "$at_srcdir/comperr.at:28:
39188 mkdir posix
39189 (cd posix
39190 TEST_TAR_FORMAT=posix
39191 export TEST_TAR_FORMAT
39192 TAR_OPTIONS=\"-H posix\"
39193 export TAR_OPTIONS
39194 rm -rf *
39195
39196 tar --use-compress-program false -cf a.tar . 2>err
39197 rc=\$?
39198 sed -n '\$p' err
39199 exit \$rc
39200 )"
39201 at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
39202 ( $at_check_trace;
39203 mkdir posix
39204 (cd posix
39205 TEST_TAR_FORMAT=posix
39206 export TEST_TAR_FORMAT
39207 TAR_OPTIONS="-H posix"
39208 export TAR_OPTIONS
39209 rm -rf *
39210
39211 tar --use-compress-program false -cf a.tar . 2>err
39212 rc=$?
39213 sed -n '$p' err
39214 exit $rc
39215 )
39216 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39217 at_status=$? at_failed=false
39218 $at_check_filter
39219 at_fn_diff_devnull "$at_stderr" || at_failed=:
39220 echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
39221 " | \
39222   $at_diff - "$at_stdout" || at_failed=:
39223 at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
39224 $at_failed && at_fn_log_failure
39225 $at_traceon; }
39226
39227               { set +x
39228 $as_echo "$at_srcdir/comperr.at:28:
39229 mkdir gnu
39230 (cd gnu
39231 TEST_TAR_FORMAT=gnu
39232 export TEST_TAR_FORMAT
39233 TAR_OPTIONS=\"-H gnu\"
39234 export TAR_OPTIONS
39235 rm -rf *
39236
39237 tar --use-compress-program false -cf a.tar . 2>err
39238 rc=\$?
39239 sed -n '\$p' err
39240 exit \$rc
39241 )"
39242 at_fn_check_prepare_notrace 'an embedded newline' "comperr.at:28"
39243 ( $at_check_trace;
39244 mkdir gnu
39245 (cd gnu
39246 TEST_TAR_FORMAT=gnu
39247 export TEST_TAR_FORMAT
39248 TAR_OPTIONS="-H gnu"
39249 export TAR_OPTIONS
39250 rm -rf *
39251
39252 tar --use-compress-program false -cf a.tar . 2>err
39253 rc=$?
39254 sed -n '$p' err
39255 exit $rc
39256 )
39257 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39258 at_status=$? at_failed=false
39259 $at_check_filter
39260 at_fn_diff_devnull "$at_stderr" || at_failed=:
39261 echo >>"$at_stdout"; $as_echo "tar: Error is not recoverable: exiting now
39262 " | \
39263   $at_diff - "$at_stdout" || at_failed=:
39264 at_fn_check_status 2 $at_status "$at_srcdir/comperr.at:28"
39265 $at_failed && at_fn_log_failure
39266 $at_traceon; }
39267
39268
39269
39270
39271   set +x
39272   $at_times_p && times >"$at_times_file"
39273 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39274 read at_status <"$at_status_file"
39275 #AT_STOP_160
39276 #AT_START_161
39277 at_fn_group_banner 161 'remfiles01.at:28' \
39278   "remove-files with compression" "                  " 24
39279 at_xfail=no
39280 (
39281   $as_echo "161. $at_setup_line: testing $at_desc ..."
39282   $at_traceon
39283
39284
39285
39286 unset TAR_OPTIONS
39287 { set +x
39288 $as_echo "$at_srcdir/remfiles01.at:32:
39289
39290 echo \"test\" > \$\$
39291 chmod 0 \$\$
39292 cat \$\$ > /dev/null 2>&1
39293 result=\$?
39294 rm -f \$\$
39295 test \$result -eq 0 && exit 77
39296
39297
39298 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
39299
39300
39301 case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
39302 ?*) exit 77;;
39303 esac
39304
39305
39306 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39307
39308
39309 mkdir dir
39310 cd dir
39311 genfile --file a --length 0
39312 chmod 0 a
39313 genfile --file b
39314 mkdir c
39315
39316 # Depending on when the SIGPIPE gets delivered, the invocation below
39317 # may finish with either
39318 #  tar: a: Cannot write: Broken pipe
39319 # or
39320 #  tar: Child returned status 2
39321
39322 # Discard diagnostics that some shells generate about broken pipes,
39323 # and discard all of tar's diagnostics except for the ones saying \"(child)\".
39324 # Gzip's exit code is propagated to the shell.  Usually it is 141.
39325 # Convert all non-zero exits to 2 to make it predictable.
39326 (tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
39327 EC=\$?
39328 sed -n '/(child)/p' err >&2
39329 rm err
39330 find . | sort
39331 exit \$EC
39332 "
39333 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles01.at:32"
39334 ( $at_check_trace;
39335
39336 echo "test" > $$
39337 chmod 0 $$
39338 cat $$ > /dev/null 2>&1
39339 result=$?
39340 rm -f $$
39341 test $result -eq 0 && exit 77
39342
39343
39344 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
39345
39346
39347 case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
39348 ?*) exit 77;;
39349 esac
39350
39351
39352 test -z "`sort < /dev/null 2>&1`" || exit 77
39353
39354
39355 mkdir dir
39356 cd dir
39357 genfile --file a --length 0
39358 chmod 0 a
39359 genfile --file b
39360 mkdir c
39361
39362 # Depending on when the SIGPIPE gets delivered, the invocation below
39363 # may finish with either
39364 #  tar: a: Cannot write: Broken pipe
39365 # or
39366 #  tar: Child returned status 2
39367
39368 # Discard diagnostics that some shells generate about broken pipes,
39369 # and discard all of tar's diagnostics except for the ones saying "(child)".
39370 # Gzip's exit code is propagated to the shell.  Usually it is 141.
39371 # Convert all non-zero exits to 2 to make it predictable.
39372 (tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
39373 EC=$?
39374 sed -n '/(child)/p' err >&2
39375 rm err
39376 find . | sort
39377 exit $EC
39378
39379 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39380 at_status=$? at_failed=false
39381 $at_check_filter
39382 echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Permission denied
39383 tar (child): Error is not recoverable: exiting now
39384 " | \
39385   $at_diff - "$at_stderr" || at_failed=:
39386 echo >>"$at_stdout"; $as_echo ".
39387 ./a
39388 ./b
39389 ./c
39390 " | \
39391   $at_diff - "$at_stdout" || at_failed=:
39392 at_fn_check_status 2 $at_status "$at_srcdir/remfiles01.at:32"
39393 $at_failed && at_fn_log_failure
39394 $at_traceon; }
39395
39396
39397   set +x
39398   $at_times_p && times >"$at_times_file"
39399 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39400 read at_status <"$at_status_file"
39401 #AT_STOP_161
39402 #AT_START_162
39403 at_fn_group_banner 162 'remfiles02.at:28' \
39404   "remove-files with compression: grand-child" "     " 24
39405 at_xfail=no
39406 (
39407   $as_echo "162. $at_setup_line: testing $at_desc ..."
39408   $at_traceon
39409
39410
39411
39412 unset TAR_OPTIONS
39413 { set +x
39414 $as_echo "$at_srcdir/remfiles02.at:32:
39415
39416 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
39417
39418
39419 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39420
39421
39422 mkdir dir
39423 cd dir
39424 mkdir a
39425 genfile --file b
39426 mkdir c
39427
39428 tar -c -f a -z --remove-files b c 2>err
39429 EC=\$?
39430 sed -n '/(child)/p' err >&2
39431 rm err
39432 find . | sort
39433 exit \$EC
39434 "
39435 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles02.at:32"
39436 ( $at_check_trace;
39437
39438 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
39439
39440
39441 test -z "`sort < /dev/null 2>&1`" || exit 77
39442
39443
39444 mkdir dir
39445 cd dir
39446 mkdir a
39447 genfile --file b
39448 mkdir c
39449
39450 tar -c -f a -z --remove-files b c 2>err
39451 EC=$?
39452 sed -n '/(child)/p' err >&2
39453 rm err
39454 find . | sort
39455 exit $EC
39456
39457 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39458 at_status=$? at_failed=false
39459 $at_check_filter
39460 echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Is a directory
39461 tar (child): Error is not recoverable: exiting now
39462 " | \
39463   $at_diff - "$at_stderr" || at_failed=:
39464 echo >>"$at_stdout"; $as_echo ".
39465 ./a
39466 ./b
39467 ./c
39468 " | \
39469   $at_diff - "$at_stdout" || at_failed=:
39470 at_fn_check_status 2 $at_status "$at_srcdir/remfiles02.at:32"
39471 $at_failed && at_fn_log_failure
39472 $at_traceon; }
39473
39474
39475   set +x
39476   $at_times_p && times >"$at_times_file"
39477 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39478 read at_status <"$at_status_file"
39479 #AT_STOP_162
39480 #AT_START_163
39481 at_fn_group_banner 163 'remfiles03.at:28' \
39482   "remove-files with symbolic links" "               " 24
39483 at_xfail=no
39484 (
39485   $as_echo "163. $at_setup_line: testing $at_desc ..."
39486   $at_traceon
39487
39488
39489
39490 { set +x
39491 $as_echo "$at_srcdir/remfiles03.at:31:
39492 mkdir a
39493 mkdir a/b
39494 ln -s b a/c || exit 77
39495 tar --remove-files -cf a.tar a
39496 genfile --stat a
39497 "
39498 at_fn_check_prepare_notrace 'an embedded newline' "remfiles03.at:31"
39499 ( $at_check_trace;
39500 mkdir a
39501 mkdir a/b
39502 ln -s b a/c || exit 77
39503 tar --remove-files -cf a.tar a
39504 genfile --stat a
39505
39506 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39507 at_status=$? at_failed=false
39508 $at_check_filter
39509 echo >>"$at_stderr"; $as_echo "genfile: stat(a) failed: No such file or directory
39510 " | \
39511   $at_diff - "$at_stderr" || at_failed=:
39512 at_fn_diff_devnull "$at_stdout" || at_failed=:
39513 at_fn_check_status 0 $at_status "$at_srcdir/remfiles03.at:31"
39514 $at_failed && at_fn_log_failure
39515 $at_traceon; }
39516
39517
39518   set +x
39519   $at_times_p && times >"$at_times_file"
39520 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39521 read at_status <"$at_status_file"
39522 #AT_STOP_163
39523 #AT_START_164
39524 at_fn_group_banner 164 'remfiles04a.at:25' \
39525   "remove-files with -C:rel in -c/non-incr. mode" "  " 24
39526 at_xfail=no
39527       test -f $XFAILFILE && at_xfail=yes
39528 (
39529   $as_echo "164. $at_setup_line: testing $at_desc ..."
39530   $at_traceon
39531
39532
39533
39534
39535
39536   { set +x
39537 $as_echo "$at_srcdir/remfiles04a.at:28:
39538 mkdir gnu
39539 (cd gnu
39540 TEST_TAR_FORMAT=gnu
39541 export TEST_TAR_FORMAT
39542 TAR_OPTIONS=\"-H gnu\"
39543 export TAR_OPTIONS
39544 rm -rf *
39545
39546
39547 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39548
39549 mkdir foo
39550 echo bar > bar
39551 echo foobar > foo/bar
39552 tar -cf foo.tar --remove-files -C foo bar
39553 echo A
39554 find . | sort
39555 )"
39556 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04a.at:28"
39557 ( $at_check_trace;
39558 mkdir gnu
39559 (cd gnu
39560 TEST_TAR_FORMAT=gnu
39561 export TEST_TAR_FORMAT
39562 TAR_OPTIONS="-H gnu"
39563 export TAR_OPTIONS
39564 rm -rf *
39565
39566
39567 test -z "`sort < /dev/null 2>&1`" || exit 77
39568
39569 mkdir foo
39570 echo bar > bar
39571 echo foobar > foo/bar
39572 tar -cf foo.tar --remove-files -C foo bar
39573 echo A
39574 find . | sort
39575 )
39576 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39577 at_status=$? at_failed=false
39578 $at_check_filter
39579 at_fn_diff_devnull "$at_stderr" || at_failed=:
39580 echo >>"$at_stdout"; $as_echo "A
39581 .
39582 ./bar
39583 ./foo
39584 ./foo.tar
39585 " | \
39586   $at_diff - "$at_stdout" || at_failed=:
39587 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04a.at:28"
39588 $at_failed && at_fn_log_failure
39589 $at_traceon; }
39590
39591
39592
39593
39594   set +x
39595   $at_times_p && times >"$at_times_file"
39596 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39597 read at_status <"$at_status_file"
39598 #AT_STOP_164
39599 #AT_START_165
39600 at_fn_group_banner 165 'remfiles04b.at:33' \
39601   "remove-files with -C:rel in -c/incr. mode" "      " 24
39602 at_xfail=no
39603       test -f $XFAILFILE && at_xfail=yes
39604 (
39605   $as_echo "165. $at_setup_line: testing $at_desc ..."
39606   $at_traceon
39607
39608
39609
39610
39611
39612   { set +x
39613 $as_echo "$at_srcdir/remfiles04b.at:36:
39614 mkdir gnu
39615 (cd gnu
39616 TEST_TAR_FORMAT=gnu
39617 export TEST_TAR_FORMAT
39618 TAR_OPTIONS=\"-H gnu\"
39619 export TAR_OPTIONS
39620 rm -rf *
39621
39622
39623 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39624
39625 mkdir foo
39626 echo bar > bar
39627 echo foobar > foo/bar
39628 tar -cf foo.tar --incremental --remove-files -C foo bar
39629 echo A
39630 find . | sort
39631 )"
39632 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04b.at:36"
39633 ( $at_check_trace;
39634 mkdir gnu
39635 (cd gnu
39636 TEST_TAR_FORMAT=gnu
39637 export TEST_TAR_FORMAT
39638 TAR_OPTIONS="-H gnu"
39639 export TAR_OPTIONS
39640 rm -rf *
39641
39642
39643 test -z "`sort < /dev/null 2>&1`" || exit 77
39644
39645 mkdir foo
39646 echo bar > bar
39647 echo foobar > foo/bar
39648 tar -cf foo.tar --incremental --remove-files -C foo bar
39649 echo A
39650 find . | sort
39651 )
39652 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39653 at_status=$? at_failed=false
39654 $at_check_filter
39655 at_fn_diff_devnull "$at_stderr" || at_failed=:
39656 echo >>"$at_stdout"; $as_echo "A
39657 .
39658 ./bar
39659 ./foo
39660 ./foo.tar
39661 " | \
39662   $at_diff - "$at_stdout" || at_failed=:
39663 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04b.at:36"
39664 $at_failed && at_fn_log_failure
39665 $at_traceon; }
39666
39667
39668
39669
39670   set +x
39671   $at_times_p && times >"$at_times_file"
39672 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39673 read at_status <"$at_status_file"
39674 #AT_STOP_165
39675 #AT_START_166
39676 at_fn_group_banner 166 'remfiles04c.at:33' \
39677   "remove-files with -C:rel in -r mode" "            " 24
39678 at_xfail=no
39679       test -f $XFAILFILE && at_xfail=yes
39680 (
39681   $as_echo "166. $at_setup_line: testing $at_desc ..."
39682   $at_traceon
39683
39684
39685
39686
39687
39688   { set +x
39689 $as_echo "$at_srcdir/remfiles04c.at:36:
39690 mkdir gnu
39691 (cd gnu
39692 TEST_TAR_FORMAT=gnu
39693 export TEST_TAR_FORMAT
39694 TAR_OPTIONS=\"-H gnu\"
39695 export TAR_OPTIONS
39696 rm -rf *
39697
39698
39699 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39700
39701 mkdir foo
39702 echo bar > bar
39703 echo foobar > foo/bar
39704 tar -cf foo.tar -C foo bar
39705 echo A
39706 find . | sort
39707 tar -rf foo.tar --remove-files -C foo bar
39708 echo B
39709 find . | sort
39710 )"
39711 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04c.at:36"
39712 ( $at_check_trace;
39713 mkdir gnu
39714 (cd gnu
39715 TEST_TAR_FORMAT=gnu
39716 export TEST_TAR_FORMAT
39717 TAR_OPTIONS="-H gnu"
39718 export TAR_OPTIONS
39719 rm -rf *
39720
39721
39722 test -z "`sort < /dev/null 2>&1`" || exit 77
39723
39724 mkdir foo
39725 echo bar > bar
39726 echo foobar > foo/bar
39727 tar -cf foo.tar -C foo bar
39728 echo A
39729 find . | sort
39730 tar -rf foo.tar --remove-files -C foo bar
39731 echo B
39732 find . | sort
39733 )
39734 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39735 at_status=$? at_failed=false
39736 $at_check_filter
39737 at_fn_diff_devnull "$at_stderr" || at_failed=:
39738 echo >>"$at_stdout"; $as_echo "A
39739 .
39740 ./bar
39741 ./foo
39742 ./foo.tar
39743 ./foo/bar
39744 B
39745 .
39746 ./bar
39747 ./foo
39748 ./foo.tar
39749 " | \
39750   $at_diff - "$at_stdout" || at_failed=:
39751 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04c.at:36"
39752 $at_failed && at_fn_log_failure
39753 $at_traceon; }
39754
39755
39756
39757
39758   set +x
39759   $at_times_p && times >"$at_times_file"
39760 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39761 read at_status <"$at_status_file"
39762 #AT_STOP_166
39763 #AT_START_167
39764 at_fn_group_banner 167 'remfiles05a.at:34' \
39765   "remove-files with -C:rel,rel in -c/non-incr. mode" "" 24
39766 at_xfail=no
39767       test -f $XFAILFILE && at_xfail=yes
39768 (
39769   $as_echo "167. $at_setup_line: testing $at_desc ..."
39770   $at_traceon
39771
39772
39773
39774
39775
39776   { set +x
39777 $as_echo "$at_srcdir/remfiles05a.at:37:
39778 mkdir gnu
39779 (cd gnu
39780 TEST_TAR_FORMAT=gnu
39781 export TEST_TAR_FORMAT
39782 TAR_OPTIONS=\"-H gnu\"
39783 export TAR_OPTIONS
39784 rm -rf *
39785
39786
39787 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39788
39789 mkdir foo
39790 mkdir bar
39791 echo file > file
39792 echo foo/file > foo/file
39793 echo bar/file > bar/file
39794 decho A
39795 tar -cvf foo.tar --remove-files -C foo file -C ../bar file
39796 decho B
39797 find . | sort
39798 )"
39799 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05a.at:37"
39800 ( $at_check_trace;
39801 mkdir gnu
39802 (cd gnu
39803 TEST_TAR_FORMAT=gnu
39804 export TEST_TAR_FORMAT
39805 TAR_OPTIONS="-H gnu"
39806 export TAR_OPTIONS
39807 rm -rf *
39808
39809
39810 test -z "`sort < /dev/null 2>&1`" || exit 77
39811
39812 mkdir foo
39813 mkdir bar
39814 echo file > file
39815 echo foo/file > foo/file
39816 echo bar/file > bar/file
39817 decho A
39818 tar -cvf foo.tar --remove-files -C foo file -C ../bar file
39819 decho B
39820 find . | sort
39821 )
39822 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39823 at_status=$? at_failed=false
39824 $at_check_filter
39825 echo >>"$at_stderr"; $as_echo "A
39826 B
39827 " | \
39828   $at_diff - "$at_stderr" || at_failed=:
39829 echo >>"$at_stdout"; $as_echo "A
39830 file
39831 file
39832 B
39833 .
39834 ./bar
39835 ./file
39836 ./foo
39837 ./foo.tar
39838 " | \
39839   $at_diff - "$at_stdout" || at_failed=:
39840 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05a.at:37"
39841 $at_failed && at_fn_log_failure
39842 $at_traceon; }
39843
39844
39845
39846
39847   set +x
39848   $at_times_p && times >"$at_times_file"
39849 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39850 read at_status <"$at_status_file"
39851 #AT_STOP_167
39852 #AT_START_168
39853 at_fn_group_banner 168 'remfiles05b.at:25' \
39854   "remove-files with -C:rel,rel in -c/incr. mode" "  " 24
39855 at_xfail=no
39856       test -f $XFAILFILE && at_xfail=yes
39857 (
39858   $as_echo "168. $at_setup_line: testing $at_desc ..."
39859   $at_traceon
39860
39861
39862
39863
39864
39865   { set +x
39866 $as_echo "$at_srcdir/remfiles05b.at:28:
39867 mkdir gnu
39868 (cd gnu
39869 TEST_TAR_FORMAT=gnu
39870 export TEST_TAR_FORMAT
39871 TAR_OPTIONS=\"-H gnu\"
39872 export TAR_OPTIONS
39873 rm -rf *
39874
39875
39876 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39877
39878 mkdir foo
39879 mkdir bar
39880 echo file > file
39881 echo foo/file > foo/file
39882 echo bar/file > bar/file
39883 decho A
39884 tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
39885 decho B
39886 find . | sort
39887 )"
39888 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05b.at:28"
39889 ( $at_check_trace;
39890 mkdir gnu
39891 (cd gnu
39892 TEST_TAR_FORMAT=gnu
39893 export TEST_TAR_FORMAT
39894 TAR_OPTIONS="-H gnu"
39895 export TAR_OPTIONS
39896 rm -rf *
39897
39898
39899 test -z "`sort < /dev/null 2>&1`" || exit 77
39900
39901 mkdir foo
39902 mkdir bar
39903 echo file > file
39904 echo foo/file > foo/file
39905 echo bar/file > bar/file
39906 decho A
39907 tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
39908 decho B
39909 find . | sort
39910 )
39911 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39912 at_status=$? at_failed=false
39913 $at_check_filter
39914 echo >>"$at_stderr"; $as_echo "A
39915 B
39916 " | \
39917   $at_diff - "$at_stderr" || at_failed=:
39918 echo >>"$at_stdout"; $as_echo "A
39919 file
39920 file
39921 B
39922 .
39923 ./bar
39924 ./file
39925 ./foo
39926 ./foo.tar
39927 " | \
39928   $at_diff - "$at_stdout" || at_failed=:
39929 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05b.at:28"
39930 $at_failed && at_fn_log_failure
39931 $at_traceon; }
39932
39933
39934
39935
39936   set +x
39937   $at_times_p && times >"$at_times_file"
39938 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39939 read at_status <"$at_status_file"
39940 #AT_STOP_168
39941 #AT_START_169
39942 at_fn_group_banner 169 'remfiles05c.at:25' \
39943   "remove-files with -C:rel,rel in -r mode" "        " 24
39944 at_xfail=no
39945       test -f $XFAILFILE && at_xfail=yes
39946 (
39947   $as_echo "169. $at_setup_line: testing $at_desc ..."
39948   $at_traceon
39949
39950
39951
39952
39953
39954   { set +x
39955 $as_echo "$at_srcdir/remfiles05c.at:28:
39956 mkdir gnu
39957 (cd gnu
39958 TEST_TAR_FORMAT=gnu
39959 export TEST_TAR_FORMAT
39960 TAR_OPTIONS=\"-H gnu\"
39961 export TAR_OPTIONS
39962 rm -rf *
39963
39964
39965 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39966
39967 mkdir foo
39968 mkdir bar
39969 echo file > file
39970 echo foo/file > foo/file
39971 echo bar/file > bar/file
39972 tar -cf foo.tar -C foo file -C ../bar file
39973 decho A
39974 find . | sort
39975 decho B
39976 tar -rvf foo.tar --remove-files -C foo file -C ../bar file
39977 decho C
39978 find . | sort
39979 )"
39980 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05c.at:28"
39981 ( $at_check_trace;
39982 mkdir gnu
39983 (cd gnu
39984 TEST_TAR_FORMAT=gnu
39985 export TEST_TAR_FORMAT
39986 TAR_OPTIONS="-H gnu"
39987 export TAR_OPTIONS
39988 rm -rf *
39989
39990
39991 test -z "`sort < /dev/null 2>&1`" || exit 77
39992
39993 mkdir foo
39994 mkdir bar
39995 echo file > file
39996 echo foo/file > foo/file
39997 echo bar/file > bar/file
39998 tar -cf foo.tar -C foo file -C ../bar file
39999 decho A
40000 find . | sort
40001 decho B
40002 tar -rvf foo.tar --remove-files -C foo file -C ../bar file
40003 decho C
40004 find . | sort
40005 )
40006 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40007 at_status=$? at_failed=false
40008 $at_check_filter
40009 echo >>"$at_stderr"; $as_echo "A
40010 B
40011 C
40012 " | \
40013   $at_diff - "$at_stderr" || at_failed=:
40014 echo >>"$at_stdout"; $as_echo "A
40015 .
40016 ./bar
40017 ./bar/file
40018 ./file
40019 ./foo
40020 ./foo.tar
40021 ./foo/file
40022 B
40023 file
40024 file
40025 C
40026 .
40027 ./bar
40028 ./file
40029 ./foo
40030 ./foo.tar
40031 " | \
40032   $at_diff - "$at_stdout" || at_failed=:
40033 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05c.at:28"
40034 $at_failed && at_fn_log_failure
40035 $at_traceon; }
40036
40037
40038
40039
40040   set +x
40041   $at_times_p && times >"$at_times_file"
40042 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40043 read at_status <"$at_status_file"
40044 #AT_STOP_169
40045 #AT_START_170
40046 at_fn_group_banner 170 'remfiles06a.at:25' \
40047   "remove-files with -C:rel,abs in -c/non-incr. mode" "" 24
40048 at_xfail=no
40049       test -f $XFAILFILE && at_xfail=yes
40050 (
40051   $as_echo "170. $at_setup_line: testing $at_desc ..."
40052   $at_traceon
40053
40054
40055
40056
40057
40058   { set +x
40059 $as_echo "$at_srcdir/remfiles06a.at:28:
40060 mkdir gnu
40061 (cd gnu
40062 TEST_TAR_FORMAT=gnu
40063 export TEST_TAR_FORMAT
40064 TAR_OPTIONS=\"-H gnu\"
40065 export TAR_OPTIONS
40066 rm -rf *
40067
40068
40069 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40070
40071 mkdir foo
40072 mkdir bar
40073 echo file > file
40074 echo foo/file > foo/file
40075 echo bar/file > bar/file
40076 DIR=\`pwd\`
40077 decho A
40078 tar -cvf foo.tar --remove-files -C foo file -C \$DIR/bar file
40079 decho B
40080 find . | sort
40081 )"
40082 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06a.at:28"
40083 ( $at_check_trace;
40084 mkdir gnu
40085 (cd gnu
40086 TEST_TAR_FORMAT=gnu
40087 export TEST_TAR_FORMAT
40088 TAR_OPTIONS="-H gnu"
40089 export TAR_OPTIONS
40090 rm -rf *
40091
40092
40093 test -z "`sort < /dev/null 2>&1`" || exit 77
40094
40095 mkdir foo
40096 mkdir bar
40097 echo file > file
40098 echo foo/file > foo/file
40099 echo bar/file > bar/file
40100 DIR=`pwd`
40101 decho A
40102 tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file
40103 decho B
40104 find . | sort
40105 )
40106 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40107 at_status=$? at_failed=false
40108 $at_check_filter
40109 echo >>"$at_stderr"; $as_echo "A
40110 B
40111 " | \
40112   $at_diff - "$at_stderr" || at_failed=:
40113 echo >>"$at_stdout"; $as_echo "A
40114 file
40115 file
40116 B
40117 .
40118 ./bar
40119 ./file
40120 ./foo
40121 ./foo.tar
40122 " | \
40123   $at_diff - "$at_stdout" || at_failed=:
40124 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06a.at:28"
40125 $at_failed && at_fn_log_failure
40126 $at_traceon; }
40127
40128
40129
40130
40131   set +x
40132   $at_times_p && times >"$at_times_file"
40133 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40134 read at_status <"$at_status_file"
40135 #AT_STOP_170
40136 #AT_START_171
40137 at_fn_group_banner 171 'remfiles06b.at:25' \
40138   "remove-files with -C:rel,abs in -c/incr. mode" "  " 24
40139 at_xfail=no
40140       test -f $XFAILFILE && at_xfail=yes
40141 (
40142   $as_echo "171. $at_setup_line: testing $at_desc ..."
40143   $at_traceon
40144
40145
40146
40147
40148
40149   { set +x
40150 $as_echo "$at_srcdir/remfiles06b.at:28:
40151 mkdir gnu
40152 (cd gnu
40153 TEST_TAR_FORMAT=gnu
40154 export TEST_TAR_FORMAT
40155 TAR_OPTIONS=\"-H gnu\"
40156 export TAR_OPTIONS
40157 rm -rf *
40158
40159
40160 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40161
40162 mkdir foo
40163 mkdir bar
40164 echo file > file
40165 echo foo/file > foo/file
40166 echo bar/file > bar/file
40167 DIR=\`pwd\`
40168 decho A
40169 tar -cvf foo.tar --incremental --remove-files -C foo file -C \$DIR/bar file
40170 decho B
40171 find . | sort
40172 )"
40173 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06b.at:28"
40174 ( $at_check_trace;
40175 mkdir gnu
40176 (cd gnu
40177 TEST_TAR_FORMAT=gnu
40178 export TEST_TAR_FORMAT
40179 TAR_OPTIONS="-H gnu"
40180 export TAR_OPTIONS
40181 rm -rf *
40182
40183
40184 test -z "`sort < /dev/null 2>&1`" || exit 77
40185
40186 mkdir foo
40187 mkdir bar
40188 echo file > file
40189 echo foo/file > foo/file
40190 echo bar/file > bar/file
40191 DIR=`pwd`
40192 decho A
40193 tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file
40194 decho B
40195 find . | sort
40196 )
40197 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40198 at_status=$? at_failed=false
40199 $at_check_filter
40200 echo >>"$at_stderr"; $as_echo "A
40201 B
40202 " | \
40203   $at_diff - "$at_stderr" || at_failed=:
40204 echo >>"$at_stdout"; $as_echo "A
40205 file
40206 file
40207 B
40208 .
40209 ./bar
40210 ./file
40211 ./foo
40212 ./foo.tar
40213 " | \
40214   $at_diff - "$at_stdout" || at_failed=:
40215 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06b.at:28"
40216 $at_failed && at_fn_log_failure
40217 $at_traceon; }
40218
40219
40220
40221
40222   set +x
40223   $at_times_p && times >"$at_times_file"
40224 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40225 read at_status <"$at_status_file"
40226 #AT_STOP_171
40227 #AT_START_172
40228 at_fn_group_banner 172 'remfiles06c.at:25' \
40229   "remove-files with -C:rel,abs in -r mode" "        " 24
40230 at_xfail=no
40231       test -f $XFAILFILE && at_xfail=yes
40232 (
40233   $as_echo "172. $at_setup_line: testing $at_desc ..."
40234   $at_traceon
40235
40236
40237
40238
40239
40240   { set +x
40241 $as_echo "$at_srcdir/remfiles06c.at:28:
40242 mkdir gnu
40243 (cd gnu
40244 TEST_TAR_FORMAT=gnu
40245 export TEST_TAR_FORMAT
40246 TAR_OPTIONS=\"-H gnu\"
40247 export TAR_OPTIONS
40248 rm -rf *
40249
40250
40251 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40252
40253 mkdir foo
40254 mkdir bar
40255 echo file > file
40256 echo foo/file > foo/file
40257 echo bar/file > bar/file
40258 DIR=\`pwd\`
40259 tar -cf foo.tar -C foo file -C \$DIR/bar file
40260 decho A
40261 find . | sort
40262 decho B
40263 tar -rvf foo.tar --remove-files -C foo file -C \$DIR/bar file
40264 decho C
40265 find . | sort
40266 )"
40267 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06c.at:28"
40268 ( $at_check_trace;
40269 mkdir gnu
40270 (cd gnu
40271 TEST_TAR_FORMAT=gnu
40272 export TEST_TAR_FORMAT
40273 TAR_OPTIONS="-H gnu"
40274 export TAR_OPTIONS
40275 rm -rf *
40276
40277
40278 test -z "`sort < /dev/null 2>&1`" || exit 77
40279
40280 mkdir foo
40281 mkdir bar
40282 echo file > file
40283 echo foo/file > foo/file
40284 echo bar/file > bar/file
40285 DIR=`pwd`
40286 tar -cf foo.tar -C foo file -C $DIR/bar file
40287 decho A
40288 find . | sort
40289 decho B
40290 tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file
40291 decho C
40292 find . | sort
40293 )
40294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40295 at_status=$? at_failed=false
40296 $at_check_filter
40297 echo >>"$at_stderr"; $as_echo "A
40298 B
40299 C
40300 " | \
40301   $at_diff - "$at_stderr" || at_failed=:
40302 echo >>"$at_stdout"; $as_echo "A
40303 .
40304 ./bar
40305 ./bar/file
40306 ./file
40307 ./foo
40308 ./foo.tar
40309 ./foo/file
40310 B
40311 file
40312 file
40313 C
40314 .
40315 ./bar
40316 ./file
40317 ./foo
40318 ./foo.tar
40319 " | \
40320   $at_diff - "$at_stdout" || at_failed=:
40321 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06c.at:28"
40322 $at_failed && at_fn_log_failure
40323 $at_traceon; }
40324
40325
40326
40327
40328   set +x
40329   $at_times_p && times >"$at_times_file"
40330 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40331 read at_status <"$at_status_file"
40332 #AT_STOP_172
40333 #AT_START_173
40334 at_fn_group_banner 173 'remfiles07a.at:25' \
40335   "remove-files with -C:abs,rel in -c/non-incr. mode" "" 24
40336 at_xfail=no
40337       test -f $XFAILFILE && at_xfail=yes
40338 (
40339   $as_echo "173. $at_setup_line: testing $at_desc ..."
40340   $at_traceon
40341
40342
40343
40344
40345
40346   { set +x
40347 $as_echo "$at_srcdir/remfiles07a.at:28:
40348 mkdir gnu
40349 (cd gnu
40350 TEST_TAR_FORMAT=gnu
40351 export TEST_TAR_FORMAT
40352 TAR_OPTIONS=\"-H gnu\"
40353 export TAR_OPTIONS
40354 rm -rf *
40355
40356
40357 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40358
40359 mkdir foo
40360 mkdir bar
40361 echo file > file
40362 echo foo/file > foo/file
40363 echo bar/file > bar/file
40364 DIR=\`pwd\`
40365 decho A
40366 tar -cvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
40367 decho B
40368 find . | sort
40369 )"
40370 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07a.at:28"
40371 ( $at_check_trace;
40372 mkdir gnu
40373 (cd gnu
40374 TEST_TAR_FORMAT=gnu
40375 export TEST_TAR_FORMAT
40376 TAR_OPTIONS="-H gnu"
40377 export TAR_OPTIONS
40378 rm -rf *
40379
40380
40381 test -z "`sort < /dev/null 2>&1`" || exit 77
40382
40383 mkdir foo
40384 mkdir bar
40385 echo file > file
40386 echo foo/file > foo/file
40387 echo bar/file > bar/file
40388 DIR=`pwd`
40389 decho A
40390 tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
40391 decho B
40392 find . | sort
40393 )
40394 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40395 at_status=$? at_failed=false
40396 $at_check_filter
40397 echo >>"$at_stderr"; $as_echo "A
40398 B
40399 " | \
40400   $at_diff - "$at_stderr" || at_failed=:
40401 echo >>"$at_stdout"; $as_echo "A
40402 file
40403 file
40404 B
40405 .
40406 ./bar
40407 ./file
40408 ./foo
40409 ./foo.tar
40410 " | \
40411   $at_diff - "$at_stdout" || at_failed=:
40412 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07a.at:28"
40413 $at_failed && at_fn_log_failure
40414 $at_traceon; }
40415
40416
40417
40418
40419   set +x
40420   $at_times_p && times >"$at_times_file"
40421 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40422 read at_status <"$at_status_file"
40423 #AT_STOP_173
40424 #AT_START_174
40425 at_fn_group_banner 174 'remfiles07b.at:25' \
40426   "remove-files with -C:abs,rel in -c/incr. mode" "  " 24
40427 at_xfail=no
40428       test -f $XFAILFILE && at_xfail=yes
40429 (
40430   $as_echo "174. $at_setup_line: testing $at_desc ..."
40431   $at_traceon
40432
40433
40434
40435
40436
40437   { set +x
40438 $as_echo "$at_srcdir/remfiles07b.at:28:
40439 mkdir gnu
40440 (cd gnu
40441 TEST_TAR_FORMAT=gnu
40442 export TEST_TAR_FORMAT
40443 TAR_OPTIONS=\"-H gnu\"
40444 export TAR_OPTIONS
40445 rm -rf *
40446
40447
40448 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40449
40450 mkdir foo
40451 mkdir bar
40452 echo file > file
40453 echo foo/file > foo/file
40454 echo bar/file > bar/file
40455 DIR=\`pwd\`
40456 decho A
40457 tar -cvf foo.tar --incremental --remove-files -C \$DIR/foo file -C ../bar file
40458 decho B
40459 find . | sort
40460 )"
40461 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07b.at:28"
40462 ( $at_check_trace;
40463 mkdir gnu
40464 (cd gnu
40465 TEST_TAR_FORMAT=gnu
40466 export TEST_TAR_FORMAT
40467 TAR_OPTIONS="-H gnu"
40468 export TAR_OPTIONS
40469 rm -rf *
40470
40471
40472 test -z "`sort < /dev/null 2>&1`" || exit 77
40473
40474 mkdir foo
40475 mkdir bar
40476 echo file > file
40477 echo foo/file > foo/file
40478 echo bar/file > bar/file
40479 DIR=`pwd`
40480 decho A
40481 tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file
40482 decho B
40483 find . | sort
40484 )
40485 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40486 at_status=$? at_failed=false
40487 $at_check_filter
40488 echo >>"$at_stderr"; $as_echo "A
40489 B
40490 " | \
40491   $at_diff - "$at_stderr" || at_failed=:
40492 echo >>"$at_stdout"; $as_echo "A
40493 file
40494 file
40495 B
40496 .
40497 ./bar
40498 ./file
40499 ./foo
40500 ./foo.tar
40501 " | \
40502   $at_diff - "$at_stdout" || at_failed=:
40503 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07b.at:28"
40504 $at_failed && at_fn_log_failure
40505 $at_traceon; }
40506
40507
40508
40509
40510   set +x
40511   $at_times_p && times >"$at_times_file"
40512 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40513 read at_status <"$at_status_file"
40514 #AT_STOP_174
40515 #AT_START_175
40516 at_fn_group_banner 175 'remfiles07c.at:25' \
40517   "remove-files with -C:abs,rel in -r mode" "        " 24
40518 at_xfail=no
40519       test -f $XFAILFILE && at_xfail=yes
40520 (
40521   $as_echo "175. $at_setup_line: testing $at_desc ..."
40522   $at_traceon
40523
40524
40525
40526
40527
40528   { set +x
40529 $as_echo "$at_srcdir/remfiles07c.at:28:
40530 mkdir gnu
40531 (cd gnu
40532 TEST_TAR_FORMAT=gnu
40533 export TEST_TAR_FORMAT
40534 TAR_OPTIONS=\"-H gnu\"
40535 export TAR_OPTIONS
40536 rm -rf *
40537
40538
40539 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40540
40541 mkdir foo
40542 mkdir bar
40543 echo file > file
40544 echo foo/file > foo/file
40545 echo bar/file > bar/file
40546 DIR=\`pwd\`
40547 tar -cf foo.tar -C \$DIR/foo file -C ../bar file
40548 decho A
40549 find . | sort
40550 decho B
40551 tar -rvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
40552 decho C
40553 find . | sort
40554 )"
40555 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07c.at:28"
40556 ( $at_check_trace;
40557 mkdir gnu
40558 (cd gnu
40559 TEST_TAR_FORMAT=gnu
40560 export TEST_TAR_FORMAT
40561 TAR_OPTIONS="-H gnu"
40562 export TAR_OPTIONS
40563 rm -rf *
40564
40565
40566 test -z "`sort < /dev/null 2>&1`" || exit 77
40567
40568 mkdir foo
40569 mkdir bar
40570 echo file > file
40571 echo foo/file > foo/file
40572 echo bar/file > bar/file
40573 DIR=`pwd`
40574 tar -cf foo.tar -C $DIR/foo file -C ../bar file
40575 decho A
40576 find . | sort
40577 decho B
40578 tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
40579 decho C
40580 find . | sort
40581 )
40582 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40583 at_status=$? at_failed=false
40584 $at_check_filter
40585 echo >>"$at_stderr"; $as_echo "A
40586 B
40587 C
40588 " | \
40589   $at_diff - "$at_stderr" || at_failed=:
40590 echo >>"$at_stdout"; $as_echo "A
40591 .
40592 ./bar
40593 ./bar/file
40594 ./file
40595 ./foo
40596 ./foo.tar
40597 ./foo/file
40598 B
40599 file
40600 file
40601 C
40602 .
40603 ./bar
40604 ./file
40605 ./foo
40606 ./foo.tar
40607 " | \
40608   $at_diff - "$at_stdout" || at_failed=:
40609 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07c.at:28"
40610 $at_failed && at_fn_log_failure
40611 $at_traceon; }
40612
40613
40614
40615
40616   set +x
40617   $at_times_p && times >"$at_times_file"
40618 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40619 read at_status <"$at_status_file"
40620 #AT_STOP_175
40621 #AT_START_176
40622 at_fn_group_banner 176 'remfiles08a.at:28' \
40623   "remove-files deleting two subdirs in -c/non-incr. mode" "" 24
40624 at_xfail=no
40625       test -f $XFAILFILE && at_xfail=yes
40626 (
40627   $as_echo "176. $at_setup_line: testing $at_desc ..."
40628   $at_traceon
40629
40630
40631
40632
40633
40634   { set +x
40635 $as_echo "$at_srcdir/remfiles08a.at:31:
40636 mkdir gnu
40637 (cd gnu
40638 TEST_TAR_FORMAT=gnu
40639 export TEST_TAR_FORMAT
40640 TAR_OPTIONS=\"-H gnu\"
40641 export TAR_OPTIONS
40642 rm -rf *
40643
40644 mkdir foo
40645 mkdir bar
40646 echo foo/foo_file > foo/foo_file
40647 echo bar/bar_file > bar/bar_file
40648 decho A
40649 tar -cvf foo.tar --remove-files -C foo . -C ../bar .
40650 decho B
40651 find .
40652 )"
40653 at_fn_check_prepare_notrace 'an embedded newline' "remfiles08a.at:31"
40654 ( $at_check_trace;
40655 mkdir gnu
40656 (cd gnu
40657 TEST_TAR_FORMAT=gnu
40658 export TEST_TAR_FORMAT
40659 TAR_OPTIONS="-H gnu"
40660 export TAR_OPTIONS
40661 rm -rf *
40662
40663 mkdir foo
40664 mkdir bar
40665 echo foo/foo_file > foo/foo_file
40666 echo bar/bar_file > bar/bar_file
40667 decho A
40668 tar -cvf foo.tar --remove-files -C foo . -C ../bar .
40669 decho B
40670 find .
40671 )
40672 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40673 at_status=$? at_failed=false
40674 $at_check_filter
40675 echo >>"$at_stderr"; $as_echo "A
40676 B
40677 " | \
40678   $at_diff - "$at_stderr" || at_failed=:
40679 echo >>"$at_stdout"; $as_echo "A
40680 ./
40681 ./foo_file
40682 ./
40683 ./bar_file
40684 B
40685 .
40686 ./foo.tar
40687 " | \
40688   $at_diff - "$at_stdout" || at_failed=:
40689 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08a.at:31"
40690 $at_failed && at_fn_log_failure
40691 $at_traceon; }
40692
40693
40694
40695
40696   set +x
40697   $at_times_p && times >"$at_times_file"
40698 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40699 read at_status <"$at_status_file"
40700 #AT_STOP_176
40701 #AT_START_177
40702 at_fn_group_banner 177 'remfiles08b.at:31' \
40703   "remove-files deleting two subdirs in -c/incr. mode" "" 24
40704 at_xfail=no
40705       test -f $XFAILFILE && at_xfail=yes
40706 (
40707   $as_echo "177. $at_setup_line: testing $at_desc ..."
40708   $at_traceon
40709
40710
40711
40712
40713
40714   { set +x
40715 $as_echo "$at_srcdir/remfiles08b.at:34:
40716 mkdir gnu
40717 (cd gnu
40718 TEST_TAR_FORMAT=gnu
40719 export TEST_TAR_FORMAT
40720 TAR_OPTIONS=\"-H gnu\"
40721 export TAR_OPTIONS
40722 rm -rf *
40723
40724 mkdir foo
40725 mkdir bar
40726 echo foo/foo_file > foo/foo_file
40727 echo bar/bar_file > bar/bar_file
40728 decho A
40729 tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
40730 decho B
40731 find .
40732 )"
40733 at_fn_check_prepare_notrace 'an embedded newline' "remfiles08b.at:34"
40734 ( $at_check_trace;
40735 mkdir gnu
40736 (cd gnu
40737 TEST_TAR_FORMAT=gnu
40738 export TEST_TAR_FORMAT
40739 TAR_OPTIONS="-H gnu"
40740 export TAR_OPTIONS
40741 rm -rf *
40742
40743 mkdir foo
40744 mkdir bar
40745 echo foo/foo_file > foo/foo_file
40746 echo bar/bar_file > bar/bar_file
40747 decho A
40748 tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
40749 decho B
40750 find .
40751 )
40752 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40753 at_status=$? at_failed=false
40754 $at_check_filter
40755 echo >>"$at_stderr"; $as_echo "A
40756 tar: .: Directory is new
40757 tar: .: Directory is new
40758 B
40759 " | \
40760   $at_diff - "$at_stderr" || at_failed=:
40761 echo >>"$at_stdout"; $as_echo "A
40762 ./
40763 ./
40764 ./foo_file
40765 ./bar_file
40766 B
40767 .
40768 ./foo.tar
40769 " | \
40770   $at_diff - "$at_stdout" || at_failed=:
40771 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08b.at:34"
40772 $at_failed && at_fn_log_failure
40773 $at_traceon; }
40774
40775
40776
40777
40778   set +x
40779   $at_times_p && times >"$at_times_file"
40780 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40781 read at_status <"$at_status_file"
40782 #AT_STOP_177
40783 #AT_START_178
40784 at_fn_group_banner 178 'remfiles08c.at:28' \
40785   "remove-files deleting two subdirs in -r mode" "   " 24
40786 at_xfail=no
40787       test -f $XFAILFILE && at_xfail=yes
40788 (
40789   $as_echo "178. $at_setup_line: testing $at_desc ..."
40790   $at_traceon
40791
40792
40793
40794
40795
40796   { set +x
40797 $as_echo "$at_srcdir/remfiles08c.at:31:
40798 mkdir gnu
40799 (cd gnu
40800 TEST_TAR_FORMAT=gnu
40801 export TEST_TAR_FORMAT
40802 TAR_OPTIONS=\"-H gnu\"
40803 export TAR_OPTIONS
40804 rm -rf *
40805
40806
40807 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40808
40809 mkdir foo
40810 mkdir bar
40811 echo foo/foo_file > foo/foo_file
40812 echo bar/bar_file > bar/bar_file
40813 tar -cf foo.tar -C foo . -C ../bar .
40814 decho A
40815 find . | sort
40816 decho B
40817 tar -rvf foo.tar --remove-files -C foo . -C ../bar .
40818 decho C
40819 find .
40820 )"
40821 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:31"
40822 ( $at_check_trace;
40823 mkdir gnu
40824 (cd gnu
40825 TEST_TAR_FORMAT=gnu
40826 export TEST_TAR_FORMAT
40827 TAR_OPTIONS="-H gnu"
40828 export TAR_OPTIONS
40829 rm -rf *
40830
40831
40832 test -z "`sort < /dev/null 2>&1`" || exit 77
40833
40834 mkdir foo
40835 mkdir bar
40836 echo foo/foo_file > foo/foo_file
40837 echo bar/bar_file > bar/bar_file
40838 tar -cf foo.tar -C foo . -C ../bar .
40839 decho A
40840 find . | sort
40841 decho B
40842 tar -rvf foo.tar --remove-files -C foo . -C ../bar .
40843 decho C
40844 find .
40845 )
40846 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40847 at_status=$? at_failed=false
40848 $at_check_filter
40849 echo >>"$at_stderr"; $as_echo "A
40850 B
40851 C
40852 " | \
40853   $at_diff - "$at_stderr" || at_failed=:
40854 echo >>"$at_stdout"; $as_echo "A
40855 .
40856 ./bar
40857 ./bar/bar_file
40858 ./foo
40859 ./foo.tar
40860 ./foo/foo_file
40861 B
40862 ./
40863 ./foo_file
40864 ./
40865 ./bar_file
40866 C
40867 .
40868 ./foo.tar
40869 " | \
40870   $at_diff - "$at_stdout" || at_failed=:
40871 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08c.at:31"
40872 $at_failed && at_fn_log_failure
40873 $at_traceon; }
40874
40875
40876
40877
40878   set +x
40879   $at_times_p && times >"$at_times_file"
40880 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40881 read at_status <"$at_status_file"
40882 #AT_STOP_178
40883 #AT_START_179
40884 at_fn_group_banner 179 'remfiles09a.at:25' \
40885   "remove-files on full directory in -c/non-incr. mode" "" 24
40886 at_xfail=no
40887       test -f $XFAILFILE && at_xfail=yes
40888 (
40889   $as_echo "179. $at_setup_line: testing $at_desc ..."
40890   $at_traceon
40891
40892
40893
40894
40895
40896   { set +x
40897 $as_echo "$at_srcdir/remfiles09a.at:28:
40898 mkdir gnu
40899 (cd gnu
40900 TEST_TAR_FORMAT=gnu
40901 export TEST_TAR_FORMAT
40902 TAR_OPTIONS=\"-H gnu\"
40903 export TAR_OPTIONS
40904 rm -rf *
40905
40906 mkdir foo
40907 echo foo/file > foo/file
40908 decho A
40909 tar -cvf foo.tar --remove-files foo
40910 decho B
40911 find .
40912 )"
40913 at_fn_check_prepare_notrace 'an embedded newline' "remfiles09a.at:28"
40914 ( $at_check_trace;
40915 mkdir gnu
40916 (cd gnu
40917 TEST_TAR_FORMAT=gnu
40918 export TEST_TAR_FORMAT
40919 TAR_OPTIONS="-H gnu"
40920 export TAR_OPTIONS
40921 rm -rf *
40922
40923 mkdir foo
40924 echo foo/file > foo/file
40925 decho A
40926 tar -cvf foo.tar --remove-files foo
40927 decho B
40928 find .
40929 )
40930 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40931 at_status=$? at_failed=false
40932 $at_check_filter
40933 echo >>"$at_stderr"; $as_echo "A
40934 B
40935 " | \
40936   $at_diff - "$at_stderr" || at_failed=:
40937 echo >>"$at_stdout"; $as_echo "A
40938 foo/
40939 foo/file
40940 B
40941 .
40942 ./foo.tar
40943 " | \
40944   $at_diff - "$at_stdout" || at_failed=:
40945 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09a.at:28"
40946 $at_failed && at_fn_log_failure
40947 $at_traceon; }
40948
40949
40950
40951
40952   set +x
40953   $at_times_p && times >"$at_times_file"
40954 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40955 read at_status <"$at_status_file"
40956 #AT_STOP_179
40957 #AT_START_180
40958 at_fn_group_banner 180 'remfiles09b.at:29' \
40959   "remove-files on full directory in -c/incr. mode" "" 24
40960 at_xfail=no
40961       test -f $XFAILFILE && at_xfail=yes
40962 (
40963   $as_echo "180. $at_setup_line: testing $at_desc ..."
40964   $at_traceon
40965
40966
40967
40968
40969
40970   { set +x
40971 $as_echo "$at_srcdir/remfiles09b.at:32:
40972 mkdir gnu
40973 (cd gnu
40974 TEST_TAR_FORMAT=gnu
40975 export TEST_TAR_FORMAT
40976 TAR_OPTIONS=\"-H gnu\"
40977 export TAR_OPTIONS
40978 rm -rf *
40979
40980 mkdir foo
40981 echo foo/file > foo/file
40982 decho A
40983 tar -cvf foo.tar --incremental --remove-files foo
40984 decho B
40985 find .
40986 )"
40987 at_fn_check_prepare_notrace 'an embedded newline' "remfiles09b.at:32"
40988 ( $at_check_trace;
40989 mkdir gnu
40990 (cd gnu
40991 TEST_TAR_FORMAT=gnu
40992 export TEST_TAR_FORMAT
40993 TAR_OPTIONS="-H gnu"
40994 export TAR_OPTIONS
40995 rm -rf *
40996
40997 mkdir foo
40998 echo foo/file > foo/file
40999 decho A
41000 tar -cvf foo.tar --incremental --remove-files foo
41001 decho B
41002 find .
41003 )
41004 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41005 at_status=$? at_failed=false
41006 $at_check_filter
41007 echo >>"$at_stderr"; $as_echo "A
41008 tar: foo: Directory is new
41009 B
41010 " | \
41011   $at_diff - "$at_stderr" || at_failed=:
41012 echo >>"$at_stdout"; $as_echo "A
41013 foo/
41014 foo/file
41015 B
41016 .
41017 ./foo.tar
41018 " | \
41019   $at_diff - "$at_stdout" || at_failed=:
41020 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09b.at:32"
41021 $at_failed && at_fn_log_failure
41022 $at_traceon; }
41023
41024
41025
41026
41027   set +x
41028   $at_times_p && times >"$at_times_file"
41029 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41030 read at_status <"$at_status_file"
41031 #AT_STOP_180
41032 #AT_START_181
41033 at_fn_group_banner 181 'remfiles09c.at:25' \
41034   "remove-files on full directory in -r mode" "      " 24
41035 at_xfail=no
41036       test -f $XFAILFILE && at_xfail=yes
41037 (
41038   $as_echo "181. $at_setup_line: testing $at_desc ..."
41039   $at_traceon
41040
41041
41042
41043
41044
41045   { set +x
41046 $as_echo "$at_srcdir/remfiles09c.at:28:
41047 mkdir gnu
41048 (cd gnu
41049 TEST_TAR_FORMAT=gnu
41050 export TEST_TAR_FORMAT
41051 TAR_OPTIONS=\"-H gnu\"
41052 export TAR_OPTIONS
41053 rm -rf *
41054
41055
41056 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
41057
41058 mkdir foo
41059 echo foo/file > foo/file
41060 tar -cf foo.tar foo
41061 decho A
41062 find . | sort
41063 decho B
41064 tar -rvf foo.tar --remove-files foo
41065 decho C
41066 find . | sort
41067 )"
41068 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles09c.at:28"
41069 ( $at_check_trace;
41070 mkdir gnu
41071 (cd gnu
41072 TEST_TAR_FORMAT=gnu
41073 export TEST_TAR_FORMAT
41074 TAR_OPTIONS="-H gnu"
41075 export TAR_OPTIONS
41076 rm -rf *
41077
41078
41079 test -z "`sort < /dev/null 2>&1`" || exit 77
41080
41081 mkdir foo
41082 echo foo/file > foo/file
41083 tar -cf foo.tar foo
41084 decho A
41085 find . | sort
41086 decho B
41087 tar -rvf foo.tar --remove-files foo
41088 decho C
41089 find . | sort
41090 )
41091 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41092 at_status=$? at_failed=false
41093 $at_check_filter
41094 echo >>"$at_stderr"; $as_echo "A
41095 B
41096 C
41097 " | \
41098   $at_diff - "$at_stderr" || at_failed=:
41099 echo >>"$at_stdout"; $as_echo "A
41100 .
41101 ./foo
41102 ./foo.tar
41103 ./foo/file
41104 B
41105 foo/
41106 foo/file
41107 C
41108 .
41109 ./foo.tar
41110 " | \
41111   $at_diff - "$at_stdout" || at_failed=:
41112 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09c.at:28"
41113 $at_failed && at_fn_log_failure
41114 $at_traceon; }
41115
41116
41117
41118
41119   set +x
41120   $at_times_p && times >"$at_times_file"
41121 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41122 read at_status <"$at_status_file"
41123 #AT_STOP_181
41124 #AT_START_182
41125 at_fn_group_banner 182 'remfiles10.at:20' \
41126   "remove-files" "                                   " 24
41127 at_xfail=no
41128       test -f $XFAILFILE && at_xfail=yes
41129 (
41130   $as_echo "182. $at_setup_line: testing $at_desc ..."
41131   $at_traceon
41132
41133
41134
41135
41136
41137   { set +x
41138 $as_echo "$at_srcdir/remfiles10.at:23:
41139 mkdir gnu
41140 (cd gnu
41141 TEST_TAR_FORMAT=gnu
41142 export TEST_TAR_FORMAT
41143 TAR_OPTIONS=\"-H gnu\"
41144 export TAR_OPTIONS
41145 rm -rf *
41146
41147 mkdir foo
41148 echo foo/file > foo/file
41149 decho A
41150 (cd foo && tar -cvf ../foo.tar --remove-files .)
41151 tar_status=\$?
41152 decho B
41153 find foo
41154 exit \$tar_status
41155 )"
41156 at_fn_check_prepare_notrace 'an embedded newline' "remfiles10.at:23"
41157 ( $at_check_trace;
41158 mkdir gnu
41159 (cd gnu
41160 TEST_TAR_FORMAT=gnu
41161 export TEST_TAR_FORMAT
41162 TAR_OPTIONS="-H gnu"
41163 export TAR_OPTIONS
41164 rm -rf *
41165
41166 mkdir foo
41167 echo foo/file > foo/file
41168 decho A
41169 (cd foo && tar -cvf ../foo.tar --remove-files .)
41170 tar_status=$?
41171 decho B
41172 find foo
41173 exit $tar_status
41174 )
41175 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41176 at_status=$? at_failed=false
41177 $at_check_filter
41178 echo >>"$at_stderr"; $as_echo "A
41179 tar: .: Cannot rmdir: Invalid argument
41180 tar: Exiting with failure status due to previous errors
41181 B
41182 " | \
41183   $at_diff - "$at_stderr" || at_failed=:
41184 echo >>"$at_stdout"; $as_echo "A
41185 ./
41186 ./file
41187 B
41188 foo
41189 " | \
41190   $at_diff - "$at_stdout" || at_failed=:
41191 at_fn_check_status 2 $at_status "$at_srcdir/remfiles10.at:23"
41192 $at_failed && at_fn_log_failure
41193 $at_traceon; }
41194
41195
41196
41197
41198   set +x
41199   $at_times_p && times >"$at_times_file"
41200 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41201 read at_status <"$at_status_file"
41202 #AT_STOP_182
41203 #AT_START_183
41204 at_fn_group_banner 183 'xattr01.at:25' \
41205   "xattrs: basic functionality" "                    " 25
41206 at_xfail=no
41207       test -f $XFAILFILE && at_xfail=yes
41208 (
41209   $as_echo "183. $at_setup_line: testing $at_desc ..."
41210   $at_traceon
41211
41212
41213
41214
41215
41216   { set +x
41217 $as_echo "$at_srcdir/xattr01.at:28:
41218 mkdir v7
41219 (cd v7
41220 TEST_TAR_FORMAT=v7
41221 export TEST_TAR_FORMAT
41222 TAR_OPTIONS=\"-H v7\"
41223 export TAR_OPTIONS
41224 rm -rf *
41225
41226
41227
41228   file=\$(TMPDIR=. mktemp fiXXXXXX)
41229
41230   setfattr -n user.test -v test \$file &> /dev/null
41231   if test \"\$?\" != 0; then
41232     exit 77
41233   fi
41234
41235
41236   getfattr \$file &> /dev/null
41237   if test \"\$?\" != 0; then
41238     exit 77
41239   fi
41240
41241
41242   file=\$(TMPDIR=. mktemp fiXXXXXX)
41243   setfattr -n user.test -v ahoj \$file
41244   # check whether tar fails to store xattrs
41245   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41246   if test \"\$err\" != \"0\"; then
41247     exit 77
41248   fi
41249
41250 mkdir dir
41251 genfile --file dir/file
41252
41253 setfattr -n user.test -v OurDirValue dir
41254 setfattr -n user.test -v OurFileValue dir/file
41255
41256 tar --xattrs -cf archive.tar dir
41257
41258 rm -rf dir
41259 tar --xattrs -xf archive.tar
41260
41261 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
41262 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
41263 )"
41264 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
41265 ( $at_check_trace;
41266 mkdir v7
41267 (cd v7
41268 TEST_TAR_FORMAT=v7
41269 export TEST_TAR_FORMAT
41270 TAR_OPTIONS="-H v7"
41271 export TAR_OPTIONS
41272 rm -rf *
41273
41274
41275
41276   file=$(TMPDIR=. mktemp fiXXXXXX)
41277
41278   setfattr -n user.test -v test $file &> /dev/null
41279   if test "$?" != 0; then
41280     exit 77
41281   fi
41282
41283
41284   getfattr $file &> /dev/null
41285   if test "$?" != 0; then
41286     exit 77
41287   fi
41288
41289
41290   file=$(TMPDIR=. mktemp fiXXXXXX)
41291   setfattr -n user.test -v ahoj $file
41292   # check whether tar fails to store xattrs
41293   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41294   if test "$err" != "0"; then
41295     exit 77
41296   fi
41297
41298 mkdir dir
41299 genfile --file dir/file
41300
41301 setfattr -n user.test -v OurDirValue dir
41302 setfattr -n user.test -v OurFileValue dir/file
41303
41304 tar --xattrs -cf archive.tar dir
41305
41306 rm -rf dir
41307 tar --xattrs -xf archive.tar
41308
41309 getfattr -h -d dir         | grep -v -e '^#' -e ^$
41310 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
41311 )
41312 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41313 at_status=$? at_failed=false
41314 $at_check_filter
41315 at_fn_diff_devnull "$at_stderr" || at_failed=:
41316 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
41317 user.test=\"OurFileValue\"
41318 " | \
41319   $at_diff - "$at_stdout" || at_failed=:
41320 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
41321 $at_failed && at_fn_log_failure
41322 $at_traceon; }
41323
41324               { set +x
41325 $as_echo "$at_srcdir/xattr01.at:28:
41326 mkdir oldgnu
41327 (cd oldgnu
41328 TEST_TAR_FORMAT=oldgnu
41329 export TEST_TAR_FORMAT
41330 TAR_OPTIONS=\"-H oldgnu\"
41331 export TAR_OPTIONS
41332 rm -rf *
41333
41334
41335
41336   file=\$(TMPDIR=. mktemp fiXXXXXX)
41337
41338   setfattr -n user.test -v test \$file &> /dev/null
41339   if test \"\$?\" != 0; then
41340     exit 77
41341   fi
41342
41343
41344   getfattr \$file &> /dev/null
41345   if test \"\$?\" != 0; then
41346     exit 77
41347   fi
41348
41349
41350   file=\$(TMPDIR=. mktemp fiXXXXXX)
41351   setfattr -n user.test -v ahoj \$file
41352   # check whether tar fails to store xattrs
41353   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41354   if test \"\$err\" != \"0\"; then
41355     exit 77
41356   fi
41357
41358 mkdir dir
41359 genfile --file dir/file
41360
41361 setfattr -n user.test -v OurDirValue dir
41362 setfattr -n user.test -v OurFileValue dir/file
41363
41364 tar --xattrs -cf archive.tar dir
41365
41366 rm -rf dir
41367 tar --xattrs -xf archive.tar
41368
41369 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
41370 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
41371 )"
41372 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
41373 ( $at_check_trace;
41374 mkdir oldgnu
41375 (cd oldgnu
41376 TEST_TAR_FORMAT=oldgnu
41377 export TEST_TAR_FORMAT
41378 TAR_OPTIONS="-H oldgnu"
41379 export TAR_OPTIONS
41380 rm -rf *
41381
41382
41383
41384   file=$(TMPDIR=. mktemp fiXXXXXX)
41385
41386   setfattr -n user.test -v test $file &> /dev/null
41387   if test "$?" != 0; then
41388     exit 77
41389   fi
41390
41391
41392   getfattr $file &> /dev/null
41393   if test "$?" != 0; then
41394     exit 77
41395   fi
41396
41397
41398   file=$(TMPDIR=. mktemp fiXXXXXX)
41399   setfattr -n user.test -v ahoj $file
41400   # check whether tar fails to store xattrs
41401   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41402   if test "$err" != "0"; then
41403     exit 77
41404   fi
41405
41406 mkdir dir
41407 genfile --file dir/file
41408
41409 setfattr -n user.test -v OurDirValue dir
41410 setfattr -n user.test -v OurFileValue dir/file
41411
41412 tar --xattrs -cf archive.tar dir
41413
41414 rm -rf dir
41415 tar --xattrs -xf archive.tar
41416
41417 getfattr -h -d dir         | grep -v -e '^#' -e ^$
41418 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
41419 )
41420 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41421 at_status=$? at_failed=false
41422 $at_check_filter
41423 at_fn_diff_devnull "$at_stderr" || at_failed=:
41424 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
41425 user.test=\"OurFileValue\"
41426 " | \
41427   $at_diff - "$at_stdout" || at_failed=:
41428 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
41429 $at_failed && at_fn_log_failure
41430 $at_traceon; }
41431
41432               { set +x
41433 $as_echo "$at_srcdir/xattr01.at:28:
41434 mkdir ustar
41435 (cd ustar
41436 TEST_TAR_FORMAT=ustar
41437 export TEST_TAR_FORMAT
41438 TAR_OPTIONS=\"-H ustar\"
41439 export TAR_OPTIONS
41440 rm -rf *
41441
41442
41443
41444   file=\$(TMPDIR=. mktemp fiXXXXXX)
41445
41446   setfattr -n user.test -v test \$file &> /dev/null
41447   if test \"\$?\" != 0; then
41448     exit 77
41449   fi
41450
41451
41452   getfattr \$file &> /dev/null
41453   if test \"\$?\" != 0; then
41454     exit 77
41455   fi
41456
41457
41458   file=\$(TMPDIR=. mktemp fiXXXXXX)
41459   setfattr -n user.test -v ahoj \$file
41460   # check whether tar fails to store xattrs
41461   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41462   if test \"\$err\" != \"0\"; then
41463     exit 77
41464   fi
41465
41466 mkdir dir
41467 genfile --file dir/file
41468
41469 setfattr -n user.test -v OurDirValue dir
41470 setfattr -n user.test -v OurFileValue dir/file
41471
41472 tar --xattrs -cf archive.tar dir
41473
41474 rm -rf dir
41475 tar --xattrs -xf archive.tar
41476
41477 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
41478 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
41479 )"
41480 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
41481 ( $at_check_trace;
41482 mkdir ustar
41483 (cd ustar
41484 TEST_TAR_FORMAT=ustar
41485 export TEST_TAR_FORMAT
41486 TAR_OPTIONS="-H ustar"
41487 export TAR_OPTIONS
41488 rm -rf *
41489
41490
41491
41492   file=$(TMPDIR=. mktemp fiXXXXXX)
41493
41494   setfattr -n user.test -v test $file &> /dev/null
41495   if test "$?" != 0; then
41496     exit 77
41497   fi
41498
41499
41500   getfattr $file &> /dev/null
41501   if test "$?" != 0; then
41502     exit 77
41503   fi
41504
41505
41506   file=$(TMPDIR=. mktemp fiXXXXXX)
41507   setfattr -n user.test -v ahoj $file
41508   # check whether tar fails to store xattrs
41509   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41510   if test "$err" != "0"; then
41511     exit 77
41512   fi
41513
41514 mkdir dir
41515 genfile --file dir/file
41516
41517 setfattr -n user.test -v OurDirValue dir
41518 setfattr -n user.test -v OurFileValue dir/file
41519
41520 tar --xattrs -cf archive.tar dir
41521
41522 rm -rf dir
41523 tar --xattrs -xf archive.tar
41524
41525 getfattr -h -d dir         | grep -v -e '^#' -e ^$
41526 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
41527 )
41528 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41529 at_status=$? at_failed=false
41530 $at_check_filter
41531 at_fn_diff_devnull "$at_stderr" || at_failed=:
41532 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
41533 user.test=\"OurFileValue\"
41534 " | \
41535   $at_diff - "$at_stdout" || at_failed=:
41536 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
41537 $at_failed && at_fn_log_failure
41538 $at_traceon; }
41539
41540               { set +x
41541 $as_echo "$at_srcdir/xattr01.at:28:
41542 mkdir posix
41543 (cd posix
41544 TEST_TAR_FORMAT=posix
41545 export TEST_TAR_FORMAT
41546 TAR_OPTIONS=\"-H posix\"
41547 export TAR_OPTIONS
41548 rm -rf *
41549
41550
41551
41552   file=\$(TMPDIR=. mktemp fiXXXXXX)
41553
41554   setfattr -n user.test -v test \$file &> /dev/null
41555   if test \"\$?\" != 0; then
41556     exit 77
41557   fi
41558
41559
41560   getfattr \$file &> /dev/null
41561   if test \"\$?\" != 0; then
41562     exit 77
41563   fi
41564
41565
41566   file=\$(TMPDIR=. mktemp fiXXXXXX)
41567   setfattr -n user.test -v ahoj \$file
41568   # check whether tar fails to store xattrs
41569   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41570   if test \"\$err\" != \"0\"; then
41571     exit 77
41572   fi
41573
41574 mkdir dir
41575 genfile --file dir/file
41576
41577 setfattr -n user.test -v OurDirValue dir
41578 setfattr -n user.test -v OurFileValue dir/file
41579
41580 tar --xattrs -cf archive.tar dir
41581
41582 rm -rf dir
41583 tar --xattrs -xf archive.tar
41584
41585 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
41586 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
41587 )"
41588 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
41589 ( $at_check_trace;
41590 mkdir posix
41591 (cd posix
41592 TEST_TAR_FORMAT=posix
41593 export TEST_TAR_FORMAT
41594 TAR_OPTIONS="-H posix"
41595 export TAR_OPTIONS
41596 rm -rf *
41597
41598
41599
41600   file=$(TMPDIR=. mktemp fiXXXXXX)
41601
41602   setfattr -n user.test -v test $file &> /dev/null
41603   if test "$?" != 0; then
41604     exit 77
41605   fi
41606
41607
41608   getfattr $file &> /dev/null
41609   if test "$?" != 0; then
41610     exit 77
41611   fi
41612
41613
41614   file=$(TMPDIR=. mktemp fiXXXXXX)
41615   setfattr -n user.test -v ahoj $file
41616   # check whether tar fails to store xattrs
41617   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41618   if test "$err" != "0"; then
41619     exit 77
41620   fi
41621
41622 mkdir dir
41623 genfile --file dir/file
41624
41625 setfattr -n user.test -v OurDirValue dir
41626 setfattr -n user.test -v OurFileValue dir/file
41627
41628 tar --xattrs -cf archive.tar dir
41629
41630 rm -rf dir
41631 tar --xattrs -xf archive.tar
41632
41633 getfattr -h -d dir         | grep -v -e '^#' -e ^$
41634 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
41635 )
41636 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41637 at_status=$? at_failed=false
41638 $at_check_filter
41639 at_fn_diff_devnull "$at_stderr" || at_failed=:
41640 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
41641 user.test=\"OurFileValue\"
41642 " | \
41643   $at_diff - "$at_stdout" || at_failed=:
41644 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
41645 $at_failed && at_fn_log_failure
41646 $at_traceon; }
41647
41648               { set +x
41649 $as_echo "$at_srcdir/xattr01.at:28:
41650 mkdir gnu
41651 (cd gnu
41652 TEST_TAR_FORMAT=gnu
41653 export TEST_TAR_FORMAT
41654 TAR_OPTIONS=\"-H gnu\"
41655 export TAR_OPTIONS
41656 rm -rf *
41657
41658
41659
41660   file=\$(TMPDIR=. mktemp fiXXXXXX)
41661
41662   setfattr -n user.test -v test \$file &> /dev/null
41663   if test \"\$?\" != 0; then
41664     exit 77
41665   fi
41666
41667
41668   getfattr \$file &> /dev/null
41669   if test \"\$?\" != 0; then
41670     exit 77
41671   fi
41672
41673
41674   file=\$(TMPDIR=. mktemp fiXXXXXX)
41675   setfattr -n user.test -v ahoj \$file
41676   # check whether tar fails to store xattrs
41677   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41678   if test \"\$err\" != \"0\"; then
41679     exit 77
41680   fi
41681
41682 mkdir dir
41683 genfile --file dir/file
41684
41685 setfattr -n user.test -v OurDirValue dir
41686 setfattr -n user.test -v OurFileValue dir/file
41687
41688 tar --xattrs -cf archive.tar dir
41689
41690 rm -rf dir
41691 tar --xattrs -xf archive.tar
41692
41693 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
41694 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
41695 )"
41696 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
41697 ( $at_check_trace;
41698 mkdir gnu
41699 (cd gnu
41700 TEST_TAR_FORMAT=gnu
41701 export TEST_TAR_FORMAT
41702 TAR_OPTIONS="-H gnu"
41703 export TAR_OPTIONS
41704 rm -rf *
41705
41706
41707
41708   file=$(TMPDIR=. mktemp fiXXXXXX)
41709
41710   setfattr -n user.test -v test $file &> /dev/null
41711   if test "$?" != 0; then
41712     exit 77
41713   fi
41714
41715
41716   getfattr $file &> /dev/null
41717   if test "$?" != 0; then
41718     exit 77
41719   fi
41720
41721
41722   file=$(TMPDIR=. mktemp fiXXXXXX)
41723   setfattr -n user.test -v ahoj $file
41724   # check whether tar fails to store xattrs
41725   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41726   if test "$err" != "0"; then
41727     exit 77
41728   fi
41729
41730 mkdir dir
41731 genfile --file dir/file
41732
41733 setfattr -n user.test -v OurDirValue dir
41734 setfattr -n user.test -v OurFileValue dir/file
41735
41736 tar --xattrs -cf archive.tar dir
41737
41738 rm -rf dir
41739 tar --xattrs -xf archive.tar
41740
41741 getfattr -h -d dir         | grep -v -e '^#' -e ^$
41742 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
41743 )
41744 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41745 at_status=$? at_failed=false
41746 $at_check_filter
41747 at_fn_diff_devnull "$at_stderr" || at_failed=:
41748 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
41749 user.test=\"OurFileValue\"
41750 " | \
41751   $at_diff - "$at_stdout" || at_failed=:
41752 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
41753 $at_failed && at_fn_log_failure
41754 $at_traceon; }
41755
41756
41757
41758
41759   set +x
41760   $at_times_p && times >"$at_times_file"
41761 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41762 read at_status <"$at_status_file"
41763 #AT_STOP_183
41764 #AT_START_184
41765 at_fn_group_banner 184 'xattr02.at:25' \
41766   "xattrs: change directory with -C option" "        " 25
41767 at_xfail=no
41768       test -f $XFAILFILE && at_xfail=yes
41769 (
41770   $as_echo "184. $at_setup_line: testing $at_desc ..."
41771   $at_traceon
41772
41773
41774
41775
41776
41777   { set +x
41778 $as_echo "$at_srcdir/xattr02.at:28:
41779 mkdir v7
41780 (cd v7
41781 TEST_TAR_FORMAT=v7
41782 export TEST_TAR_FORMAT
41783 TAR_OPTIONS=\"-H v7\"
41784 export TAR_OPTIONS
41785 rm -rf *
41786
41787
41788
41789   file=\$(TMPDIR=. mktemp fiXXXXXX)
41790
41791   setfattr -n user.test -v test \$file &> /dev/null
41792   if test \"\$?\" != 0; then
41793     exit 77
41794   fi
41795
41796
41797   getfattr \$file &> /dev/null
41798   if test \"\$?\" != 0; then
41799     exit 77
41800   fi
41801
41802
41803   file=\$(TMPDIR=. mktemp fiXXXXXX)
41804   setfattr -n user.test -v ahoj \$file
41805   # check whether tar fails to store xattrs
41806   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41807   if test \"\$err\" != \"0\"; then
41808     exit 77
41809   fi
41810
41811
41812 mkdir dir
41813 mkdir dir/subdir
41814 mkdir dir/subdir/subsubdir
41815 genfile --file dir/file1
41816 genfile --file dir/subdir/file2
41817
41818 setfattr -n user.test -v OurFile1Value dir/file1
41819 setfattr -n user.test -v OurFile2Value dir/subdir/file2
41820 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
41821
41822 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
41823
41824 rm -rf dir
41825
41826 tar --xattrs -xf archive.tar
41827
41828 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
41829 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
41830 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
41831 )"
41832 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
41833 ( $at_check_trace;
41834 mkdir v7
41835 (cd v7
41836 TEST_TAR_FORMAT=v7
41837 export TEST_TAR_FORMAT
41838 TAR_OPTIONS="-H v7"
41839 export TAR_OPTIONS
41840 rm -rf *
41841
41842
41843
41844   file=$(TMPDIR=. mktemp fiXXXXXX)
41845
41846   setfattr -n user.test -v test $file &> /dev/null
41847   if test "$?" != 0; then
41848     exit 77
41849   fi
41850
41851
41852   getfattr $file &> /dev/null
41853   if test "$?" != 0; then
41854     exit 77
41855   fi
41856
41857
41858   file=$(TMPDIR=. mktemp fiXXXXXX)
41859   setfattr -n user.test -v ahoj $file
41860   # check whether tar fails to store xattrs
41861   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41862   if test "$err" != "0"; then
41863     exit 77
41864   fi
41865
41866
41867 mkdir dir
41868 mkdir dir/subdir
41869 mkdir dir/subdir/subsubdir
41870 genfile --file dir/file1
41871 genfile --file dir/subdir/file2
41872
41873 setfattr -n user.test -v OurFile1Value dir/file1
41874 setfattr -n user.test -v OurFile2Value dir/subdir/file2
41875 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
41876
41877 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
41878
41879 rm -rf dir
41880
41881 tar --xattrs -xf archive.tar
41882
41883 getfattr -h -d file1        | grep -v -e '^#' -e ^$
41884 getfattr -h -d file2        | grep -v -e '^#' -e ^$
41885 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
41886 )
41887 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41888 at_status=$? at_failed=false
41889 $at_check_filter
41890 at_fn_diff_devnull "$at_stderr" || at_failed=:
41891 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
41892 user.test=\"OurFile2Value\"
41893 user.test=\"OurDirValue\"
41894 " | \
41895   $at_diff - "$at_stdout" || at_failed=:
41896 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
41897 $at_failed && at_fn_log_failure
41898 $at_traceon; }
41899
41900               { set +x
41901 $as_echo "$at_srcdir/xattr02.at:28:
41902 mkdir oldgnu
41903 (cd oldgnu
41904 TEST_TAR_FORMAT=oldgnu
41905 export TEST_TAR_FORMAT
41906 TAR_OPTIONS=\"-H oldgnu\"
41907 export TAR_OPTIONS
41908 rm -rf *
41909
41910
41911
41912   file=\$(TMPDIR=. mktemp fiXXXXXX)
41913
41914   setfattr -n user.test -v test \$file &> /dev/null
41915   if test \"\$?\" != 0; then
41916     exit 77
41917   fi
41918
41919
41920   getfattr \$file &> /dev/null
41921   if test \"\$?\" != 0; then
41922     exit 77
41923   fi
41924
41925
41926   file=\$(TMPDIR=. mktemp fiXXXXXX)
41927   setfattr -n user.test -v ahoj \$file
41928   # check whether tar fails to store xattrs
41929   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41930   if test \"\$err\" != \"0\"; then
41931     exit 77
41932   fi
41933
41934
41935 mkdir dir
41936 mkdir dir/subdir
41937 mkdir dir/subdir/subsubdir
41938 genfile --file dir/file1
41939 genfile --file dir/subdir/file2
41940
41941 setfattr -n user.test -v OurFile1Value dir/file1
41942 setfattr -n user.test -v OurFile2Value dir/subdir/file2
41943 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
41944
41945 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
41946
41947 rm -rf dir
41948
41949 tar --xattrs -xf archive.tar
41950
41951 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
41952 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
41953 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
41954 )"
41955 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
41956 ( $at_check_trace;
41957 mkdir oldgnu
41958 (cd oldgnu
41959 TEST_TAR_FORMAT=oldgnu
41960 export TEST_TAR_FORMAT
41961 TAR_OPTIONS="-H oldgnu"
41962 export TAR_OPTIONS
41963 rm -rf *
41964
41965
41966
41967   file=$(TMPDIR=. mktemp fiXXXXXX)
41968
41969   setfattr -n user.test -v test $file &> /dev/null
41970   if test "$?" != 0; then
41971     exit 77
41972   fi
41973
41974
41975   getfattr $file &> /dev/null
41976   if test "$?" != 0; then
41977     exit 77
41978   fi
41979
41980
41981   file=$(TMPDIR=. mktemp fiXXXXXX)
41982   setfattr -n user.test -v ahoj $file
41983   # check whether tar fails to store xattrs
41984   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41985   if test "$err" != "0"; then
41986     exit 77
41987   fi
41988
41989
41990 mkdir dir
41991 mkdir dir/subdir
41992 mkdir dir/subdir/subsubdir
41993 genfile --file dir/file1
41994 genfile --file dir/subdir/file2
41995
41996 setfattr -n user.test -v OurFile1Value dir/file1
41997 setfattr -n user.test -v OurFile2Value dir/subdir/file2
41998 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
41999
42000 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42001
42002 rm -rf dir
42003
42004 tar --xattrs -xf archive.tar
42005
42006 getfattr -h -d file1        | grep -v -e '^#' -e ^$
42007 getfattr -h -d file2        | grep -v -e '^#' -e ^$
42008 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
42009 )
42010 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42011 at_status=$? at_failed=false
42012 $at_check_filter
42013 at_fn_diff_devnull "$at_stderr" || at_failed=:
42014 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
42015 user.test=\"OurFile2Value\"
42016 user.test=\"OurDirValue\"
42017 " | \
42018   $at_diff - "$at_stdout" || at_failed=:
42019 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
42020 $at_failed && at_fn_log_failure
42021 $at_traceon; }
42022
42023               { set +x
42024 $as_echo "$at_srcdir/xattr02.at:28:
42025 mkdir ustar
42026 (cd ustar
42027 TEST_TAR_FORMAT=ustar
42028 export TEST_TAR_FORMAT
42029 TAR_OPTIONS=\"-H ustar\"
42030 export TAR_OPTIONS
42031 rm -rf *
42032
42033
42034
42035   file=\$(TMPDIR=. mktemp fiXXXXXX)
42036
42037   setfattr -n user.test -v test \$file &> /dev/null
42038   if test \"\$?\" != 0; then
42039     exit 77
42040   fi
42041
42042
42043   getfattr \$file &> /dev/null
42044   if test \"\$?\" != 0; then
42045     exit 77
42046   fi
42047
42048
42049   file=\$(TMPDIR=. mktemp fiXXXXXX)
42050   setfattr -n user.test -v ahoj \$file
42051   # check whether tar fails to store xattrs
42052   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42053   if test \"\$err\" != \"0\"; then
42054     exit 77
42055   fi
42056
42057
42058 mkdir dir
42059 mkdir dir/subdir
42060 mkdir dir/subdir/subsubdir
42061 genfile --file dir/file1
42062 genfile --file dir/subdir/file2
42063
42064 setfattr -n user.test -v OurFile1Value dir/file1
42065 setfattr -n user.test -v OurFile2Value dir/subdir/file2
42066 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
42067
42068 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42069
42070 rm -rf dir
42071
42072 tar --xattrs -xf archive.tar
42073
42074 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
42075 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
42076 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
42077 )"
42078 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
42079 ( $at_check_trace;
42080 mkdir ustar
42081 (cd ustar
42082 TEST_TAR_FORMAT=ustar
42083 export TEST_TAR_FORMAT
42084 TAR_OPTIONS="-H ustar"
42085 export TAR_OPTIONS
42086 rm -rf *
42087
42088
42089
42090   file=$(TMPDIR=. mktemp fiXXXXXX)
42091
42092   setfattr -n user.test -v test $file &> /dev/null
42093   if test "$?" != 0; then
42094     exit 77
42095   fi
42096
42097
42098   getfattr $file &> /dev/null
42099   if test "$?" != 0; then
42100     exit 77
42101   fi
42102
42103
42104   file=$(TMPDIR=. mktemp fiXXXXXX)
42105   setfattr -n user.test -v ahoj $file
42106   # check whether tar fails to store xattrs
42107   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42108   if test "$err" != "0"; then
42109     exit 77
42110   fi
42111
42112
42113 mkdir dir
42114 mkdir dir/subdir
42115 mkdir dir/subdir/subsubdir
42116 genfile --file dir/file1
42117 genfile --file dir/subdir/file2
42118
42119 setfattr -n user.test -v OurFile1Value dir/file1
42120 setfattr -n user.test -v OurFile2Value dir/subdir/file2
42121 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
42122
42123 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42124
42125 rm -rf dir
42126
42127 tar --xattrs -xf archive.tar
42128
42129 getfattr -h -d file1        | grep -v -e '^#' -e ^$
42130 getfattr -h -d file2        | grep -v -e '^#' -e ^$
42131 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
42132 )
42133 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42134 at_status=$? at_failed=false
42135 $at_check_filter
42136 at_fn_diff_devnull "$at_stderr" || at_failed=:
42137 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
42138 user.test=\"OurFile2Value\"
42139 user.test=\"OurDirValue\"
42140 " | \
42141   $at_diff - "$at_stdout" || at_failed=:
42142 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
42143 $at_failed && at_fn_log_failure
42144 $at_traceon; }
42145
42146               { set +x
42147 $as_echo "$at_srcdir/xattr02.at:28:
42148 mkdir posix
42149 (cd posix
42150 TEST_TAR_FORMAT=posix
42151 export TEST_TAR_FORMAT
42152 TAR_OPTIONS=\"-H posix\"
42153 export TAR_OPTIONS
42154 rm -rf *
42155
42156
42157
42158   file=\$(TMPDIR=. mktemp fiXXXXXX)
42159
42160   setfattr -n user.test -v test \$file &> /dev/null
42161   if test \"\$?\" != 0; then
42162     exit 77
42163   fi
42164
42165
42166   getfattr \$file &> /dev/null
42167   if test \"\$?\" != 0; then
42168     exit 77
42169   fi
42170
42171
42172   file=\$(TMPDIR=. mktemp fiXXXXXX)
42173   setfattr -n user.test -v ahoj \$file
42174   # check whether tar fails to store xattrs
42175   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42176   if test \"\$err\" != \"0\"; then
42177     exit 77
42178   fi
42179
42180
42181 mkdir dir
42182 mkdir dir/subdir
42183 mkdir dir/subdir/subsubdir
42184 genfile --file dir/file1
42185 genfile --file dir/subdir/file2
42186
42187 setfattr -n user.test -v OurFile1Value dir/file1
42188 setfattr -n user.test -v OurFile2Value dir/subdir/file2
42189 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
42190
42191 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42192
42193 rm -rf dir
42194
42195 tar --xattrs -xf archive.tar
42196
42197 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
42198 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
42199 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
42200 )"
42201 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
42202 ( $at_check_trace;
42203 mkdir posix
42204 (cd posix
42205 TEST_TAR_FORMAT=posix
42206 export TEST_TAR_FORMAT
42207 TAR_OPTIONS="-H posix"
42208 export TAR_OPTIONS
42209 rm -rf *
42210
42211
42212
42213   file=$(TMPDIR=. mktemp fiXXXXXX)
42214
42215   setfattr -n user.test -v test $file &> /dev/null
42216   if test "$?" != 0; then
42217     exit 77
42218   fi
42219
42220
42221   getfattr $file &> /dev/null
42222   if test "$?" != 0; then
42223     exit 77
42224   fi
42225
42226
42227   file=$(TMPDIR=. mktemp fiXXXXXX)
42228   setfattr -n user.test -v ahoj $file
42229   # check whether tar fails to store xattrs
42230   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42231   if test "$err" != "0"; then
42232     exit 77
42233   fi
42234
42235
42236 mkdir dir
42237 mkdir dir/subdir
42238 mkdir dir/subdir/subsubdir
42239 genfile --file dir/file1
42240 genfile --file dir/subdir/file2
42241
42242 setfattr -n user.test -v OurFile1Value dir/file1
42243 setfattr -n user.test -v OurFile2Value dir/subdir/file2
42244 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
42245
42246 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42247
42248 rm -rf dir
42249
42250 tar --xattrs -xf archive.tar
42251
42252 getfattr -h -d file1        | grep -v -e '^#' -e ^$
42253 getfattr -h -d file2        | grep -v -e '^#' -e ^$
42254 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
42255 )
42256 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42257 at_status=$? at_failed=false
42258 $at_check_filter
42259 at_fn_diff_devnull "$at_stderr" || at_failed=:
42260 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
42261 user.test=\"OurFile2Value\"
42262 user.test=\"OurDirValue\"
42263 " | \
42264   $at_diff - "$at_stdout" || at_failed=:
42265 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
42266 $at_failed && at_fn_log_failure
42267 $at_traceon; }
42268
42269               { set +x
42270 $as_echo "$at_srcdir/xattr02.at:28:
42271 mkdir gnu
42272 (cd gnu
42273 TEST_TAR_FORMAT=gnu
42274 export TEST_TAR_FORMAT
42275 TAR_OPTIONS=\"-H gnu\"
42276 export TAR_OPTIONS
42277 rm -rf *
42278
42279
42280
42281   file=\$(TMPDIR=. mktemp fiXXXXXX)
42282
42283   setfattr -n user.test -v test \$file &> /dev/null
42284   if test \"\$?\" != 0; then
42285     exit 77
42286   fi
42287
42288
42289   getfattr \$file &> /dev/null
42290   if test \"\$?\" != 0; then
42291     exit 77
42292   fi
42293
42294
42295   file=\$(TMPDIR=. mktemp fiXXXXXX)
42296   setfattr -n user.test -v ahoj \$file
42297   # check whether tar fails to store xattrs
42298   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42299   if test \"\$err\" != \"0\"; then
42300     exit 77
42301   fi
42302
42303
42304 mkdir dir
42305 mkdir dir/subdir
42306 mkdir dir/subdir/subsubdir
42307 genfile --file dir/file1
42308 genfile --file dir/subdir/file2
42309
42310 setfattr -n user.test -v OurFile1Value dir/file1
42311 setfattr -n user.test -v OurFile2Value dir/subdir/file2
42312 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
42313
42314 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42315
42316 rm -rf dir
42317
42318 tar --xattrs -xf archive.tar
42319
42320 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
42321 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
42322 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
42323 )"
42324 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
42325 ( $at_check_trace;
42326 mkdir gnu
42327 (cd gnu
42328 TEST_TAR_FORMAT=gnu
42329 export TEST_TAR_FORMAT
42330 TAR_OPTIONS="-H gnu"
42331 export TAR_OPTIONS
42332 rm -rf *
42333
42334
42335
42336   file=$(TMPDIR=. mktemp fiXXXXXX)
42337
42338   setfattr -n user.test -v test $file &> /dev/null
42339   if test "$?" != 0; then
42340     exit 77
42341   fi
42342
42343
42344   getfattr $file &> /dev/null
42345   if test "$?" != 0; then
42346     exit 77
42347   fi
42348
42349
42350   file=$(TMPDIR=. mktemp fiXXXXXX)
42351   setfattr -n user.test -v ahoj $file
42352   # check whether tar fails to store xattrs
42353   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42354   if test "$err" != "0"; then
42355     exit 77
42356   fi
42357
42358
42359 mkdir dir
42360 mkdir dir/subdir
42361 mkdir dir/subdir/subsubdir
42362 genfile --file dir/file1
42363 genfile --file dir/subdir/file2
42364
42365 setfattr -n user.test -v OurFile1Value dir/file1
42366 setfattr -n user.test -v OurFile2Value dir/subdir/file2
42367 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
42368
42369 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42370
42371 rm -rf dir
42372
42373 tar --xattrs -xf archive.tar
42374
42375 getfattr -h -d file1        | grep -v -e '^#' -e ^$
42376 getfattr -h -d file2        | grep -v -e '^#' -e ^$
42377 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
42378 )
42379 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42380 at_status=$? at_failed=false
42381 $at_check_filter
42382 at_fn_diff_devnull "$at_stderr" || at_failed=:
42383 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
42384 user.test=\"OurFile2Value\"
42385 user.test=\"OurDirValue\"
42386 " | \
42387   $at_diff - "$at_stdout" || at_failed=:
42388 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
42389 $at_failed && at_fn_log_failure
42390 $at_traceon; }
42391
42392
42393
42394
42395   set +x
42396   $at_times_p && times >"$at_times_file"
42397 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42398 read at_status <"$at_status_file"
42399 #AT_STOP_184
42400 #AT_START_185
42401 at_fn_group_banner 185 'xattr03.at:25' \
42402   "xattrs: trusted.* attributes" "                   " 25
42403 at_xfail=no
42404       test -f $XFAILFILE && at_xfail=yes
42405 (
42406   $as_echo "185. $at_setup_line: testing $at_desc ..."
42407   $at_traceon
42408
42409
42410
42411
42412
42413   { set +x
42414 $as_echo "$at_srcdir/xattr03.at:28:
42415 mkdir v7
42416 (cd v7
42417 TEST_TAR_FORMAT=v7
42418 export TEST_TAR_FORMAT
42419 TAR_OPTIONS=\"-H v7\"
42420 export TAR_OPTIONS
42421 rm -rf *
42422
42423
42424 echo \"test\" > \$\$
42425 chmod 0 \$\$
42426 cat \$\$ > /dev/null 2>&1
42427 result=\$?
42428 rm -f \$\$
42429 test \$result -eq 0 || exit 77
42430
42431
42432
42433   file=\$(TMPDIR=. mktemp fiXXXXXX)
42434
42435   setfattr -n user.test -v test \$file &> /dev/null
42436   if test \"\$?\" != 0; then
42437     exit 77
42438   fi
42439
42440
42441   getfattr \$file &> /dev/null
42442   if test \"\$?\" != 0; then
42443     exit 77
42444   fi
42445
42446
42447   file=\$(TMPDIR=. mktemp fiXXXXXX)
42448   setfattr -n user.test -v ahoj \$file
42449   # check whether tar fails to store xattrs
42450   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42451   if test \"\$err\" != \"0\"; then
42452     exit 77
42453   fi
42454
42455
42456 mkdir dir
42457 mkdir dir/subdir
42458 mkdir dir/subdir/subsubdir
42459 genfile --file dir/file1
42460 genfile --file dir/subdir/file2
42461
42462 setfattr -n trusted.test -v OurFile1Value dir/file1
42463 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
42464 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
42465
42466 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42467
42468 rm -rf dir
42469
42470 tar --xattrs --xattrs-include=trusted* -xf archive.tar
42471
42472 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
42473 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
42474 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
42475 )"
42476 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
42477 ( $at_check_trace;
42478 mkdir v7
42479 (cd v7
42480 TEST_TAR_FORMAT=v7
42481 export TEST_TAR_FORMAT
42482 TAR_OPTIONS="-H v7"
42483 export TAR_OPTIONS
42484 rm -rf *
42485
42486
42487 echo "test" > $$
42488 chmod 0 $$
42489 cat $$ > /dev/null 2>&1
42490 result=$?
42491 rm -f $$
42492 test $result -eq 0 || exit 77
42493
42494
42495
42496   file=$(TMPDIR=. mktemp fiXXXXXX)
42497
42498   setfattr -n user.test -v test $file &> /dev/null
42499   if test "$?" != 0; then
42500     exit 77
42501   fi
42502
42503
42504   getfattr $file &> /dev/null
42505   if test "$?" != 0; then
42506     exit 77
42507   fi
42508
42509
42510   file=$(TMPDIR=. mktemp fiXXXXXX)
42511   setfattr -n user.test -v ahoj $file
42512   # check whether tar fails to store xattrs
42513   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42514   if test "$err" != "0"; then
42515     exit 77
42516   fi
42517
42518
42519 mkdir dir
42520 mkdir dir/subdir
42521 mkdir dir/subdir/subsubdir
42522 genfile --file dir/file1
42523 genfile --file dir/subdir/file2
42524
42525 setfattr -n trusted.test -v OurFile1Value dir/file1
42526 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
42527 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
42528
42529 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42530
42531 rm -rf dir
42532
42533 tar --xattrs --xattrs-include=trusted* -xf archive.tar
42534
42535 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
42536 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
42537 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
42538 )
42539 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42540 at_status=$? at_failed=false
42541 $at_check_filter
42542 at_fn_diff_devnull "$at_stderr" || at_failed=:
42543 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
42544 trusted.test=\"OurFile2Value\"
42545 trusted.test=\"OurDirValue\"
42546 " | \
42547   $at_diff - "$at_stdout" || at_failed=:
42548 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
42549 $at_failed && at_fn_log_failure
42550 $at_traceon; }
42551
42552               { set +x
42553 $as_echo "$at_srcdir/xattr03.at:28:
42554 mkdir oldgnu
42555 (cd oldgnu
42556 TEST_TAR_FORMAT=oldgnu
42557 export TEST_TAR_FORMAT
42558 TAR_OPTIONS=\"-H oldgnu\"
42559 export TAR_OPTIONS
42560 rm -rf *
42561
42562
42563 echo \"test\" > \$\$
42564 chmod 0 \$\$
42565 cat \$\$ > /dev/null 2>&1
42566 result=\$?
42567 rm -f \$\$
42568 test \$result -eq 0 || exit 77
42569
42570
42571
42572   file=\$(TMPDIR=. mktemp fiXXXXXX)
42573
42574   setfattr -n user.test -v test \$file &> /dev/null
42575   if test \"\$?\" != 0; then
42576     exit 77
42577   fi
42578
42579
42580   getfattr \$file &> /dev/null
42581   if test \"\$?\" != 0; then
42582     exit 77
42583   fi
42584
42585
42586   file=\$(TMPDIR=. mktemp fiXXXXXX)
42587   setfattr -n user.test -v ahoj \$file
42588   # check whether tar fails to store xattrs
42589   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42590   if test \"\$err\" != \"0\"; then
42591     exit 77
42592   fi
42593
42594
42595 mkdir dir
42596 mkdir dir/subdir
42597 mkdir dir/subdir/subsubdir
42598 genfile --file dir/file1
42599 genfile --file dir/subdir/file2
42600
42601 setfattr -n trusted.test -v OurFile1Value dir/file1
42602 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
42603 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
42604
42605 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42606
42607 rm -rf dir
42608
42609 tar --xattrs --xattrs-include=trusted* -xf archive.tar
42610
42611 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
42612 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
42613 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
42614 )"
42615 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
42616 ( $at_check_trace;
42617 mkdir oldgnu
42618 (cd oldgnu
42619 TEST_TAR_FORMAT=oldgnu
42620 export TEST_TAR_FORMAT
42621 TAR_OPTIONS="-H oldgnu"
42622 export TAR_OPTIONS
42623 rm -rf *
42624
42625
42626 echo "test" > $$
42627 chmod 0 $$
42628 cat $$ > /dev/null 2>&1
42629 result=$?
42630 rm -f $$
42631 test $result -eq 0 || exit 77
42632
42633
42634
42635   file=$(TMPDIR=. mktemp fiXXXXXX)
42636
42637   setfattr -n user.test -v test $file &> /dev/null
42638   if test "$?" != 0; then
42639     exit 77
42640   fi
42641
42642
42643   getfattr $file &> /dev/null
42644   if test "$?" != 0; then
42645     exit 77
42646   fi
42647
42648
42649   file=$(TMPDIR=. mktemp fiXXXXXX)
42650   setfattr -n user.test -v ahoj $file
42651   # check whether tar fails to store xattrs
42652   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42653   if test "$err" != "0"; then
42654     exit 77
42655   fi
42656
42657
42658 mkdir dir
42659 mkdir dir/subdir
42660 mkdir dir/subdir/subsubdir
42661 genfile --file dir/file1
42662 genfile --file dir/subdir/file2
42663
42664 setfattr -n trusted.test -v OurFile1Value dir/file1
42665 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
42666 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
42667
42668 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42669
42670 rm -rf dir
42671
42672 tar --xattrs --xattrs-include=trusted* -xf archive.tar
42673
42674 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
42675 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
42676 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
42677 )
42678 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42679 at_status=$? at_failed=false
42680 $at_check_filter
42681 at_fn_diff_devnull "$at_stderr" || at_failed=:
42682 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
42683 trusted.test=\"OurFile2Value\"
42684 trusted.test=\"OurDirValue\"
42685 " | \
42686   $at_diff - "$at_stdout" || at_failed=:
42687 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
42688 $at_failed && at_fn_log_failure
42689 $at_traceon; }
42690
42691               { set +x
42692 $as_echo "$at_srcdir/xattr03.at:28:
42693 mkdir ustar
42694 (cd ustar
42695 TEST_TAR_FORMAT=ustar
42696 export TEST_TAR_FORMAT
42697 TAR_OPTIONS=\"-H ustar\"
42698 export TAR_OPTIONS
42699 rm -rf *
42700
42701
42702 echo \"test\" > \$\$
42703 chmod 0 \$\$
42704 cat \$\$ > /dev/null 2>&1
42705 result=\$?
42706 rm -f \$\$
42707 test \$result -eq 0 || exit 77
42708
42709
42710
42711   file=\$(TMPDIR=. mktemp fiXXXXXX)
42712
42713   setfattr -n user.test -v test \$file &> /dev/null
42714   if test \"\$?\" != 0; then
42715     exit 77
42716   fi
42717
42718
42719   getfattr \$file &> /dev/null
42720   if test \"\$?\" != 0; then
42721     exit 77
42722   fi
42723
42724
42725   file=\$(TMPDIR=. mktemp fiXXXXXX)
42726   setfattr -n user.test -v ahoj \$file
42727   # check whether tar fails to store xattrs
42728   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42729   if test \"\$err\" != \"0\"; then
42730     exit 77
42731   fi
42732
42733
42734 mkdir dir
42735 mkdir dir/subdir
42736 mkdir dir/subdir/subsubdir
42737 genfile --file dir/file1
42738 genfile --file dir/subdir/file2
42739
42740 setfattr -n trusted.test -v OurFile1Value dir/file1
42741 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
42742 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
42743
42744 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42745
42746 rm -rf dir
42747
42748 tar --xattrs --xattrs-include=trusted* -xf archive.tar
42749
42750 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
42751 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
42752 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
42753 )"
42754 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
42755 ( $at_check_trace;
42756 mkdir ustar
42757 (cd ustar
42758 TEST_TAR_FORMAT=ustar
42759 export TEST_TAR_FORMAT
42760 TAR_OPTIONS="-H ustar"
42761 export TAR_OPTIONS
42762 rm -rf *
42763
42764
42765 echo "test" > $$
42766 chmod 0 $$
42767 cat $$ > /dev/null 2>&1
42768 result=$?
42769 rm -f $$
42770 test $result -eq 0 || exit 77
42771
42772
42773
42774   file=$(TMPDIR=. mktemp fiXXXXXX)
42775
42776   setfattr -n user.test -v test $file &> /dev/null
42777   if test "$?" != 0; then
42778     exit 77
42779   fi
42780
42781
42782   getfattr $file &> /dev/null
42783   if test "$?" != 0; then
42784     exit 77
42785   fi
42786
42787
42788   file=$(TMPDIR=. mktemp fiXXXXXX)
42789   setfattr -n user.test -v ahoj $file
42790   # check whether tar fails to store xattrs
42791   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42792   if test "$err" != "0"; then
42793     exit 77
42794   fi
42795
42796
42797 mkdir dir
42798 mkdir dir/subdir
42799 mkdir dir/subdir/subsubdir
42800 genfile --file dir/file1
42801 genfile --file dir/subdir/file2
42802
42803 setfattr -n trusted.test -v OurFile1Value dir/file1
42804 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
42805 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
42806
42807 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42808
42809 rm -rf dir
42810
42811 tar --xattrs --xattrs-include=trusted* -xf archive.tar
42812
42813 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
42814 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
42815 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
42816 )
42817 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42818 at_status=$? at_failed=false
42819 $at_check_filter
42820 at_fn_diff_devnull "$at_stderr" || at_failed=:
42821 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
42822 trusted.test=\"OurFile2Value\"
42823 trusted.test=\"OurDirValue\"
42824 " | \
42825   $at_diff - "$at_stdout" || at_failed=:
42826 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
42827 $at_failed && at_fn_log_failure
42828 $at_traceon; }
42829
42830               { set +x
42831 $as_echo "$at_srcdir/xattr03.at:28:
42832 mkdir posix
42833 (cd posix
42834 TEST_TAR_FORMAT=posix
42835 export TEST_TAR_FORMAT
42836 TAR_OPTIONS=\"-H posix\"
42837 export TAR_OPTIONS
42838 rm -rf *
42839
42840
42841 echo \"test\" > \$\$
42842 chmod 0 \$\$
42843 cat \$\$ > /dev/null 2>&1
42844 result=\$?
42845 rm -f \$\$
42846 test \$result -eq 0 || exit 77
42847
42848
42849
42850   file=\$(TMPDIR=. mktemp fiXXXXXX)
42851
42852   setfattr -n user.test -v test \$file &> /dev/null
42853   if test \"\$?\" != 0; then
42854     exit 77
42855   fi
42856
42857
42858   getfattr \$file &> /dev/null
42859   if test \"\$?\" != 0; then
42860     exit 77
42861   fi
42862
42863
42864   file=\$(TMPDIR=. mktemp fiXXXXXX)
42865   setfattr -n user.test -v ahoj \$file
42866   # check whether tar fails to store xattrs
42867   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42868   if test \"\$err\" != \"0\"; then
42869     exit 77
42870   fi
42871
42872
42873 mkdir dir
42874 mkdir dir/subdir
42875 mkdir dir/subdir/subsubdir
42876 genfile --file dir/file1
42877 genfile --file dir/subdir/file2
42878
42879 setfattr -n trusted.test -v OurFile1Value dir/file1
42880 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
42881 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
42882
42883 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42884
42885 rm -rf dir
42886
42887 tar --xattrs --xattrs-include=trusted* -xf archive.tar
42888
42889 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
42890 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
42891 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
42892 )"
42893 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
42894 ( $at_check_trace;
42895 mkdir posix
42896 (cd posix
42897 TEST_TAR_FORMAT=posix
42898 export TEST_TAR_FORMAT
42899 TAR_OPTIONS="-H posix"
42900 export TAR_OPTIONS
42901 rm -rf *
42902
42903
42904 echo "test" > $$
42905 chmod 0 $$
42906 cat $$ > /dev/null 2>&1
42907 result=$?
42908 rm -f $$
42909 test $result -eq 0 || exit 77
42910
42911
42912
42913   file=$(TMPDIR=. mktemp fiXXXXXX)
42914
42915   setfattr -n user.test -v test $file &> /dev/null
42916   if test "$?" != 0; then
42917     exit 77
42918   fi
42919
42920
42921   getfattr $file &> /dev/null
42922   if test "$?" != 0; then
42923     exit 77
42924   fi
42925
42926
42927   file=$(TMPDIR=. mktemp fiXXXXXX)
42928   setfattr -n user.test -v ahoj $file
42929   # check whether tar fails to store xattrs
42930   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42931   if test "$err" != "0"; then
42932     exit 77
42933   fi
42934
42935
42936 mkdir dir
42937 mkdir dir/subdir
42938 mkdir dir/subdir/subsubdir
42939 genfile --file dir/file1
42940 genfile --file dir/subdir/file2
42941
42942 setfattr -n trusted.test -v OurFile1Value dir/file1
42943 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
42944 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
42945
42946 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
42947
42948 rm -rf dir
42949
42950 tar --xattrs --xattrs-include=trusted* -xf archive.tar
42951
42952 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
42953 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
42954 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
42955 )
42956 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42957 at_status=$? at_failed=false
42958 $at_check_filter
42959 at_fn_diff_devnull "$at_stderr" || at_failed=:
42960 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
42961 trusted.test=\"OurFile2Value\"
42962 trusted.test=\"OurDirValue\"
42963 " | \
42964   $at_diff - "$at_stdout" || at_failed=:
42965 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
42966 $at_failed && at_fn_log_failure
42967 $at_traceon; }
42968
42969               { set +x
42970 $as_echo "$at_srcdir/xattr03.at:28:
42971 mkdir gnu
42972 (cd gnu
42973 TEST_TAR_FORMAT=gnu
42974 export TEST_TAR_FORMAT
42975 TAR_OPTIONS=\"-H gnu\"
42976 export TAR_OPTIONS
42977 rm -rf *
42978
42979
42980 echo \"test\" > \$\$
42981 chmod 0 \$\$
42982 cat \$\$ > /dev/null 2>&1
42983 result=\$?
42984 rm -f \$\$
42985 test \$result -eq 0 || exit 77
42986
42987
42988
42989   file=\$(TMPDIR=. mktemp fiXXXXXX)
42990
42991   setfattr -n user.test -v test \$file &> /dev/null
42992   if test \"\$?\" != 0; then
42993     exit 77
42994   fi
42995
42996
42997   getfattr \$file &> /dev/null
42998   if test \"\$?\" != 0; then
42999     exit 77
43000   fi
43001
43002
43003   file=\$(TMPDIR=. mktemp fiXXXXXX)
43004   setfattr -n user.test -v ahoj \$file
43005   # check whether tar fails to store xattrs
43006   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43007   if test \"\$err\" != \"0\"; then
43008     exit 77
43009   fi
43010
43011
43012 mkdir dir
43013 mkdir dir/subdir
43014 mkdir dir/subdir/subsubdir
43015 genfile --file dir/file1
43016 genfile --file dir/subdir/file2
43017
43018 setfattr -n trusted.test -v OurFile1Value dir/file1
43019 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
43020 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
43021
43022 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
43023
43024 rm -rf dir
43025
43026 tar --xattrs --xattrs-include=trusted* -xf archive.tar
43027
43028 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
43029 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
43030 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
43031 )"
43032 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
43033 ( $at_check_trace;
43034 mkdir gnu
43035 (cd gnu
43036 TEST_TAR_FORMAT=gnu
43037 export TEST_TAR_FORMAT
43038 TAR_OPTIONS="-H gnu"
43039 export TAR_OPTIONS
43040 rm -rf *
43041
43042
43043 echo "test" > $$
43044 chmod 0 $$
43045 cat $$ > /dev/null 2>&1
43046 result=$?
43047 rm -f $$
43048 test $result -eq 0 || exit 77
43049
43050
43051
43052   file=$(TMPDIR=. mktemp fiXXXXXX)
43053
43054   setfattr -n user.test -v test $file &> /dev/null
43055   if test "$?" != 0; then
43056     exit 77
43057   fi
43058
43059
43060   getfattr $file &> /dev/null
43061   if test "$?" != 0; then
43062     exit 77
43063   fi
43064
43065
43066   file=$(TMPDIR=. mktemp fiXXXXXX)
43067   setfattr -n user.test -v ahoj $file
43068   # check whether tar fails to store xattrs
43069   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43070   if test "$err" != "0"; then
43071     exit 77
43072   fi
43073
43074
43075 mkdir dir
43076 mkdir dir/subdir
43077 mkdir dir/subdir/subsubdir
43078 genfile --file dir/file1
43079 genfile --file dir/subdir/file2
43080
43081 setfattr -n trusted.test -v OurFile1Value dir/file1
43082 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
43083 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
43084
43085 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
43086
43087 rm -rf dir
43088
43089 tar --xattrs --xattrs-include=trusted* -xf archive.tar
43090
43091 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
43092 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
43093 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
43094 )
43095 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43096 at_status=$? at_failed=false
43097 $at_check_filter
43098 at_fn_diff_devnull "$at_stderr" || at_failed=:
43099 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
43100 trusted.test=\"OurFile2Value\"
43101 trusted.test=\"OurDirValue\"
43102 " | \
43103   $at_diff - "$at_stdout" || at_failed=:
43104 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
43105 $at_failed && at_fn_log_failure
43106 $at_traceon; }
43107
43108
43109
43110
43111   set +x
43112   $at_times_p && times >"$at_times_file"
43113 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
43114 read at_status <"$at_status_file"
43115 #AT_STOP_185
43116 #AT_START_186
43117 at_fn_group_banner 186 'xattr04.at:26' \
43118   "xattrs: s/open/openat/ regression" "              " 25
43119 at_xfail=no
43120       test -f $XFAILFILE && at_xfail=yes
43121 (
43122   $as_echo "186. $at_setup_line: testing $at_desc ..."
43123   $at_traceon
43124
43125
43126
43127
43128
43129   { set +x
43130 $as_echo "$at_srcdir/xattr04.at:29:
43131 mkdir v7
43132 (cd v7
43133 TEST_TAR_FORMAT=v7
43134 export TEST_TAR_FORMAT
43135 TAR_OPTIONS=\"-H v7\"
43136 export TAR_OPTIONS
43137 rm -rf *
43138
43139
43140
43141   file=\$(TMPDIR=. mktemp fiXXXXXX)
43142
43143   setfattr -n user.test -v test \$file &> /dev/null
43144   if test \"\$?\" != 0; then
43145     exit 77
43146   fi
43147
43148
43149   getfattr \$file &> /dev/null
43150   if test \"\$?\" != 0; then
43151     exit 77
43152   fi
43153
43154
43155   file=\$(TMPDIR=. mktemp fiXXXXXX)
43156   setfattr -n user.test -v ahoj \$file
43157   # check whether tar fails to store xattrs
43158   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43159   if test \"\$err\" != \"0\"; then
43160     exit 77
43161   fi
43162
43163
43164 mkdir dir
43165 mkdir output
43166 genfile --file dir/file
43167
43168 setfattr -n user.test -v value dir/file
43169
43170 # archive whole directory including binary xattrs
43171 tar --xattrs -cf archive.tar -C dir .
43172
43173 tar --xattrs -xf archive.tar -C output
43174 ret=\$?
43175 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
43176 exit \$ret
43177 )"
43178 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
43179 ( $at_check_trace;
43180 mkdir v7
43181 (cd v7
43182 TEST_TAR_FORMAT=v7
43183 export TEST_TAR_FORMAT
43184 TAR_OPTIONS="-H v7"
43185 export TAR_OPTIONS
43186 rm -rf *
43187
43188
43189
43190   file=$(TMPDIR=. mktemp fiXXXXXX)
43191
43192   setfattr -n user.test -v test $file &> /dev/null
43193   if test "$?" != 0; then
43194     exit 77
43195   fi
43196
43197
43198   getfattr $file &> /dev/null
43199   if test "$?" != 0; then
43200     exit 77
43201   fi
43202
43203
43204   file=$(TMPDIR=. mktemp fiXXXXXX)
43205   setfattr -n user.test -v ahoj $file
43206   # check whether tar fails to store xattrs
43207   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43208   if test "$err" != "0"; then
43209     exit 77
43210   fi
43211
43212
43213 mkdir dir
43214 mkdir output
43215 genfile --file dir/file
43216
43217 setfattr -n user.test -v value dir/file
43218
43219 # archive whole directory including binary xattrs
43220 tar --xattrs -cf archive.tar -C dir .
43221
43222 tar --xattrs -xf archive.tar -C output
43223 ret=$?
43224 getfattr -h -d output/file | grep -v -e '^#' -e ^$
43225 exit $ret
43226 )
43227 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43228 at_status=$? at_failed=false
43229 $at_check_filter
43230 at_fn_diff_devnull "$at_stderr" || at_failed=:
43231 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
43232 " | \
43233   $at_diff - "$at_stdout" || at_failed=:
43234 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
43235 $at_failed && at_fn_log_failure
43236 $at_traceon; }
43237
43238               { set +x
43239 $as_echo "$at_srcdir/xattr04.at:29:
43240 mkdir oldgnu
43241 (cd oldgnu
43242 TEST_TAR_FORMAT=oldgnu
43243 export TEST_TAR_FORMAT
43244 TAR_OPTIONS=\"-H oldgnu\"
43245 export TAR_OPTIONS
43246 rm -rf *
43247
43248
43249
43250   file=\$(TMPDIR=. mktemp fiXXXXXX)
43251
43252   setfattr -n user.test -v test \$file &> /dev/null
43253   if test \"\$?\" != 0; then
43254     exit 77
43255   fi
43256
43257
43258   getfattr \$file &> /dev/null
43259   if test \"\$?\" != 0; then
43260     exit 77
43261   fi
43262
43263
43264   file=\$(TMPDIR=. mktemp fiXXXXXX)
43265   setfattr -n user.test -v ahoj \$file
43266   # check whether tar fails to store xattrs
43267   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43268   if test \"\$err\" != \"0\"; then
43269     exit 77
43270   fi
43271
43272
43273 mkdir dir
43274 mkdir output
43275 genfile --file dir/file
43276
43277 setfattr -n user.test -v value dir/file
43278
43279 # archive whole directory including binary xattrs
43280 tar --xattrs -cf archive.tar -C dir .
43281
43282 tar --xattrs -xf archive.tar -C output
43283 ret=\$?
43284 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
43285 exit \$ret
43286 )"
43287 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
43288 ( $at_check_trace;
43289 mkdir oldgnu
43290 (cd oldgnu
43291 TEST_TAR_FORMAT=oldgnu
43292 export TEST_TAR_FORMAT
43293 TAR_OPTIONS="-H oldgnu"
43294 export TAR_OPTIONS
43295 rm -rf *
43296
43297
43298
43299   file=$(TMPDIR=. mktemp fiXXXXXX)
43300
43301   setfattr -n user.test -v test $file &> /dev/null
43302   if test "$?" != 0; then
43303     exit 77
43304   fi
43305
43306
43307   getfattr $file &> /dev/null
43308   if test "$?" != 0; then
43309     exit 77
43310   fi
43311
43312
43313   file=$(TMPDIR=. mktemp fiXXXXXX)
43314   setfattr -n user.test -v ahoj $file
43315   # check whether tar fails to store xattrs
43316   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43317   if test "$err" != "0"; then
43318     exit 77
43319   fi
43320
43321
43322 mkdir dir
43323 mkdir output
43324 genfile --file dir/file
43325
43326 setfattr -n user.test -v value dir/file
43327
43328 # archive whole directory including binary xattrs
43329 tar --xattrs -cf archive.tar -C dir .
43330
43331 tar --xattrs -xf archive.tar -C output
43332 ret=$?
43333 getfattr -h -d output/file | grep -v -e '^#' -e ^$
43334 exit $ret
43335 )
43336 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43337 at_status=$? at_failed=false
43338 $at_check_filter
43339 at_fn_diff_devnull "$at_stderr" || at_failed=:
43340 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
43341 " | \
43342   $at_diff - "$at_stdout" || at_failed=:
43343 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
43344 $at_failed && at_fn_log_failure
43345 $at_traceon; }
43346
43347               { set +x
43348 $as_echo "$at_srcdir/xattr04.at:29:
43349 mkdir ustar
43350 (cd ustar
43351 TEST_TAR_FORMAT=ustar
43352 export TEST_TAR_FORMAT
43353 TAR_OPTIONS=\"-H ustar\"
43354 export TAR_OPTIONS
43355 rm -rf *
43356
43357
43358
43359   file=\$(TMPDIR=. mktemp fiXXXXXX)
43360
43361   setfattr -n user.test -v test \$file &> /dev/null
43362   if test \"\$?\" != 0; then
43363     exit 77
43364   fi
43365
43366
43367   getfattr \$file &> /dev/null
43368   if test \"\$?\" != 0; then
43369     exit 77
43370   fi
43371
43372
43373   file=\$(TMPDIR=. mktemp fiXXXXXX)
43374   setfattr -n user.test -v ahoj \$file
43375   # check whether tar fails to store xattrs
43376   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43377   if test \"\$err\" != \"0\"; then
43378     exit 77
43379   fi
43380
43381
43382 mkdir dir
43383 mkdir output
43384 genfile --file dir/file
43385
43386 setfattr -n user.test -v value dir/file
43387
43388 # archive whole directory including binary xattrs
43389 tar --xattrs -cf archive.tar -C dir .
43390
43391 tar --xattrs -xf archive.tar -C output
43392 ret=\$?
43393 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
43394 exit \$ret
43395 )"
43396 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
43397 ( $at_check_trace;
43398 mkdir ustar
43399 (cd ustar
43400 TEST_TAR_FORMAT=ustar
43401 export TEST_TAR_FORMAT
43402 TAR_OPTIONS="-H ustar"
43403 export TAR_OPTIONS
43404 rm -rf *
43405
43406
43407
43408   file=$(TMPDIR=. mktemp fiXXXXXX)
43409
43410   setfattr -n user.test -v test $file &> /dev/null
43411   if test "$?" != 0; then
43412     exit 77
43413   fi
43414
43415
43416   getfattr $file &> /dev/null
43417   if test "$?" != 0; then
43418     exit 77
43419   fi
43420
43421
43422   file=$(TMPDIR=. mktemp fiXXXXXX)
43423   setfattr -n user.test -v ahoj $file
43424   # check whether tar fails to store xattrs
43425   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43426   if test "$err" != "0"; then
43427     exit 77
43428   fi
43429
43430
43431 mkdir dir
43432 mkdir output
43433 genfile --file dir/file
43434
43435 setfattr -n user.test -v value dir/file
43436
43437 # archive whole directory including binary xattrs
43438 tar --xattrs -cf archive.tar -C dir .
43439
43440 tar --xattrs -xf archive.tar -C output
43441 ret=$?
43442 getfattr -h -d output/file | grep -v -e '^#' -e ^$
43443 exit $ret
43444 )
43445 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43446 at_status=$? at_failed=false
43447 $at_check_filter
43448 at_fn_diff_devnull "$at_stderr" || at_failed=:
43449 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
43450 " | \
43451   $at_diff - "$at_stdout" || at_failed=:
43452 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
43453 $at_failed && at_fn_log_failure
43454 $at_traceon; }
43455
43456               { set +x
43457 $as_echo "$at_srcdir/xattr04.at:29:
43458 mkdir posix
43459 (cd posix
43460 TEST_TAR_FORMAT=posix
43461 export TEST_TAR_FORMAT
43462 TAR_OPTIONS=\"-H posix\"
43463 export TAR_OPTIONS
43464 rm -rf *
43465
43466
43467
43468   file=\$(TMPDIR=. mktemp fiXXXXXX)
43469
43470   setfattr -n user.test -v test \$file &> /dev/null
43471   if test \"\$?\" != 0; then
43472     exit 77
43473   fi
43474
43475
43476   getfattr \$file &> /dev/null
43477   if test \"\$?\" != 0; then
43478     exit 77
43479   fi
43480
43481
43482   file=\$(TMPDIR=. mktemp fiXXXXXX)
43483   setfattr -n user.test -v ahoj \$file
43484   # check whether tar fails to store xattrs
43485   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43486   if test \"\$err\" != \"0\"; then
43487     exit 77
43488   fi
43489
43490
43491 mkdir dir
43492 mkdir output
43493 genfile --file dir/file
43494
43495 setfattr -n user.test -v value dir/file
43496
43497 # archive whole directory including binary xattrs
43498 tar --xattrs -cf archive.tar -C dir .
43499
43500 tar --xattrs -xf archive.tar -C output
43501 ret=\$?
43502 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
43503 exit \$ret
43504 )"
43505 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
43506 ( $at_check_trace;
43507 mkdir posix
43508 (cd posix
43509 TEST_TAR_FORMAT=posix
43510 export TEST_TAR_FORMAT
43511 TAR_OPTIONS="-H posix"
43512 export TAR_OPTIONS
43513 rm -rf *
43514
43515
43516
43517   file=$(TMPDIR=. mktemp fiXXXXXX)
43518
43519   setfattr -n user.test -v test $file &> /dev/null
43520   if test "$?" != 0; then
43521     exit 77
43522   fi
43523
43524
43525   getfattr $file &> /dev/null
43526   if test "$?" != 0; then
43527     exit 77
43528   fi
43529
43530
43531   file=$(TMPDIR=. mktemp fiXXXXXX)
43532   setfattr -n user.test -v ahoj $file
43533   # check whether tar fails to store xattrs
43534   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43535   if test "$err" != "0"; then
43536     exit 77
43537   fi
43538
43539
43540 mkdir dir
43541 mkdir output
43542 genfile --file dir/file
43543
43544 setfattr -n user.test -v value dir/file
43545
43546 # archive whole directory including binary xattrs
43547 tar --xattrs -cf archive.tar -C dir .
43548
43549 tar --xattrs -xf archive.tar -C output
43550 ret=$?
43551 getfattr -h -d output/file | grep -v -e '^#' -e ^$
43552 exit $ret
43553 )
43554 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43555 at_status=$? at_failed=false
43556 $at_check_filter
43557 at_fn_diff_devnull "$at_stderr" || at_failed=:
43558 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
43559 " | \
43560   $at_diff - "$at_stdout" || at_failed=:
43561 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
43562 $at_failed && at_fn_log_failure
43563 $at_traceon; }
43564
43565               { set +x
43566 $as_echo "$at_srcdir/xattr04.at:29:
43567 mkdir gnu
43568 (cd gnu
43569 TEST_TAR_FORMAT=gnu
43570 export TEST_TAR_FORMAT
43571 TAR_OPTIONS=\"-H gnu\"
43572 export TAR_OPTIONS
43573 rm -rf *
43574
43575
43576
43577   file=\$(TMPDIR=. mktemp fiXXXXXX)
43578
43579   setfattr -n user.test -v test \$file &> /dev/null
43580   if test \"\$?\" != 0; then
43581     exit 77
43582   fi
43583
43584
43585   getfattr \$file &> /dev/null
43586   if test \"\$?\" != 0; then
43587     exit 77
43588   fi
43589
43590
43591   file=\$(TMPDIR=. mktemp fiXXXXXX)
43592   setfattr -n user.test -v ahoj \$file
43593   # check whether tar fails to store xattrs
43594   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43595   if test \"\$err\" != \"0\"; then
43596     exit 77
43597   fi
43598
43599
43600 mkdir dir
43601 mkdir output
43602 genfile --file dir/file
43603
43604 setfattr -n user.test -v value dir/file
43605
43606 # archive whole directory including binary xattrs
43607 tar --xattrs -cf archive.tar -C dir .
43608
43609 tar --xattrs -xf archive.tar -C output
43610 ret=\$?
43611 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
43612 exit \$ret
43613 )"
43614 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
43615 ( $at_check_trace;
43616 mkdir gnu
43617 (cd gnu
43618 TEST_TAR_FORMAT=gnu
43619 export TEST_TAR_FORMAT
43620 TAR_OPTIONS="-H gnu"
43621 export TAR_OPTIONS
43622 rm -rf *
43623
43624
43625
43626   file=$(TMPDIR=. mktemp fiXXXXXX)
43627
43628   setfattr -n user.test -v test $file &> /dev/null
43629   if test "$?" != 0; then
43630     exit 77
43631   fi
43632
43633
43634   getfattr $file &> /dev/null
43635   if test "$?" != 0; then
43636     exit 77
43637   fi
43638
43639
43640   file=$(TMPDIR=. mktemp fiXXXXXX)
43641   setfattr -n user.test -v ahoj $file
43642   # check whether tar fails to store xattrs
43643   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43644   if test "$err" != "0"; then
43645     exit 77
43646   fi
43647
43648
43649 mkdir dir
43650 mkdir output
43651 genfile --file dir/file
43652
43653 setfattr -n user.test -v value dir/file
43654
43655 # archive whole directory including binary xattrs
43656 tar --xattrs -cf archive.tar -C dir .
43657
43658 tar --xattrs -xf archive.tar -C output
43659 ret=$?
43660 getfattr -h -d output/file | grep -v -e '^#' -e ^$
43661 exit $ret
43662 )
43663 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43664 at_status=$? at_failed=false
43665 $at_check_filter
43666 at_fn_diff_devnull "$at_stderr" || at_failed=:
43667 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
43668 " | \
43669   $at_diff - "$at_stdout" || at_failed=:
43670 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
43671 $at_failed && at_fn_log_failure
43672 $at_traceon; }
43673
43674
43675
43676
43677   set +x
43678   $at_times_p && times >"$at_times_file"
43679 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
43680 read at_status <"$at_status_file"
43681 #AT_STOP_186
43682 #AT_START_187
43683 at_fn_group_banner 187 'xattr05.at:28' \
43684   "xattrs: keywords with '=' and '%'" "              " 25
43685 at_xfail=no
43686       test -f $XFAILFILE && at_xfail=yes
43687 (
43688   $as_echo "187. $at_setup_line: testing $at_desc ..."
43689   $at_traceon
43690
43691
43692
43693
43694
43695   { set +x
43696 $as_echo "$at_srcdir/xattr05.at:31:
43697 mkdir v7
43698 (cd v7
43699 TEST_TAR_FORMAT=v7
43700 export TEST_TAR_FORMAT
43701 TAR_OPTIONS=\"-H v7\"
43702 export TAR_OPTIONS
43703 rm -rf *
43704
43705
43706
43707   file=\$(TMPDIR=. mktemp fiXXXXXX)
43708
43709   setfattr -n user.test -v test \$file &> /dev/null
43710   if test \"\$?\" != 0; then
43711     exit 77
43712   fi
43713
43714
43715   getfattr \$file &> /dev/null
43716   if test \"\$?\" != 0; then
43717     exit 77
43718   fi
43719
43720
43721   file=\$(TMPDIR=. mktemp fiXXXXXX)
43722   setfattr -n user.test -v ahoj \$file
43723   # check whether tar fails to store xattrs
43724   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43725   if test \"\$err\" != \"0\"; then
43726     exit 77
43727   fi
43728
43729
43730 mkdir dir
43731 mkdir output
43732 genfile --file dir/file
43733
43734 setfattr -n user.=NAME%3D= -v value dir/file
43735 getfattr -d dir/file | grep -v '# ' > before
43736
43737 # archive whole directory including binary xattrs
43738 tar --xattrs -cf archive.tar -C dir .
43739
43740 tar --xattrs -xf archive.tar -C output
43741 getfattr -d output/file | grep -v '# ' > after
43742 diff before after
43743 )"
43744 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
43745 ( $at_check_trace;
43746 mkdir v7
43747 (cd v7
43748 TEST_TAR_FORMAT=v7
43749 export TEST_TAR_FORMAT
43750 TAR_OPTIONS="-H v7"
43751 export TAR_OPTIONS
43752 rm -rf *
43753
43754
43755
43756   file=$(TMPDIR=. mktemp fiXXXXXX)
43757
43758   setfattr -n user.test -v test $file &> /dev/null
43759   if test "$?" != 0; then
43760     exit 77
43761   fi
43762
43763
43764   getfattr $file &> /dev/null
43765   if test "$?" != 0; then
43766     exit 77
43767   fi
43768
43769
43770   file=$(TMPDIR=. mktemp fiXXXXXX)
43771   setfattr -n user.test -v ahoj $file
43772   # check whether tar fails to store xattrs
43773   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43774   if test "$err" != "0"; then
43775     exit 77
43776   fi
43777
43778
43779 mkdir dir
43780 mkdir output
43781 genfile --file dir/file
43782
43783 setfattr -n user.=NAME%3D= -v value dir/file
43784 getfattr -d dir/file | grep -v '# ' > before
43785
43786 # archive whole directory including binary xattrs
43787 tar --xattrs -cf archive.tar -C dir .
43788
43789 tar --xattrs -xf archive.tar -C output
43790 getfattr -d output/file | grep -v '# ' > after
43791 diff before after
43792 )
43793 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43794 at_status=$? at_failed=false
43795 $at_check_filter
43796 at_fn_diff_devnull "$at_stderr" || at_failed=:
43797 at_fn_diff_devnull "$at_stdout" || at_failed=:
43798 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
43799 $at_failed && at_fn_log_failure
43800 $at_traceon; }
43801
43802               { set +x
43803 $as_echo "$at_srcdir/xattr05.at:31:
43804 mkdir oldgnu
43805 (cd oldgnu
43806 TEST_TAR_FORMAT=oldgnu
43807 export TEST_TAR_FORMAT
43808 TAR_OPTIONS=\"-H oldgnu\"
43809 export TAR_OPTIONS
43810 rm -rf *
43811
43812
43813
43814   file=\$(TMPDIR=. mktemp fiXXXXXX)
43815
43816   setfattr -n user.test -v test \$file &> /dev/null
43817   if test \"\$?\" != 0; then
43818     exit 77
43819   fi
43820
43821
43822   getfattr \$file &> /dev/null
43823   if test \"\$?\" != 0; then
43824     exit 77
43825   fi
43826
43827
43828   file=\$(TMPDIR=. mktemp fiXXXXXX)
43829   setfattr -n user.test -v ahoj \$file
43830   # check whether tar fails to store xattrs
43831   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43832   if test \"\$err\" != \"0\"; then
43833     exit 77
43834   fi
43835
43836
43837 mkdir dir
43838 mkdir output
43839 genfile --file dir/file
43840
43841 setfattr -n user.=NAME%3D= -v value dir/file
43842 getfattr -d dir/file | grep -v '# ' > before
43843
43844 # archive whole directory including binary xattrs
43845 tar --xattrs -cf archive.tar -C dir .
43846
43847 tar --xattrs -xf archive.tar -C output
43848 getfattr -d output/file | grep -v '# ' > after
43849 diff before after
43850 )"
43851 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
43852 ( $at_check_trace;
43853 mkdir oldgnu
43854 (cd oldgnu
43855 TEST_TAR_FORMAT=oldgnu
43856 export TEST_TAR_FORMAT
43857 TAR_OPTIONS="-H oldgnu"
43858 export TAR_OPTIONS
43859 rm -rf *
43860
43861
43862
43863   file=$(TMPDIR=. mktemp fiXXXXXX)
43864
43865   setfattr -n user.test -v test $file &> /dev/null
43866   if test "$?" != 0; then
43867     exit 77
43868   fi
43869
43870
43871   getfattr $file &> /dev/null
43872   if test "$?" != 0; then
43873     exit 77
43874   fi
43875
43876
43877   file=$(TMPDIR=. mktemp fiXXXXXX)
43878   setfattr -n user.test -v ahoj $file
43879   # check whether tar fails to store xattrs
43880   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43881   if test "$err" != "0"; then
43882     exit 77
43883   fi
43884
43885
43886 mkdir dir
43887 mkdir output
43888 genfile --file dir/file
43889
43890 setfattr -n user.=NAME%3D= -v value dir/file
43891 getfattr -d dir/file | grep -v '# ' > before
43892
43893 # archive whole directory including binary xattrs
43894 tar --xattrs -cf archive.tar -C dir .
43895
43896 tar --xattrs -xf archive.tar -C output
43897 getfattr -d output/file | grep -v '# ' > after
43898 diff before after
43899 )
43900 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43901 at_status=$? at_failed=false
43902 $at_check_filter
43903 at_fn_diff_devnull "$at_stderr" || at_failed=:
43904 at_fn_diff_devnull "$at_stdout" || at_failed=:
43905 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
43906 $at_failed && at_fn_log_failure
43907 $at_traceon; }
43908
43909               { set +x
43910 $as_echo "$at_srcdir/xattr05.at:31:
43911 mkdir ustar
43912 (cd ustar
43913 TEST_TAR_FORMAT=ustar
43914 export TEST_TAR_FORMAT
43915 TAR_OPTIONS=\"-H ustar\"
43916 export TAR_OPTIONS
43917 rm -rf *
43918
43919
43920
43921   file=\$(TMPDIR=. mktemp fiXXXXXX)
43922
43923   setfattr -n user.test -v test \$file &> /dev/null
43924   if test \"\$?\" != 0; then
43925     exit 77
43926   fi
43927
43928
43929   getfattr \$file &> /dev/null
43930   if test \"\$?\" != 0; then
43931     exit 77
43932   fi
43933
43934
43935   file=\$(TMPDIR=. mktemp fiXXXXXX)
43936   setfattr -n user.test -v ahoj \$file
43937   # check whether tar fails to store xattrs
43938   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43939   if test \"\$err\" != \"0\"; then
43940     exit 77
43941   fi
43942
43943
43944 mkdir dir
43945 mkdir output
43946 genfile --file dir/file
43947
43948 setfattr -n user.=NAME%3D= -v value dir/file
43949 getfattr -d dir/file | grep -v '# ' > before
43950
43951 # archive whole directory including binary xattrs
43952 tar --xattrs -cf archive.tar -C dir .
43953
43954 tar --xattrs -xf archive.tar -C output
43955 getfattr -d output/file | grep -v '# ' > after
43956 diff before after
43957 )"
43958 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
43959 ( $at_check_trace;
43960 mkdir ustar
43961 (cd ustar
43962 TEST_TAR_FORMAT=ustar
43963 export TEST_TAR_FORMAT
43964 TAR_OPTIONS="-H ustar"
43965 export TAR_OPTIONS
43966 rm -rf *
43967
43968
43969
43970   file=$(TMPDIR=. mktemp fiXXXXXX)
43971
43972   setfattr -n user.test -v test $file &> /dev/null
43973   if test "$?" != 0; then
43974     exit 77
43975   fi
43976
43977
43978   getfattr $file &> /dev/null
43979   if test "$?" != 0; then
43980     exit 77
43981   fi
43982
43983
43984   file=$(TMPDIR=. mktemp fiXXXXXX)
43985   setfattr -n user.test -v ahoj $file
43986   # check whether tar fails to store xattrs
43987   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43988   if test "$err" != "0"; then
43989     exit 77
43990   fi
43991
43992
43993 mkdir dir
43994 mkdir output
43995 genfile --file dir/file
43996
43997 setfattr -n user.=NAME%3D= -v value dir/file
43998 getfattr -d dir/file | grep -v '# ' > before
43999
44000 # archive whole directory including binary xattrs
44001 tar --xattrs -cf archive.tar -C dir .
44002
44003 tar --xattrs -xf archive.tar -C output
44004 getfattr -d output/file | grep -v '# ' > after
44005 diff before after
44006 )
44007 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44008 at_status=$? at_failed=false
44009 $at_check_filter
44010 at_fn_diff_devnull "$at_stderr" || at_failed=:
44011 at_fn_diff_devnull "$at_stdout" || at_failed=:
44012 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
44013 $at_failed && at_fn_log_failure
44014 $at_traceon; }
44015
44016               { set +x
44017 $as_echo "$at_srcdir/xattr05.at:31:
44018 mkdir posix
44019 (cd posix
44020 TEST_TAR_FORMAT=posix
44021 export TEST_TAR_FORMAT
44022 TAR_OPTIONS=\"-H posix\"
44023 export TAR_OPTIONS
44024 rm -rf *
44025
44026
44027
44028   file=\$(TMPDIR=. mktemp fiXXXXXX)
44029
44030   setfattr -n user.test -v test \$file &> /dev/null
44031   if test \"\$?\" != 0; then
44032     exit 77
44033   fi
44034
44035
44036   getfattr \$file &> /dev/null
44037   if test \"\$?\" != 0; then
44038     exit 77
44039   fi
44040
44041
44042   file=\$(TMPDIR=. mktemp fiXXXXXX)
44043   setfattr -n user.test -v ahoj \$file
44044   # check whether tar fails to store xattrs
44045   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44046   if test \"\$err\" != \"0\"; then
44047     exit 77
44048   fi
44049
44050
44051 mkdir dir
44052 mkdir output
44053 genfile --file dir/file
44054
44055 setfattr -n user.=NAME%3D= -v value dir/file
44056 getfattr -d dir/file | grep -v '# ' > before
44057
44058 # archive whole directory including binary xattrs
44059 tar --xattrs -cf archive.tar -C dir .
44060
44061 tar --xattrs -xf archive.tar -C output
44062 getfattr -d output/file | grep -v '# ' > after
44063 diff before after
44064 )"
44065 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
44066 ( $at_check_trace;
44067 mkdir posix
44068 (cd posix
44069 TEST_TAR_FORMAT=posix
44070 export TEST_TAR_FORMAT
44071 TAR_OPTIONS="-H posix"
44072 export TAR_OPTIONS
44073 rm -rf *
44074
44075
44076
44077   file=$(TMPDIR=. mktemp fiXXXXXX)
44078
44079   setfattr -n user.test -v test $file &> /dev/null
44080   if test "$?" != 0; then
44081     exit 77
44082   fi
44083
44084
44085   getfattr $file &> /dev/null
44086   if test "$?" != 0; then
44087     exit 77
44088   fi
44089
44090
44091   file=$(TMPDIR=. mktemp fiXXXXXX)
44092   setfattr -n user.test -v ahoj $file
44093   # check whether tar fails to store xattrs
44094   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44095   if test "$err" != "0"; then
44096     exit 77
44097   fi
44098
44099
44100 mkdir dir
44101 mkdir output
44102 genfile --file dir/file
44103
44104 setfattr -n user.=NAME%3D= -v value dir/file
44105 getfattr -d dir/file | grep -v '# ' > before
44106
44107 # archive whole directory including binary xattrs
44108 tar --xattrs -cf archive.tar -C dir .
44109
44110 tar --xattrs -xf archive.tar -C output
44111 getfattr -d output/file | grep -v '# ' > after
44112 diff before after
44113 )
44114 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44115 at_status=$? at_failed=false
44116 $at_check_filter
44117 at_fn_diff_devnull "$at_stderr" || at_failed=:
44118 at_fn_diff_devnull "$at_stdout" || at_failed=:
44119 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
44120 $at_failed && at_fn_log_failure
44121 $at_traceon; }
44122
44123               { set +x
44124 $as_echo "$at_srcdir/xattr05.at:31:
44125 mkdir gnu
44126 (cd gnu
44127 TEST_TAR_FORMAT=gnu
44128 export TEST_TAR_FORMAT
44129 TAR_OPTIONS=\"-H gnu\"
44130 export TAR_OPTIONS
44131 rm -rf *
44132
44133
44134
44135   file=\$(TMPDIR=. mktemp fiXXXXXX)
44136
44137   setfattr -n user.test -v test \$file &> /dev/null
44138   if test \"\$?\" != 0; then
44139     exit 77
44140   fi
44141
44142
44143   getfattr \$file &> /dev/null
44144   if test \"\$?\" != 0; then
44145     exit 77
44146   fi
44147
44148
44149   file=\$(TMPDIR=. mktemp fiXXXXXX)
44150   setfattr -n user.test -v ahoj \$file
44151   # check whether tar fails to store xattrs
44152   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44153   if test \"\$err\" != \"0\"; then
44154     exit 77
44155   fi
44156
44157
44158 mkdir dir
44159 mkdir output
44160 genfile --file dir/file
44161
44162 setfattr -n user.=NAME%3D= -v value dir/file
44163 getfattr -d dir/file | grep -v '# ' > before
44164
44165 # archive whole directory including binary xattrs
44166 tar --xattrs -cf archive.tar -C dir .
44167
44168 tar --xattrs -xf archive.tar -C output
44169 getfattr -d output/file | grep -v '# ' > after
44170 diff before after
44171 )"
44172 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
44173 ( $at_check_trace;
44174 mkdir gnu
44175 (cd gnu
44176 TEST_TAR_FORMAT=gnu
44177 export TEST_TAR_FORMAT
44178 TAR_OPTIONS="-H gnu"
44179 export TAR_OPTIONS
44180 rm -rf *
44181
44182
44183
44184   file=$(TMPDIR=. mktemp fiXXXXXX)
44185
44186   setfattr -n user.test -v test $file &> /dev/null
44187   if test "$?" != 0; then
44188     exit 77
44189   fi
44190
44191
44192   getfattr $file &> /dev/null
44193   if test "$?" != 0; then
44194     exit 77
44195   fi
44196
44197
44198   file=$(TMPDIR=. mktemp fiXXXXXX)
44199   setfattr -n user.test -v ahoj $file
44200   # check whether tar fails to store xattrs
44201   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44202   if test "$err" != "0"; then
44203     exit 77
44204   fi
44205
44206
44207 mkdir dir
44208 mkdir output
44209 genfile --file dir/file
44210
44211 setfattr -n user.=NAME%3D= -v value dir/file
44212 getfattr -d dir/file | grep -v '# ' > before
44213
44214 # archive whole directory including binary xattrs
44215 tar --xattrs -cf archive.tar -C dir .
44216
44217 tar --xattrs -xf archive.tar -C output
44218 getfattr -d output/file | grep -v '# ' > after
44219 diff before after
44220 )
44221 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44222 at_status=$? at_failed=false
44223 $at_check_filter
44224 at_fn_diff_devnull "$at_stderr" || at_failed=:
44225 at_fn_diff_devnull "$at_stdout" || at_failed=:
44226 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
44227 $at_failed && at_fn_log_failure
44228 $at_traceon; }
44229
44230
44231
44232
44233   set +x
44234   $at_times_p && times >"$at_times_file"
44235 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
44236 read at_status <"$at_status_file"
44237 #AT_STOP_187
44238 #AT_START_188
44239 at_fn_group_banner 188 'acls01.at:25' \
44240   "acls: basic functionality" "                      " 25
44241 at_xfail=no
44242       test -f $XFAILFILE && at_xfail=yes
44243 (
44244   $as_echo "188. $at_setup_line: testing $at_desc ..."
44245   $at_traceon
44246
44247
44248
44249
44250
44251   { set +x
44252 $as_echo "$at_srcdir/acls01.at:28:
44253 mkdir v7
44254 (cd v7
44255 TEST_TAR_FORMAT=v7
44256 export TEST_TAR_FORMAT
44257 TAR_OPTIONS=\"-H v7\"
44258 export TAR_OPTIONS
44259 rm -rf *
44260
44261
44262   file=\$(TMPDIR=. mktemp fiXXXXXX)
44263
44264   setfattr -n user.test -v test \$file &> /dev/null
44265   if test \"\$?\" != 0; then
44266     exit 77
44267   fi
44268
44269
44270   getfattr \$file &> /dev/null
44271   if test \"\$?\" != 0; then
44272     exit 77
44273   fi
44274
44275
44276
44277
44278   file=\$(TMPDIR=. mktemp fiXXXXXX)
44279
44280   setfacl -m u:\$UID:rwx \$file &> /dev/null
44281   if test \"\$?\" != 0; then
44282     exit 77
44283   fi
44284
44285
44286   getfacl \$file &> /dev/null
44287   if test \"\$?\" != 0; then
44288     exit 77
44289   fi
44290
44291   rm -rf \$file
44292
44293   file=\$(TMPDIR=. mktemp fiXXXXXX)
44294   setfacl -m u:\$UID:rwx \$file
44295   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44296   if test \"\$err\" != \"0\"; then
44297     exit 77
44298   fi
44299
44300
44301 mkdir dir
44302 genfile --file dir/file
44303
44304 MYNAME=\$( id -un )
44305
44306 setfacl -m u:\$MYNAME:--x dir/file
44307 setfacl -m u:\$MYNAME:--x dir
44308
44309 getfattr -h -m. -d dir dir/file > before
44310
44311 tar --acls -cf archive.tar dir
44312 rm -rf dir
44313
44314 tar --acls -xf archive.tar
44315
44316 getfattr -h -m. -d dir dir/file > after
44317
44318 diff before after
44319 test \"\$?\" = 0
44320 )"
44321 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
44322 ( $at_check_trace;
44323 mkdir v7
44324 (cd v7
44325 TEST_TAR_FORMAT=v7
44326 export TEST_TAR_FORMAT
44327 TAR_OPTIONS="-H v7"
44328 export TAR_OPTIONS
44329 rm -rf *
44330
44331
44332   file=$(TMPDIR=. mktemp fiXXXXXX)
44333
44334   setfattr -n user.test -v test $file &> /dev/null
44335   if test "$?" != 0; then
44336     exit 77
44337   fi
44338
44339
44340   getfattr $file &> /dev/null
44341   if test "$?" != 0; then
44342     exit 77
44343   fi
44344
44345
44346
44347
44348   file=$(TMPDIR=. mktemp fiXXXXXX)
44349
44350   setfacl -m u:$UID:rwx $file &> /dev/null
44351   if test "$?" != 0; then
44352     exit 77
44353   fi
44354
44355
44356   getfacl $file &> /dev/null
44357   if test "$?" != 0; then
44358     exit 77
44359   fi
44360
44361   rm -rf $file
44362
44363   file=$(TMPDIR=. mktemp fiXXXXXX)
44364   setfacl -m u:$UID:rwx $file
44365   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44366   if test "$err" != "0"; then
44367     exit 77
44368   fi
44369
44370
44371 mkdir dir
44372 genfile --file dir/file
44373
44374 MYNAME=$( id -un )
44375
44376 setfacl -m u:$MYNAME:--x dir/file
44377 setfacl -m u:$MYNAME:--x dir
44378
44379 getfattr -h -m. -d dir dir/file > before
44380
44381 tar --acls -cf archive.tar dir
44382 rm -rf dir
44383
44384 tar --acls -xf archive.tar
44385
44386 getfattr -h -m. -d dir dir/file > after
44387
44388 diff before after
44389 test "$?" = 0
44390 )
44391 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44392 at_status=$? at_failed=false
44393 $at_check_filter
44394 at_fn_diff_devnull "$at_stderr" || at_failed=:
44395 at_fn_diff_devnull "$at_stdout" || at_failed=:
44396 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
44397 $at_failed && at_fn_log_failure
44398 $at_traceon; }
44399
44400               { set +x
44401 $as_echo "$at_srcdir/acls01.at:28:
44402 mkdir oldgnu
44403 (cd oldgnu
44404 TEST_TAR_FORMAT=oldgnu
44405 export TEST_TAR_FORMAT
44406 TAR_OPTIONS=\"-H oldgnu\"
44407 export TAR_OPTIONS
44408 rm -rf *
44409
44410
44411   file=\$(TMPDIR=. mktemp fiXXXXXX)
44412
44413   setfattr -n user.test -v test \$file &> /dev/null
44414   if test \"\$?\" != 0; then
44415     exit 77
44416   fi
44417
44418
44419   getfattr \$file &> /dev/null
44420   if test \"\$?\" != 0; then
44421     exit 77
44422   fi
44423
44424
44425
44426
44427   file=\$(TMPDIR=. mktemp fiXXXXXX)
44428
44429   setfacl -m u:\$UID:rwx \$file &> /dev/null
44430   if test \"\$?\" != 0; then
44431     exit 77
44432   fi
44433
44434
44435   getfacl \$file &> /dev/null
44436   if test \"\$?\" != 0; then
44437     exit 77
44438   fi
44439
44440   rm -rf \$file
44441
44442   file=\$(TMPDIR=. mktemp fiXXXXXX)
44443   setfacl -m u:\$UID:rwx \$file
44444   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44445   if test \"\$err\" != \"0\"; then
44446     exit 77
44447   fi
44448
44449
44450 mkdir dir
44451 genfile --file dir/file
44452
44453 MYNAME=\$( id -un )
44454
44455 setfacl -m u:\$MYNAME:--x dir/file
44456 setfacl -m u:\$MYNAME:--x dir
44457
44458 getfattr -h -m. -d dir dir/file > before
44459
44460 tar --acls -cf archive.tar dir
44461 rm -rf dir
44462
44463 tar --acls -xf archive.tar
44464
44465 getfattr -h -m. -d dir dir/file > after
44466
44467 diff before after
44468 test \"\$?\" = 0
44469 )"
44470 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
44471 ( $at_check_trace;
44472 mkdir oldgnu
44473 (cd oldgnu
44474 TEST_TAR_FORMAT=oldgnu
44475 export TEST_TAR_FORMAT
44476 TAR_OPTIONS="-H oldgnu"
44477 export TAR_OPTIONS
44478 rm -rf *
44479
44480
44481   file=$(TMPDIR=. mktemp fiXXXXXX)
44482
44483   setfattr -n user.test -v test $file &> /dev/null
44484   if test "$?" != 0; then
44485     exit 77
44486   fi
44487
44488
44489   getfattr $file &> /dev/null
44490   if test "$?" != 0; then
44491     exit 77
44492   fi
44493
44494
44495
44496
44497   file=$(TMPDIR=. mktemp fiXXXXXX)
44498
44499   setfacl -m u:$UID:rwx $file &> /dev/null
44500   if test "$?" != 0; then
44501     exit 77
44502   fi
44503
44504
44505   getfacl $file &> /dev/null
44506   if test "$?" != 0; then
44507     exit 77
44508   fi
44509
44510   rm -rf $file
44511
44512   file=$(TMPDIR=. mktemp fiXXXXXX)
44513   setfacl -m u:$UID:rwx $file
44514   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44515   if test "$err" != "0"; then
44516     exit 77
44517   fi
44518
44519
44520 mkdir dir
44521 genfile --file dir/file
44522
44523 MYNAME=$( id -un )
44524
44525 setfacl -m u:$MYNAME:--x dir/file
44526 setfacl -m u:$MYNAME:--x dir
44527
44528 getfattr -h -m. -d dir dir/file > before
44529
44530 tar --acls -cf archive.tar dir
44531 rm -rf dir
44532
44533 tar --acls -xf archive.tar
44534
44535 getfattr -h -m. -d dir dir/file > after
44536
44537 diff before after
44538 test "$?" = 0
44539 )
44540 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44541 at_status=$? at_failed=false
44542 $at_check_filter
44543 at_fn_diff_devnull "$at_stderr" || at_failed=:
44544 at_fn_diff_devnull "$at_stdout" || at_failed=:
44545 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
44546 $at_failed && at_fn_log_failure
44547 $at_traceon; }
44548
44549               { set +x
44550 $as_echo "$at_srcdir/acls01.at:28:
44551 mkdir ustar
44552 (cd ustar
44553 TEST_TAR_FORMAT=ustar
44554 export TEST_TAR_FORMAT
44555 TAR_OPTIONS=\"-H ustar\"
44556 export TAR_OPTIONS
44557 rm -rf *
44558
44559
44560   file=\$(TMPDIR=. mktemp fiXXXXXX)
44561
44562   setfattr -n user.test -v test \$file &> /dev/null
44563   if test \"\$?\" != 0; then
44564     exit 77
44565   fi
44566
44567
44568   getfattr \$file &> /dev/null
44569   if test \"\$?\" != 0; then
44570     exit 77
44571   fi
44572
44573
44574
44575
44576   file=\$(TMPDIR=. mktemp fiXXXXXX)
44577
44578   setfacl -m u:\$UID:rwx \$file &> /dev/null
44579   if test \"\$?\" != 0; then
44580     exit 77
44581   fi
44582
44583
44584   getfacl \$file &> /dev/null
44585   if test \"\$?\" != 0; then
44586     exit 77
44587   fi
44588
44589   rm -rf \$file
44590
44591   file=\$(TMPDIR=. mktemp fiXXXXXX)
44592   setfacl -m u:\$UID:rwx \$file
44593   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44594   if test \"\$err\" != \"0\"; then
44595     exit 77
44596   fi
44597
44598
44599 mkdir dir
44600 genfile --file dir/file
44601
44602 MYNAME=\$( id -un )
44603
44604 setfacl -m u:\$MYNAME:--x dir/file
44605 setfacl -m u:\$MYNAME:--x dir
44606
44607 getfattr -h -m. -d dir dir/file > before
44608
44609 tar --acls -cf archive.tar dir
44610 rm -rf dir
44611
44612 tar --acls -xf archive.tar
44613
44614 getfattr -h -m. -d dir dir/file > after
44615
44616 diff before after
44617 test \"\$?\" = 0
44618 )"
44619 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
44620 ( $at_check_trace;
44621 mkdir ustar
44622 (cd ustar
44623 TEST_TAR_FORMAT=ustar
44624 export TEST_TAR_FORMAT
44625 TAR_OPTIONS="-H ustar"
44626 export TAR_OPTIONS
44627 rm -rf *
44628
44629
44630   file=$(TMPDIR=. mktemp fiXXXXXX)
44631
44632   setfattr -n user.test -v test $file &> /dev/null
44633   if test "$?" != 0; then
44634     exit 77
44635   fi
44636
44637
44638   getfattr $file &> /dev/null
44639   if test "$?" != 0; then
44640     exit 77
44641   fi
44642
44643
44644
44645
44646   file=$(TMPDIR=. mktemp fiXXXXXX)
44647
44648   setfacl -m u:$UID:rwx $file &> /dev/null
44649   if test "$?" != 0; then
44650     exit 77
44651   fi
44652
44653
44654   getfacl $file &> /dev/null
44655   if test "$?" != 0; then
44656     exit 77
44657   fi
44658
44659   rm -rf $file
44660
44661   file=$(TMPDIR=. mktemp fiXXXXXX)
44662   setfacl -m u:$UID:rwx $file
44663   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44664   if test "$err" != "0"; then
44665     exit 77
44666   fi
44667
44668
44669 mkdir dir
44670 genfile --file dir/file
44671
44672 MYNAME=$( id -un )
44673
44674 setfacl -m u:$MYNAME:--x dir/file
44675 setfacl -m u:$MYNAME:--x dir
44676
44677 getfattr -h -m. -d dir dir/file > before
44678
44679 tar --acls -cf archive.tar dir
44680 rm -rf dir
44681
44682 tar --acls -xf archive.tar
44683
44684 getfattr -h -m. -d dir dir/file > after
44685
44686 diff before after
44687 test "$?" = 0
44688 )
44689 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44690 at_status=$? at_failed=false
44691 $at_check_filter
44692 at_fn_diff_devnull "$at_stderr" || at_failed=:
44693 at_fn_diff_devnull "$at_stdout" || at_failed=:
44694 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
44695 $at_failed && at_fn_log_failure
44696 $at_traceon; }
44697
44698               { set +x
44699 $as_echo "$at_srcdir/acls01.at:28:
44700 mkdir posix
44701 (cd posix
44702 TEST_TAR_FORMAT=posix
44703 export TEST_TAR_FORMAT
44704 TAR_OPTIONS=\"-H posix\"
44705 export TAR_OPTIONS
44706 rm -rf *
44707
44708
44709   file=\$(TMPDIR=. mktemp fiXXXXXX)
44710
44711   setfattr -n user.test -v test \$file &> /dev/null
44712   if test \"\$?\" != 0; then
44713     exit 77
44714   fi
44715
44716
44717   getfattr \$file &> /dev/null
44718   if test \"\$?\" != 0; then
44719     exit 77
44720   fi
44721
44722
44723
44724
44725   file=\$(TMPDIR=. mktemp fiXXXXXX)
44726
44727   setfacl -m u:\$UID:rwx \$file &> /dev/null
44728   if test \"\$?\" != 0; then
44729     exit 77
44730   fi
44731
44732
44733   getfacl \$file &> /dev/null
44734   if test \"\$?\" != 0; then
44735     exit 77
44736   fi
44737
44738   rm -rf \$file
44739
44740   file=\$(TMPDIR=. mktemp fiXXXXXX)
44741   setfacl -m u:\$UID:rwx \$file
44742   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44743   if test \"\$err\" != \"0\"; then
44744     exit 77
44745   fi
44746
44747
44748 mkdir dir
44749 genfile --file dir/file
44750
44751 MYNAME=\$( id -un )
44752
44753 setfacl -m u:\$MYNAME:--x dir/file
44754 setfacl -m u:\$MYNAME:--x dir
44755
44756 getfattr -h -m. -d dir dir/file > before
44757
44758 tar --acls -cf archive.tar dir
44759 rm -rf dir
44760
44761 tar --acls -xf archive.tar
44762
44763 getfattr -h -m. -d dir dir/file > after
44764
44765 diff before after
44766 test \"\$?\" = 0
44767 )"
44768 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
44769 ( $at_check_trace;
44770 mkdir posix
44771 (cd posix
44772 TEST_TAR_FORMAT=posix
44773 export TEST_TAR_FORMAT
44774 TAR_OPTIONS="-H posix"
44775 export TAR_OPTIONS
44776 rm -rf *
44777
44778
44779   file=$(TMPDIR=. mktemp fiXXXXXX)
44780
44781   setfattr -n user.test -v test $file &> /dev/null
44782   if test "$?" != 0; then
44783     exit 77
44784   fi
44785
44786
44787   getfattr $file &> /dev/null
44788   if test "$?" != 0; then
44789     exit 77
44790   fi
44791
44792
44793
44794
44795   file=$(TMPDIR=. mktemp fiXXXXXX)
44796
44797   setfacl -m u:$UID:rwx $file &> /dev/null
44798   if test "$?" != 0; then
44799     exit 77
44800   fi
44801
44802
44803   getfacl $file &> /dev/null
44804   if test "$?" != 0; then
44805     exit 77
44806   fi
44807
44808   rm -rf $file
44809
44810   file=$(TMPDIR=. mktemp fiXXXXXX)
44811   setfacl -m u:$UID:rwx $file
44812   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44813   if test "$err" != "0"; then
44814     exit 77
44815   fi
44816
44817
44818 mkdir dir
44819 genfile --file dir/file
44820
44821 MYNAME=$( id -un )
44822
44823 setfacl -m u:$MYNAME:--x dir/file
44824 setfacl -m u:$MYNAME:--x dir
44825
44826 getfattr -h -m. -d dir dir/file > before
44827
44828 tar --acls -cf archive.tar dir
44829 rm -rf dir
44830
44831 tar --acls -xf archive.tar
44832
44833 getfattr -h -m. -d dir dir/file > after
44834
44835 diff before after
44836 test "$?" = 0
44837 )
44838 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44839 at_status=$? at_failed=false
44840 $at_check_filter
44841 at_fn_diff_devnull "$at_stderr" || at_failed=:
44842 at_fn_diff_devnull "$at_stdout" || at_failed=:
44843 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
44844 $at_failed && at_fn_log_failure
44845 $at_traceon; }
44846
44847               { set +x
44848 $as_echo "$at_srcdir/acls01.at:28:
44849 mkdir gnu
44850 (cd gnu
44851 TEST_TAR_FORMAT=gnu
44852 export TEST_TAR_FORMAT
44853 TAR_OPTIONS=\"-H gnu\"
44854 export TAR_OPTIONS
44855 rm -rf *
44856
44857
44858   file=\$(TMPDIR=. mktemp fiXXXXXX)
44859
44860   setfattr -n user.test -v test \$file &> /dev/null
44861   if test \"\$?\" != 0; then
44862     exit 77
44863   fi
44864
44865
44866   getfattr \$file &> /dev/null
44867   if test \"\$?\" != 0; then
44868     exit 77
44869   fi
44870
44871
44872
44873
44874   file=\$(TMPDIR=. mktemp fiXXXXXX)
44875
44876   setfacl -m u:\$UID:rwx \$file &> /dev/null
44877   if test \"\$?\" != 0; then
44878     exit 77
44879   fi
44880
44881
44882   getfacl \$file &> /dev/null
44883   if test \"\$?\" != 0; then
44884     exit 77
44885   fi
44886
44887   rm -rf \$file
44888
44889   file=\$(TMPDIR=. mktemp fiXXXXXX)
44890   setfacl -m u:\$UID:rwx \$file
44891   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44892   if test \"\$err\" != \"0\"; then
44893     exit 77
44894   fi
44895
44896
44897 mkdir dir
44898 genfile --file dir/file
44899
44900 MYNAME=\$( id -un )
44901
44902 setfacl -m u:\$MYNAME:--x dir/file
44903 setfacl -m u:\$MYNAME:--x dir
44904
44905 getfattr -h -m. -d dir dir/file > before
44906
44907 tar --acls -cf archive.tar dir
44908 rm -rf dir
44909
44910 tar --acls -xf archive.tar
44911
44912 getfattr -h -m. -d dir dir/file > after
44913
44914 diff before after
44915 test \"\$?\" = 0
44916 )"
44917 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
44918 ( $at_check_trace;
44919 mkdir gnu
44920 (cd gnu
44921 TEST_TAR_FORMAT=gnu
44922 export TEST_TAR_FORMAT
44923 TAR_OPTIONS="-H gnu"
44924 export TAR_OPTIONS
44925 rm -rf *
44926
44927
44928   file=$(TMPDIR=. mktemp fiXXXXXX)
44929
44930   setfattr -n user.test -v test $file &> /dev/null
44931   if test "$?" != 0; then
44932     exit 77
44933   fi
44934
44935
44936   getfattr $file &> /dev/null
44937   if test "$?" != 0; then
44938     exit 77
44939   fi
44940
44941
44942
44943
44944   file=$(TMPDIR=. mktemp fiXXXXXX)
44945
44946   setfacl -m u:$UID:rwx $file &> /dev/null
44947   if test "$?" != 0; then
44948     exit 77
44949   fi
44950
44951
44952   getfacl $file &> /dev/null
44953   if test "$?" != 0; then
44954     exit 77
44955   fi
44956
44957   rm -rf $file
44958
44959   file=$(TMPDIR=. mktemp fiXXXXXX)
44960   setfacl -m u:$UID:rwx $file
44961   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44962   if test "$err" != "0"; then
44963     exit 77
44964   fi
44965
44966
44967 mkdir dir
44968 genfile --file dir/file
44969
44970 MYNAME=$( id -un )
44971
44972 setfacl -m u:$MYNAME:--x dir/file
44973 setfacl -m u:$MYNAME:--x dir
44974
44975 getfattr -h -m. -d dir dir/file > before
44976
44977 tar --acls -cf archive.tar dir
44978 rm -rf dir
44979
44980 tar --acls -xf archive.tar
44981
44982 getfattr -h -m. -d dir dir/file > after
44983
44984 diff before after
44985 test "$?" = 0
44986 )
44987 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44988 at_status=$? at_failed=false
44989 $at_check_filter
44990 at_fn_diff_devnull "$at_stderr" || at_failed=:
44991 at_fn_diff_devnull "$at_stdout" || at_failed=:
44992 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
44993 $at_failed && at_fn_log_failure
44994 $at_traceon; }
44995
44996
44997
44998
44999   set +x
45000   $at_times_p && times >"$at_times_file"
45001 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45002 read at_status <"$at_status_file"
45003 #AT_STOP_188
45004 #AT_START_189
45005 at_fn_group_banner 189 'acls02.at:25' \
45006   "acls: work with -C" "                             " 25
45007 at_xfail=no
45008       test -f $XFAILFILE && at_xfail=yes
45009 (
45010   $as_echo "189. $at_setup_line: testing $at_desc ..."
45011   $at_traceon
45012
45013
45014
45015
45016
45017   { set +x
45018 $as_echo "$at_srcdir/acls02.at:28:
45019 mkdir v7
45020 (cd v7
45021 TEST_TAR_FORMAT=v7
45022 export TEST_TAR_FORMAT
45023 TAR_OPTIONS=\"-H v7\"
45024 export TAR_OPTIONS
45025 rm -rf *
45026
45027
45028   file=\$(TMPDIR=. mktemp fiXXXXXX)
45029
45030   setfattr -n user.test -v test \$file &> /dev/null
45031   if test \"\$?\" != 0; then
45032     exit 77
45033   fi
45034
45035
45036   getfattr \$file &> /dev/null
45037   if test \"\$?\" != 0; then
45038     exit 77
45039   fi
45040
45041
45042
45043
45044   file=\$(TMPDIR=. mktemp fiXXXXXX)
45045
45046   setfacl -m u:\$UID:rwx \$file &> /dev/null
45047   if test \"\$?\" != 0; then
45048     exit 77
45049   fi
45050
45051
45052   getfacl \$file &> /dev/null
45053   if test \"\$?\" != 0; then
45054     exit 77
45055   fi
45056
45057   rm -rf \$file
45058
45059   file=\$(TMPDIR=. mktemp fiXXXXXX)
45060   setfacl -m u:\$UID:rwx \$file
45061   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
45062   if test \"\$err\" != \"0\"; then
45063     exit 77
45064   fi
45065
45066
45067 mkdir dir
45068 mkdir dir/subdir
45069 genfile --file dir/subdir/file
45070
45071 MYNAME=\$( id -un )
45072
45073 setfacl -m u:\$MYNAME:--x dir/subdir
45074 setfacl -m u:\$MYNAME:--x dir/subdir/file
45075
45076 cd dir
45077 getfattr -h -m. -d subdir subdir/file > ../before
45078 cd ..
45079
45080 tar --acls -cf archive.tar -C dir subdir
45081 rm -rf dir
45082
45083 mkdir dir
45084 tar --acls -xf archive.tar -C dir
45085
45086 cd dir
45087 getfattr -h -m. -d subdir subdir/file > ../after
45088 cd ..
45089
45090 diff before after
45091 test \"\$?\" = 0
45092 )"
45093 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
45094 ( $at_check_trace;
45095 mkdir v7
45096 (cd v7
45097 TEST_TAR_FORMAT=v7
45098 export TEST_TAR_FORMAT
45099 TAR_OPTIONS="-H v7"
45100 export TAR_OPTIONS
45101 rm -rf *
45102
45103
45104   file=$(TMPDIR=. mktemp fiXXXXXX)
45105
45106   setfattr -n user.test -v test $file &> /dev/null
45107   if test "$?" != 0; then
45108     exit 77
45109   fi
45110
45111
45112   getfattr $file &> /dev/null
45113   if test "$?" != 0; then
45114     exit 77
45115   fi
45116
45117
45118
45119
45120   file=$(TMPDIR=. mktemp fiXXXXXX)
45121
45122   setfacl -m u:$UID:rwx $file &> /dev/null
45123   if test "$?" != 0; then
45124     exit 77
45125   fi
45126
45127
45128   getfacl $file &> /dev/null
45129   if test "$?" != 0; then
45130     exit 77
45131   fi
45132
45133   rm -rf $file
45134
45135   file=$(TMPDIR=. mktemp fiXXXXXX)
45136   setfacl -m u:$UID:rwx $file
45137   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
45138   if test "$err" != "0"; then
45139     exit 77
45140   fi
45141
45142
45143 mkdir dir
45144 mkdir dir/subdir
45145 genfile --file dir/subdir/file
45146
45147 MYNAME=$( id -un )
45148
45149 setfacl -m u:$MYNAME:--x dir/subdir
45150 setfacl -m u:$MYNAME:--x dir/subdir/file
45151
45152 cd dir
45153 getfattr -h -m. -d subdir subdir/file > ../before
45154 cd ..
45155
45156 tar --acls -cf archive.tar -C dir subdir
45157 rm -rf dir
45158
45159 mkdir dir
45160 tar --acls -xf archive.tar -C dir
45161
45162 cd dir
45163 getfattr -h -m. -d subdir subdir/file > ../after
45164 cd ..
45165
45166 diff before after
45167 test "$?" = 0
45168 )
45169 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45170 at_status=$? at_failed=false
45171 $at_check_filter
45172 at_fn_diff_devnull "$at_stderr" || at_failed=:
45173 at_fn_diff_devnull "$at_stdout" || at_failed=:
45174 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
45175 $at_failed && at_fn_log_failure
45176 $at_traceon; }
45177
45178               { set +x
45179 $as_echo "$at_srcdir/acls02.at:28:
45180 mkdir oldgnu
45181 (cd oldgnu
45182 TEST_TAR_FORMAT=oldgnu
45183 export TEST_TAR_FORMAT
45184 TAR_OPTIONS=\"-H oldgnu\"
45185 export TAR_OPTIONS
45186 rm -rf *
45187
45188
45189   file=\$(TMPDIR=. mktemp fiXXXXXX)
45190
45191   setfattr -n user.test -v test \$file &> /dev/null
45192   if test \"\$?\" != 0; then
45193     exit 77
45194   fi
45195
45196
45197   getfattr \$file &> /dev/null
45198   if test \"\$?\" != 0; then
45199     exit 77
45200   fi
45201
45202
45203
45204
45205   file=\$(TMPDIR=. mktemp fiXXXXXX)
45206
45207   setfacl -m u:\$UID:rwx \$file &> /dev/null
45208   if test \"\$?\" != 0; then
45209     exit 77
45210   fi
45211
45212
45213   getfacl \$file &> /dev/null
45214   if test \"\$?\" != 0; then
45215     exit 77
45216   fi
45217
45218   rm -rf \$file
45219
45220   file=\$(TMPDIR=. mktemp fiXXXXXX)
45221   setfacl -m u:\$UID:rwx \$file
45222   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
45223   if test \"\$err\" != \"0\"; then
45224     exit 77
45225   fi
45226
45227
45228 mkdir dir
45229 mkdir dir/subdir
45230 genfile --file dir/subdir/file
45231
45232 MYNAME=\$( id -un )
45233
45234 setfacl -m u:\$MYNAME:--x dir/subdir
45235 setfacl -m u:\$MYNAME:--x dir/subdir/file
45236
45237 cd dir
45238 getfattr -h -m. -d subdir subdir/file > ../before
45239 cd ..
45240
45241 tar --acls -cf archive.tar -C dir subdir
45242 rm -rf dir
45243
45244 mkdir dir
45245 tar --acls -xf archive.tar -C dir
45246
45247 cd dir
45248 getfattr -h -m. -d subdir subdir/file > ../after
45249 cd ..
45250
45251 diff before after
45252 test \"\$?\" = 0
45253 )"
45254 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
45255 ( $at_check_trace;
45256 mkdir oldgnu
45257 (cd oldgnu
45258 TEST_TAR_FORMAT=oldgnu
45259 export TEST_TAR_FORMAT
45260 TAR_OPTIONS="-H oldgnu"
45261 export TAR_OPTIONS
45262 rm -rf *
45263
45264
45265   file=$(TMPDIR=. mktemp fiXXXXXX)
45266
45267   setfattr -n user.test -v test $file &> /dev/null
45268   if test "$?" != 0; then
45269     exit 77
45270   fi
45271
45272
45273   getfattr $file &> /dev/null
45274   if test "$?" != 0; then
45275     exit 77
45276   fi
45277
45278
45279
45280
45281   file=$(TMPDIR=. mktemp fiXXXXXX)
45282
45283   setfacl -m u:$UID:rwx $file &> /dev/null
45284   if test "$?" != 0; then
45285     exit 77
45286   fi
45287
45288
45289   getfacl $file &> /dev/null
45290   if test "$?" != 0; then
45291     exit 77
45292   fi
45293
45294   rm -rf $file
45295
45296   file=$(TMPDIR=. mktemp fiXXXXXX)
45297   setfacl -m u:$UID:rwx $file
45298   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
45299   if test "$err" != "0"; then
45300     exit 77
45301   fi
45302
45303
45304 mkdir dir
45305 mkdir dir/subdir
45306 genfile --file dir/subdir/file
45307
45308 MYNAME=$( id -un )
45309
45310 setfacl -m u:$MYNAME:--x dir/subdir
45311 setfacl -m u:$MYNAME:--x dir/subdir/file
45312
45313 cd dir
45314 getfattr -h -m. -d subdir subdir/file > ../before
45315 cd ..
45316
45317 tar --acls -cf archive.tar -C dir subdir
45318 rm -rf dir
45319
45320 mkdir dir
45321 tar --acls -xf archive.tar -C dir
45322
45323 cd dir
45324 getfattr -h -m. -d subdir subdir/file > ../after
45325 cd ..
45326
45327 diff before after
45328 test "$?" = 0
45329 )
45330 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45331 at_status=$? at_failed=false
45332 $at_check_filter
45333 at_fn_diff_devnull "$at_stderr" || at_failed=:
45334 at_fn_diff_devnull "$at_stdout" || at_failed=:
45335 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
45336 $at_failed && at_fn_log_failure
45337 $at_traceon; }
45338
45339               { set +x
45340 $as_echo "$at_srcdir/acls02.at:28:
45341 mkdir ustar
45342 (cd ustar
45343 TEST_TAR_FORMAT=ustar
45344 export TEST_TAR_FORMAT
45345 TAR_OPTIONS=\"-H ustar\"
45346 export TAR_OPTIONS
45347 rm -rf *
45348
45349
45350   file=\$(TMPDIR=. mktemp fiXXXXXX)
45351
45352   setfattr -n user.test -v test \$file &> /dev/null
45353   if test \"\$?\" != 0; then
45354     exit 77
45355   fi
45356
45357
45358   getfattr \$file &> /dev/null
45359   if test \"\$?\" != 0; then
45360     exit 77
45361   fi
45362
45363
45364
45365
45366   file=\$(TMPDIR=. mktemp fiXXXXXX)
45367
45368   setfacl -m u:\$UID:rwx \$file &> /dev/null
45369   if test \"\$?\" != 0; then
45370     exit 77
45371   fi
45372
45373
45374   getfacl \$file &> /dev/null
45375   if test \"\$?\" != 0; then
45376     exit 77
45377   fi
45378
45379   rm -rf \$file
45380
45381   file=\$(TMPDIR=. mktemp fiXXXXXX)
45382   setfacl -m u:\$UID:rwx \$file
45383   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
45384   if test \"\$err\" != \"0\"; then
45385     exit 77
45386   fi
45387
45388
45389 mkdir dir
45390 mkdir dir/subdir
45391 genfile --file dir/subdir/file
45392
45393 MYNAME=\$( id -un )
45394
45395 setfacl -m u:\$MYNAME:--x dir/subdir
45396 setfacl -m u:\$MYNAME:--x dir/subdir/file
45397
45398 cd dir
45399 getfattr -h -m. -d subdir subdir/file > ../before
45400 cd ..
45401
45402 tar --acls -cf archive.tar -C dir subdir
45403 rm -rf dir
45404
45405 mkdir dir
45406 tar --acls -xf archive.tar -C dir
45407
45408 cd dir
45409 getfattr -h -m. -d subdir subdir/file > ../after
45410 cd ..
45411
45412 diff before after
45413 test \"\$?\" = 0
45414 )"
45415 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
45416 ( $at_check_trace;
45417 mkdir ustar
45418 (cd ustar
45419 TEST_TAR_FORMAT=ustar
45420 export TEST_TAR_FORMAT
45421 TAR_OPTIONS="-H ustar"
45422 export TAR_OPTIONS
45423 rm -rf *
45424
45425
45426   file=$(TMPDIR=. mktemp fiXXXXXX)
45427
45428   setfattr -n user.test -v test $file &> /dev/null
45429   if test "$?" != 0; then
45430     exit 77
45431   fi
45432
45433
45434   getfattr $file &> /dev/null
45435   if test "$?" != 0; then
45436     exit 77
45437   fi
45438
45439
45440
45441
45442   file=$(TMPDIR=. mktemp fiXXXXXX)
45443
45444   setfacl -m u:$UID:rwx $file &> /dev/null
45445   if test "$?" != 0; then
45446     exit 77
45447   fi
45448
45449
45450   getfacl $file &> /dev/null
45451   if test "$?" != 0; then
45452     exit 77
45453   fi
45454
45455   rm -rf $file
45456
45457   file=$(TMPDIR=. mktemp fiXXXXXX)
45458   setfacl -m u:$UID:rwx $file
45459   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
45460   if test "$err" != "0"; then
45461     exit 77
45462   fi
45463
45464
45465 mkdir dir
45466 mkdir dir/subdir
45467 genfile --file dir/subdir/file
45468
45469 MYNAME=$( id -un )
45470
45471 setfacl -m u:$MYNAME:--x dir/subdir
45472 setfacl -m u:$MYNAME:--x dir/subdir/file
45473
45474 cd dir
45475 getfattr -h -m. -d subdir subdir/file > ../before
45476 cd ..
45477
45478 tar --acls -cf archive.tar -C dir subdir
45479 rm -rf dir
45480
45481 mkdir dir
45482 tar --acls -xf archive.tar -C dir
45483
45484 cd dir
45485 getfattr -h -m. -d subdir subdir/file > ../after
45486 cd ..
45487
45488 diff before after
45489 test "$?" = 0
45490 )
45491 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45492 at_status=$? at_failed=false
45493 $at_check_filter
45494 at_fn_diff_devnull "$at_stderr" || at_failed=:
45495 at_fn_diff_devnull "$at_stdout" || at_failed=:
45496 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
45497 $at_failed && at_fn_log_failure
45498 $at_traceon; }
45499
45500               { set +x
45501 $as_echo "$at_srcdir/acls02.at:28:
45502 mkdir posix
45503 (cd posix
45504 TEST_TAR_FORMAT=posix
45505 export TEST_TAR_FORMAT
45506 TAR_OPTIONS=\"-H posix\"
45507 export TAR_OPTIONS
45508 rm -rf *
45509
45510
45511   file=\$(TMPDIR=. mktemp fiXXXXXX)
45512
45513   setfattr -n user.test -v test \$file &> /dev/null
45514   if test \"\$?\" != 0; then
45515     exit 77
45516   fi
45517
45518
45519   getfattr \$file &> /dev/null
45520   if test \"\$?\" != 0; then
45521     exit 77
45522   fi
45523
45524
45525
45526
45527   file=\$(TMPDIR=. mktemp fiXXXXXX)
45528
45529   setfacl -m u:\$UID:rwx \$file &> /dev/null
45530   if test \"\$?\" != 0; then
45531     exit 77
45532   fi
45533
45534
45535   getfacl \$file &> /dev/null
45536   if test \"\$?\" != 0; then
45537     exit 77
45538   fi
45539
45540   rm -rf \$file
45541
45542   file=\$(TMPDIR=. mktemp fiXXXXXX)
45543   setfacl -m u:\$UID:rwx \$file
45544   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
45545   if test \"\$err\" != \"0\"; then
45546     exit 77
45547   fi
45548
45549
45550 mkdir dir
45551 mkdir dir/subdir
45552 genfile --file dir/subdir/file
45553
45554 MYNAME=\$( id -un )
45555
45556 setfacl -m u:\$MYNAME:--x dir/subdir
45557 setfacl -m u:\$MYNAME:--x dir/subdir/file
45558
45559 cd dir
45560 getfattr -h -m. -d subdir subdir/file > ../before
45561 cd ..
45562
45563 tar --acls -cf archive.tar -C dir subdir
45564 rm -rf dir
45565
45566 mkdir dir
45567 tar --acls -xf archive.tar -C dir
45568
45569 cd dir
45570 getfattr -h -m. -d subdir subdir/file > ../after
45571 cd ..
45572
45573 diff before after
45574 test \"\$?\" = 0
45575 )"
45576 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
45577 ( $at_check_trace;
45578 mkdir posix
45579 (cd posix
45580 TEST_TAR_FORMAT=posix
45581 export TEST_TAR_FORMAT
45582 TAR_OPTIONS="-H posix"
45583 export TAR_OPTIONS
45584 rm -rf *
45585
45586
45587   file=$(TMPDIR=. mktemp fiXXXXXX)
45588
45589   setfattr -n user.test -v test $file &> /dev/null
45590   if test "$?" != 0; then
45591     exit 77
45592   fi
45593
45594
45595   getfattr $file &> /dev/null
45596   if test "$?" != 0; then
45597     exit 77
45598   fi
45599
45600
45601
45602
45603   file=$(TMPDIR=. mktemp fiXXXXXX)
45604
45605   setfacl -m u:$UID:rwx $file &> /dev/null
45606   if test "$?" != 0; then
45607     exit 77
45608   fi
45609
45610
45611   getfacl $file &> /dev/null
45612   if test "$?" != 0; then
45613     exit 77
45614   fi
45615
45616   rm -rf $file
45617
45618   file=$(TMPDIR=. mktemp fiXXXXXX)
45619   setfacl -m u:$UID:rwx $file
45620   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
45621   if test "$err" != "0"; then
45622     exit 77
45623   fi
45624
45625
45626 mkdir dir
45627 mkdir dir/subdir
45628 genfile --file dir/subdir/file
45629
45630 MYNAME=$( id -un )
45631
45632 setfacl -m u:$MYNAME:--x dir/subdir
45633 setfacl -m u:$MYNAME:--x dir/subdir/file
45634
45635 cd dir
45636 getfattr -h -m. -d subdir subdir/file > ../before
45637 cd ..
45638
45639 tar --acls -cf archive.tar -C dir subdir
45640 rm -rf dir
45641
45642 mkdir dir
45643 tar --acls -xf archive.tar -C dir
45644
45645 cd dir
45646 getfattr -h -m. -d subdir subdir/file > ../after
45647 cd ..
45648
45649 diff before after
45650 test "$?" = 0
45651 )
45652 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45653 at_status=$? at_failed=false
45654 $at_check_filter
45655 at_fn_diff_devnull "$at_stderr" || at_failed=:
45656 at_fn_diff_devnull "$at_stdout" || at_failed=:
45657 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
45658 $at_failed && at_fn_log_failure
45659 $at_traceon; }
45660
45661               { set +x
45662 $as_echo "$at_srcdir/acls02.at:28:
45663 mkdir gnu
45664 (cd gnu
45665 TEST_TAR_FORMAT=gnu
45666 export TEST_TAR_FORMAT
45667 TAR_OPTIONS=\"-H gnu\"
45668 export TAR_OPTIONS
45669 rm -rf *
45670
45671
45672   file=\$(TMPDIR=. mktemp fiXXXXXX)
45673
45674   setfattr -n user.test -v test \$file &> /dev/null
45675   if test \"\$?\" != 0; then
45676     exit 77
45677   fi
45678
45679
45680   getfattr \$file &> /dev/null
45681   if test \"\$?\" != 0; then
45682     exit 77
45683   fi
45684
45685
45686
45687
45688   file=\$(TMPDIR=. mktemp fiXXXXXX)
45689
45690   setfacl -m u:\$UID:rwx \$file &> /dev/null
45691   if test \"\$?\" != 0; then
45692     exit 77
45693   fi
45694
45695
45696   getfacl \$file &> /dev/null
45697   if test \"\$?\" != 0; then
45698     exit 77
45699   fi
45700
45701   rm -rf \$file
45702
45703   file=\$(TMPDIR=. mktemp fiXXXXXX)
45704   setfacl -m u:\$UID:rwx \$file
45705   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
45706   if test \"\$err\" != \"0\"; then
45707     exit 77
45708   fi
45709
45710
45711 mkdir dir
45712 mkdir dir/subdir
45713 genfile --file dir/subdir/file
45714
45715 MYNAME=\$( id -un )
45716
45717 setfacl -m u:\$MYNAME:--x dir/subdir
45718 setfacl -m u:\$MYNAME:--x dir/subdir/file
45719
45720 cd dir
45721 getfattr -h -m. -d subdir subdir/file > ../before
45722 cd ..
45723
45724 tar --acls -cf archive.tar -C dir subdir
45725 rm -rf dir
45726
45727 mkdir dir
45728 tar --acls -xf archive.tar -C dir
45729
45730 cd dir
45731 getfattr -h -m. -d subdir subdir/file > ../after
45732 cd ..
45733
45734 diff before after
45735 test \"\$?\" = 0
45736 )"
45737 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
45738 ( $at_check_trace;
45739 mkdir gnu
45740 (cd gnu
45741 TEST_TAR_FORMAT=gnu
45742 export TEST_TAR_FORMAT
45743 TAR_OPTIONS="-H gnu"
45744 export TAR_OPTIONS
45745 rm -rf *
45746
45747
45748   file=$(TMPDIR=. mktemp fiXXXXXX)
45749
45750   setfattr -n user.test -v test $file &> /dev/null
45751   if test "$?" != 0; then
45752     exit 77
45753   fi
45754
45755
45756   getfattr $file &> /dev/null
45757   if test "$?" != 0; then
45758     exit 77
45759   fi
45760
45761
45762
45763
45764   file=$(TMPDIR=. mktemp fiXXXXXX)
45765
45766   setfacl -m u:$UID:rwx $file &> /dev/null
45767   if test "$?" != 0; then
45768     exit 77
45769   fi
45770
45771
45772   getfacl $file &> /dev/null
45773   if test "$?" != 0; then
45774     exit 77
45775   fi
45776
45777   rm -rf $file
45778
45779   file=$(TMPDIR=. mktemp fiXXXXXX)
45780   setfacl -m u:$UID:rwx $file
45781   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
45782   if test "$err" != "0"; then
45783     exit 77
45784   fi
45785
45786
45787 mkdir dir
45788 mkdir dir/subdir
45789 genfile --file dir/subdir/file
45790
45791 MYNAME=$( id -un )
45792
45793 setfacl -m u:$MYNAME:--x dir/subdir
45794 setfacl -m u:$MYNAME:--x dir/subdir/file
45795
45796 cd dir
45797 getfattr -h -m. -d subdir subdir/file > ../before
45798 cd ..
45799
45800 tar --acls -cf archive.tar -C dir subdir
45801 rm -rf dir
45802
45803 mkdir dir
45804 tar --acls -xf archive.tar -C dir
45805
45806 cd dir
45807 getfattr -h -m. -d subdir subdir/file > ../after
45808 cd ..
45809
45810 diff before after
45811 test "$?" = 0
45812 )
45813 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45814 at_status=$? at_failed=false
45815 $at_check_filter
45816 at_fn_diff_devnull "$at_stderr" || at_failed=:
45817 at_fn_diff_devnull "$at_stdout" || at_failed=:
45818 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
45819 $at_failed && at_fn_log_failure
45820 $at_traceon; }
45821
45822
45823
45824
45825   set +x
45826   $at_times_p && times >"$at_times_file"
45827 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45828 read at_status <"$at_status_file"
45829 #AT_STOP_189
45830 #AT_START_190
45831 at_fn_group_banner 190 'acls03.at:30' \
45832   "acls: default ACLs" "                             " 25
45833 at_xfail=no
45834       test -f $XFAILFILE && at_xfail=yes
45835 (
45836   $as_echo "190. $at_setup_line: testing $at_desc ..."
45837   $at_traceon
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847   { set +x
45848 $as_echo "$at_srcdir/acls03.at:47:
45849 mkdir v7
45850 (cd v7
45851 TEST_TAR_FORMAT=v7
45852 export TEST_TAR_FORMAT
45853 TAR_OPTIONS=\"-H v7\"
45854 export TAR_OPTIONS
45855 rm -rf *
45856
45857
45858   file=\$(TMPDIR=. mktemp fiXXXXXX)
45859
45860   setfattr -n user.test -v test \$file &> /dev/null
45861   if test \"\$?\" != 0; then
45862     exit 77
45863   fi
45864
45865
45866   getfattr \$file &> /dev/null
45867   if test \"\$?\" != 0; then
45868     exit 77
45869   fi
45870
45871
45872
45873
45874   file=\$(TMPDIR=. mktemp fiXXXXXX)
45875
45876   setfacl -m u:\$UID:rwx \$file &> /dev/null
45877   if test \"\$?\" != 0; then
45878     exit 77
45879   fi
45880
45881
45882   getfacl \$file &> /dev/null
45883   if test \"\$?\" != 0; then
45884     exit 77
45885   fi
45886
45887   rm -rf \$file
45888
45889   file=\$(TMPDIR=. mktemp fiXXXXXX)
45890   setfacl -m u:\$UID:rwx \$file
45891   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
45892   if test \"\$err\" != \"0\"; then
45893     exit 77
45894   fi
45895
45896
45897 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45898
45899
45900 MYNAME=\$( id -un )
45901 MYGROUP=\$( id -gn )
45902
45903 # Prepare directory structure with default ACLs
45904 mkdir -p pure/d1/d2
45905 genfile --file pure/d1/f2a
45906 genfile --file pure/d1/f2b
45907 genfile --file pure/d1/d2/f3a
45908 genfile --file pure/d1/d2/f3b
45909 setfacl    -m g:\$MYGROUP:r-x pure/d1
45910 setfacl -d -m g:\$MYGROUP:rwx pure/d1
45911 setfacl -d -m u:\$MYNAME:rwx  pure/d1
45912 # \"*a\" files have \"some\" additional ACLs
45913 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
45914 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
45915
45916 # use default format (no acls stored)
45917 tar -cf noacl.tar -C pure d1
45918
45919 # use posix format, acls stored
45920 tar --acls -cf acl.tar -C pure d1
45921
45922 # Directory names are chosen based on \"how the files were extracted from
45923 # archive\".  Equivalent no* tags are used also:
45924 #   ^sacl_    â€” extracted archive has stored ACLs
45925 #   _def_     â€” target directory (-C) has default ACLs
45926 #   _optacl\$  â€” extraction was done with --acls option
45927
45928 mkdir sacl_def_optacl
45929 mkdir sacl_def_optnoacl
45930 mkdir sacl_nodef_optacl
45931 mkdir sacl_nodef_optnoacl
45932 mkdir nosacl_def_optacl
45933 mkdir nosacl_def_optnoacl
45934 mkdir nosacl_nodef_optacl
45935 mkdir nosacl_nodef_optnoacl
45936
45937 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
45938 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
45939
45940 tar -xf acl.tar -C sacl_nodef_optnoacl
45941 tar --acls -xf acl.tar -C sacl_nodef_optacl
45942 tar -xf acl.tar -C sacl_def_optnoacl
45943 tar --acls -xf acl.tar -C sacl_def_optacl
45944 tar -xf noacl.tar -C nosacl_def_optnoacl
45945 # _NO_ ACLs in output
45946 tar -xf noacl.tar -C nosacl_nodef_optnoacl
45947 tar -xf noacl.tar -C nosacl_nodef_optacl
45948 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
45949 # _NO_ ACLs in output (even when default ACLs exist)
45950 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
45951
45952
45953     cd pure
45954     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45955     cd ..
45956
45957
45958
45959     cd sacl_def_optacl
45960     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45961     cd ..
45962
45963
45964     cd sacl_def_optnoacl
45965     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45966     cd ..
45967
45968
45969     cd sacl_nodef_optacl
45970     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45971     cd ..
45972
45973
45974     cd sacl_nodef_optnoacl
45975     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45976     cd ..
45977
45978
45979     cd nosacl_def_optacl
45980     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45981     cd ..
45982
45983
45984     cd nosacl_def_optnoacl
45985     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45986     cd ..
45987
45988
45989     cd nosacl_nodef_optacl
45990     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45991     cd ..
45992
45993
45994     cd nosacl_nodef_optnoacl
45995     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
45996     cd ..
45997
45998
45999
46000     echo \"\$pure\" > pure.log
46001     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46002     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
46003         echo \"bad 'pure' against 'sacl_def_optacl' output\"
46004     fi
46005
46006
46007
46008     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46009     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
46010     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
46011         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
46012     fi
46013
46014
46015     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
46016     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46017     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
46018         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
46019     fi
46020
46021
46022     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
46023     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46024     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
46025         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
46026     fi
46027
46028
46029     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
46030     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
46031     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
46032         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
46033     fi
46034
46035
46036     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
46037     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46038     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
46039         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
46040     fi
46041
46042
46043
46044     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46045     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
46046     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
46047         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
46048     fi
46049
46050
46051     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46052     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46053     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
46054         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
46055     fi
46056
46057
46058     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46059     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46060     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
46061         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
46062     fi
46063
46064 )"
46065 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
46066 ( $at_check_trace;
46067 mkdir v7
46068 (cd v7
46069 TEST_TAR_FORMAT=v7
46070 export TEST_TAR_FORMAT
46071 TAR_OPTIONS="-H v7"
46072 export TAR_OPTIONS
46073 rm -rf *
46074
46075
46076   file=$(TMPDIR=. mktemp fiXXXXXX)
46077
46078   setfattr -n user.test -v test $file &> /dev/null
46079   if test "$?" != 0; then
46080     exit 77
46081   fi
46082
46083
46084   getfattr $file &> /dev/null
46085   if test "$?" != 0; then
46086     exit 77
46087   fi
46088
46089
46090
46091
46092   file=$(TMPDIR=. mktemp fiXXXXXX)
46093
46094   setfacl -m u:$UID:rwx $file &> /dev/null
46095   if test "$?" != 0; then
46096     exit 77
46097   fi
46098
46099
46100   getfacl $file &> /dev/null
46101   if test "$?" != 0; then
46102     exit 77
46103   fi
46104
46105   rm -rf $file
46106
46107   file=$(TMPDIR=. mktemp fiXXXXXX)
46108   setfacl -m u:$UID:rwx $file
46109   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
46110   if test "$err" != "0"; then
46111     exit 77
46112   fi
46113
46114
46115 test -z "`sort < /dev/null 2>&1`" || exit 77
46116
46117
46118 MYNAME=$( id -un )
46119 MYGROUP=$( id -gn )
46120
46121 # Prepare directory structure with default ACLs
46122 mkdir -p pure/d1/d2
46123 genfile --file pure/d1/f2a
46124 genfile --file pure/d1/f2b
46125 genfile --file pure/d1/d2/f3a
46126 genfile --file pure/d1/d2/f3b
46127 setfacl    -m g:$MYGROUP:r-x pure/d1
46128 setfacl -d -m g:$MYGROUP:rwx pure/d1
46129 setfacl -d -m u:$MYNAME:rwx  pure/d1
46130 # "*a" files have "some" additional ACLs
46131 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
46132 setfacl    -m u:$MYNAME:--- pure/d1/f2a
46133
46134 # use default format (no acls stored)
46135 tar -cf noacl.tar -C pure d1
46136
46137 # use posix format, acls stored
46138 tar --acls -cf acl.tar -C pure d1
46139
46140 # Directory names are chosen based on "how the files were extracted from
46141 # archive".  Equivalent no* tags are used also:
46142 #   ^sacl_    â€” extracted archive has stored ACLs
46143 #   _def_     â€” target directory (-C) has default ACLs
46144 #   _optacl$  â€” extraction was done with --acls option
46145
46146 mkdir sacl_def_optacl
46147 mkdir sacl_def_optnoacl
46148 mkdir sacl_nodef_optacl
46149 mkdir sacl_nodef_optnoacl
46150 mkdir nosacl_def_optacl
46151 mkdir nosacl_def_optnoacl
46152 mkdir nosacl_nodef_optacl
46153 mkdir nosacl_nodef_optnoacl
46154
46155 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
46156 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
46157
46158 tar -xf acl.tar -C sacl_nodef_optnoacl
46159 tar --acls -xf acl.tar -C sacl_nodef_optacl
46160 tar -xf acl.tar -C sacl_def_optnoacl
46161 tar --acls -xf acl.tar -C sacl_def_optacl
46162 tar -xf noacl.tar -C nosacl_def_optnoacl
46163 # _NO_ ACLs in output
46164 tar -xf noacl.tar -C nosacl_nodef_optnoacl
46165 tar -xf noacl.tar -C nosacl_nodef_optacl
46166 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
46167 # _NO_ ACLs in output (even when default ACLs exist)
46168 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
46169
46170
46171     cd pure
46172     pure="$(find d1 | sort | xargs -n 1 getfacl)"
46173     cd ..
46174
46175
46176
46177     cd sacl_def_optacl
46178     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
46179     cd ..
46180
46181
46182     cd sacl_def_optnoacl
46183     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
46184     cd ..
46185
46186
46187     cd sacl_nodef_optacl
46188     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
46189     cd ..
46190
46191
46192     cd sacl_nodef_optnoacl
46193     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
46194     cd ..
46195
46196
46197     cd nosacl_def_optacl
46198     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
46199     cd ..
46200
46201
46202     cd nosacl_def_optnoacl
46203     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
46204     cd ..
46205
46206
46207     cd nosacl_nodef_optacl
46208     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
46209     cd ..
46210
46211
46212     cd nosacl_nodef_optnoacl
46213     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
46214     cd ..
46215
46216
46217
46218     echo "$pure" > pure.log
46219     echo "$sacl_def_optacl" > sacl_def_optacl.log
46220     if test ! "$pure" "=" "$sacl_def_optacl"; then
46221         echo "bad 'pure' against 'sacl_def_optacl' output"
46222     fi
46223
46224
46225
46226     echo "$sacl_def_optacl" > sacl_def_optacl.log
46227     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
46228     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
46229         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
46230     fi
46231
46232
46233     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
46234     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
46235     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
46236         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
46237     fi
46238
46239
46240     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
46241     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
46242     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
46243         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
46244     fi
46245
46246
46247     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
46248     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
46249     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
46250         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
46251     fi
46252
46253
46254     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
46255     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
46256     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
46257         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
46258     fi
46259
46260
46261
46262     echo "$sacl_def_optacl" > sacl_def_optacl.log
46263     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
46264     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
46265         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
46266     fi
46267
46268
46269     echo "$sacl_def_optacl" > sacl_def_optacl.log
46270     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
46271     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
46272         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
46273     fi
46274
46275
46276     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
46277     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
46278     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
46279         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
46280     fi
46281
46282 )
46283 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46284 at_status=$? at_failed=false
46285 $at_check_filter
46286 at_fn_diff_devnull "$at_stderr" || at_failed=:
46287 at_fn_diff_devnull "$at_stdout" || at_failed=:
46288 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
46289 $at_failed && at_fn_log_failure
46290 $at_traceon; }
46291
46292               { set +x
46293 $as_echo "$at_srcdir/acls03.at:47:
46294 mkdir oldgnu
46295 (cd oldgnu
46296 TEST_TAR_FORMAT=oldgnu
46297 export TEST_TAR_FORMAT
46298 TAR_OPTIONS=\"-H oldgnu\"
46299 export TAR_OPTIONS
46300 rm -rf *
46301
46302
46303   file=\$(TMPDIR=. mktemp fiXXXXXX)
46304
46305   setfattr -n user.test -v test \$file &> /dev/null
46306   if test \"\$?\" != 0; then
46307     exit 77
46308   fi
46309
46310
46311   getfattr \$file &> /dev/null
46312   if test \"\$?\" != 0; then
46313     exit 77
46314   fi
46315
46316
46317
46318
46319   file=\$(TMPDIR=. mktemp fiXXXXXX)
46320
46321   setfacl -m u:\$UID:rwx \$file &> /dev/null
46322   if test \"\$?\" != 0; then
46323     exit 77
46324   fi
46325
46326
46327   getfacl \$file &> /dev/null
46328   if test \"\$?\" != 0; then
46329     exit 77
46330   fi
46331
46332   rm -rf \$file
46333
46334   file=\$(TMPDIR=. mktemp fiXXXXXX)
46335   setfacl -m u:\$UID:rwx \$file
46336   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
46337   if test \"\$err\" != \"0\"; then
46338     exit 77
46339   fi
46340
46341
46342 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46343
46344
46345 MYNAME=\$( id -un )
46346 MYGROUP=\$( id -gn )
46347
46348 # Prepare directory structure with default ACLs
46349 mkdir -p pure/d1/d2
46350 genfile --file pure/d1/f2a
46351 genfile --file pure/d1/f2b
46352 genfile --file pure/d1/d2/f3a
46353 genfile --file pure/d1/d2/f3b
46354 setfacl    -m g:\$MYGROUP:r-x pure/d1
46355 setfacl -d -m g:\$MYGROUP:rwx pure/d1
46356 setfacl -d -m u:\$MYNAME:rwx  pure/d1
46357 # \"*a\" files have \"some\" additional ACLs
46358 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
46359 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
46360
46361 # use default format (no acls stored)
46362 tar -cf noacl.tar -C pure d1
46363
46364 # use posix format, acls stored
46365 tar --acls -cf acl.tar -C pure d1
46366
46367 # Directory names are chosen based on \"how the files were extracted from
46368 # archive\".  Equivalent no* tags are used also:
46369 #   ^sacl_    â€” extracted archive has stored ACLs
46370 #   _def_     â€” target directory (-C) has default ACLs
46371 #   _optacl\$  â€” extraction was done with --acls option
46372
46373 mkdir sacl_def_optacl
46374 mkdir sacl_def_optnoacl
46375 mkdir sacl_nodef_optacl
46376 mkdir sacl_nodef_optnoacl
46377 mkdir nosacl_def_optacl
46378 mkdir nosacl_def_optnoacl
46379 mkdir nosacl_nodef_optacl
46380 mkdir nosacl_nodef_optnoacl
46381
46382 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
46383 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
46384
46385 tar -xf acl.tar -C sacl_nodef_optnoacl
46386 tar --acls -xf acl.tar -C sacl_nodef_optacl
46387 tar -xf acl.tar -C sacl_def_optnoacl
46388 tar --acls -xf acl.tar -C sacl_def_optacl
46389 tar -xf noacl.tar -C nosacl_def_optnoacl
46390 # _NO_ ACLs in output
46391 tar -xf noacl.tar -C nosacl_nodef_optnoacl
46392 tar -xf noacl.tar -C nosacl_nodef_optacl
46393 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
46394 # _NO_ ACLs in output (even when default ACLs exist)
46395 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
46396
46397
46398     cd pure
46399     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46400     cd ..
46401
46402
46403
46404     cd sacl_def_optacl
46405     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46406     cd ..
46407
46408
46409     cd sacl_def_optnoacl
46410     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46411     cd ..
46412
46413
46414     cd sacl_nodef_optacl
46415     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46416     cd ..
46417
46418
46419     cd sacl_nodef_optnoacl
46420     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46421     cd ..
46422
46423
46424     cd nosacl_def_optacl
46425     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46426     cd ..
46427
46428
46429     cd nosacl_def_optnoacl
46430     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46431     cd ..
46432
46433
46434     cd nosacl_nodef_optacl
46435     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46436     cd ..
46437
46438
46439     cd nosacl_nodef_optnoacl
46440     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46441     cd ..
46442
46443
46444
46445     echo \"\$pure\" > pure.log
46446     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46447     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
46448         echo \"bad 'pure' against 'sacl_def_optacl' output\"
46449     fi
46450
46451
46452
46453     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46454     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
46455     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
46456         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
46457     fi
46458
46459
46460     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
46461     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46462     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
46463         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
46464     fi
46465
46466
46467     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
46468     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46469     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
46470         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
46471     fi
46472
46473
46474     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
46475     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
46476     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
46477         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
46478     fi
46479
46480
46481     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
46482     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46483     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
46484         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
46485     fi
46486
46487
46488
46489     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46490     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
46491     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
46492         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
46493     fi
46494
46495
46496     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46497     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46498     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
46499         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
46500     fi
46501
46502
46503     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46504     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46505     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
46506         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
46507     fi
46508
46509 )"
46510 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
46511 ( $at_check_trace;
46512 mkdir oldgnu
46513 (cd oldgnu
46514 TEST_TAR_FORMAT=oldgnu
46515 export TEST_TAR_FORMAT
46516 TAR_OPTIONS="-H oldgnu"
46517 export TAR_OPTIONS
46518 rm -rf *
46519
46520
46521   file=$(TMPDIR=. mktemp fiXXXXXX)
46522
46523   setfattr -n user.test -v test $file &> /dev/null
46524   if test "$?" != 0; then
46525     exit 77
46526   fi
46527
46528
46529   getfattr $file &> /dev/null
46530   if test "$?" != 0; then
46531     exit 77
46532   fi
46533
46534
46535
46536
46537   file=$(TMPDIR=. mktemp fiXXXXXX)
46538
46539   setfacl -m u:$UID:rwx $file &> /dev/null
46540   if test "$?" != 0; then
46541     exit 77
46542   fi
46543
46544
46545   getfacl $file &> /dev/null
46546   if test "$?" != 0; then
46547     exit 77
46548   fi
46549
46550   rm -rf $file
46551
46552   file=$(TMPDIR=. mktemp fiXXXXXX)
46553   setfacl -m u:$UID:rwx $file
46554   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
46555   if test "$err" != "0"; then
46556     exit 77
46557   fi
46558
46559
46560 test -z "`sort < /dev/null 2>&1`" || exit 77
46561
46562
46563 MYNAME=$( id -un )
46564 MYGROUP=$( id -gn )
46565
46566 # Prepare directory structure with default ACLs
46567 mkdir -p pure/d1/d2
46568 genfile --file pure/d1/f2a
46569 genfile --file pure/d1/f2b
46570 genfile --file pure/d1/d2/f3a
46571 genfile --file pure/d1/d2/f3b
46572 setfacl    -m g:$MYGROUP:r-x pure/d1
46573 setfacl -d -m g:$MYGROUP:rwx pure/d1
46574 setfacl -d -m u:$MYNAME:rwx  pure/d1
46575 # "*a" files have "some" additional ACLs
46576 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
46577 setfacl    -m u:$MYNAME:--- pure/d1/f2a
46578
46579 # use default format (no acls stored)
46580 tar -cf noacl.tar -C pure d1
46581
46582 # use posix format, acls stored
46583 tar --acls -cf acl.tar -C pure d1
46584
46585 # Directory names are chosen based on "how the files were extracted from
46586 # archive".  Equivalent no* tags are used also:
46587 #   ^sacl_    â€” extracted archive has stored ACLs
46588 #   _def_     â€” target directory (-C) has default ACLs
46589 #   _optacl$  â€” extraction was done with --acls option
46590
46591 mkdir sacl_def_optacl
46592 mkdir sacl_def_optnoacl
46593 mkdir sacl_nodef_optacl
46594 mkdir sacl_nodef_optnoacl
46595 mkdir nosacl_def_optacl
46596 mkdir nosacl_def_optnoacl
46597 mkdir nosacl_nodef_optacl
46598 mkdir nosacl_nodef_optnoacl
46599
46600 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
46601 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
46602
46603 tar -xf acl.tar -C sacl_nodef_optnoacl
46604 tar --acls -xf acl.tar -C sacl_nodef_optacl
46605 tar -xf acl.tar -C sacl_def_optnoacl
46606 tar --acls -xf acl.tar -C sacl_def_optacl
46607 tar -xf noacl.tar -C nosacl_def_optnoacl
46608 # _NO_ ACLs in output
46609 tar -xf noacl.tar -C nosacl_nodef_optnoacl
46610 tar -xf noacl.tar -C nosacl_nodef_optacl
46611 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
46612 # _NO_ ACLs in output (even when default ACLs exist)
46613 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
46614
46615
46616     cd pure
46617     pure="$(find d1 | sort | xargs -n 1 getfacl)"
46618     cd ..
46619
46620
46621
46622     cd sacl_def_optacl
46623     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
46624     cd ..
46625
46626
46627     cd sacl_def_optnoacl
46628     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
46629     cd ..
46630
46631
46632     cd sacl_nodef_optacl
46633     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
46634     cd ..
46635
46636
46637     cd sacl_nodef_optnoacl
46638     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
46639     cd ..
46640
46641
46642     cd nosacl_def_optacl
46643     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
46644     cd ..
46645
46646
46647     cd nosacl_def_optnoacl
46648     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
46649     cd ..
46650
46651
46652     cd nosacl_nodef_optacl
46653     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
46654     cd ..
46655
46656
46657     cd nosacl_nodef_optnoacl
46658     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
46659     cd ..
46660
46661
46662
46663     echo "$pure" > pure.log
46664     echo "$sacl_def_optacl" > sacl_def_optacl.log
46665     if test ! "$pure" "=" "$sacl_def_optacl"; then
46666         echo "bad 'pure' against 'sacl_def_optacl' output"
46667     fi
46668
46669
46670
46671     echo "$sacl_def_optacl" > sacl_def_optacl.log
46672     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
46673     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
46674         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
46675     fi
46676
46677
46678     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
46679     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
46680     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
46681         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
46682     fi
46683
46684
46685     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
46686     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
46687     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
46688         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
46689     fi
46690
46691
46692     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
46693     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
46694     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
46695         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
46696     fi
46697
46698
46699     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
46700     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
46701     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
46702         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
46703     fi
46704
46705
46706
46707     echo "$sacl_def_optacl" > sacl_def_optacl.log
46708     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
46709     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
46710         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
46711     fi
46712
46713
46714     echo "$sacl_def_optacl" > sacl_def_optacl.log
46715     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
46716     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
46717         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
46718     fi
46719
46720
46721     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
46722     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
46723     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
46724         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
46725     fi
46726
46727 )
46728 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46729 at_status=$? at_failed=false
46730 $at_check_filter
46731 at_fn_diff_devnull "$at_stderr" || at_failed=:
46732 at_fn_diff_devnull "$at_stdout" || at_failed=:
46733 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
46734 $at_failed && at_fn_log_failure
46735 $at_traceon; }
46736
46737               { set +x
46738 $as_echo "$at_srcdir/acls03.at:47:
46739 mkdir ustar
46740 (cd ustar
46741 TEST_TAR_FORMAT=ustar
46742 export TEST_TAR_FORMAT
46743 TAR_OPTIONS=\"-H ustar\"
46744 export TAR_OPTIONS
46745 rm -rf *
46746
46747
46748   file=\$(TMPDIR=. mktemp fiXXXXXX)
46749
46750   setfattr -n user.test -v test \$file &> /dev/null
46751   if test \"\$?\" != 0; then
46752     exit 77
46753   fi
46754
46755
46756   getfattr \$file &> /dev/null
46757   if test \"\$?\" != 0; then
46758     exit 77
46759   fi
46760
46761
46762
46763
46764   file=\$(TMPDIR=. mktemp fiXXXXXX)
46765
46766   setfacl -m u:\$UID:rwx \$file &> /dev/null
46767   if test \"\$?\" != 0; then
46768     exit 77
46769   fi
46770
46771
46772   getfacl \$file &> /dev/null
46773   if test \"\$?\" != 0; then
46774     exit 77
46775   fi
46776
46777   rm -rf \$file
46778
46779   file=\$(TMPDIR=. mktemp fiXXXXXX)
46780   setfacl -m u:\$UID:rwx \$file
46781   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
46782   if test \"\$err\" != \"0\"; then
46783     exit 77
46784   fi
46785
46786
46787 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46788
46789
46790 MYNAME=\$( id -un )
46791 MYGROUP=\$( id -gn )
46792
46793 # Prepare directory structure with default ACLs
46794 mkdir -p pure/d1/d2
46795 genfile --file pure/d1/f2a
46796 genfile --file pure/d1/f2b
46797 genfile --file pure/d1/d2/f3a
46798 genfile --file pure/d1/d2/f3b
46799 setfacl    -m g:\$MYGROUP:r-x pure/d1
46800 setfacl -d -m g:\$MYGROUP:rwx pure/d1
46801 setfacl -d -m u:\$MYNAME:rwx  pure/d1
46802 # \"*a\" files have \"some\" additional ACLs
46803 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
46804 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
46805
46806 # use default format (no acls stored)
46807 tar -cf noacl.tar -C pure d1
46808
46809 # use posix format, acls stored
46810 tar --acls -cf acl.tar -C pure d1
46811
46812 # Directory names are chosen based on \"how the files were extracted from
46813 # archive\".  Equivalent no* tags are used also:
46814 #   ^sacl_    â€” extracted archive has stored ACLs
46815 #   _def_     â€” target directory (-C) has default ACLs
46816 #   _optacl\$  â€” extraction was done with --acls option
46817
46818 mkdir sacl_def_optacl
46819 mkdir sacl_def_optnoacl
46820 mkdir sacl_nodef_optacl
46821 mkdir sacl_nodef_optnoacl
46822 mkdir nosacl_def_optacl
46823 mkdir nosacl_def_optnoacl
46824 mkdir nosacl_nodef_optacl
46825 mkdir nosacl_nodef_optnoacl
46826
46827 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
46828 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
46829
46830 tar -xf acl.tar -C sacl_nodef_optnoacl
46831 tar --acls -xf acl.tar -C sacl_nodef_optacl
46832 tar -xf acl.tar -C sacl_def_optnoacl
46833 tar --acls -xf acl.tar -C sacl_def_optacl
46834 tar -xf noacl.tar -C nosacl_def_optnoacl
46835 # _NO_ ACLs in output
46836 tar -xf noacl.tar -C nosacl_nodef_optnoacl
46837 tar -xf noacl.tar -C nosacl_nodef_optacl
46838 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
46839 # _NO_ ACLs in output (even when default ACLs exist)
46840 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
46841
46842
46843     cd pure
46844     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46845     cd ..
46846
46847
46848
46849     cd sacl_def_optacl
46850     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46851     cd ..
46852
46853
46854     cd sacl_def_optnoacl
46855     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46856     cd ..
46857
46858
46859     cd sacl_nodef_optacl
46860     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46861     cd ..
46862
46863
46864     cd sacl_nodef_optnoacl
46865     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46866     cd ..
46867
46868
46869     cd nosacl_def_optacl
46870     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46871     cd ..
46872
46873
46874     cd nosacl_def_optnoacl
46875     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46876     cd ..
46877
46878
46879     cd nosacl_nodef_optacl
46880     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46881     cd ..
46882
46883
46884     cd nosacl_nodef_optnoacl
46885     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
46886     cd ..
46887
46888
46889
46890     echo \"\$pure\" > pure.log
46891     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46892     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
46893         echo \"bad 'pure' against 'sacl_def_optacl' output\"
46894     fi
46895
46896
46897
46898     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46899     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
46900     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
46901         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
46902     fi
46903
46904
46905     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
46906     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46907     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
46908         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
46909     fi
46910
46911
46912     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
46913     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46914     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
46915         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
46916     fi
46917
46918
46919     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
46920     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
46921     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
46922         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
46923     fi
46924
46925
46926     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
46927     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46928     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
46929         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
46930     fi
46931
46932
46933
46934     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46935     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
46936     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
46937         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
46938     fi
46939
46940
46941     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
46942     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46943     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
46944         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
46945     fi
46946
46947
46948     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
46949     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
46950     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
46951         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
46952     fi
46953
46954 )"
46955 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
46956 ( $at_check_trace;
46957 mkdir ustar
46958 (cd ustar
46959 TEST_TAR_FORMAT=ustar
46960 export TEST_TAR_FORMAT
46961 TAR_OPTIONS="-H ustar"
46962 export TAR_OPTIONS
46963 rm -rf *
46964
46965
46966   file=$(TMPDIR=. mktemp fiXXXXXX)
46967
46968   setfattr -n user.test -v test $file &> /dev/null
46969   if test "$?" != 0; then
46970     exit 77
46971   fi
46972
46973
46974   getfattr $file &> /dev/null
46975   if test "$?" != 0; then
46976     exit 77
46977   fi
46978
46979
46980
46981
46982   file=$(TMPDIR=. mktemp fiXXXXXX)
46983
46984   setfacl -m u:$UID:rwx $file &> /dev/null
46985   if test "$?" != 0; then
46986     exit 77
46987   fi
46988
46989
46990   getfacl $file &> /dev/null
46991   if test "$?" != 0; then
46992     exit 77
46993   fi
46994
46995   rm -rf $file
46996
46997   file=$(TMPDIR=. mktemp fiXXXXXX)
46998   setfacl -m u:$UID:rwx $file
46999   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
47000   if test "$err" != "0"; then
47001     exit 77
47002   fi
47003
47004
47005 test -z "`sort < /dev/null 2>&1`" || exit 77
47006
47007
47008 MYNAME=$( id -un )
47009 MYGROUP=$( id -gn )
47010
47011 # Prepare directory structure with default ACLs
47012 mkdir -p pure/d1/d2
47013 genfile --file pure/d1/f2a
47014 genfile --file pure/d1/f2b
47015 genfile --file pure/d1/d2/f3a
47016 genfile --file pure/d1/d2/f3b
47017 setfacl    -m g:$MYGROUP:r-x pure/d1
47018 setfacl -d -m g:$MYGROUP:rwx pure/d1
47019 setfacl -d -m u:$MYNAME:rwx  pure/d1
47020 # "*a" files have "some" additional ACLs
47021 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
47022 setfacl    -m u:$MYNAME:--- pure/d1/f2a
47023
47024 # use default format (no acls stored)
47025 tar -cf noacl.tar -C pure d1
47026
47027 # use posix format, acls stored
47028 tar --acls -cf acl.tar -C pure d1
47029
47030 # Directory names are chosen based on "how the files were extracted from
47031 # archive".  Equivalent no* tags are used also:
47032 #   ^sacl_    â€” extracted archive has stored ACLs
47033 #   _def_     â€” target directory (-C) has default ACLs
47034 #   _optacl$  â€” extraction was done with --acls option
47035
47036 mkdir sacl_def_optacl
47037 mkdir sacl_def_optnoacl
47038 mkdir sacl_nodef_optacl
47039 mkdir sacl_nodef_optnoacl
47040 mkdir nosacl_def_optacl
47041 mkdir nosacl_def_optnoacl
47042 mkdir nosacl_nodef_optacl
47043 mkdir nosacl_nodef_optnoacl
47044
47045 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47046 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47047
47048 tar -xf acl.tar -C sacl_nodef_optnoacl
47049 tar --acls -xf acl.tar -C sacl_nodef_optacl
47050 tar -xf acl.tar -C sacl_def_optnoacl
47051 tar --acls -xf acl.tar -C sacl_def_optacl
47052 tar -xf noacl.tar -C nosacl_def_optnoacl
47053 # _NO_ ACLs in output
47054 tar -xf noacl.tar -C nosacl_nodef_optnoacl
47055 tar -xf noacl.tar -C nosacl_nodef_optacl
47056 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
47057 # _NO_ ACLs in output (even when default ACLs exist)
47058 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
47059
47060
47061     cd pure
47062     pure="$(find d1 | sort | xargs -n 1 getfacl)"
47063     cd ..
47064
47065
47066
47067     cd sacl_def_optacl
47068     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47069     cd ..
47070
47071
47072     cd sacl_def_optnoacl
47073     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47074     cd ..
47075
47076
47077     cd sacl_nodef_optacl
47078     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47079     cd ..
47080
47081
47082     cd sacl_nodef_optnoacl
47083     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47084     cd ..
47085
47086
47087     cd nosacl_def_optacl
47088     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47089     cd ..
47090
47091
47092     cd nosacl_def_optnoacl
47093     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47094     cd ..
47095
47096
47097     cd nosacl_nodef_optacl
47098     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47099     cd ..
47100
47101
47102     cd nosacl_nodef_optnoacl
47103     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47104     cd ..
47105
47106
47107
47108     echo "$pure" > pure.log
47109     echo "$sacl_def_optacl" > sacl_def_optacl.log
47110     if test ! "$pure" "=" "$sacl_def_optacl"; then
47111         echo "bad 'pure' against 'sacl_def_optacl' output"
47112     fi
47113
47114
47115
47116     echo "$sacl_def_optacl" > sacl_def_optacl.log
47117     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
47118     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
47119         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
47120     fi
47121
47122
47123     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
47124     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
47125     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
47126         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
47127     fi
47128
47129
47130     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
47131     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
47132     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
47133         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
47134     fi
47135
47136
47137     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
47138     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
47139     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
47140         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
47141     fi
47142
47143
47144     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
47145     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
47146     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
47147         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
47148     fi
47149
47150
47151
47152     echo "$sacl_def_optacl" > sacl_def_optacl.log
47153     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
47154     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
47155         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
47156     fi
47157
47158
47159     echo "$sacl_def_optacl" > sacl_def_optacl.log
47160     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
47161     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
47162         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
47163     fi
47164
47165
47166     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
47167     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
47168     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
47169         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
47170     fi
47171
47172 )
47173 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47174 at_status=$? at_failed=false
47175 $at_check_filter
47176 at_fn_diff_devnull "$at_stderr" || at_failed=:
47177 at_fn_diff_devnull "$at_stdout" || at_failed=:
47178 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
47179 $at_failed && at_fn_log_failure
47180 $at_traceon; }
47181
47182               { set +x
47183 $as_echo "$at_srcdir/acls03.at:47:
47184 mkdir posix
47185 (cd posix
47186 TEST_TAR_FORMAT=posix
47187 export TEST_TAR_FORMAT
47188 TAR_OPTIONS=\"-H posix\"
47189 export TAR_OPTIONS
47190 rm -rf *
47191
47192
47193   file=\$(TMPDIR=. mktemp fiXXXXXX)
47194
47195   setfattr -n user.test -v test \$file &> /dev/null
47196   if test \"\$?\" != 0; then
47197     exit 77
47198   fi
47199
47200
47201   getfattr \$file &> /dev/null
47202   if test \"\$?\" != 0; then
47203     exit 77
47204   fi
47205
47206
47207
47208
47209   file=\$(TMPDIR=. mktemp fiXXXXXX)
47210
47211   setfacl -m u:\$UID:rwx \$file &> /dev/null
47212   if test \"\$?\" != 0; then
47213     exit 77
47214   fi
47215
47216
47217   getfacl \$file &> /dev/null
47218   if test \"\$?\" != 0; then
47219     exit 77
47220   fi
47221
47222   rm -rf \$file
47223
47224   file=\$(TMPDIR=. mktemp fiXXXXXX)
47225   setfacl -m u:\$UID:rwx \$file
47226   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
47227   if test \"\$err\" != \"0\"; then
47228     exit 77
47229   fi
47230
47231
47232 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
47233
47234
47235 MYNAME=\$( id -un )
47236 MYGROUP=\$( id -gn )
47237
47238 # Prepare directory structure with default ACLs
47239 mkdir -p pure/d1/d2
47240 genfile --file pure/d1/f2a
47241 genfile --file pure/d1/f2b
47242 genfile --file pure/d1/d2/f3a
47243 genfile --file pure/d1/d2/f3b
47244 setfacl    -m g:\$MYGROUP:r-x pure/d1
47245 setfacl -d -m g:\$MYGROUP:rwx pure/d1
47246 setfacl -d -m u:\$MYNAME:rwx  pure/d1
47247 # \"*a\" files have \"some\" additional ACLs
47248 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
47249 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
47250
47251 # use default format (no acls stored)
47252 tar -cf noacl.tar -C pure d1
47253
47254 # use posix format, acls stored
47255 tar --acls -cf acl.tar -C pure d1
47256
47257 # Directory names are chosen based on \"how the files were extracted from
47258 # archive\".  Equivalent no* tags are used also:
47259 #   ^sacl_    â€” extracted archive has stored ACLs
47260 #   _def_     â€” target directory (-C) has default ACLs
47261 #   _optacl\$  â€” extraction was done with --acls option
47262
47263 mkdir sacl_def_optacl
47264 mkdir sacl_def_optnoacl
47265 mkdir sacl_nodef_optacl
47266 mkdir sacl_nodef_optnoacl
47267 mkdir nosacl_def_optacl
47268 mkdir nosacl_def_optnoacl
47269 mkdir nosacl_nodef_optacl
47270 mkdir nosacl_nodef_optnoacl
47271
47272 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47273 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47274
47275 tar -xf acl.tar -C sacl_nodef_optnoacl
47276 tar --acls -xf acl.tar -C sacl_nodef_optacl
47277 tar -xf acl.tar -C sacl_def_optnoacl
47278 tar --acls -xf acl.tar -C sacl_def_optacl
47279 tar -xf noacl.tar -C nosacl_def_optnoacl
47280 # _NO_ ACLs in output
47281 tar -xf noacl.tar -C nosacl_nodef_optnoacl
47282 tar -xf noacl.tar -C nosacl_nodef_optacl
47283 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
47284 # _NO_ ACLs in output (even when default ACLs exist)
47285 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
47286
47287
47288     cd pure
47289     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47290     cd ..
47291
47292
47293
47294     cd sacl_def_optacl
47295     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47296     cd ..
47297
47298
47299     cd sacl_def_optnoacl
47300     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47301     cd ..
47302
47303
47304     cd sacl_nodef_optacl
47305     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47306     cd ..
47307
47308
47309     cd sacl_nodef_optnoacl
47310     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47311     cd ..
47312
47313
47314     cd nosacl_def_optacl
47315     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47316     cd ..
47317
47318
47319     cd nosacl_def_optnoacl
47320     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47321     cd ..
47322
47323
47324     cd nosacl_nodef_optacl
47325     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47326     cd ..
47327
47328
47329     cd nosacl_nodef_optnoacl
47330     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47331     cd ..
47332
47333
47334
47335     echo \"\$pure\" > pure.log
47336     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
47337     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
47338         echo \"bad 'pure' against 'sacl_def_optacl' output\"
47339     fi
47340
47341
47342
47343     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
47344     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
47345     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
47346         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
47347     fi
47348
47349
47350     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
47351     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
47352     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
47353         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
47354     fi
47355
47356
47357     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
47358     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
47359     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
47360         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
47361     fi
47362
47363
47364     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
47365     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
47366     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
47367         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
47368     fi
47369
47370
47371     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
47372     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
47373     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
47374         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
47375     fi
47376
47377
47378
47379     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
47380     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
47381     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
47382         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
47383     fi
47384
47385
47386     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
47387     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
47388     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
47389         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
47390     fi
47391
47392
47393     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
47394     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
47395     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
47396         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
47397     fi
47398
47399 )"
47400 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
47401 ( $at_check_trace;
47402 mkdir posix
47403 (cd posix
47404 TEST_TAR_FORMAT=posix
47405 export TEST_TAR_FORMAT
47406 TAR_OPTIONS="-H posix"
47407 export TAR_OPTIONS
47408 rm -rf *
47409
47410
47411   file=$(TMPDIR=. mktemp fiXXXXXX)
47412
47413   setfattr -n user.test -v test $file &> /dev/null
47414   if test "$?" != 0; then
47415     exit 77
47416   fi
47417
47418
47419   getfattr $file &> /dev/null
47420   if test "$?" != 0; then
47421     exit 77
47422   fi
47423
47424
47425
47426
47427   file=$(TMPDIR=. mktemp fiXXXXXX)
47428
47429   setfacl -m u:$UID:rwx $file &> /dev/null
47430   if test "$?" != 0; then
47431     exit 77
47432   fi
47433
47434
47435   getfacl $file &> /dev/null
47436   if test "$?" != 0; then
47437     exit 77
47438   fi
47439
47440   rm -rf $file
47441
47442   file=$(TMPDIR=. mktemp fiXXXXXX)
47443   setfacl -m u:$UID:rwx $file
47444   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
47445   if test "$err" != "0"; then
47446     exit 77
47447   fi
47448
47449
47450 test -z "`sort < /dev/null 2>&1`" || exit 77
47451
47452
47453 MYNAME=$( id -un )
47454 MYGROUP=$( id -gn )
47455
47456 # Prepare directory structure with default ACLs
47457 mkdir -p pure/d1/d2
47458 genfile --file pure/d1/f2a
47459 genfile --file pure/d1/f2b
47460 genfile --file pure/d1/d2/f3a
47461 genfile --file pure/d1/d2/f3b
47462 setfacl    -m g:$MYGROUP:r-x pure/d1
47463 setfacl -d -m g:$MYGROUP:rwx pure/d1
47464 setfacl -d -m u:$MYNAME:rwx  pure/d1
47465 # "*a" files have "some" additional ACLs
47466 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
47467 setfacl    -m u:$MYNAME:--- pure/d1/f2a
47468
47469 # use default format (no acls stored)
47470 tar -cf noacl.tar -C pure d1
47471
47472 # use posix format, acls stored
47473 tar --acls -cf acl.tar -C pure d1
47474
47475 # Directory names are chosen based on "how the files were extracted from
47476 # archive".  Equivalent no* tags are used also:
47477 #   ^sacl_    â€” extracted archive has stored ACLs
47478 #   _def_     â€” target directory (-C) has default ACLs
47479 #   _optacl$  â€” extraction was done with --acls option
47480
47481 mkdir sacl_def_optacl
47482 mkdir sacl_def_optnoacl
47483 mkdir sacl_nodef_optacl
47484 mkdir sacl_nodef_optnoacl
47485 mkdir nosacl_def_optacl
47486 mkdir nosacl_def_optnoacl
47487 mkdir nosacl_nodef_optacl
47488 mkdir nosacl_nodef_optnoacl
47489
47490 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47491 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47492
47493 tar -xf acl.tar -C sacl_nodef_optnoacl
47494 tar --acls -xf acl.tar -C sacl_nodef_optacl
47495 tar -xf acl.tar -C sacl_def_optnoacl
47496 tar --acls -xf acl.tar -C sacl_def_optacl
47497 tar -xf noacl.tar -C nosacl_def_optnoacl
47498 # _NO_ ACLs in output
47499 tar -xf noacl.tar -C nosacl_nodef_optnoacl
47500 tar -xf noacl.tar -C nosacl_nodef_optacl
47501 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
47502 # _NO_ ACLs in output (even when default ACLs exist)
47503 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
47504
47505
47506     cd pure
47507     pure="$(find d1 | sort | xargs -n 1 getfacl)"
47508     cd ..
47509
47510
47511
47512     cd sacl_def_optacl
47513     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47514     cd ..
47515
47516
47517     cd sacl_def_optnoacl
47518     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47519     cd ..
47520
47521
47522     cd sacl_nodef_optacl
47523     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47524     cd ..
47525
47526
47527     cd sacl_nodef_optnoacl
47528     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47529     cd ..
47530
47531
47532     cd nosacl_def_optacl
47533     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47534     cd ..
47535
47536
47537     cd nosacl_def_optnoacl
47538     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47539     cd ..
47540
47541
47542     cd nosacl_nodef_optacl
47543     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47544     cd ..
47545
47546
47547     cd nosacl_nodef_optnoacl
47548     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47549     cd ..
47550
47551
47552
47553     echo "$pure" > pure.log
47554     echo "$sacl_def_optacl" > sacl_def_optacl.log
47555     if test ! "$pure" "=" "$sacl_def_optacl"; then
47556         echo "bad 'pure' against 'sacl_def_optacl' output"
47557     fi
47558
47559
47560
47561     echo "$sacl_def_optacl" > sacl_def_optacl.log
47562     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
47563     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
47564         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
47565     fi
47566
47567
47568     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
47569     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
47570     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
47571         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
47572     fi
47573
47574
47575     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
47576     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
47577     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
47578         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
47579     fi
47580
47581
47582     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
47583     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
47584     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
47585         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
47586     fi
47587
47588
47589     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
47590     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
47591     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
47592         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
47593     fi
47594
47595
47596
47597     echo "$sacl_def_optacl" > sacl_def_optacl.log
47598     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
47599     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
47600         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
47601     fi
47602
47603
47604     echo "$sacl_def_optacl" > sacl_def_optacl.log
47605     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
47606     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
47607         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
47608     fi
47609
47610
47611     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
47612     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
47613     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
47614         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
47615     fi
47616
47617 )
47618 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
47619 at_status=$? at_failed=false
47620 $at_check_filter
47621 at_fn_diff_devnull "$at_stderr" || at_failed=:
47622 at_fn_diff_devnull "$at_stdout" || at_failed=:
47623 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
47624 $at_failed && at_fn_log_failure
47625 $at_traceon; }
47626
47627               { set +x
47628 $as_echo "$at_srcdir/acls03.at:47:
47629 mkdir gnu
47630 (cd gnu
47631 TEST_TAR_FORMAT=gnu
47632 export TEST_TAR_FORMAT
47633 TAR_OPTIONS=\"-H gnu\"
47634 export TAR_OPTIONS
47635 rm -rf *
47636
47637
47638   file=\$(TMPDIR=. mktemp fiXXXXXX)
47639
47640   setfattr -n user.test -v test \$file &> /dev/null
47641   if test \"\$?\" != 0; then
47642     exit 77
47643   fi
47644
47645
47646   getfattr \$file &> /dev/null
47647   if test \"\$?\" != 0; then
47648     exit 77
47649   fi
47650
47651
47652
47653
47654   file=\$(TMPDIR=. mktemp fiXXXXXX)
47655
47656   setfacl -m u:\$UID:rwx \$file &> /dev/null
47657   if test \"\$?\" != 0; then
47658     exit 77
47659   fi
47660
47661
47662   getfacl \$file &> /dev/null
47663   if test \"\$?\" != 0; then
47664     exit 77
47665   fi
47666
47667   rm -rf \$file
47668
47669   file=\$(TMPDIR=. mktemp fiXXXXXX)
47670   setfacl -m u:\$UID:rwx \$file
47671   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
47672   if test \"\$err\" != \"0\"; then
47673     exit 77
47674   fi
47675
47676
47677 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
47678
47679
47680 MYNAME=\$( id -un )
47681 MYGROUP=\$( id -gn )
47682
47683 # Prepare directory structure with default ACLs
47684 mkdir -p pure/d1/d2
47685 genfile --file pure/d1/f2a
47686 genfile --file pure/d1/f2b
47687 genfile --file pure/d1/d2/f3a
47688 genfile --file pure/d1/d2/f3b
47689 setfacl    -m g:\$MYGROUP:r-x pure/d1
47690 setfacl -d -m g:\$MYGROUP:rwx pure/d1
47691 setfacl -d -m u:\$MYNAME:rwx  pure/d1
47692 # \"*a\" files have \"some\" additional ACLs
47693 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
47694 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
47695
47696 # use default format (no acls stored)
47697 tar -cf noacl.tar -C pure d1
47698
47699 # use posix format, acls stored
47700 tar --acls -cf acl.tar -C pure d1
47701
47702 # Directory names are chosen based on \"how the files were extracted from
47703 # archive\".  Equivalent no* tags are used also:
47704 #   ^sacl_    â€” extracted archive has stored ACLs
47705 #   _def_     â€” target directory (-C) has default ACLs
47706 #   _optacl\$  â€” extraction was done with --acls option
47707
47708 mkdir sacl_def_optacl
47709 mkdir sacl_def_optnoacl
47710 mkdir sacl_nodef_optacl
47711 mkdir sacl_nodef_optnoacl
47712 mkdir nosacl_def_optacl
47713 mkdir nosacl_def_optnoacl
47714 mkdir nosacl_nodef_optacl
47715 mkdir nosacl_nodef_optnoacl
47716
47717 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47718 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47719
47720 tar -xf acl.tar -C sacl_nodef_optnoacl
47721 tar --acls -xf acl.tar -C sacl_nodef_optacl
47722 tar -xf acl.tar -C sacl_def_optnoacl
47723 tar --acls -xf acl.tar -C sacl_def_optacl
47724 tar -xf noacl.tar -C nosacl_def_optnoacl
47725 # _NO_ ACLs in output
47726 tar -xf noacl.tar -C nosacl_nodef_optnoacl
47727 tar -xf noacl.tar -C nosacl_nodef_optacl
47728 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
47729 # _NO_ ACLs in output (even when default ACLs exist)
47730 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
47731
47732
47733     cd pure
47734     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47735     cd ..
47736
47737
47738
47739     cd sacl_def_optacl
47740     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47741     cd ..
47742
47743
47744     cd sacl_def_optnoacl
47745     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47746     cd ..
47747
47748
47749     cd sacl_nodef_optacl
47750     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47751     cd ..
47752
47753
47754     cd sacl_nodef_optnoacl
47755     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47756     cd ..
47757
47758
47759     cd nosacl_def_optacl
47760     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47761     cd ..
47762
47763
47764     cd nosacl_def_optnoacl
47765     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47766     cd ..
47767
47768
47769     cd nosacl_nodef_optacl
47770     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47771     cd ..
47772
47773
47774     cd nosacl_nodef_optnoacl
47775     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
47776     cd ..
47777
47778
47779
47780     echo \"\$pure\" > pure.log
47781     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
47782     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
47783         echo \"bad 'pure' against 'sacl_def_optacl' output\"
47784     fi
47785
47786
47787
47788     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
47789     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
47790     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
47791         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
47792     fi
47793
47794
47795     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
47796     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
47797     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
47798         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
47799     fi
47800
47801
47802     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
47803     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
47804     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
47805         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
47806     fi
47807
47808
47809     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
47810     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
47811     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
47812         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
47813     fi
47814
47815
47816     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
47817     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
47818     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
47819         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
47820     fi
47821
47822
47823
47824     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
47825     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
47826     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
47827         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
47828     fi
47829
47830
47831     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
47832     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
47833     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
47834         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
47835     fi
47836
47837
47838     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
47839     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
47840     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
47841         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
47842     fi
47843
47844 )"
47845 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
47846 ( $at_check_trace;
47847 mkdir gnu
47848 (cd gnu
47849 TEST_TAR_FORMAT=gnu
47850 export TEST_TAR_FORMAT
47851 TAR_OPTIONS="-H gnu"
47852 export TAR_OPTIONS
47853 rm -rf *
47854
47855
47856   file=$(TMPDIR=. mktemp fiXXXXXX)
47857
47858   setfattr -n user.test -v test $file &> /dev/null
47859   if test "$?" != 0; then
47860     exit 77
47861   fi
47862
47863
47864   getfattr $file &> /dev/null
47865   if test "$?" != 0; then
47866     exit 77
47867   fi
47868
47869
47870
47871
47872   file=$(TMPDIR=. mktemp fiXXXXXX)
47873
47874   setfacl -m u:$UID:rwx $file &> /dev/null
47875   if test "$?" != 0; then
47876     exit 77
47877   fi
47878
47879
47880   getfacl $file &> /dev/null
47881   if test "$?" != 0; then
47882     exit 77
47883   fi
47884
47885   rm -rf $file
47886
47887   file=$(TMPDIR=. mktemp fiXXXXXX)
47888   setfacl -m u:$UID:rwx $file
47889   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
47890   if test "$err" != "0"; then
47891     exit 77
47892   fi
47893
47894
47895 test -z "`sort < /dev/null 2>&1`" || exit 77
47896
47897
47898 MYNAME=$( id -un )
47899 MYGROUP=$( id -gn )
47900
47901 # Prepare directory structure with default ACLs
47902 mkdir -p pure/d1/d2
47903 genfile --file pure/d1/f2a
47904 genfile --file pure/d1/f2b
47905 genfile --file pure/d1/d2/f3a
47906 genfile --file pure/d1/d2/f3b
47907 setfacl    -m g:$MYGROUP:r-x pure/d1
47908 setfacl -d -m g:$MYGROUP:rwx pure/d1
47909 setfacl -d -m u:$MYNAME:rwx  pure/d1
47910 # "*a" files have "some" additional ACLs
47911 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
47912 setfacl    -m u:$MYNAME:--- pure/d1/f2a
47913
47914 # use default format (no acls stored)
47915 tar -cf noacl.tar -C pure d1
47916
47917 # use posix format, acls stored
47918 tar --acls -cf acl.tar -C pure d1
47919
47920 # Directory names are chosen based on "how the files were extracted from
47921 # archive".  Equivalent no* tags are used also:
47922 #   ^sacl_    â€” extracted archive has stored ACLs
47923 #   _def_     â€” target directory (-C) has default ACLs
47924 #   _optacl$  â€” extraction was done with --acls option
47925
47926 mkdir sacl_def_optacl
47927 mkdir sacl_def_optnoacl
47928 mkdir sacl_nodef_optacl
47929 mkdir sacl_nodef_optnoacl
47930 mkdir nosacl_def_optacl
47931 mkdir nosacl_def_optnoacl
47932 mkdir nosacl_nodef_optacl
47933 mkdir nosacl_nodef_optnoacl
47934
47935 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47936 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
47937
47938 tar -xf acl.tar -C sacl_nodef_optnoacl
47939 tar --acls -xf acl.tar -C sacl_nodef_optacl
47940 tar -xf acl.tar -C sacl_def_optnoacl
47941 tar --acls -xf acl.tar -C sacl_def_optacl
47942 tar -xf noacl.tar -C nosacl_def_optnoacl
47943 # _NO_ ACLs in output
47944 tar -xf noacl.tar -C nosacl_nodef_optnoacl
47945 tar -xf noacl.tar -C nosacl_nodef_optacl
47946 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
47947 # _NO_ ACLs in output (even when default ACLs exist)
47948 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
47949
47950
47951     cd pure
47952     pure="$(find d1 | sort | xargs -n 1 getfacl)"
47953     cd ..
47954
47955
47956
47957     cd sacl_def_optacl
47958     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47959     cd ..
47960
47961
47962     cd sacl_def_optnoacl
47963     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47964     cd ..
47965
47966
47967     cd sacl_nodef_optacl
47968     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47969     cd ..
47970
47971
47972     cd sacl_nodef_optnoacl
47973     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47974     cd ..
47975
47976
47977     cd nosacl_def_optacl
47978     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47979     cd ..
47980
47981
47982     cd nosacl_def_optnoacl
47983     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47984     cd ..
47985
47986
47987     cd nosacl_nodef_optacl
47988     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
47989     cd ..
47990
47991
47992     cd nosacl_nodef_optnoacl
47993     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
47994     cd ..
47995
47996
47997
47998     echo "$pure" > pure.log
47999     echo "$sacl_def_optacl" > sacl_def_optacl.log
48000     if test ! "$pure" "=" "$sacl_def_optacl"; then
48001         echo "bad 'pure' against 'sacl_def_optacl' output"
48002     fi
48003
48004
48005
48006     echo "$sacl_def_optacl" > sacl_def_optacl.log
48007     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
48008     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
48009         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
48010     fi
48011
48012
48013     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
48014     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
48015     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
48016         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
48017     fi
48018
48019
48020     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
48021     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
48022     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
48023         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
48024     fi
48025
48026
48027     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
48028     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
48029     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
48030         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
48031     fi
48032
48033
48034     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
48035     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
48036     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
48037         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
48038     fi
48039
48040
48041
48042     echo "$sacl_def_optacl" > sacl_def_optacl.log
48043     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
48044     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
48045         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
48046     fi
48047
48048
48049     echo "$sacl_def_optacl" > sacl_def_optacl.log
48050     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
48051     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
48052         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
48053     fi
48054
48055
48056     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
48057     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
48058     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
48059         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
48060     fi
48061
48062 )
48063 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48064 at_status=$? at_failed=false
48065 $at_check_filter
48066 at_fn_diff_devnull "$at_stderr" || at_failed=:
48067 at_fn_diff_devnull "$at_stdout" || at_failed=:
48068 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
48069 $at_failed && at_fn_log_failure
48070 $at_traceon; }
48071
48072
48073
48074
48075   set +x
48076   $at_times_p && times >"$at_times_file"
48077 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
48078 read at_status <"$at_status_file"
48079 #AT_STOP_190
48080 #AT_START_191
48081 at_fn_group_banner 191 'selnx01.at:25' \
48082   "selinux: basic store/restore" "                   " 25
48083 at_xfail=no
48084       test -f $XFAILFILE && at_xfail=yes
48085 (
48086   $as_echo "191. $at_setup_line: testing $at_desc ..."
48087   $at_traceon
48088
48089
48090
48091
48092
48093   { set +x
48094 $as_echo "$at_srcdir/selnx01.at:28:
48095 mkdir v7
48096 (cd v7
48097 TEST_TAR_FORMAT=v7
48098 export TEST_TAR_FORMAT
48099 TAR_OPTIONS=\"-H v7\"
48100 export TAR_OPTIONS
48101 rm -rf *
48102
48103
48104   file=\$(TMPDIR=. mktemp fiXXXXXX)
48105
48106   setfattr -n user.test -v test \$file &> /dev/null
48107   if test \"\$?\" != 0; then
48108     exit 77
48109   fi
48110
48111
48112   getfattr \$file &> /dev/null
48113   if test \"\$?\" != 0; then
48114     exit 77
48115   fi
48116
48117
48118
48119
48120   file=\$(TMPDIR=. mktemp fiXXXXXX)
48121
48122   restorecon \$file &> /dev/null
48123   if test \"\$?\" != 0; then
48124     exit 77
48125   fi
48126
48127
48128   chcon -h --user=unconfined_u \$file &> /dev/null
48129   if test \"\$?\" != 0; then
48130     exit 77
48131   fi
48132
48133   rm -rf \$file
48134
48135   file=\$(TMPDIR=. mktemp fiXXXXXX)
48136   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48137   if test \"\$err\" != \"0\"; then
48138     exit 77
48139   fi
48140
48141
48142 mkdir dir
48143 genfile --file dir/file
48144 ln -s file dir/link
48145
48146 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
48147
48148 restorecon -R dir
48149 chcon -h --user=system_u     dir
48150 chcon -h --user=unconfined_u dir/file
48151 chcon -h --user=system_u     dir/link
48152
48153 # archive whole directory including selinux contexts
48154 tar --selinux -cf archive.tar dir
48155
48156 # clear the directory
48157 rm -rf dir
48158
48159 # ================================================
48160 # check if selinux contexts are correctly restored
48161
48162 tar --selinux -xf archive.tar
48163
48164 # archive for later debugging
48165 cp archive.tar archive_origin.tar
48166
48167 # check if selinux contexts were restored
48168 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
48169     grep -v -e '^#' -e ^\$ | cut -d: -f1
48170
48171 # ===========================================================================
48172 # check if selinux contexts are not restored when --selinux option is missing
48173
48174 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
48175 rm -rf dir
48176 tar -xf archive.tar
48177 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
48178
48179 diff with_selinux without_selinux > diff_with_without
48180 if test \"\$?\" -eq \"0\"; then
48181     echo \"selinux contexts probably restored while --selinux is off\"
48182 fi
48183
48184 # =================================================================
48185 # check if selinux is not archived when --selinux option is missing
48186
48187 tar -cf archive.tar dir
48188
48189 # clear the directory
48190 rm -rf dir
48191
48192 # restore (with --selinux)
48193 tar --selinux -xf archive.tar dir
48194
48195 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
48196 diff start final > final_diff
48197 if test \"\$?\" -ne \"0\"; then
48198     echo \"bad result\"
48199 fi
48200
48201 )"
48202 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
48203 ( $at_check_trace;
48204 mkdir v7
48205 (cd v7
48206 TEST_TAR_FORMAT=v7
48207 export TEST_TAR_FORMAT
48208 TAR_OPTIONS="-H v7"
48209 export TAR_OPTIONS
48210 rm -rf *
48211
48212
48213   file=$(TMPDIR=. mktemp fiXXXXXX)
48214
48215   setfattr -n user.test -v test $file &> /dev/null
48216   if test "$?" != 0; then
48217     exit 77
48218   fi
48219
48220
48221   getfattr $file &> /dev/null
48222   if test "$?" != 0; then
48223     exit 77
48224   fi
48225
48226
48227
48228
48229   file=$(TMPDIR=. mktemp fiXXXXXX)
48230
48231   restorecon $file &> /dev/null
48232   if test "$?" != 0; then
48233     exit 77
48234   fi
48235
48236
48237   chcon -h --user=unconfined_u $file &> /dev/null
48238   if test "$?" != 0; then
48239     exit 77
48240   fi
48241
48242   rm -rf $file
48243
48244   file=$(TMPDIR=. mktemp fiXXXXXX)
48245   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48246   if test "$err" != "0"; then
48247     exit 77
48248   fi
48249
48250
48251 mkdir dir
48252 genfile --file dir/file
48253 ln -s file dir/link
48254
48255 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
48256
48257 restorecon -R dir
48258 chcon -h --user=system_u     dir
48259 chcon -h --user=unconfined_u dir/file
48260 chcon -h --user=system_u     dir/link
48261
48262 # archive whole directory including selinux contexts
48263 tar --selinux -cf archive.tar dir
48264
48265 # clear the directory
48266 rm -rf dir
48267
48268 # ================================================
48269 # check if selinux contexts are correctly restored
48270
48271 tar --selinux -xf archive.tar
48272
48273 # archive for later debugging
48274 cp archive.tar archive_origin.tar
48275
48276 # check if selinux contexts were restored
48277 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
48278     grep -v -e '^#' -e ^$ | cut -d: -f1
48279
48280 # ===========================================================================
48281 # check if selinux contexts are not restored when --selinux option is missing
48282
48283 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
48284 rm -rf dir
48285 tar -xf archive.tar
48286 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
48287
48288 diff with_selinux without_selinux > diff_with_without
48289 if test "$?" -eq "0"; then
48290     echo "selinux contexts probably restored while --selinux is off"
48291 fi
48292
48293 # =================================================================
48294 # check if selinux is not archived when --selinux option is missing
48295
48296 tar -cf archive.tar dir
48297
48298 # clear the directory
48299 rm -rf dir
48300
48301 # restore (with --selinux)
48302 tar --selinux -xf archive.tar dir
48303
48304 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
48305 diff start final > final_diff
48306 if test "$?" -ne "0"; then
48307     echo "bad result"
48308 fi
48309
48310 )
48311 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48312 at_status=$? at_failed=false
48313 $at_check_filter
48314 at_fn_diff_devnull "$at_stderr" || at_failed=:
48315 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
48316 security.selinux=\"unconfined_u
48317 security.selinux=\"system_u
48318 " | \
48319   $at_diff - "$at_stdout" || at_failed=:
48320 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
48321 $at_failed && at_fn_log_failure
48322 $at_traceon; }
48323
48324               { set +x
48325 $as_echo "$at_srcdir/selnx01.at:28:
48326 mkdir oldgnu
48327 (cd oldgnu
48328 TEST_TAR_FORMAT=oldgnu
48329 export TEST_TAR_FORMAT
48330 TAR_OPTIONS=\"-H oldgnu\"
48331 export TAR_OPTIONS
48332 rm -rf *
48333
48334
48335   file=\$(TMPDIR=. mktemp fiXXXXXX)
48336
48337   setfattr -n user.test -v test \$file &> /dev/null
48338   if test \"\$?\" != 0; then
48339     exit 77
48340   fi
48341
48342
48343   getfattr \$file &> /dev/null
48344   if test \"\$?\" != 0; then
48345     exit 77
48346   fi
48347
48348
48349
48350
48351   file=\$(TMPDIR=. mktemp fiXXXXXX)
48352
48353   restorecon \$file &> /dev/null
48354   if test \"\$?\" != 0; then
48355     exit 77
48356   fi
48357
48358
48359   chcon -h --user=unconfined_u \$file &> /dev/null
48360   if test \"\$?\" != 0; then
48361     exit 77
48362   fi
48363
48364   rm -rf \$file
48365
48366   file=\$(TMPDIR=. mktemp fiXXXXXX)
48367   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48368   if test \"\$err\" != \"0\"; then
48369     exit 77
48370   fi
48371
48372
48373 mkdir dir
48374 genfile --file dir/file
48375 ln -s file dir/link
48376
48377 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
48378
48379 restorecon -R dir
48380 chcon -h --user=system_u     dir
48381 chcon -h --user=unconfined_u dir/file
48382 chcon -h --user=system_u     dir/link
48383
48384 # archive whole directory including selinux contexts
48385 tar --selinux -cf archive.tar dir
48386
48387 # clear the directory
48388 rm -rf dir
48389
48390 # ================================================
48391 # check if selinux contexts are correctly restored
48392
48393 tar --selinux -xf archive.tar
48394
48395 # archive for later debugging
48396 cp archive.tar archive_origin.tar
48397
48398 # check if selinux contexts were restored
48399 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
48400     grep -v -e '^#' -e ^\$ | cut -d: -f1
48401
48402 # ===========================================================================
48403 # check if selinux contexts are not restored when --selinux option is missing
48404
48405 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
48406 rm -rf dir
48407 tar -xf archive.tar
48408 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
48409
48410 diff with_selinux without_selinux > diff_with_without
48411 if test \"\$?\" -eq \"0\"; then
48412     echo \"selinux contexts probably restored while --selinux is off\"
48413 fi
48414
48415 # =================================================================
48416 # check if selinux is not archived when --selinux option is missing
48417
48418 tar -cf archive.tar dir
48419
48420 # clear the directory
48421 rm -rf dir
48422
48423 # restore (with --selinux)
48424 tar --selinux -xf archive.tar dir
48425
48426 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
48427 diff start final > final_diff
48428 if test \"\$?\" -ne \"0\"; then
48429     echo \"bad result\"
48430 fi
48431
48432 )"
48433 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
48434 ( $at_check_trace;
48435 mkdir oldgnu
48436 (cd oldgnu
48437 TEST_TAR_FORMAT=oldgnu
48438 export TEST_TAR_FORMAT
48439 TAR_OPTIONS="-H oldgnu"
48440 export TAR_OPTIONS
48441 rm -rf *
48442
48443
48444   file=$(TMPDIR=. mktemp fiXXXXXX)
48445
48446   setfattr -n user.test -v test $file &> /dev/null
48447   if test "$?" != 0; then
48448     exit 77
48449   fi
48450
48451
48452   getfattr $file &> /dev/null
48453   if test "$?" != 0; then
48454     exit 77
48455   fi
48456
48457
48458
48459
48460   file=$(TMPDIR=. mktemp fiXXXXXX)
48461
48462   restorecon $file &> /dev/null
48463   if test "$?" != 0; then
48464     exit 77
48465   fi
48466
48467
48468   chcon -h --user=unconfined_u $file &> /dev/null
48469   if test "$?" != 0; then
48470     exit 77
48471   fi
48472
48473   rm -rf $file
48474
48475   file=$(TMPDIR=. mktemp fiXXXXXX)
48476   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48477   if test "$err" != "0"; then
48478     exit 77
48479   fi
48480
48481
48482 mkdir dir
48483 genfile --file dir/file
48484 ln -s file dir/link
48485
48486 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
48487
48488 restorecon -R dir
48489 chcon -h --user=system_u     dir
48490 chcon -h --user=unconfined_u dir/file
48491 chcon -h --user=system_u     dir/link
48492
48493 # archive whole directory including selinux contexts
48494 tar --selinux -cf archive.tar dir
48495
48496 # clear the directory
48497 rm -rf dir
48498
48499 # ================================================
48500 # check if selinux contexts are correctly restored
48501
48502 tar --selinux -xf archive.tar
48503
48504 # archive for later debugging
48505 cp archive.tar archive_origin.tar
48506
48507 # check if selinux contexts were restored
48508 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
48509     grep -v -e '^#' -e ^$ | cut -d: -f1
48510
48511 # ===========================================================================
48512 # check if selinux contexts are not restored when --selinux option is missing
48513
48514 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
48515 rm -rf dir
48516 tar -xf archive.tar
48517 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
48518
48519 diff with_selinux without_selinux > diff_with_without
48520 if test "$?" -eq "0"; then
48521     echo "selinux contexts probably restored while --selinux is off"
48522 fi
48523
48524 # =================================================================
48525 # check if selinux is not archived when --selinux option is missing
48526
48527 tar -cf archive.tar dir
48528
48529 # clear the directory
48530 rm -rf dir
48531
48532 # restore (with --selinux)
48533 tar --selinux -xf archive.tar dir
48534
48535 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
48536 diff start final > final_diff
48537 if test "$?" -ne "0"; then
48538     echo "bad result"
48539 fi
48540
48541 )
48542 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48543 at_status=$? at_failed=false
48544 $at_check_filter
48545 at_fn_diff_devnull "$at_stderr" || at_failed=:
48546 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
48547 security.selinux=\"unconfined_u
48548 security.selinux=\"system_u
48549 " | \
48550   $at_diff - "$at_stdout" || at_failed=:
48551 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
48552 $at_failed && at_fn_log_failure
48553 $at_traceon; }
48554
48555               { set +x
48556 $as_echo "$at_srcdir/selnx01.at:28:
48557 mkdir ustar
48558 (cd ustar
48559 TEST_TAR_FORMAT=ustar
48560 export TEST_TAR_FORMAT
48561 TAR_OPTIONS=\"-H ustar\"
48562 export TAR_OPTIONS
48563 rm -rf *
48564
48565
48566   file=\$(TMPDIR=. mktemp fiXXXXXX)
48567
48568   setfattr -n user.test -v test \$file &> /dev/null
48569   if test \"\$?\" != 0; then
48570     exit 77
48571   fi
48572
48573
48574   getfattr \$file &> /dev/null
48575   if test \"\$?\" != 0; then
48576     exit 77
48577   fi
48578
48579
48580
48581
48582   file=\$(TMPDIR=. mktemp fiXXXXXX)
48583
48584   restorecon \$file &> /dev/null
48585   if test \"\$?\" != 0; then
48586     exit 77
48587   fi
48588
48589
48590   chcon -h --user=unconfined_u \$file &> /dev/null
48591   if test \"\$?\" != 0; then
48592     exit 77
48593   fi
48594
48595   rm -rf \$file
48596
48597   file=\$(TMPDIR=. mktemp fiXXXXXX)
48598   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48599   if test \"\$err\" != \"0\"; then
48600     exit 77
48601   fi
48602
48603
48604 mkdir dir
48605 genfile --file dir/file
48606 ln -s file dir/link
48607
48608 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
48609
48610 restorecon -R dir
48611 chcon -h --user=system_u     dir
48612 chcon -h --user=unconfined_u dir/file
48613 chcon -h --user=system_u     dir/link
48614
48615 # archive whole directory including selinux contexts
48616 tar --selinux -cf archive.tar dir
48617
48618 # clear the directory
48619 rm -rf dir
48620
48621 # ================================================
48622 # check if selinux contexts are correctly restored
48623
48624 tar --selinux -xf archive.tar
48625
48626 # archive for later debugging
48627 cp archive.tar archive_origin.tar
48628
48629 # check if selinux contexts were restored
48630 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
48631     grep -v -e '^#' -e ^\$ | cut -d: -f1
48632
48633 # ===========================================================================
48634 # check if selinux contexts are not restored when --selinux option is missing
48635
48636 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
48637 rm -rf dir
48638 tar -xf archive.tar
48639 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
48640
48641 diff with_selinux without_selinux > diff_with_without
48642 if test \"\$?\" -eq \"0\"; then
48643     echo \"selinux contexts probably restored while --selinux is off\"
48644 fi
48645
48646 # =================================================================
48647 # check if selinux is not archived when --selinux option is missing
48648
48649 tar -cf archive.tar dir
48650
48651 # clear the directory
48652 rm -rf dir
48653
48654 # restore (with --selinux)
48655 tar --selinux -xf archive.tar dir
48656
48657 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
48658 diff start final > final_diff
48659 if test \"\$?\" -ne \"0\"; then
48660     echo \"bad result\"
48661 fi
48662
48663 )"
48664 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
48665 ( $at_check_trace;
48666 mkdir ustar
48667 (cd ustar
48668 TEST_TAR_FORMAT=ustar
48669 export TEST_TAR_FORMAT
48670 TAR_OPTIONS="-H ustar"
48671 export TAR_OPTIONS
48672 rm -rf *
48673
48674
48675   file=$(TMPDIR=. mktemp fiXXXXXX)
48676
48677   setfattr -n user.test -v test $file &> /dev/null
48678   if test "$?" != 0; then
48679     exit 77
48680   fi
48681
48682
48683   getfattr $file &> /dev/null
48684   if test "$?" != 0; then
48685     exit 77
48686   fi
48687
48688
48689
48690
48691   file=$(TMPDIR=. mktemp fiXXXXXX)
48692
48693   restorecon $file &> /dev/null
48694   if test "$?" != 0; then
48695     exit 77
48696   fi
48697
48698
48699   chcon -h --user=unconfined_u $file &> /dev/null
48700   if test "$?" != 0; then
48701     exit 77
48702   fi
48703
48704   rm -rf $file
48705
48706   file=$(TMPDIR=. mktemp fiXXXXXX)
48707   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48708   if test "$err" != "0"; then
48709     exit 77
48710   fi
48711
48712
48713 mkdir dir
48714 genfile --file dir/file
48715 ln -s file dir/link
48716
48717 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
48718
48719 restorecon -R dir
48720 chcon -h --user=system_u     dir
48721 chcon -h --user=unconfined_u dir/file
48722 chcon -h --user=system_u     dir/link
48723
48724 # archive whole directory including selinux contexts
48725 tar --selinux -cf archive.tar dir
48726
48727 # clear the directory
48728 rm -rf dir
48729
48730 # ================================================
48731 # check if selinux contexts are correctly restored
48732
48733 tar --selinux -xf archive.tar
48734
48735 # archive for later debugging
48736 cp archive.tar archive_origin.tar
48737
48738 # check if selinux contexts were restored
48739 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
48740     grep -v -e '^#' -e ^$ | cut -d: -f1
48741
48742 # ===========================================================================
48743 # check if selinux contexts are not restored when --selinux option is missing
48744
48745 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
48746 rm -rf dir
48747 tar -xf archive.tar
48748 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
48749
48750 diff with_selinux without_selinux > diff_with_without
48751 if test "$?" -eq "0"; then
48752     echo "selinux contexts probably restored while --selinux is off"
48753 fi
48754
48755 # =================================================================
48756 # check if selinux is not archived when --selinux option is missing
48757
48758 tar -cf archive.tar dir
48759
48760 # clear the directory
48761 rm -rf dir
48762
48763 # restore (with --selinux)
48764 tar --selinux -xf archive.tar dir
48765
48766 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
48767 diff start final > final_diff
48768 if test "$?" -ne "0"; then
48769     echo "bad result"
48770 fi
48771
48772 )
48773 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
48774 at_status=$? at_failed=false
48775 $at_check_filter
48776 at_fn_diff_devnull "$at_stderr" || at_failed=:
48777 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
48778 security.selinux=\"unconfined_u
48779 security.selinux=\"system_u
48780 " | \
48781   $at_diff - "$at_stdout" || at_failed=:
48782 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
48783 $at_failed && at_fn_log_failure
48784 $at_traceon; }
48785
48786               { set +x
48787 $as_echo "$at_srcdir/selnx01.at:28:
48788 mkdir posix
48789 (cd posix
48790 TEST_TAR_FORMAT=posix
48791 export TEST_TAR_FORMAT
48792 TAR_OPTIONS=\"-H posix\"
48793 export TAR_OPTIONS
48794 rm -rf *
48795
48796
48797   file=\$(TMPDIR=. mktemp fiXXXXXX)
48798
48799   setfattr -n user.test -v test \$file &> /dev/null
48800   if test \"\$?\" != 0; then
48801     exit 77
48802   fi
48803
48804
48805   getfattr \$file &> /dev/null
48806   if test \"\$?\" != 0; then
48807     exit 77
48808   fi
48809
48810
48811
48812
48813   file=\$(TMPDIR=. mktemp fiXXXXXX)
48814
48815   restorecon \$file &> /dev/null
48816   if test \"\$?\" != 0; then
48817     exit 77
48818   fi
48819
48820
48821   chcon -h --user=unconfined_u \$file &> /dev/null
48822   if test \"\$?\" != 0; then
48823     exit 77
48824   fi
48825
48826   rm -rf \$file
48827
48828   file=\$(TMPDIR=. mktemp fiXXXXXX)
48829   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
48830   if test \"\$err\" != \"0\"; then
48831     exit 77
48832   fi
48833
48834
48835 mkdir dir
48836 genfile --file dir/file
48837 ln -s file dir/link
48838
48839 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
48840
48841 restorecon -R dir
48842 chcon -h --user=system_u     dir
48843 chcon -h --user=unconfined_u dir/file
48844 chcon -h --user=system_u     dir/link
48845
48846 # archive whole directory including selinux contexts
48847 tar --selinux -cf archive.tar dir
48848
48849 # clear the directory
48850 rm -rf dir
48851
48852 # ================================================
48853 # check if selinux contexts are correctly restored
48854
48855 tar --selinux -xf archive.tar
48856
48857 # archive for later debugging
48858 cp archive.tar archive_origin.tar
48859
48860 # check if selinux contexts were restored
48861 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
48862     grep -v -e '^#' -e ^\$ | cut -d: -f1
48863
48864 # ===========================================================================
48865 # check if selinux contexts are not restored when --selinux option is missing
48866
48867 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
48868 rm -rf dir
48869 tar -xf archive.tar
48870 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
48871
48872 diff with_selinux without_selinux > diff_with_without
48873 if test \"\$?\" -eq \"0\"; then
48874     echo \"selinux contexts probably restored while --selinux is off\"
48875 fi
48876
48877 # =================================================================
48878 # check if selinux is not archived when --selinux option is missing
48879
48880 tar -cf archive.tar dir
48881
48882 # clear the directory
48883 rm -rf dir
48884
48885 # restore (with --selinux)
48886 tar --selinux -xf archive.tar dir
48887
48888 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
48889 diff start final > final_diff
48890 if test \"\$?\" -ne \"0\"; then
48891     echo \"bad result\"
48892 fi
48893
48894 )"
48895 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
48896 ( $at_check_trace;
48897 mkdir posix
48898 (cd posix
48899 TEST_TAR_FORMAT=posix
48900 export TEST_TAR_FORMAT
48901 TAR_OPTIONS="-H posix"
48902 export TAR_OPTIONS
48903 rm -rf *
48904
48905
48906   file=$(TMPDIR=. mktemp fiXXXXXX)
48907
48908   setfattr -n user.test -v test $file &> /dev/null
48909   if test "$?" != 0; then
48910     exit 77
48911   fi
48912
48913
48914   getfattr $file &> /dev/null
48915   if test "$?" != 0; then
48916     exit 77
48917   fi
48918
48919
48920
48921
48922   file=$(TMPDIR=. mktemp fiXXXXXX)
48923
48924   restorecon $file &> /dev/null
48925   if test "$?" != 0; then
48926     exit 77
48927   fi
48928
48929
48930   chcon -h --user=unconfined_u $file &> /dev/null
48931   if test "$?" != 0; then
48932     exit 77
48933   fi
48934
48935   rm -rf $file
48936
48937   file=$(TMPDIR=. mktemp fiXXXXXX)
48938   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
48939   if test "$err" != "0"; then
48940     exit 77
48941   fi
48942
48943
48944 mkdir dir
48945 genfile --file dir/file
48946 ln -s file dir/link
48947
48948 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
48949
48950 restorecon -R dir
48951 chcon -h --user=system_u     dir
48952 chcon -h --user=unconfined_u dir/file
48953 chcon -h --user=system_u     dir/link
48954
48955 # archive whole directory including selinux contexts
48956 tar --selinux -cf archive.tar dir
48957
48958 # clear the directory
48959 rm -rf dir
48960
48961 # ================================================
48962 # check if selinux contexts are correctly restored
48963
48964 tar --selinux -xf archive.tar
48965
48966 # archive for later debugging
48967 cp archive.tar archive_origin.tar
48968
48969 # check if selinux contexts were restored
48970 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
48971     grep -v -e '^#' -e ^$ | cut -d: -f1
48972
48973 # ===========================================================================
48974 # check if selinux contexts are not restored when --selinux option is missing
48975
48976 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
48977 rm -rf dir
48978 tar -xf archive.tar
48979 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
48980
48981 diff with_selinux without_selinux > diff_with_without
48982 if test "$?" -eq "0"; then
48983     echo "selinux contexts probably restored while --selinux is off"
48984 fi
48985
48986 # =================================================================
48987 # check if selinux is not archived when --selinux option is missing
48988
48989 tar -cf archive.tar dir
48990
48991 # clear the directory
48992 rm -rf dir
48993
48994 # restore (with --selinux)
48995 tar --selinux -xf archive.tar dir
48996
48997 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
48998 diff start final > final_diff
48999 if test "$?" -ne "0"; then
49000     echo "bad result"
49001 fi
49002
49003 )
49004 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49005 at_status=$? at_failed=false
49006 $at_check_filter
49007 at_fn_diff_devnull "$at_stderr" || at_failed=:
49008 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
49009 security.selinux=\"unconfined_u
49010 security.selinux=\"system_u
49011 " | \
49012   $at_diff - "$at_stdout" || at_failed=:
49013 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
49014 $at_failed && at_fn_log_failure
49015 $at_traceon; }
49016
49017               { set +x
49018 $as_echo "$at_srcdir/selnx01.at:28:
49019 mkdir gnu
49020 (cd gnu
49021 TEST_TAR_FORMAT=gnu
49022 export TEST_TAR_FORMAT
49023 TAR_OPTIONS=\"-H gnu\"
49024 export TAR_OPTIONS
49025 rm -rf *
49026
49027
49028   file=\$(TMPDIR=. mktemp fiXXXXXX)
49029
49030   setfattr -n user.test -v test \$file &> /dev/null
49031   if test \"\$?\" != 0; then
49032     exit 77
49033   fi
49034
49035
49036   getfattr \$file &> /dev/null
49037   if test \"\$?\" != 0; then
49038     exit 77
49039   fi
49040
49041
49042
49043
49044   file=\$(TMPDIR=. mktemp fiXXXXXX)
49045
49046   restorecon \$file &> /dev/null
49047   if test \"\$?\" != 0; then
49048     exit 77
49049   fi
49050
49051
49052   chcon -h --user=unconfined_u \$file &> /dev/null
49053   if test \"\$?\" != 0; then
49054     exit 77
49055   fi
49056
49057   rm -rf \$file
49058
49059   file=\$(TMPDIR=. mktemp fiXXXXXX)
49060   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49061   if test \"\$err\" != \"0\"; then
49062     exit 77
49063   fi
49064
49065
49066 mkdir dir
49067 genfile --file dir/file
49068 ln -s file dir/link
49069
49070 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
49071
49072 restorecon -R dir
49073 chcon -h --user=system_u     dir
49074 chcon -h --user=unconfined_u dir/file
49075 chcon -h --user=system_u     dir/link
49076
49077 # archive whole directory including selinux contexts
49078 tar --selinux -cf archive.tar dir
49079
49080 # clear the directory
49081 rm -rf dir
49082
49083 # ================================================
49084 # check if selinux contexts are correctly restored
49085
49086 tar --selinux -xf archive.tar
49087
49088 # archive for later debugging
49089 cp archive.tar archive_origin.tar
49090
49091 # check if selinux contexts were restored
49092 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
49093     grep -v -e '^#' -e ^\$ | cut -d: -f1
49094
49095 # ===========================================================================
49096 # check if selinux contexts are not restored when --selinux option is missing
49097
49098 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
49099 rm -rf dir
49100 tar -xf archive.tar
49101 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
49102
49103 diff with_selinux without_selinux > diff_with_without
49104 if test \"\$?\" -eq \"0\"; then
49105     echo \"selinux contexts probably restored while --selinux is off\"
49106 fi
49107
49108 # =================================================================
49109 # check if selinux is not archived when --selinux option is missing
49110
49111 tar -cf archive.tar dir
49112
49113 # clear the directory
49114 rm -rf dir
49115
49116 # restore (with --selinux)
49117 tar --selinux -xf archive.tar dir
49118
49119 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
49120 diff start final > final_diff
49121 if test \"\$?\" -ne \"0\"; then
49122     echo \"bad result\"
49123 fi
49124
49125 )"
49126 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
49127 ( $at_check_trace;
49128 mkdir gnu
49129 (cd gnu
49130 TEST_TAR_FORMAT=gnu
49131 export TEST_TAR_FORMAT
49132 TAR_OPTIONS="-H gnu"
49133 export TAR_OPTIONS
49134 rm -rf *
49135
49136
49137   file=$(TMPDIR=. mktemp fiXXXXXX)
49138
49139   setfattr -n user.test -v test $file &> /dev/null
49140   if test "$?" != 0; then
49141     exit 77
49142   fi
49143
49144
49145   getfattr $file &> /dev/null
49146   if test "$?" != 0; then
49147     exit 77
49148   fi
49149
49150
49151
49152
49153   file=$(TMPDIR=. mktemp fiXXXXXX)
49154
49155   restorecon $file &> /dev/null
49156   if test "$?" != 0; then
49157     exit 77
49158   fi
49159
49160
49161   chcon -h --user=unconfined_u $file &> /dev/null
49162   if test "$?" != 0; then
49163     exit 77
49164   fi
49165
49166   rm -rf $file
49167
49168   file=$(TMPDIR=. mktemp fiXXXXXX)
49169   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49170   if test "$err" != "0"; then
49171     exit 77
49172   fi
49173
49174
49175 mkdir dir
49176 genfile --file dir/file
49177 ln -s file dir/link
49178
49179 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
49180
49181 restorecon -R dir
49182 chcon -h --user=system_u     dir
49183 chcon -h --user=unconfined_u dir/file
49184 chcon -h --user=system_u     dir/link
49185
49186 # archive whole directory including selinux contexts
49187 tar --selinux -cf archive.tar dir
49188
49189 # clear the directory
49190 rm -rf dir
49191
49192 # ================================================
49193 # check if selinux contexts are correctly restored
49194
49195 tar --selinux -xf archive.tar
49196
49197 # archive for later debugging
49198 cp archive.tar archive_origin.tar
49199
49200 # check if selinux contexts were restored
49201 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
49202     grep -v -e '^#' -e ^$ | cut -d: -f1
49203
49204 # ===========================================================================
49205 # check if selinux contexts are not restored when --selinux option is missing
49206
49207 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
49208 rm -rf dir
49209 tar -xf archive.tar
49210 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
49211
49212 diff with_selinux without_selinux > diff_with_without
49213 if test "$?" -eq "0"; then
49214     echo "selinux contexts probably restored while --selinux is off"
49215 fi
49216
49217 # =================================================================
49218 # check if selinux is not archived when --selinux option is missing
49219
49220 tar -cf archive.tar dir
49221
49222 # clear the directory
49223 rm -rf dir
49224
49225 # restore (with --selinux)
49226 tar --selinux -xf archive.tar dir
49227
49228 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
49229 diff start final > final_diff
49230 if test "$?" -ne "0"; then
49231     echo "bad result"
49232 fi
49233
49234 )
49235 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49236 at_status=$? at_failed=false
49237 $at_check_filter
49238 at_fn_diff_devnull "$at_stderr" || at_failed=:
49239 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
49240 security.selinux=\"unconfined_u
49241 security.selinux=\"system_u
49242 " | \
49243   $at_diff - "$at_stdout" || at_failed=:
49244 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
49245 $at_failed && at_fn_log_failure
49246 $at_traceon; }
49247
49248
49249
49250
49251   set +x
49252   $at_times_p && times >"$at_times_file"
49253 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
49254 read at_status <"$at_status_file"
49255 #AT_STOP_191
49256 #AT_START_192
49257 at_fn_group_banner 192 'selacl01.at:25' \
49258   "acls/selinux: special files & fifos" "            " 25
49259 at_xfail=no
49260       test -f $XFAILFILE && at_xfail=yes
49261 (
49262   $as_echo "192. $at_setup_line: testing $at_desc ..."
49263   $at_traceon
49264
49265
49266
49267
49268
49269   { set +x
49270 $as_echo "$at_srcdir/selacl01.at:28:
49271 mkdir v7
49272 (cd v7
49273 TEST_TAR_FORMAT=v7
49274 export TEST_TAR_FORMAT
49275 TAR_OPTIONS=\"-H v7\"
49276 export TAR_OPTIONS
49277 rm -rf *
49278
49279
49280 echo \"test\" > \$\$
49281 chmod 0 \$\$
49282 cat \$\$ > /dev/null 2>&1
49283 result=\$?
49284 rm -f \$\$
49285 test \$result -eq 0 || exit 77
49286
49287
49288   file=\$(TMPDIR=. mktemp fiXXXXXX)
49289
49290   setfattr -n user.test -v test \$file &> /dev/null
49291   if test \"\$?\" != 0; then
49292     exit 77
49293   fi
49294
49295
49296   getfattr \$file &> /dev/null
49297   if test \"\$?\" != 0; then
49298     exit 77
49299   fi
49300
49301
49302
49303
49304   file=\$(TMPDIR=. mktemp fiXXXXXX)
49305
49306   restorecon \$file &> /dev/null
49307   if test \"\$?\" != 0; then
49308     exit 77
49309   fi
49310
49311
49312   chcon -h --user=unconfined_u \$file &> /dev/null
49313   if test \"\$?\" != 0; then
49314     exit 77
49315   fi
49316
49317   rm -rf \$file
49318
49319   file=\$(TMPDIR=. mktemp fiXXXXXX)
49320   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49321   if test \"\$err\" != \"0\"; then
49322     exit 77
49323   fi
49324
49325
49326
49327   file=\$(TMPDIR=. mktemp fiXXXXXX)
49328
49329   setfacl -m u:\$UID:rwx \$file &> /dev/null
49330   if test \"\$?\" != 0; then
49331     exit 77
49332   fi
49333
49334
49335   getfacl \$file &> /dev/null
49336   if test \"\$?\" != 0; then
49337     exit 77
49338   fi
49339
49340   rm -rf \$file
49341
49342   file=\$(TMPDIR=. mktemp fiXXXXXX)
49343   setfacl -m u:\$UID:rwx \$file
49344   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49345   if test \"\$err\" != \"0\"; then
49346     exit 77
49347   fi
49348
49349
49350 mkdir dir
49351 mkfifo dir/fifo
49352 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
49353 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
49354 mknod dir/chartype c \$MAJOR \$MINOR
49355
49356 # setup attributes
49357 restorecon -R dir
49358 chcon -h --user=system_u dir/fifo
49359 chcon -h --user=system_u dir/chartype
49360 setfacl -m u:\$UID:--- dir/fifo
49361 setfacl -m u:\$UID:rwx dir/chartype
49362
49363 getfacl dir/fifo >> before
49364 getfattr -msecurity.selinux dir/chartype >> before
49365
49366 tar --xattrs --selinux --acls -cf archive.tar dir
49367
49368 mv dir olddir
49369
49370 tar --xattrs --selinux --acls -xf archive.tar
49371
49372 getfacl dir/fifo >> after
49373 getfattr -msecurity.selinux dir/chartype >> after
49374
49375 diff before after
49376 echo separator
49377 )"
49378 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
49379 ( $at_check_trace;
49380 mkdir v7
49381 (cd v7
49382 TEST_TAR_FORMAT=v7
49383 export TEST_TAR_FORMAT
49384 TAR_OPTIONS="-H v7"
49385 export TAR_OPTIONS
49386 rm -rf *
49387
49388
49389 echo "test" > $$
49390 chmod 0 $$
49391 cat $$ > /dev/null 2>&1
49392 result=$?
49393 rm -f $$
49394 test $result -eq 0 || exit 77
49395
49396
49397   file=$(TMPDIR=. mktemp fiXXXXXX)
49398
49399   setfattr -n user.test -v test $file &> /dev/null
49400   if test "$?" != 0; then
49401     exit 77
49402   fi
49403
49404
49405   getfattr $file &> /dev/null
49406   if test "$?" != 0; then
49407     exit 77
49408   fi
49409
49410
49411
49412
49413   file=$(TMPDIR=. mktemp fiXXXXXX)
49414
49415   restorecon $file &> /dev/null
49416   if test "$?" != 0; then
49417     exit 77
49418   fi
49419
49420
49421   chcon -h --user=unconfined_u $file &> /dev/null
49422   if test "$?" != 0; then
49423     exit 77
49424   fi
49425
49426   rm -rf $file
49427
49428   file=$(TMPDIR=. mktemp fiXXXXXX)
49429   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49430   if test "$err" != "0"; then
49431     exit 77
49432   fi
49433
49434
49435
49436   file=$(TMPDIR=. mktemp fiXXXXXX)
49437
49438   setfacl -m u:$UID:rwx $file &> /dev/null
49439   if test "$?" != 0; then
49440     exit 77
49441   fi
49442
49443
49444   getfacl $file &> /dev/null
49445   if test "$?" != 0; then
49446     exit 77
49447   fi
49448
49449   rm -rf $file
49450
49451   file=$(TMPDIR=. mktemp fiXXXXXX)
49452   setfacl -m u:$UID:rwx $file
49453   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49454   if test "$err" != "0"; then
49455     exit 77
49456   fi
49457
49458
49459 mkdir dir
49460 mkfifo dir/fifo
49461 MAJOR=$( stat /dev/urandom --printf="%t" )
49462 MINOR=$( stat /dev/urandom --printf="%T" )
49463 mknod dir/chartype c $MAJOR $MINOR
49464
49465 # setup attributes
49466 restorecon -R dir
49467 chcon -h --user=system_u dir/fifo
49468 chcon -h --user=system_u dir/chartype
49469 setfacl -m u:$UID:--- dir/fifo
49470 setfacl -m u:$UID:rwx dir/chartype
49471
49472 getfacl dir/fifo >> before
49473 getfattr -msecurity.selinux dir/chartype >> before
49474
49475 tar --xattrs --selinux --acls -cf archive.tar dir
49476
49477 mv dir olddir
49478
49479 tar --xattrs --selinux --acls -xf archive.tar
49480
49481 getfacl dir/fifo >> after
49482 getfattr -msecurity.selinux dir/chartype >> after
49483
49484 diff before after
49485 echo separator
49486 )
49487 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49488 at_status=$? at_failed=false
49489 $at_check_filter
49490 at_fn_diff_devnull "$at_stderr" || at_failed=:
49491 echo >>"$at_stdout"; $as_echo "separator
49492 " | \
49493   $at_diff - "$at_stdout" || at_failed=:
49494 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
49495 $at_failed && at_fn_log_failure
49496 $at_traceon; }
49497
49498               { set +x
49499 $as_echo "$at_srcdir/selacl01.at:28:
49500 mkdir oldgnu
49501 (cd oldgnu
49502 TEST_TAR_FORMAT=oldgnu
49503 export TEST_TAR_FORMAT
49504 TAR_OPTIONS=\"-H oldgnu\"
49505 export TAR_OPTIONS
49506 rm -rf *
49507
49508
49509 echo \"test\" > \$\$
49510 chmod 0 \$\$
49511 cat \$\$ > /dev/null 2>&1
49512 result=\$?
49513 rm -f \$\$
49514 test \$result -eq 0 || exit 77
49515
49516
49517   file=\$(TMPDIR=. mktemp fiXXXXXX)
49518
49519   setfattr -n user.test -v test \$file &> /dev/null
49520   if test \"\$?\" != 0; then
49521     exit 77
49522   fi
49523
49524
49525   getfattr \$file &> /dev/null
49526   if test \"\$?\" != 0; then
49527     exit 77
49528   fi
49529
49530
49531
49532
49533   file=\$(TMPDIR=. mktemp fiXXXXXX)
49534
49535   restorecon \$file &> /dev/null
49536   if test \"\$?\" != 0; then
49537     exit 77
49538   fi
49539
49540
49541   chcon -h --user=unconfined_u \$file &> /dev/null
49542   if test \"\$?\" != 0; then
49543     exit 77
49544   fi
49545
49546   rm -rf \$file
49547
49548   file=\$(TMPDIR=. mktemp fiXXXXXX)
49549   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49550   if test \"\$err\" != \"0\"; then
49551     exit 77
49552   fi
49553
49554
49555
49556   file=\$(TMPDIR=. mktemp fiXXXXXX)
49557
49558   setfacl -m u:\$UID:rwx \$file &> /dev/null
49559   if test \"\$?\" != 0; then
49560     exit 77
49561   fi
49562
49563
49564   getfacl \$file &> /dev/null
49565   if test \"\$?\" != 0; then
49566     exit 77
49567   fi
49568
49569   rm -rf \$file
49570
49571   file=\$(TMPDIR=. mktemp fiXXXXXX)
49572   setfacl -m u:\$UID:rwx \$file
49573   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49574   if test \"\$err\" != \"0\"; then
49575     exit 77
49576   fi
49577
49578
49579 mkdir dir
49580 mkfifo dir/fifo
49581 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
49582 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
49583 mknod dir/chartype c \$MAJOR \$MINOR
49584
49585 # setup attributes
49586 restorecon -R dir
49587 chcon -h --user=system_u dir/fifo
49588 chcon -h --user=system_u dir/chartype
49589 setfacl -m u:\$UID:--- dir/fifo
49590 setfacl -m u:\$UID:rwx dir/chartype
49591
49592 getfacl dir/fifo >> before
49593 getfattr -msecurity.selinux dir/chartype >> before
49594
49595 tar --xattrs --selinux --acls -cf archive.tar dir
49596
49597 mv dir olddir
49598
49599 tar --xattrs --selinux --acls -xf archive.tar
49600
49601 getfacl dir/fifo >> after
49602 getfattr -msecurity.selinux dir/chartype >> after
49603
49604 diff before after
49605 echo separator
49606 )"
49607 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
49608 ( $at_check_trace;
49609 mkdir oldgnu
49610 (cd oldgnu
49611 TEST_TAR_FORMAT=oldgnu
49612 export TEST_TAR_FORMAT
49613 TAR_OPTIONS="-H oldgnu"
49614 export TAR_OPTIONS
49615 rm -rf *
49616
49617
49618 echo "test" > $$
49619 chmod 0 $$
49620 cat $$ > /dev/null 2>&1
49621 result=$?
49622 rm -f $$
49623 test $result -eq 0 || exit 77
49624
49625
49626   file=$(TMPDIR=. mktemp fiXXXXXX)
49627
49628   setfattr -n user.test -v test $file &> /dev/null
49629   if test "$?" != 0; then
49630     exit 77
49631   fi
49632
49633
49634   getfattr $file &> /dev/null
49635   if test "$?" != 0; then
49636     exit 77
49637   fi
49638
49639
49640
49641
49642   file=$(TMPDIR=. mktemp fiXXXXXX)
49643
49644   restorecon $file &> /dev/null
49645   if test "$?" != 0; then
49646     exit 77
49647   fi
49648
49649
49650   chcon -h --user=unconfined_u $file &> /dev/null
49651   if test "$?" != 0; then
49652     exit 77
49653   fi
49654
49655   rm -rf $file
49656
49657   file=$(TMPDIR=. mktemp fiXXXXXX)
49658   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49659   if test "$err" != "0"; then
49660     exit 77
49661   fi
49662
49663
49664
49665   file=$(TMPDIR=. mktemp fiXXXXXX)
49666
49667   setfacl -m u:$UID:rwx $file &> /dev/null
49668   if test "$?" != 0; then
49669     exit 77
49670   fi
49671
49672
49673   getfacl $file &> /dev/null
49674   if test "$?" != 0; then
49675     exit 77
49676   fi
49677
49678   rm -rf $file
49679
49680   file=$(TMPDIR=. mktemp fiXXXXXX)
49681   setfacl -m u:$UID:rwx $file
49682   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49683   if test "$err" != "0"; then
49684     exit 77
49685   fi
49686
49687
49688 mkdir dir
49689 mkfifo dir/fifo
49690 MAJOR=$( stat /dev/urandom --printf="%t" )
49691 MINOR=$( stat /dev/urandom --printf="%T" )
49692 mknod dir/chartype c $MAJOR $MINOR
49693
49694 # setup attributes
49695 restorecon -R dir
49696 chcon -h --user=system_u dir/fifo
49697 chcon -h --user=system_u dir/chartype
49698 setfacl -m u:$UID:--- dir/fifo
49699 setfacl -m u:$UID:rwx dir/chartype
49700
49701 getfacl dir/fifo >> before
49702 getfattr -msecurity.selinux dir/chartype >> before
49703
49704 tar --xattrs --selinux --acls -cf archive.tar dir
49705
49706 mv dir olddir
49707
49708 tar --xattrs --selinux --acls -xf archive.tar
49709
49710 getfacl dir/fifo >> after
49711 getfattr -msecurity.selinux dir/chartype >> after
49712
49713 diff before after
49714 echo separator
49715 )
49716 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49717 at_status=$? at_failed=false
49718 $at_check_filter
49719 at_fn_diff_devnull "$at_stderr" || at_failed=:
49720 echo >>"$at_stdout"; $as_echo "separator
49721 " | \
49722   $at_diff - "$at_stdout" || at_failed=:
49723 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
49724 $at_failed && at_fn_log_failure
49725 $at_traceon; }
49726
49727               { set +x
49728 $as_echo "$at_srcdir/selacl01.at:28:
49729 mkdir ustar
49730 (cd ustar
49731 TEST_TAR_FORMAT=ustar
49732 export TEST_TAR_FORMAT
49733 TAR_OPTIONS=\"-H ustar\"
49734 export TAR_OPTIONS
49735 rm -rf *
49736
49737
49738 echo \"test\" > \$\$
49739 chmod 0 \$\$
49740 cat \$\$ > /dev/null 2>&1
49741 result=\$?
49742 rm -f \$\$
49743 test \$result -eq 0 || exit 77
49744
49745
49746   file=\$(TMPDIR=. mktemp fiXXXXXX)
49747
49748   setfattr -n user.test -v test \$file &> /dev/null
49749   if test \"\$?\" != 0; then
49750     exit 77
49751   fi
49752
49753
49754   getfattr \$file &> /dev/null
49755   if test \"\$?\" != 0; then
49756     exit 77
49757   fi
49758
49759
49760
49761
49762   file=\$(TMPDIR=. mktemp fiXXXXXX)
49763
49764   restorecon \$file &> /dev/null
49765   if test \"\$?\" != 0; then
49766     exit 77
49767   fi
49768
49769
49770   chcon -h --user=unconfined_u \$file &> /dev/null
49771   if test \"\$?\" != 0; then
49772     exit 77
49773   fi
49774
49775   rm -rf \$file
49776
49777   file=\$(TMPDIR=. mktemp fiXXXXXX)
49778   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49779   if test \"\$err\" != \"0\"; then
49780     exit 77
49781   fi
49782
49783
49784
49785   file=\$(TMPDIR=. mktemp fiXXXXXX)
49786
49787   setfacl -m u:\$UID:rwx \$file &> /dev/null
49788   if test \"\$?\" != 0; then
49789     exit 77
49790   fi
49791
49792
49793   getfacl \$file &> /dev/null
49794   if test \"\$?\" != 0; then
49795     exit 77
49796   fi
49797
49798   rm -rf \$file
49799
49800   file=\$(TMPDIR=. mktemp fiXXXXXX)
49801   setfacl -m u:\$UID:rwx \$file
49802   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
49803   if test \"\$err\" != \"0\"; then
49804     exit 77
49805   fi
49806
49807
49808 mkdir dir
49809 mkfifo dir/fifo
49810 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
49811 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
49812 mknod dir/chartype c \$MAJOR \$MINOR
49813
49814 # setup attributes
49815 restorecon -R dir
49816 chcon -h --user=system_u dir/fifo
49817 chcon -h --user=system_u dir/chartype
49818 setfacl -m u:\$UID:--- dir/fifo
49819 setfacl -m u:\$UID:rwx dir/chartype
49820
49821 getfacl dir/fifo >> before
49822 getfattr -msecurity.selinux dir/chartype >> before
49823
49824 tar --xattrs --selinux --acls -cf archive.tar dir
49825
49826 mv dir olddir
49827
49828 tar --xattrs --selinux --acls -xf archive.tar
49829
49830 getfacl dir/fifo >> after
49831 getfattr -msecurity.selinux dir/chartype >> after
49832
49833 diff before after
49834 echo separator
49835 )"
49836 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
49837 ( $at_check_trace;
49838 mkdir ustar
49839 (cd ustar
49840 TEST_TAR_FORMAT=ustar
49841 export TEST_TAR_FORMAT
49842 TAR_OPTIONS="-H ustar"
49843 export TAR_OPTIONS
49844 rm -rf *
49845
49846
49847 echo "test" > $$
49848 chmod 0 $$
49849 cat $$ > /dev/null 2>&1
49850 result=$?
49851 rm -f $$
49852 test $result -eq 0 || exit 77
49853
49854
49855   file=$(TMPDIR=. mktemp fiXXXXXX)
49856
49857   setfattr -n user.test -v test $file &> /dev/null
49858   if test "$?" != 0; then
49859     exit 77
49860   fi
49861
49862
49863   getfattr $file &> /dev/null
49864   if test "$?" != 0; then
49865     exit 77
49866   fi
49867
49868
49869
49870
49871   file=$(TMPDIR=. mktemp fiXXXXXX)
49872
49873   restorecon $file &> /dev/null
49874   if test "$?" != 0; then
49875     exit 77
49876   fi
49877
49878
49879   chcon -h --user=unconfined_u $file &> /dev/null
49880   if test "$?" != 0; then
49881     exit 77
49882   fi
49883
49884   rm -rf $file
49885
49886   file=$(TMPDIR=. mktemp fiXXXXXX)
49887   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49888   if test "$err" != "0"; then
49889     exit 77
49890   fi
49891
49892
49893
49894   file=$(TMPDIR=. mktemp fiXXXXXX)
49895
49896   setfacl -m u:$UID:rwx $file &> /dev/null
49897   if test "$?" != 0; then
49898     exit 77
49899   fi
49900
49901
49902   getfacl $file &> /dev/null
49903   if test "$?" != 0; then
49904     exit 77
49905   fi
49906
49907   rm -rf $file
49908
49909   file=$(TMPDIR=. mktemp fiXXXXXX)
49910   setfacl -m u:$UID:rwx $file
49911   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
49912   if test "$err" != "0"; then
49913     exit 77
49914   fi
49915
49916
49917 mkdir dir
49918 mkfifo dir/fifo
49919 MAJOR=$( stat /dev/urandom --printf="%t" )
49920 MINOR=$( stat /dev/urandom --printf="%T" )
49921 mknod dir/chartype c $MAJOR $MINOR
49922
49923 # setup attributes
49924 restorecon -R dir
49925 chcon -h --user=system_u dir/fifo
49926 chcon -h --user=system_u dir/chartype
49927 setfacl -m u:$UID:--- dir/fifo
49928 setfacl -m u:$UID:rwx dir/chartype
49929
49930 getfacl dir/fifo >> before
49931 getfattr -msecurity.selinux dir/chartype >> before
49932
49933 tar --xattrs --selinux --acls -cf archive.tar dir
49934
49935 mv dir olddir
49936
49937 tar --xattrs --selinux --acls -xf archive.tar
49938
49939 getfacl dir/fifo >> after
49940 getfattr -msecurity.selinux dir/chartype >> after
49941
49942 diff before after
49943 echo separator
49944 )
49945 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
49946 at_status=$? at_failed=false
49947 $at_check_filter
49948 at_fn_diff_devnull "$at_stderr" || at_failed=:
49949 echo >>"$at_stdout"; $as_echo "separator
49950 " | \
49951   $at_diff - "$at_stdout" || at_failed=:
49952 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
49953 $at_failed && at_fn_log_failure
49954 $at_traceon; }
49955
49956               { set +x
49957 $as_echo "$at_srcdir/selacl01.at:28:
49958 mkdir posix
49959 (cd posix
49960 TEST_TAR_FORMAT=posix
49961 export TEST_TAR_FORMAT
49962 TAR_OPTIONS=\"-H posix\"
49963 export TAR_OPTIONS
49964 rm -rf *
49965
49966
49967 echo \"test\" > \$\$
49968 chmod 0 \$\$
49969 cat \$\$ > /dev/null 2>&1
49970 result=\$?
49971 rm -f \$\$
49972 test \$result -eq 0 || exit 77
49973
49974
49975   file=\$(TMPDIR=. mktemp fiXXXXXX)
49976
49977   setfattr -n user.test -v test \$file &> /dev/null
49978   if test \"\$?\" != 0; then
49979     exit 77
49980   fi
49981
49982
49983   getfattr \$file &> /dev/null
49984   if test \"\$?\" != 0; then
49985     exit 77
49986   fi
49987
49988
49989
49990
49991   file=\$(TMPDIR=. mktemp fiXXXXXX)
49992
49993   restorecon \$file &> /dev/null
49994   if test \"\$?\" != 0; then
49995     exit 77
49996   fi
49997
49998
49999   chcon -h --user=unconfined_u \$file &> /dev/null
50000   if test \"\$?\" != 0; then
50001     exit 77
50002   fi
50003
50004   rm -rf \$file
50005
50006   file=\$(TMPDIR=. mktemp fiXXXXXX)
50007   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50008   if test \"\$err\" != \"0\"; then
50009     exit 77
50010   fi
50011
50012
50013
50014   file=\$(TMPDIR=. mktemp fiXXXXXX)
50015
50016   setfacl -m u:\$UID:rwx \$file &> /dev/null
50017   if test \"\$?\" != 0; then
50018     exit 77
50019   fi
50020
50021
50022   getfacl \$file &> /dev/null
50023   if test \"\$?\" != 0; then
50024     exit 77
50025   fi
50026
50027   rm -rf \$file
50028
50029   file=\$(TMPDIR=. mktemp fiXXXXXX)
50030   setfacl -m u:\$UID:rwx \$file
50031   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50032   if test \"\$err\" != \"0\"; then
50033     exit 77
50034   fi
50035
50036
50037 mkdir dir
50038 mkfifo dir/fifo
50039 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
50040 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
50041 mknod dir/chartype c \$MAJOR \$MINOR
50042
50043 # setup attributes
50044 restorecon -R dir
50045 chcon -h --user=system_u dir/fifo
50046 chcon -h --user=system_u dir/chartype
50047 setfacl -m u:\$UID:--- dir/fifo
50048 setfacl -m u:\$UID:rwx dir/chartype
50049
50050 getfacl dir/fifo >> before
50051 getfattr -msecurity.selinux dir/chartype >> before
50052
50053 tar --xattrs --selinux --acls -cf archive.tar dir
50054
50055 mv dir olddir
50056
50057 tar --xattrs --selinux --acls -xf archive.tar
50058
50059 getfacl dir/fifo >> after
50060 getfattr -msecurity.selinux dir/chartype >> after
50061
50062 diff before after
50063 echo separator
50064 )"
50065 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
50066 ( $at_check_trace;
50067 mkdir posix
50068 (cd posix
50069 TEST_TAR_FORMAT=posix
50070 export TEST_TAR_FORMAT
50071 TAR_OPTIONS="-H posix"
50072 export TAR_OPTIONS
50073 rm -rf *
50074
50075
50076 echo "test" > $$
50077 chmod 0 $$
50078 cat $$ > /dev/null 2>&1
50079 result=$?
50080 rm -f $$
50081 test $result -eq 0 || exit 77
50082
50083
50084   file=$(TMPDIR=. mktemp fiXXXXXX)
50085
50086   setfattr -n user.test -v test $file &> /dev/null
50087   if test "$?" != 0; then
50088     exit 77
50089   fi
50090
50091
50092   getfattr $file &> /dev/null
50093   if test "$?" != 0; then
50094     exit 77
50095   fi
50096
50097
50098
50099
50100   file=$(TMPDIR=. mktemp fiXXXXXX)
50101
50102   restorecon $file &> /dev/null
50103   if test "$?" != 0; then
50104     exit 77
50105   fi
50106
50107
50108   chcon -h --user=unconfined_u $file &> /dev/null
50109   if test "$?" != 0; then
50110     exit 77
50111   fi
50112
50113   rm -rf $file
50114
50115   file=$(TMPDIR=. mktemp fiXXXXXX)
50116   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50117   if test "$err" != "0"; then
50118     exit 77
50119   fi
50120
50121
50122
50123   file=$(TMPDIR=. mktemp fiXXXXXX)
50124
50125   setfacl -m u:$UID:rwx $file &> /dev/null
50126   if test "$?" != 0; then
50127     exit 77
50128   fi
50129
50130
50131   getfacl $file &> /dev/null
50132   if test "$?" != 0; then
50133     exit 77
50134   fi
50135
50136   rm -rf $file
50137
50138   file=$(TMPDIR=. mktemp fiXXXXXX)
50139   setfacl -m u:$UID:rwx $file
50140   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50141   if test "$err" != "0"; then
50142     exit 77
50143   fi
50144
50145
50146 mkdir dir
50147 mkfifo dir/fifo
50148 MAJOR=$( stat /dev/urandom --printf="%t" )
50149 MINOR=$( stat /dev/urandom --printf="%T" )
50150 mknod dir/chartype c $MAJOR $MINOR
50151
50152 # setup attributes
50153 restorecon -R dir
50154 chcon -h --user=system_u dir/fifo
50155 chcon -h --user=system_u dir/chartype
50156 setfacl -m u:$UID:--- dir/fifo
50157 setfacl -m u:$UID:rwx dir/chartype
50158
50159 getfacl dir/fifo >> before
50160 getfattr -msecurity.selinux dir/chartype >> before
50161
50162 tar --xattrs --selinux --acls -cf archive.tar dir
50163
50164 mv dir olddir
50165
50166 tar --xattrs --selinux --acls -xf archive.tar
50167
50168 getfacl dir/fifo >> after
50169 getfattr -msecurity.selinux dir/chartype >> after
50170
50171 diff before after
50172 echo separator
50173 )
50174 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50175 at_status=$? at_failed=false
50176 $at_check_filter
50177 at_fn_diff_devnull "$at_stderr" || at_failed=:
50178 echo >>"$at_stdout"; $as_echo "separator
50179 " | \
50180   $at_diff - "$at_stdout" || at_failed=:
50181 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
50182 $at_failed && at_fn_log_failure
50183 $at_traceon; }
50184
50185               { set +x
50186 $as_echo "$at_srcdir/selacl01.at:28:
50187 mkdir gnu
50188 (cd gnu
50189 TEST_TAR_FORMAT=gnu
50190 export TEST_TAR_FORMAT
50191 TAR_OPTIONS=\"-H gnu\"
50192 export TAR_OPTIONS
50193 rm -rf *
50194
50195
50196 echo \"test\" > \$\$
50197 chmod 0 \$\$
50198 cat \$\$ > /dev/null 2>&1
50199 result=\$?
50200 rm -f \$\$
50201 test \$result -eq 0 || exit 77
50202
50203
50204   file=\$(TMPDIR=. mktemp fiXXXXXX)
50205
50206   setfattr -n user.test -v test \$file &> /dev/null
50207   if test \"\$?\" != 0; then
50208     exit 77
50209   fi
50210
50211
50212   getfattr \$file &> /dev/null
50213   if test \"\$?\" != 0; then
50214     exit 77
50215   fi
50216
50217
50218
50219
50220   file=\$(TMPDIR=. mktemp fiXXXXXX)
50221
50222   restorecon \$file &> /dev/null
50223   if test \"\$?\" != 0; then
50224     exit 77
50225   fi
50226
50227
50228   chcon -h --user=unconfined_u \$file &> /dev/null
50229   if test \"\$?\" != 0; then
50230     exit 77
50231   fi
50232
50233   rm -rf \$file
50234
50235   file=\$(TMPDIR=. mktemp fiXXXXXX)
50236   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50237   if test \"\$err\" != \"0\"; then
50238     exit 77
50239   fi
50240
50241
50242
50243   file=\$(TMPDIR=. mktemp fiXXXXXX)
50244
50245   setfacl -m u:\$UID:rwx \$file &> /dev/null
50246   if test \"\$?\" != 0; then
50247     exit 77
50248   fi
50249
50250
50251   getfacl \$file &> /dev/null
50252   if test \"\$?\" != 0; then
50253     exit 77
50254   fi
50255
50256   rm -rf \$file
50257
50258   file=\$(TMPDIR=. mktemp fiXXXXXX)
50259   setfacl -m u:\$UID:rwx \$file
50260   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50261   if test \"\$err\" != \"0\"; then
50262     exit 77
50263   fi
50264
50265
50266 mkdir dir
50267 mkfifo dir/fifo
50268 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
50269 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
50270 mknod dir/chartype c \$MAJOR \$MINOR
50271
50272 # setup attributes
50273 restorecon -R dir
50274 chcon -h --user=system_u dir/fifo
50275 chcon -h --user=system_u dir/chartype
50276 setfacl -m u:\$UID:--- dir/fifo
50277 setfacl -m u:\$UID:rwx dir/chartype
50278
50279 getfacl dir/fifo >> before
50280 getfattr -msecurity.selinux dir/chartype >> before
50281
50282 tar --xattrs --selinux --acls -cf archive.tar dir
50283
50284 mv dir olddir
50285
50286 tar --xattrs --selinux --acls -xf archive.tar
50287
50288 getfacl dir/fifo >> after
50289 getfattr -msecurity.selinux dir/chartype >> after
50290
50291 diff before after
50292 echo separator
50293 )"
50294 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
50295 ( $at_check_trace;
50296 mkdir gnu
50297 (cd gnu
50298 TEST_TAR_FORMAT=gnu
50299 export TEST_TAR_FORMAT
50300 TAR_OPTIONS="-H gnu"
50301 export TAR_OPTIONS
50302 rm -rf *
50303
50304
50305 echo "test" > $$
50306 chmod 0 $$
50307 cat $$ > /dev/null 2>&1
50308 result=$?
50309 rm -f $$
50310 test $result -eq 0 || exit 77
50311
50312
50313   file=$(TMPDIR=. mktemp fiXXXXXX)
50314
50315   setfattr -n user.test -v test $file &> /dev/null
50316   if test "$?" != 0; then
50317     exit 77
50318   fi
50319
50320
50321   getfattr $file &> /dev/null
50322   if test "$?" != 0; then
50323     exit 77
50324   fi
50325
50326
50327
50328
50329   file=$(TMPDIR=. mktemp fiXXXXXX)
50330
50331   restorecon $file &> /dev/null
50332   if test "$?" != 0; then
50333     exit 77
50334   fi
50335
50336
50337   chcon -h --user=unconfined_u $file &> /dev/null
50338   if test "$?" != 0; then
50339     exit 77
50340   fi
50341
50342   rm -rf $file
50343
50344   file=$(TMPDIR=. mktemp fiXXXXXX)
50345   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50346   if test "$err" != "0"; then
50347     exit 77
50348   fi
50349
50350
50351
50352   file=$(TMPDIR=. mktemp fiXXXXXX)
50353
50354   setfacl -m u:$UID:rwx $file &> /dev/null
50355   if test "$?" != 0; then
50356     exit 77
50357   fi
50358
50359
50360   getfacl $file &> /dev/null
50361   if test "$?" != 0; then
50362     exit 77
50363   fi
50364
50365   rm -rf $file
50366
50367   file=$(TMPDIR=. mktemp fiXXXXXX)
50368   setfacl -m u:$UID:rwx $file
50369   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50370   if test "$err" != "0"; then
50371     exit 77
50372   fi
50373
50374
50375 mkdir dir
50376 mkfifo dir/fifo
50377 MAJOR=$( stat /dev/urandom --printf="%t" )
50378 MINOR=$( stat /dev/urandom --printf="%T" )
50379 mknod dir/chartype c $MAJOR $MINOR
50380
50381 # setup attributes
50382 restorecon -R dir
50383 chcon -h --user=system_u dir/fifo
50384 chcon -h --user=system_u dir/chartype
50385 setfacl -m u:$UID:--- dir/fifo
50386 setfacl -m u:$UID:rwx dir/chartype
50387
50388 getfacl dir/fifo >> before
50389 getfattr -msecurity.selinux dir/chartype >> before
50390
50391 tar --xattrs --selinux --acls -cf archive.tar dir
50392
50393 mv dir olddir
50394
50395 tar --xattrs --selinux --acls -xf archive.tar
50396
50397 getfacl dir/fifo >> after
50398 getfattr -msecurity.selinux dir/chartype >> after
50399
50400 diff before after
50401 echo separator
50402 )
50403 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50404 at_status=$? at_failed=false
50405 $at_check_filter
50406 at_fn_diff_devnull "$at_stderr" || at_failed=:
50407 echo >>"$at_stdout"; $as_echo "separator
50408 " | \
50409   $at_diff - "$at_stdout" || at_failed=:
50410 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
50411 $at_failed && at_fn_log_failure
50412 $at_traceon; }
50413
50414
50415
50416
50417   set +x
50418   $at_times_p && times >"$at_times_file"
50419 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
50420 read at_status <"$at_status_file"
50421 #AT_STOP_192
50422 #AT_START_193
50423 at_fn_group_banner 193 'capabs_raw01.at:25' \
50424   "capabilities: binary store/restore" "             " 25
50425 at_xfail=no
50426       test -f $XFAILFILE && at_xfail=yes
50427 (
50428   $as_echo "193. $at_setup_line: testing $at_desc ..."
50429   $at_traceon
50430
50431
50432
50433
50434
50435   { set +x
50436 $as_echo "$at_srcdir/capabs_raw01.at:28:
50437 mkdir v7
50438 (cd v7
50439 TEST_TAR_FORMAT=v7
50440 export TEST_TAR_FORMAT
50441 TAR_OPTIONS=\"-H v7\"
50442 export TAR_OPTIONS
50443 rm -rf *
50444
50445
50446 echo \"test\" > \$\$
50447 chmod 0 \$\$
50448 cat \$\$ > /dev/null 2>&1
50449 result=\$?
50450 rm -f \$\$
50451 test \$result -eq 0 || exit 77
50452
50453
50454
50455   file=\$(TMPDIR=. mktemp fiXXXXXX)
50456
50457   setfattr -n user.test -v test \$file &> /dev/null
50458   if test \"\$?\" != 0; then
50459     exit 77
50460   fi
50461
50462
50463   getfattr \$file &> /dev/null
50464   if test \"\$?\" != 0; then
50465     exit 77
50466   fi
50467
50468
50469   file=\$(TMPDIR=. mktemp fiXXXXXX)
50470   setfattr -n user.test -v ahoj \$file
50471   # check whether tar fails to store xattrs
50472   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50473   if test \"\$err\" != \"0\"; then
50474     exit 77
50475   fi
50476
50477
50478   file=\$(TMPDIR=. mktemp fiXXXXXX)
50479
50480   setcap \"= cap_chown=ei\" \$file &> /dev/null
50481   if test \"\$?\" != 0; then
50482     exit 77
50483   fi
50484
50485
50486   getcap \$file &> /dev/null
50487   if test \"\$?\" != 0; then
50488     exit 77
50489   fi
50490
50491   rm -rf \$file
50492
50493
50494 mkdir dir
50495 genfile --file dir/file
50496
50497 setcap \"= cap_chown=ei\" dir/file
50498
50499 # archive whole directory including binary xattrs
50500 tar --xattrs -cf archive.tar dir
50501
50502 # clear the directory
50503 rm -rf dir
50504
50505 # restore _all_ xattrs (not just the user.* domain)
50506 tar --xattrs --xattrs-include='*' -xf archive.tar
50507
50508 getcap dir/file
50509 )"
50510 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
50511 ( $at_check_trace;
50512 mkdir v7
50513 (cd v7
50514 TEST_TAR_FORMAT=v7
50515 export TEST_TAR_FORMAT
50516 TAR_OPTIONS="-H v7"
50517 export TAR_OPTIONS
50518 rm -rf *
50519
50520
50521 echo "test" > $$
50522 chmod 0 $$
50523 cat $$ > /dev/null 2>&1
50524 result=$?
50525 rm -f $$
50526 test $result -eq 0 || exit 77
50527
50528
50529
50530   file=$(TMPDIR=. mktemp fiXXXXXX)
50531
50532   setfattr -n user.test -v test $file &> /dev/null
50533   if test "$?" != 0; then
50534     exit 77
50535   fi
50536
50537
50538   getfattr $file &> /dev/null
50539   if test "$?" != 0; then
50540     exit 77
50541   fi
50542
50543
50544   file=$(TMPDIR=. mktemp fiXXXXXX)
50545   setfattr -n user.test -v ahoj $file
50546   # check whether tar fails to store xattrs
50547   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50548   if test "$err" != "0"; then
50549     exit 77
50550   fi
50551
50552
50553   file=$(TMPDIR=. mktemp fiXXXXXX)
50554
50555   setcap "= cap_chown=ei" $file &> /dev/null
50556   if test "$?" != 0; then
50557     exit 77
50558   fi
50559
50560
50561   getcap $file &> /dev/null
50562   if test "$?" != 0; then
50563     exit 77
50564   fi
50565
50566   rm -rf $file
50567
50568
50569 mkdir dir
50570 genfile --file dir/file
50571
50572 setcap "= cap_chown=ei" dir/file
50573
50574 # archive whole directory including binary xattrs
50575 tar --xattrs -cf archive.tar dir
50576
50577 # clear the directory
50578 rm -rf dir
50579
50580 # restore _all_ xattrs (not just the user.* domain)
50581 tar --xattrs --xattrs-include='*' -xf archive.tar
50582
50583 getcap dir/file
50584 )
50585 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50586 at_status=$? at_failed=false
50587 $at_check_filter
50588 at_fn_diff_devnull "$at_stderr" || at_failed=:
50589 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
50590 " | \
50591   $at_diff - "$at_stdout" || at_failed=:
50592 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
50593 $at_failed && at_fn_log_failure
50594 $at_traceon; }
50595
50596               { set +x
50597 $as_echo "$at_srcdir/capabs_raw01.at:28:
50598 mkdir oldgnu
50599 (cd oldgnu
50600 TEST_TAR_FORMAT=oldgnu
50601 export TEST_TAR_FORMAT
50602 TAR_OPTIONS=\"-H oldgnu\"
50603 export TAR_OPTIONS
50604 rm -rf *
50605
50606
50607 echo \"test\" > \$\$
50608 chmod 0 \$\$
50609 cat \$\$ > /dev/null 2>&1
50610 result=\$?
50611 rm -f \$\$
50612 test \$result -eq 0 || exit 77
50613
50614
50615
50616   file=\$(TMPDIR=. mktemp fiXXXXXX)
50617
50618   setfattr -n user.test -v test \$file &> /dev/null
50619   if test \"\$?\" != 0; then
50620     exit 77
50621   fi
50622
50623
50624   getfattr \$file &> /dev/null
50625   if test \"\$?\" != 0; then
50626     exit 77
50627   fi
50628
50629
50630   file=\$(TMPDIR=. mktemp fiXXXXXX)
50631   setfattr -n user.test -v ahoj \$file
50632   # check whether tar fails to store xattrs
50633   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50634   if test \"\$err\" != \"0\"; then
50635     exit 77
50636   fi
50637
50638
50639   file=\$(TMPDIR=. mktemp fiXXXXXX)
50640
50641   setcap \"= cap_chown=ei\" \$file &> /dev/null
50642   if test \"\$?\" != 0; then
50643     exit 77
50644   fi
50645
50646
50647   getcap \$file &> /dev/null
50648   if test \"\$?\" != 0; then
50649     exit 77
50650   fi
50651
50652   rm -rf \$file
50653
50654
50655 mkdir dir
50656 genfile --file dir/file
50657
50658 setcap \"= cap_chown=ei\" dir/file
50659
50660 # archive whole directory including binary xattrs
50661 tar --xattrs -cf archive.tar dir
50662
50663 # clear the directory
50664 rm -rf dir
50665
50666 # restore _all_ xattrs (not just the user.* domain)
50667 tar --xattrs --xattrs-include='*' -xf archive.tar
50668
50669 getcap dir/file
50670 )"
50671 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
50672 ( $at_check_trace;
50673 mkdir oldgnu
50674 (cd oldgnu
50675 TEST_TAR_FORMAT=oldgnu
50676 export TEST_TAR_FORMAT
50677 TAR_OPTIONS="-H oldgnu"
50678 export TAR_OPTIONS
50679 rm -rf *
50680
50681
50682 echo "test" > $$
50683 chmod 0 $$
50684 cat $$ > /dev/null 2>&1
50685 result=$?
50686 rm -f $$
50687 test $result -eq 0 || exit 77
50688
50689
50690
50691   file=$(TMPDIR=. mktemp fiXXXXXX)
50692
50693   setfattr -n user.test -v test $file &> /dev/null
50694   if test "$?" != 0; then
50695     exit 77
50696   fi
50697
50698
50699   getfattr $file &> /dev/null
50700   if test "$?" != 0; then
50701     exit 77
50702   fi
50703
50704
50705   file=$(TMPDIR=. mktemp fiXXXXXX)
50706   setfattr -n user.test -v ahoj $file
50707   # check whether tar fails to store xattrs
50708   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50709   if test "$err" != "0"; then
50710     exit 77
50711   fi
50712
50713
50714   file=$(TMPDIR=. mktemp fiXXXXXX)
50715
50716   setcap "= cap_chown=ei" $file &> /dev/null
50717   if test "$?" != 0; then
50718     exit 77
50719   fi
50720
50721
50722   getcap $file &> /dev/null
50723   if test "$?" != 0; then
50724     exit 77
50725   fi
50726
50727   rm -rf $file
50728
50729
50730 mkdir dir
50731 genfile --file dir/file
50732
50733 setcap "= cap_chown=ei" dir/file
50734
50735 # archive whole directory including binary xattrs
50736 tar --xattrs -cf archive.tar dir
50737
50738 # clear the directory
50739 rm -rf dir
50740
50741 # restore _all_ xattrs (not just the user.* domain)
50742 tar --xattrs --xattrs-include='*' -xf archive.tar
50743
50744 getcap dir/file
50745 )
50746 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50747 at_status=$? at_failed=false
50748 $at_check_filter
50749 at_fn_diff_devnull "$at_stderr" || at_failed=:
50750 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
50751 " | \
50752   $at_diff - "$at_stdout" || at_failed=:
50753 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
50754 $at_failed && at_fn_log_failure
50755 $at_traceon; }
50756
50757               { set +x
50758 $as_echo "$at_srcdir/capabs_raw01.at:28:
50759 mkdir ustar
50760 (cd ustar
50761 TEST_TAR_FORMAT=ustar
50762 export TEST_TAR_FORMAT
50763 TAR_OPTIONS=\"-H ustar\"
50764 export TAR_OPTIONS
50765 rm -rf *
50766
50767
50768 echo \"test\" > \$\$
50769 chmod 0 \$\$
50770 cat \$\$ > /dev/null 2>&1
50771 result=\$?
50772 rm -f \$\$
50773 test \$result -eq 0 || exit 77
50774
50775
50776
50777   file=\$(TMPDIR=. mktemp fiXXXXXX)
50778
50779   setfattr -n user.test -v test \$file &> /dev/null
50780   if test \"\$?\" != 0; then
50781     exit 77
50782   fi
50783
50784
50785   getfattr \$file &> /dev/null
50786   if test \"\$?\" != 0; then
50787     exit 77
50788   fi
50789
50790
50791   file=\$(TMPDIR=. mktemp fiXXXXXX)
50792   setfattr -n user.test -v ahoj \$file
50793   # check whether tar fails to store xattrs
50794   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50795   if test \"\$err\" != \"0\"; then
50796     exit 77
50797   fi
50798
50799
50800   file=\$(TMPDIR=. mktemp fiXXXXXX)
50801
50802   setcap \"= cap_chown=ei\" \$file &> /dev/null
50803   if test \"\$?\" != 0; then
50804     exit 77
50805   fi
50806
50807
50808   getcap \$file &> /dev/null
50809   if test \"\$?\" != 0; then
50810     exit 77
50811   fi
50812
50813   rm -rf \$file
50814
50815
50816 mkdir dir
50817 genfile --file dir/file
50818
50819 setcap \"= cap_chown=ei\" dir/file
50820
50821 # archive whole directory including binary xattrs
50822 tar --xattrs -cf archive.tar dir
50823
50824 # clear the directory
50825 rm -rf dir
50826
50827 # restore _all_ xattrs (not just the user.* domain)
50828 tar --xattrs --xattrs-include='*' -xf archive.tar
50829
50830 getcap dir/file
50831 )"
50832 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
50833 ( $at_check_trace;
50834 mkdir ustar
50835 (cd ustar
50836 TEST_TAR_FORMAT=ustar
50837 export TEST_TAR_FORMAT
50838 TAR_OPTIONS="-H ustar"
50839 export TAR_OPTIONS
50840 rm -rf *
50841
50842
50843 echo "test" > $$
50844 chmod 0 $$
50845 cat $$ > /dev/null 2>&1
50846 result=$?
50847 rm -f $$
50848 test $result -eq 0 || exit 77
50849
50850
50851
50852   file=$(TMPDIR=. mktemp fiXXXXXX)
50853
50854   setfattr -n user.test -v test $file &> /dev/null
50855   if test "$?" != 0; then
50856     exit 77
50857   fi
50858
50859
50860   getfattr $file &> /dev/null
50861   if test "$?" != 0; then
50862     exit 77
50863   fi
50864
50865
50866   file=$(TMPDIR=. mktemp fiXXXXXX)
50867   setfattr -n user.test -v ahoj $file
50868   # check whether tar fails to store xattrs
50869   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
50870   if test "$err" != "0"; then
50871     exit 77
50872   fi
50873
50874
50875   file=$(TMPDIR=. mktemp fiXXXXXX)
50876
50877   setcap "= cap_chown=ei" $file &> /dev/null
50878   if test "$?" != 0; then
50879     exit 77
50880   fi
50881
50882
50883   getcap $file &> /dev/null
50884   if test "$?" != 0; then
50885     exit 77
50886   fi
50887
50888   rm -rf $file
50889
50890
50891 mkdir dir
50892 genfile --file dir/file
50893
50894 setcap "= cap_chown=ei" dir/file
50895
50896 # archive whole directory including binary xattrs
50897 tar --xattrs -cf archive.tar dir
50898
50899 # clear the directory
50900 rm -rf dir
50901
50902 # restore _all_ xattrs (not just the user.* domain)
50903 tar --xattrs --xattrs-include='*' -xf archive.tar
50904
50905 getcap dir/file
50906 )
50907 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
50908 at_status=$? at_failed=false
50909 $at_check_filter
50910 at_fn_diff_devnull "$at_stderr" || at_failed=:
50911 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
50912 " | \
50913   $at_diff - "$at_stdout" || at_failed=:
50914 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
50915 $at_failed && at_fn_log_failure
50916 $at_traceon; }
50917
50918               { set +x
50919 $as_echo "$at_srcdir/capabs_raw01.at:28:
50920 mkdir posix
50921 (cd posix
50922 TEST_TAR_FORMAT=posix
50923 export TEST_TAR_FORMAT
50924 TAR_OPTIONS=\"-H posix\"
50925 export TAR_OPTIONS
50926 rm -rf *
50927
50928
50929 echo \"test\" > \$\$
50930 chmod 0 \$\$
50931 cat \$\$ > /dev/null 2>&1
50932 result=\$?
50933 rm -f \$\$
50934 test \$result -eq 0 || exit 77
50935
50936
50937
50938   file=\$(TMPDIR=. mktemp fiXXXXXX)
50939
50940   setfattr -n user.test -v test \$file &> /dev/null
50941   if test \"\$?\" != 0; then
50942     exit 77
50943   fi
50944
50945
50946   getfattr \$file &> /dev/null
50947   if test \"\$?\" != 0; then
50948     exit 77
50949   fi
50950
50951
50952   file=\$(TMPDIR=. mktemp fiXXXXXX)
50953   setfattr -n user.test -v ahoj \$file
50954   # check whether tar fails to store xattrs
50955   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
50956   if test \"\$err\" != \"0\"; then
50957     exit 77
50958   fi
50959
50960
50961   file=\$(TMPDIR=. mktemp fiXXXXXX)
50962
50963   setcap \"= cap_chown=ei\" \$file &> /dev/null
50964   if test \"\$?\" != 0; then
50965     exit 77
50966   fi
50967
50968
50969   getcap \$file &> /dev/null
50970   if test \"\$?\" != 0; then
50971     exit 77
50972   fi
50973
50974   rm -rf \$file
50975
50976
50977 mkdir dir
50978 genfile --file dir/file
50979
50980 setcap \"= cap_chown=ei\" dir/file
50981
50982 # archive whole directory including binary xattrs
50983 tar --xattrs -cf archive.tar dir
50984
50985 # clear the directory
50986 rm -rf dir
50987
50988 # restore _all_ xattrs (not just the user.* domain)
50989 tar --xattrs --xattrs-include='*' -xf archive.tar
50990
50991 getcap dir/file
50992 )"
50993 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
50994 ( $at_check_trace;
50995 mkdir posix
50996 (cd posix
50997 TEST_TAR_FORMAT=posix
50998 export TEST_TAR_FORMAT
50999 TAR_OPTIONS="-H posix"
51000 export TAR_OPTIONS
51001 rm -rf *
51002
51003
51004 echo "test" > $$
51005 chmod 0 $$
51006 cat $$ > /dev/null 2>&1
51007 result=$?
51008 rm -f $$
51009 test $result -eq 0 || exit 77
51010
51011
51012
51013   file=$(TMPDIR=. mktemp fiXXXXXX)
51014
51015   setfattr -n user.test -v test $file &> /dev/null
51016   if test "$?" != 0; then
51017     exit 77
51018   fi
51019
51020
51021   getfattr $file &> /dev/null
51022   if test "$?" != 0; then
51023     exit 77
51024   fi
51025
51026
51027   file=$(TMPDIR=. mktemp fiXXXXXX)
51028   setfattr -n user.test -v ahoj $file
51029   # check whether tar fails to store xattrs
51030   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51031   if test "$err" != "0"; then
51032     exit 77
51033   fi
51034
51035
51036   file=$(TMPDIR=. mktemp fiXXXXXX)
51037
51038   setcap "= cap_chown=ei" $file &> /dev/null
51039   if test "$?" != 0; then
51040     exit 77
51041   fi
51042
51043
51044   getcap $file &> /dev/null
51045   if test "$?" != 0; then
51046     exit 77
51047   fi
51048
51049   rm -rf $file
51050
51051
51052 mkdir dir
51053 genfile --file dir/file
51054
51055 setcap "= cap_chown=ei" dir/file
51056
51057 # archive whole directory including binary xattrs
51058 tar --xattrs -cf archive.tar dir
51059
51060 # clear the directory
51061 rm -rf dir
51062
51063 # restore _all_ xattrs (not just the user.* domain)
51064 tar --xattrs --xattrs-include='*' -xf archive.tar
51065
51066 getcap dir/file
51067 )
51068 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51069 at_status=$? at_failed=false
51070 $at_check_filter
51071 at_fn_diff_devnull "$at_stderr" || at_failed=:
51072 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
51073 " | \
51074   $at_diff - "$at_stdout" || at_failed=:
51075 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
51076 $at_failed && at_fn_log_failure
51077 $at_traceon; }
51078
51079               { set +x
51080 $as_echo "$at_srcdir/capabs_raw01.at:28:
51081 mkdir gnu
51082 (cd gnu
51083 TEST_TAR_FORMAT=gnu
51084 export TEST_TAR_FORMAT
51085 TAR_OPTIONS=\"-H gnu\"
51086 export TAR_OPTIONS
51087 rm -rf *
51088
51089
51090 echo \"test\" > \$\$
51091 chmod 0 \$\$
51092 cat \$\$ > /dev/null 2>&1
51093 result=\$?
51094 rm -f \$\$
51095 test \$result -eq 0 || exit 77
51096
51097
51098
51099   file=\$(TMPDIR=. mktemp fiXXXXXX)
51100
51101   setfattr -n user.test -v test \$file &> /dev/null
51102   if test \"\$?\" != 0; then
51103     exit 77
51104   fi
51105
51106
51107   getfattr \$file &> /dev/null
51108   if test \"\$?\" != 0; then
51109     exit 77
51110   fi
51111
51112
51113   file=\$(TMPDIR=. mktemp fiXXXXXX)
51114   setfattr -n user.test -v ahoj \$file
51115   # check whether tar fails to store xattrs
51116   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
51117   if test \"\$err\" != \"0\"; then
51118     exit 77
51119   fi
51120
51121
51122   file=\$(TMPDIR=. mktemp fiXXXXXX)
51123
51124   setcap \"= cap_chown=ei\" \$file &> /dev/null
51125   if test \"\$?\" != 0; then
51126     exit 77
51127   fi
51128
51129
51130   getcap \$file &> /dev/null
51131   if test \"\$?\" != 0; then
51132     exit 77
51133   fi
51134
51135   rm -rf \$file
51136
51137
51138 mkdir dir
51139 genfile --file dir/file
51140
51141 setcap \"= cap_chown=ei\" dir/file
51142
51143 # archive whole directory including binary xattrs
51144 tar --xattrs -cf archive.tar dir
51145
51146 # clear the directory
51147 rm -rf dir
51148
51149 # restore _all_ xattrs (not just the user.* domain)
51150 tar --xattrs --xattrs-include='*' -xf archive.tar
51151
51152 getcap dir/file
51153 )"
51154 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
51155 ( $at_check_trace;
51156 mkdir gnu
51157 (cd gnu
51158 TEST_TAR_FORMAT=gnu
51159 export TEST_TAR_FORMAT
51160 TAR_OPTIONS="-H gnu"
51161 export TAR_OPTIONS
51162 rm -rf *
51163
51164
51165 echo "test" > $$
51166 chmod 0 $$
51167 cat $$ > /dev/null 2>&1
51168 result=$?
51169 rm -f $$
51170 test $result -eq 0 || exit 77
51171
51172
51173
51174   file=$(TMPDIR=. mktemp fiXXXXXX)
51175
51176   setfattr -n user.test -v test $file &> /dev/null
51177   if test "$?" != 0; then
51178     exit 77
51179   fi
51180
51181
51182   getfattr $file &> /dev/null
51183   if test "$?" != 0; then
51184     exit 77
51185   fi
51186
51187
51188   file=$(TMPDIR=. mktemp fiXXXXXX)
51189   setfattr -n user.test -v ahoj $file
51190   # check whether tar fails to store xattrs
51191   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
51192   if test "$err" != "0"; then
51193     exit 77
51194   fi
51195
51196
51197   file=$(TMPDIR=. mktemp fiXXXXXX)
51198
51199   setcap "= cap_chown=ei" $file &> /dev/null
51200   if test "$?" != 0; then
51201     exit 77
51202   fi
51203
51204
51205   getcap $file &> /dev/null
51206   if test "$?" != 0; then
51207     exit 77
51208   fi
51209
51210   rm -rf $file
51211
51212
51213 mkdir dir
51214 genfile --file dir/file
51215
51216 setcap "= cap_chown=ei" dir/file
51217
51218 # archive whole directory including binary xattrs
51219 tar --xattrs -cf archive.tar dir
51220
51221 # clear the directory
51222 rm -rf dir
51223
51224 # restore _all_ xattrs (not just the user.* domain)
51225 tar --xattrs --xattrs-include='*' -xf archive.tar
51226
51227 getcap dir/file
51228 )
51229 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51230 at_status=$? at_failed=false
51231 $at_check_filter
51232 at_fn_diff_devnull "$at_stderr" || at_failed=:
51233 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
51234 " | \
51235   $at_diff - "$at_stdout" || at_failed=:
51236 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
51237 $at_failed && at_fn_log_failure
51238 $at_traceon; }
51239
51240
51241
51242
51243   set +x
51244   $at_times_p && times >"$at_times_file"
51245 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
51246 read at_status <"$at_status_file"
51247 #AT_STOP_193
51248 #AT_START_194
51249 at_fn_group_banner 194 'onetop01.at:21' \
51250   "tar --one-top-level" "                            " 26
51251 at_xfail=no
51252       test -f $XFAILFILE && at_xfail=yes
51253 (
51254   $as_echo "194. $at_setup_line: testing $at_desc ..."
51255   $at_traceon
51256
51257
51258
51259
51260
51261   { set +x
51262 $as_echo "$at_srcdir/onetop01.at:24:
51263 mkdir v7
51264 (cd v7
51265 TEST_TAR_FORMAT=v7
51266 export TEST_TAR_FORMAT
51267 TAR_OPTIONS=\"-H v7\"
51268 export TAR_OPTIONS
51269 rm -rf *
51270
51271
51272 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51273
51274 mkdir a
51275 genfile --file a/b
51276 genfile --file c
51277 tar cf a.tar a c
51278 mkdir out
51279 cd out
51280 tar --one-top-level -x -f ../a.tar
51281 find . | sort
51282 )"
51283 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
51284 ( $at_check_trace;
51285 mkdir v7
51286 (cd v7
51287 TEST_TAR_FORMAT=v7
51288 export TEST_TAR_FORMAT
51289 TAR_OPTIONS="-H v7"
51290 export TAR_OPTIONS
51291 rm -rf *
51292
51293
51294 test -z "`sort < /dev/null 2>&1`" || exit 77
51295
51296 mkdir a
51297 genfile --file a/b
51298 genfile --file c
51299 tar cf a.tar a c
51300 mkdir out
51301 cd out
51302 tar --one-top-level -x -f ../a.tar
51303 find . | sort
51304 )
51305 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51306 at_status=$? at_failed=false
51307 $at_check_filter
51308 at_fn_diff_devnull "$at_stderr" || at_failed=:
51309 echo >>"$at_stdout"; $as_echo ".
51310 ./a
51311 ./a/b
51312 ./a/c
51313 " | \
51314   $at_diff - "$at_stdout" || at_failed=:
51315 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
51316 $at_failed && at_fn_log_failure
51317 $at_traceon; }
51318
51319               { set +x
51320 $as_echo "$at_srcdir/onetop01.at:24:
51321 mkdir oldgnu
51322 (cd oldgnu
51323 TEST_TAR_FORMAT=oldgnu
51324 export TEST_TAR_FORMAT
51325 TAR_OPTIONS=\"-H oldgnu\"
51326 export TAR_OPTIONS
51327 rm -rf *
51328
51329
51330 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51331
51332 mkdir a
51333 genfile --file a/b
51334 genfile --file c
51335 tar cf a.tar a c
51336 mkdir out
51337 cd out
51338 tar --one-top-level -x -f ../a.tar
51339 find . | sort
51340 )"
51341 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
51342 ( $at_check_trace;
51343 mkdir oldgnu
51344 (cd oldgnu
51345 TEST_TAR_FORMAT=oldgnu
51346 export TEST_TAR_FORMAT
51347 TAR_OPTIONS="-H oldgnu"
51348 export TAR_OPTIONS
51349 rm -rf *
51350
51351
51352 test -z "`sort < /dev/null 2>&1`" || exit 77
51353
51354 mkdir a
51355 genfile --file a/b
51356 genfile --file c
51357 tar cf a.tar a c
51358 mkdir out
51359 cd out
51360 tar --one-top-level -x -f ../a.tar
51361 find . | sort
51362 )
51363 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51364 at_status=$? at_failed=false
51365 $at_check_filter
51366 at_fn_diff_devnull "$at_stderr" || at_failed=:
51367 echo >>"$at_stdout"; $as_echo ".
51368 ./a
51369 ./a/b
51370 ./a/c
51371 " | \
51372   $at_diff - "$at_stdout" || at_failed=:
51373 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
51374 $at_failed && at_fn_log_failure
51375 $at_traceon; }
51376
51377               { set +x
51378 $as_echo "$at_srcdir/onetop01.at:24:
51379 mkdir ustar
51380 (cd ustar
51381 TEST_TAR_FORMAT=ustar
51382 export TEST_TAR_FORMAT
51383 TAR_OPTIONS=\"-H ustar\"
51384 export TAR_OPTIONS
51385 rm -rf *
51386
51387
51388 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51389
51390 mkdir a
51391 genfile --file a/b
51392 genfile --file c
51393 tar cf a.tar a c
51394 mkdir out
51395 cd out
51396 tar --one-top-level -x -f ../a.tar
51397 find . | sort
51398 )"
51399 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
51400 ( $at_check_trace;
51401 mkdir ustar
51402 (cd ustar
51403 TEST_TAR_FORMAT=ustar
51404 export TEST_TAR_FORMAT
51405 TAR_OPTIONS="-H ustar"
51406 export TAR_OPTIONS
51407 rm -rf *
51408
51409
51410 test -z "`sort < /dev/null 2>&1`" || exit 77
51411
51412 mkdir a
51413 genfile --file a/b
51414 genfile --file c
51415 tar cf a.tar a c
51416 mkdir out
51417 cd out
51418 tar --one-top-level -x -f ../a.tar
51419 find . | sort
51420 )
51421 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51422 at_status=$? at_failed=false
51423 $at_check_filter
51424 at_fn_diff_devnull "$at_stderr" || at_failed=:
51425 echo >>"$at_stdout"; $as_echo ".
51426 ./a
51427 ./a/b
51428 ./a/c
51429 " | \
51430   $at_diff - "$at_stdout" || at_failed=:
51431 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
51432 $at_failed && at_fn_log_failure
51433 $at_traceon; }
51434
51435               { set +x
51436 $as_echo "$at_srcdir/onetop01.at:24:
51437 mkdir posix
51438 (cd posix
51439 TEST_TAR_FORMAT=posix
51440 export TEST_TAR_FORMAT
51441 TAR_OPTIONS=\"-H posix\"
51442 export TAR_OPTIONS
51443 rm -rf *
51444
51445
51446 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51447
51448 mkdir a
51449 genfile --file a/b
51450 genfile --file c
51451 tar cf a.tar a c
51452 mkdir out
51453 cd out
51454 tar --one-top-level -x -f ../a.tar
51455 find . | sort
51456 )"
51457 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
51458 ( $at_check_trace;
51459 mkdir posix
51460 (cd posix
51461 TEST_TAR_FORMAT=posix
51462 export TEST_TAR_FORMAT
51463 TAR_OPTIONS="-H posix"
51464 export TAR_OPTIONS
51465 rm -rf *
51466
51467
51468 test -z "`sort < /dev/null 2>&1`" || exit 77
51469
51470 mkdir a
51471 genfile --file a/b
51472 genfile --file c
51473 tar cf a.tar a c
51474 mkdir out
51475 cd out
51476 tar --one-top-level -x -f ../a.tar
51477 find . | sort
51478 )
51479 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51480 at_status=$? at_failed=false
51481 $at_check_filter
51482 at_fn_diff_devnull "$at_stderr" || at_failed=:
51483 echo >>"$at_stdout"; $as_echo ".
51484 ./a
51485 ./a/b
51486 ./a/c
51487 " | \
51488   $at_diff - "$at_stdout" || at_failed=:
51489 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
51490 $at_failed && at_fn_log_failure
51491 $at_traceon; }
51492
51493               { set +x
51494 $as_echo "$at_srcdir/onetop01.at:24:
51495 mkdir gnu
51496 (cd gnu
51497 TEST_TAR_FORMAT=gnu
51498 export TEST_TAR_FORMAT
51499 TAR_OPTIONS=\"-H gnu\"
51500 export TAR_OPTIONS
51501 rm -rf *
51502
51503
51504 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51505
51506 mkdir a
51507 genfile --file a/b
51508 genfile --file c
51509 tar cf a.tar a c
51510 mkdir out
51511 cd out
51512 tar --one-top-level -x -f ../a.tar
51513 find . | sort
51514 )"
51515 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
51516 ( $at_check_trace;
51517 mkdir gnu
51518 (cd gnu
51519 TEST_TAR_FORMAT=gnu
51520 export TEST_TAR_FORMAT
51521 TAR_OPTIONS="-H gnu"
51522 export TAR_OPTIONS
51523 rm -rf *
51524
51525
51526 test -z "`sort < /dev/null 2>&1`" || exit 77
51527
51528 mkdir a
51529 genfile --file a/b
51530 genfile --file c
51531 tar cf a.tar a c
51532 mkdir out
51533 cd out
51534 tar --one-top-level -x -f ../a.tar
51535 find . | sort
51536 )
51537 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51538 at_status=$? at_failed=false
51539 $at_check_filter
51540 at_fn_diff_devnull "$at_stderr" || at_failed=:
51541 echo >>"$at_stdout"; $as_echo ".
51542 ./a
51543 ./a/b
51544 ./a/c
51545 " | \
51546   $at_diff - "$at_stdout" || at_failed=:
51547 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
51548 $at_failed && at_fn_log_failure
51549 $at_traceon; }
51550
51551
51552
51553
51554   set +x
51555   $at_times_p && times >"$at_times_file"
51556 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
51557 read at_status <"$at_status_file"
51558 #AT_STOP_194
51559 #AT_START_195
51560 at_fn_group_banner 195 'onetop02.at:21' \
51561   "tar --one-top-level --show-transformed" "         " 26
51562 at_xfail=no
51563       test -f $XFAILFILE && at_xfail=yes
51564 (
51565   $as_echo "195. $at_setup_line: testing $at_desc ..."
51566   $at_traceon
51567
51568
51569
51570
51571
51572   { set +x
51573 $as_echo "$at_srcdir/onetop02.at:24:
51574 mkdir v7
51575 (cd v7
51576 TEST_TAR_FORMAT=v7
51577 export TEST_TAR_FORMAT
51578 TAR_OPTIONS=\"-H v7\"
51579 export TAR_OPTIONS
51580 rm -rf *
51581
51582
51583 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51584
51585 mkdir a
51586 genfile --file a/b
51587 genfile --file c
51588 tar cf a.tar a c
51589 mkdir out
51590 cd out
51591 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51592 find . | sort
51593 )"
51594 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
51595 ( $at_check_trace;
51596 mkdir v7
51597 (cd v7
51598 TEST_TAR_FORMAT=v7
51599 export TEST_TAR_FORMAT
51600 TAR_OPTIONS="-H v7"
51601 export TAR_OPTIONS
51602 rm -rf *
51603
51604
51605 test -z "`sort < /dev/null 2>&1`" || exit 77
51606
51607 mkdir a
51608 genfile --file a/b
51609 genfile --file c
51610 tar cf a.tar a c
51611 mkdir out
51612 cd out
51613 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51614 find . | sort
51615 )
51616 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51617 at_status=$? at_failed=false
51618 $at_check_filter
51619 at_fn_diff_devnull "$at_stderr" || at_failed=:
51620 echo >>"$at_stdout"; $as_echo "a/
51621 a/b
51622 a/c
51623 .
51624 ./a
51625 ./a/b
51626 ./a/c
51627 " | \
51628   $at_diff - "$at_stdout" || at_failed=:
51629 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
51630 $at_failed && at_fn_log_failure
51631 $at_traceon; }
51632
51633               { set +x
51634 $as_echo "$at_srcdir/onetop02.at:24:
51635 mkdir oldgnu
51636 (cd oldgnu
51637 TEST_TAR_FORMAT=oldgnu
51638 export TEST_TAR_FORMAT
51639 TAR_OPTIONS=\"-H oldgnu\"
51640 export TAR_OPTIONS
51641 rm -rf *
51642
51643
51644 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51645
51646 mkdir a
51647 genfile --file a/b
51648 genfile --file c
51649 tar cf a.tar a c
51650 mkdir out
51651 cd out
51652 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51653 find . | sort
51654 )"
51655 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
51656 ( $at_check_trace;
51657 mkdir oldgnu
51658 (cd oldgnu
51659 TEST_TAR_FORMAT=oldgnu
51660 export TEST_TAR_FORMAT
51661 TAR_OPTIONS="-H oldgnu"
51662 export TAR_OPTIONS
51663 rm -rf *
51664
51665
51666 test -z "`sort < /dev/null 2>&1`" || exit 77
51667
51668 mkdir a
51669 genfile --file a/b
51670 genfile --file c
51671 tar cf a.tar a c
51672 mkdir out
51673 cd out
51674 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51675 find . | sort
51676 )
51677 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51678 at_status=$? at_failed=false
51679 $at_check_filter
51680 at_fn_diff_devnull "$at_stderr" || at_failed=:
51681 echo >>"$at_stdout"; $as_echo "a/
51682 a/b
51683 a/c
51684 .
51685 ./a
51686 ./a/b
51687 ./a/c
51688 " | \
51689   $at_diff - "$at_stdout" || at_failed=:
51690 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
51691 $at_failed && at_fn_log_failure
51692 $at_traceon; }
51693
51694               { set +x
51695 $as_echo "$at_srcdir/onetop02.at:24:
51696 mkdir ustar
51697 (cd ustar
51698 TEST_TAR_FORMAT=ustar
51699 export TEST_TAR_FORMAT
51700 TAR_OPTIONS=\"-H ustar\"
51701 export TAR_OPTIONS
51702 rm -rf *
51703
51704
51705 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51706
51707 mkdir a
51708 genfile --file a/b
51709 genfile --file c
51710 tar cf a.tar a c
51711 mkdir out
51712 cd out
51713 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51714 find . | sort
51715 )"
51716 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
51717 ( $at_check_trace;
51718 mkdir ustar
51719 (cd ustar
51720 TEST_TAR_FORMAT=ustar
51721 export TEST_TAR_FORMAT
51722 TAR_OPTIONS="-H ustar"
51723 export TAR_OPTIONS
51724 rm -rf *
51725
51726
51727 test -z "`sort < /dev/null 2>&1`" || exit 77
51728
51729 mkdir a
51730 genfile --file a/b
51731 genfile --file c
51732 tar cf a.tar a c
51733 mkdir out
51734 cd out
51735 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51736 find . | sort
51737 )
51738 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51739 at_status=$? at_failed=false
51740 $at_check_filter
51741 at_fn_diff_devnull "$at_stderr" || at_failed=:
51742 echo >>"$at_stdout"; $as_echo "a/
51743 a/b
51744 a/c
51745 .
51746 ./a
51747 ./a/b
51748 ./a/c
51749 " | \
51750   $at_diff - "$at_stdout" || at_failed=:
51751 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
51752 $at_failed && at_fn_log_failure
51753 $at_traceon; }
51754
51755               { set +x
51756 $as_echo "$at_srcdir/onetop02.at:24:
51757 mkdir posix
51758 (cd posix
51759 TEST_TAR_FORMAT=posix
51760 export TEST_TAR_FORMAT
51761 TAR_OPTIONS=\"-H posix\"
51762 export TAR_OPTIONS
51763 rm -rf *
51764
51765
51766 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51767
51768 mkdir a
51769 genfile --file a/b
51770 genfile --file c
51771 tar cf a.tar a c
51772 mkdir out
51773 cd out
51774 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51775 find . | sort
51776 )"
51777 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
51778 ( $at_check_trace;
51779 mkdir posix
51780 (cd posix
51781 TEST_TAR_FORMAT=posix
51782 export TEST_TAR_FORMAT
51783 TAR_OPTIONS="-H posix"
51784 export TAR_OPTIONS
51785 rm -rf *
51786
51787
51788 test -z "`sort < /dev/null 2>&1`" || exit 77
51789
51790 mkdir a
51791 genfile --file a/b
51792 genfile --file c
51793 tar cf a.tar a c
51794 mkdir out
51795 cd out
51796 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51797 find . | sort
51798 )
51799 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51800 at_status=$? at_failed=false
51801 $at_check_filter
51802 at_fn_diff_devnull "$at_stderr" || at_failed=:
51803 echo >>"$at_stdout"; $as_echo "a/
51804 a/b
51805 a/c
51806 .
51807 ./a
51808 ./a/b
51809 ./a/c
51810 " | \
51811   $at_diff - "$at_stdout" || at_failed=:
51812 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
51813 $at_failed && at_fn_log_failure
51814 $at_traceon; }
51815
51816               { set +x
51817 $as_echo "$at_srcdir/onetop02.at:24:
51818 mkdir gnu
51819 (cd gnu
51820 TEST_TAR_FORMAT=gnu
51821 export TEST_TAR_FORMAT
51822 TAR_OPTIONS=\"-H gnu\"
51823 export TAR_OPTIONS
51824 rm -rf *
51825
51826
51827 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51828
51829 mkdir a
51830 genfile --file a/b
51831 genfile --file c
51832 tar cf a.tar a c
51833 mkdir out
51834 cd out
51835 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51836 find . | sort
51837 )"
51838 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
51839 ( $at_check_trace;
51840 mkdir gnu
51841 (cd gnu
51842 TEST_TAR_FORMAT=gnu
51843 export TEST_TAR_FORMAT
51844 TAR_OPTIONS="-H gnu"
51845 export TAR_OPTIONS
51846 rm -rf *
51847
51848
51849 test -z "`sort < /dev/null 2>&1`" || exit 77
51850
51851 mkdir a
51852 genfile --file a/b
51853 genfile --file c
51854 tar cf a.tar a c
51855 mkdir out
51856 cd out
51857 tar --one-top-level --show-transformed  -v -x -f ../a.tar
51858 find . | sort
51859 )
51860 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51861 at_status=$? at_failed=false
51862 $at_check_filter
51863 at_fn_diff_devnull "$at_stderr" || at_failed=:
51864 echo >>"$at_stdout"; $as_echo "a/
51865 a/b
51866 a/c
51867 .
51868 ./a
51869 ./a/b
51870 ./a/c
51871 " | \
51872   $at_diff - "$at_stdout" || at_failed=:
51873 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
51874 $at_failed && at_fn_log_failure
51875 $at_traceon; }
51876
51877
51878
51879
51880   set +x
51881   $at_times_p && times >"$at_times_file"
51882 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
51883 read at_status <"$at_status_file"
51884 #AT_STOP_195
51885 #AT_START_196
51886 at_fn_group_banner 196 'onetop03.at:21' \
51887   "tar --one-top-level --transform" "                " 26
51888 at_xfail=no
51889       test -f $XFAILFILE && at_xfail=yes
51890 (
51891   $as_echo "196. $at_setup_line: testing $at_desc ..."
51892   $at_traceon
51893
51894
51895
51896
51897
51898   { set +x
51899 $as_echo "$at_srcdir/onetop03.at:24:
51900 mkdir v7
51901 (cd v7
51902 TEST_TAR_FORMAT=v7
51903 export TEST_TAR_FORMAT
51904 TAR_OPTIONS=\"-H v7\"
51905 export TAR_OPTIONS
51906 rm -rf *
51907
51908
51909 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51910
51911 mkdir a
51912 genfile --file a/b
51913 genfile --file c
51914 tar cf a.tar a c
51915 mkdir out
51916 cd out
51917 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
51918 find . | sort
51919 )"
51920 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
51921 ( $at_check_trace;
51922 mkdir v7
51923 (cd v7
51924 TEST_TAR_FORMAT=v7
51925 export TEST_TAR_FORMAT
51926 TAR_OPTIONS="-H v7"
51927 export TAR_OPTIONS
51928 rm -rf *
51929
51930
51931 test -z "`sort < /dev/null 2>&1`" || exit 77
51932
51933 mkdir a
51934 genfile --file a/b
51935 genfile --file c
51936 tar cf a.tar a c
51937 mkdir out
51938 cd out
51939 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
51940 find . | sort
51941 )
51942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
51943 at_status=$? at_failed=false
51944 $at_check_filter
51945 at_fn_diff_devnull "$at_stderr" || at_failed=:
51946 echo >>"$at_stdout"; $as_echo ".
51947 ./a
51948 ./a/b
51949 ./a/d
51950 " | \
51951   $at_diff - "$at_stdout" || at_failed=:
51952 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
51953 $at_failed && at_fn_log_failure
51954 $at_traceon; }
51955
51956               { set +x
51957 $as_echo "$at_srcdir/onetop03.at:24:
51958 mkdir oldgnu
51959 (cd oldgnu
51960 TEST_TAR_FORMAT=oldgnu
51961 export TEST_TAR_FORMAT
51962 TAR_OPTIONS=\"-H oldgnu\"
51963 export TAR_OPTIONS
51964 rm -rf *
51965
51966
51967 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
51968
51969 mkdir a
51970 genfile --file a/b
51971 genfile --file c
51972 tar cf a.tar a c
51973 mkdir out
51974 cd out
51975 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
51976 find . | sort
51977 )"
51978 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
51979 ( $at_check_trace;
51980 mkdir oldgnu
51981 (cd oldgnu
51982 TEST_TAR_FORMAT=oldgnu
51983 export TEST_TAR_FORMAT
51984 TAR_OPTIONS="-H oldgnu"
51985 export TAR_OPTIONS
51986 rm -rf *
51987
51988
51989 test -z "`sort < /dev/null 2>&1`" || exit 77
51990
51991 mkdir a
51992 genfile --file a/b
51993 genfile --file c
51994 tar cf a.tar a c
51995 mkdir out
51996 cd out
51997 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
51998 find . | sort
51999 )
52000 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52001 at_status=$? at_failed=false
52002 $at_check_filter
52003 at_fn_diff_devnull "$at_stderr" || at_failed=:
52004 echo >>"$at_stdout"; $as_echo ".
52005 ./a
52006 ./a/b
52007 ./a/d
52008 " | \
52009   $at_diff - "$at_stdout" || at_failed=:
52010 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
52011 $at_failed && at_fn_log_failure
52012 $at_traceon; }
52013
52014               { set +x
52015 $as_echo "$at_srcdir/onetop03.at:24:
52016 mkdir ustar
52017 (cd ustar
52018 TEST_TAR_FORMAT=ustar
52019 export TEST_TAR_FORMAT
52020 TAR_OPTIONS=\"-H ustar\"
52021 export TAR_OPTIONS
52022 rm -rf *
52023
52024
52025 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
52026
52027 mkdir a
52028 genfile --file a/b
52029 genfile --file c
52030 tar cf a.tar a c
52031 mkdir out
52032 cd out
52033 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
52034 find . | sort
52035 )"
52036 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
52037 ( $at_check_trace;
52038 mkdir ustar
52039 (cd ustar
52040 TEST_TAR_FORMAT=ustar
52041 export TEST_TAR_FORMAT
52042 TAR_OPTIONS="-H ustar"
52043 export TAR_OPTIONS
52044 rm -rf *
52045
52046
52047 test -z "`sort < /dev/null 2>&1`" || exit 77
52048
52049 mkdir a
52050 genfile --file a/b
52051 genfile --file c
52052 tar cf a.tar a c
52053 mkdir out
52054 cd out
52055 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
52056 find . | sort
52057 )
52058 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52059 at_status=$? at_failed=false
52060 $at_check_filter
52061 at_fn_diff_devnull "$at_stderr" || at_failed=:
52062 echo >>"$at_stdout"; $as_echo ".
52063 ./a
52064 ./a/b
52065 ./a/d
52066 " | \
52067   $at_diff - "$at_stdout" || at_failed=:
52068 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
52069 $at_failed && at_fn_log_failure
52070 $at_traceon; }
52071
52072               { set +x
52073 $as_echo "$at_srcdir/onetop03.at:24:
52074 mkdir posix
52075 (cd posix
52076 TEST_TAR_FORMAT=posix
52077 export TEST_TAR_FORMAT
52078 TAR_OPTIONS=\"-H posix\"
52079 export TAR_OPTIONS
52080 rm -rf *
52081
52082
52083 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
52084
52085 mkdir a
52086 genfile --file a/b
52087 genfile --file c
52088 tar cf a.tar a c
52089 mkdir out
52090 cd out
52091 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
52092 find . | sort
52093 )"
52094 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
52095 ( $at_check_trace;
52096 mkdir posix
52097 (cd posix
52098 TEST_TAR_FORMAT=posix
52099 export TEST_TAR_FORMAT
52100 TAR_OPTIONS="-H posix"
52101 export TAR_OPTIONS
52102 rm -rf *
52103
52104
52105 test -z "`sort < /dev/null 2>&1`" || exit 77
52106
52107 mkdir a
52108 genfile --file a/b
52109 genfile --file c
52110 tar cf a.tar a c
52111 mkdir out
52112 cd out
52113 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
52114 find . | sort
52115 )
52116 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52117 at_status=$? at_failed=false
52118 $at_check_filter
52119 at_fn_diff_devnull "$at_stderr" || at_failed=:
52120 echo >>"$at_stdout"; $as_echo ".
52121 ./a
52122 ./a/b
52123 ./a/d
52124 " | \
52125   $at_diff - "$at_stdout" || at_failed=:
52126 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
52127 $at_failed && at_fn_log_failure
52128 $at_traceon; }
52129
52130               { set +x
52131 $as_echo "$at_srcdir/onetop03.at:24:
52132 mkdir gnu
52133 (cd gnu
52134 TEST_TAR_FORMAT=gnu
52135 export TEST_TAR_FORMAT
52136 TAR_OPTIONS=\"-H gnu\"
52137 export TAR_OPTIONS
52138 rm -rf *
52139
52140
52141 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
52142
52143 mkdir a
52144 genfile --file a/b
52145 genfile --file c
52146 tar cf a.tar a c
52147 mkdir out
52148 cd out
52149 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
52150 find . | sort
52151 )"
52152 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
52153 ( $at_check_trace;
52154 mkdir gnu
52155 (cd gnu
52156 TEST_TAR_FORMAT=gnu
52157 export TEST_TAR_FORMAT
52158 TAR_OPTIONS="-H gnu"
52159 export TAR_OPTIONS
52160 rm -rf *
52161
52162
52163 test -z "`sort < /dev/null 2>&1`" || exit 77
52164
52165 mkdir a
52166 genfile --file a/b
52167 genfile --file c
52168 tar cf a.tar a c
52169 mkdir out
52170 cd out
52171 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
52172 find . | sort
52173 )
52174 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52175 at_status=$? at_failed=false
52176 $at_check_filter
52177 at_fn_diff_devnull "$at_stderr" || at_failed=:
52178 echo >>"$at_stdout"; $as_echo ".
52179 ./a
52180 ./a/b
52181 ./a/d
52182 " | \
52183   $at_diff - "$at_stdout" || at_failed=:
52184 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
52185 $at_failed && at_fn_log_failure
52186 $at_traceon; }
52187
52188
52189
52190
52191   set +x
52192   $at_times_p && times >"$at_times_file"
52193 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
52194 read at_status <"$at_status_file"
52195 #AT_STOP_196
52196 #AT_START_197
52197 at_fn_group_banner 197 'onetop04.at:21' \
52198   "tar --one-top-level --transform" "                " 26
52199 at_xfail=no
52200       test -f $XFAILFILE && at_xfail=yes
52201 (
52202   $as_echo "197. $at_setup_line: testing $at_desc ..."
52203   $at_traceon
52204
52205
52206
52207
52208
52209   { set +x
52210 $as_echo "$at_srcdir/onetop04.at:24:
52211 mkdir v7
52212 (cd v7
52213 TEST_TAR_FORMAT=v7
52214 export TEST_TAR_FORMAT
52215 TAR_OPTIONS=\"-H v7\"
52216 export TAR_OPTIONS
52217 rm -rf *
52218
52219
52220 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
52221
52222 mkdir a
52223 genfile --file a/b
52224 genfile --file c
52225 tar cf a.tar a c
52226 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52227 )"
52228 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
52229 ( $at_check_trace;
52230 mkdir v7
52231 (cd v7
52232 TEST_TAR_FORMAT=v7
52233 export TEST_TAR_FORMAT
52234 TAR_OPTIONS="-H v7"
52235 export TAR_OPTIONS
52236 rm -rf *
52237
52238
52239 test -z "`sort < /dev/null 2>&1`" || exit 77
52240
52241 mkdir a
52242 genfile --file a/b
52243 genfile --file c
52244 tar cf a.tar a c
52245 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52246 )
52247 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52248 at_status=$? at_failed=false
52249 $at_check_filter
52250 at_fn_diff_devnull "$at_stderr" || at_failed=:
52251 echo >>"$at_stdout"; $as_echo "a/
52252 a/b
52253 a/d
52254 " | \
52255   $at_diff - "$at_stdout" || at_failed=:
52256 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
52257 $at_failed && at_fn_log_failure
52258 $at_traceon; }
52259
52260               { set +x
52261 $as_echo "$at_srcdir/onetop04.at:24:
52262 mkdir oldgnu
52263 (cd oldgnu
52264 TEST_TAR_FORMAT=oldgnu
52265 export TEST_TAR_FORMAT
52266 TAR_OPTIONS=\"-H oldgnu\"
52267 export TAR_OPTIONS
52268 rm -rf *
52269
52270
52271 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
52272
52273 mkdir a
52274 genfile --file a/b
52275 genfile --file c
52276 tar cf a.tar a c
52277 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52278 )"
52279 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
52280 ( $at_check_trace;
52281 mkdir oldgnu
52282 (cd oldgnu
52283 TEST_TAR_FORMAT=oldgnu
52284 export TEST_TAR_FORMAT
52285 TAR_OPTIONS="-H oldgnu"
52286 export TAR_OPTIONS
52287 rm -rf *
52288
52289
52290 test -z "`sort < /dev/null 2>&1`" || exit 77
52291
52292 mkdir a
52293 genfile --file a/b
52294 genfile --file c
52295 tar cf a.tar a c
52296 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52297 )
52298 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52299 at_status=$? at_failed=false
52300 $at_check_filter
52301 at_fn_diff_devnull "$at_stderr" || at_failed=:
52302 echo >>"$at_stdout"; $as_echo "a/
52303 a/b
52304 a/d
52305 " | \
52306   $at_diff - "$at_stdout" || at_failed=:
52307 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
52308 $at_failed && at_fn_log_failure
52309 $at_traceon; }
52310
52311               { set +x
52312 $as_echo "$at_srcdir/onetop04.at:24:
52313 mkdir ustar
52314 (cd ustar
52315 TEST_TAR_FORMAT=ustar
52316 export TEST_TAR_FORMAT
52317 TAR_OPTIONS=\"-H ustar\"
52318 export TAR_OPTIONS
52319 rm -rf *
52320
52321
52322 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
52323
52324 mkdir a
52325 genfile --file a/b
52326 genfile --file c
52327 tar cf a.tar a c
52328 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52329 )"
52330 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
52331 ( $at_check_trace;
52332 mkdir ustar
52333 (cd ustar
52334 TEST_TAR_FORMAT=ustar
52335 export TEST_TAR_FORMAT
52336 TAR_OPTIONS="-H ustar"
52337 export TAR_OPTIONS
52338 rm -rf *
52339
52340
52341 test -z "`sort < /dev/null 2>&1`" || exit 77
52342
52343 mkdir a
52344 genfile --file a/b
52345 genfile --file c
52346 tar cf a.tar a c
52347 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52348 )
52349 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52350 at_status=$? at_failed=false
52351 $at_check_filter
52352 at_fn_diff_devnull "$at_stderr" || at_failed=:
52353 echo >>"$at_stdout"; $as_echo "a/
52354 a/b
52355 a/d
52356 " | \
52357   $at_diff - "$at_stdout" || at_failed=:
52358 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
52359 $at_failed && at_fn_log_failure
52360 $at_traceon; }
52361
52362               { set +x
52363 $as_echo "$at_srcdir/onetop04.at:24:
52364 mkdir posix
52365 (cd posix
52366 TEST_TAR_FORMAT=posix
52367 export TEST_TAR_FORMAT
52368 TAR_OPTIONS=\"-H posix\"
52369 export TAR_OPTIONS
52370 rm -rf *
52371
52372
52373 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
52374
52375 mkdir a
52376 genfile --file a/b
52377 genfile --file c
52378 tar cf a.tar a c
52379 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52380 )"
52381 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
52382 ( $at_check_trace;
52383 mkdir posix
52384 (cd posix
52385 TEST_TAR_FORMAT=posix
52386 export TEST_TAR_FORMAT
52387 TAR_OPTIONS="-H posix"
52388 export TAR_OPTIONS
52389 rm -rf *
52390
52391
52392 test -z "`sort < /dev/null 2>&1`" || exit 77
52393
52394 mkdir a
52395 genfile --file a/b
52396 genfile --file c
52397 tar cf a.tar a c
52398 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52399 )
52400 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52401 at_status=$? at_failed=false
52402 $at_check_filter
52403 at_fn_diff_devnull "$at_stderr" || at_failed=:
52404 echo >>"$at_stdout"; $as_echo "a/
52405 a/b
52406 a/d
52407 " | \
52408   $at_diff - "$at_stdout" || at_failed=:
52409 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
52410 $at_failed && at_fn_log_failure
52411 $at_traceon; }
52412
52413               { set +x
52414 $as_echo "$at_srcdir/onetop04.at:24:
52415 mkdir gnu
52416 (cd gnu
52417 TEST_TAR_FORMAT=gnu
52418 export TEST_TAR_FORMAT
52419 TAR_OPTIONS=\"-H gnu\"
52420 export TAR_OPTIONS
52421 rm -rf *
52422
52423
52424 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
52425
52426 mkdir a
52427 genfile --file a/b
52428 genfile --file c
52429 tar cf a.tar a c
52430 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52431 )"
52432 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
52433 ( $at_check_trace;
52434 mkdir gnu
52435 (cd gnu
52436 TEST_TAR_FORMAT=gnu
52437 export TEST_TAR_FORMAT
52438 TAR_OPTIONS="-H gnu"
52439 export TAR_OPTIONS
52440 rm -rf *
52441
52442
52443 test -z "`sort < /dev/null 2>&1`" || exit 77
52444
52445 mkdir a
52446 genfile --file a/b
52447 genfile --file c
52448 tar cf a.tar a c
52449 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
52450 )
52451 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52452 at_status=$? at_failed=false
52453 $at_check_filter
52454 at_fn_diff_devnull "$at_stderr" || at_failed=:
52455 echo >>"$at_stdout"; $as_echo "a/
52456 a/b
52457 a/d
52458 " | \
52459   $at_diff - "$at_stdout" || at_failed=:
52460 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
52461 $at_failed && at_fn_log_failure
52462 $at_traceon; }
52463
52464
52465
52466
52467   set +x
52468   $at_times_p && times >"$at_times_file"
52469 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
52470 read at_status <"$at_status_file"
52471 #AT_STOP_197
52472 #AT_START_198
52473 at_fn_group_banner 198 'onetop05.at:21' \
52474   "tar --one-top-level restoring permissions" "      " 26
52475 at_xfail=no
52476       test -f $XFAILFILE && at_xfail=yes
52477 (
52478   $as_echo "198. $at_setup_line: testing $at_desc ..."
52479   $at_traceon
52480
52481
52482
52483 # When extracting an archive that contains ./ with the --one-top-level option,
52484 # the mode and ownership of ./ would be incorrectly applied to the current
52485 # working directory, instead of the requested top-level directory.
52486
52487
52488
52489   { set +x
52490 $as_echo "$at_srcdir/onetop05.at:28:
52491 mkdir v7
52492 (cd v7
52493 TEST_TAR_FORMAT=v7
52494 export TEST_TAR_FORMAT
52495 TAR_OPTIONS=\"-H v7\"
52496 export TAR_OPTIONS
52497 rm -rf *
52498
52499 orig_mode=3702
52500 mkdir d
52501 chmod \$orig_mode d
52502
52503 mode=\$(genfile --stat=mode.7777 d)
52504 test \$mode = \$orig_mode || exit 77
52505
52506 genfile --file d/file
52507 tar -cf d.tar -C d .
52508 rm -rf d
52509
52510 (mkdir d1
52511 chmod 700 d1
52512 cd d1
52513 tar --one-top-level=top -xpf ../d.tar)
52514 mode=\$(genfile --stat=mode.777 d1)
52515 if test 700 = \$mode; then
52516     echo \"CWD: OK\"
52517 else
52518     echo \"CWD: mode changed: 700 != \$mode\"
52519 fi
52520
52521 mkdir d2
52522 chmod 700 d2
52523 tar -C d2 --one-top-level=top -xpf d.tar
52524 mode=\$(genfile --stat=mode.777 d2)
52525 if test 700 = \$mode; then
52526     echo \"DIR: OK\"
52527 else
52528     echo \"DIR: mode changed: 700 != \$mode\"
52529 fi
52530 mode=\$(genfile --stat=mode.7777 d2/top)
52531 if test \$mode = \$orig_mode; then
52532     echo \"TOP: OK\"
52533 else
52534     echo \"TOP: mode changed: \$orig_mode != \$mode\"
52535 fi
52536 )"
52537 at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
52538 ( $at_check_trace;
52539 mkdir v7
52540 (cd v7
52541 TEST_TAR_FORMAT=v7
52542 export TEST_TAR_FORMAT
52543 TAR_OPTIONS="-H v7"
52544 export TAR_OPTIONS
52545 rm -rf *
52546
52547 orig_mode=3702
52548 mkdir d
52549 chmod $orig_mode d
52550
52551 mode=$(genfile --stat=mode.7777 d)
52552 test $mode = $orig_mode || exit 77
52553
52554 genfile --file d/file
52555 tar -cf d.tar -C d .
52556 rm -rf d
52557
52558 (mkdir d1
52559 chmod 700 d1
52560 cd d1
52561 tar --one-top-level=top -xpf ../d.tar)
52562 mode=$(genfile --stat=mode.777 d1)
52563 if test 700 = $mode; then
52564     echo "CWD: OK"
52565 else
52566     echo "CWD: mode changed: 700 != $mode"
52567 fi
52568
52569 mkdir d2
52570 chmod 700 d2
52571 tar -C d2 --one-top-level=top -xpf d.tar
52572 mode=$(genfile --stat=mode.777 d2)
52573 if test 700 = $mode; then
52574     echo "DIR: OK"
52575 else
52576     echo "DIR: mode changed: 700 != $mode"
52577 fi
52578 mode=$(genfile --stat=mode.7777 d2/top)
52579 if test $mode = $orig_mode; then
52580     echo "TOP: OK"
52581 else
52582     echo "TOP: mode changed: $orig_mode != $mode"
52583 fi
52584 )
52585 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52586 at_status=$? at_failed=false
52587 $at_check_filter
52588 at_fn_diff_devnull "$at_stderr" || at_failed=:
52589 echo >>"$at_stdout"; $as_echo "CWD: OK
52590 DIR: OK
52591 TOP: OK
52592 " | \
52593   $at_diff - "$at_stdout" || at_failed=:
52594 at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
52595 $at_failed && at_fn_log_failure
52596 $at_traceon; }
52597
52598               { set +x
52599 $as_echo "$at_srcdir/onetop05.at:28:
52600 mkdir oldgnu
52601 (cd oldgnu
52602 TEST_TAR_FORMAT=oldgnu
52603 export TEST_TAR_FORMAT
52604 TAR_OPTIONS=\"-H oldgnu\"
52605 export TAR_OPTIONS
52606 rm -rf *
52607
52608 orig_mode=3702
52609 mkdir d
52610 chmod \$orig_mode d
52611
52612 mode=\$(genfile --stat=mode.7777 d)
52613 test \$mode = \$orig_mode || exit 77
52614
52615 genfile --file d/file
52616 tar -cf d.tar -C d .
52617 rm -rf d
52618
52619 (mkdir d1
52620 chmod 700 d1
52621 cd d1
52622 tar --one-top-level=top -xpf ../d.tar)
52623 mode=\$(genfile --stat=mode.777 d1)
52624 if test 700 = \$mode; then
52625     echo \"CWD: OK\"
52626 else
52627     echo \"CWD: mode changed: 700 != \$mode\"
52628 fi
52629
52630 mkdir d2
52631 chmod 700 d2
52632 tar -C d2 --one-top-level=top -xpf d.tar
52633 mode=\$(genfile --stat=mode.777 d2)
52634 if test 700 = \$mode; then
52635     echo \"DIR: OK\"
52636 else
52637     echo \"DIR: mode changed: 700 != \$mode\"
52638 fi
52639 mode=\$(genfile --stat=mode.7777 d2/top)
52640 if test \$mode = \$orig_mode; then
52641     echo \"TOP: OK\"
52642 else
52643     echo \"TOP: mode changed: \$orig_mode != \$mode\"
52644 fi
52645 )"
52646 at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
52647 ( $at_check_trace;
52648 mkdir oldgnu
52649 (cd oldgnu
52650 TEST_TAR_FORMAT=oldgnu
52651 export TEST_TAR_FORMAT
52652 TAR_OPTIONS="-H oldgnu"
52653 export TAR_OPTIONS
52654 rm -rf *
52655
52656 orig_mode=3702
52657 mkdir d
52658 chmod $orig_mode d
52659
52660 mode=$(genfile --stat=mode.7777 d)
52661 test $mode = $orig_mode || exit 77
52662
52663 genfile --file d/file
52664 tar -cf d.tar -C d .
52665 rm -rf d
52666
52667 (mkdir d1
52668 chmod 700 d1
52669 cd d1
52670 tar --one-top-level=top -xpf ../d.tar)
52671 mode=$(genfile --stat=mode.777 d1)
52672 if test 700 = $mode; then
52673     echo "CWD: OK"
52674 else
52675     echo "CWD: mode changed: 700 != $mode"
52676 fi
52677
52678 mkdir d2
52679 chmod 700 d2
52680 tar -C d2 --one-top-level=top -xpf d.tar
52681 mode=$(genfile --stat=mode.777 d2)
52682 if test 700 = $mode; then
52683     echo "DIR: OK"
52684 else
52685     echo "DIR: mode changed: 700 != $mode"
52686 fi
52687 mode=$(genfile --stat=mode.7777 d2/top)
52688 if test $mode = $orig_mode; then
52689     echo "TOP: OK"
52690 else
52691     echo "TOP: mode changed: $orig_mode != $mode"
52692 fi
52693 )
52694 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52695 at_status=$? at_failed=false
52696 $at_check_filter
52697 at_fn_diff_devnull "$at_stderr" || at_failed=:
52698 echo >>"$at_stdout"; $as_echo "CWD: OK
52699 DIR: OK
52700 TOP: OK
52701 " | \
52702   $at_diff - "$at_stdout" || at_failed=:
52703 at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
52704 $at_failed && at_fn_log_failure
52705 $at_traceon; }
52706
52707               { set +x
52708 $as_echo "$at_srcdir/onetop05.at:28:
52709 mkdir ustar
52710 (cd ustar
52711 TEST_TAR_FORMAT=ustar
52712 export TEST_TAR_FORMAT
52713 TAR_OPTIONS=\"-H ustar\"
52714 export TAR_OPTIONS
52715 rm -rf *
52716
52717 orig_mode=3702
52718 mkdir d
52719 chmod \$orig_mode d
52720
52721 mode=\$(genfile --stat=mode.7777 d)
52722 test \$mode = \$orig_mode || exit 77
52723
52724 genfile --file d/file
52725 tar -cf d.tar -C d .
52726 rm -rf d
52727
52728 (mkdir d1
52729 chmod 700 d1
52730 cd d1
52731 tar --one-top-level=top -xpf ../d.tar)
52732 mode=\$(genfile --stat=mode.777 d1)
52733 if test 700 = \$mode; then
52734     echo \"CWD: OK\"
52735 else
52736     echo \"CWD: mode changed: 700 != \$mode\"
52737 fi
52738
52739 mkdir d2
52740 chmod 700 d2
52741 tar -C d2 --one-top-level=top -xpf d.tar
52742 mode=\$(genfile --stat=mode.777 d2)
52743 if test 700 = \$mode; then
52744     echo \"DIR: OK\"
52745 else
52746     echo \"DIR: mode changed: 700 != \$mode\"
52747 fi
52748 mode=\$(genfile --stat=mode.7777 d2/top)
52749 if test \$mode = \$orig_mode; then
52750     echo \"TOP: OK\"
52751 else
52752     echo \"TOP: mode changed: \$orig_mode != \$mode\"
52753 fi
52754 )"
52755 at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
52756 ( $at_check_trace;
52757 mkdir ustar
52758 (cd ustar
52759 TEST_TAR_FORMAT=ustar
52760 export TEST_TAR_FORMAT
52761 TAR_OPTIONS="-H ustar"
52762 export TAR_OPTIONS
52763 rm -rf *
52764
52765 orig_mode=3702
52766 mkdir d
52767 chmod $orig_mode d
52768
52769 mode=$(genfile --stat=mode.7777 d)
52770 test $mode = $orig_mode || exit 77
52771
52772 genfile --file d/file
52773 tar -cf d.tar -C d .
52774 rm -rf d
52775
52776 (mkdir d1
52777 chmod 700 d1
52778 cd d1
52779 tar --one-top-level=top -xpf ../d.tar)
52780 mode=$(genfile --stat=mode.777 d1)
52781 if test 700 = $mode; then
52782     echo "CWD: OK"
52783 else
52784     echo "CWD: mode changed: 700 != $mode"
52785 fi
52786
52787 mkdir d2
52788 chmod 700 d2
52789 tar -C d2 --one-top-level=top -xpf d.tar
52790 mode=$(genfile --stat=mode.777 d2)
52791 if test 700 = $mode; then
52792     echo "DIR: OK"
52793 else
52794     echo "DIR: mode changed: 700 != $mode"
52795 fi
52796 mode=$(genfile --stat=mode.7777 d2/top)
52797 if test $mode = $orig_mode; then
52798     echo "TOP: OK"
52799 else
52800     echo "TOP: mode changed: $orig_mode != $mode"
52801 fi
52802 )
52803 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52804 at_status=$? at_failed=false
52805 $at_check_filter
52806 at_fn_diff_devnull "$at_stderr" || at_failed=:
52807 echo >>"$at_stdout"; $as_echo "CWD: OK
52808 DIR: OK
52809 TOP: OK
52810 " | \
52811   $at_diff - "$at_stdout" || at_failed=:
52812 at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
52813 $at_failed && at_fn_log_failure
52814 $at_traceon; }
52815
52816               { set +x
52817 $as_echo "$at_srcdir/onetop05.at:28:
52818 mkdir posix
52819 (cd posix
52820 TEST_TAR_FORMAT=posix
52821 export TEST_TAR_FORMAT
52822 TAR_OPTIONS=\"-H posix\"
52823 export TAR_OPTIONS
52824 rm -rf *
52825
52826 orig_mode=3702
52827 mkdir d
52828 chmod \$orig_mode d
52829
52830 mode=\$(genfile --stat=mode.7777 d)
52831 test \$mode = \$orig_mode || exit 77
52832
52833 genfile --file d/file
52834 tar -cf d.tar -C d .
52835 rm -rf d
52836
52837 (mkdir d1
52838 chmod 700 d1
52839 cd d1
52840 tar --one-top-level=top -xpf ../d.tar)
52841 mode=\$(genfile --stat=mode.777 d1)
52842 if test 700 = \$mode; then
52843     echo \"CWD: OK\"
52844 else
52845     echo \"CWD: mode changed: 700 != \$mode\"
52846 fi
52847
52848 mkdir d2
52849 chmod 700 d2
52850 tar -C d2 --one-top-level=top -xpf d.tar
52851 mode=\$(genfile --stat=mode.777 d2)
52852 if test 700 = \$mode; then
52853     echo \"DIR: OK\"
52854 else
52855     echo \"DIR: mode changed: 700 != \$mode\"
52856 fi
52857 mode=\$(genfile --stat=mode.7777 d2/top)
52858 if test \$mode = \$orig_mode; then
52859     echo \"TOP: OK\"
52860 else
52861     echo \"TOP: mode changed: \$orig_mode != \$mode\"
52862 fi
52863 )"
52864 at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
52865 ( $at_check_trace;
52866 mkdir posix
52867 (cd posix
52868 TEST_TAR_FORMAT=posix
52869 export TEST_TAR_FORMAT
52870 TAR_OPTIONS="-H posix"
52871 export TAR_OPTIONS
52872 rm -rf *
52873
52874 orig_mode=3702
52875 mkdir d
52876 chmod $orig_mode d
52877
52878 mode=$(genfile --stat=mode.7777 d)
52879 test $mode = $orig_mode || exit 77
52880
52881 genfile --file d/file
52882 tar -cf d.tar -C d .
52883 rm -rf d
52884
52885 (mkdir d1
52886 chmod 700 d1
52887 cd d1
52888 tar --one-top-level=top -xpf ../d.tar)
52889 mode=$(genfile --stat=mode.777 d1)
52890 if test 700 = $mode; then
52891     echo "CWD: OK"
52892 else
52893     echo "CWD: mode changed: 700 != $mode"
52894 fi
52895
52896 mkdir d2
52897 chmod 700 d2
52898 tar -C d2 --one-top-level=top -xpf d.tar
52899 mode=$(genfile --stat=mode.777 d2)
52900 if test 700 = $mode; then
52901     echo "DIR: OK"
52902 else
52903     echo "DIR: mode changed: 700 != $mode"
52904 fi
52905 mode=$(genfile --stat=mode.7777 d2/top)
52906 if test $mode = $orig_mode; then
52907     echo "TOP: OK"
52908 else
52909     echo "TOP: mode changed: $orig_mode != $mode"
52910 fi
52911 )
52912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
52913 at_status=$? at_failed=false
52914 $at_check_filter
52915 at_fn_diff_devnull "$at_stderr" || at_failed=:
52916 echo >>"$at_stdout"; $as_echo "CWD: OK
52917 DIR: OK
52918 TOP: OK
52919 " | \
52920   $at_diff - "$at_stdout" || at_failed=:
52921 at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
52922 $at_failed && at_fn_log_failure
52923 $at_traceon; }
52924
52925               { set +x
52926 $as_echo "$at_srcdir/onetop05.at:28:
52927 mkdir gnu
52928 (cd gnu
52929 TEST_TAR_FORMAT=gnu
52930 export TEST_TAR_FORMAT
52931 TAR_OPTIONS=\"-H gnu\"
52932 export TAR_OPTIONS
52933 rm -rf *
52934
52935 orig_mode=3702
52936 mkdir d
52937 chmod \$orig_mode d
52938
52939 mode=\$(genfile --stat=mode.7777 d)
52940 test \$mode = \$orig_mode || exit 77
52941
52942 genfile --file d/file
52943 tar -cf d.tar -C d .
52944 rm -rf d
52945
52946 (mkdir d1
52947 chmod 700 d1
52948 cd d1
52949 tar --one-top-level=top -xpf ../d.tar)
52950 mode=\$(genfile --stat=mode.777 d1)
52951 if test 700 = \$mode; then
52952     echo \"CWD: OK\"
52953 else
52954     echo \"CWD: mode changed: 700 != \$mode\"
52955 fi
52956
52957 mkdir d2
52958 chmod 700 d2
52959 tar -C d2 --one-top-level=top -xpf d.tar
52960 mode=\$(genfile --stat=mode.777 d2)
52961 if test 700 = \$mode; then
52962     echo \"DIR: OK\"
52963 else
52964     echo \"DIR: mode changed: 700 != \$mode\"
52965 fi
52966 mode=\$(genfile --stat=mode.7777 d2/top)
52967 if test \$mode = \$orig_mode; then
52968     echo \"TOP: OK\"
52969 else
52970     echo \"TOP: mode changed: \$orig_mode != \$mode\"
52971 fi
52972 )"
52973 at_fn_check_prepare_notrace 'a $(...) command substitution' "onetop05.at:28"
52974 ( $at_check_trace;
52975 mkdir gnu
52976 (cd gnu
52977 TEST_TAR_FORMAT=gnu
52978 export TEST_TAR_FORMAT
52979 TAR_OPTIONS="-H gnu"
52980 export TAR_OPTIONS
52981 rm -rf *
52982
52983 orig_mode=3702
52984 mkdir d
52985 chmod $orig_mode d
52986
52987 mode=$(genfile --stat=mode.7777 d)
52988 test $mode = $orig_mode || exit 77
52989
52990 genfile --file d/file
52991 tar -cf d.tar -C d .
52992 rm -rf d
52993
52994 (mkdir d1
52995 chmod 700 d1
52996 cd d1
52997 tar --one-top-level=top -xpf ../d.tar)
52998 mode=$(genfile --stat=mode.777 d1)
52999 if test 700 = $mode; then
53000     echo "CWD: OK"
53001 else
53002     echo "CWD: mode changed: 700 != $mode"
53003 fi
53004
53005 mkdir d2
53006 chmod 700 d2
53007 tar -C d2 --one-top-level=top -xpf d.tar
53008 mode=$(genfile --stat=mode.777 d2)
53009 if test 700 = $mode; then
53010     echo "DIR: OK"
53011 else
53012     echo "DIR: mode changed: 700 != $mode"
53013 fi
53014 mode=$(genfile --stat=mode.7777 d2/top)
53015 if test $mode = $orig_mode; then
53016     echo "TOP: OK"
53017 else
53018     echo "TOP: mode changed: $orig_mode != $mode"
53019 fi
53020 )
53021 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53022 at_status=$? at_failed=false
53023 $at_check_filter
53024 at_fn_diff_devnull "$at_stderr" || at_failed=:
53025 echo >>"$at_stdout"; $as_echo "CWD: OK
53026 DIR: OK
53027 TOP: OK
53028 " | \
53029   $at_diff - "$at_stdout" || at_failed=:
53030 at_fn_check_status 0 $at_status "$at_srcdir/onetop05.at:28"
53031 $at_failed && at_fn_log_failure
53032 $at_traceon; }
53033
53034
53035
53036
53037   set +x
53038   $at_times_p && times >"$at_times_file"
53039 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
53040 read at_status <"$at_status_file"
53041 #AT_STOP_198
53042 #AT_START_199
53043 at_fn_group_banner 199 'gtarfail.at:22' \
53044   "gtarfail" "                                       " 27
53045 at_xfail=no
53046 (
53047   $as_echo "199. $at_setup_line: testing $at_desc ..."
53048   $at_traceon
53049
53050
53051
53052 unset TAR_OPTIONS
53053
53054 { set +x
53055 $as_echo "$at_srcdir/gtarfail.at:27:
53056
53057 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
53058 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
53059
53060
53061 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail.tar
53062 "
53063 at_fn_check_prepare_notrace 'an embedded newline' "gtarfail.at:27"
53064 ( $at_check_trace;
53065
53066 test -z "$STAR_TESTSCRIPTS" && exit 77
53067 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
53068
53069
53070 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
53071
53072 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53073 at_status=$? at_failed=false
53074 $at_check_filter
53075 at_fn_diff_devnull "$at_stderr" || at_failed=:
53076 echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone       518 2001-05-25 14:41 vedpowered.gif
53077 -rw-r--r-- jes/glone      6825 1997-04-29 00:19 cd.gif
53078 -rw-r--r-- jes/glone     33354 1999-06-22 12:17 DSCN0049c.JPG
53079 -rw-r--r-- jes/glone     86159 2001-06-05 18:16 Window1.jpg
53080 -rw-r--r-- jes/glone      1310 2001-05-25 13:05 vipower.gif
53081 -rw-rw-rw- jes/glone    148753 1998-09-15 13:08 billyboy.jpg
53082 " | \
53083   $at_diff - "$at_stdout" || at_failed=:
53084 at_fn_check_status 0 $at_status "$at_srcdir/gtarfail.at:27"
53085 $at_failed && at_fn_log_failure
53086 $at_traceon; }
53087
53088
53089   set +x
53090   $at_times_p && times >"$at_times_file"
53091 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
53092 read at_status <"$at_status_file"
53093 #AT_STOP_199
53094 #AT_START_200
53095 at_fn_group_banner 200 'gtarfail2.at:22' \
53096   "gtarfail2" "                                      " 27
53097 at_xfail=no
53098 (
53099   $as_echo "200. $at_setup_line: testing $at_desc ..."
53100   $at_traceon
53101
53102
53103
53104 unset TAR_OPTIONS
53105
53106 { set +x
53107 $as_echo "$at_srcdir/gtarfail2.at:27:
53108
53109 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
53110 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
53111
53112 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail2.tar
53113 "
53114 at_fn_check_prepare_notrace 'an embedded newline' "gtarfail2.at:27"
53115 ( $at_check_trace;
53116
53117 test -z "$STAR_TESTSCRIPTS" && exit 77
53118 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
53119
53120 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
53121
53122 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53123 at_status=$? at_failed=false
53124 $at_check_filter
53125 at_fn_diff_devnull "$at_stderr" || at_failed=:
53126 echo >>"$at_stdout"; $as_echo "-rwxr-xr-x jes/glone       214 2001-09-21 14:08 .clean
53127 lrwxrwxrwx jes/cats          0 1998-05-07 12:39 RULES -> makefiles/RULES
53128 drwxr-sr-x jes/glone         0 2001-12-10 00:00 build/
53129 -rw-r--r-- jes/glone    312019 2001-12-10 00:00 build/smake-1.2.tar.gz
53130 drwxr-sr-x jes/glone         0 2001-11-09 18:20 build/psmake/
53131 -rwxr-xr-x jes/glone       259 2000-01-09 16:36 build/psmake/MAKE
53132 -rwxr-xr-x jes/glone      4820 2001-02-25 22:45 build/psmake/MAKE.sh
53133 -rw-r--r-- jes/glone       647 2001-02-25 23:50 build/psmake/Makefile
53134 lrwxrwxrwx jes/glone         0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c
53135 lrwxrwxrwx jes/glone         0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c
53136 " | \
53137   $at_diff - "$at_stdout" || at_failed=:
53138 at_fn_check_status 0 $at_status "$at_srcdir/gtarfail2.at:27"
53139 $at_failed && at_fn_log_failure
53140 $at_traceon; }
53141
53142
53143   set +x
53144   $at_times_p && times >"$at_times_file"
53145 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
53146 read at_status <"$at_status_file"
53147 #AT_STOP_200
53148 #AT_START_201
53149 at_fn_group_banner 201 'multi-fail.at:22' \
53150   "multi-fail" "                                     " 27
53151 at_xfail=no
53152 (
53153   $as_echo "201. $at_setup_line: testing $at_desc ..."
53154   $at_traceon
53155
53156
53157
53158 unset TAR_OPTIONS
53159
53160 { set +x
53161 $as_echo "$at_srcdir/multi-fail.at:27:
53162
53163 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
53164 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
53165
53166
53167 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
53168 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
53169
53170
53171 tar --utc -tvM -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \\
53172                -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
53173 "
53174 at_fn_check_prepare_notrace 'an embedded newline' "multi-fail.at:27"
53175 ( $at_check_trace;
53176
53177 test -z "$STAR_TESTSCRIPTS" && exit 77
53178 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
53179
53180
53181 test -z "$STAR_TESTSCRIPTS" && exit 77
53182 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
53183
53184
53185 tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
53186                -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
53187
53188 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53189 at_status=$? at_failed=false
53190 $at_check_filter
53191 at_fn_diff_devnull "$at_stderr" || at_failed=:
53192 echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs          0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/
53193 -rw-r--r-- joerg/bs          1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull
53194 -rw-r--r-- joerg/bs       1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d
53195 -rw-r--r-- joerg/bs       1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d
53196 -rw-r--r-- joerg/bs       1540 2003-10-10 18:06 OBJ/i386-sunos5-gcc/cpiohdr.d
53197 -rw-r--r-- joerg/bs       2245 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xheader.d
53198 -rw-r--r-- joerg/bs       1254 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xattr.d
53199 -rw-r--r-- joerg/bs       1330 2003-10-10 18:06 OBJ/i386-sunos5-gcc/list.d
53200 -rw-r--r-- joerg/bs       1745 2003-10-10 18:06 OBJ/i386-sunos5-gcc/extract.d
53201 -rw-r--r-- joerg/bs       1518 2003-10-10 18:06 OBJ/i386-sunos5-gcc/create.d
53202 -rw-r--r-- joerg/bs       1235 2003-10-10 18:06 OBJ/i386-sunos5-gcc/append.d
53203 -rw-r--r-- joerg/bs       1368 2003-10-10 18:06 OBJ/i386-sunos5-gcc/diff.d
53204 -rw-r--r-- joerg/bs       1423 2003-10-10 18:06 OBJ/i386-sunos5-gcc/remove.d
53205 -rw-r--r-- joerg/bs       1493 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.d
53206 -rw-r--r-- joerg/bs       1572 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.d
53207 -rw-r--r-- joerg/bs       1453 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.d
53208 -rw-r--r-- joerg/bs       2257 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.d
53209 -rw-r--r-- joerg/bs        969 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.d
53210 -rw-r--r-- joerg/bs       1308 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.d
53211 -rw-r--r-- joerg/bs       1287 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.d
53212 -rw-r--r-- joerg/bs       1105 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.d
53213 -rw-r--r-- joerg/bs       1230 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.d
53214 -rw-r--r-- joerg/bs       1091 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.d
53215 -rw-r--r-- joerg/bs        961 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.d
53216 -rw-r--r-- joerg/bs       1113 2003-10-10 18:07 OBJ/i386-sunos5-gcc/props.d
53217 -rw-r--r-- joerg/bs       2146 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fetchdir.d
53218 -rw-r--r-- joerg/bs       1093 2003-10-10 18:07 OBJ/i386-sunos5-gcc/unicode.d
53219 -rw-r--r-- joerg/bs       1211 2003-10-10 18:07 OBJ/i386-sunos5-gcc/subst.d
53220 -rw-r--r-- joerg/bs       2076 2003-10-11 11:53 OBJ/i386-sunos5-gcc/volhdr.d
53221 -rw-r--r-- joerg/bs       1480 2003-10-10 18:07 OBJ/i386-sunos5-gcc/chdir.d
53222 -rw-r--r-- joerg/bs      42460 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star.o
53223 -rw-r--r-- joerg/bs      22564 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.o
53224 -rw-r--r-- joerg/bs       7880 2003-10-10 18:07 OBJ/i386-sunos5-gcc/cpiohdr.o
53225 -rw-r--r-- joerg/bs      14624 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xheader.o
53226 -rw-r--r-- joerg/bs        924 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xattr.o
53227 -rw-r--r-- joerg/bs       6120 2003-10-10 18:07 OBJ/i386-sunos5-gcc/list.o
53228 -rw-r--r-- joerg/bs      12764 2003-10-10 18:07 OBJ/i386-sunos5-gcc/extract.o
53229 -rw-r--r-- joerg/bs      14668 2003-10-10 18:07 OBJ/i386-sunos5-gcc/create.o
53230 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/append.o
53231 -rw-r--r-- joerg/bs       7636 2003-10-10 18:07 OBJ/i386-sunos5-gcc/diff.o
53232 -rw-r--r-- joerg/bs       3072 2003-10-10 18:07 OBJ/i386-sunos5-gcc/remove.o
53233 -rw-r--r-- joerg/bs       5612 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.o
53234 -rw-r--r-- joerg/bs       6220 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.o
53235 -rw-r--r-- joerg/bs       1092 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.o
53236 -rw-r--r-- joerg/bs      20996 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.o
53237 -rw-r--r-- joerg/bs       2060 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.o
53238 -rw-r--r-- joerg/bs       1664 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.o
53239 -rw-r--r-- joerg/bs      10564 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.o
53240 -rw-r--r-- joerg/bs       3864 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.o
53241 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o
53242 -rw-r--r-- joerg/bs        952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o
53243 -rw-r--r-- joerg/bs       2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o
53244 " | \
53245   $at_diff - "$at_stdout" || at_failed=:
53246 at_fn_check_status 0 $at_status "$at_srcdir/multi-fail.at:27"
53247 $at_failed && at_fn_log_failure
53248 $at_traceon; }
53249
53250
53251   set +x
53252   $at_times_p && times >"$at_times_file"
53253 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
53254 read at_status <"$at_status_file"
53255 #AT_STOP_201
53256 #AT_START_202
53257 at_fn_group_banner 202 'ustar-big-2g.at:22' \
53258   "ustar-big-2g" "                                   " 27
53259 at_xfail=no
53260 (
53261   $as_echo "202. $at_setup_line: testing $at_desc ..."
53262   $at_traceon
53263
53264
53265
53266 unset TAR_OPTIONS
53267
53268 { set +x
53269 $as_echo "$at_srcdir/ustar-big-2g.at:27:
53270
53271 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
53272
53273
53274 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
53275 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
53276
53277
53278 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
53279 "
53280 at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-2g.at:27"
53281 ( $at_check_trace;
53282
53283 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
53284
53285
53286 test -z "$STAR_TESTSCRIPTS" && exit 77
53287 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
53288
53289
53290 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
53291
53292 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53293 at_status=$? at_failed=false
53294 $at_check_filter
53295 echo stderr:; tee stderr <"$at_stderr"
53296 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big
53297 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
53298 " | \
53299   $at_diff - "$at_stdout" || at_failed=:
53300 at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:27"
53301 $at_failed && at_fn_log_failure
53302 $at_traceon; }
53303
53304
53305
53306 cat >stderr.re <<'_ATEOF'
53307 tar: Record size = .*
53308 _ATEOF
53309
53310 awk '{print NR " " $0}' stderr > $$.1
53311 awk '{print NR " " $0}' stderr.re | join - $$.1 |
53312 while read NUM RE LINE
53313 do
53314   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
53315 done
53316
53317
53318   set +x
53319   $at_times_p && times >"$at_times_file"
53320 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
53321 read at_status <"$at_status_file"
53322 #AT_STOP_202
53323 #AT_START_203
53324 at_fn_group_banner 203 'ustar-big-8g.at:22' \
53325   "ustar-big-8g" "                                   " 27
53326 at_xfail=no
53327 (
53328   $as_echo "203. $at_setup_line: testing $at_desc ..."
53329   $at_traceon
53330
53331
53332
53333 unset TAR_OPTIONS
53334
53335 { set +x
53336 $as_echo "$at_srcdir/ustar-big-8g.at:27:
53337
53338 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
53339
53340
53341 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
53342 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
53343
53344
53345 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
53346 "
53347 at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-8g.at:27"
53348 ( $at_check_trace;
53349
53350 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
53351
53352
53353 test -z "$STAR_TESTSCRIPTS" && exit 77
53354 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
53355
53356
53357 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
53358
53359 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53360 at_status=$? at_failed=false
53361 $at_check_filter
53362 echo stderr:; tee stderr <"$at_stderr"
53363 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1
53364 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
53365 " | \
53366   $at_diff - "$at_stdout" || at_failed=:
53367 at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:27"
53368 $at_failed && at_fn_log_failure
53369 $at_traceon; }
53370
53371
53372
53373 cat >stderr.re <<'_ATEOF'
53374 tar: Record size = .*
53375 _ATEOF
53376
53377 awk '{print NR " " $0}' stderr > $$.1
53378 awk '{print NR " " $0}' stderr.re | join - $$.1 |
53379 while read NUM RE LINE
53380 do
53381   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
53382 done
53383
53384
53385   set +x
53386   $at_times_p && times >"$at_times_file"
53387 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
53388 read at_status <"$at_status_file"
53389 #AT_STOP_203
53390 #AT_START_204
53391 at_fn_group_banner 204 'pax-big-10g.at:22' \
53392   "pax-big-10g" "                                    " 27
53393 at_xfail=no
53394 (
53395   $as_echo "204. $at_setup_line: testing $at_desc ..."
53396   $at_traceon
53397
53398
53399
53400 unset TAR_OPTIONS
53401
53402 { set +x
53403 $as_echo "$at_srcdir/pax-big-10g.at:27:
53404
53405 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
53406
53407
53408 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
53409 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
53410
53411
53412 tar --utc -tvjf \$STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
53413 "
53414 at_fn_check_prepare_notrace 'an embedded newline' "pax-big-10g.at:27"
53415 ( $at_check_trace;
53416
53417 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
53418
53419
53420 test -z "$STAR_TESTSCRIPTS" && exit 77
53421 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
53422
53423
53424 tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
53425
53426 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
53427 at_status=$? at_failed=false
53428 $at_check_filter
53429 echo stderr:; tee stderr <"$at_stderr"
53430 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g
53431 -rw-r--r-- jes/glone           0 2002-06-15 14:53 file
53432 " | \
53433   $at_diff - "$at_stdout" || at_failed=:
53434 at_fn_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:27"
53435 $at_failed && at_fn_log_failure
53436 $at_traceon; }
53437
53438
53439
53440 cat >stderr.re <<'_ATEOF'
53441 tar: Record size = .*
53442 _ATEOF
53443
53444 awk '{print NR " " $0}' stderr > $$.1
53445 awk '{print NR " " $0}' stderr.re | join - $$.1 |
53446 while read NUM RE LINE
53447 do
53448   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
53449 done
53450
53451
53452   set +x
53453   $at_times_p && times >"$at_times_file"
53454 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
53455 read at_status <"$at_status_file"
53456 #AT_STOP_204