907e52032e759945c49eccdd8cede6784991d1db
[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:19;tar version;;
594 2;pipe.at:29;decompressing from stdin;pipe;
595 3;options.at:24;mixing options;options options00;
596 4;options02.at:26;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-cd.at:21;-C in file lists;files-from t-cd;
607 15;T-empty.at:26;empty entries;files-from empty-line;
608 16;T-null.at:21;0-separated file without -0;files-from null t-null;
609 17;T-zfile.at:26;empty file;files-from empty-file;
610 18;T-nonl.at:27;entries with missing newlines;files-from nonewline nonl t-nonl;
611 19;indexfile.at:26;tar --index-file=FILE --file=-;stdout indexfile;
612 20;verbose.at:26;tar cvf -;stdout verbose;
613 21;gzip.at:23;gzip;gzip;
614 22;recurse.at:21;recurse;recurse;
615 23;shortrec.at:25;short records;shortrec;
616 24;same-order01.at:26;working -C with --same-order;same-order same-order01;
617 25;same-order02.at:25;multiple -C options;same-order same-order02;
618 26;append.at:21;append;append append00;
619 27;append01.at:29;appending files with long names;append append01;
620 28;append02.at:54;append vs. create;append append02 append-gnu;
621 29;append03.at:21;append with name transformation;append append03;
622 30;append04.at:29;append with verify;append append04 verify append-verify;
623 31;xform-h.at:30;transforming hard links on create;transform xform xform-h;
624 32;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume;
625 33;exclude.at:23;exclude;exclude;
626 34;exclude01.at:19;exclude wildcards;exclude exclude01;
627 35;exclude02.at:19;exclude: anchoring;exclude exclude02;
628 36;exclude03.at:19;exclude: wildcards match slash;exclude exclude03;
629 37;exclude04.at:19;exclude: case insensitive;exclude exclude04;
630 38;exclude05.at:21;exclude: lots of excludes;exclude exclude05;
631 39;exclude06.at:26;exclude: long files in pax archives;exclude exclude06;
632 40;exclude07.at:19;exclude: --exclude-backups option;exclude exclude07;
633 41;exclude08.at:36;--exclude-tag option;exclude exclude-tag exclude08;
634 42;exclude09.at:37;--exclude-tag option and --listed-incremental;exclude exclude-tag listed incremental exclude09;
635 43;exclude10.at:38;--exclude-tag option in incremental pass;exclude exclude-tag listed incremental exclude10;
636 44;exclude11.at:36;--exclude-tag-under option;exclude exclude-tag exclude-tag-under exclude11;
637 45;exclude12.at:37;--exclude-tag-under and --listed-incremental;exclude exclude-tag exclude-tag-under listed incremental exclude12;
638 46;exclude13.at:39;--exclude-tag-under option in incremental pass;exclude exclude-tag exclude-tag-under listed incremental exclude13;
639 47;exclude14.at:36;--exclude-tag-all option;exclude exclude-tag exclude-tag-all exclude14;
640 48;exclude15.at:36;--exclude-tag-all and --listed-incremental;exclude exclude-tag exclude-tag-all listed incremental exclude15;
641 49;exclude16.at:38;--exclude-tag-all option in incremental pass;exclude exclude-tag exclude-tag-all listed incremental exclude16;
642 50;delete01.at:23;deleting a member after a big one;delete delete01;
643 51;delete02.at:23;deleting a member from stdin archive;delete delete02;
644 52;delete03.at:21;deleting members with long names;delete delete03;
645 53;delete04.at:23;deleting a large last member;delete delete04;
646 54;delete05.at:27;deleting non-existing member;delete delete05;
647 55;extrac01.at:23;extract over an existing directory;extract extract01;
648 56;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink;
649 57;extrac03.at:23;extraction loops;extract extract03;
650 58;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch;
651 59;extrac05.at:30;extracting selected members from pax;extract extract05;
652 60;extrac06.at:34;mode of extracted directories;extract extract06 directory mode;
653 61;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink;
654 62;extrac08.at:33;restoring mode on existing directory;extract extrac08;
655 63;extrac09.at:24;no need to save dir with unreadable . and ..;extract extrac09;
656 64;extrac10.at:29;-C and delayed setting of metadata;extract extrac10;
657 65;extrac11.at:25;scarce file descriptors;extract extrac11;
658 66;extrac12.at:25;extract dot permissions;extract extrac12;
659 67;extrac13.at:26;extract over symlinks;extract extrac13;
660 68;extrac14.at:25;extract -C symlink;extract extrac14;
661 69;extrac15.at:25;extract parent mkdir failure;extract extrac15;
662 70;extrac16.at:26;extract empty directory with -C;extract extrac16;
663 71;extrac17.at:21;name matching/transformation ordering;extract extrac17;
664 72;extrac18.at:34;keep-old-files;extract extrac18 old-files keep-old-files;
665 73;extrac19.at:21;skip-old-files;extract extrac19 old-files skip-old-files;
666 74;backup01.at:33;extracting existing dir with --backup;extract backup backup01;
667 75;label01.at:21;single-volume label;label label01;
668 76;label02.at:21;multi-volume label;label label02 multi-label multivolume multiv;
669 77;label03.at:27;test-label option;label label03 test-label;
670 78;label04.at:27;label with non-create option;label label04;
671 79;label05.at:24;label with non-create option;label label05;
672 80;incremental.at:23;incremental;incremental listed incr00;
673 81;incr01.at:27;restore broken symlinks from incremental;incremental incr01;
674 82;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02;
675 83;listed01.at:26;--listed for individual files;listed incremental listed01;
676 84;listed02.at:28;working --listed;listed incremental listed02;
677 85;listed03.at:24;incremental dump when the parent directory is unreadable;listed incremental listed03;
678 86;listed04.at:26;--listed-incremental and --one-file-system;listed incremental listed04;
679 87;listed05.at:33;--listed-incremental and remounted directories;listed incremental listed05;
680 88;incr03.at:28;renamed files in incrementals;incremental incr03 rename;
681 89;incr04.at:29;proper icontents initialization;incremental incr04 icontents;
682 90;incr05.at:21;incremental dumps with -C;incremental incr05;
683 91;incr06.at:21;incremental dumps of nested directories;incremental incr06;
684 92;incr07.at:18;incremental restores with -C;incremental extract incr07;
685 93;incr08.at:38;filename normalization;incremental create incr08;
686 94;incr09.at:26;incremental with alternating -C;incremental create incr09;
687 95;filerem01.at:36;file removed as we read it (ca. 22 seconds);create incremental listed filechange filerem filerem01;
688 96;filerem02.at:26;toplevel file removed (ca. 24 seconds);create incremental listed filechange filerem filerem02;
689 97;rename01.at:24;renamed dirs in incrementals;incremental rename rename01;
690 98;rename02.at:24;move between hierarchies;incremental rename rename02;
691 99;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename;
692 100;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename;
693 101;rename05.at:24;renamed subdirectories;incremental rename05 rename;
694 102;chtype.at:27;changed file types in incrementals;incremental listed chtype;
695 103;ignfail.at:23;ignfail;ignfail;
696 104;link01.at:33;link count gt 2;hardlinks link01;
697 105;link02.at:32;preserve hard links with --remove-files;hardlinks link02;
698 106;link03.at:24;working -l with --remove-files;hardlinks link03;
699 107;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04;
700 108;longv7.at:24;long names in V7 archives;longname longv7;
701 109;long01.at:28;long file names divisible by block size;longname long512;
702 110;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01;
703 111;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02;
704 112;lustar03.at:21;ustar: splitting long names;longname ustar lustar03;
705 113;old.at:23;old archives;old;
706 114;time01.at:20;time: tricky time stamps;time time01;
707 115;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01;
708 116;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02;
709 117;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03;
710 118;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental listed multiv04;
711 119;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync;
712 120;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06;
713 121;multiv07.at:28;volumes split at an extended header;multivolume multiv multiv07 xsplit;
714 122;multiv08.at:25;multivolume header creation;multivolume multiv multiv08;
715 123;owner.at:21;--owner and --group;owner;
716 124;sparse01.at:21;sparse files;sparse sparse01;
717 125;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02;
718 126;sparse03.at:21;storing sparse files > 8G;sparse sparse03;
719 127;sparse04.at:21;storing long sparse file names;sparse sparse04;
720 128;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv;
721 129;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00;
722 130;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01;
723 131;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10;
724 132;update.at:28;update unchanged directories;update update00;
725 133;update01.at:29;update directories;update update01;
726 134;update02.at:26;update changed files;update update02;
727 135;verify.at:25;verify;verify;
728 136;volume.at:23;volume;volume volcheck;
729 137;volsize.at:29;volume header size;volume volsize;
730 138;comprec.at:21;compressed format recognition;comprec;
731 139;shortfile.at:26;short input files;shortfile shortfile0;
732 140;shortupd.at:31;updating short archives;shortfile shortfile1 shortupd;
733 141;truncate.at:29;truncate;truncate filechange;
734 142;grow.at:24;grow;grow filechange;
735 143;sigpipe.at:21;sigpipe handling;sigpipe;
736 144;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip;
737 145;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip;
738 146;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03;
739 147;remfiles04a.at:25;remove-files with -C:rel in -c/non-incr. mode;create remove-files remfiles04 remfiles04a;
740 148;remfiles04b.at:33;remove-files with -C:rel in -c/incr. mode;create incremental remove-files remfiles04 remfiles04b;
741 149;remfiles04c.at:33;remove-files with -C:rel in -r mode;create append remove-files remfiles04 remfiles04c;
742 150;remfiles05a.at:34;remove-files with -C:rel,rel in -c/non-incr. mode;create remove-files remfiles05 remfiles05a;
743 151;remfiles05b.at:25;remove-files with -C:rel,rel in -c/incr. mode;create incremental remove-files remfiles05 remfiles05b;
744 152;remfiles05c.at:25;remove-files with -C:rel,rel in -r mode;create append remove-files remfiles05 remfiles05c;
745 153;remfiles06a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles06 remfiles06a;
746 154;remfiles06b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles06 remfiles06b;
747 155;remfiles06c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles06 remfiles06c;
748 156;remfiles07a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles07 remfiles07a;
749 157;remfiles07b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles07 remfiles07b;
750 158;remfiles07c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles07 remfiles07c;
751 159;remfiles08a.at:25;remove-files with -C:abs,rel in -c/non-incr. mode;create remove-files remfiles08 remfiles08a;
752 160;remfiles08b.at:25;remove-files with -C:abs,rel in -c/incr. mode;create incremental remove-files remfiles08 remfiles08b;
753 161;remfiles08c.at:25;remove-files with -C:abs,rel in -r mode;create append remove-files remfiles08 remfiles08c;
754 162;remfiles09a.at:25;remove-files on full directory in -c/non-incr. mode;create remove-files remfiles09 remfiles09a;
755 163;remfiles09b.at:29;remove-files on full directory in -c/incr. mode;create incremental remove-files remfiles09 remfiles09b;
756 164;remfiles09c.at:25;remove-files on full directory in -r mode;create append remove-files remfiles09 remfiles09c;
757 165;xattr01.at:25;xattrs: basic functionality;xattrs xattr01;
758 166;xattr02.at:25;xattrs: change directory with -C option;xattrs xattr02;
759 167;xattr03.at:25;xattrs: trusted.* attributes;xattrs xattr03;
760 168;xattr04.at:26;xattrs: s/open/openat/ regression;xattrs xattr04;
761 169;xattr05.at:28;xattrs: keywords with '=' and '%';xattrs xattr05;
762 170;acls01.at:25;acls: basic functionality;xattrs acls acls01;
763 171;acls02.at:25;acls: work with -C;xattrs acls acls02;
764 172;selnx01.at:25;selinux: basic store/restore;xattrs selinux selnx01;
765 173;selacl01.at:25;acls/selinux: special files & fifos;xattrs selinux acls selacls01;
766 174;capabs_raw01.at:25;capabilities: binary store/restore;xattrs capabilities capabs_raw01;
767 175;gtarfail.at:21;gtarfail;star gtarfail;
768 176;gtarfail2.at:21;gtarfail2;star gtarfail2;
769 177;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail;
770 178;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g;
771 179;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g;
772 180;pax-big-10g.at:21;pax-big-10g;star pax-big-10g;
773 "
774 # List of the all the test groups.
775 at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
776
777 # at_fn_validate_ranges NAME...
778 # -----------------------------
779 # Validate and normalize the test group number contained in each variable
780 # NAME. Leading zeroes are treated as decimal.
781 at_fn_validate_ranges ()
782 {
783   for at_grp
784   do
785     eval at_value=\$$at_grp
786     if test $at_value -lt 1 || test $at_value -gt 180; then
787       $as_echo "invalid test group: $at_value" >&2
788       exit 1
789     fi
790     case $at_value in
791       0*) # We want to treat leading 0 as decimal, like expr and test, but
792           # AS_VAR_ARITH treats it as octal if it uses $(( )).
793           # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
794           # expr fork, but it is not worth the effort to determine if the
795           # shell supports XSI when the user can just avoid leading 0.
796           eval $at_grp='`expr $at_value + 0`' ;;
797     esac
798   done
799 }
800
801 at_prev=
802 for at_option
803 do
804   # If the previous option needs an argument, assign it.
805   if test -n "$at_prev"; then
806     at_option=$at_prev=$at_option
807     at_prev=
808   fi
809
810   case $at_option in
811   *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
812   *)    at_optarg= ;;
813   esac
814
815   # Accept the important Cygnus configure options, so we can diagnose typos.
816
817   case $at_option in
818     --help | -h )
819         at_help_p=:
820         ;;
821
822     --list | -l )
823         at_list_p=:
824         ;;
825
826     --version | -V )
827         at_version_p=:
828         ;;
829
830     --clean | -c )
831         at_clean=:
832         ;;
833
834     --color )
835         at_color=always
836         ;;
837     --color=* )
838         case $at_optarg in
839         no | never | none) at_color=never ;;
840         auto | tty | if-tty) at_color=auto ;;
841         always | yes | force) at_color=always ;;
842         *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
843            as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
844         esac
845         ;;
846
847     --debug | -d )
848         at_debug_p=:
849         ;;
850
851     --errexit | -e )
852         at_debug_p=:
853         at_errexit_p=:
854         ;;
855
856     --verbose | -v )
857         at_verbose=; at_quiet=:
858         ;;
859
860     --trace | -x )
861         at_traceon='set -x'
862         at_trace_echo=echo
863         at_check_filter_trace=at_fn_filter_trace
864         ;;
865
866     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
867         at_fn_validate_ranges at_option
868         as_fn_append at_groups "$at_option$as_nl"
869         ;;
870
871     # Ranges
872     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
873         at_range_start=`echo $at_option |tr -d X-`
874         at_fn_validate_ranges at_range_start
875         at_range=`$as_echo "$at_groups_all" | \
876           sed -ne '/^'$at_range_start'$/,$p'`
877         as_fn_append at_groups "$at_range$as_nl"
878         ;;
879
880     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
881         at_range_end=`echo $at_option |tr -d X-`
882         at_fn_validate_ranges at_range_end
883         at_range=`$as_echo "$at_groups_all" | \
884           sed -ne '1,/^'$at_range_end'$/p'`
885         as_fn_append at_groups "$at_range$as_nl"
886         ;;
887
888     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
889     [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
890     [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
891     [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
892     [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
893     [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
894         at_range_start=`expr $at_option : '\(.*\)-'`
895         at_range_end=`expr $at_option : '.*-\(.*\)'`
896         if test $at_range_start -gt $at_range_end; then
897           at_tmp=$at_range_end
898           at_range_end=$at_range_start
899           at_range_start=$at_tmp
900         fi
901         at_fn_validate_ranges at_range_start at_range_end
902         at_range=`$as_echo "$at_groups_all" | \
903           sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
904         as_fn_append at_groups "$at_range$as_nl"
905         ;;
906
907     # Directory selection.
908     --directory | -C )
909         at_prev=--directory
910         ;;
911     --directory=* )
912         at_change_dir=:
913         at_dir=$at_optarg
914         if test x- = "x$at_dir" ; then
915           at_dir=./-
916         fi
917         ;;
918
919     # Parallel execution.
920     --jobs | -j )
921         at_jobs=0
922         ;;
923     --jobs=* | -j[0-9]* )
924         if test -n "$at_optarg"; then
925           at_jobs=$at_optarg
926         else
927           at_jobs=`expr X$at_option : 'X-j\(.*\)'`
928         fi
929         case $at_jobs in *[!0-9]*)
930           at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
931           as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
932         esac
933         ;;
934
935     # Keywords.
936     --keywords | -k )
937         at_prev=--keywords
938         ;;
939     --keywords=* )
940         at_groups_selected=$at_help_all
941         at_save_IFS=$IFS
942         IFS=,
943         set X $at_optarg
944         shift
945         IFS=$at_save_IFS
946         for at_keyword
947         do
948           at_invert=
949           case $at_keyword in
950           '!'*)
951             at_invert="-v"
952             at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
953             ;;
954           esac
955           # It is on purpose that we match the test group titles too.
956           at_groups_selected=`$as_echo "$at_groups_selected" |
957               grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
958         done
959         # Smash the keywords.
960         at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
961         as_fn_append at_groups "$at_groups_selected$as_nl"
962         ;;
963     --recheck)
964         at_recheck=:
965         ;;
966
967     *=*)
968         at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
969         # Reject names that are not valid shell variable names.
970         case $at_envvar in
971           '' | [0-9]* | *[!_$as_cr_alnum]* )
972             as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
973         esac
974         at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
975         # Export now, but save eval for later and for debug scripts.
976         export $at_envvar
977         as_fn_append at_debug_args " $at_envvar='$at_value'"
978         ;;
979
980      *) $as_echo "$as_me: invalid option: $at_option" >&2
981         $as_echo "Try \`$0 --help' for more information." >&2
982         exit 1
983         ;;
984   esac
985 done
986
987 # Verify our last option didn't require an argument
988 if test -n "$at_prev"; then :
989   as_fn_error $? "\`$at_prev' requires an argument"
990 fi
991
992 # The file containing the suite.
993 at_suite_log=$at_dir/$as_me.log
994
995 # Selected test groups.
996 if test -z "$at_groups$at_recheck"; then
997   at_groups=$at_groups_all
998 else
999   if test -n "$at_recheck" && test -r "$at_suite_log"; then
1000     at_oldfails=`sed -n '
1001       /^Failed tests:$/,/^Skipped tests:$/{
1002         s/^[ ]*\([1-9][0-9]*\):.*/\1/p
1003       }
1004       /^Unexpected passes:$/,/^## Detailed failed tests/{
1005         s/^[ ]*\([1-9][0-9]*\):.*/\1/p
1006       }
1007       /^## Detailed failed tests/q
1008       ' "$at_suite_log"`
1009     as_fn_append at_groups "$at_oldfails$as_nl"
1010   fi
1011   # Sort the tests, removing duplicates.
1012   at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
1013 fi
1014
1015 if test x"$at_color" = xalways \
1016    || { test x"$at_color" = xauto && test -t 1; }; then
1017   at_red=`printf '\033[0;31m'`
1018   at_grn=`printf '\033[0;32m'`
1019   at_lgn=`printf '\033[1;32m'`
1020   at_blu=`printf '\033[1;34m'`
1021   at_std=`printf '\033[m'`
1022 else
1023   at_red= at_grn= at_lgn= at_blu= at_std=
1024 fi
1025
1026 # Help message.
1027 if $at_help_p; then
1028   cat <<_ATEOF || at_write_fail=1
1029 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
1030
1031 Run all the tests, or the selected TESTS, given by numeric ranges, and
1032 save a detailed log file.  Upon failure, create debugging scripts.
1033
1034 Do not change environment variables directly.  Instead, set them via
1035 command line arguments.  Set \`AUTOTEST_PATH' to select the executables
1036 to exercise.  Each relative directory is expanded as build and source
1037 directories relative to the top level of this distribution.
1038 E.g., from within the build directory /tmp/foo-1.0, invoking this:
1039
1040   $ $0 AUTOTEST_PATH=bin
1041
1042 is equivalent to the following, assuming the source directory is /src/foo-1.0:
1043
1044   PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
1045 _ATEOF
1046 cat <<_ATEOF || at_write_fail=1
1047
1048 Operation modes:
1049   -h, --help     print the help message, then exit
1050   -V, --version  print version number, then exit
1051   -c, --clean    remove all the files this test suite might create and exit
1052   -l, --list     describes all the tests, or the selected TESTS
1053 _ATEOF
1054 cat <<_ATEOF || at_write_fail=1
1055
1056 Execution tuning:
1057   -C, --directory=DIR
1058                  change to directory DIR before starting
1059       --color[=never|auto|always]
1060                  enable colored test results on terminal, or always
1061   -j, --jobs[=N]
1062                  Allow N jobs at once; infinite jobs with no arg (default 1)
1063   -k, --keywords=KEYWORDS
1064                  select the tests matching all the comma-separated KEYWORDS
1065                  multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
1066       --recheck  select all tests that failed or passed unexpectedly last time
1067   -e, --errexit  abort as soon as a test fails; implies --debug
1068   -v, --verbose  force more detailed output
1069                  default for debugging scripts
1070   -d, --debug    inhibit clean up and top-level logging
1071                  default for debugging scripts
1072   -x, --trace    enable tests shell tracing
1073 _ATEOF
1074 cat <<_ATEOF || at_write_fail=1
1075
1076 Report bugs to <bug-tar@gnu.org>.
1077 General help using GNU software: <http://www.gnu.org/gethelp/>.
1078 _ATEOF
1079   exit $at_write_fail
1080 fi
1081
1082 # List of tests.
1083 if $at_list_p; then
1084   cat <<_ATEOF || at_write_fail=1
1085 GNU tar 1.27.1 test suite test groups:
1086
1087  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
1088       KEYWORDS
1089
1090 _ATEOF
1091   # Pass an empty line as separator between selected groups and help.
1092   $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
1093     awk 'NF == 1 && FS != ";" {
1094            selected[$ 1] = 1
1095            next
1096          }
1097          /^$/ { FS = ";" }
1098          NF > 0 {
1099            if (selected[$ 1]) {
1100              printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
1101              if ($ 4) {
1102                lmax = 79
1103                indent = "     "
1104                line = indent
1105                len = length (line)
1106                n = split ($ 4, a, " ")
1107                for (i = 1; i <= n; i++) {
1108                  l = length (a[i]) + 1
1109                  if (i > 1 && len + l > lmax) {
1110                    print line
1111                    line = indent " " a[i]
1112                    len = length (line)
1113                  } else {
1114                    line = line " " a[i]
1115                    len += l
1116                  }
1117                }
1118                if (n)
1119                  print line
1120              }
1121            }
1122          }' || at_write_fail=1
1123   exit $at_write_fail
1124 fi
1125 if $at_version_p; then
1126   $as_echo "$as_me (GNU tar 1.27.1)" &&
1127   cat <<\_ATEOF || at_write_fail=1
1128
1129 Copyright (C) 2012 Free Software Foundation, Inc.
1130 This test suite is free software; the Free Software Foundation gives
1131 unlimited permission to copy, distribute and modify it.
1132 _ATEOF
1133   exit $at_write_fail
1134 fi
1135
1136 # Should we print banners?  Yes if more than one test is run.
1137 case $at_groups in #(
1138   *$as_nl* )
1139       at_print_banners=: ;; #(
1140   * ) at_print_banners=false ;;
1141 esac
1142 # Text for banner N, set to a single space once printed.
1143 # Banner 1. testsuite.at:191
1144 # Category starts at test group 5.
1145 at_banner_text_1="Option compatibility"
1146 # Banner 2. testsuite.at:199
1147 # Category starts at test group 11.
1148 at_banner_text_2="The -T option"
1149 # Banner 3. testsuite.at:209
1150 # Category starts at test group 19.
1151 at_banner_text_3="Various options"
1152 # Banner 4. testsuite.at:216
1153 # Category starts at test group 24.
1154 at_banner_text_4="The --same-order option"
1155 # Banner 5. testsuite.at:220
1156 # Category starts at test group 26.
1157 at_banner_text_5="Append"
1158 # Banner 6. testsuite.at:227
1159 # Category starts at test group 31.
1160 at_banner_text_6="Transforms"
1161 # Banner 7. testsuite.at:231
1162 # Category starts at test group 33.
1163 at_banner_text_7="Exclude"
1164 # Banner 8. testsuite.at:250
1165 # Category starts at test group 50.
1166 at_banner_text_8="Deletions"
1167 # Banner 9. testsuite.at:257
1168 # Category starts at test group 55.
1169 at_banner_text_9="Extracting"
1170 # Banner 10. testsuite.at:279
1171 # Category starts at test group 75.
1172 at_banner_text_10="Volume label operations"
1173 # Banner 11. testsuite.at:286
1174 # Category starts at test group 80.
1175 at_banner_text_11="Incremental archives"
1176 # Banner 12. testsuite.at:303
1177 # Category starts at test group 95.
1178 at_banner_text_12="Files removed while archiving"
1179 # Banner 13. testsuite.at:307
1180 # Category starts at test group 97.
1181 at_banner_text_13="Renames"
1182 # Banner 14. testsuite.at:315
1183 # Category starts at test group 103.
1184 at_banner_text_14="Ignore failing reads"
1185 # Banner 15. testsuite.at:318
1186 # Category starts at test group 104.
1187 at_banner_text_15="Link handling"
1188 # Banner 16. testsuite.at:324
1189 # Category starts at test group 108.
1190 at_banner_text_16="Specific archive formats"
1191 # Banner 17. testsuite.at:334
1192 # Category starts at test group 115.
1193 at_banner_text_17="Multivolume archives"
1194 # Banner 18. testsuite.at:344
1195 # Category starts at test group 123.
1196 at_banner_text_18="Owner and Groups"
1197 # Banner 19. testsuite.at:347
1198 # Category starts at test group 124.
1199 at_banner_text_19="Sparse files"
1200 # Banner 20. testsuite.at:357
1201 # Category starts at test group 132.
1202 at_banner_text_20="Updates"
1203 # Banner 21. testsuite.at:362
1204 # Category starts at test group 135.
1205 at_banner_text_21="Verifying the archive"
1206 # Banner 22. testsuite.at:365
1207 # Category starts at test group 136.
1208 at_banner_text_22="Volume operations"
1209 # Banner 23. testsuite.at:369
1210 # Category starts at test group 138.
1211 at_banner_text_23=""
1212 # Banner 24. testsuite.at:378
1213 # Category starts at test group 144.
1214 at_banner_text_24="Removing files after archiving"
1215 # Banner 25. testsuite.at:401
1216 # Category starts at test group 165.
1217 at_banner_text_25="Extended attributes"
1218 # Banner 26. testsuite.at:416
1219 # Category starts at test group 175.
1220 at_banner_text_26="Star tests"
1221
1222 # Take any -C into account.
1223 if $at_change_dir ; then
1224   test x != "x$at_dir" && cd "$at_dir" \
1225     || as_fn_error $? "unable to change directory"
1226   at_dir=`pwd`
1227 fi
1228
1229 # Load the config files for any default variable assignments.
1230 for at_file in atconfig atlocal
1231 do
1232   test -r $at_file || continue
1233   . ./$at_file || as_fn_error $? "invalid content: $at_file"
1234 done
1235
1236 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1237 : "${at_top_build_prefix=$at_top_builddir}"
1238
1239 # Perform any assignments requested during argument parsing.
1240 eval "$at_debug_args"
1241
1242 # atconfig delivers names relative to the directory the test suite is
1243 # in, but the groups themselves are run in testsuite-dir/group-dir.
1244 if test -n "$at_top_srcdir"; then
1245   builddir=../..
1246   for at_dir_var in srcdir top_srcdir top_build_prefix
1247   do
1248     eval at_val=\$at_$at_dir_var
1249     case $at_val in
1250       [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1251       *) at_prefix=../../ ;;
1252     esac
1253     eval "$at_dir_var=\$at_prefix\$at_val"
1254   done
1255 fi
1256
1257 ## -------------------- ##
1258 ## Directory structure. ##
1259 ## -------------------- ##
1260
1261 # This is the set of directories and files used by this script
1262 # (non-literals are capitalized):
1263 #
1264 # TESTSUITE         - the testsuite
1265 # TESTSUITE.log     - summarizes the complete testsuite run
1266 # TESTSUITE.dir/    - created during a run, remains after -d or failed test
1267 # + at-groups/      - during a run: status of all groups in run
1268 # | + NNN/          - during a run: meta-data about test group NNN
1269 # | | + check-line  - location (source file and line) of current AT_CHECK
1270 # | | + status      - exit status of current AT_CHECK
1271 # | | + stdout      - stdout of current AT_CHECK
1272 # | | + stder1      - stderr, including trace
1273 # | | + stderr      - stderr, with trace filtered out
1274 # | | + test-source - portion of testsuite that defines group
1275 # | | + times       - timestamps for computing duration
1276 # | | + pass        - created if group passed
1277 # | | + xpass       - created if group xpassed
1278 # | | + fail        - created if group failed
1279 # | | + xfail       - created if group xfailed
1280 # | | + skip        - created if group skipped
1281 # + at-stop         - during a run: end the run if this file exists
1282 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1283 # + 0..NNN/         - created for each group NNN, remains after -d or failed test
1284 # | + TESTSUITE.log - summarizes the group results
1285 # | + ...           - files created during the group
1286
1287 # The directory the whole suite works in.
1288 # Should be absolute to let the user `cd' at will.
1289 at_suite_dir=$at_dir/$as_me.dir
1290 # The file containing the suite ($at_dir might have changed since earlier).
1291 at_suite_log=$at_dir/$as_me.log
1292 # The directory containing helper files per test group.
1293 at_helper_dir=$at_suite_dir/at-groups
1294 # Stop file: if it exists, do not start new jobs.
1295 at_stop_file=$at_suite_dir/at-stop
1296 # The fifo used for the job dispatcher.
1297 at_job_fifo=$at_suite_dir/at-job-fifo
1298
1299 if $at_clean; then
1300   test -d "$at_suite_dir" &&
1301     find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1302   rm -f -r "$at_suite_dir" "$at_suite_log"
1303   exit $?
1304 fi
1305
1306 # Don't take risks: use only absolute directories in PATH.
1307 #
1308 # For stand-alone test suites (ie. atconfig was not found),
1309 # AUTOTEST_PATH is relative to `.'.
1310 #
1311 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1312 # of the package.  Then expand it into build/src parts, since users
1313 # may create executables in both places.
1314 AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1315 at_path=
1316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1317 for as_dir in $AUTOTEST_PATH $PATH
1318 do
1319   IFS=$as_save_IFS
1320   test -z "$as_dir" && as_dir=.
1321     test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1322 case $as_dir in
1323   [\\/]* | ?:[\\/]* )
1324     as_fn_append at_path "$as_dir"
1325     ;;
1326   * )
1327     if test -z "$at_top_build_prefix"; then
1328       # Stand-alone test suite.
1329       as_fn_append at_path "$as_dir"
1330     else
1331       # Embedded test suite.
1332       as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1333       as_fn_append at_path "$at_top_srcdir/$as_dir"
1334     fi
1335     ;;
1336 esac
1337   done
1338 IFS=$as_save_IFS
1339
1340
1341 # Now build and simplify PATH.
1342 #
1343 # There might be directories that don't exist, but don't redirect
1344 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1345 at_new_path=
1346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1347 for as_dir in $at_path
1348 do
1349   IFS=$as_save_IFS
1350   test -z "$as_dir" && as_dir=.
1351     test -d "$as_dir" || continue
1352 case $as_dir in
1353   [\\/]* | ?:[\\/]* ) ;;
1354   * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1355 esac
1356 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1357   *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1358   $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1359   *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1360 esac
1361   done
1362 IFS=$as_save_IFS
1363
1364 PATH=$at_new_path
1365 export PATH
1366
1367 # Setting up the FDs.
1368
1369
1370
1371 # 5 is the log file.  Not to be overwritten if `-d'.
1372 if $at_debug_p; then
1373   at_suite_log=/dev/null
1374 else
1375   : >"$at_suite_log"
1376 fi
1377 exec 5>>"$at_suite_log"
1378
1379 # Banners and logs.
1380 $as_echo "## -------------------------- ##
1381 ## GNU tar 1.27.1 test suite. ##
1382 ## -------------------------- ##"
1383 {
1384   $as_echo "## -------------------------- ##
1385 ## GNU tar 1.27.1 test suite. ##
1386 ## -------------------------- ##"
1387   echo
1388
1389   $as_echo "$as_me: command line was:"
1390   $as_echo "  \$ $0 $at_cli_args"
1391   echo
1392
1393   # If ChangeLog exists, list a few lines in case it might help determining
1394   # the exact version.
1395   if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1396     $as_echo "## ---------- ##
1397 ## ChangeLog. ##
1398 ## ---------- ##"
1399     echo
1400     sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1401     echo
1402   fi
1403
1404   {
1405 cat <<_ASUNAME
1406 ## --------- ##
1407 ## Platform. ##
1408 ## --------- ##
1409
1410 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1411 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1412 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1413 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1414 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1415
1416 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1417 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1418
1419 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1420 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1421 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1422 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1423 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1424 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1425 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1426
1427 _ASUNAME
1428
1429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1430 for as_dir in $PATH
1431 do
1432   IFS=$as_save_IFS
1433   test -z "$as_dir" && as_dir=.
1434     $as_echo "PATH: $as_dir"
1435   done
1436 IFS=$as_save_IFS
1437
1438 }
1439   echo
1440
1441   # Contents of the config files.
1442   for at_file in atconfig atlocal
1443   do
1444     test -r $at_file || continue
1445     $as_echo "$as_me: $at_file:"
1446     sed 's/^/| /' $at_file
1447     echo
1448   done
1449 } >&5
1450
1451
1452 ## ------------------------- ##
1453 ## Autotest shell functions. ##
1454 ## ------------------------- ##
1455
1456 # at_fn_banner NUMBER
1457 # -------------------
1458 # Output banner NUMBER, provided the testsuite is running multiple groups and
1459 # this particular banner has not yet been printed.
1460 at_fn_banner ()
1461 {
1462   $at_print_banners || return 0
1463   eval at_banner_text=\$at_banner_text_$1
1464   test "x$at_banner_text" = "x " && return 0
1465   eval "at_banner_text_$1=\" \""
1466   if test -z "$at_banner_text"; then
1467     $at_first || echo
1468   else
1469     $as_echo "$as_nl$at_banner_text$as_nl"
1470   fi
1471 } # at_fn_banner
1472
1473 # at_fn_check_prepare_notrace REASON LINE
1474 # ---------------------------------------
1475 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1476 # command; REASON is the reason for disabling tracing.
1477 at_fn_check_prepare_notrace ()
1478 {
1479   $at_trace_echo "Not enabling shell tracing (command contains $1)"
1480   $as_echo "$2" >"$at_check_line_file"
1481   at_check_trace=: at_check_filter=:
1482   : >"$at_stdout"; : >"$at_stderr"
1483 }
1484
1485 # at_fn_check_prepare_trace LINE
1486 # ------------------------------
1487 # Perform AT_CHECK preparations for the command at LINE for a traceable
1488 # command.
1489 at_fn_check_prepare_trace ()
1490 {
1491   $as_echo "$1" >"$at_check_line_file"
1492   at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1493   : >"$at_stdout"; : >"$at_stderr"
1494 }
1495
1496 # at_fn_check_prepare_dynamic COMMAND LINE
1497 # ----------------------------------------
1498 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1499 # preparation function.
1500 at_fn_check_prepare_dynamic ()
1501 {
1502   case $1 in
1503     *$as_nl*)
1504       at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1505     *)
1506       at_fn_check_prepare_trace "$2" ;;
1507   esac
1508 }
1509
1510 # at_fn_filter_trace
1511 # ------------------
1512 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1513 # them to stderr.
1514 at_fn_filter_trace ()
1515 {
1516   mv "$at_stderr" "$at_stder1"
1517   grep '^ *+' "$at_stder1" >&2
1518   grep -v '^ *+' "$at_stder1" >"$at_stderr"
1519 }
1520
1521 # at_fn_log_failure FILE-LIST
1522 # ---------------------------
1523 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1524 # with a failure exit code.
1525 at_fn_log_failure ()
1526 {
1527   for file
1528     do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1529   echo 1 > "$at_status_file"
1530   exit 1
1531 }
1532
1533 # at_fn_check_skip EXIT-CODE LINE
1534 # -------------------------------
1535 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1536 # the test group subshell with that same exit code. Use LINE in any report
1537 # about test failure.
1538 at_fn_check_skip ()
1539 {
1540   case $1 in
1541     99) echo 99 > "$at_status_file"; at_failed=:
1542         $as_echo "$2: hard failure"; exit 99;;
1543     77) echo 77 > "$at_status_file"; exit 77;;
1544   esac
1545 }
1546
1547 # at_fn_check_status EXPECTED EXIT-CODE LINE
1548 # ------------------------------------------
1549 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1550 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1551 # exit code; if it is anything else print an error message referring to LINE,
1552 # and fail the test.
1553 at_fn_check_status ()
1554 {
1555   case $2 in
1556     $1 ) ;;
1557     77) echo 77 > "$at_status_file"; exit 77;;
1558     99) echo 99 > "$at_status_file"; at_failed=:
1559         $as_echo "$3: hard failure"; exit 99;;
1560     *) $as_echo "$3: exit code was $2, expected $1"
1561       at_failed=:;;
1562   esac
1563 }
1564
1565 # at_fn_diff_devnull FILE
1566 # -----------------------
1567 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1568 # invocations.
1569 at_fn_diff_devnull ()
1570 {
1571   test -s "$1" || return 0
1572   $at_diff "$at_devnull" "$1"
1573 }
1574
1575 # at_fn_test NUMBER
1576 # -----------------
1577 # Parse out test NUMBER from the tail of this file.
1578 at_fn_test ()
1579 {
1580   eval at_sed=\$at_sed$1
1581   sed "$at_sed" "$at_myself" > "$at_test_source"
1582 }
1583
1584 # at_fn_create_debugging_script
1585 # -----------------------------
1586 # Create the debugging script $at_group_dir/run which will reproduce the
1587 # current test group.
1588 at_fn_create_debugging_script ()
1589 {
1590   {
1591     echo "#! /bin/sh" &&
1592     echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1593     $as_echo "cd '$at_dir'" &&
1594     $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1595     echo 'exit 1'
1596   } >"$at_group_dir/run" &&
1597   chmod +x "$at_group_dir/run"
1598 }
1599
1600 ## -------------------------------- ##
1601 ## End of autotest shell functions. ##
1602 ## -------------------------------- ##
1603 {
1604   $as_echo "## ---------------- ##
1605 ## Tested programs. ##
1606 ## ---------------- ##"
1607   echo
1608 } >&5
1609
1610 # Report what programs are being tested.
1611 for at_program in : $at_tested
1612 do
1613   test "$at_program" = : && continue
1614   case $at_program in
1615     [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
1616     * )
1617     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1618 for as_dir in $PATH
1619 do
1620   IFS=$as_save_IFS
1621   test -z "$as_dir" && as_dir=.
1622     test -f "$as_dir/$at_program" && break
1623   done
1624 IFS=$as_save_IFS
1625
1626     at_program_=$as_dir/$at_program ;;
1627   esac
1628   if test -f "$at_program_"; then
1629     {
1630       $as_echo "$at_srcdir/testsuite.at:180: $at_program_ --version"
1631       "$at_program_" --version </dev/null
1632       echo
1633     } >&5 2>&1
1634   else
1635     as_fn_error $? "cannot find $at_program" "$LINENO" 5
1636   fi
1637 done
1638
1639 {
1640   $as_echo "## ------------------ ##
1641 ## Running the tests. ##
1642 ## ------------------ ##"
1643 } >&5
1644
1645 at_start_date=`date`
1646 at_start_time=`date +%s 2>/dev/null`
1647 $as_echo "$as_me: starting at: $at_start_date" >&5
1648
1649 # Create the master directory if it doesn't already exist.
1650 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1651   as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1652
1653 # Can we diff with `/dev/null'?  DU 5.0 refuses.
1654 if diff /dev/null /dev/null >/dev/null 2>&1; then
1655   at_devnull=/dev/null
1656 else
1657   at_devnull=$at_suite_dir/devnull
1658   >"$at_devnull"
1659 fi
1660
1661 # Use `diff -u' when possible.
1662 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1663 then
1664   at_diff='diff -u'
1665 else
1666   at_diff=diff
1667 fi
1668
1669 # Get the last needed group.
1670 for at_group in : $at_groups; do :; done
1671
1672 # Extract the start and end lines of each test group at the tail
1673 # of this file
1674 awk '
1675 BEGIN { FS="\a" }
1676 /^#AT_START_/ {
1677   start = NR
1678 }
1679 /^#AT_STOP_/ {
1680   test = substr ($ 0, 10)
1681   print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1682   if (test == "'"$at_group"'") exit
1683 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1684 . "$at_suite_dir/at-source-lines" ||
1685   as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1686 rm -f "$at_suite_dir/at-source-lines"
1687
1688 # Set number of jobs for `-j'; avoid more jobs than test groups.
1689 set X $at_groups; shift; at_max_jobs=$#
1690 if test $at_max_jobs -eq 0; then
1691   at_jobs=1
1692 fi
1693 if test $at_jobs -ne 1 &&
1694    { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1695   at_jobs=$at_max_jobs
1696 fi
1697
1698 # If parallel mode, don't output banners, don't split summary lines.
1699 if test $at_jobs -ne 1; then
1700   at_print_banners=false
1701   at_quiet=:
1702 fi
1703
1704 # Set up helper dirs.
1705 rm -rf "$at_helper_dir" &&
1706 mkdir "$at_helper_dir" &&
1707 cd "$at_helper_dir" &&
1708 { test -z "$at_groups" || mkdir $at_groups; } ||
1709 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1710
1711 # Functions for running a test group.  We leave the actual
1712 # test group execution outside of a shell function in order
1713 # to avoid hitting zsh 4.x exit status bugs.
1714
1715 # at_fn_group_prepare
1716 # -------------------
1717 # Prepare for running a test group.
1718 at_fn_group_prepare ()
1719 {
1720   # The directory for additional per-group helper files.
1721   at_job_dir=$at_helper_dir/$at_group
1722   # The file containing the location of the last AT_CHECK.
1723   at_check_line_file=$at_job_dir/check-line
1724   # The file containing the exit status of the last command.
1725   at_status_file=$at_job_dir/status
1726   # The files containing the output of the tested commands.
1727   at_stdout=$at_job_dir/stdout
1728   at_stder1=$at_job_dir/stder1
1729   at_stderr=$at_job_dir/stderr
1730   # The file containing the code for a test group.
1731   at_test_source=$at_job_dir/test-source
1732   # The file containing dates.
1733   at_times_file=$at_job_dir/times
1734
1735   # Be sure to come back to the top test directory.
1736   cd "$at_suite_dir"
1737
1738   # Clearly separate the test groups when verbose.
1739   $at_first || $at_verbose echo
1740
1741   at_group_normalized=$at_group
1742
1743   eval 'while :; do
1744     case $at_group_normalized in #(
1745     '"$at_format"'*) break;;
1746     esac
1747     at_group_normalized=0$at_group_normalized
1748   done'
1749
1750
1751   # Create a fresh directory for the next test group, and enter.
1752   # If one already exists, the user may have invoked ./run from
1753   # within that directory; we remove the contents, but not the
1754   # directory itself, so that we aren't pulling the rug out from
1755   # under the shell's notion of the current directory.
1756   at_group_dir=$at_suite_dir/$at_group_normalized
1757   at_group_log=$at_group_dir/$as_me.log
1758   if test -d "$at_group_dir"; then
1759   find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1760   rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1761 fi ||
1762     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1763 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1764   # Be tolerant if the above `rm' was not able to remove the directory.
1765   as_dir="$at_group_dir"; as_fn_mkdir_p
1766
1767   echo 0 > "$at_status_file"
1768
1769   # In verbose mode, append to the log file *and* show on
1770   # the standard output; in quiet mode only write to the log.
1771   if test -z "$at_verbose"; then
1772     at_tee_pipe='tee -a "$at_group_log"'
1773   else
1774     at_tee_pipe='cat >> "$at_group_log"'
1775   fi
1776 }
1777
1778 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1779 # -------------------------------------------------
1780 # Declare the test group ORDINAL, located at LINE with group description DESC,
1781 # and residing under BANNER. Use PAD to align the status column.
1782 at_fn_group_banner ()
1783 {
1784   at_setup_line="$2"
1785   test -n "$5" && at_fn_banner $5
1786   at_desc="$3"
1787   case $1 in
1788     [0-9])      at_desc_line="  $1: ";;
1789     [0-9][0-9]) at_desc_line=" $1: " ;;
1790     *)          at_desc_line="$1: "  ;;
1791   esac
1792   as_fn_append at_desc_line "$3$4"
1793   $at_quiet $as_echo_n "$at_desc_line"
1794   echo "#                             -*- compilation -*-" >> "$at_group_log"
1795 }
1796
1797 # at_fn_group_postprocess
1798 # -----------------------
1799 # Perform cleanup after running a test group.
1800 at_fn_group_postprocess ()
1801 {
1802   # Be sure to come back to the suite directory, in particular
1803   # since below we might `rm' the group directory we are in currently.
1804   cd "$at_suite_dir"
1805
1806   if test ! -f "$at_check_line_file"; then
1807     sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1808       A failure happened in a test group before any test could be
1809       run. This means that test suite is improperly designed.  Please
1810       report this failure to <bug-tar@gnu.org>.
1811 _ATEOF
1812     $as_echo "$at_setup_line" >"$at_check_line_file"
1813     at_status=99
1814   fi
1815   $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1816   $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1817   case $at_xfail:$at_status in
1818     yes:0)
1819         at_msg="UNEXPECTED PASS"
1820         at_res=xpass
1821         at_errexit=$at_errexit_p
1822         at_color=$at_red
1823         ;;
1824     no:0)
1825         at_msg="ok"
1826         at_res=pass
1827         at_errexit=false
1828         at_color=$at_grn
1829         ;;
1830     *:77)
1831         at_msg='skipped ('`cat "$at_check_line_file"`')'
1832         at_res=skip
1833         at_errexit=false
1834         at_color=$at_blu
1835         ;;
1836     no:* | *:99)
1837         at_msg='FAILED ('`cat "$at_check_line_file"`')'
1838         at_res=fail
1839         at_errexit=$at_errexit_p
1840         at_color=$at_red
1841         ;;
1842     yes:*)
1843         at_msg='expected failure ('`cat "$at_check_line_file"`')'
1844         at_res=xfail
1845         at_errexit=false
1846         at_color=$at_lgn
1847         ;;
1848   esac
1849   echo "$at_res" > "$at_job_dir/$at_res"
1850   # In parallel mode, output the summary line only afterwards.
1851   if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1852     $as_echo "$at_desc_line $at_color$at_msg$at_std"
1853   else
1854     # Make sure there is a separator even with long titles.
1855     $as_echo " $at_color$at_msg$at_std"
1856   fi
1857   at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1858   case $at_status in
1859     0|77)
1860       # $at_times_file is only available if the group succeeded.
1861       # We're not including the group log, so the success message
1862       # is written in the global log separately.  But we also
1863       # write to the group log in case they're using -d.
1864       if test -f "$at_times_file"; then
1865         at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
1866         rm -f "$at_times_file"
1867       fi
1868       $as_echo "$at_log_msg" >> "$at_group_log"
1869       $as_echo "$at_log_msg" >&5
1870
1871       # Cleanup the group directory, unless the user wants the files
1872       # or the success was unexpected.
1873       if $at_debug_p || test $at_res = xpass; then
1874         at_fn_create_debugging_script
1875         if test $at_res = xpass && $at_errexit; then
1876           echo stop > "$at_stop_file"
1877         fi
1878       else
1879         if test -d "$at_group_dir"; then
1880           find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1881           rm -fr "$at_group_dir"
1882         fi
1883         rm -f "$at_test_source"
1884       fi
1885       ;;
1886     *)
1887       # Upon failure, include the log into the testsuite's global
1888       # log.  The failure message is written in the group log.  It
1889       # is later included in the global log.
1890       $as_echo "$at_log_msg" >> "$at_group_log"
1891
1892       # Upon failure, keep the group directory for autopsy, and create
1893       # the debugging script.  With -e, do not start any further tests.
1894       at_fn_create_debugging_script
1895       if $at_errexit; then
1896         echo stop > "$at_stop_file"
1897       fi
1898       ;;
1899   esac
1900 }
1901
1902
1903 ## ------------ ##
1904 ## Driver loop. ##
1905 ## ------------ ##
1906
1907
1908 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1909   set +b
1910   at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1911 else
1912   at_job_control_on=: at_job_control_off=: at_job_group=
1913 fi
1914
1915 for at_signal in 1 2 15; do
1916   trap 'set +x; set +e
1917         $at_job_control_off
1918         at_signal='"$at_signal"'
1919         echo stop > "$at_stop_file"
1920         trap "" $at_signal
1921         at_pgids=
1922         for at_pgid in `jobs -p 2>/dev/null`; do
1923           at_pgids="$at_pgids $at_job_group$at_pgid"
1924         done
1925         test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1926         wait
1927         if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1928           echo >&2
1929         fi
1930         at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1931         set x $at_signame
1932         test 0 -gt 2 && at_signame=$at_signal
1933         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1934 $as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1935         as_fn_arith 128 + $at_signal && exit_status=$as_val
1936         as_fn_exit $exit_status' $at_signal
1937 done
1938
1939 rm -f "$at_stop_file"
1940 at_first=:
1941
1942 if test $at_jobs -ne 1 &&
1943      rm -f "$at_job_fifo" &&
1944      test -n "$at_job_group" &&
1945      ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1946 then
1947   # FIFO job dispatcher.
1948
1949   trap 'at_pids=
1950         for at_pid in `jobs -p`; do
1951           at_pids="$at_pids $at_job_group$at_pid"
1952         done
1953         if test -n "$at_pids"; then
1954           at_sig=TSTP
1955           test "${TMOUT+set}" = set && at_sig=STOP
1956           kill -$at_sig $at_pids 2>/dev/null
1957         fi
1958         kill -STOP $$
1959         test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1960
1961   echo
1962   # Turn jobs into a list of numbers, starting from 1.
1963   at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
1964
1965   set X $at_joblist
1966   shift
1967   for at_group in $at_groups; do
1968     $at_job_control_on 2>/dev/null
1969     (
1970       # Start one test group.
1971       $at_job_control_off
1972       if $at_first; then
1973         exec 7>"$at_job_fifo"
1974       else
1975         exec 6<&-
1976       fi
1977       trap 'set +x; set +e
1978             trap "" PIPE
1979             echo stop > "$at_stop_file"
1980             echo >&7
1981             as_fn_exit 141' PIPE
1982       at_fn_group_prepare
1983       if cd "$at_group_dir" &&
1984          at_fn_test $at_group &&
1985          . "$at_test_source"
1986       then :; else
1987         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1988 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
1989         at_failed=:
1990       fi
1991       at_fn_group_postprocess
1992       echo >&7
1993     ) &
1994     $at_job_control_off
1995     if $at_first; then
1996       at_first=false
1997       exec 6<"$at_job_fifo" 7>"$at_job_fifo"
1998     fi
1999     shift # Consume one token.
2000     if test $# -gt 0; then :; else
2001       read at_token <&6 || break
2002       set x $*
2003     fi
2004     test -f "$at_stop_file" && break
2005   done
2006   exec 7>&-
2007   # Read back the remaining ($at_jobs - 1) tokens.
2008   set X $at_joblist
2009   shift
2010   if test $# -gt 0; then
2011     shift
2012     for at_job
2013     do
2014       read at_token
2015     done <&6
2016   fi
2017   exec 6<&-
2018   wait
2019 else
2020   # Run serially, avoid forks and other potential surprises.
2021   for at_group in $at_groups; do
2022     at_fn_group_prepare
2023     if cd "$at_group_dir" &&
2024        at_fn_test $at_group &&
2025        . "$at_test_source"; then :; else
2026       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
2027 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
2028       at_failed=:
2029     fi
2030     at_fn_group_postprocess
2031     test -f "$at_stop_file" && break
2032     at_first=false
2033   done
2034 fi
2035
2036 # Wrap up the test suite with summary statistics.
2037 cd "$at_helper_dir"
2038
2039 # Use ?..???? when the list must remain sorted, the faster * otherwise.
2040 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
2041 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
2042 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
2043 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
2044                  echo $f; done | sed '/?/d; s,/xpass,,'`
2045 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
2046                 echo $f; done | sed '/?/d; s,/fail,,'`
2047
2048 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
2049 shift; at_group_count=$#
2050 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
2051 set X $at_xfail_list; shift; at_xfail_count=$#
2052 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
2053 set X $at_skip_list; shift; at_skip_count=$#
2054
2055 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
2056 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
2057 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
2058
2059 # Back to the top directory.
2060 cd "$at_dir"
2061 rm -rf "$at_helper_dir"
2062
2063 # Compute the duration of the suite.
2064 at_stop_date=`date`
2065 at_stop_time=`date +%s 2>/dev/null`
2066 $as_echo "$as_me: ending at: $at_stop_date" >&5
2067 case $at_start_time,$at_stop_time in
2068   [0-9]*,[0-9]*)
2069     as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
2070     as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
2071     as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
2072     as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
2073     as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
2074     at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
2075     $as_echo "$as_me: test suite duration: $at_duration" >&5
2076     ;;
2077 esac
2078
2079 echo
2080 $as_echo "## ------------- ##
2081 ## Test results. ##
2082 ## ------------- ##"
2083 echo
2084 {
2085   echo
2086   $as_echo "## ------------- ##
2087 ## Test results. ##
2088 ## ------------- ##"
2089   echo
2090 } >&5
2091
2092 if test $at_run_count = 1; then
2093   at_result="1 test"
2094   at_were=was
2095 else
2096   at_result="$at_run_count tests"
2097   at_were=were
2098 fi
2099 if $at_errexit_p && test $at_unexpected_count != 0; then
2100   if test $at_xpass_count = 1; then
2101     at_result="$at_result $at_were run, one passed"
2102   else
2103     at_result="$at_result $at_were run, one failed"
2104   fi
2105   at_result="$at_result unexpectedly and inhibited subsequent tests."
2106   at_color=$at_red
2107 else
2108   # Don't you just love exponential explosion of the number of cases?
2109   at_color=$at_red
2110   case $at_xpass_count:$at_fail_count:$at_xfail_count in
2111     # So far, so good.
2112     0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
2113     0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
2114
2115     # Some unexpected failures
2116     0:*:0) at_result="$at_result $at_were run,
2117 $at_fail_count failed unexpectedly." ;;
2118
2119     # Some failures, both expected and unexpected
2120     0:*:1) at_result="$at_result $at_were run,
2121 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2122     0:*:*) at_result="$at_result $at_were run,
2123 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2124
2125     # No unexpected failures, but some xpasses
2126     *:0:*) at_result="$at_result $at_were run,
2127 $at_xpass_count passed unexpectedly." ;;
2128
2129     # No expected failures, but failures and xpasses
2130     *:1:0) at_result="$at_result $at_were run,
2131 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
2132     *:*:0) at_result="$at_result $at_were run,
2133 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
2134
2135     # All of them.
2136     *:*:1) at_result="$at_result $at_were run,
2137 $at_xpass_count passed unexpectedly,
2138 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2139     *:*:*) at_result="$at_result $at_were run,
2140 $at_xpass_count passed unexpectedly,
2141 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2142   esac
2143
2144   if test $at_skip_count = 0 && test $at_run_count -gt 1; then
2145     at_result="All $at_result"
2146   fi
2147 fi
2148
2149 # Now put skips in the mix.
2150 case $at_skip_count in
2151   0) ;;
2152   1) at_result="$at_result
2153 1 test was skipped." ;;
2154   *) at_result="$at_result
2155 $at_skip_count tests were skipped." ;;
2156 esac
2157
2158 if test $at_unexpected_count = 0; then
2159   echo "$at_color$at_result$at_std"
2160   echo "$at_result" >&5
2161 else
2162   echo "${at_color}ERROR: $at_result$at_std" >&2
2163   echo "ERROR: $at_result" >&5
2164   {
2165     echo
2166     $as_echo "## ------------------------ ##
2167 ## Summary of the failures. ##
2168 ## ------------------------ ##"
2169
2170     # Summary of failed and skipped tests.
2171     if test $at_fail_count != 0; then
2172       echo "Failed tests:"
2173       $SHELL "$at_myself" $at_fail_list --list
2174       echo
2175     fi
2176     if test $at_skip_count != 0; then
2177       echo "Skipped tests:"
2178       $SHELL "$at_myself" $at_skip_list --list
2179       echo
2180     fi
2181     if test $at_xpass_count != 0; then
2182       echo "Unexpected passes:"
2183       $SHELL "$at_myself" $at_xpass_list --list
2184       echo
2185     fi
2186     if test $at_fail_count != 0; then
2187       $as_echo "## ---------------------- ##
2188 ## Detailed failed tests. ##
2189 ## ---------------------- ##"
2190       echo
2191       for at_group in $at_fail_list
2192       do
2193         at_group_normalized=$at_group
2194
2195   eval 'while :; do
2196     case $at_group_normalized in #(
2197     '"$at_format"'*) break;;
2198     esac
2199     at_group_normalized=0$at_group_normalized
2200   done'
2201
2202         cat "$at_suite_dir/$at_group_normalized/$as_me.log"
2203         echo
2204       done
2205       echo
2206     fi
2207     if test -n "$at_top_srcdir"; then
2208       sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2209 ## ${at_top_build_prefix}config.log ##
2210 _ASBOX
2211       sed 's/^/| /' ${at_top_build_prefix}config.log
2212       echo
2213     fi
2214   } >&5
2215
2216   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2217 ## $as_me.log was created. ##
2218 _ASBOX
2219
2220   echo
2221   if $at_debug_p; then
2222     at_msg='per-test log files'
2223   else
2224     at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
2225   fi
2226   $as_echo "Please send $at_msg and all information you think might help:
2227
2228    To: <bug-tar@gnu.org>
2229    Subject: [GNU tar 1.27.1] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
2230
2231 You may investigate any problem if you feel able to do so, in which
2232 case the test suite provides a good starting point.  Its output may
2233 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2234 "
2235   exit 1
2236 fi
2237
2238 exit 0
2239
2240 ## ------------- ##
2241 ## Actual tests. ##
2242 ## ------------- ##
2243 #AT_START_1
2244 at_fn_group_banner 1 'version.at:19' \
2245   "tar version" "                                    "
2246 at_xfail=no
2247 (
2248   $as_echo "1. $at_setup_line: testing $at_desc ..."
2249   $at_traceon
2250
2251
2252 { set +x
2253 $as_echo "$at_srcdir/version.at:21: tar --version | sed 1q"
2254 at_fn_check_prepare_notrace 'a shell pipeline' "version.at:21"
2255 ( $at_check_trace; tar --version | sed 1q
2256 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2257 at_status=$? at_failed=false
2258 $at_check_filter
2259 at_fn_diff_devnull "$at_stderr" || at_failed=:
2260 echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.27.1
2261 " | \
2262   $at_diff - "$at_stdout" || at_failed=:
2263 at_fn_check_status 0 $at_status "$at_srcdir/version.at:21"
2264 if $at_failed; then :
2265   cat >$XFAILFILE <<'_EOT'
2266
2267 ==============================================================
2268 WARNING: Not using the proper version, *all* checks dubious...
2269 ==============================================================
2270 _EOT
2271
2272 else
2273   rm -f $XFAILFILE
2274 fi
2275 $at_failed && at_fn_log_failure
2276 $at_traceon; }
2277
2278
2279   set +x
2280   $at_times_p && times >"$at_times_file"
2281 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2282 read at_status <"$at_status_file"
2283 #AT_STOP_1
2284 #AT_START_2
2285 at_fn_group_banner 2 'pipe.at:29' \
2286   "decompressing from stdin" "                       "
2287 at_xfail=no
2288       test -f $XFAILFILE && at_xfail=yes
2289 (
2290   $as_echo "2. $at_setup_line: testing $at_desc ..."
2291   $at_traceon
2292
2293
2294
2295
2296
2297
2298   { set +x
2299 $as_echo "$at_srcdir/pipe.at:33:
2300 mkdir v7
2301 (cd v7
2302 TEST_TAR_FORMAT=v7
2303 export TEST_TAR_FORMAT
2304 TAR_OPTIONS=\"-H v7\"
2305 export TAR_OPTIONS
2306 rm -rf *
2307
2308
2309 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2310
2311
2312 mkdir directory
2313 genfile --length 10240 --pattern zeros --file directory/file1
2314 genfile --length 13 --file directory/file2
2315 tar cf archive directory
2316 mv directory orig
2317 cat archive | tar xfv - --warning=no-timestamp | sort
2318 echo \"separator\"
2319 cmp orig/file1 directory/file1
2320 echo \"separator\"
2321 cmp orig/file2 directory/file2)"
2322 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2323 ( $at_check_trace;
2324 mkdir v7
2325 (cd v7
2326 TEST_TAR_FORMAT=v7
2327 export TEST_TAR_FORMAT
2328 TAR_OPTIONS="-H v7"
2329 export TAR_OPTIONS
2330 rm -rf *
2331
2332
2333 test -z "`sort < /dev/null 2>&1`" || exit 77
2334
2335
2336 mkdir directory
2337 genfile --length 10240 --pattern zeros --file directory/file1
2338 genfile --length 13 --file directory/file2
2339 tar cf archive directory
2340 mv directory orig
2341 cat archive | tar xfv - --warning=no-timestamp | sort
2342 echo "separator"
2343 cmp orig/file1 directory/file1
2344 echo "separator"
2345 cmp orig/file2 directory/file2)
2346 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2347 at_status=$? at_failed=false
2348 $at_check_filter
2349 at_fn_diff_devnull "$at_stderr" || at_failed=:
2350 echo >>"$at_stdout"; $as_echo "directory/
2351 directory/file1
2352 directory/file2
2353 separator
2354 separator
2355 " | \
2356   $at_diff - "$at_stdout" || at_failed=:
2357 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2358 $at_failed && at_fn_log_failure
2359 $at_traceon; }
2360
2361               { set +x
2362 $as_echo "$at_srcdir/pipe.at:33:
2363 mkdir oldgnu
2364 (cd oldgnu
2365 TEST_TAR_FORMAT=oldgnu
2366 export TEST_TAR_FORMAT
2367 TAR_OPTIONS=\"-H oldgnu\"
2368 export TAR_OPTIONS
2369 rm -rf *
2370
2371
2372 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2373
2374
2375 mkdir directory
2376 genfile --length 10240 --pattern zeros --file directory/file1
2377 genfile --length 13 --file directory/file2
2378 tar cf archive directory
2379 mv directory orig
2380 cat archive | tar xfv - --warning=no-timestamp | sort
2381 echo \"separator\"
2382 cmp orig/file1 directory/file1
2383 echo \"separator\"
2384 cmp orig/file2 directory/file2)"
2385 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2386 ( $at_check_trace;
2387 mkdir oldgnu
2388 (cd oldgnu
2389 TEST_TAR_FORMAT=oldgnu
2390 export TEST_TAR_FORMAT
2391 TAR_OPTIONS="-H oldgnu"
2392 export TAR_OPTIONS
2393 rm -rf *
2394
2395
2396 test -z "`sort < /dev/null 2>&1`" || exit 77
2397
2398
2399 mkdir directory
2400 genfile --length 10240 --pattern zeros --file directory/file1
2401 genfile --length 13 --file directory/file2
2402 tar cf archive directory
2403 mv directory orig
2404 cat archive | tar xfv - --warning=no-timestamp | sort
2405 echo "separator"
2406 cmp orig/file1 directory/file1
2407 echo "separator"
2408 cmp orig/file2 directory/file2)
2409 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2410 at_status=$? at_failed=false
2411 $at_check_filter
2412 at_fn_diff_devnull "$at_stderr" || at_failed=:
2413 echo >>"$at_stdout"; $as_echo "directory/
2414 directory/file1
2415 directory/file2
2416 separator
2417 separator
2418 " | \
2419   $at_diff - "$at_stdout" || at_failed=:
2420 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2421 $at_failed && at_fn_log_failure
2422 $at_traceon; }
2423
2424               { set +x
2425 $as_echo "$at_srcdir/pipe.at:33:
2426 mkdir ustar
2427 (cd ustar
2428 TEST_TAR_FORMAT=ustar
2429 export TEST_TAR_FORMAT
2430 TAR_OPTIONS=\"-H ustar\"
2431 export TAR_OPTIONS
2432 rm -rf *
2433
2434
2435 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2436
2437
2438 mkdir directory
2439 genfile --length 10240 --pattern zeros --file directory/file1
2440 genfile --length 13 --file directory/file2
2441 tar cf archive directory
2442 mv directory orig
2443 cat archive | tar xfv - --warning=no-timestamp | sort
2444 echo \"separator\"
2445 cmp orig/file1 directory/file1
2446 echo \"separator\"
2447 cmp orig/file2 directory/file2)"
2448 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2449 ( $at_check_trace;
2450 mkdir ustar
2451 (cd ustar
2452 TEST_TAR_FORMAT=ustar
2453 export TEST_TAR_FORMAT
2454 TAR_OPTIONS="-H ustar"
2455 export TAR_OPTIONS
2456 rm -rf *
2457
2458
2459 test -z "`sort < /dev/null 2>&1`" || exit 77
2460
2461
2462 mkdir directory
2463 genfile --length 10240 --pattern zeros --file directory/file1
2464 genfile --length 13 --file directory/file2
2465 tar cf archive directory
2466 mv directory orig
2467 cat archive | tar xfv - --warning=no-timestamp | sort
2468 echo "separator"
2469 cmp orig/file1 directory/file1
2470 echo "separator"
2471 cmp orig/file2 directory/file2)
2472 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2473 at_status=$? at_failed=false
2474 $at_check_filter
2475 at_fn_diff_devnull "$at_stderr" || at_failed=:
2476 echo >>"$at_stdout"; $as_echo "directory/
2477 directory/file1
2478 directory/file2
2479 separator
2480 separator
2481 " | \
2482   $at_diff - "$at_stdout" || at_failed=:
2483 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2484 $at_failed && at_fn_log_failure
2485 $at_traceon; }
2486
2487               { set +x
2488 $as_echo "$at_srcdir/pipe.at:33:
2489 mkdir posix
2490 (cd posix
2491 TEST_TAR_FORMAT=posix
2492 export TEST_TAR_FORMAT
2493 TAR_OPTIONS=\"-H posix\"
2494 export TAR_OPTIONS
2495 rm -rf *
2496
2497
2498 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2499
2500
2501 mkdir directory
2502 genfile --length 10240 --pattern zeros --file directory/file1
2503 genfile --length 13 --file directory/file2
2504 tar cf archive directory
2505 mv directory orig
2506 cat archive | tar xfv - --warning=no-timestamp | sort
2507 echo \"separator\"
2508 cmp orig/file1 directory/file1
2509 echo \"separator\"
2510 cmp orig/file2 directory/file2)"
2511 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2512 ( $at_check_trace;
2513 mkdir posix
2514 (cd posix
2515 TEST_TAR_FORMAT=posix
2516 export TEST_TAR_FORMAT
2517 TAR_OPTIONS="-H posix"
2518 export TAR_OPTIONS
2519 rm -rf *
2520
2521
2522 test -z "`sort < /dev/null 2>&1`" || exit 77
2523
2524
2525 mkdir directory
2526 genfile --length 10240 --pattern zeros --file directory/file1
2527 genfile --length 13 --file directory/file2
2528 tar cf archive directory
2529 mv directory orig
2530 cat archive | tar xfv - --warning=no-timestamp | sort
2531 echo "separator"
2532 cmp orig/file1 directory/file1
2533 echo "separator"
2534 cmp orig/file2 directory/file2)
2535 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2536 at_status=$? at_failed=false
2537 $at_check_filter
2538 at_fn_diff_devnull "$at_stderr" || at_failed=:
2539 echo >>"$at_stdout"; $as_echo "directory/
2540 directory/file1
2541 directory/file2
2542 separator
2543 separator
2544 " | \
2545   $at_diff - "$at_stdout" || at_failed=:
2546 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2547 $at_failed && at_fn_log_failure
2548 $at_traceon; }
2549
2550               { set +x
2551 $as_echo "$at_srcdir/pipe.at:33:
2552 mkdir gnu
2553 (cd gnu
2554 TEST_TAR_FORMAT=gnu
2555 export TEST_TAR_FORMAT
2556 TAR_OPTIONS=\"-H gnu\"
2557 export TAR_OPTIONS
2558 rm -rf *
2559
2560
2561 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2562
2563
2564 mkdir directory
2565 genfile --length 10240 --pattern zeros --file directory/file1
2566 genfile --length 13 --file directory/file2
2567 tar cf archive directory
2568 mv directory orig
2569 cat archive | tar xfv - --warning=no-timestamp | sort
2570 echo \"separator\"
2571 cmp orig/file1 directory/file1
2572 echo \"separator\"
2573 cmp orig/file2 directory/file2)"
2574 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2575 ( $at_check_trace;
2576 mkdir gnu
2577 (cd gnu
2578 TEST_TAR_FORMAT=gnu
2579 export TEST_TAR_FORMAT
2580 TAR_OPTIONS="-H gnu"
2581 export TAR_OPTIONS
2582 rm -rf *
2583
2584
2585 test -z "`sort < /dev/null 2>&1`" || exit 77
2586
2587
2588 mkdir directory
2589 genfile --length 10240 --pattern zeros --file directory/file1
2590 genfile --length 13 --file directory/file2
2591 tar cf archive directory
2592 mv directory orig
2593 cat archive | tar xfv - --warning=no-timestamp | sort
2594 echo "separator"
2595 cmp orig/file1 directory/file1
2596 echo "separator"
2597 cmp orig/file2 directory/file2)
2598 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2599 at_status=$? at_failed=false
2600 $at_check_filter
2601 at_fn_diff_devnull "$at_stderr" || at_failed=:
2602 echo >>"$at_stdout"; $as_echo "directory/
2603 directory/file1
2604 directory/file2
2605 separator
2606 separator
2607 " | \
2608   $at_diff - "$at_stdout" || at_failed=:
2609 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2610 $at_failed && at_fn_log_failure
2611 $at_traceon; }
2612
2613
2614
2615
2616   set +x
2617   $at_times_p && times >"$at_times_file"
2618 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2619 read at_status <"$at_status_file"
2620 #AT_STOP_2
2621 #AT_START_3
2622 at_fn_group_banner 3 'options.at:24' \
2623   "mixing options" "                                 "
2624 at_xfail=no
2625 (
2626   $as_echo "3. $at_setup_line: testing $at_desc ..."
2627   $at_traceon
2628
2629
2630
2631 { set +x
2632 $as_echo "$at_srcdir/options.at:27:
2633 echo > file1
2634 TAR_OPTIONS=--numeric-owner tar chof archive file1
2635 tar tf archive
2636 "
2637 at_fn_check_prepare_notrace 'an embedded newline' "options.at:27"
2638 ( $at_check_trace;
2639 echo > file1
2640 TAR_OPTIONS=--numeric-owner tar chof archive file1
2641 tar tf archive
2642
2643 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2644 at_status=$? at_failed=false
2645 $at_check_filter
2646 at_fn_diff_devnull "$at_stderr" || at_failed=:
2647 echo >>"$at_stdout"; $as_echo "file1
2648 " | \
2649   $at_diff - "$at_stdout" || at_failed=:
2650 at_fn_check_status 0 $at_status "$at_srcdir/options.at:27"
2651 $at_failed && at_fn_log_failure
2652 $at_traceon; }
2653
2654
2655   set +x
2656   $at_times_p && times >"$at_times_file"
2657 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2658 read at_status <"$at_status_file"
2659 #AT_STOP_3
2660 #AT_START_4
2661 at_fn_group_banner 4 'options02.at:26' \
2662   "interspersed options" "                           "
2663 at_xfail=no
2664 (
2665   $as_echo "4. $at_setup_line: testing $at_desc ..."
2666   $at_traceon
2667
2668
2669
2670 { set +x
2671 $as_echo "$at_srcdir/options02.at:29:
2672 echo > file1
2673 tar c file1 -f archive
2674 tar tf archive
2675 "
2676 at_fn_check_prepare_notrace 'an embedded newline' "options02.at:29"
2677 ( $at_check_trace;
2678 echo > file1
2679 tar c file1 -f archive
2680 tar tf archive
2681
2682 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2683 at_status=$? at_failed=false
2684 $at_check_filter
2685 at_fn_diff_devnull "$at_stderr" || at_failed=:
2686 echo >>"$at_stdout"; $as_echo "file1
2687 " | \
2688   $at_diff - "$at_stdout" || at_failed=:
2689 at_fn_check_status 0 $at_status "$at_srcdir/options02.at:29"
2690 $at_failed && at_fn_log_failure
2691 $at_traceon; }
2692
2693
2694   set +x
2695   $at_times_p && times >"$at_times_file"
2696 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2697 read at_status <"$at_status_file"
2698 #AT_STOP_4
2699 #AT_START_5
2700 at_fn_group_banner 5 'opcomp01.at:21' \
2701   "occurrence compatibility" "                       " 1
2702 at_xfail=no
2703 (
2704   $as_echo "5. $at_setup_line: testing $at_desc ..."
2705   $at_traceon
2706
2707
2708
2709 { set +x
2710 $as_echo "$at_srcdir/opcomp01.at:24:
2711 tar --occurrence=1 -cf test.tar .
2712 "
2713 at_fn_check_prepare_notrace 'an embedded newline' "opcomp01.at:24"
2714 ( $at_check_trace;
2715 tar --occurrence=1 -cf test.tar .
2716
2717 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2718 at_status=$? at_failed=false
2719 $at_check_filter
2720 echo >>"$at_stderr"; $as_echo "tar: --occurrence cannot be used with -c
2721 Try 'tar --help' or 'tar --usage' for more information.
2722 " | \
2723   $at_diff - "$at_stderr" || at_failed=:
2724 at_fn_diff_devnull "$at_stdout" || at_failed=:
2725 at_fn_check_status 2 $at_status "$at_srcdir/opcomp01.at:24"
2726 $at_failed && at_fn_log_failure
2727 $at_traceon; }
2728
2729
2730   set +x
2731   $at_times_p && times >"$at_times_file"
2732 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2733 read at_status <"$at_status_file"
2734 #AT_STOP_5
2735 #AT_START_6
2736 at_fn_group_banner 6 'opcomp02.at:21' \
2737   "occurrence compatibility" "                       " 1
2738 at_xfail=no
2739 (
2740   $as_echo "6. $at_setup_line: testing $at_desc ..."
2741   $at_traceon
2742
2743
2744
2745 { set +x
2746 $as_echo "$at_srcdir/opcomp02.at:24:
2747 tar --occurrence=1 -tf test.tar
2748 "
2749 at_fn_check_prepare_notrace 'an embedded newline' "opcomp02.at:24"
2750 ( $at_check_trace;
2751 tar --occurrence=1 -tf test.tar
2752
2753 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2754 at_status=$? at_failed=false
2755 $at_check_filter
2756 echo >>"$at_stderr"; $as_echo "tar: --occurrence is meaningless without a file list
2757 Try 'tar --help' or 'tar --usage' for more information.
2758 " | \
2759   $at_diff - "$at_stderr" || at_failed=:
2760 at_fn_diff_devnull "$at_stdout" || at_failed=:
2761 at_fn_check_status 2 $at_status "$at_srcdir/opcomp02.at:24"
2762 $at_failed && at_fn_log_failure
2763 $at_traceon; }
2764
2765
2766   set +x
2767   $at_times_p && times >"$at_times_file"
2768 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2769 read at_status <"$at_status_file"
2770 #AT_STOP_6
2771 #AT_START_7
2772 at_fn_group_banner 7 'opcomp03.at:21' \
2773   "--verify compatibility" "                         " 1
2774 at_xfail=no
2775 (
2776   $as_echo "7. $at_setup_line: testing $at_desc ..."
2777   $at_traceon
2778
2779
2780
2781 { set +x
2782 $as_echo "$at_srcdir/opcomp03.at:24:
2783 tar -tWf test.tar .
2784 "
2785 at_fn_check_prepare_notrace 'an embedded newline' "opcomp03.at:24"
2786 ( $at_check_trace;
2787 tar -tWf test.tar .
2788
2789 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2790 at_status=$? at_failed=false
2791 $at_check_filter
2792 echo >>"$at_stderr"; $as_echo "tar: --verify cannot be used with -t
2793 Try 'tar --help' or 'tar --usage' for more information.
2794 " | \
2795   $at_diff - "$at_stderr" || at_failed=:
2796 at_fn_diff_devnull "$at_stdout" || at_failed=:
2797 at_fn_check_status 2 $at_status "$at_srcdir/opcomp03.at:24"
2798 $at_failed && at_fn_log_failure
2799 $at_traceon; }
2800
2801
2802   set +x
2803   $at_times_p && times >"$at_times_file"
2804 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2805 read at_status <"$at_status_file"
2806 #AT_STOP_7
2807 #AT_START_8
2808 at_fn_group_banner 8 'opcomp04.at:21' \
2809   "compress option compatibility" "                  " 1
2810 at_xfail=no
2811 (
2812   $as_echo "8. $at_setup_line: testing $at_desc ..."
2813   $at_traceon
2814
2815
2816
2817 { set +x
2818 $as_echo "$at_srcdir/opcomp04.at:24:
2819
2820 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
2821
2822 genfile --file file
2823 tar czf test.tar file
2824 genfile --file newfile
2825 tar rzf test.tar newfile
2826 "
2827 at_fn_check_prepare_notrace 'an embedded newline' "opcomp04.at:24"
2828 ( $at_check_trace;
2829
2830 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
2831
2832 genfile --file file
2833 tar czf test.tar file
2834 genfile --file newfile
2835 tar rzf test.tar newfile
2836
2837 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2838 at_status=$? at_failed=false
2839 $at_check_filter
2840 echo >>"$at_stderr"; $as_echo "tar: Cannot update compressed archives
2841 Try 'tar --help' or 'tar --usage' for more information.
2842 " | \
2843   $at_diff - "$at_stderr" || at_failed=:
2844 at_fn_diff_devnull "$at_stdout" || at_failed=:
2845 at_fn_check_status 2 $at_status "$at_srcdir/opcomp04.at:24"
2846 $at_failed && at_fn_log_failure
2847 $at_traceon; }
2848
2849
2850   set +x
2851   $at_times_p && times >"$at_times_file"
2852 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2853 read at_status <"$at_status_file"
2854 #AT_STOP_8
2855 #AT_START_9
2856 at_fn_group_banner 9 'opcomp05.at:21' \
2857   "--pax-option compatibility" "                     " 1
2858 at_xfail=no
2859 (
2860   $as_echo "9. $at_setup_line: testing $at_desc ..."
2861   $at_traceon
2862
2863
2864
2865 { set +x
2866 $as_echo "$at_srcdir/opcomp05.at:24:
2867 tar -Hgnu -cf test.tar --pax-option user:=root .
2868 "
2869 at_fn_check_prepare_notrace 'an embedded newline' "opcomp05.at:24"
2870 ( $at_check_trace;
2871 tar -Hgnu -cf test.tar --pax-option user:=root .
2872
2873 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2874 at_status=$? at_failed=false
2875 $at_check_filter
2876 echo >>"$at_stderr"; $as_echo "tar: --pax-option can be used only on POSIX archives
2877 Try 'tar --help' or 'tar --usage' for more information.
2878 " | \
2879   $at_diff - "$at_stderr" || at_failed=:
2880 at_fn_diff_devnull "$at_stdout" || at_failed=:
2881 at_fn_check_status 2 $at_status "$at_srcdir/opcomp05.at:24"
2882 $at_failed && at_fn_log_failure
2883 $at_traceon; }
2884
2885
2886   set +x
2887   $at_times_p && times >"$at_times_file"
2888 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2889 read at_status <"$at_status_file"
2890 #AT_STOP_9
2891 #AT_START_10
2892 at_fn_group_banner 10 'opcomp06.at:21' \
2893   "--pax-option compatibility" "                     " 1
2894 at_xfail=no
2895 (
2896   $as_echo "10. $at_setup_line: testing $at_desc ..."
2897   $at_traceon
2898
2899
2900
2901 { set +x
2902 $as_echo "$at_srcdir/opcomp06.at:24:
2903
2904
2905   file=\$(TMPDIR=. mktemp fiXXXXXX)
2906
2907   setfacl -m u:\$UID:rwx \$file &> /dev/null
2908   if test \"\$?\" != 0; then
2909     exit 77
2910   fi
2911
2912
2913   getfacl \$file &> /dev/null
2914   if test \"\$?\" != 0; then
2915     exit 77
2916   fi
2917
2918   rm -rf \$file
2919
2920   file=\$(TMPDIR=. mktemp fiXXXXXX)
2921   setfacl -m u:\$UID:rwx \$file
2922   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
2923   if test \"\$err\" != \"0\"; then
2924     exit 77
2925   fi
2926
2927 genfile --file file
2928 tar -cf test.tar --acls -Hgnu file
2929 "
2930 at_fn_check_prepare_notrace 'a $(...) command substitution' "opcomp06.at:24"
2931 ( $at_check_trace;
2932
2933
2934   file=$(TMPDIR=. mktemp fiXXXXXX)
2935
2936   setfacl -m u:$UID:rwx $file &> /dev/null
2937   if test "$?" != 0; then
2938     exit 77
2939   fi
2940
2941
2942   getfacl $file &> /dev/null
2943   if test "$?" != 0; then
2944     exit 77
2945   fi
2946
2947   rm -rf $file
2948
2949   file=$(TMPDIR=. mktemp fiXXXXXX)
2950   setfacl -m u:$UID:rwx $file
2951   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
2952   if test "$err" != "0"; then
2953     exit 77
2954   fi
2955
2956 genfile --file file
2957 tar -cf test.tar --acls -Hgnu file
2958
2959 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2960 at_status=$? at_failed=false
2961 $at_check_filter
2962 echo >>"$at_stderr"; $as_echo "tar: --acls can be used only on POSIX archives
2963 Try 'tar --help' or 'tar --usage' for more information.
2964 " | \
2965   $at_diff - "$at_stderr" || at_failed=:
2966 at_fn_diff_devnull "$at_stdout" || at_failed=:
2967 at_fn_check_status 2 $at_status "$at_srcdir/opcomp06.at:24"
2968 $at_failed && at_fn_log_failure
2969 $at_traceon; }
2970
2971
2972   set +x
2973   $at_times_p && times >"$at_times_file"
2974 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2975 read at_status <"$at_status_file"
2976 #AT_STOP_10
2977 #AT_START_11
2978 at_fn_group_banner 11 'T-mult.at:21' \
2979   "multiple file lists" "                            " 2
2980 at_xfail=no
2981       test -f $XFAILFILE && at_xfail=yes
2982 (
2983   $as_echo "11. $at_setup_line: testing $at_desc ..."
2984   $at_traceon
2985
2986
2987
2988
2989
2990   { set +x
2991 $as_echo "$at_srcdir/T-mult.at:24:
2992 mkdir ustar
2993 (cd ustar
2994 TEST_TAR_FORMAT=ustar
2995 export TEST_TAR_FORMAT
2996 TAR_OPTIONS=\"-H ustar\"
2997 export TAR_OPTIONS
2998 rm -rf *
2999
3000 >file1
3001 >file2
3002 >file3
3003 >file4
3004 cat >F1 <<'_ATEOF'
3005 file1
3006 file2
3007 _ATEOF
3008
3009 cat >F2 <<'_ATEOF'
3010 file3
3011 file4
3012 _ATEOF
3013
3014 tar cf archive -T F1 -T F2
3015 tar tf archive
3016 )"
3017 at_fn_check_prepare_notrace 'an embedded newline' "T-mult.at:24"
3018 ( $at_check_trace;
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_stdout" 2>>"$at_stderr" 5>&-
3045 at_status=$? at_failed=false
3046 $at_check_filter
3047 at_fn_diff_devnull "$at_stderr" || at_failed=:
3048 echo >>"$at_stdout"; $as_echo "file1
3049 file2
3050 file3
3051 file4
3052 " | \
3053   $at_diff - "$at_stdout" || at_failed=:
3054 at_fn_check_status 0 $at_status "$at_srcdir/T-mult.at:24"
3055 $at_failed && at_fn_log_failure
3056 $at_traceon; }
3057
3058
3059
3060
3061   set +x
3062   $at_times_p && times >"$at_times_file"
3063 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3064 read at_status <"$at_status_file"
3065 #AT_STOP_11
3066 #AT_START_12
3067 at_fn_group_banner 12 'T-nest.at:21' \
3068   "nested file lists" "                              " 2
3069 at_xfail=no
3070       test -f $XFAILFILE && at_xfail=yes
3071 (
3072   $as_echo "12. $at_setup_line: testing $at_desc ..."
3073   $at_traceon
3074
3075
3076
3077
3078
3079   { set +x
3080 $as_echo "$at_srcdir/T-nest.at:24:
3081 mkdir ustar
3082 (cd ustar
3083 TEST_TAR_FORMAT=ustar
3084 export TEST_TAR_FORMAT
3085 TAR_OPTIONS=\"-H ustar\"
3086 export TAR_OPTIONS
3087 rm -rf *
3088
3089 >file1
3090 >file2
3091 >file3
3092 >file4
3093 cat >F1 <<'_ATEOF'
3094 file1
3095 -T F2
3096 file2
3097 _ATEOF
3098
3099 cat >F2 <<'_ATEOF'
3100 file3
3101 file4
3102 _ATEOF
3103
3104 tar cf archive -T F1
3105 tar tf archive
3106 )"
3107 at_fn_check_prepare_notrace 'an embedded newline' "T-nest.at:24"
3108 ( $at_check_trace;
3109 mkdir ustar
3110 (cd ustar
3111 TEST_TAR_FORMAT=ustar
3112 export TEST_TAR_FORMAT
3113 TAR_OPTIONS="-H ustar"
3114 export TAR_OPTIONS
3115 rm -rf *
3116
3117 >file1
3118 >file2
3119 >file3
3120 >file4
3121 cat >F1 <<'_ATEOF'
3122 file1
3123 -T F2
3124 file2
3125 _ATEOF
3126
3127 cat >F2 <<'_ATEOF'
3128 file3
3129 file4
3130 _ATEOF
3131
3132 tar cf archive -T F1
3133 tar tf archive
3134 )
3135 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3136 at_status=$? at_failed=false
3137 $at_check_filter
3138 at_fn_diff_devnull "$at_stderr" || at_failed=:
3139 echo >>"$at_stdout"; $as_echo "file1
3140 file3
3141 file4
3142 file2
3143 " | \
3144   $at_diff - "$at_stdout" || at_failed=:
3145 at_fn_check_status 0 $at_status "$at_srcdir/T-nest.at:24"
3146 $at_failed && at_fn_log_failure
3147 $at_traceon; }
3148
3149
3150
3151
3152   set +x
3153   $at_times_p && times >"$at_times_file"
3154 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3155 read at_status <"$at_status_file"
3156 #AT_STOP_12
3157 #AT_START_13
3158 at_fn_group_banner 13 'T-rec.at:21' \
3159   "recursive file lists" "                           " 2
3160 at_xfail=no
3161       test -f $XFAILFILE && at_xfail=yes
3162 (
3163   $as_echo "13. $at_setup_line: testing $at_desc ..."
3164   $at_traceon
3165
3166
3167
3168
3169
3170   { set +x
3171 $as_echo "$at_srcdir/T-rec.at:24:
3172 mkdir ustar
3173 (cd ustar
3174 TEST_TAR_FORMAT=ustar
3175 export TEST_TAR_FORMAT
3176 TAR_OPTIONS=\"-H ustar\"
3177 export TAR_OPTIONS
3178 rm -rf *
3179
3180 >file1
3181 >file2
3182 cat >F1 <<'_ATEOF'
3183 file1
3184 -T F2
3185 _ATEOF
3186
3187 cat >F2 <<'_ATEOF'
3188 file2
3189 -T F1
3190 _ATEOF
3191
3192 tar cf archive -T F1
3193 echo \$?
3194 tar tf archive
3195 )"
3196 at_fn_check_prepare_notrace 'an embedded newline' "T-rec.at:24"
3197 ( $at_check_trace;
3198 mkdir ustar
3199 (cd ustar
3200 TEST_TAR_FORMAT=ustar
3201 export TEST_TAR_FORMAT
3202 TAR_OPTIONS="-H ustar"
3203 export TAR_OPTIONS
3204 rm -rf *
3205
3206 >file1
3207 >file2
3208 cat >F1 <<'_ATEOF'
3209 file1
3210 -T F2
3211 _ATEOF
3212
3213 cat >F2 <<'_ATEOF'
3214 file2
3215 -T F1
3216 _ATEOF
3217
3218 tar cf archive -T F1
3219 echo $?
3220 tar tf archive
3221 )
3222 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3223 at_status=$? at_failed=false
3224 $at_check_filter
3225 echo >>"$at_stderr"; $as_echo "tar: F1: file list requested from F2 already read from command line
3226 tar: Exiting with failure status due to previous errors
3227 " | \
3228   $at_diff - "$at_stderr" || at_failed=:
3229 echo >>"$at_stdout"; $as_echo "2
3230 file1
3231 file2
3232 " | \
3233   $at_diff - "$at_stdout" || at_failed=:
3234 at_fn_check_status 0 $at_status "$at_srcdir/T-rec.at:24"
3235 $at_failed && at_fn_log_failure
3236 $at_traceon; }
3237
3238
3239
3240
3241   set +x
3242   $at_times_p && times >"$at_times_file"
3243 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3244 read at_status <"$at_status_file"
3245 #AT_STOP_13
3246 #AT_START_14
3247 at_fn_group_banner 14 'T-cd.at:21' \
3248   "-C in file lists" "                               " 2
3249 at_xfail=no
3250       test -f $XFAILFILE && at_xfail=yes
3251 (
3252   $as_echo "14. $at_setup_line: testing $at_desc ..."
3253   $at_traceon
3254
3255
3256
3257
3258
3259   { set +x
3260 $as_echo "$at_srcdir/T-cd.at:24:
3261 mkdir ustar
3262 (cd ustar
3263 TEST_TAR_FORMAT=ustar
3264 export TEST_TAR_FORMAT
3265 TAR_OPTIONS=\"-H ustar\"
3266 export TAR_OPTIONS
3267 rm -rf *
3268
3269
3270 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
3271
3272 >file1
3273 mkdir dir
3274 >dir/file2
3275 >dir/file3
3276 cat >F1 <<'_ATEOF'
3277 file1
3278 -C dir
3279 .
3280 _ATEOF
3281
3282 tar cf archive -T F1
3283 tar tf archive | sort
3284 )"
3285 at_fn_check_prepare_notrace 'a `...` command substitution' "T-cd.at:24"
3286 ( $at_check_trace;
3287 mkdir ustar
3288 (cd ustar
3289 TEST_TAR_FORMAT=ustar
3290 export TEST_TAR_FORMAT
3291 TAR_OPTIONS="-H ustar"
3292 export TAR_OPTIONS
3293 rm -rf *
3294
3295
3296 test -z "`sort < /dev/null 2>&1`" || exit 77
3297
3298 >file1
3299 mkdir dir
3300 >dir/file2
3301 >dir/file3
3302 cat >F1 <<'_ATEOF'
3303 file1
3304 -C dir
3305 .
3306 _ATEOF
3307
3308 tar cf archive -T F1
3309 tar tf archive | sort
3310 )
3311 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3312 at_status=$? at_failed=false
3313 $at_check_filter
3314 at_fn_diff_devnull "$at_stderr" || at_failed=:
3315 echo >>"$at_stdout"; $as_echo "./
3316 ./file2
3317 ./file3
3318 file1
3319 " | \
3320   $at_diff - "$at_stdout" || at_failed=:
3321 at_fn_check_status 0 $at_status "$at_srcdir/T-cd.at:24"
3322 $at_failed && at_fn_log_failure
3323 $at_traceon; }
3324
3325
3326
3327
3328   set +x
3329   $at_times_p && times >"$at_times_file"
3330 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3331 read at_status <"$at_status_file"
3332 #AT_STOP_14
3333 #AT_START_15
3334 at_fn_group_banner 15 'T-empty.at:26' \
3335   "empty entries" "                                  " 2
3336 at_xfail=no
3337       test -f $XFAILFILE && at_xfail=yes
3338 (
3339   $as_echo "15. $at_setup_line: testing $at_desc ..."
3340   $at_traceon
3341
3342
3343
3344 cat >file-list <<'_ATEOF'
3345 jeden
3346 dwa
3347
3348 trzy
3349 _ATEOF
3350
3351
3352
3353
3354   { set +x
3355 $as_echo "$at_srcdir/T-empty.at:36:
3356 mkdir ustar
3357 (cd ustar
3358 TEST_TAR_FORMAT=ustar
3359 export TEST_TAR_FORMAT
3360 TAR_OPTIONS=\"-H ustar\"
3361 export TAR_OPTIONS
3362 rm -rf *
3363
3364
3365 genfile --file jeden
3366 genfile --file dwa
3367 genfile --file trzy
3368
3369 tar cfvT archive ../file-list
3370 )"
3371 at_fn_check_prepare_notrace 'an embedded newline' "T-empty.at:36"
3372 ( $at_check_trace;
3373 mkdir ustar
3374 (cd ustar
3375 TEST_TAR_FORMAT=ustar
3376 export TEST_TAR_FORMAT
3377 TAR_OPTIONS="-H ustar"
3378 export TAR_OPTIONS
3379 rm -rf *
3380
3381
3382 genfile --file jeden
3383 genfile --file dwa
3384 genfile --file trzy
3385
3386 tar cfvT archive ../file-list
3387 )
3388 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3389 at_status=$? at_failed=false
3390 $at_check_filter
3391 at_fn_diff_devnull "$at_stderr" || at_failed=:
3392 echo >>"$at_stdout"; $as_echo "jeden
3393 dwa
3394 trzy
3395 " | \
3396   $at_diff - "$at_stdout" || at_failed=:
3397 at_fn_check_status 0 $at_status "$at_srcdir/T-empty.at:36"
3398 $at_failed && at_fn_log_failure
3399 $at_traceon; }
3400
3401
3402  # Testing one format is enough
3403
3404   set +x
3405   $at_times_p && times >"$at_times_file"
3406 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3407 read at_status <"$at_status_file"
3408 #AT_STOP_15
3409 #AT_START_16
3410 at_fn_group_banner 16 'T-null.at:21' \
3411   "0-separated file without -0" "                    " 2
3412 at_xfail=no
3413       test -f $XFAILFILE && at_xfail=yes
3414 (
3415   $as_echo "16. $at_setup_line: testing $at_desc ..."
3416   $at_traceon
3417
3418
3419
3420
3421
3422   { set +x
3423 $as_echo "$at_srcdir/T-null.at:24:
3424 mkdir ustar
3425 (cd ustar
3426 TEST_TAR_FORMAT=ustar
3427 export TEST_TAR_FORMAT
3428 TAR_OPTIONS=\"-H ustar\"
3429 export TAR_OPTIONS
3430 rm -rf *
3431
3432
3433 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
3434
3435
3436 echo jeden > temp
3437 echo dwa >> temp
3438 echo trzy >> temp
3439 cat temp | tr '\\n' '\\0' > file-list
3440
3441 genfile -f jeden
3442 genfile -f dwa
3443 genfile -f trzy
3444
3445 tar cfTv archive file-list
3446 )"
3447 at_fn_check_prepare_notrace 'a `...` command substitution' "T-null.at:24"
3448 ( $at_check_trace;
3449 mkdir ustar
3450 (cd ustar
3451 TEST_TAR_FORMAT=ustar
3452 export TEST_TAR_FORMAT
3453 TAR_OPTIONS="-H ustar"
3454 export TAR_OPTIONS
3455 rm -rf *
3456
3457
3458 test -z "`sort < /dev/null 2>&1`" || exit 77
3459
3460
3461 echo jeden > temp
3462 echo dwa >> temp
3463 echo trzy >> temp
3464 cat temp | tr '\n' '\0' > file-list
3465
3466 genfile -f jeden
3467 genfile -f dwa
3468 genfile -f trzy
3469
3470 tar cfTv archive file-list
3471 )
3472 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3473 at_status=$? at_failed=false
3474 $at_check_filter
3475 echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character
3476 " | \
3477   $at_diff - "$at_stderr" || at_failed=:
3478 echo >>"$at_stdout"; $as_echo "jeden
3479 dwa
3480 trzy
3481 " | \
3482   $at_diff - "$at_stdout" || at_failed=:
3483 at_fn_check_status 0 $at_status "$at_srcdir/T-null.at:24"
3484 $at_failed && at_fn_log_failure
3485 $at_traceon; }
3486
3487
3488  # Testing one format is enough
3489
3490   set +x
3491   $at_times_p && times >"$at_times_file"
3492 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3493 read at_status <"$at_status_file"
3494 #AT_STOP_16
3495 #AT_START_17
3496 at_fn_group_banner 17 'T-zfile.at:26' \
3497   "empty file" "                                     " 2
3498 at_xfail=no
3499       test -f $XFAILFILE && at_xfail=yes
3500 (
3501   $as_echo "17. $at_setup_line: testing $at_desc ..."
3502   $at_traceon
3503
3504
3505
3506
3507
3508   { set +x
3509 $as_echo "$at_srcdir/T-zfile.at:29:
3510 mkdir ustar
3511 (cd ustar
3512 TEST_TAR_FORMAT=ustar
3513 export TEST_TAR_FORMAT
3514 TAR_OPTIONS=\"-H ustar\"
3515 export TAR_OPTIONS
3516 rm -rf *
3517
3518 genfile --length=0 --file empty
3519 genfile --file a
3520 genfile --file b
3521 cat >valid <<'_ATEOF'
3522 a
3523 b
3524 _ATEOF
3525
3526
3527 tar cf archive -T empty -T valid
3528 tar tf archive
3529 echo \"==\"
3530 tar cf archive -T valid -T empty
3531 tar tf archive
3532 )"
3533 at_fn_check_prepare_notrace 'an embedded newline' "T-zfile.at:29"
3534 ( $at_check_trace;
3535 mkdir ustar
3536 (cd ustar
3537 TEST_TAR_FORMAT=ustar
3538 export TEST_TAR_FORMAT
3539 TAR_OPTIONS="-H ustar"
3540 export TAR_OPTIONS
3541 rm -rf *
3542
3543 genfile --length=0 --file empty
3544 genfile --file a
3545 genfile --file b
3546 cat >valid <<'_ATEOF'
3547 a
3548 b
3549 _ATEOF
3550
3551
3552 tar cf archive -T empty -T valid
3553 tar tf archive
3554 echo "=="
3555 tar cf archive -T valid -T empty
3556 tar tf archive
3557 )
3558 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3559 at_status=$? at_failed=false
3560 $at_check_filter
3561 at_fn_diff_devnull "$at_stderr" || at_failed=:
3562 echo >>"$at_stdout"; $as_echo "a
3563 b
3564 ==
3565 a
3566 b
3567 " | \
3568   $at_diff - "$at_stdout" || at_failed=:
3569 at_fn_check_status 0 $at_status "$at_srcdir/T-zfile.at:29"
3570 $at_failed && at_fn_log_failure
3571 $at_traceon; }
3572
3573
3574  # Testing one format is enough
3575
3576   set +x
3577   $at_times_p && times >"$at_times_file"
3578 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3579 read at_status <"$at_status_file"
3580 #AT_STOP_17
3581 #AT_START_18
3582 at_fn_group_banner 18 'T-nonl.at:27' \
3583   "entries with missing newlines" "                  " 2
3584 at_xfail=no
3585       test -f $XFAILFILE && at_xfail=yes
3586 (
3587   $as_echo "18. $at_setup_line: testing $at_desc ..."
3588   $at_traceon
3589
3590
3591
3592
3593
3594   { set +x
3595 $as_echo "$at_srcdir/T-nonl.at:30:
3596 mkdir ustar
3597 (cd ustar
3598 TEST_TAR_FORMAT=ustar
3599 export TEST_TAR_FORMAT
3600 TAR_OPTIONS=\"-H ustar\"
3601 export TAR_OPTIONS
3602 rm -rf *
3603
3604 genfile --length=0 --file empty
3605 \$as_echo_n c > 1.nonl
3606 echo d > 2.nonl
3607 \$as_echo_n e >> 2.nonl
3608 touch a b c d e
3609 cat >filelist <<'_ATEOF'
3610 a
3611 b
3612 _ATEOF
3613
3614
3615 tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
3616 tar tf archive
3617 echo ==
3618 tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
3619 tar tf archive
3620 )"
3621 at_fn_check_prepare_notrace 'an embedded newline' "T-nonl.at:30"
3622 ( $at_check_trace;
3623 mkdir ustar
3624 (cd ustar
3625 TEST_TAR_FORMAT=ustar
3626 export TEST_TAR_FORMAT
3627 TAR_OPTIONS="-H ustar"
3628 export TAR_OPTIONS
3629 rm -rf *
3630
3631 genfile --length=0 --file empty
3632 $as_echo_n c > 1.nonl
3633 echo d > 2.nonl
3634 $as_echo_n e >> 2.nonl
3635 touch a b c d e
3636 cat >filelist <<'_ATEOF'
3637 a
3638 b
3639 _ATEOF
3640
3641
3642 tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
3643 tar tf archive
3644 echo ==
3645 tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
3646 tar tf archive
3647 )
3648 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3649 at_status=$? at_failed=false
3650 $at_check_filter
3651 at_fn_diff_devnull "$at_stderr" || at_failed=:
3652 echo >>"$at_stdout"; $as_echo "c
3653 d
3654 e
3655 a
3656 b
3657 ==
3658 d
3659 e
3660 a
3661 b
3662 c
3663 " | \
3664   $at_diff - "$at_stdout" || at_failed=:
3665 at_fn_check_status 0 $at_status "$at_srcdir/T-nonl.at:30"
3666 $at_failed && at_fn_log_failure
3667 $at_traceon; }
3668
3669
3670
3671
3672   set +x
3673   $at_times_p && times >"$at_times_file"
3674 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3675 read at_status <"$at_status_file"
3676 #AT_STOP_18
3677 #AT_START_19
3678 at_fn_group_banner 19 'indexfile.at:26' \
3679   "tar --index-file=FILE --file=-" "                 " 3
3680 at_xfail=no
3681       test -f $XFAILFILE && at_xfail=yes
3682 (
3683   $as_echo "19. $at_setup_line: testing $at_desc ..."
3684   $at_traceon
3685
3686
3687
3688
3689
3690   { set +x
3691 $as_echo "$at_srcdir/indexfile.at:29:
3692 mkdir v7
3693 (cd v7
3694 TEST_TAR_FORMAT=v7
3695 export TEST_TAR_FORMAT
3696 TAR_OPTIONS=\"-H v7\"
3697 export TAR_OPTIONS
3698 rm -rf *
3699
3700
3701 mkdir directory
3702 genfile --file=directory/a --length=1035
3703
3704 echo \"Creating the archive\"
3705 tar -c -v -f - --index-file=idx directory > archive
3706
3707 echo \"Testing the archive\"
3708 tar -tf archive
3709 )"
3710 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3711 ( $at_check_trace;
3712 mkdir v7
3713 (cd v7
3714 TEST_TAR_FORMAT=v7
3715 export TEST_TAR_FORMAT
3716 TAR_OPTIONS="-H v7"
3717 export TAR_OPTIONS
3718 rm -rf *
3719
3720
3721 mkdir directory
3722 genfile --file=directory/a --length=1035
3723
3724 echo "Creating the archive"
3725 tar -c -v -f - --index-file=idx directory > archive
3726
3727 echo "Testing the archive"
3728 tar -tf archive
3729 )
3730 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3731 at_status=$? at_failed=false
3732 $at_check_filter
3733 at_fn_diff_devnull "$at_stderr" || at_failed=:
3734 echo >>"$at_stdout"; $as_echo "Creating the archive
3735 Testing the archive
3736 directory/
3737 directory/a
3738 " | \
3739   $at_diff - "$at_stdout" || at_failed=:
3740 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3741 $at_failed && at_fn_log_failure
3742 $at_traceon; }
3743
3744               { set +x
3745 $as_echo "$at_srcdir/indexfile.at:29:
3746 mkdir oldgnu
3747 (cd oldgnu
3748 TEST_TAR_FORMAT=oldgnu
3749 export TEST_TAR_FORMAT
3750 TAR_OPTIONS=\"-H oldgnu\"
3751 export TAR_OPTIONS
3752 rm -rf *
3753
3754
3755 mkdir directory
3756 genfile --file=directory/a --length=1035
3757
3758 echo \"Creating the archive\"
3759 tar -c -v -f - --index-file=idx directory > archive
3760
3761 echo \"Testing the archive\"
3762 tar -tf archive
3763 )"
3764 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3765 ( $at_check_trace;
3766 mkdir oldgnu
3767 (cd oldgnu
3768 TEST_TAR_FORMAT=oldgnu
3769 export TEST_TAR_FORMAT
3770 TAR_OPTIONS="-H oldgnu"
3771 export TAR_OPTIONS
3772 rm -rf *
3773
3774
3775 mkdir directory
3776 genfile --file=directory/a --length=1035
3777
3778 echo "Creating the archive"
3779 tar -c -v -f - --index-file=idx directory > archive
3780
3781 echo "Testing the archive"
3782 tar -tf archive
3783 )
3784 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3785 at_status=$? at_failed=false
3786 $at_check_filter
3787 at_fn_diff_devnull "$at_stderr" || at_failed=:
3788 echo >>"$at_stdout"; $as_echo "Creating the archive
3789 Testing the archive
3790 directory/
3791 directory/a
3792 " | \
3793   $at_diff - "$at_stdout" || at_failed=:
3794 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3795 $at_failed && at_fn_log_failure
3796 $at_traceon; }
3797
3798               { set +x
3799 $as_echo "$at_srcdir/indexfile.at:29:
3800 mkdir ustar
3801 (cd ustar
3802 TEST_TAR_FORMAT=ustar
3803 export TEST_TAR_FORMAT
3804 TAR_OPTIONS=\"-H ustar\"
3805 export TAR_OPTIONS
3806 rm -rf *
3807
3808
3809 mkdir directory
3810 genfile --file=directory/a --length=1035
3811
3812 echo \"Creating the archive\"
3813 tar -c -v -f - --index-file=idx directory > archive
3814
3815 echo \"Testing the archive\"
3816 tar -tf archive
3817 )"
3818 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3819 ( $at_check_trace;
3820 mkdir ustar
3821 (cd ustar
3822 TEST_TAR_FORMAT=ustar
3823 export TEST_TAR_FORMAT
3824 TAR_OPTIONS="-H ustar"
3825 export TAR_OPTIONS
3826 rm -rf *
3827
3828
3829 mkdir directory
3830 genfile --file=directory/a --length=1035
3831
3832 echo "Creating the archive"
3833 tar -c -v -f - --index-file=idx directory > archive
3834
3835 echo "Testing the archive"
3836 tar -tf archive
3837 )
3838 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3839 at_status=$? at_failed=false
3840 $at_check_filter
3841 at_fn_diff_devnull "$at_stderr" || at_failed=:
3842 echo >>"$at_stdout"; $as_echo "Creating the archive
3843 Testing the archive
3844 directory/
3845 directory/a
3846 " | \
3847   $at_diff - "$at_stdout" || at_failed=:
3848 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3849 $at_failed && at_fn_log_failure
3850 $at_traceon; }
3851
3852               { set +x
3853 $as_echo "$at_srcdir/indexfile.at:29:
3854 mkdir posix
3855 (cd posix
3856 TEST_TAR_FORMAT=posix
3857 export TEST_TAR_FORMAT
3858 TAR_OPTIONS=\"-H posix\"
3859 export TAR_OPTIONS
3860 rm -rf *
3861
3862
3863 mkdir directory
3864 genfile --file=directory/a --length=1035
3865
3866 echo \"Creating the archive\"
3867 tar -c -v -f - --index-file=idx directory > archive
3868
3869 echo \"Testing the archive\"
3870 tar -tf archive
3871 )"
3872 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3873 ( $at_check_trace;
3874 mkdir posix
3875 (cd posix
3876 TEST_TAR_FORMAT=posix
3877 export TEST_TAR_FORMAT
3878 TAR_OPTIONS="-H posix"
3879 export TAR_OPTIONS
3880 rm -rf *
3881
3882
3883 mkdir directory
3884 genfile --file=directory/a --length=1035
3885
3886 echo "Creating the archive"
3887 tar -c -v -f - --index-file=idx directory > archive
3888
3889 echo "Testing the archive"
3890 tar -tf archive
3891 )
3892 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3893 at_status=$? at_failed=false
3894 $at_check_filter
3895 at_fn_diff_devnull "$at_stderr" || at_failed=:
3896 echo >>"$at_stdout"; $as_echo "Creating the archive
3897 Testing the archive
3898 directory/
3899 directory/a
3900 " | \
3901   $at_diff - "$at_stdout" || at_failed=:
3902 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3903 $at_failed && at_fn_log_failure
3904 $at_traceon; }
3905
3906               { set +x
3907 $as_echo "$at_srcdir/indexfile.at:29:
3908 mkdir gnu
3909 (cd gnu
3910 TEST_TAR_FORMAT=gnu
3911 export TEST_TAR_FORMAT
3912 TAR_OPTIONS=\"-H gnu\"
3913 export TAR_OPTIONS
3914 rm -rf *
3915
3916
3917 mkdir directory
3918 genfile --file=directory/a --length=1035
3919
3920 echo \"Creating the archive\"
3921 tar -c -v -f - --index-file=idx directory > archive
3922
3923 echo \"Testing the archive\"
3924 tar -tf archive
3925 )"
3926 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3927 ( $at_check_trace;
3928 mkdir gnu
3929 (cd gnu
3930 TEST_TAR_FORMAT=gnu
3931 export TEST_TAR_FORMAT
3932 TAR_OPTIONS="-H gnu"
3933 export TAR_OPTIONS
3934 rm -rf *
3935
3936
3937 mkdir directory
3938 genfile --file=directory/a --length=1035
3939
3940 echo "Creating the archive"
3941 tar -c -v -f - --index-file=idx directory > archive
3942
3943 echo "Testing the archive"
3944 tar -tf archive
3945 )
3946 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3947 at_status=$? at_failed=false
3948 $at_check_filter
3949 at_fn_diff_devnull "$at_stderr" || at_failed=:
3950 echo >>"$at_stdout"; $as_echo "Creating the archive
3951 Testing the archive
3952 directory/
3953 directory/a
3954 " | \
3955   $at_diff - "$at_stdout" || at_failed=:
3956 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3957 $at_failed && at_fn_log_failure
3958 $at_traceon; }
3959
3960
3961
3962
3963   set +x
3964   $at_times_p && times >"$at_times_file"
3965 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3966 read at_status <"$at_status_file"
3967 #AT_STOP_19
3968 #AT_START_20
3969 at_fn_group_banner 20 'verbose.at:26' \
3970   "tar cvf -" "                                      " 3
3971 at_xfail=no
3972       test -f $XFAILFILE && at_xfail=yes
3973 (
3974   $as_echo "20. $at_setup_line: testing $at_desc ..."
3975   $at_traceon
3976
3977
3978
3979
3980
3981   { set +x
3982 $as_echo "$at_srcdir/verbose.at:29:
3983 mkdir v7
3984 (cd v7
3985 TEST_TAR_FORMAT=v7
3986 export TEST_TAR_FORMAT
3987 TAR_OPTIONS=\"-H v7\"
3988 export TAR_OPTIONS
3989 rm -rf *
3990
3991 genfile --file file --length 10240
3992 echo Creating the archive
3993 tar cvf - file > archive
3994 echo Testing the archive
3995 tar tf archive
3996 )"
3997 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
3998 ( $at_check_trace;
3999 mkdir v7
4000 (cd v7
4001 TEST_TAR_FORMAT=v7
4002 export TEST_TAR_FORMAT
4003 TAR_OPTIONS="-H v7"
4004 export TAR_OPTIONS
4005 rm -rf *
4006
4007 genfile --file file --length 10240
4008 echo Creating the archive
4009 tar cvf - file > archive
4010 echo Testing the archive
4011 tar tf archive
4012 )
4013 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4014 at_status=$? at_failed=false
4015 $at_check_filter
4016 echo >>"$at_stderr"; $as_echo "file
4017 " | \
4018   $at_diff - "$at_stderr" || at_failed=:
4019 echo >>"$at_stdout"; $as_echo "Creating the archive
4020 Testing the archive
4021 file
4022 " | \
4023   $at_diff - "$at_stdout" || at_failed=:
4024 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4025 $at_failed && at_fn_log_failure
4026 $at_traceon; }
4027
4028               { set +x
4029 $as_echo "$at_srcdir/verbose.at:29:
4030 mkdir oldgnu
4031 (cd oldgnu
4032 TEST_TAR_FORMAT=oldgnu
4033 export TEST_TAR_FORMAT
4034 TAR_OPTIONS=\"-H oldgnu\"
4035 export TAR_OPTIONS
4036 rm -rf *
4037
4038 genfile --file file --length 10240
4039 echo Creating the archive
4040 tar cvf - file > archive
4041 echo Testing the archive
4042 tar tf archive
4043 )"
4044 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4045 ( $at_check_trace;
4046 mkdir oldgnu
4047 (cd oldgnu
4048 TEST_TAR_FORMAT=oldgnu
4049 export TEST_TAR_FORMAT
4050 TAR_OPTIONS="-H oldgnu"
4051 export TAR_OPTIONS
4052 rm -rf *
4053
4054 genfile --file file --length 10240
4055 echo Creating the archive
4056 tar cvf - file > archive
4057 echo Testing the archive
4058 tar tf archive
4059 )
4060 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4061 at_status=$? at_failed=false
4062 $at_check_filter
4063 echo >>"$at_stderr"; $as_echo "file
4064 " | \
4065   $at_diff - "$at_stderr" || at_failed=:
4066 echo >>"$at_stdout"; $as_echo "Creating the archive
4067 Testing the archive
4068 file
4069 " | \
4070   $at_diff - "$at_stdout" || at_failed=:
4071 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4072 $at_failed && at_fn_log_failure
4073 $at_traceon; }
4074
4075               { set +x
4076 $as_echo "$at_srcdir/verbose.at:29:
4077 mkdir ustar
4078 (cd ustar
4079 TEST_TAR_FORMAT=ustar
4080 export TEST_TAR_FORMAT
4081 TAR_OPTIONS=\"-H ustar\"
4082 export TAR_OPTIONS
4083 rm -rf *
4084
4085 genfile --file file --length 10240
4086 echo Creating the archive
4087 tar cvf - file > archive
4088 echo Testing the archive
4089 tar tf archive
4090 )"
4091 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4092 ( $at_check_trace;
4093 mkdir ustar
4094 (cd ustar
4095 TEST_TAR_FORMAT=ustar
4096 export TEST_TAR_FORMAT
4097 TAR_OPTIONS="-H ustar"
4098 export TAR_OPTIONS
4099 rm -rf *
4100
4101 genfile --file file --length 10240
4102 echo Creating the archive
4103 tar cvf - file > archive
4104 echo Testing the archive
4105 tar tf archive
4106 )
4107 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4108 at_status=$? at_failed=false
4109 $at_check_filter
4110 echo >>"$at_stderr"; $as_echo "file
4111 " | \
4112   $at_diff - "$at_stderr" || at_failed=:
4113 echo >>"$at_stdout"; $as_echo "Creating the archive
4114 Testing the archive
4115 file
4116 " | \
4117   $at_diff - "$at_stdout" || at_failed=:
4118 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4119 $at_failed && at_fn_log_failure
4120 $at_traceon; }
4121
4122               { set +x
4123 $as_echo "$at_srcdir/verbose.at:29:
4124 mkdir posix
4125 (cd posix
4126 TEST_TAR_FORMAT=posix
4127 export TEST_TAR_FORMAT
4128 TAR_OPTIONS=\"-H posix\"
4129 export TAR_OPTIONS
4130 rm -rf *
4131
4132 genfile --file file --length 10240
4133 echo Creating the archive
4134 tar cvf - file > archive
4135 echo Testing the archive
4136 tar tf archive
4137 )"
4138 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4139 ( $at_check_trace;
4140 mkdir posix
4141 (cd posix
4142 TEST_TAR_FORMAT=posix
4143 export TEST_TAR_FORMAT
4144 TAR_OPTIONS="-H posix"
4145 export TAR_OPTIONS
4146 rm -rf *
4147
4148 genfile --file file --length 10240
4149 echo Creating the archive
4150 tar cvf - file > archive
4151 echo Testing the archive
4152 tar tf archive
4153 )
4154 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4155 at_status=$? at_failed=false
4156 $at_check_filter
4157 echo >>"$at_stderr"; $as_echo "file
4158 " | \
4159   $at_diff - "$at_stderr" || at_failed=:
4160 echo >>"$at_stdout"; $as_echo "Creating the archive
4161 Testing the archive
4162 file
4163 " | \
4164   $at_diff - "$at_stdout" || at_failed=:
4165 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4166 $at_failed && at_fn_log_failure
4167 $at_traceon; }
4168
4169               { set +x
4170 $as_echo "$at_srcdir/verbose.at:29:
4171 mkdir gnu
4172 (cd gnu
4173 TEST_TAR_FORMAT=gnu
4174 export TEST_TAR_FORMAT
4175 TAR_OPTIONS=\"-H gnu\"
4176 export TAR_OPTIONS
4177 rm -rf *
4178
4179 genfile --file file --length 10240
4180 echo Creating the archive
4181 tar cvf - file > archive
4182 echo Testing the archive
4183 tar tf archive
4184 )"
4185 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4186 ( $at_check_trace;
4187 mkdir gnu
4188 (cd gnu
4189 TEST_TAR_FORMAT=gnu
4190 export TEST_TAR_FORMAT
4191 TAR_OPTIONS="-H gnu"
4192 export TAR_OPTIONS
4193 rm -rf *
4194
4195 genfile --file file --length 10240
4196 echo Creating the archive
4197 tar cvf - file > archive
4198 echo Testing the archive
4199 tar tf archive
4200 )
4201 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4202 at_status=$? at_failed=false
4203 $at_check_filter
4204 echo >>"$at_stderr"; $as_echo "file
4205 " | \
4206   $at_diff - "$at_stderr" || at_failed=:
4207 echo >>"$at_stdout"; $as_echo "Creating the archive
4208 Testing the archive
4209 file
4210 " | \
4211   $at_diff - "$at_stdout" || at_failed=:
4212 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4213 $at_failed && at_fn_log_failure
4214 $at_traceon; }
4215
4216
4217
4218
4219   set +x
4220   $at_times_p && times >"$at_times_file"
4221 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4222 read at_status <"$at_status_file"
4223 #AT_STOP_20
4224 #AT_START_21
4225 at_fn_group_banner 21 'gzip.at:23' \
4226   "gzip" "                                           " 3
4227 at_xfail=no
4228 (
4229   $as_echo "21. $at_setup_line: testing $at_desc ..."
4230   $at_traceon
4231
4232
4233
4234 unset TAR_OPTIONS
4235
4236 { set +x
4237 $as_echo "$at_srcdir/gzip.at:28:
4238
4239 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
4240
4241 tar xfvz /dev/null 2>err
4242 RC=\$?
4243 sed -n '/^tar:/p' err >&2
4244 exit \$RC
4245 "
4246 at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:28"
4247 ( $at_check_trace;
4248
4249 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
4250
4251 tar xfvz /dev/null 2>err
4252 RC=$?
4253 sed -n '/^tar:/p' err >&2
4254 exit $RC
4255
4256 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4257 at_status=$? at_failed=false
4258 $at_check_filter
4259 echo >>"$at_stderr"; $as_echo "tar: Child returned status 1
4260 tar: Error is not recoverable: exiting now
4261 " | \
4262   $at_diff - "$at_stderr" || at_failed=:
4263 at_fn_diff_devnull "$at_stdout" || at_failed=:
4264 at_fn_check_status 2 $at_status "$at_srcdir/gzip.at:28"
4265 $at_failed && at_fn_log_failure
4266 $at_traceon; }
4267
4268
4269   set +x
4270   $at_times_p && times >"$at_times_file"
4271 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4272 read at_status <"$at_status_file"
4273 #AT_STOP_21
4274 #AT_START_22
4275 at_fn_group_banner 22 'recurse.at:21' \
4276   "recurse" "                                        " 3
4277 at_xfail=no
4278       test -f $XFAILFILE && at_xfail=yes
4279 (
4280   $as_echo "22. $at_setup_line: testing $at_desc ..."
4281   $at_traceon
4282
4283
4284
4285
4286
4287   { set +x
4288 $as_echo "$at_srcdir/recurse.at:24:
4289 mkdir v7
4290 (cd v7
4291 TEST_TAR_FORMAT=v7
4292 export TEST_TAR_FORMAT
4293 TAR_OPTIONS=\"-H v7\"
4294 export TAR_OPTIONS
4295 rm -rf *
4296
4297 mkdir directory
4298 touch directory/file
4299 tar --create --file archive --no-recursion directory || exit 1
4300 tar tf archive
4301 )"
4302 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4303 ( $at_check_trace;
4304 mkdir v7
4305 (cd v7
4306 TEST_TAR_FORMAT=v7
4307 export TEST_TAR_FORMAT
4308 TAR_OPTIONS="-H v7"
4309 export TAR_OPTIONS
4310 rm -rf *
4311
4312 mkdir directory
4313 touch directory/file
4314 tar --create --file archive --no-recursion directory || exit 1
4315 tar tf archive
4316 )
4317 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4318 at_status=$? at_failed=false
4319 $at_check_filter
4320 at_fn_diff_devnull "$at_stderr" || at_failed=:
4321 echo >>"$at_stdout"; $as_echo "directory/
4322 " | \
4323   $at_diff - "$at_stdout" || at_failed=:
4324 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4325 $at_failed && at_fn_log_failure
4326 $at_traceon; }
4327
4328               { set +x
4329 $as_echo "$at_srcdir/recurse.at:24:
4330 mkdir oldgnu
4331 (cd oldgnu
4332 TEST_TAR_FORMAT=oldgnu
4333 export TEST_TAR_FORMAT
4334 TAR_OPTIONS=\"-H oldgnu\"
4335 export TAR_OPTIONS
4336 rm -rf *
4337
4338 mkdir directory
4339 touch directory/file
4340 tar --create --file archive --no-recursion directory || exit 1
4341 tar tf archive
4342 )"
4343 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4344 ( $at_check_trace;
4345 mkdir oldgnu
4346 (cd oldgnu
4347 TEST_TAR_FORMAT=oldgnu
4348 export TEST_TAR_FORMAT
4349 TAR_OPTIONS="-H oldgnu"
4350 export TAR_OPTIONS
4351 rm -rf *
4352
4353 mkdir directory
4354 touch directory/file
4355 tar --create --file archive --no-recursion directory || exit 1
4356 tar tf archive
4357 )
4358 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4359 at_status=$? at_failed=false
4360 $at_check_filter
4361 at_fn_diff_devnull "$at_stderr" || at_failed=:
4362 echo >>"$at_stdout"; $as_echo "directory/
4363 " | \
4364   $at_diff - "$at_stdout" || at_failed=:
4365 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4366 $at_failed && at_fn_log_failure
4367 $at_traceon; }
4368
4369               { set +x
4370 $as_echo "$at_srcdir/recurse.at:24:
4371 mkdir ustar
4372 (cd ustar
4373 TEST_TAR_FORMAT=ustar
4374 export TEST_TAR_FORMAT
4375 TAR_OPTIONS=\"-H ustar\"
4376 export TAR_OPTIONS
4377 rm -rf *
4378
4379 mkdir directory
4380 touch directory/file
4381 tar --create --file archive --no-recursion directory || exit 1
4382 tar tf archive
4383 )"
4384 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4385 ( $at_check_trace;
4386 mkdir ustar
4387 (cd ustar
4388 TEST_TAR_FORMAT=ustar
4389 export TEST_TAR_FORMAT
4390 TAR_OPTIONS="-H ustar"
4391 export TAR_OPTIONS
4392 rm -rf *
4393
4394 mkdir directory
4395 touch directory/file
4396 tar --create --file archive --no-recursion directory || exit 1
4397 tar tf archive
4398 )
4399 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4400 at_status=$? at_failed=false
4401 $at_check_filter
4402 at_fn_diff_devnull "$at_stderr" || at_failed=:
4403 echo >>"$at_stdout"; $as_echo "directory/
4404 " | \
4405   $at_diff - "$at_stdout" || at_failed=:
4406 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4407 $at_failed && at_fn_log_failure
4408 $at_traceon; }
4409
4410               { set +x
4411 $as_echo "$at_srcdir/recurse.at:24:
4412 mkdir posix
4413 (cd posix
4414 TEST_TAR_FORMAT=posix
4415 export TEST_TAR_FORMAT
4416 TAR_OPTIONS=\"-H posix\"
4417 export TAR_OPTIONS
4418 rm -rf *
4419
4420 mkdir directory
4421 touch directory/file
4422 tar --create --file archive --no-recursion directory || exit 1
4423 tar tf archive
4424 )"
4425 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4426 ( $at_check_trace;
4427 mkdir posix
4428 (cd posix
4429 TEST_TAR_FORMAT=posix
4430 export TEST_TAR_FORMAT
4431 TAR_OPTIONS="-H posix"
4432 export TAR_OPTIONS
4433 rm -rf *
4434
4435 mkdir directory
4436 touch directory/file
4437 tar --create --file archive --no-recursion directory || exit 1
4438 tar tf archive
4439 )
4440 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4441 at_status=$? at_failed=false
4442 $at_check_filter
4443 at_fn_diff_devnull "$at_stderr" || at_failed=:
4444 echo >>"$at_stdout"; $as_echo "directory/
4445 " | \
4446   $at_diff - "$at_stdout" || at_failed=:
4447 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4448 $at_failed && at_fn_log_failure
4449 $at_traceon; }
4450
4451               { set +x
4452 $as_echo "$at_srcdir/recurse.at:24:
4453 mkdir gnu
4454 (cd gnu
4455 TEST_TAR_FORMAT=gnu
4456 export TEST_TAR_FORMAT
4457 TAR_OPTIONS=\"-H gnu\"
4458 export TAR_OPTIONS
4459 rm -rf *
4460
4461 mkdir directory
4462 touch directory/file
4463 tar --create --file archive --no-recursion directory || exit 1
4464 tar tf archive
4465 )"
4466 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4467 ( $at_check_trace;
4468 mkdir gnu
4469 (cd gnu
4470 TEST_TAR_FORMAT=gnu
4471 export TEST_TAR_FORMAT
4472 TAR_OPTIONS="-H gnu"
4473 export TAR_OPTIONS
4474 rm -rf *
4475
4476 mkdir directory
4477 touch directory/file
4478 tar --create --file archive --no-recursion directory || exit 1
4479 tar tf archive
4480 )
4481 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4482 at_status=$? at_failed=false
4483 $at_check_filter
4484 at_fn_diff_devnull "$at_stderr" || at_failed=:
4485 echo >>"$at_stdout"; $as_echo "directory/
4486 " | \
4487   $at_diff - "$at_stdout" || at_failed=:
4488 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4489 $at_failed && at_fn_log_failure
4490 $at_traceon; }
4491
4492
4493
4494
4495   set +x
4496   $at_times_p && times >"$at_times_file"
4497 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4498 read at_status <"$at_status_file"
4499 #AT_STOP_22
4500 #AT_START_23
4501 at_fn_group_banner 23 'shortrec.at:25' \
4502   "short records" "                                  " 3
4503 at_xfail=no
4504       test -f $XFAILFILE && at_xfail=yes
4505 (
4506   $as_echo "23. $at_setup_line: testing $at_desc ..."
4507   $at_traceon
4508
4509
4510
4511
4512
4513   { set +x
4514 $as_echo "$at_srcdir/shortrec.at:28:
4515 mkdir v7
4516 (cd v7
4517 TEST_TAR_FORMAT=v7
4518 export TEST_TAR_FORMAT
4519 TAR_OPTIONS=\"-H v7\"
4520 export TAR_OPTIONS
4521 rm -rf *
4522
4523 mkdir directory
4524 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4525 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4526 tar -c -b 1 -f archive directory
4527 tar -t -f archive > /dev/null
4528 tar -t -f - < archive > /dev/null
4529
4530 rm -r directory
4531 )"
4532 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4533 ( $at_check_trace;
4534 mkdir v7
4535 (cd v7
4536 TEST_TAR_FORMAT=v7
4537 export TEST_TAR_FORMAT
4538 TAR_OPTIONS="-H v7"
4539 export TAR_OPTIONS
4540 rm -rf *
4541
4542 mkdir directory
4543 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4544 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4545 tar -c -b 1 -f archive directory
4546 tar -t -f archive > /dev/null
4547 tar -t -f - < archive > /dev/null
4548
4549 rm -r directory
4550 )
4551 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4552 at_status=$? at_failed=false
4553 $at_check_filter
4554 at_fn_diff_devnull "$at_stderr" || at_failed=:
4555 at_fn_diff_devnull "$at_stdout" || at_failed=:
4556 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4557 $at_failed && at_fn_log_failure
4558 $at_traceon; }
4559
4560               { set +x
4561 $as_echo "$at_srcdir/shortrec.at:28:
4562 mkdir oldgnu
4563 (cd oldgnu
4564 TEST_TAR_FORMAT=oldgnu
4565 export TEST_TAR_FORMAT
4566 TAR_OPTIONS=\"-H oldgnu\"
4567 export TAR_OPTIONS
4568 rm -rf *
4569
4570 mkdir directory
4571 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4572 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4573 tar -c -b 1 -f archive directory
4574 tar -t -f archive > /dev/null
4575 tar -t -f - < archive > /dev/null
4576
4577 rm -r directory
4578 )"
4579 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4580 ( $at_check_trace;
4581 mkdir oldgnu
4582 (cd oldgnu
4583 TEST_TAR_FORMAT=oldgnu
4584 export TEST_TAR_FORMAT
4585 TAR_OPTIONS="-H oldgnu"
4586 export TAR_OPTIONS
4587 rm -rf *
4588
4589 mkdir directory
4590 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4591 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4592 tar -c -b 1 -f archive directory
4593 tar -t -f archive > /dev/null
4594 tar -t -f - < archive > /dev/null
4595
4596 rm -r directory
4597 )
4598 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4599 at_status=$? at_failed=false
4600 $at_check_filter
4601 at_fn_diff_devnull "$at_stderr" || at_failed=:
4602 at_fn_diff_devnull "$at_stdout" || at_failed=:
4603 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4604 $at_failed && at_fn_log_failure
4605 $at_traceon; }
4606
4607               { set +x
4608 $as_echo "$at_srcdir/shortrec.at:28:
4609 mkdir ustar
4610 (cd ustar
4611 TEST_TAR_FORMAT=ustar
4612 export TEST_TAR_FORMAT
4613 TAR_OPTIONS=\"-H ustar\"
4614 export TAR_OPTIONS
4615 rm -rf *
4616
4617 mkdir directory
4618 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4619 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4620 tar -c -b 1 -f archive directory
4621 tar -t -f archive > /dev/null
4622 tar -t -f - < archive > /dev/null
4623
4624 rm -r directory
4625 )"
4626 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4627 ( $at_check_trace;
4628 mkdir ustar
4629 (cd ustar
4630 TEST_TAR_FORMAT=ustar
4631 export TEST_TAR_FORMAT
4632 TAR_OPTIONS="-H ustar"
4633 export TAR_OPTIONS
4634 rm -rf *
4635
4636 mkdir directory
4637 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4638 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4639 tar -c -b 1 -f archive directory
4640 tar -t -f archive > /dev/null
4641 tar -t -f - < archive > /dev/null
4642
4643 rm -r directory
4644 )
4645 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4646 at_status=$? at_failed=false
4647 $at_check_filter
4648 at_fn_diff_devnull "$at_stderr" || at_failed=:
4649 at_fn_diff_devnull "$at_stdout" || at_failed=:
4650 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4651 $at_failed && at_fn_log_failure
4652 $at_traceon; }
4653
4654               { set +x
4655 $as_echo "$at_srcdir/shortrec.at:28:
4656 mkdir posix
4657 (cd posix
4658 TEST_TAR_FORMAT=posix
4659 export TEST_TAR_FORMAT
4660 TAR_OPTIONS=\"-H posix\"
4661 export TAR_OPTIONS
4662 rm -rf *
4663
4664 mkdir directory
4665 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4666 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4667 tar -c -b 1 -f archive directory
4668 tar -t -f archive > /dev/null
4669 tar -t -f - < archive > /dev/null
4670
4671 rm -r directory
4672 )"
4673 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4674 ( $at_check_trace;
4675 mkdir posix
4676 (cd posix
4677 TEST_TAR_FORMAT=posix
4678 export TEST_TAR_FORMAT
4679 TAR_OPTIONS="-H posix"
4680 export TAR_OPTIONS
4681 rm -rf *
4682
4683 mkdir directory
4684 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4685 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4686 tar -c -b 1 -f archive directory
4687 tar -t -f archive > /dev/null
4688 tar -t -f - < archive > /dev/null
4689
4690 rm -r directory
4691 )
4692 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4693 at_status=$? at_failed=false
4694 $at_check_filter
4695 at_fn_diff_devnull "$at_stderr" || at_failed=:
4696 at_fn_diff_devnull "$at_stdout" || at_failed=:
4697 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4698 $at_failed && at_fn_log_failure
4699 $at_traceon; }
4700
4701               { set +x
4702 $as_echo "$at_srcdir/shortrec.at:28:
4703 mkdir gnu
4704 (cd gnu
4705 TEST_TAR_FORMAT=gnu
4706 export TEST_TAR_FORMAT
4707 TAR_OPTIONS=\"-H gnu\"
4708 export TAR_OPTIONS
4709 rm -rf *
4710
4711 mkdir directory
4712 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4713 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4714 tar -c -b 1 -f archive directory
4715 tar -t -f archive > /dev/null
4716 tar -t -f - < archive > /dev/null
4717
4718 rm -r directory
4719 )"
4720 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4721 ( $at_check_trace;
4722 mkdir gnu
4723 (cd gnu
4724 TEST_TAR_FORMAT=gnu
4725 export TEST_TAR_FORMAT
4726 TAR_OPTIONS="-H gnu"
4727 export TAR_OPTIONS
4728 rm -rf *
4729
4730 mkdir directory
4731 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4732 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4733 tar -c -b 1 -f archive directory
4734 tar -t -f archive > /dev/null
4735 tar -t -f - < archive > /dev/null
4736
4737 rm -r directory
4738 )
4739 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4740 at_status=$? at_failed=false
4741 $at_check_filter
4742 at_fn_diff_devnull "$at_stderr" || at_failed=:
4743 at_fn_diff_devnull "$at_stdout" || at_failed=:
4744 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4745 $at_failed && at_fn_log_failure
4746 $at_traceon; }
4747
4748
4749
4750
4751   set +x
4752   $at_times_p && times >"$at_times_file"
4753 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4754 read at_status <"$at_status_file"
4755 #AT_STOP_23
4756 #AT_START_24
4757 at_fn_group_banner 24 'same-order01.at:26' \
4758   "working -C with --same-order" "                   " 4
4759 at_xfail=no
4760       test -f $XFAILFILE && at_xfail=yes
4761 (
4762   $as_echo "24. $at_setup_line: testing $at_desc ..."
4763   $at_traceon
4764
4765
4766
4767
4768
4769   { set +x
4770 $as_echo "$at_srcdir/same-order01.at:29:
4771 mkdir v7
4772 (cd v7
4773 TEST_TAR_FORMAT=v7
4774 export TEST_TAR_FORMAT
4775 TAR_OPTIONS=\"-H v7\"
4776 export TAR_OPTIONS
4777 rm -rf *
4778
4779
4780 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4781
4782
4783 genfile -l 1024 -f file1
4784 genfile -l 1024 -f file2
4785 tar cf archive file1 file2
4786
4787 mkdir directory
4788 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
4789
4790 ls directory|sort
4791 )"
4792 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
4793 ( $at_check_trace;
4794 mkdir v7
4795 (cd v7
4796 TEST_TAR_FORMAT=v7
4797 export TEST_TAR_FORMAT
4798 TAR_OPTIONS="-H v7"
4799 export TAR_OPTIONS
4800 rm -rf *
4801
4802
4803 test -z "`sort < /dev/null 2>&1`" || exit 77
4804
4805
4806 genfile -l 1024 -f file1
4807 genfile -l 1024 -f file2
4808 tar cf archive file1 file2
4809
4810 mkdir directory
4811 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
4812
4813 ls directory|sort
4814 )
4815 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4816 at_status=$? at_failed=false
4817 $at_check_filter
4818 at_fn_diff_devnull "$at_stderr" || at_failed=:
4819 echo >>"$at_stdout"; $as_echo "file1
4820 file2
4821 " | \
4822   $at_diff - "$at_stdout" || at_failed=:
4823 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
4824 $at_failed && at_fn_log_failure
4825 $at_traceon; }
4826
4827               { set +x
4828 $as_echo "$at_srcdir/same-order01.at:29:
4829 mkdir oldgnu
4830 (cd oldgnu
4831 TEST_TAR_FORMAT=oldgnu
4832 export TEST_TAR_FORMAT
4833 TAR_OPTIONS=\"-H oldgnu\"
4834 export TAR_OPTIONS
4835 rm -rf *
4836
4837
4838 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4839
4840
4841 genfile -l 1024 -f file1
4842 genfile -l 1024 -f file2
4843 tar cf archive file1 file2
4844
4845 mkdir directory
4846 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
4847
4848 ls directory|sort
4849 )"
4850 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
4851 ( $at_check_trace;
4852 mkdir oldgnu
4853 (cd oldgnu
4854 TEST_TAR_FORMAT=oldgnu
4855 export TEST_TAR_FORMAT
4856 TAR_OPTIONS="-H oldgnu"
4857 export TAR_OPTIONS
4858 rm -rf *
4859
4860
4861 test -z "`sort < /dev/null 2>&1`" || exit 77
4862
4863
4864 genfile -l 1024 -f file1
4865 genfile -l 1024 -f file2
4866 tar cf archive file1 file2
4867
4868 mkdir directory
4869 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
4870
4871 ls directory|sort
4872 )
4873 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4874 at_status=$? at_failed=false
4875 $at_check_filter
4876 at_fn_diff_devnull "$at_stderr" || at_failed=:
4877 echo >>"$at_stdout"; $as_echo "file1
4878 file2
4879 " | \
4880   $at_diff - "$at_stdout" || at_failed=:
4881 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
4882 $at_failed && at_fn_log_failure
4883 $at_traceon; }
4884
4885               { set +x
4886 $as_echo "$at_srcdir/same-order01.at:29:
4887 mkdir ustar
4888 (cd ustar
4889 TEST_TAR_FORMAT=ustar
4890 export TEST_TAR_FORMAT
4891 TAR_OPTIONS=\"-H ustar\"
4892 export TAR_OPTIONS
4893 rm -rf *
4894
4895
4896 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4897
4898
4899 genfile -l 1024 -f file1
4900 genfile -l 1024 -f file2
4901 tar cf archive file1 file2
4902
4903 mkdir directory
4904 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
4905
4906 ls directory|sort
4907 )"
4908 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
4909 ( $at_check_trace;
4910 mkdir ustar
4911 (cd ustar
4912 TEST_TAR_FORMAT=ustar
4913 export TEST_TAR_FORMAT
4914 TAR_OPTIONS="-H ustar"
4915 export TAR_OPTIONS
4916 rm -rf *
4917
4918
4919 test -z "`sort < /dev/null 2>&1`" || exit 77
4920
4921
4922 genfile -l 1024 -f file1
4923 genfile -l 1024 -f file2
4924 tar cf archive file1 file2
4925
4926 mkdir directory
4927 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
4928
4929 ls directory|sort
4930 )
4931 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4932 at_status=$? at_failed=false
4933 $at_check_filter
4934 at_fn_diff_devnull "$at_stderr" || at_failed=:
4935 echo >>"$at_stdout"; $as_echo "file1
4936 file2
4937 " | \
4938   $at_diff - "$at_stdout" || at_failed=:
4939 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
4940 $at_failed && at_fn_log_failure
4941 $at_traceon; }
4942
4943               { set +x
4944 $as_echo "$at_srcdir/same-order01.at:29:
4945 mkdir posix
4946 (cd posix
4947 TEST_TAR_FORMAT=posix
4948 export TEST_TAR_FORMAT
4949 TAR_OPTIONS=\"-H posix\"
4950 export TAR_OPTIONS
4951 rm -rf *
4952
4953
4954 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
4955
4956
4957 genfile -l 1024 -f file1
4958 genfile -l 1024 -f file2
4959 tar cf archive file1 file2
4960
4961 mkdir directory
4962 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
4963
4964 ls directory|sort
4965 )"
4966 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
4967 ( $at_check_trace;
4968 mkdir posix
4969 (cd posix
4970 TEST_TAR_FORMAT=posix
4971 export TEST_TAR_FORMAT
4972 TAR_OPTIONS="-H posix"
4973 export TAR_OPTIONS
4974 rm -rf *
4975
4976
4977 test -z "`sort < /dev/null 2>&1`" || exit 77
4978
4979
4980 genfile -l 1024 -f file1
4981 genfile -l 1024 -f file2
4982 tar cf archive file1 file2
4983
4984 mkdir directory
4985 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
4986
4987 ls directory|sort
4988 )
4989 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4990 at_status=$? at_failed=false
4991 $at_check_filter
4992 at_fn_diff_devnull "$at_stderr" || at_failed=:
4993 echo >>"$at_stdout"; $as_echo "file1
4994 file2
4995 " | \
4996   $at_diff - "$at_stdout" || at_failed=:
4997 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
4998 $at_failed && at_fn_log_failure
4999 $at_traceon; }
5000
5001               { set +x
5002 $as_echo "$at_srcdir/same-order01.at:29:
5003 mkdir gnu
5004 (cd gnu
5005 TEST_TAR_FORMAT=gnu
5006 export TEST_TAR_FORMAT
5007 TAR_OPTIONS=\"-H gnu\"
5008 export TAR_OPTIONS
5009 rm -rf *
5010
5011
5012 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5013
5014
5015 genfile -l 1024 -f file1
5016 genfile -l 1024 -f file2
5017 tar cf archive file1 file2
5018
5019 mkdir directory
5020 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5021
5022 ls directory|sort
5023 )"
5024 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
5025 ( $at_check_trace;
5026 mkdir gnu
5027 (cd gnu
5028 TEST_TAR_FORMAT=gnu
5029 export TEST_TAR_FORMAT
5030 TAR_OPTIONS="-H gnu"
5031 export TAR_OPTIONS
5032 rm -rf *
5033
5034
5035 test -z "`sort < /dev/null 2>&1`" || exit 77
5036
5037
5038 genfile -l 1024 -f file1
5039 genfile -l 1024 -f file2
5040 tar cf archive file1 file2
5041
5042 mkdir directory
5043 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5044
5045 ls directory|sort
5046 )
5047 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5048 at_status=$? at_failed=false
5049 $at_check_filter
5050 at_fn_diff_devnull "$at_stderr" || at_failed=:
5051 echo >>"$at_stdout"; $as_echo "file1
5052 file2
5053 " | \
5054   $at_diff - "$at_stdout" || at_failed=:
5055 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
5056 $at_failed && at_fn_log_failure
5057 $at_traceon; }
5058
5059
5060
5061
5062   set +x
5063   $at_times_p && times >"$at_times_file"
5064 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5065 read at_status <"$at_status_file"
5066 #AT_STOP_24
5067 #AT_START_25
5068 at_fn_group_banner 25 'same-order02.at:25' \
5069   "multiple -C options" "                            " 4
5070 at_xfail=no
5071       test -f $XFAILFILE && at_xfail=yes
5072 (
5073   $as_echo "25. $at_setup_line: testing $at_desc ..."
5074   $at_traceon
5075
5076
5077
5078
5079
5080   { set +x
5081 $as_echo "$at_srcdir/same-order02.at:28:
5082 mkdir v7
5083 (cd v7
5084 TEST_TAR_FORMAT=v7
5085 export TEST_TAR_FORMAT
5086 TAR_OPTIONS=\"-H v7\"
5087 export TAR_OPTIONS
5088 rm -rf *
5089
5090 genfile -l 1024 -f file1
5091 genfile -l 1024 -f file2
5092 tar cf archive file1 file2
5093
5094 mkdir en
5095 mkdir to
5096
5097 HERE=\`pwd\`
5098 tar -xf archive --same-order --warning=no-timestamp \\
5099   -C \$HERE/en file1 \\
5100   -C \$HERE/to file2 || exit 1
5101
5102 ls en
5103 echo separator
5104 ls to
5105 )"
5106 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5107 ( $at_check_trace;
5108 mkdir v7
5109 (cd v7
5110 TEST_TAR_FORMAT=v7
5111 export TEST_TAR_FORMAT
5112 TAR_OPTIONS="-H v7"
5113 export TAR_OPTIONS
5114 rm -rf *
5115
5116 genfile -l 1024 -f file1
5117 genfile -l 1024 -f file2
5118 tar cf archive file1 file2
5119
5120 mkdir en
5121 mkdir to
5122
5123 HERE=`pwd`
5124 tar -xf archive --same-order --warning=no-timestamp \
5125   -C $HERE/en file1 \
5126   -C $HERE/to file2 || exit 1
5127
5128 ls en
5129 echo separator
5130 ls to
5131 )
5132 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5133 at_status=$? at_failed=false
5134 $at_check_filter
5135 at_fn_diff_devnull "$at_stderr" || at_failed=:
5136 echo >>"$at_stdout"; $as_echo "file1
5137 separator
5138 file2
5139 " | \
5140   $at_diff - "$at_stdout" || at_failed=:
5141 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5142 $at_failed && at_fn_log_failure
5143 $at_traceon; }
5144
5145               { set +x
5146 $as_echo "$at_srcdir/same-order02.at:28:
5147 mkdir oldgnu
5148 (cd oldgnu
5149 TEST_TAR_FORMAT=oldgnu
5150 export TEST_TAR_FORMAT
5151 TAR_OPTIONS=\"-H oldgnu\"
5152 export TAR_OPTIONS
5153 rm -rf *
5154
5155 genfile -l 1024 -f file1
5156 genfile -l 1024 -f file2
5157 tar cf archive file1 file2
5158
5159 mkdir en
5160 mkdir to
5161
5162 HERE=\`pwd\`
5163 tar -xf archive --same-order --warning=no-timestamp \\
5164   -C \$HERE/en file1 \\
5165   -C \$HERE/to file2 || exit 1
5166
5167 ls en
5168 echo separator
5169 ls to
5170 )"
5171 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5172 ( $at_check_trace;
5173 mkdir oldgnu
5174 (cd oldgnu
5175 TEST_TAR_FORMAT=oldgnu
5176 export TEST_TAR_FORMAT
5177 TAR_OPTIONS="-H oldgnu"
5178 export TAR_OPTIONS
5179 rm -rf *
5180
5181 genfile -l 1024 -f file1
5182 genfile -l 1024 -f file2
5183 tar cf archive file1 file2
5184
5185 mkdir en
5186 mkdir to
5187
5188 HERE=`pwd`
5189 tar -xf archive --same-order --warning=no-timestamp \
5190   -C $HERE/en file1 \
5191   -C $HERE/to file2 || exit 1
5192
5193 ls en
5194 echo separator
5195 ls to
5196 )
5197 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5198 at_status=$? at_failed=false
5199 $at_check_filter
5200 at_fn_diff_devnull "$at_stderr" || at_failed=:
5201 echo >>"$at_stdout"; $as_echo "file1
5202 separator
5203 file2
5204 " | \
5205   $at_diff - "$at_stdout" || at_failed=:
5206 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5207 $at_failed && at_fn_log_failure
5208 $at_traceon; }
5209
5210               { set +x
5211 $as_echo "$at_srcdir/same-order02.at:28:
5212 mkdir ustar
5213 (cd ustar
5214 TEST_TAR_FORMAT=ustar
5215 export TEST_TAR_FORMAT
5216 TAR_OPTIONS=\"-H ustar\"
5217 export TAR_OPTIONS
5218 rm -rf *
5219
5220 genfile -l 1024 -f file1
5221 genfile -l 1024 -f file2
5222 tar cf archive file1 file2
5223
5224 mkdir en
5225 mkdir to
5226
5227 HERE=\`pwd\`
5228 tar -xf archive --same-order --warning=no-timestamp \\
5229   -C \$HERE/en file1 \\
5230   -C \$HERE/to file2 || exit 1
5231
5232 ls en
5233 echo separator
5234 ls to
5235 )"
5236 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5237 ( $at_check_trace;
5238 mkdir ustar
5239 (cd ustar
5240 TEST_TAR_FORMAT=ustar
5241 export TEST_TAR_FORMAT
5242 TAR_OPTIONS="-H ustar"
5243 export TAR_OPTIONS
5244 rm -rf *
5245
5246 genfile -l 1024 -f file1
5247 genfile -l 1024 -f file2
5248 tar cf archive file1 file2
5249
5250 mkdir en
5251 mkdir to
5252
5253 HERE=`pwd`
5254 tar -xf archive --same-order --warning=no-timestamp \
5255   -C $HERE/en file1 \
5256   -C $HERE/to file2 || exit 1
5257
5258 ls en
5259 echo separator
5260 ls to
5261 )
5262 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5263 at_status=$? at_failed=false
5264 $at_check_filter
5265 at_fn_diff_devnull "$at_stderr" || at_failed=:
5266 echo >>"$at_stdout"; $as_echo "file1
5267 separator
5268 file2
5269 " | \
5270   $at_diff - "$at_stdout" || at_failed=:
5271 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5272 $at_failed && at_fn_log_failure
5273 $at_traceon; }
5274
5275               { set +x
5276 $as_echo "$at_srcdir/same-order02.at:28:
5277 mkdir posix
5278 (cd posix
5279 TEST_TAR_FORMAT=posix
5280 export TEST_TAR_FORMAT
5281 TAR_OPTIONS=\"-H posix\"
5282 export TAR_OPTIONS
5283 rm -rf *
5284
5285 genfile -l 1024 -f file1
5286 genfile -l 1024 -f file2
5287 tar cf archive file1 file2
5288
5289 mkdir en
5290 mkdir to
5291
5292 HERE=\`pwd\`
5293 tar -xf archive --same-order --warning=no-timestamp \\
5294   -C \$HERE/en file1 \\
5295   -C \$HERE/to file2 || exit 1
5296
5297 ls en
5298 echo separator
5299 ls to
5300 )"
5301 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5302 ( $at_check_trace;
5303 mkdir posix
5304 (cd posix
5305 TEST_TAR_FORMAT=posix
5306 export TEST_TAR_FORMAT
5307 TAR_OPTIONS="-H posix"
5308 export TAR_OPTIONS
5309 rm -rf *
5310
5311 genfile -l 1024 -f file1
5312 genfile -l 1024 -f file2
5313 tar cf archive file1 file2
5314
5315 mkdir en
5316 mkdir to
5317
5318 HERE=`pwd`
5319 tar -xf archive --same-order --warning=no-timestamp \
5320   -C $HERE/en file1 \
5321   -C $HERE/to file2 || exit 1
5322
5323 ls en
5324 echo separator
5325 ls to
5326 )
5327 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5328 at_status=$? at_failed=false
5329 $at_check_filter
5330 at_fn_diff_devnull "$at_stderr" || at_failed=:
5331 echo >>"$at_stdout"; $as_echo "file1
5332 separator
5333 file2
5334 " | \
5335   $at_diff - "$at_stdout" || at_failed=:
5336 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5337 $at_failed && at_fn_log_failure
5338 $at_traceon; }
5339
5340               { set +x
5341 $as_echo "$at_srcdir/same-order02.at:28:
5342 mkdir gnu
5343 (cd gnu
5344 TEST_TAR_FORMAT=gnu
5345 export TEST_TAR_FORMAT
5346 TAR_OPTIONS=\"-H gnu\"
5347 export TAR_OPTIONS
5348 rm -rf *
5349
5350 genfile -l 1024 -f file1
5351 genfile -l 1024 -f file2
5352 tar cf archive file1 file2
5353
5354 mkdir en
5355 mkdir to
5356
5357 HERE=\`pwd\`
5358 tar -xf archive --same-order --warning=no-timestamp \\
5359   -C \$HERE/en file1 \\
5360   -C \$HERE/to file2 || exit 1
5361
5362 ls en
5363 echo separator
5364 ls to
5365 )"
5366 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5367 ( $at_check_trace;
5368 mkdir gnu
5369 (cd gnu
5370 TEST_TAR_FORMAT=gnu
5371 export TEST_TAR_FORMAT
5372 TAR_OPTIONS="-H gnu"
5373 export TAR_OPTIONS
5374 rm -rf *
5375
5376 genfile -l 1024 -f file1
5377 genfile -l 1024 -f file2
5378 tar cf archive file1 file2
5379
5380 mkdir en
5381 mkdir to
5382
5383 HERE=`pwd`
5384 tar -xf archive --same-order --warning=no-timestamp \
5385   -C $HERE/en file1 \
5386   -C $HERE/to file2 || exit 1
5387
5388 ls en
5389 echo separator
5390 ls to
5391 )
5392 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5393 at_status=$? at_failed=false
5394 $at_check_filter
5395 at_fn_diff_devnull "$at_stderr" || at_failed=:
5396 echo >>"$at_stdout"; $as_echo "file1
5397 separator
5398 file2
5399 " | \
5400   $at_diff - "$at_stdout" || at_failed=:
5401 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5402 $at_failed && at_fn_log_failure
5403 $at_traceon; }
5404
5405
5406
5407
5408   set +x
5409   $at_times_p && times >"$at_times_file"
5410 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5411 read at_status <"$at_status_file"
5412 #AT_STOP_25
5413 #AT_START_26
5414 at_fn_group_banner 26 'append.at:21' \
5415   "append" "                                         " 5
5416 at_xfail=no
5417       test -f $XFAILFILE && at_xfail=yes
5418 (
5419   $as_echo "26. $at_setup_line: testing $at_desc ..."
5420   $at_traceon
5421
5422
5423
5424
5425
5426   { set +x
5427 $as_echo "$at_srcdir/append.at:24:
5428 mkdir v7
5429 (cd v7
5430 TEST_TAR_FORMAT=v7
5431 export TEST_TAR_FORMAT
5432 TAR_OPTIONS=\"-H v7\"
5433 export TAR_OPTIONS
5434 rm -rf *
5435 touch file1
5436           touch file2
5437           tar cf archive file1
5438           tar rf archive file2
5439           tar tf archive)"
5440 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
5441 ( $at_check_trace;
5442 mkdir v7
5443 (cd v7
5444 TEST_TAR_FORMAT=v7
5445 export TEST_TAR_FORMAT
5446 TAR_OPTIONS="-H v7"
5447 export TAR_OPTIONS
5448 rm -rf *
5449 touch file1
5450           touch file2
5451           tar cf archive file1
5452           tar rf archive file2
5453           tar tf archive)
5454 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5455 at_status=$? at_failed=false
5456 $at_check_filter
5457 at_fn_diff_devnull "$at_stderr" || at_failed=:
5458 echo >>"$at_stdout"; $as_echo "file1
5459 file2
5460 " | \
5461   $at_diff - "$at_stdout" || at_failed=:
5462 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
5463 $at_failed && at_fn_log_failure
5464 $at_traceon; }
5465
5466               { set +x
5467 $as_echo "$at_srcdir/append.at:24:
5468 mkdir oldgnu
5469 (cd oldgnu
5470 TEST_TAR_FORMAT=oldgnu
5471 export TEST_TAR_FORMAT
5472 TAR_OPTIONS=\"-H oldgnu\"
5473 export TAR_OPTIONS
5474 rm -rf *
5475 touch file1
5476           touch file2
5477           tar cf archive file1
5478           tar rf archive file2
5479           tar tf archive)"
5480 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
5481 ( $at_check_trace;
5482 mkdir oldgnu
5483 (cd oldgnu
5484 TEST_TAR_FORMAT=oldgnu
5485 export TEST_TAR_FORMAT
5486 TAR_OPTIONS="-H oldgnu"
5487 export TAR_OPTIONS
5488 rm -rf *
5489 touch file1
5490           touch file2
5491           tar cf archive file1
5492           tar rf archive file2
5493           tar tf archive)
5494 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5495 at_status=$? at_failed=false
5496 $at_check_filter
5497 at_fn_diff_devnull "$at_stderr" || at_failed=:
5498 echo >>"$at_stdout"; $as_echo "file1
5499 file2
5500 " | \
5501   $at_diff - "$at_stdout" || at_failed=:
5502 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
5503 $at_failed && at_fn_log_failure
5504 $at_traceon; }
5505
5506               { set +x
5507 $as_echo "$at_srcdir/append.at:24:
5508 mkdir ustar
5509 (cd ustar
5510 TEST_TAR_FORMAT=ustar
5511 export TEST_TAR_FORMAT
5512 TAR_OPTIONS=\"-H ustar\"
5513 export TAR_OPTIONS
5514 rm -rf *
5515 touch file1
5516           touch file2
5517           tar cf archive file1
5518           tar rf archive file2
5519           tar tf archive)"
5520 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
5521 ( $at_check_trace;
5522 mkdir ustar
5523 (cd ustar
5524 TEST_TAR_FORMAT=ustar
5525 export TEST_TAR_FORMAT
5526 TAR_OPTIONS="-H ustar"
5527 export TAR_OPTIONS
5528 rm -rf *
5529 touch file1
5530           touch file2
5531           tar cf archive file1
5532           tar rf archive file2
5533           tar tf archive)
5534 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5535 at_status=$? at_failed=false
5536 $at_check_filter
5537 at_fn_diff_devnull "$at_stderr" || at_failed=:
5538 echo >>"$at_stdout"; $as_echo "file1
5539 file2
5540 " | \
5541   $at_diff - "$at_stdout" || at_failed=:
5542 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
5543 $at_failed && at_fn_log_failure
5544 $at_traceon; }
5545
5546               { set +x
5547 $as_echo "$at_srcdir/append.at:24:
5548 mkdir posix
5549 (cd posix
5550 TEST_TAR_FORMAT=posix
5551 export TEST_TAR_FORMAT
5552 TAR_OPTIONS=\"-H posix\"
5553 export TAR_OPTIONS
5554 rm -rf *
5555 touch file1
5556           touch file2
5557           tar cf archive file1
5558           tar rf archive file2
5559           tar tf archive)"
5560 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
5561 ( $at_check_trace;
5562 mkdir posix
5563 (cd posix
5564 TEST_TAR_FORMAT=posix
5565 export TEST_TAR_FORMAT
5566 TAR_OPTIONS="-H posix"
5567 export TAR_OPTIONS
5568 rm -rf *
5569 touch file1
5570           touch file2
5571           tar cf archive file1
5572           tar rf archive file2
5573           tar tf archive)
5574 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5575 at_status=$? at_failed=false
5576 $at_check_filter
5577 at_fn_diff_devnull "$at_stderr" || at_failed=:
5578 echo >>"$at_stdout"; $as_echo "file1
5579 file2
5580 " | \
5581   $at_diff - "$at_stdout" || at_failed=:
5582 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
5583 $at_failed && at_fn_log_failure
5584 $at_traceon; }
5585
5586               { set +x
5587 $as_echo "$at_srcdir/append.at:24:
5588 mkdir gnu
5589 (cd gnu
5590 TEST_TAR_FORMAT=gnu
5591 export TEST_TAR_FORMAT
5592 TAR_OPTIONS=\"-H gnu\"
5593 export TAR_OPTIONS
5594 rm -rf *
5595 touch file1
5596           touch file2
5597           tar cf archive file1
5598           tar rf archive file2
5599           tar tf archive)"
5600 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
5601 ( $at_check_trace;
5602 mkdir gnu
5603 (cd gnu
5604 TEST_TAR_FORMAT=gnu
5605 export TEST_TAR_FORMAT
5606 TAR_OPTIONS="-H gnu"
5607 export TAR_OPTIONS
5608 rm -rf *
5609 touch file1
5610           touch file2
5611           tar cf archive file1
5612           tar rf archive file2
5613           tar tf archive)
5614 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5615 at_status=$? at_failed=false
5616 $at_check_filter
5617 at_fn_diff_devnull "$at_stderr" || at_failed=:
5618 echo >>"$at_stdout"; $as_echo "file1
5619 file2
5620 " | \
5621   $at_diff - "$at_stdout" || at_failed=:
5622 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
5623 $at_failed && at_fn_log_failure
5624 $at_traceon; }
5625
5626
5627
5628
5629   set +x
5630   $at_times_p && times >"$at_times_file"
5631 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5632 read at_status <"$at_status_file"
5633 #AT_STOP_26
5634 #AT_START_27
5635 at_fn_group_banner 27 'append01.at:29' \
5636   "appending files with long names" "                " 5
5637 at_xfail=no
5638       test -f $XFAILFILE && at_xfail=yes
5639 (
5640   $as_echo "27. $at_setup_line: testing $at_desc ..."
5641   $at_traceon
5642
5643
5644
5645
5646
5647
5648
5649   { set +x
5650 $as_echo "$at_srcdir/append01.at:34:
5651 mkdir oldgnu
5652 (cd oldgnu
5653 TEST_TAR_FORMAT=oldgnu
5654 export TEST_TAR_FORMAT
5655 TAR_OPTIONS=\"-H oldgnu\"
5656 export TAR_OPTIONS
5657 rm -rf *
5658
5659 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
5660 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
5661 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
5662 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
5663 tar tf archive
5664 )"
5665 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
5666 ( $at_check_trace;
5667 mkdir oldgnu
5668 (cd oldgnu
5669 TEST_TAR_FORMAT=oldgnu
5670 export TEST_TAR_FORMAT
5671 TAR_OPTIONS="-H oldgnu"
5672 export TAR_OPTIONS
5673 rm -rf *
5674
5675 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
5676 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
5677 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
5678 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
5679 tar tf archive
5680 )
5681 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5682 at_status=$? at_failed=false
5683 $at_check_filter
5684 at_fn_diff_devnull "$at_stderr" || at_failed=:
5685 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
5686 This_is_a_very_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
5687 " | \
5688   $at_diff - "$at_stdout" || at_failed=:
5689 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
5690 $at_failed && at_fn_log_failure
5691 $at_traceon; }
5692
5693               { set +x
5694 $as_echo "$at_srcdir/append01.at:34:
5695 mkdir ustar
5696 (cd ustar
5697 TEST_TAR_FORMAT=ustar
5698 export TEST_TAR_FORMAT
5699 TAR_OPTIONS=\"-H ustar\"
5700 export TAR_OPTIONS
5701 rm -rf *
5702
5703 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
5704 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
5705 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
5706 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
5707 tar tf archive
5708 )"
5709 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
5710 ( $at_check_trace;
5711 mkdir ustar
5712 (cd ustar
5713 TEST_TAR_FORMAT=ustar
5714 export TEST_TAR_FORMAT
5715 TAR_OPTIONS="-H ustar"
5716 export TAR_OPTIONS
5717 rm -rf *
5718
5719 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
5720 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
5721 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
5722 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
5723 tar tf archive
5724 )
5725 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5726 at_status=$? at_failed=false
5727 $at_check_filter
5728 at_fn_diff_devnull "$at_stderr" || at_failed=:
5729 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
5730 This_is_a_very_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
5731 " | \
5732   $at_diff - "$at_stdout" || at_failed=:
5733 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
5734 $at_failed && at_fn_log_failure
5735 $at_traceon; }
5736
5737               { set +x
5738 $as_echo "$at_srcdir/append01.at:34:
5739 mkdir posix
5740 (cd posix
5741 TEST_TAR_FORMAT=posix
5742 export TEST_TAR_FORMAT
5743 TAR_OPTIONS=\"-H posix\"
5744 export TAR_OPTIONS
5745 rm -rf *
5746
5747 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
5748 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
5749 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
5750 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
5751 tar tf archive
5752 )"
5753 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
5754 ( $at_check_trace;
5755 mkdir posix
5756 (cd posix
5757 TEST_TAR_FORMAT=posix
5758 export TEST_TAR_FORMAT
5759 TAR_OPTIONS="-H posix"
5760 export TAR_OPTIONS
5761 rm -rf *
5762
5763 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
5764 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
5765 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
5766 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
5767 tar tf archive
5768 )
5769 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5770 at_status=$? at_failed=false
5771 $at_check_filter
5772 at_fn_diff_devnull "$at_stderr" || at_failed=:
5773 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
5774 This_is_a_very_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
5775 " | \
5776   $at_diff - "$at_stdout" || at_failed=:
5777 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
5778 $at_failed && at_fn_log_failure
5779 $at_traceon; }
5780
5781               { set +x
5782 $as_echo "$at_srcdir/append01.at:34:
5783 mkdir gnu
5784 (cd gnu
5785 TEST_TAR_FORMAT=gnu
5786 export TEST_TAR_FORMAT
5787 TAR_OPTIONS=\"-H gnu\"
5788 export TAR_OPTIONS
5789 rm -rf *
5790
5791 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
5792 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
5793 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
5794 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
5795 tar tf archive
5796 )"
5797 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
5798 ( $at_check_trace;
5799 mkdir gnu
5800 (cd gnu
5801 TEST_TAR_FORMAT=gnu
5802 export TEST_TAR_FORMAT
5803 TAR_OPTIONS="-H gnu"
5804 export TAR_OPTIONS
5805 rm -rf *
5806
5807 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
5808 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
5809 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
5810 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
5811 tar tf archive
5812 )
5813 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5814 at_status=$? at_failed=false
5815 $at_check_filter
5816 at_fn_diff_devnull "$at_stderr" || at_failed=:
5817 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
5818 This_is_a_very_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
5819 " | \
5820   $at_diff - "$at_stdout" || at_failed=:
5821 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
5822 $at_failed && at_fn_log_failure
5823 $at_traceon; }
5824
5825
5826
5827
5828
5829   set +x
5830   $at_times_p && times >"$at_times_file"
5831 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5832 read at_status <"$at_status_file"
5833 #AT_STOP_27
5834 #AT_START_28
5835 at_fn_group_banner 28 'append02.at:54' \
5836   "append vs. create" "                              " 5
5837 at_xfail=no
5838       test -f $XFAILFILE && at_xfail=yes
5839 (
5840   $as_echo "28. $at_setup_line: testing $at_desc ..."
5841   $at_traceon
5842
5843
5844
5845
5846
5847   { set +x
5848 $as_echo "$at_srcdir/append02.at:57:
5849 mkdir v7
5850 (cd v7
5851 TEST_TAR_FORMAT=v7
5852 export TEST_TAR_FORMAT
5853 TAR_OPTIONS=\"-H v7\"
5854 export TAR_OPTIONS
5855 rm -rf *
5856
5857 genfile --file file1
5858 genfile --file file2
5859
5860 # Make sure file timestamps in the archive will not differ
5861 MTIME=\"--mtime=@0\"
5862
5863 # For PAX archives, we need to make sure extended header names are
5864 # reproducible and that their contents won't change with time
5865 if test \$TEST_TAR_FORMAT = posix; then
5866   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
5867 fi
5868
5869 echo Creating archive.1
5870 tar \$MTIME -cf archive.1 file1 file2
5871
5872 echo Creating archive.2
5873 tar \$MTIME -cf archive.2 -T /dev/null
5874 tar \$MTIME -rf archive.2 file1
5875 tar \$MTIME -rf archive.2 file2
5876
5877 echo Comparing archives
5878 cmp archive.1 archive.2
5879 )"
5880 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
5881 ( $at_check_trace;
5882 mkdir v7
5883 (cd v7
5884 TEST_TAR_FORMAT=v7
5885 export TEST_TAR_FORMAT
5886 TAR_OPTIONS="-H v7"
5887 export TAR_OPTIONS
5888 rm -rf *
5889
5890 genfile --file file1
5891 genfile --file file2
5892
5893 # Make sure file timestamps in the archive will not differ
5894 MTIME="--mtime=@0"
5895
5896 # For PAX archives, we need to make sure extended header names are
5897 # reproducible and that their contents won't change with time
5898 if test $TEST_TAR_FORMAT = posix; then
5899   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
5900 fi
5901
5902 echo Creating archive.1
5903 tar $MTIME -cf archive.1 file1 file2
5904
5905 echo Creating archive.2
5906 tar $MTIME -cf archive.2 -T /dev/null
5907 tar $MTIME -rf archive.2 file1
5908 tar $MTIME -rf archive.2 file2
5909
5910 echo Comparing archives
5911 cmp archive.1 archive.2
5912 )
5913 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5914 at_status=$? at_failed=false
5915 $at_check_filter
5916 at_fn_diff_devnull "$at_stderr" || at_failed=:
5917 echo >>"$at_stdout"; $as_echo "Creating archive.1
5918 Creating archive.2
5919 Comparing archives
5920 " | \
5921   $at_diff - "$at_stdout" || at_failed=:
5922 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
5923 $at_failed && at_fn_log_failure
5924 $at_traceon; }
5925
5926               { set +x
5927 $as_echo "$at_srcdir/append02.at:57:
5928 mkdir oldgnu
5929 (cd oldgnu
5930 TEST_TAR_FORMAT=oldgnu
5931 export TEST_TAR_FORMAT
5932 TAR_OPTIONS=\"-H oldgnu\"
5933 export TAR_OPTIONS
5934 rm -rf *
5935
5936 genfile --file file1
5937 genfile --file file2
5938
5939 # Make sure file timestamps in the archive will not differ
5940 MTIME=\"--mtime=@0\"
5941
5942 # For PAX archives, we need to make sure extended header names are
5943 # reproducible and that their contents won't change with time
5944 if test \$TEST_TAR_FORMAT = posix; then
5945   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
5946 fi
5947
5948 echo Creating archive.1
5949 tar \$MTIME -cf archive.1 file1 file2
5950
5951 echo Creating archive.2
5952 tar \$MTIME -cf archive.2 -T /dev/null
5953 tar \$MTIME -rf archive.2 file1
5954 tar \$MTIME -rf archive.2 file2
5955
5956 echo Comparing archives
5957 cmp archive.1 archive.2
5958 )"
5959 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
5960 ( $at_check_trace;
5961 mkdir oldgnu
5962 (cd oldgnu
5963 TEST_TAR_FORMAT=oldgnu
5964 export TEST_TAR_FORMAT
5965 TAR_OPTIONS="-H oldgnu"
5966 export TAR_OPTIONS
5967 rm -rf *
5968
5969 genfile --file file1
5970 genfile --file file2
5971
5972 # Make sure file timestamps in the archive will not differ
5973 MTIME="--mtime=@0"
5974
5975 # For PAX archives, we need to make sure extended header names are
5976 # reproducible and that their contents won't change with time
5977 if test $TEST_TAR_FORMAT = posix; then
5978   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
5979 fi
5980
5981 echo Creating archive.1
5982 tar $MTIME -cf archive.1 file1 file2
5983
5984 echo Creating archive.2
5985 tar $MTIME -cf archive.2 -T /dev/null
5986 tar $MTIME -rf archive.2 file1
5987 tar $MTIME -rf archive.2 file2
5988
5989 echo Comparing archives
5990 cmp archive.1 archive.2
5991 )
5992 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5993 at_status=$? at_failed=false
5994 $at_check_filter
5995 at_fn_diff_devnull "$at_stderr" || at_failed=:
5996 echo >>"$at_stdout"; $as_echo "Creating archive.1
5997 Creating archive.2
5998 Comparing archives
5999 " | \
6000   $at_diff - "$at_stdout" || at_failed=:
6001 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6002 $at_failed && at_fn_log_failure
6003 $at_traceon; }
6004
6005               { set +x
6006 $as_echo "$at_srcdir/append02.at:57:
6007 mkdir ustar
6008 (cd ustar
6009 TEST_TAR_FORMAT=ustar
6010 export TEST_TAR_FORMAT
6011 TAR_OPTIONS=\"-H ustar\"
6012 export TAR_OPTIONS
6013 rm -rf *
6014
6015 genfile --file file1
6016 genfile --file file2
6017
6018 # Make sure file timestamps in the archive will not differ
6019 MTIME=\"--mtime=@0\"
6020
6021 # For PAX archives, we need to make sure extended header names are
6022 # reproducible and that their contents won't change with time
6023 if test \$TEST_TAR_FORMAT = posix; then
6024   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
6025 fi
6026
6027 echo Creating archive.1
6028 tar \$MTIME -cf archive.1 file1 file2
6029
6030 echo Creating archive.2
6031 tar \$MTIME -cf archive.2 -T /dev/null
6032 tar \$MTIME -rf archive.2 file1
6033 tar \$MTIME -rf archive.2 file2
6034
6035 echo Comparing archives
6036 cmp archive.1 archive.2
6037 )"
6038 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
6039 ( $at_check_trace;
6040 mkdir ustar
6041 (cd ustar
6042 TEST_TAR_FORMAT=ustar
6043 export TEST_TAR_FORMAT
6044 TAR_OPTIONS="-H ustar"
6045 export TAR_OPTIONS
6046 rm -rf *
6047
6048 genfile --file file1
6049 genfile --file file2
6050
6051 # Make sure file timestamps in the archive will not differ
6052 MTIME="--mtime=@0"
6053
6054 # For PAX archives, we need to make sure extended header names are
6055 # reproducible and that their contents won't change with time
6056 if test $TEST_TAR_FORMAT = posix; then
6057   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
6058 fi
6059
6060 echo Creating archive.1
6061 tar $MTIME -cf archive.1 file1 file2
6062
6063 echo Creating archive.2
6064 tar $MTIME -cf archive.2 -T /dev/null
6065 tar $MTIME -rf archive.2 file1
6066 tar $MTIME -rf archive.2 file2
6067
6068 echo Comparing archives
6069 cmp archive.1 archive.2
6070 )
6071 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6072 at_status=$? at_failed=false
6073 $at_check_filter
6074 at_fn_diff_devnull "$at_stderr" || at_failed=:
6075 echo >>"$at_stdout"; $as_echo "Creating archive.1
6076 Creating archive.2
6077 Comparing archives
6078 " | \
6079   $at_diff - "$at_stdout" || at_failed=:
6080 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6081 $at_failed && at_fn_log_failure
6082 $at_traceon; }
6083
6084               { set +x
6085 $as_echo "$at_srcdir/append02.at:57:
6086 mkdir posix
6087 (cd posix
6088 TEST_TAR_FORMAT=posix
6089 export TEST_TAR_FORMAT
6090 TAR_OPTIONS=\"-H posix\"
6091 export TAR_OPTIONS
6092 rm -rf *
6093
6094 genfile --file file1
6095 genfile --file file2
6096
6097 # Make sure file timestamps in the archive will not differ
6098 MTIME=\"--mtime=@0\"
6099
6100 # For PAX archives, we need to make sure extended header names are
6101 # reproducible and that their contents won't change with time
6102 if test \$TEST_TAR_FORMAT = posix; then
6103   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
6104 fi
6105
6106 echo Creating archive.1
6107 tar \$MTIME -cf archive.1 file1 file2
6108
6109 echo Creating archive.2
6110 tar \$MTIME -cf archive.2 -T /dev/null
6111 tar \$MTIME -rf archive.2 file1
6112 tar \$MTIME -rf archive.2 file2
6113
6114 echo Comparing archives
6115 cmp archive.1 archive.2
6116 )"
6117 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
6118 ( $at_check_trace;
6119 mkdir posix
6120 (cd posix
6121 TEST_TAR_FORMAT=posix
6122 export TEST_TAR_FORMAT
6123 TAR_OPTIONS="-H posix"
6124 export TAR_OPTIONS
6125 rm -rf *
6126
6127 genfile --file file1
6128 genfile --file file2
6129
6130 # Make sure file timestamps in the archive will not differ
6131 MTIME="--mtime=@0"
6132
6133 # For PAX archives, we need to make sure extended header names are
6134 # reproducible and that their contents won't change with time
6135 if test $TEST_TAR_FORMAT = posix; then
6136   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
6137 fi
6138
6139 echo Creating archive.1
6140 tar $MTIME -cf archive.1 file1 file2
6141
6142 echo Creating archive.2
6143 tar $MTIME -cf archive.2 -T /dev/null
6144 tar $MTIME -rf archive.2 file1
6145 tar $MTIME -rf archive.2 file2
6146
6147 echo Comparing archives
6148 cmp archive.1 archive.2
6149 )
6150 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6151 at_status=$? at_failed=false
6152 $at_check_filter
6153 at_fn_diff_devnull "$at_stderr" || at_failed=:
6154 echo >>"$at_stdout"; $as_echo "Creating archive.1
6155 Creating archive.2
6156 Comparing archives
6157 " | \
6158   $at_diff - "$at_stdout" || at_failed=:
6159 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6160 $at_failed && at_fn_log_failure
6161 $at_traceon; }
6162
6163               { set +x
6164 $as_echo "$at_srcdir/append02.at:57:
6165 mkdir gnu
6166 (cd gnu
6167 TEST_TAR_FORMAT=gnu
6168 export TEST_TAR_FORMAT
6169 TAR_OPTIONS=\"-H gnu\"
6170 export TAR_OPTIONS
6171 rm -rf *
6172
6173 genfile --file file1
6174 genfile --file file2
6175
6176 # Make sure file timestamps in the archive will not differ
6177 MTIME=\"--mtime=@0\"
6178
6179 # For PAX archives, we need to make sure extended header names are
6180 # reproducible and that their contents won't change with time
6181 if test \$TEST_TAR_FORMAT = posix; then
6182   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
6183 fi
6184
6185 echo Creating archive.1
6186 tar \$MTIME -cf archive.1 file1 file2
6187
6188 echo Creating archive.2
6189 tar \$MTIME -cf archive.2 -T /dev/null
6190 tar \$MTIME -rf archive.2 file1
6191 tar \$MTIME -rf archive.2 file2
6192
6193 echo Comparing archives
6194 cmp archive.1 archive.2
6195 )"
6196 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
6197 ( $at_check_trace;
6198 mkdir gnu
6199 (cd gnu
6200 TEST_TAR_FORMAT=gnu
6201 export TEST_TAR_FORMAT
6202 TAR_OPTIONS="-H gnu"
6203 export TAR_OPTIONS
6204 rm -rf *
6205
6206 genfile --file file1
6207 genfile --file file2
6208
6209 # Make sure file timestamps in the archive will not differ
6210 MTIME="--mtime=@0"
6211
6212 # For PAX archives, we need to make sure extended header names are
6213 # reproducible and that their contents won't change with time
6214 if test $TEST_TAR_FORMAT = posix; then
6215   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
6216 fi
6217
6218 echo Creating archive.1
6219 tar $MTIME -cf archive.1 file1 file2
6220
6221 echo Creating archive.2
6222 tar $MTIME -cf archive.2 -T /dev/null
6223 tar $MTIME -rf archive.2 file1
6224 tar $MTIME -rf archive.2 file2
6225
6226 echo Comparing archives
6227 cmp archive.1 archive.2
6228 )
6229 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6230 at_status=$? at_failed=false
6231 $at_check_filter
6232 at_fn_diff_devnull "$at_stderr" || at_failed=:
6233 echo >>"$at_stdout"; $as_echo "Creating archive.1
6234 Creating archive.2
6235 Comparing archives
6236 " | \
6237   $at_diff - "$at_stdout" || at_failed=:
6238 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6239 $at_failed && at_fn_log_failure
6240 $at_traceon; }
6241
6242
6243
6244
6245   set +x
6246   $at_times_p && times >"$at_times_file"
6247 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6248 read at_status <"$at_status_file"
6249 #AT_STOP_28
6250 #AT_START_29
6251 at_fn_group_banner 29 'append03.at:21' \
6252   "append with name transformation" "                " 5
6253 at_xfail=no
6254       test -f $XFAILFILE && at_xfail=yes
6255 (
6256   $as_echo "29. $at_setup_line: testing $at_desc ..."
6257   $at_traceon
6258
6259
6260
6261 # Description: Make sure filenames are transformed during append.
6262
6263
6264
6265   { set +x
6266 $as_echo "$at_srcdir/append03.at:26:
6267 mkdir v7
6268 (cd v7
6269 TEST_TAR_FORMAT=v7
6270 export TEST_TAR_FORMAT
6271 TAR_OPTIONS=\"-H v7\"
6272 export TAR_OPTIONS
6273 rm -rf *
6274
6275 genfile --file file.1
6276 genfile --file file.2
6277
6278 tar -c -f archive --transform 's/file/plik/' file.*
6279 echo Appending
6280 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6281 echo Testing
6282 tar tf archive
6283 )"
6284 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6285 ( $at_check_trace;
6286 mkdir v7
6287 (cd v7
6288 TEST_TAR_FORMAT=v7
6289 export TEST_TAR_FORMAT
6290 TAR_OPTIONS="-H v7"
6291 export TAR_OPTIONS
6292 rm -rf *
6293
6294 genfile --file file.1
6295 genfile --file file.2
6296
6297 tar -c -f archive --transform 's/file/plik/' file.*
6298 echo Appending
6299 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6300 echo Testing
6301 tar tf archive
6302 )
6303 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6304 at_status=$? at_failed=false
6305 $at_check_filter
6306 at_fn_diff_devnull "$at_stderr" || at_failed=:
6307 echo >>"$at_stdout"; $as_echo "Appending
6308 plik.1
6309 Testing
6310 plik.1
6311 plik.2
6312 plik.1
6313 " | \
6314   $at_diff - "$at_stdout" || at_failed=:
6315 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6316 $at_failed && at_fn_log_failure
6317 $at_traceon; }
6318
6319               { set +x
6320 $as_echo "$at_srcdir/append03.at:26:
6321 mkdir oldgnu
6322 (cd oldgnu
6323 TEST_TAR_FORMAT=oldgnu
6324 export TEST_TAR_FORMAT
6325 TAR_OPTIONS=\"-H oldgnu\"
6326 export TAR_OPTIONS
6327 rm -rf *
6328
6329 genfile --file file.1
6330 genfile --file file.2
6331
6332 tar -c -f archive --transform 's/file/plik/' file.*
6333 echo Appending
6334 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6335 echo Testing
6336 tar tf archive
6337 )"
6338 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6339 ( $at_check_trace;
6340 mkdir oldgnu
6341 (cd oldgnu
6342 TEST_TAR_FORMAT=oldgnu
6343 export TEST_TAR_FORMAT
6344 TAR_OPTIONS="-H oldgnu"
6345 export TAR_OPTIONS
6346 rm -rf *
6347
6348 genfile --file file.1
6349 genfile --file file.2
6350
6351 tar -c -f archive --transform 's/file/plik/' file.*
6352 echo Appending
6353 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6354 echo Testing
6355 tar tf archive
6356 )
6357 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6358 at_status=$? at_failed=false
6359 $at_check_filter
6360 at_fn_diff_devnull "$at_stderr" || at_failed=:
6361 echo >>"$at_stdout"; $as_echo "Appending
6362 plik.1
6363 Testing
6364 plik.1
6365 plik.2
6366 plik.1
6367 " | \
6368   $at_diff - "$at_stdout" || at_failed=:
6369 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6370 $at_failed && at_fn_log_failure
6371 $at_traceon; }
6372
6373               { set +x
6374 $as_echo "$at_srcdir/append03.at:26:
6375 mkdir ustar
6376 (cd ustar
6377 TEST_TAR_FORMAT=ustar
6378 export TEST_TAR_FORMAT
6379 TAR_OPTIONS=\"-H ustar\"
6380 export TAR_OPTIONS
6381 rm -rf *
6382
6383 genfile --file file.1
6384 genfile --file file.2
6385
6386 tar -c -f archive --transform 's/file/plik/' file.*
6387 echo Appending
6388 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6389 echo Testing
6390 tar tf archive
6391 )"
6392 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6393 ( $at_check_trace;
6394 mkdir ustar
6395 (cd ustar
6396 TEST_TAR_FORMAT=ustar
6397 export TEST_TAR_FORMAT
6398 TAR_OPTIONS="-H ustar"
6399 export TAR_OPTIONS
6400 rm -rf *
6401
6402 genfile --file file.1
6403 genfile --file file.2
6404
6405 tar -c -f archive --transform 's/file/plik/' file.*
6406 echo Appending
6407 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6408 echo Testing
6409 tar tf archive
6410 )
6411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6412 at_status=$? at_failed=false
6413 $at_check_filter
6414 at_fn_diff_devnull "$at_stderr" || at_failed=:
6415 echo >>"$at_stdout"; $as_echo "Appending
6416 plik.1
6417 Testing
6418 plik.1
6419 plik.2
6420 plik.1
6421 " | \
6422   $at_diff - "$at_stdout" || at_failed=:
6423 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6424 $at_failed && at_fn_log_failure
6425 $at_traceon; }
6426
6427               { set +x
6428 $as_echo "$at_srcdir/append03.at:26:
6429 mkdir posix
6430 (cd posix
6431 TEST_TAR_FORMAT=posix
6432 export TEST_TAR_FORMAT
6433 TAR_OPTIONS=\"-H posix\"
6434 export TAR_OPTIONS
6435 rm -rf *
6436
6437 genfile --file file.1
6438 genfile --file file.2
6439
6440 tar -c -f archive --transform 's/file/plik/' file.*
6441 echo Appending
6442 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6443 echo Testing
6444 tar tf archive
6445 )"
6446 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6447 ( $at_check_trace;
6448 mkdir posix
6449 (cd posix
6450 TEST_TAR_FORMAT=posix
6451 export TEST_TAR_FORMAT
6452 TAR_OPTIONS="-H posix"
6453 export TAR_OPTIONS
6454 rm -rf *
6455
6456 genfile --file file.1
6457 genfile --file file.2
6458
6459 tar -c -f archive --transform 's/file/plik/' file.*
6460 echo Appending
6461 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6462 echo Testing
6463 tar tf archive
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 echo >>"$at_stdout"; $as_echo "Appending
6470 plik.1
6471 Testing
6472 plik.1
6473 plik.2
6474 plik.1
6475 " | \
6476   $at_diff - "$at_stdout" || at_failed=:
6477 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6478 $at_failed && at_fn_log_failure
6479 $at_traceon; }
6480
6481               { set +x
6482 $as_echo "$at_srcdir/append03.at:26:
6483 mkdir gnu
6484 (cd gnu
6485 TEST_TAR_FORMAT=gnu
6486 export TEST_TAR_FORMAT
6487 TAR_OPTIONS=\"-H gnu\"
6488 export TAR_OPTIONS
6489 rm -rf *
6490
6491 genfile --file file.1
6492 genfile --file file.2
6493
6494 tar -c -f archive --transform 's/file/plik/' file.*
6495 echo Appending
6496 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6497 echo Testing
6498 tar tf archive
6499 )"
6500 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6501 ( $at_check_trace;
6502 mkdir gnu
6503 (cd gnu
6504 TEST_TAR_FORMAT=gnu
6505 export TEST_TAR_FORMAT
6506 TAR_OPTIONS="-H gnu"
6507 export TAR_OPTIONS
6508 rm -rf *
6509
6510 genfile --file file.1
6511 genfile --file file.2
6512
6513 tar -c -f archive --transform 's/file/plik/' file.*
6514 echo Appending
6515 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6516 echo Testing
6517 tar tf archive
6518 )
6519 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6520 at_status=$? at_failed=false
6521 $at_check_filter
6522 at_fn_diff_devnull "$at_stderr" || at_failed=:
6523 echo >>"$at_stdout"; $as_echo "Appending
6524 plik.1
6525 Testing
6526 plik.1
6527 plik.2
6528 plik.1
6529 " | \
6530   $at_diff - "$at_stdout" || at_failed=:
6531 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6532 $at_failed && at_fn_log_failure
6533 $at_traceon; }
6534
6535
6536
6537
6538   set +x
6539   $at_times_p && times >"$at_times_file"
6540 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6541 read at_status <"$at_status_file"
6542 #AT_STOP_29
6543 #AT_START_30
6544 at_fn_group_banner 30 'append04.at:29' \
6545   "append with verify" "                             " 5
6546 at_xfail=no
6547       test -f $XFAILFILE && at_xfail=yes
6548 (
6549   $as_echo "30. $at_setup_line: testing $at_desc ..."
6550   $at_traceon
6551
6552
6553
6554
6555
6556   { set +x
6557 $as_echo "$at_srcdir/append04.at:32:
6558 mkdir v7
6559 (cd v7
6560 TEST_TAR_FORMAT=v7
6561 export TEST_TAR_FORMAT
6562 TAR_OPTIONS=\"-H v7\"
6563 export TAR_OPTIONS
6564 rm -rf *
6565
6566 # Create two empty files:
6567 touch file1 file2
6568
6569 # Create an archive:
6570 tar cpfW archive.tar file1 file2
6571
6572 # Verify created archive by listing its content:
6573 tar -tf archive.tar
6574 echo ==
6575 # Create another empty file:
6576 touch file3
6577
6578 # Append it to the already created archive:
6579 tar rpfW archive.tar file3
6580
6581 # Verify content of the new archive:
6582 tar -tf archive.tar
6583 )"
6584 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
6585 ( $at_check_trace;
6586 mkdir v7
6587 (cd v7
6588 TEST_TAR_FORMAT=v7
6589 export TEST_TAR_FORMAT
6590 TAR_OPTIONS="-H v7"
6591 export TAR_OPTIONS
6592 rm -rf *
6593
6594 # Create two empty files:
6595 touch file1 file2
6596
6597 # Create an archive:
6598 tar cpfW archive.tar file1 file2
6599
6600 # Verify created archive by listing its content:
6601 tar -tf archive.tar
6602 echo ==
6603 # Create another empty file:
6604 touch file3
6605
6606 # Append it to the already created archive:
6607 tar rpfW archive.tar file3
6608
6609 # Verify content of the new archive:
6610 tar -tf archive.tar
6611 )
6612 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6613 at_status=$? at_failed=false
6614 $at_check_filter
6615 at_fn_diff_devnull "$at_stderr" || at_failed=:
6616 echo >>"$at_stdout"; $as_echo "file1
6617 file2
6618 ==
6619 file1
6620 file2
6621 file3
6622 " | \
6623   $at_diff - "$at_stdout" || at_failed=:
6624 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
6625 $at_failed && at_fn_log_failure
6626 $at_traceon; }
6627
6628               { set +x
6629 $as_echo "$at_srcdir/append04.at:32:
6630 mkdir oldgnu
6631 (cd oldgnu
6632 TEST_TAR_FORMAT=oldgnu
6633 export TEST_TAR_FORMAT
6634 TAR_OPTIONS=\"-H oldgnu\"
6635 export TAR_OPTIONS
6636 rm -rf *
6637
6638 # Create two empty files:
6639 touch file1 file2
6640
6641 # Create an archive:
6642 tar cpfW archive.tar file1 file2
6643
6644 # Verify created archive by listing its content:
6645 tar -tf archive.tar
6646 echo ==
6647 # Create another empty file:
6648 touch file3
6649
6650 # Append it to the already created archive:
6651 tar rpfW archive.tar file3
6652
6653 # Verify content of the new archive:
6654 tar -tf archive.tar
6655 )"
6656 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
6657 ( $at_check_trace;
6658 mkdir oldgnu
6659 (cd oldgnu
6660 TEST_TAR_FORMAT=oldgnu
6661 export TEST_TAR_FORMAT
6662 TAR_OPTIONS="-H oldgnu"
6663 export TAR_OPTIONS
6664 rm -rf *
6665
6666 # Create two empty files:
6667 touch file1 file2
6668
6669 # Create an archive:
6670 tar cpfW archive.tar file1 file2
6671
6672 # Verify created archive by listing its content:
6673 tar -tf archive.tar
6674 echo ==
6675 # Create another empty file:
6676 touch file3
6677
6678 # Append it to the already created archive:
6679 tar rpfW archive.tar file3
6680
6681 # Verify content of the new archive:
6682 tar -tf archive.tar
6683 )
6684 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6685 at_status=$? at_failed=false
6686 $at_check_filter
6687 at_fn_diff_devnull "$at_stderr" || at_failed=:
6688 echo >>"$at_stdout"; $as_echo "file1
6689 file2
6690 ==
6691 file1
6692 file2
6693 file3
6694 " | \
6695   $at_diff - "$at_stdout" || at_failed=:
6696 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
6697 $at_failed && at_fn_log_failure
6698 $at_traceon; }
6699
6700               { set +x
6701 $as_echo "$at_srcdir/append04.at:32:
6702 mkdir ustar
6703 (cd ustar
6704 TEST_TAR_FORMAT=ustar
6705 export TEST_TAR_FORMAT
6706 TAR_OPTIONS=\"-H ustar\"
6707 export TAR_OPTIONS
6708 rm -rf *
6709
6710 # Create two empty files:
6711 touch file1 file2
6712
6713 # Create an archive:
6714 tar cpfW archive.tar file1 file2
6715
6716 # Verify created archive by listing its content:
6717 tar -tf archive.tar
6718 echo ==
6719 # Create another empty file:
6720 touch file3
6721
6722 # Append it to the already created archive:
6723 tar rpfW archive.tar file3
6724
6725 # Verify content of the new archive:
6726 tar -tf archive.tar
6727 )"
6728 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
6729 ( $at_check_trace;
6730 mkdir ustar
6731 (cd ustar
6732 TEST_TAR_FORMAT=ustar
6733 export TEST_TAR_FORMAT
6734 TAR_OPTIONS="-H ustar"
6735 export TAR_OPTIONS
6736 rm -rf *
6737
6738 # Create two empty files:
6739 touch file1 file2
6740
6741 # Create an archive:
6742 tar cpfW archive.tar file1 file2
6743
6744 # Verify created archive by listing its content:
6745 tar -tf archive.tar
6746 echo ==
6747 # Create another empty file:
6748 touch file3
6749
6750 # Append it to the already created archive:
6751 tar rpfW archive.tar file3
6752
6753 # Verify content of the new archive:
6754 tar -tf archive.tar
6755 )
6756 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6757 at_status=$? at_failed=false
6758 $at_check_filter
6759 at_fn_diff_devnull "$at_stderr" || at_failed=:
6760 echo >>"$at_stdout"; $as_echo "file1
6761 file2
6762 ==
6763 file1
6764 file2
6765 file3
6766 " | \
6767   $at_diff - "$at_stdout" || at_failed=:
6768 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
6769 $at_failed && at_fn_log_failure
6770 $at_traceon; }
6771
6772               { set +x
6773 $as_echo "$at_srcdir/append04.at:32:
6774 mkdir posix
6775 (cd posix
6776 TEST_TAR_FORMAT=posix
6777 export TEST_TAR_FORMAT
6778 TAR_OPTIONS=\"-H posix\"
6779 export TAR_OPTIONS
6780 rm -rf *
6781
6782 # Create two empty files:
6783 touch file1 file2
6784
6785 # Create an archive:
6786 tar cpfW archive.tar file1 file2
6787
6788 # Verify created archive by listing its content:
6789 tar -tf archive.tar
6790 echo ==
6791 # Create another empty file:
6792 touch file3
6793
6794 # Append it to the already created archive:
6795 tar rpfW archive.tar file3
6796
6797 # Verify content of the new archive:
6798 tar -tf archive.tar
6799 )"
6800 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
6801 ( $at_check_trace;
6802 mkdir posix
6803 (cd posix
6804 TEST_TAR_FORMAT=posix
6805 export TEST_TAR_FORMAT
6806 TAR_OPTIONS="-H posix"
6807 export TAR_OPTIONS
6808 rm -rf *
6809
6810 # Create two empty files:
6811 touch file1 file2
6812
6813 # Create an archive:
6814 tar cpfW archive.tar file1 file2
6815
6816 # Verify created archive by listing its content:
6817 tar -tf archive.tar
6818 echo ==
6819 # Create another empty file:
6820 touch file3
6821
6822 # Append it to the already created archive:
6823 tar rpfW archive.tar file3
6824
6825 # Verify content of the new archive:
6826 tar -tf archive.tar
6827 )
6828 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6829 at_status=$? at_failed=false
6830 $at_check_filter
6831 at_fn_diff_devnull "$at_stderr" || at_failed=:
6832 echo >>"$at_stdout"; $as_echo "file1
6833 file2
6834 ==
6835 file1
6836 file2
6837 file3
6838 " | \
6839   $at_diff - "$at_stdout" || at_failed=:
6840 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
6841 $at_failed && at_fn_log_failure
6842 $at_traceon; }
6843
6844               { set +x
6845 $as_echo "$at_srcdir/append04.at:32:
6846 mkdir gnu
6847 (cd gnu
6848 TEST_TAR_FORMAT=gnu
6849 export TEST_TAR_FORMAT
6850 TAR_OPTIONS=\"-H gnu\"
6851 export TAR_OPTIONS
6852 rm -rf *
6853
6854 # Create two empty files:
6855 touch file1 file2
6856
6857 # Create an archive:
6858 tar cpfW archive.tar file1 file2
6859
6860 # Verify created archive by listing its content:
6861 tar -tf archive.tar
6862 echo ==
6863 # Create another empty file:
6864 touch file3
6865
6866 # Append it to the already created archive:
6867 tar rpfW archive.tar file3
6868
6869 # Verify content of the new archive:
6870 tar -tf archive.tar
6871 )"
6872 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
6873 ( $at_check_trace;
6874 mkdir gnu
6875 (cd gnu
6876 TEST_TAR_FORMAT=gnu
6877 export TEST_TAR_FORMAT
6878 TAR_OPTIONS="-H gnu"
6879 export TAR_OPTIONS
6880 rm -rf *
6881
6882 # Create two empty files:
6883 touch file1 file2
6884
6885 # Create an archive:
6886 tar cpfW archive.tar file1 file2
6887
6888 # Verify created archive by listing its content:
6889 tar -tf archive.tar
6890 echo ==
6891 # Create another empty file:
6892 touch file3
6893
6894 # Append it to the already created archive:
6895 tar rpfW archive.tar file3
6896
6897 # Verify content of the new archive:
6898 tar -tf archive.tar
6899 )
6900 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6901 at_status=$? at_failed=false
6902 $at_check_filter
6903 at_fn_diff_devnull "$at_stderr" || at_failed=:
6904 echo >>"$at_stdout"; $as_echo "file1
6905 file2
6906 ==
6907 file1
6908 file2
6909 file3
6910 " | \
6911   $at_diff - "$at_stdout" || at_failed=:
6912 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
6913 $at_failed && at_fn_log_failure
6914 $at_traceon; }
6915
6916
6917
6918
6919   set +x
6920   $at_times_p && times >"$at_times_file"
6921 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6922 read at_status <"$at_status_file"
6923 #AT_STOP_30
6924 #AT_START_31
6925 at_fn_group_banner 31 'xform-h.at:30' \
6926   "transforming hard links on create" "              " 6
6927 at_xfail=no
6928       test -f $XFAILFILE && at_xfail=yes
6929 (
6930   $as_echo "31. $at_setup_line: testing $at_desc ..."
6931   $at_traceon
6932
6933
6934
6935
6936
6937
6938
6939   { set +x
6940 $as_echo "$at_srcdir/xform-h.at:39:
6941 mkdir v7
6942 (cd v7
6943 TEST_TAR_FORMAT=v7
6944 export TEST_TAR_FORMAT
6945 TAR_OPTIONS=\"-H v7\"
6946 export TAR_OPTIONS
6947 rm -rf *
6948
6949 mkdir basedir
6950 echo \"hello\" > basedir/test
6951 ln basedir/test basedir/test_link
6952
6953
6954 echo \"Default transform scope\"
6955 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
6956 tar tvf archive | sed -n 's/.*test_link link to //p'
6957
6958
6959 echo \"Transforming hard links\"
6960 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
6961 tar tvf archive | sed -n 's/.*test_link link to //p'
6962
6963
6964 echo \"Not transforming hard links\"
6965 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
6966 tar tvf archive | sed -n 's/.*test_link link to //p'
6967
6968 )"
6969 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
6970 ( $at_check_trace;
6971 mkdir v7
6972 (cd v7
6973 TEST_TAR_FORMAT=v7
6974 export TEST_TAR_FORMAT
6975 TAR_OPTIONS="-H v7"
6976 export TAR_OPTIONS
6977 rm -rf *
6978
6979 mkdir basedir
6980 echo "hello" > basedir/test
6981 ln basedir/test basedir/test_link
6982
6983
6984 echo "Default transform scope"
6985 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
6986 tar tvf archive | sed -n 's/.*test_link link to //p'
6987
6988
6989 echo "Transforming hard links"
6990 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
6991 tar tvf archive | sed -n 's/.*test_link link to //p'
6992
6993
6994 echo "Not transforming hard links"
6995 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
6996 tar tvf archive | sed -n 's/.*test_link link to //p'
6997
6998 )
6999 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7000 at_status=$? at_failed=false
7001 $at_check_filter
7002 at_fn_diff_devnull "$at_stderr" || at_failed=:
7003 echo >>"$at_stdout"; $as_echo "Default transform scope
7004 test
7005 Transforming hard links
7006 test
7007 Not transforming hard links
7008 basedir/test
7009 " | \
7010   $at_diff - "$at_stdout" || at_failed=:
7011 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7012 $at_failed && at_fn_log_failure
7013 $at_traceon; }
7014
7015               { set +x
7016 $as_echo "$at_srcdir/xform-h.at:39:
7017 mkdir oldgnu
7018 (cd oldgnu
7019 TEST_TAR_FORMAT=oldgnu
7020 export TEST_TAR_FORMAT
7021 TAR_OPTIONS=\"-H oldgnu\"
7022 export TAR_OPTIONS
7023 rm -rf *
7024
7025 mkdir basedir
7026 echo \"hello\" > basedir/test
7027 ln basedir/test basedir/test_link
7028
7029
7030 echo \"Default transform scope\"
7031 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7032 tar tvf archive | sed -n 's/.*test_link link to //p'
7033
7034
7035 echo \"Transforming hard links\"
7036 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7037 tar tvf archive | sed -n 's/.*test_link link to //p'
7038
7039
7040 echo \"Not transforming hard links\"
7041 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7042 tar tvf archive | sed -n 's/.*test_link link to //p'
7043
7044 )"
7045 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7046 ( $at_check_trace;
7047 mkdir oldgnu
7048 (cd oldgnu
7049 TEST_TAR_FORMAT=oldgnu
7050 export TEST_TAR_FORMAT
7051 TAR_OPTIONS="-H oldgnu"
7052 export TAR_OPTIONS
7053 rm -rf *
7054
7055 mkdir basedir
7056 echo "hello" > basedir/test
7057 ln basedir/test basedir/test_link
7058
7059
7060 echo "Default transform scope"
7061 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7062 tar tvf archive | sed -n 's/.*test_link link to //p'
7063
7064
7065 echo "Transforming hard links"
7066 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7067 tar tvf archive | sed -n 's/.*test_link link to //p'
7068
7069
7070 echo "Not transforming hard links"
7071 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7072 tar tvf archive | sed -n 's/.*test_link link to //p'
7073
7074 )
7075 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7076 at_status=$? at_failed=false
7077 $at_check_filter
7078 at_fn_diff_devnull "$at_stderr" || at_failed=:
7079 echo >>"$at_stdout"; $as_echo "Default transform scope
7080 test
7081 Transforming hard links
7082 test
7083 Not transforming hard links
7084 basedir/test
7085 " | \
7086   $at_diff - "$at_stdout" || at_failed=:
7087 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7088 $at_failed && at_fn_log_failure
7089 $at_traceon; }
7090
7091               { set +x
7092 $as_echo "$at_srcdir/xform-h.at:39:
7093 mkdir ustar
7094 (cd ustar
7095 TEST_TAR_FORMAT=ustar
7096 export TEST_TAR_FORMAT
7097 TAR_OPTIONS=\"-H ustar\"
7098 export TAR_OPTIONS
7099 rm -rf *
7100
7101 mkdir basedir
7102 echo \"hello\" > basedir/test
7103 ln basedir/test basedir/test_link
7104
7105
7106 echo \"Default transform scope\"
7107 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7108 tar tvf archive | sed -n 's/.*test_link link to //p'
7109
7110
7111 echo \"Transforming hard links\"
7112 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7113 tar tvf archive | sed -n 's/.*test_link link to //p'
7114
7115
7116 echo \"Not transforming hard links\"
7117 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7118 tar tvf archive | sed -n 's/.*test_link link to //p'
7119
7120 )"
7121 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7122 ( $at_check_trace;
7123 mkdir ustar
7124 (cd ustar
7125 TEST_TAR_FORMAT=ustar
7126 export TEST_TAR_FORMAT
7127 TAR_OPTIONS="-H ustar"
7128 export TAR_OPTIONS
7129 rm -rf *
7130
7131 mkdir basedir
7132 echo "hello" > basedir/test
7133 ln basedir/test basedir/test_link
7134
7135
7136 echo "Default transform scope"
7137 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7138 tar tvf archive | sed -n 's/.*test_link link to //p'
7139
7140
7141 echo "Transforming hard links"
7142 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7143 tar tvf archive | sed -n 's/.*test_link link to //p'
7144
7145
7146 echo "Not transforming hard links"
7147 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7148 tar tvf archive | sed -n 's/.*test_link link to //p'
7149
7150 )
7151 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7152 at_status=$? at_failed=false
7153 $at_check_filter
7154 at_fn_diff_devnull "$at_stderr" || at_failed=:
7155 echo >>"$at_stdout"; $as_echo "Default transform scope
7156 test
7157 Transforming hard links
7158 test
7159 Not transforming hard links
7160 basedir/test
7161 " | \
7162   $at_diff - "$at_stdout" || at_failed=:
7163 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7164 $at_failed && at_fn_log_failure
7165 $at_traceon; }
7166
7167               { set +x
7168 $as_echo "$at_srcdir/xform-h.at:39:
7169 mkdir posix
7170 (cd posix
7171 TEST_TAR_FORMAT=posix
7172 export TEST_TAR_FORMAT
7173 TAR_OPTIONS=\"-H posix\"
7174 export TAR_OPTIONS
7175 rm -rf *
7176
7177 mkdir basedir
7178 echo \"hello\" > basedir/test
7179 ln basedir/test basedir/test_link
7180
7181
7182 echo \"Default transform scope\"
7183 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7184 tar tvf archive | sed -n 's/.*test_link link to //p'
7185
7186
7187 echo \"Transforming hard links\"
7188 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7189 tar tvf archive | sed -n 's/.*test_link link to //p'
7190
7191
7192 echo \"Not transforming hard links\"
7193 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7194 tar tvf archive | sed -n 's/.*test_link link to //p'
7195
7196 )"
7197 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7198 ( $at_check_trace;
7199 mkdir posix
7200 (cd posix
7201 TEST_TAR_FORMAT=posix
7202 export TEST_TAR_FORMAT
7203 TAR_OPTIONS="-H posix"
7204 export TAR_OPTIONS
7205 rm -rf *
7206
7207 mkdir basedir
7208 echo "hello" > basedir/test
7209 ln basedir/test basedir/test_link
7210
7211
7212 echo "Default transform scope"
7213 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7214 tar tvf archive | sed -n 's/.*test_link link to //p'
7215
7216
7217 echo "Transforming hard links"
7218 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7219 tar tvf archive | sed -n 's/.*test_link link to //p'
7220
7221
7222 echo "Not transforming hard links"
7223 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7224 tar tvf archive | sed -n 's/.*test_link link to //p'
7225
7226 )
7227 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7228 at_status=$? at_failed=false
7229 $at_check_filter
7230 at_fn_diff_devnull "$at_stderr" || at_failed=:
7231 echo >>"$at_stdout"; $as_echo "Default transform scope
7232 test
7233 Transforming hard links
7234 test
7235 Not transforming hard links
7236 basedir/test
7237 " | \
7238   $at_diff - "$at_stdout" || at_failed=:
7239 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7240 $at_failed && at_fn_log_failure
7241 $at_traceon; }
7242
7243               { set +x
7244 $as_echo "$at_srcdir/xform-h.at:39:
7245 mkdir gnu
7246 (cd gnu
7247 TEST_TAR_FORMAT=gnu
7248 export TEST_TAR_FORMAT
7249 TAR_OPTIONS=\"-H gnu\"
7250 export TAR_OPTIONS
7251 rm -rf *
7252
7253 mkdir basedir
7254 echo \"hello\" > basedir/test
7255 ln basedir/test basedir/test_link
7256
7257
7258 echo \"Default transform scope\"
7259 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7260 tar tvf archive | sed -n 's/.*test_link link to //p'
7261
7262
7263 echo \"Transforming hard links\"
7264 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7265 tar tvf archive | sed -n 's/.*test_link link to //p'
7266
7267
7268 echo \"Not transforming hard links\"
7269 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7270 tar tvf archive | sed -n 's/.*test_link link to //p'
7271
7272 )"
7273 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7274 ( $at_check_trace;
7275 mkdir gnu
7276 (cd gnu
7277 TEST_TAR_FORMAT=gnu
7278 export TEST_TAR_FORMAT
7279 TAR_OPTIONS="-H gnu"
7280 export TAR_OPTIONS
7281 rm -rf *
7282
7283 mkdir basedir
7284 echo "hello" > basedir/test
7285 ln basedir/test basedir/test_link
7286
7287
7288 echo "Default transform scope"
7289 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7290 tar tvf archive | sed -n 's/.*test_link link to //p'
7291
7292
7293 echo "Transforming hard links"
7294 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7295 tar tvf archive | sed -n 's/.*test_link link to //p'
7296
7297
7298 echo "Not transforming hard links"
7299 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7300 tar tvf archive | sed -n 's/.*test_link link to //p'
7301
7302 )
7303 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7304 at_status=$? at_failed=false
7305 $at_check_filter
7306 at_fn_diff_devnull "$at_stderr" || at_failed=:
7307 echo >>"$at_stdout"; $as_echo "Default transform scope
7308 test
7309 Transforming hard links
7310 test
7311 Not transforming hard links
7312 basedir/test
7313 " | \
7314   $at_diff - "$at_stdout" || at_failed=:
7315 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7316 $at_failed && at_fn_log_failure
7317 $at_traceon; }
7318
7319
7320
7321
7322
7323
7324   set +x
7325   $at_times_p && times >"$at_times_file"
7326 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7327 read at_status <"$at_status_file"
7328 #AT_STOP_31
7329 #AT_START_32
7330 at_fn_group_banner 32 'xform01.at:26' \
7331   "transformations and GNU volume labels" "          " 6
7332 at_xfail=no
7333       test -f $XFAILFILE && at_xfail=yes
7334 (
7335   $as_echo "32. $at_setup_line: testing $at_desc ..."
7336   $at_traceon
7337
7338
7339
7340
7341
7342   { set +x
7343 $as_echo "$at_srcdir/xform01.at:29:
7344 mkdir gnu
7345 (cd gnu
7346 TEST_TAR_FORMAT=gnu
7347 export TEST_TAR_FORMAT
7348 TAR_OPTIONS=\"-H gnu\"
7349 export TAR_OPTIONS
7350 rm -rf *
7351
7352 genfile --file file
7353 tar -cf archive.tar -V /label/ file
7354 tar tf archive.tar
7355 )"
7356 at_fn_check_prepare_notrace 'an embedded newline' "xform01.at:29"
7357 ( $at_check_trace;
7358 mkdir gnu
7359 (cd gnu
7360 TEST_TAR_FORMAT=gnu
7361 export TEST_TAR_FORMAT
7362 TAR_OPTIONS="-H gnu"
7363 export TAR_OPTIONS
7364 rm -rf *
7365
7366 genfile --file file
7367 tar -cf archive.tar -V /label/ file
7368 tar tf archive.tar
7369 )
7370 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7371 at_status=$? at_failed=false
7372 $at_check_filter
7373 at_fn_diff_devnull "$at_stderr" || at_failed=:
7374 echo >>"$at_stdout"; $as_echo "/label/
7375 file
7376 " | \
7377   $at_diff - "$at_stdout" || at_failed=:
7378 at_fn_check_status 0 $at_status "$at_srcdir/xform01.at:29"
7379 $at_failed && at_fn_log_failure
7380 $at_traceon; }
7381
7382
7383
7384
7385   set +x
7386   $at_times_p && times >"$at_times_file"
7387 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7388 read at_status <"$at_status_file"
7389 #AT_STOP_32
7390 #AT_START_33
7391 at_fn_group_banner 33 'exclude.at:23' \
7392   "exclude" "                                        " 7
7393 at_xfail=no
7394       test -f $XFAILFILE && at_xfail=yes
7395 (
7396   $as_echo "33. $at_setup_line: testing $at_desc ..."
7397   $at_traceon
7398
7399
7400
7401
7402
7403   { set +x
7404 $as_echo "$at_srcdir/exclude.at:26:
7405 mkdir ustar
7406 (cd ustar
7407 TEST_TAR_FORMAT=ustar
7408 export TEST_TAR_FORMAT
7409 TAR_OPTIONS=\"-H ustar\"
7410 export TAR_OPTIONS
7411 rm -rf *
7412
7413
7414 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7415
7416
7417 mkdir dir
7418 echo blues > dir/blues
7419 echo jazz > dir/jazz
7420 mkdir dir/folk
7421 echo tagfile > dir/folk/tagfile
7422 echo sanjuan > dir/folk/sanjuan
7423 mkdir dir/rock
7424 echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG
7425 echo \"test\" > dir/rock/file
7426
7427 for option in exclude-caches exclude-caches-under exclude-caches-all
7428 do
7429   echo OPTION \$option
7430   tar -cf archive.tar --\$option -v dir 2>err | sort
7431   cat err
7432   echo ARCHIVE
7433   tar tf archive.tar | sort
7434 done
7435
7436 for option in exclude-tag exclude-tag-under exclude-tag-all
7437 do
7438   echo OPTION \$option
7439   tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort
7440   cat err
7441   echo ARCHIVE
7442   tar tf archive.tar | sort
7443 done
7444 )"
7445 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude.at:26"
7446 ( $at_check_trace;
7447 mkdir ustar
7448 (cd ustar
7449 TEST_TAR_FORMAT=ustar
7450 export TEST_TAR_FORMAT
7451 TAR_OPTIONS="-H ustar"
7452 export TAR_OPTIONS
7453 rm -rf *
7454
7455
7456 test -z "`sort < /dev/null 2>&1`" || exit 77
7457
7458
7459 mkdir dir
7460 echo blues > dir/blues
7461 echo jazz > dir/jazz
7462 mkdir dir/folk
7463 echo tagfile > dir/folk/tagfile
7464 echo sanjuan > dir/folk/sanjuan
7465 mkdir dir/rock
7466 echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
7467 echo "test" > dir/rock/file
7468
7469 for option in exclude-caches exclude-caches-under exclude-caches-all
7470 do
7471   echo OPTION $option
7472   tar -cf archive.tar --$option -v dir 2>err | sort
7473   cat err
7474   echo ARCHIVE
7475   tar tf archive.tar | sort
7476 done
7477
7478 for option in exclude-tag exclude-tag-under exclude-tag-all
7479 do
7480   echo OPTION $option
7481   tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
7482   cat err
7483   echo ARCHIVE
7484   tar tf archive.tar | sort
7485 done
7486 )
7487 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7488 at_status=$? at_failed=false
7489 $at_check_filter
7490 at_fn_diff_devnull "$at_stderr" || at_failed=:
7491 echo >>"$at_stdout"; $as_echo "OPTION exclude-caches
7492 dir/
7493 dir/blues
7494 dir/folk/
7495 dir/folk/sanjuan
7496 dir/folk/tagfile
7497 dir/jazz
7498 dir/rock/
7499 dir/rock/CACHEDIR.TAG
7500 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
7501 ARCHIVE
7502 dir/
7503 dir/blues
7504 dir/folk/
7505 dir/folk/sanjuan
7506 dir/folk/tagfile
7507 dir/jazz
7508 dir/rock/
7509 dir/rock/CACHEDIR.TAG
7510 OPTION exclude-caches-under
7511 dir/
7512 dir/blues
7513 dir/folk/
7514 dir/folk/sanjuan
7515 dir/folk/tagfile
7516 dir/jazz
7517 dir/rock/
7518 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
7519 ARCHIVE
7520 dir/
7521 dir/blues
7522 dir/folk/
7523 dir/folk/sanjuan
7524 dir/folk/tagfile
7525 dir/jazz
7526 dir/rock/
7527 OPTION exclude-caches-all
7528 dir/
7529 dir/blues
7530 dir/folk/
7531 dir/folk/sanjuan
7532 dir/folk/tagfile
7533 dir/jazz
7534 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
7535 ARCHIVE
7536 dir/
7537 dir/blues
7538 dir/folk/
7539 dir/folk/sanjuan
7540 dir/folk/tagfile
7541 dir/jazz
7542 OPTION exclude-tag
7543 dir/
7544 dir/blues
7545 dir/folk/
7546 dir/folk/tagfile
7547 dir/jazz
7548 dir/rock/
7549 dir/rock/CACHEDIR.TAG
7550 dir/rock/file
7551 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
7552 ARCHIVE
7553 dir/
7554 dir/blues
7555 dir/folk/
7556 dir/folk/tagfile
7557 dir/jazz
7558 dir/rock/
7559 dir/rock/CACHEDIR.TAG
7560 dir/rock/file
7561 OPTION exclude-tag-under
7562 dir/
7563 dir/blues
7564 dir/folk/
7565 dir/jazz
7566 dir/rock/
7567 dir/rock/CACHEDIR.TAG
7568 dir/rock/file
7569 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
7570 ARCHIVE
7571 dir/
7572 dir/blues
7573 dir/folk/
7574 dir/jazz
7575 dir/rock/
7576 dir/rock/CACHEDIR.TAG
7577 dir/rock/file
7578 OPTION exclude-tag-all
7579 dir/
7580 dir/blues
7581 dir/jazz
7582 dir/rock/
7583 dir/rock/CACHEDIR.TAG
7584 dir/rock/file
7585 tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
7586 ARCHIVE
7587 dir/
7588 dir/blues
7589 dir/jazz
7590 dir/rock/
7591 dir/rock/CACHEDIR.TAG
7592 dir/rock/file
7593 " | \
7594   $at_diff - "$at_stdout" || at_failed=:
7595 at_fn_check_status 0 $at_status "$at_srcdir/exclude.at:26"
7596 $at_failed && at_fn_log_failure
7597 $at_traceon; }
7598
7599
7600
7601
7602   set +x
7603   $at_times_p && times >"$at_times_file"
7604 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7605 read at_status <"$at_status_file"
7606 #AT_STOP_33
7607 #AT_START_34
7608 at_fn_group_banner 34 'exclude01.at:19' \
7609   "exclude wildcards" "                              " 7
7610 at_xfail=no
7611       test -f $XFAILFILE && at_xfail=yes
7612 (
7613   $as_echo "34. $at_setup_line: testing $at_desc ..."
7614   $at_traceon
7615
7616
7617
7618
7619
7620   { set +x
7621 $as_echo "$at_srcdir/exclude01.at:22:
7622 mkdir v7
7623 (cd v7
7624 TEST_TAR_FORMAT=v7
7625 export TEST_TAR_FORMAT
7626 TAR_OPTIONS=\"-H v7\"
7627 export TAR_OPTIONS
7628 rm -rf *
7629
7630
7631 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7632
7633
7634 rm -rf testdir
7635 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
7636 touch testdir/dir1/file1
7637 touch testdir/dir1/\\*
7638 touch testdir/dir2/file2
7639 touch testdir/dir2/\\*
7640 touch testdir/dir3/file3
7641 touch testdir/dir3/\\*
7642
7643 tar cf archive --exclude=testdir/dir1/\\* \\
7644                --no-wildcards \\
7645                --exclude=testdir/dir2/\\* \\
7646                --wildcards \\
7647                --exclude=testdir/dir3/\\* \\
7648                testdir
7649 tar tf archive | sort
7650
7651 echo \"NEXT\"
7652 tar cf archive testdir
7653 tar t \"testdir/dir1/*\" -f archive | sort
7654
7655 echo \"NEXT\"
7656 tar cf archive testdir/dir1
7657 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
7658
7659 echo \"NEXT\"
7660 tar cf archive testdir
7661 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
7662
7663 rm -rf testdir
7664 )"
7665 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
7666 ( $at_check_trace;
7667 mkdir v7
7668 (cd v7
7669 TEST_TAR_FORMAT=v7
7670 export TEST_TAR_FORMAT
7671 TAR_OPTIONS="-H v7"
7672 export TAR_OPTIONS
7673 rm -rf *
7674
7675
7676 test -z "`sort < /dev/null 2>&1`" || exit 77
7677
7678
7679 rm -rf testdir
7680 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
7681 touch testdir/dir1/file1
7682 touch testdir/dir1/\*
7683 touch testdir/dir2/file2
7684 touch testdir/dir2/\*
7685 touch testdir/dir3/file3
7686 touch testdir/dir3/\*
7687
7688 tar cf archive --exclude=testdir/dir1/\* \
7689                --no-wildcards \
7690                --exclude=testdir/dir2/\* \
7691                --wildcards \
7692                --exclude=testdir/dir3/\* \
7693                testdir
7694 tar tf archive | sort
7695
7696 echo "NEXT"
7697 tar cf archive testdir
7698 tar t "testdir/dir1/*" -f archive | sort
7699
7700 echo "NEXT"
7701 tar cf archive testdir/dir1
7702 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
7703
7704 echo "NEXT"
7705 tar cf archive testdir
7706 tar t --wildcards "testdir/dir1/*" -f archive | sort
7707
7708 rm -rf testdir
7709 )
7710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7711 at_status=$? at_failed=false
7712 $at_check_filter
7713 at_fn_diff_devnull "$at_stderr" || at_failed=:
7714 echo >>"$at_stdout"; $as_echo "testdir/
7715 testdir/dir1/
7716 testdir/dir2/
7717 testdir/dir2/file2
7718 testdir/dir3/
7719 NEXT
7720 testdir/dir1/*
7721 NEXT
7722 testdir/dir1/*
7723 NEXT
7724 testdir/dir1/*
7725 testdir/dir1/file1
7726 " | \
7727   $at_diff - "$at_stdout" || at_failed=:
7728 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
7729 $at_failed && at_fn_log_failure
7730 $at_traceon; }
7731
7732               { set +x
7733 $as_echo "$at_srcdir/exclude01.at:22:
7734 mkdir oldgnu
7735 (cd oldgnu
7736 TEST_TAR_FORMAT=oldgnu
7737 export TEST_TAR_FORMAT
7738 TAR_OPTIONS=\"-H oldgnu\"
7739 export TAR_OPTIONS
7740 rm -rf *
7741
7742
7743 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7744
7745
7746 rm -rf testdir
7747 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
7748 touch testdir/dir1/file1
7749 touch testdir/dir1/\\*
7750 touch testdir/dir2/file2
7751 touch testdir/dir2/\\*
7752 touch testdir/dir3/file3
7753 touch testdir/dir3/\\*
7754
7755 tar cf archive --exclude=testdir/dir1/\\* \\
7756                --no-wildcards \\
7757                --exclude=testdir/dir2/\\* \\
7758                --wildcards \\
7759                --exclude=testdir/dir3/\\* \\
7760                testdir
7761 tar tf archive | sort
7762
7763 echo \"NEXT\"
7764 tar cf archive testdir
7765 tar t \"testdir/dir1/*\" -f archive | sort
7766
7767 echo \"NEXT\"
7768 tar cf archive testdir/dir1
7769 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
7770
7771 echo \"NEXT\"
7772 tar cf archive testdir
7773 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
7774
7775 rm -rf testdir
7776 )"
7777 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
7778 ( $at_check_trace;
7779 mkdir oldgnu
7780 (cd oldgnu
7781 TEST_TAR_FORMAT=oldgnu
7782 export TEST_TAR_FORMAT
7783 TAR_OPTIONS="-H oldgnu"
7784 export TAR_OPTIONS
7785 rm -rf *
7786
7787
7788 test -z "`sort < /dev/null 2>&1`" || exit 77
7789
7790
7791 rm -rf testdir
7792 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
7793 touch testdir/dir1/file1
7794 touch testdir/dir1/\*
7795 touch testdir/dir2/file2
7796 touch testdir/dir2/\*
7797 touch testdir/dir3/file3
7798 touch testdir/dir3/\*
7799
7800 tar cf archive --exclude=testdir/dir1/\* \
7801                --no-wildcards \
7802                --exclude=testdir/dir2/\* \
7803                --wildcards \
7804                --exclude=testdir/dir3/\* \
7805                testdir
7806 tar tf archive | sort
7807
7808 echo "NEXT"
7809 tar cf archive testdir
7810 tar t "testdir/dir1/*" -f archive | sort
7811
7812 echo "NEXT"
7813 tar cf archive testdir/dir1
7814 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
7815
7816 echo "NEXT"
7817 tar cf archive testdir
7818 tar t --wildcards "testdir/dir1/*" -f archive | sort
7819
7820 rm -rf testdir
7821 )
7822 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7823 at_status=$? at_failed=false
7824 $at_check_filter
7825 at_fn_diff_devnull "$at_stderr" || at_failed=:
7826 echo >>"$at_stdout"; $as_echo "testdir/
7827 testdir/dir1/
7828 testdir/dir2/
7829 testdir/dir2/file2
7830 testdir/dir3/
7831 NEXT
7832 testdir/dir1/*
7833 NEXT
7834 testdir/dir1/*
7835 NEXT
7836 testdir/dir1/*
7837 testdir/dir1/file1
7838 " | \
7839   $at_diff - "$at_stdout" || at_failed=:
7840 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
7841 $at_failed && at_fn_log_failure
7842 $at_traceon; }
7843
7844               { set +x
7845 $as_echo "$at_srcdir/exclude01.at:22:
7846 mkdir ustar
7847 (cd ustar
7848 TEST_TAR_FORMAT=ustar
7849 export TEST_TAR_FORMAT
7850 TAR_OPTIONS=\"-H ustar\"
7851 export TAR_OPTIONS
7852 rm -rf *
7853
7854
7855 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7856
7857
7858 rm -rf testdir
7859 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
7860 touch testdir/dir1/file1
7861 touch testdir/dir1/\\*
7862 touch testdir/dir2/file2
7863 touch testdir/dir2/\\*
7864 touch testdir/dir3/file3
7865 touch testdir/dir3/\\*
7866
7867 tar cf archive --exclude=testdir/dir1/\\* \\
7868                --no-wildcards \\
7869                --exclude=testdir/dir2/\\* \\
7870                --wildcards \\
7871                --exclude=testdir/dir3/\\* \\
7872                testdir
7873 tar tf archive | sort
7874
7875 echo \"NEXT\"
7876 tar cf archive testdir
7877 tar t \"testdir/dir1/*\" -f archive | sort
7878
7879 echo \"NEXT\"
7880 tar cf archive testdir/dir1
7881 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
7882
7883 echo \"NEXT\"
7884 tar cf archive testdir
7885 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
7886
7887 rm -rf testdir
7888 )"
7889 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
7890 ( $at_check_trace;
7891 mkdir ustar
7892 (cd ustar
7893 TEST_TAR_FORMAT=ustar
7894 export TEST_TAR_FORMAT
7895 TAR_OPTIONS="-H ustar"
7896 export TAR_OPTIONS
7897 rm -rf *
7898
7899
7900 test -z "`sort < /dev/null 2>&1`" || exit 77
7901
7902
7903 rm -rf testdir
7904 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
7905 touch testdir/dir1/file1
7906 touch testdir/dir1/\*
7907 touch testdir/dir2/file2
7908 touch testdir/dir2/\*
7909 touch testdir/dir3/file3
7910 touch testdir/dir3/\*
7911
7912 tar cf archive --exclude=testdir/dir1/\* \
7913                --no-wildcards \
7914                --exclude=testdir/dir2/\* \
7915                --wildcards \
7916                --exclude=testdir/dir3/\* \
7917                testdir
7918 tar tf archive | sort
7919
7920 echo "NEXT"
7921 tar cf archive testdir
7922 tar t "testdir/dir1/*" -f archive | sort
7923
7924 echo "NEXT"
7925 tar cf archive testdir/dir1
7926 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
7927
7928 echo "NEXT"
7929 tar cf archive testdir
7930 tar t --wildcards "testdir/dir1/*" -f archive | sort
7931
7932 rm -rf testdir
7933 )
7934 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7935 at_status=$? at_failed=false
7936 $at_check_filter
7937 at_fn_diff_devnull "$at_stderr" || at_failed=:
7938 echo >>"$at_stdout"; $as_echo "testdir/
7939 testdir/dir1/
7940 testdir/dir2/
7941 testdir/dir2/file2
7942 testdir/dir3/
7943 NEXT
7944 testdir/dir1/*
7945 NEXT
7946 testdir/dir1/*
7947 NEXT
7948 testdir/dir1/*
7949 testdir/dir1/file1
7950 " | \
7951   $at_diff - "$at_stdout" || at_failed=:
7952 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
7953 $at_failed && at_fn_log_failure
7954 $at_traceon; }
7955
7956               { set +x
7957 $as_echo "$at_srcdir/exclude01.at:22:
7958 mkdir posix
7959 (cd posix
7960 TEST_TAR_FORMAT=posix
7961 export TEST_TAR_FORMAT
7962 TAR_OPTIONS=\"-H posix\"
7963 export TAR_OPTIONS
7964 rm -rf *
7965
7966
7967 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7968
7969
7970 rm -rf testdir
7971 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
7972 touch testdir/dir1/file1
7973 touch testdir/dir1/\\*
7974 touch testdir/dir2/file2
7975 touch testdir/dir2/\\*
7976 touch testdir/dir3/file3
7977 touch testdir/dir3/\\*
7978
7979 tar cf archive --exclude=testdir/dir1/\\* \\
7980                --no-wildcards \\
7981                --exclude=testdir/dir2/\\* \\
7982                --wildcards \\
7983                --exclude=testdir/dir3/\\* \\
7984                testdir
7985 tar tf archive | sort
7986
7987 echo \"NEXT\"
7988 tar cf archive testdir
7989 tar t \"testdir/dir1/*\" -f archive | sort
7990
7991 echo \"NEXT\"
7992 tar cf archive testdir/dir1
7993 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
7994
7995 echo \"NEXT\"
7996 tar cf archive testdir
7997 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
7998
7999 rm -rf testdir
8000 )"
8001 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
8002 ( $at_check_trace;
8003 mkdir posix
8004 (cd posix
8005 TEST_TAR_FORMAT=posix
8006 export TEST_TAR_FORMAT
8007 TAR_OPTIONS="-H posix"
8008 export TAR_OPTIONS
8009 rm -rf *
8010
8011
8012 test -z "`sort < /dev/null 2>&1`" || exit 77
8013
8014
8015 rm -rf testdir
8016 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8017 touch testdir/dir1/file1
8018 touch testdir/dir1/\*
8019 touch testdir/dir2/file2
8020 touch testdir/dir2/\*
8021 touch testdir/dir3/file3
8022 touch testdir/dir3/\*
8023
8024 tar cf archive --exclude=testdir/dir1/\* \
8025                --no-wildcards \
8026                --exclude=testdir/dir2/\* \
8027                --wildcards \
8028                --exclude=testdir/dir3/\* \
8029                testdir
8030 tar tf archive | sort
8031
8032 echo "NEXT"
8033 tar cf archive testdir
8034 tar t "testdir/dir1/*" -f archive | sort
8035
8036 echo "NEXT"
8037 tar cf archive testdir/dir1
8038 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
8039
8040 echo "NEXT"
8041 tar cf archive testdir
8042 tar t --wildcards "testdir/dir1/*" -f archive | sort
8043
8044 rm -rf testdir
8045 )
8046 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8047 at_status=$? at_failed=false
8048 $at_check_filter
8049 at_fn_diff_devnull "$at_stderr" || at_failed=:
8050 echo >>"$at_stdout"; $as_echo "testdir/
8051 testdir/dir1/
8052 testdir/dir2/
8053 testdir/dir2/file2
8054 testdir/dir3/
8055 NEXT
8056 testdir/dir1/*
8057 NEXT
8058 testdir/dir1/*
8059 NEXT
8060 testdir/dir1/*
8061 testdir/dir1/file1
8062 " | \
8063   $at_diff - "$at_stdout" || at_failed=:
8064 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
8065 $at_failed && at_fn_log_failure
8066 $at_traceon; }
8067
8068               { set +x
8069 $as_echo "$at_srcdir/exclude01.at:22:
8070 mkdir gnu
8071 (cd gnu
8072 TEST_TAR_FORMAT=gnu
8073 export TEST_TAR_FORMAT
8074 TAR_OPTIONS=\"-H gnu\"
8075 export TAR_OPTIONS
8076 rm -rf *
8077
8078
8079 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8080
8081
8082 rm -rf testdir
8083 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8084 touch testdir/dir1/file1
8085 touch testdir/dir1/\\*
8086 touch testdir/dir2/file2
8087 touch testdir/dir2/\\*
8088 touch testdir/dir3/file3
8089 touch testdir/dir3/\\*
8090
8091 tar cf archive --exclude=testdir/dir1/\\* \\
8092                --no-wildcards \\
8093                --exclude=testdir/dir2/\\* \\
8094                --wildcards \\
8095                --exclude=testdir/dir3/\\* \\
8096                testdir
8097 tar tf archive | sort
8098
8099 echo \"NEXT\"
8100 tar cf archive testdir
8101 tar t \"testdir/dir1/*\" -f archive | sort
8102
8103 echo \"NEXT\"
8104 tar cf archive testdir/dir1
8105 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
8106
8107 echo \"NEXT\"
8108 tar cf archive testdir
8109 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
8110
8111 rm -rf testdir
8112 )"
8113 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
8114 ( $at_check_trace;
8115 mkdir gnu
8116 (cd gnu
8117 TEST_TAR_FORMAT=gnu
8118 export TEST_TAR_FORMAT
8119 TAR_OPTIONS="-H gnu"
8120 export TAR_OPTIONS
8121 rm -rf *
8122
8123
8124 test -z "`sort < /dev/null 2>&1`" || exit 77
8125
8126
8127 rm -rf testdir
8128 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8129 touch testdir/dir1/file1
8130 touch testdir/dir1/\*
8131 touch testdir/dir2/file2
8132 touch testdir/dir2/\*
8133 touch testdir/dir3/file3
8134 touch testdir/dir3/\*
8135
8136 tar cf archive --exclude=testdir/dir1/\* \
8137                --no-wildcards \
8138                --exclude=testdir/dir2/\* \
8139                --wildcards \
8140                --exclude=testdir/dir3/\* \
8141                testdir
8142 tar tf archive | sort
8143
8144 echo "NEXT"
8145 tar cf archive testdir
8146 tar t "testdir/dir1/*" -f archive | sort
8147
8148 echo "NEXT"
8149 tar cf archive testdir/dir1
8150 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
8151
8152 echo "NEXT"
8153 tar cf archive testdir
8154 tar t --wildcards "testdir/dir1/*" -f archive | sort
8155
8156 rm -rf testdir
8157 )
8158 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8159 at_status=$? at_failed=false
8160 $at_check_filter
8161 at_fn_diff_devnull "$at_stderr" || at_failed=:
8162 echo >>"$at_stdout"; $as_echo "testdir/
8163 testdir/dir1/
8164 testdir/dir2/
8165 testdir/dir2/file2
8166 testdir/dir3/
8167 NEXT
8168 testdir/dir1/*
8169 NEXT
8170 testdir/dir1/*
8171 NEXT
8172 testdir/dir1/*
8173 testdir/dir1/file1
8174 " | \
8175   $at_diff - "$at_stdout" || at_failed=:
8176 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
8177 $at_failed && at_fn_log_failure
8178 $at_traceon; }
8179
8180
8181
8182
8183   set +x
8184   $at_times_p && times >"$at_times_file"
8185 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8186 read at_status <"$at_status_file"
8187 #AT_STOP_34
8188 #AT_START_35
8189 at_fn_group_banner 35 'exclude02.at:19' \
8190   "exclude: anchoring" "                             " 7
8191 at_xfail=no
8192       test -f $XFAILFILE && at_xfail=yes
8193 (
8194   $as_echo "35. $at_setup_line: testing $at_desc ..."
8195   $at_traceon
8196
8197
8198
8199
8200
8201   { set +x
8202 $as_echo "$at_srcdir/exclude02.at:22:
8203 mkdir v7
8204 (cd v7
8205 TEST_TAR_FORMAT=v7
8206 export TEST_TAR_FORMAT
8207 TAR_OPTIONS=\"-H v7\"
8208 export TAR_OPTIONS
8209 rm -rf *
8210
8211
8212 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8213
8214
8215 rm -rf testdir
8216 mkdir -p testdir
8217 touch file1.txt
8218 touch testdir/file1.txt
8219 touch testdir/file2
8220
8221 tar cf archive --exclude=\"file1.txt\" \\
8222                testdir
8223 tar tf archive | sort
8224
8225 echo \"SUB 1\"
8226 tar cf archive --no-anchored \\
8227                --exclude=\"file1.txt\" \\
8228                testdir
8229 tar tf archive | sort
8230
8231 echo \"SUB 2\"
8232 tar cf archive --anchored \\
8233                --exclude=\"file1.txt\" \\
8234                testdir
8235 tar tf archive | sort
8236
8237 echo \"SUB 3\"
8238 tar cf archive testdir file1.txt
8239 tar t \"file1.txt\" -f archive | sort
8240
8241 echo \"SUB 4\"
8242 tar t --no-anchored \"file1.txt\" -f archive | sort
8243
8244 echo \"SUB 5\"
8245 tar t --anchored \"file1.txt\" -f archive | sort
8246
8247 rm -rf testdir file1.txt
8248
8249 )"
8250 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
8251 ( $at_check_trace;
8252 mkdir v7
8253 (cd v7
8254 TEST_TAR_FORMAT=v7
8255 export TEST_TAR_FORMAT
8256 TAR_OPTIONS="-H v7"
8257 export TAR_OPTIONS
8258 rm -rf *
8259
8260
8261 test -z "`sort < /dev/null 2>&1`" || exit 77
8262
8263
8264 rm -rf testdir
8265 mkdir -p testdir
8266 touch file1.txt
8267 touch testdir/file1.txt
8268 touch testdir/file2
8269
8270 tar cf archive --exclude="file1.txt" \
8271                testdir
8272 tar tf archive | sort
8273
8274 echo "SUB 1"
8275 tar cf archive --no-anchored \
8276                --exclude="file1.txt" \
8277                testdir
8278 tar tf archive | sort
8279
8280 echo "SUB 2"
8281 tar cf archive --anchored \
8282                --exclude="file1.txt" \
8283                testdir
8284 tar tf archive | sort
8285
8286 echo "SUB 3"
8287 tar cf archive testdir file1.txt
8288 tar t "file1.txt" -f archive | sort
8289
8290 echo "SUB 4"
8291 tar t --no-anchored "file1.txt" -f archive | sort
8292
8293 echo "SUB 5"
8294 tar t --anchored "file1.txt" -f archive | sort
8295
8296 rm -rf testdir file1.txt
8297
8298 )
8299 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8300 at_status=$? at_failed=false
8301 $at_check_filter
8302 at_fn_diff_devnull "$at_stderr" || at_failed=:
8303 echo >>"$at_stdout"; $as_echo "testdir/
8304 testdir/file2
8305 SUB 1
8306 testdir/
8307 testdir/file2
8308 SUB 2
8309 testdir/
8310 testdir/file1.txt
8311 testdir/file2
8312 SUB 3
8313 file1.txt
8314 SUB 4
8315 file1.txt
8316 testdir/file1.txt
8317 SUB 5
8318 file1.txt
8319 " | \
8320   $at_diff - "$at_stdout" || at_failed=:
8321 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
8322 $at_failed && at_fn_log_failure
8323 $at_traceon; }
8324
8325               { set +x
8326 $as_echo "$at_srcdir/exclude02.at:22:
8327 mkdir oldgnu
8328 (cd oldgnu
8329 TEST_TAR_FORMAT=oldgnu
8330 export TEST_TAR_FORMAT
8331 TAR_OPTIONS=\"-H oldgnu\"
8332 export TAR_OPTIONS
8333 rm -rf *
8334
8335
8336 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8337
8338
8339 rm -rf testdir
8340 mkdir -p testdir
8341 touch file1.txt
8342 touch testdir/file1.txt
8343 touch testdir/file2
8344
8345 tar cf archive --exclude=\"file1.txt\" \\
8346                testdir
8347 tar tf archive | sort
8348
8349 echo \"SUB 1\"
8350 tar cf archive --no-anchored \\
8351                --exclude=\"file1.txt\" \\
8352                testdir
8353 tar tf archive | sort
8354
8355 echo \"SUB 2\"
8356 tar cf archive --anchored \\
8357                --exclude=\"file1.txt\" \\
8358                testdir
8359 tar tf archive | sort
8360
8361 echo \"SUB 3\"
8362 tar cf archive testdir file1.txt
8363 tar t \"file1.txt\" -f archive | sort
8364
8365 echo \"SUB 4\"
8366 tar t --no-anchored \"file1.txt\" -f archive | sort
8367
8368 echo \"SUB 5\"
8369 tar t --anchored \"file1.txt\" -f archive | sort
8370
8371 rm -rf testdir file1.txt
8372
8373 )"
8374 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
8375 ( $at_check_trace;
8376 mkdir oldgnu
8377 (cd oldgnu
8378 TEST_TAR_FORMAT=oldgnu
8379 export TEST_TAR_FORMAT
8380 TAR_OPTIONS="-H oldgnu"
8381 export TAR_OPTIONS
8382 rm -rf *
8383
8384
8385 test -z "`sort < /dev/null 2>&1`" || exit 77
8386
8387
8388 rm -rf testdir
8389 mkdir -p testdir
8390 touch file1.txt
8391 touch testdir/file1.txt
8392 touch testdir/file2
8393
8394 tar cf archive --exclude="file1.txt" \
8395                testdir
8396 tar tf archive | sort
8397
8398 echo "SUB 1"
8399 tar cf archive --no-anchored \
8400                --exclude="file1.txt" \
8401                testdir
8402 tar tf archive | sort
8403
8404 echo "SUB 2"
8405 tar cf archive --anchored \
8406                --exclude="file1.txt" \
8407                testdir
8408 tar tf archive | sort
8409
8410 echo "SUB 3"
8411 tar cf archive testdir file1.txt
8412 tar t "file1.txt" -f archive | sort
8413
8414 echo "SUB 4"
8415 tar t --no-anchored "file1.txt" -f archive | sort
8416
8417 echo "SUB 5"
8418 tar t --anchored "file1.txt" -f archive | sort
8419
8420 rm -rf testdir file1.txt
8421
8422 )
8423 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8424 at_status=$? at_failed=false
8425 $at_check_filter
8426 at_fn_diff_devnull "$at_stderr" || at_failed=:
8427 echo >>"$at_stdout"; $as_echo "testdir/
8428 testdir/file2
8429 SUB 1
8430 testdir/
8431 testdir/file2
8432 SUB 2
8433 testdir/
8434 testdir/file1.txt
8435 testdir/file2
8436 SUB 3
8437 file1.txt
8438 SUB 4
8439 file1.txt
8440 testdir/file1.txt
8441 SUB 5
8442 file1.txt
8443 " | \
8444   $at_diff - "$at_stdout" || at_failed=:
8445 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
8446 $at_failed && at_fn_log_failure
8447 $at_traceon; }
8448
8449               { set +x
8450 $as_echo "$at_srcdir/exclude02.at:22:
8451 mkdir ustar
8452 (cd ustar
8453 TEST_TAR_FORMAT=ustar
8454 export TEST_TAR_FORMAT
8455 TAR_OPTIONS=\"-H ustar\"
8456 export TAR_OPTIONS
8457 rm -rf *
8458
8459
8460 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8461
8462
8463 rm -rf testdir
8464 mkdir -p testdir
8465 touch file1.txt
8466 touch testdir/file1.txt
8467 touch testdir/file2
8468
8469 tar cf archive --exclude=\"file1.txt\" \\
8470                testdir
8471 tar tf archive | sort
8472
8473 echo \"SUB 1\"
8474 tar cf archive --no-anchored \\
8475                --exclude=\"file1.txt\" \\
8476                testdir
8477 tar tf archive | sort
8478
8479 echo \"SUB 2\"
8480 tar cf archive --anchored \\
8481                --exclude=\"file1.txt\" \\
8482                testdir
8483 tar tf archive | sort
8484
8485 echo \"SUB 3\"
8486 tar cf archive testdir file1.txt
8487 tar t \"file1.txt\" -f archive | sort
8488
8489 echo \"SUB 4\"
8490 tar t --no-anchored \"file1.txt\" -f archive | sort
8491
8492 echo \"SUB 5\"
8493 tar t --anchored \"file1.txt\" -f archive | sort
8494
8495 rm -rf testdir file1.txt
8496
8497 )"
8498 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
8499 ( $at_check_trace;
8500 mkdir ustar
8501 (cd ustar
8502 TEST_TAR_FORMAT=ustar
8503 export TEST_TAR_FORMAT
8504 TAR_OPTIONS="-H ustar"
8505 export TAR_OPTIONS
8506 rm -rf *
8507
8508
8509 test -z "`sort < /dev/null 2>&1`" || exit 77
8510
8511
8512 rm -rf testdir
8513 mkdir -p testdir
8514 touch file1.txt
8515 touch testdir/file1.txt
8516 touch testdir/file2
8517
8518 tar cf archive --exclude="file1.txt" \
8519                testdir
8520 tar tf archive | sort
8521
8522 echo "SUB 1"
8523 tar cf archive --no-anchored \
8524                --exclude="file1.txt" \
8525                testdir
8526 tar tf archive | sort
8527
8528 echo "SUB 2"
8529 tar cf archive --anchored \
8530                --exclude="file1.txt" \
8531                testdir
8532 tar tf archive | sort
8533
8534 echo "SUB 3"
8535 tar cf archive testdir file1.txt
8536 tar t "file1.txt" -f archive | sort
8537
8538 echo "SUB 4"
8539 tar t --no-anchored "file1.txt" -f archive | sort
8540
8541 echo "SUB 5"
8542 tar t --anchored "file1.txt" -f archive | sort
8543
8544 rm -rf testdir file1.txt
8545
8546 )
8547 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8548 at_status=$? at_failed=false
8549 $at_check_filter
8550 at_fn_diff_devnull "$at_stderr" || at_failed=:
8551 echo >>"$at_stdout"; $as_echo "testdir/
8552 testdir/file2
8553 SUB 1
8554 testdir/
8555 testdir/file2
8556 SUB 2
8557 testdir/
8558 testdir/file1.txt
8559 testdir/file2
8560 SUB 3
8561 file1.txt
8562 SUB 4
8563 file1.txt
8564 testdir/file1.txt
8565 SUB 5
8566 file1.txt
8567 " | \
8568   $at_diff - "$at_stdout" || at_failed=:
8569 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
8570 $at_failed && at_fn_log_failure
8571 $at_traceon; }
8572
8573               { set +x
8574 $as_echo "$at_srcdir/exclude02.at:22:
8575 mkdir posix
8576 (cd posix
8577 TEST_TAR_FORMAT=posix
8578 export TEST_TAR_FORMAT
8579 TAR_OPTIONS=\"-H posix\"
8580 export TAR_OPTIONS
8581 rm -rf *
8582
8583
8584 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8585
8586
8587 rm -rf testdir
8588 mkdir -p testdir
8589 touch file1.txt
8590 touch testdir/file1.txt
8591 touch testdir/file2
8592
8593 tar cf archive --exclude=\"file1.txt\" \\
8594                testdir
8595 tar tf archive | sort
8596
8597 echo \"SUB 1\"
8598 tar cf archive --no-anchored \\
8599                --exclude=\"file1.txt\" \\
8600                testdir
8601 tar tf archive | sort
8602
8603 echo \"SUB 2\"
8604 tar cf archive --anchored \\
8605                --exclude=\"file1.txt\" \\
8606                testdir
8607 tar tf archive | sort
8608
8609 echo \"SUB 3\"
8610 tar cf archive testdir file1.txt
8611 tar t \"file1.txt\" -f archive | sort
8612
8613 echo \"SUB 4\"
8614 tar t --no-anchored \"file1.txt\" -f archive | sort
8615
8616 echo \"SUB 5\"
8617 tar t --anchored \"file1.txt\" -f archive | sort
8618
8619 rm -rf testdir file1.txt
8620
8621 )"
8622 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
8623 ( $at_check_trace;
8624 mkdir posix
8625 (cd posix
8626 TEST_TAR_FORMAT=posix
8627 export TEST_TAR_FORMAT
8628 TAR_OPTIONS="-H posix"
8629 export TAR_OPTIONS
8630 rm -rf *
8631
8632
8633 test -z "`sort < /dev/null 2>&1`" || exit 77
8634
8635
8636 rm -rf testdir
8637 mkdir -p testdir
8638 touch file1.txt
8639 touch testdir/file1.txt
8640 touch testdir/file2
8641
8642 tar cf archive --exclude="file1.txt" \
8643                testdir
8644 tar tf archive | sort
8645
8646 echo "SUB 1"
8647 tar cf archive --no-anchored \
8648                --exclude="file1.txt" \
8649                testdir
8650 tar tf archive | sort
8651
8652 echo "SUB 2"
8653 tar cf archive --anchored \
8654                --exclude="file1.txt" \
8655                testdir
8656 tar tf archive | sort
8657
8658 echo "SUB 3"
8659 tar cf archive testdir file1.txt
8660 tar t "file1.txt" -f archive | sort
8661
8662 echo "SUB 4"
8663 tar t --no-anchored "file1.txt" -f archive | sort
8664
8665 echo "SUB 5"
8666 tar t --anchored "file1.txt" -f archive | sort
8667
8668 rm -rf testdir file1.txt
8669
8670 )
8671 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8672 at_status=$? at_failed=false
8673 $at_check_filter
8674 at_fn_diff_devnull "$at_stderr" || at_failed=:
8675 echo >>"$at_stdout"; $as_echo "testdir/
8676 testdir/file2
8677 SUB 1
8678 testdir/
8679 testdir/file2
8680 SUB 2
8681 testdir/
8682 testdir/file1.txt
8683 testdir/file2
8684 SUB 3
8685 file1.txt
8686 SUB 4
8687 file1.txt
8688 testdir/file1.txt
8689 SUB 5
8690 file1.txt
8691 " | \
8692   $at_diff - "$at_stdout" || at_failed=:
8693 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
8694 $at_failed && at_fn_log_failure
8695 $at_traceon; }
8696
8697               { set +x
8698 $as_echo "$at_srcdir/exclude02.at:22:
8699 mkdir gnu
8700 (cd gnu
8701 TEST_TAR_FORMAT=gnu
8702 export TEST_TAR_FORMAT
8703 TAR_OPTIONS=\"-H gnu\"
8704 export TAR_OPTIONS
8705 rm -rf *
8706
8707
8708 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8709
8710
8711 rm -rf testdir
8712 mkdir -p testdir
8713 touch file1.txt
8714 touch testdir/file1.txt
8715 touch testdir/file2
8716
8717 tar cf archive --exclude=\"file1.txt\" \\
8718                testdir
8719 tar tf archive | sort
8720
8721 echo \"SUB 1\"
8722 tar cf archive --no-anchored \\
8723                --exclude=\"file1.txt\" \\
8724                testdir
8725 tar tf archive | sort
8726
8727 echo \"SUB 2\"
8728 tar cf archive --anchored \\
8729                --exclude=\"file1.txt\" \\
8730                testdir
8731 tar tf archive | sort
8732
8733 echo \"SUB 3\"
8734 tar cf archive testdir file1.txt
8735 tar t \"file1.txt\" -f archive | sort
8736
8737 echo \"SUB 4\"
8738 tar t --no-anchored \"file1.txt\" -f archive | sort
8739
8740 echo \"SUB 5\"
8741 tar t --anchored \"file1.txt\" -f archive | sort
8742
8743 rm -rf testdir file1.txt
8744
8745 )"
8746 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
8747 ( $at_check_trace;
8748 mkdir gnu
8749 (cd gnu
8750 TEST_TAR_FORMAT=gnu
8751 export TEST_TAR_FORMAT
8752 TAR_OPTIONS="-H gnu"
8753 export TAR_OPTIONS
8754 rm -rf *
8755
8756
8757 test -z "`sort < /dev/null 2>&1`" || exit 77
8758
8759
8760 rm -rf testdir
8761 mkdir -p testdir
8762 touch file1.txt
8763 touch testdir/file1.txt
8764 touch testdir/file2
8765
8766 tar cf archive --exclude="file1.txt" \
8767                testdir
8768 tar tf archive | sort
8769
8770 echo "SUB 1"
8771 tar cf archive --no-anchored \
8772                --exclude="file1.txt" \
8773                testdir
8774 tar tf archive | sort
8775
8776 echo "SUB 2"
8777 tar cf archive --anchored \
8778                --exclude="file1.txt" \
8779                testdir
8780 tar tf archive | sort
8781
8782 echo "SUB 3"
8783 tar cf archive testdir file1.txt
8784 tar t "file1.txt" -f archive | sort
8785
8786 echo "SUB 4"
8787 tar t --no-anchored "file1.txt" -f archive | sort
8788
8789 echo "SUB 5"
8790 tar t --anchored "file1.txt" -f archive | sort
8791
8792 rm -rf testdir file1.txt
8793
8794 )
8795 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8796 at_status=$? at_failed=false
8797 $at_check_filter
8798 at_fn_diff_devnull "$at_stderr" || at_failed=:
8799 echo >>"$at_stdout"; $as_echo "testdir/
8800 testdir/file2
8801 SUB 1
8802 testdir/
8803 testdir/file2
8804 SUB 2
8805 testdir/
8806 testdir/file1.txt
8807 testdir/file2
8808 SUB 3
8809 file1.txt
8810 SUB 4
8811 file1.txt
8812 testdir/file1.txt
8813 SUB 5
8814 file1.txt
8815 " | \
8816   $at_diff - "$at_stdout" || at_failed=:
8817 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
8818 $at_failed && at_fn_log_failure
8819 $at_traceon; }
8820
8821
8822
8823
8824   set +x
8825   $at_times_p && times >"$at_times_file"
8826 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8827 read at_status <"$at_status_file"
8828 #AT_STOP_35
8829 #AT_START_36
8830 at_fn_group_banner 36 'exclude03.at:19' \
8831   "exclude: wildcards match slash" "                 " 7
8832 at_xfail=no
8833       test -f $XFAILFILE && at_xfail=yes
8834 (
8835   $as_echo "36. $at_setup_line: testing $at_desc ..."
8836   $at_traceon
8837
8838
8839
8840
8841
8842   { set +x
8843 $as_echo "$at_srcdir/exclude03.at:22:
8844 mkdir v7
8845 (cd v7
8846 TEST_TAR_FORMAT=v7
8847 export TEST_TAR_FORMAT
8848 TAR_OPTIONS=\"-H v7\"
8849 export TAR_OPTIONS
8850 rm -rf *
8851
8852
8853 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8854
8855
8856 rm -rf testdir
8857 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8858 touch testdir/\\*f\\*1
8859 touch testdir/dir1/file1
8860 touch testdir/dir1/\\*
8861 touch testdir/dir2/file2
8862 touch testdir/dir2/\\*
8863 touch testdir/dir3/file3
8864 touch testdir/dir3/\\*
8865
8866 tar cf archive --exclude='testdir*f*1' \\
8867                --no-wildcards-match-slash \\
8868                --exclude='testdir*f*2' \\
8869                --wildcards-match-slash \\
8870                --exclude='testdir*f*3' \\
8871                testdir
8872 tar tf archive | sort
8873
8874 echo \"NEXT\"
8875 tar cf archive testdir
8876 tar t --wildcards 'testdir/*f*1' -f archive | sort
8877
8878 echo \"NEXT\"
8879 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
8880
8881 echo \"NEXT\"
8882 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
8883
8884 rm -rf testdir
8885
8886 )"
8887 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
8888 ( $at_check_trace;
8889 mkdir v7
8890 (cd v7
8891 TEST_TAR_FORMAT=v7
8892 export TEST_TAR_FORMAT
8893 TAR_OPTIONS="-H v7"
8894 export TAR_OPTIONS
8895 rm -rf *
8896
8897
8898 test -z "`sort < /dev/null 2>&1`" || exit 77
8899
8900
8901 rm -rf testdir
8902 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8903 touch testdir/\*f\*1
8904 touch testdir/dir1/file1
8905 touch testdir/dir1/\*
8906 touch testdir/dir2/file2
8907 touch testdir/dir2/\*
8908 touch testdir/dir3/file3
8909 touch testdir/dir3/\*
8910
8911 tar cf archive --exclude='testdir*f*1' \
8912                --no-wildcards-match-slash \
8913                --exclude='testdir*f*2' \
8914                --wildcards-match-slash \
8915                --exclude='testdir*f*3' \
8916                testdir
8917 tar tf archive | sort
8918
8919 echo "NEXT"
8920 tar cf archive testdir
8921 tar t --wildcards 'testdir/*f*1' -f archive | sort
8922
8923 echo "NEXT"
8924 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
8925
8926 echo "NEXT"
8927 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
8928
8929 rm -rf testdir
8930
8931 )
8932 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8933 at_status=$? at_failed=false
8934 $at_check_filter
8935 at_fn_diff_devnull "$at_stderr" || at_failed=:
8936 echo >>"$at_stdout"; $as_echo "testdir/
8937 testdir/dir1/
8938 testdir/dir1/*
8939 testdir/dir2/
8940 testdir/dir2/*
8941 testdir/dir2/file2
8942 testdir/dir3/
8943 testdir/dir3/*
8944 NEXT
8945 testdir/*f*1
8946 testdir/dir1/file1
8947 NEXT
8948 testdir/*f*1
8949 NEXT
8950 testdir/*f*1
8951 testdir/dir1/file1
8952 " | \
8953   $at_diff - "$at_stdout" || at_failed=:
8954 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
8955 $at_failed && at_fn_log_failure
8956 $at_traceon; }
8957
8958               { set +x
8959 $as_echo "$at_srcdir/exclude03.at:22:
8960 mkdir oldgnu
8961 (cd oldgnu
8962 TEST_TAR_FORMAT=oldgnu
8963 export TEST_TAR_FORMAT
8964 TAR_OPTIONS=\"-H oldgnu\"
8965 export TAR_OPTIONS
8966 rm -rf *
8967
8968
8969 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8970
8971
8972 rm -rf testdir
8973 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8974 touch testdir/\\*f\\*1
8975 touch testdir/dir1/file1
8976 touch testdir/dir1/\\*
8977 touch testdir/dir2/file2
8978 touch testdir/dir2/\\*
8979 touch testdir/dir3/file3
8980 touch testdir/dir3/\\*
8981
8982 tar cf archive --exclude='testdir*f*1' \\
8983                --no-wildcards-match-slash \\
8984                --exclude='testdir*f*2' \\
8985                --wildcards-match-slash \\
8986                --exclude='testdir*f*3' \\
8987                testdir
8988 tar tf archive | sort
8989
8990 echo \"NEXT\"
8991 tar cf archive testdir
8992 tar t --wildcards 'testdir/*f*1' -f archive | sort
8993
8994 echo \"NEXT\"
8995 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
8996
8997 echo \"NEXT\"
8998 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
8999
9000 rm -rf testdir
9001
9002 )"
9003 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9004 ( $at_check_trace;
9005 mkdir oldgnu
9006 (cd oldgnu
9007 TEST_TAR_FORMAT=oldgnu
9008 export TEST_TAR_FORMAT
9009 TAR_OPTIONS="-H oldgnu"
9010 export TAR_OPTIONS
9011 rm -rf *
9012
9013
9014 test -z "`sort < /dev/null 2>&1`" || exit 77
9015
9016
9017 rm -rf testdir
9018 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9019 touch testdir/\*f\*1
9020 touch testdir/dir1/file1
9021 touch testdir/dir1/\*
9022 touch testdir/dir2/file2
9023 touch testdir/dir2/\*
9024 touch testdir/dir3/file3
9025 touch testdir/dir3/\*
9026
9027 tar cf archive --exclude='testdir*f*1' \
9028                --no-wildcards-match-slash \
9029                --exclude='testdir*f*2' \
9030                --wildcards-match-slash \
9031                --exclude='testdir*f*3' \
9032                testdir
9033 tar tf archive | sort
9034
9035 echo "NEXT"
9036 tar cf archive testdir
9037 tar t --wildcards 'testdir/*f*1' -f archive | sort
9038
9039 echo "NEXT"
9040 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9041
9042 echo "NEXT"
9043 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9044
9045 rm -rf testdir
9046
9047 )
9048 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9049 at_status=$? at_failed=false
9050 $at_check_filter
9051 at_fn_diff_devnull "$at_stderr" || at_failed=:
9052 echo >>"$at_stdout"; $as_echo "testdir/
9053 testdir/dir1/
9054 testdir/dir1/*
9055 testdir/dir2/
9056 testdir/dir2/*
9057 testdir/dir2/file2
9058 testdir/dir3/
9059 testdir/dir3/*
9060 NEXT
9061 testdir/*f*1
9062 testdir/dir1/file1
9063 NEXT
9064 testdir/*f*1
9065 NEXT
9066 testdir/*f*1
9067 testdir/dir1/file1
9068 " | \
9069   $at_diff - "$at_stdout" || at_failed=:
9070 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9071 $at_failed && at_fn_log_failure
9072 $at_traceon; }
9073
9074               { set +x
9075 $as_echo "$at_srcdir/exclude03.at:22:
9076 mkdir ustar
9077 (cd ustar
9078 TEST_TAR_FORMAT=ustar
9079 export TEST_TAR_FORMAT
9080 TAR_OPTIONS=\"-H ustar\"
9081 export TAR_OPTIONS
9082 rm -rf *
9083
9084
9085 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9086
9087
9088 rm -rf testdir
9089 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9090 touch testdir/\\*f\\*1
9091 touch testdir/dir1/file1
9092 touch testdir/dir1/\\*
9093 touch testdir/dir2/file2
9094 touch testdir/dir2/\\*
9095 touch testdir/dir3/file3
9096 touch testdir/dir3/\\*
9097
9098 tar cf archive --exclude='testdir*f*1' \\
9099                --no-wildcards-match-slash \\
9100                --exclude='testdir*f*2' \\
9101                --wildcards-match-slash \\
9102                --exclude='testdir*f*3' \\
9103                testdir
9104 tar tf archive | sort
9105
9106 echo \"NEXT\"
9107 tar cf archive testdir
9108 tar t --wildcards 'testdir/*f*1' -f archive | sort
9109
9110 echo \"NEXT\"
9111 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9112
9113 echo \"NEXT\"
9114 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9115
9116 rm -rf testdir
9117
9118 )"
9119 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9120 ( $at_check_trace;
9121 mkdir ustar
9122 (cd ustar
9123 TEST_TAR_FORMAT=ustar
9124 export TEST_TAR_FORMAT
9125 TAR_OPTIONS="-H ustar"
9126 export TAR_OPTIONS
9127 rm -rf *
9128
9129
9130 test -z "`sort < /dev/null 2>&1`" || exit 77
9131
9132
9133 rm -rf testdir
9134 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9135 touch testdir/\*f\*1
9136 touch testdir/dir1/file1
9137 touch testdir/dir1/\*
9138 touch testdir/dir2/file2
9139 touch testdir/dir2/\*
9140 touch testdir/dir3/file3
9141 touch testdir/dir3/\*
9142
9143 tar cf archive --exclude='testdir*f*1' \
9144                --no-wildcards-match-slash \
9145                --exclude='testdir*f*2' \
9146                --wildcards-match-slash \
9147                --exclude='testdir*f*3' \
9148                testdir
9149 tar tf archive | sort
9150
9151 echo "NEXT"
9152 tar cf archive testdir
9153 tar t --wildcards 'testdir/*f*1' -f archive | sort
9154
9155 echo "NEXT"
9156 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9157
9158 echo "NEXT"
9159 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9160
9161 rm -rf testdir
9162
9163 )
9164 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9165 at_status=$? at_failed=false
9166 $at_check_filter
9167 at_fn_diff_devnull "$at_stderr" || at_failed=:
9168 echo >>"$at_stdout"; $as_echo "testdir/
9169 testdir/dir1/
9170 testdir/dir1/*
9171 testdir/dir2/
9172 testdir/dir2/*
9173 testdir/dir2/file2
9174 testdir/dir3/
9175 testdir/dir3/*
9176 NEXT
9177 testdir/*f*1
9178 testdir/dir1/file1
9179 NEXT
9180 testdir/*f*1
9181 NEXT
9182 testdir/*f*1
9183 testdir/dir1/file1
9184 " | \
9185   $at_diff - "$at_stdout" || at_failed=:
9186 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9187 $at_failed && at_fn_log_failure
9188 $at_traceon; }
9189
9190               { set +x
9191 $as_echo "$at_srcdir/exclude03.at:22:
9192 mkdir posix
9193 (cd posix
9194 TEST_TAR_FORMAT=posix
9195 export TEST_TAR_FORMAT
9196 TAR_OPTIONS=\"-H posix\"
9197 export TAR_OPTIONS
9198 rm -rf *
9199
9200
9201 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9202
9203
9204 rm -rf testdir
9205 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9206 touch testdir/\\*f\\*1
9207 touch testdir/dir1/file1
9208 touch testdir/dir1/\\*
9209 touch testdir/dir2/file2
9210 touch testdir/dir2/\\*
9211 touch testdir/dir3/file3
9212 touch testdir/dir3/\\*
9213
9214 tar cf archive --exclude='testdir*f*1' \\
9215                --no-wildcards-match-slash \\
9216                --exclude='testdir*f*2' \\
9217                --wildcards-match-slash \\
9218                --exclude='testdir*f*3' \\
9219                testdir
9220 tar tf archive | sort
9221
9222 echo \"NEXT\"
9223 tar cf archive testdir
9224 tar t --wildcards 'testdir/*f*1' -f archive | sort
9225
9226 echo \"NEXT\"
9227 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9228
9229 echo \"NEXT\"
9230 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9231
9232 rm -rf testdir
9233
9234 )"
9235 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9236 ( $at_check_trace;
9237 mkdir posix
9238 (cd posix
9239 TEST_TAR_FORMAT=posix
9240 export TEST_TAR_FORMAT
9241 TAR_OPTIONS="-H posix"
9242 export TAR_OPTIONS
9243 rm -rf *
9244
9245
9246 test -z "`sort < /dev/null 2>&1`" || exit 77
9247
9248
9249 rm -rf testdir
9250 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9251 touch testdir/\*f\*1
9252 touch testdir/dir1/file1
9253 touch testdir/dir1/\*
9254 touch testdir/dir2/file2
9255 touch testdir/dir2/\*
9256 touch testdir/dir3/file3
9257 touch testdir/dir3/\*
9258
9259 tar cf archive --exclude='testdir*f*1' \
9260                --no-wildcards-match-slash \
9261                --exclude='testdir*f*2' \
9262                --wildcards-match-slash \
9263                --exclude='testdir*f*3' \
9264                testdir
9265 tar tf archive | sort
9266
9267 echo "NEXT"
9268 tar cf archive testdir
9269 tar t --wildcards 'testdir/*f*1' -f archive | sort
9270
9271 echo "NEXT"
9272 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9273
9274 echo "NEXT"
9275 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9276
9277 rm -rf testdir
9278
9279 )
9280 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9281 at_status=$? at_failed=false
9282 $at_check_filter
9283 at_fn_diff_devnull "$at_stderr" || at_failed=:
9284 echo >>"$at_stdout"; $as_echo "testdir/
9285 testdir/dir1/
9286 testdir/dir1/*
9287 testdir/dir2/
9288 testdir/dir2/*
9289 testdir/dir2/file2
9290 testdir/dir3/
9291 testdir/dir3/*
9292 NEXT
9293 testdir/*f*1
9294 testdir/dir1/file1
9295 NEXT
9296 testdir/*f*1
9297 NEXT
9298 testdir/*f*1
9299 testdir/dir1/file1
9300 " | \
9301   $at_diff - "$at_stdout" || at_failed=:
9302 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9303 $at_failed && at_fn_log_failure
9304 $at_traceon; }
9305
9306               { set +x
9307 $as_echo "$at_srcdir/exclude03.at:22:
9308 mkdir gnu
9309 (cd gnu
9310 TEST_TAR_FORMAT=gnu
9311 export TEST_TAR_FORMAT
9312 TAR_OPTIONS=\"-H gnu\"
9313 export TAR_OPTIONS
9314 rm -rf *
9315
9316
9317 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9318
9319
9320 rm -rf testdir
9321 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9322 touch testdir/\\*f\\*1
9323 touch testdir/dir1/file1
9324 touch testdir/dir1/\\*
9325 touch testdir/dir2/file2
9326 touch testdir/dir2/\\*
9327 touch testdir/dir3/file3
9328 touch testdir/dir3/\\*
9329
9330 tar cf archive --exclude='testdir*f*1' \\
9331                --no-wildcards-match-slash \\
9332                --exclude='testdir*f*2' \\
9333                --wildcards-match-slash \\
9334                --exclude='testdir*f*3' \\
9335                testdir
9336 tar tf archive | sort
9337
9338 echo \"NEXT\"
9339 tar cf archive testdir
9340 tar t --wildcards 'testdir/*f*1' -f archive | sort
9341
9342 echo \"NEXT\"
9343 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9344
9345 echo \"NEXT\"
9346 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9347
9348 rm -rf testdir
9349
9350 )"
9351 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9352 ( $at_check_trace;
9353 mkdir gnu
9354 (cd gnu
9355 TEST_TAR_FORMAT=gnu
9356 export TEST_TAR_FORMAT
9357 TAR_OPTIONS="-H gnu"
9358 export TAR_OPTIONS
9359 rm -rf *
9360
9361
9362 test -z "`sort < /dev/null 2>&1`" || exit 77
9363
9364
9365 rm -rf testdir
9366 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9367 touch testdir/\*f\*1
9368 touch testdir/dir1/file1
9369 touch testdir/dir1/\*
9370 touch testdir/dir2/file2
9371 touch testdir/dir2/\*
9372 touch testdir/dir3/file3
9373 touch testdir/dir3/\*
9374
9375 tar cf archive --exclude='testdir*f*1' \
9376                --no-wildcards-match-slash \
9377                --exclude='testdir*f*2' \
9378                --wildcards-match-slash \
9379                --exclude='testdir*f*3' \
9380                testdir
9381 tar tf archive | sort
9382
9383 echo "NEXT"
9384 tar cf archive testdir
9385 tar t --wildcards 'testdir/*f*1' -f archive | sort
9386
9387 echo "NEXT"
9388 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9389
9390 echo "NEXT"
9391 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9392
9393 rm -rf testdir
9394
9395 )
9396 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9397 at_status=$? at_failed=false
9398 $at_check_filter
9399 at_fn_diff_devnull "$at_stderr" || at_failed=:
9400 echo >>"$at_stdout"; $as_echo "testdir/
9401 testdir/dir1/
9402 testdir/dir1/*
9403 testdir/dir2/
9404 testdir/dir2/*
9405 testdir/dir2/file2
9406 testdir/dir3/
9407 testdir/dir3/*
9408 NEXT
9409 testdir/*f*1
9410 testdir/dir1/file1
9411 NEXT
9412 testdir/*f*1
9413 NEXT
9414 testdir/*f*1
9415 testdir/dir1/file1
9416 " | \
9417   $at_diff - "$at_stdout" || at_failed=:
9418 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9419 $at_failed && at_fn_log_failure
9420 $at_traceon; }
9421
9422
9423
9424
9425   set +x
9426   $at_times_p && times >"$at_times_file"
9427 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9428 read at_status <"$at_status_file"
9429 #AT_STOP_36
9430 #AT_START_37
9431 at_fn_group_banner 37 'exclude04.at:19' \
9432   "exclude: case insensitive" "                      " 7
9433 at_xfail=no
9434       test -f $XFAILFILE && at_xfail=yes
9435 (
9436   $as_echo "37. $at_setup_line: testing $at_desc ..."
9437   $at_traceon
9438
9439
9440
9441
9442
9443   { set +x
9444 $as_echo "$at_srcdir/exclude04.at:22:
9445 mkdir v7
9446 (cd v7
9447 TEST_TAR_FORMAT=v7
9448 export TEST_TAR_FORMAT
9449 TAR_OPTIONS=\"-H v7\"
9450 export TAR_OPTIONS
9451 rm -rf *
9452
9453
9454 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9455
9456
9457 rm -rf testdir
9458 mkdir -p testdir/dir
9459 touch testdir/file1
9460 touch testdir/file2
9461 touch testdir/file3
9462 touch testdir/file4
9463 touch testdir/dir/File1
9464 touch testdir/dir/File2
9465 touch testdir/dir/File3
9466 touch testdir/dir/File4
9467
9468 tar cf archive --exclude=FILE2 \\
9469                --exclude=file1 \\
9470                --ignore-case \\
9471                --exclude=file3 \\
9472                --no-ignore-case \\
9473                --exclude=FILE2 \\
9474                --exclude=file4 \\
9475                testdir
9476 tar tf archive | sort
9477
9478 echo \"SUB 1\"
9479 tar cf archive testdir
9480 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9481
9482 echo \"SUB 2\"
9483 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9484
9485 echo \"SUB 3\"
9486 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9487
9488 rm -rf testdir
9489
9490 )"
9491 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
9492 ( $at_check_trace;
9493 mkdir v7
9494 (cd v7
9495 TEST_TAR_FORMAT=v7
9496 export TEST_TAR_FORMAT
9497 TAR_OPTIONS="-H v7"
9498 export TAR_OPTIONS
9499 rm -rf *
9500
9501
9502 test -z "`sort < /dev/null 2>&1`" || exit 77
9503
9504
9505 rm -rf testdir
9506 mkdir -p testdir/dir
9507 touch testdir/file1
9508 touch testdir/file2
9509 touch testdir/file3
9510 touch testdir/file4
9511 touch testdir/dir/File1
9512 touch testdir/dir/File2
9513 touch testdir/dir/File3
9514 touch testdir/dir/File4
9515
9516 tar cf archive --exclude=FILE2 \
9517                --exclude=file1 \
9518                --ignore-case \
9519                --exclude=file3 \
9520                --no-ignore-case \
9521                --exclude=FILE2 \
9522                --exclude=file4 \
9523                testdir
9524 tar tf archive | sort
9525
9526 echo "SUB 1"
9527 tar cf archive testdir
9528 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9529
9530 echo "SUB 2"
9531 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9532
9533 echo "SUB 3"
9534 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9535
9536 rm -rf testdir
9537
9538 )
9539 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9540 at_status=$? at_failed=false
9541 $at_check_filter
9542 at_fn_diff_devnull "$at_stderr" || at_failed=:
9543 echo >>"$at_stdout"; $as_echo "testdir/
9544 testdir/dir/
9545 testdir/dir/File1
9546 testdir/dir/File2
9547 testdir/dir/File4
9548 testdir/file2
9549 SUB 1
9550 testdir/dir/File2
9551 SUB 2
9552 testdir/dir/File2
9553 testdir/file2
9554 SUB 3
9555 testdir/dir/File2
9556 " | \
9557   $at_diff - "$at_stdout" || at_failed=:
9558 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
9559 $at_failed && at_fn_log_failure
9560 $at_traceon; }
9561
9562               { set +x
9563 $as_echo "$at_srcdir/exclude04.at:22:
9564 mkdir oldgnu
9565 (cd oldgnu
9566 TEST_TAR_FORMAT=oldgnu
9567 export TEST_TAR_FORMAT
9568 TAR_OPTIONS=\"-H oldgnu\"
9569 export TAR_OPTIONS
9570 rm -rf *
9571
9572
9573 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9574
9575
9576 rm -rf testdir
9577 mkdir -p testdir/dir
9578 touch testdir/file1
9579 touch testdir/file2
9580 touch testdir/file3
9581 touch testdir/file4
9582 touch testdir/dir/File1
9583 touch testdir/dir/File2
9584 touch testdir/dir/File3
9585 touch testdir/dir/File4
9586
9587 tar cf archive --exclude=FILE2 \\
9588                --exclude=file1 \\
9589                --ignore-case \\
9590                --exclude=file3 \\
9591                --no-ignore-case \\
9592                --exclude=FILE2 \\
9593                --exclude=file4 \\
9594                testdir
9595 tar tf archive | sort
9596
9597 echo \"SUB 1\"
9598 tar cf archive testdir
9599 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9600
9601 echo \"SUB 2\"
9602 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9603
9604 echo \"SUB 3\"
9605 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9606
9607 rm -rf testdir
9608
9609 )"
9610 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
9611 ( $at_check_trace;
9612 mkdir oldgnu
9613 (cd oldgnu
9614 TEST_TAR_FORMAT=oldgnu
9615 export TEST_TAR_FORMAT
9616 TAR_OPTIONS="-H oldgnu"
9617 export TAR_OPTIONS
9618 rm -rf *
9619
9620
9621 test -z "`sort < /dev/null 2>&1`" || exit 77
9622
9623
9624 rm -rf testdir
9625 mkdir -p testdir/dir
9626 touch testdir/file1
9627 touch testdir/file2
9628 touch testdir/file3
9629 touch testdir/file4
9630 touch testdir/dir/File1
9631 touch testdir/dir/File2
9632 touch testdir/dir/File3
9633 touch testdir/dir/File4
9634
9635 tar cf archive --exclude=FILE2 \
9636                --exclude=file1 \
9637                --ignore-case \
9638                --exclude=file3 \
9639                --no-ignore-case \
9640                --exclude=FILE2 \
9641                --exclude=file4 \
9642                testdir
9643 tar tf archive | sort
9644
9645 echo "SUB 1"
9646 tar cf archive testdir
9647 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9648
9649 echo "SUB 2"
9650 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9651
9652 echo "SUB 3"
9653 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9654
9655 rm -rf testdir
9656
9657 )
9658 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9659 at_status=$? at_failed=false
9660 $at_check_filter
9661 at_fn_diff_devnull "$at_stderr" || at_failed=:
9662 echo >>"$at_stdout"; $as_echo "testdir/
9663 testdir/dir/
9664 testdir/dir/File1
9665 testdir/dir/File2
9666 testdir/dir/File4
9667 testdir/file2
9668 SUB 1
9669 testdir/dir/File2
9670 SUB 2
9671 testdir/dir/File2
9672 testdir/file2
9673 SUB 3
9674 testdir/dir/File2
9675 " | \
9676   $at_diff - "$at_stdout" || at_failed=:
9677 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
9678 $at_failed && at_fn_log_failure
9679 $at_traceon; }
9680
9681               { set +x
9682 $as_echo "$at_srcdir/exclude04.at:22:
9683 mkdir ustar
9684 (cd ustar
9685 TEST_TAR_FORMAT=ustar
9686 export TEST_TAR_FORMAT
9687 TAR_OPTIONS=\"-H ustar\"
9688 export TAR_OPTIONS
9689 rm -rf *
9690
9691
9692 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9693
9694
9695 rm -rf testdir
9696 mkdir -p testdir/dir
9697 touch testdir/file1
9698 touch testdir/file2
9699 touch testdir/file3
9700 touch testdir/file4
9701 touch testdir/dir/File1
9702 touch testdir/dir/File2
9703 touch testdir/dir/File3
9704 touch testdir/dir/File4
9705
9706 tar cf archive --exclude=FILE2 \\
9707                --exclude=file1 \\
9708                --ignore-case \\
9709                --exclude=file3 \\
9710                --no-ignore-case \\
9711                --exclude=FILE2 \\
9712                --exclude=file4 \\
9713                testdir
9714 tar tf archive | sort
9715
9716 echo \"SUB 1\"
9717 tar cf archive testdir
9718 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9719
9720 echo \"SUB 2\"
9721 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9722
9723 echo \"SUB 3\"
9724 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9725
9726 rm -rf testdir
9727
9728 )"
9729 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
9730 ( $at_check_trace;
9731 mkdir ustar
9732 (cd ustar
9733 TEST_TAR_FORMAT=ustar
9734 export TEST_TAR_FORMAT
9735 TAR_OPTIONS="-H ustar"
9736 export TAR_OPTIONS
9737 rm -rf *
9738
9739
9740 test -z "`sort < /dev/null 2>&1`" || exit 77
9741
9742
9743 rm -rf testdir
9744 mkdir -p testdir/dir
9745 touch testdir/file1
9746 touch testdir/file2
9747 touch testdir/file3
9748 touch testdir/file4
9749 touch testdir/dir/File1
9750 touch testdir/dir/File2
9751 touch testdir/dir/File3
9752 touch testdir/dir/File4
9753
9754 tar cf archive --exclude=FILE2 \
9755                --exclude=file1 \
9756                --ignore-case \
9757                --exclude=file3 \
9758                --no-ignore-case \
9759                --exclude=FILE2 \
9760                --exclude=file4 \
9761                testdir
9762 tar tf archive | sort
9763
9764 echo "SUB 1"
9765 tar cf archive testdir
9766 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9767
9768 echo "SUB 2"
9769 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9770
9771 echo "SUB 3"
9772 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9773
9774 rm -rf testdir
9775
9776 )
9777 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9778 at_status=$? at_failed=false
9779 $at_check_filter
9780 at_fn_diff_devnull "$at_stderr" || at_failed=:
9781 echo >>"$at_stdout"; $as_echo "testdir/
9782 testdir/dir/
9783 testdir/dir/File1
9784 testdir/dir/File2
9785 testdir/dir/File4
9786 testdir/file2
9787 SUB 1
9788 testdir/dir/File2
9789 SUB 2
9790 testdir/dir/File2
9791 testdir/file2
9792 SUB 3
9793 testdir/dir/File2
9794 " | \
9795   $at_diff - "$at_stdout" || at_failed=:
9796 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
9797 $at_failed && at_fn_log_failure
9798 $at_traceon; }
9799
9800               { set +x
9801 $as_echo "$at_srcdir/exclude04.at:22:
9802 mkdir posix
9803 (cd posix
9804 TEST_TAR_FORMAT=posix
9805 export TEST_TAR_FORMAT
9806 TAR_OPTIONS=\"-H posix\"
9807 export TAR_OPTIONS
9808 rm -rf *
9809
9810
9811 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9812
9813
9814 rm -rf testdir
9815 mkdir -p testdir/dir
9816 touch testdir/file1
9817 touch testdir/file2
9818 touch testdir/file3
9819 touch testdir/file4
9820 touch testdir/dir/File1
9821 touch testdir/dir/File2
9822 touch testdir/dir/File3
9823 touch testdir/dir/File4
9824
9825 tar cf archive --exclude=FILE2 \\
9826                --exclude=file1 \\
9827                --ignore-case \\
9828                --exclude=file3 \\
9829                --no-ignore-case \\
9830                --exclude=FILE2 \\
9831                --exclude=file4 \\
9832                testdir
9833 tar tf archive | sort
9834
9835 echo \"SUB 1\"
9836 tar cf archive testdir
9837 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9838
9839 echo \"SUB 2\"
9840 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9841
9842 echo \"SUB 3\"
9843 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9844
9845 rm -rf testdir
9846
9847 )"
9848 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
9849 ( $at_check_trace;
9850 mkdir posix
9851 (cd posix
9852 TEST_TAR_FORMAT=posix
9853 export TEST_TAR_FORMAT
9854 TAR_OPTIONS="-H posix"
9855 export TAR_OPTIONS
9856 rm -rf *
9857
9858
9859 test -z "`sort < /dev/null 2>&1`" || exit 77
9860
9861
9862 rm -rf testdir
9863 mkdir -p testdir/dir
9864 touch testdir/file1
9865 touch testdir/file2
9866 touch testdir/file3
9867 touch testdir/file4
9868 touch testdir/dir/File1
9869 touch testdir/dir/File2
9870 touch testdir/dir/File3
9871 touch testdir/dir/File4
9872
9873 tar cf archive --exclude=FILE2 \
9874                --exclude=file1 \
9875                --ignore-case \
9876                --exclude=file3 \
9877                --no-ignore-case \
9878                --exclude=FILE2 \
9879                --exclude=file4 \
9880                testdir
9881 tar tf archive | sort
9882
9883 echo "SUB 1"
9884 tar cf archive testdir
9885 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9886
9887 echo "SUB 2"
9888 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9889
9890 echo "SUB 3"
9891 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9892
9893 rm -rf testdir
9894
9895 )
9896 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9897 at_status=$? at_failed=false
9898 $at_check_filter
9899 at_fn_diff_devnull "$at_stderr" || at_failed=:
9900 echo >>"$at_stdout"; $as_echo "testdir/
9901 testdir/dir/
9902 testdir/dir/File1
9903 testdir/dir/File2
9904 testdir/dir/File4
9905 testdir/file2
9906 SUB 1
9907 testdir/dir/File2
9908 SUB 2
9909 testdir/dir/File2
9910 testdir/file2
9911 SUB 3
9912 testdir/dir/File2
9913 " | \
9914   $at_diff - "$at_stdout" || at_failed=:
9915 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
9916 $at_failed && at_fn_log_failure
9917 $at_traceon; }
9918
9919               { set +x
9920 $as_echo "$at_srcdir/exclude04.at:22:
9921 mkdir gnu
9922 (cd gnu
9923 TEST_TAR_FORMAT=gnu
9924 export TEST_TAR_FORMAT
9925 TAR_OPTIONS=\"-H gnu\"
9926 export TAR_OPTIONS
9927 rm -rf *
9928
9929
9930 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9931
9932
9933 rm -rf testdir
9934 mkdir -p testdir/dir
9935 touch testdir/file1
9936 touch testdir/file2
9937 touch testdir/file3
9938 touch testdir/file4
9939 touch testdir/dir/File1
9940 touch testdir/dir/File2
9941 touch testdir/dir/File3
9942 touch testdir/dir/File4
9943
9944 tar cf archive --exclude=FILE2 \\
9945                --exclude=file1 \\
9946                --ignore-case \\
9947                --exclude=file3 \\
9948                --no-ignore-case \\
9949                --exclude=FILE2 \\
9950                --exclude=file4 \\
9951                testdir
9952 tar tf archive | sort
9953
9954 echo \"SUB 1\"
9955 tar cf archive testdir
9956 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9957
9958 echo \"SUB 2\"
9959 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9960
9961 echo \"SUB 3\"
9962 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9963
9964 rm -rf testdir
9965
9966 )"
9967 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
9968 ( $at_check_trace;
9969 mkdir gnu
9970 (cd gnu
9971 TEST_TAR_FORMAT=gnu
9972 export TEST_TAR_FORMAT
9973 TAR_OPTIONS="-H gnu"
9974 export TAR_OPTIONS
9975 rm -rf *
9976
9977
9978 test -z "`sort < /dev/null 2>&1`" || exit 77
9979
9980
9981 rm -rf testdir
9982 mkdir -p testdir/dir
9983 touch testdir/file1
9984 touch testdir/file2
9985 touch testdir/file3
9986 touch testdir/file4
9987 touch testdir/dir/File1
9988 touch testdir/dir/File2
9989 touch testdir/dir/File3
9990 touch testdir/dir/File4
9991
9992 tar cf archive --exclude=FILE2 \
9993                --exclude=file1 \
9994                --ignore-case \
9995                --exclude=file3 \
9996                --no-ignore-case \
9997                --exclude=FILE2 \
9998                --exclude=file4 \
9999                testdir
10000 tar tf archive | sort
10001
10002 echo "SUB 1"
10003 tar cf archive testdir
10004 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10005
10006 echo "SUB 2"
10007 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10008
10009 echo "SUB 3"
10010 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10011
10012 rm -rf testdir
10013
10014 )
10015 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10016 at_status=$? at_failed=false
10017 $at_check_filter
10018 at_fn_diff_devnull "$at_stderr" || at_failed=:
10019 echo >>"$at_stdout"; $as_echo "testdir/
10020 testdir/dir/
10021 testdir/dir/File1
10022 testdir/dir/File2
10023 testdir/dir/File4
10024 testdir/file2
10025 SUB 1
10026 testdir/dir/File2
10027 SUB 2
10028 testdir/dir/File2
10029 testdir/file2
10030 SUB 3
10031 testdir/dir/File2
10032 " | \
10033   $at_diff - "$at_stdout" || at_failed=:
10034 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
10035 $at_failed && at_fn_log_failure
10036 $at_traceon; }
10037
10038
10039
10040
10041   set +x
10042   $at_times_p && times >"$at_times_file"
10043 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10044 read at_status <"$at_status_file"
10045 #AT_STOP_37
10046 #AT_START_38
10047 at_fn_group_banner 38 'exclude05.at:21' \
10048   "exclude: lots of excludes" "                      " 7
10049 at_xfail=no
10050       test -f $XFAILFILE && at_xfail=yes
10051 (
10052   $as_echo "38. $at_setup_line: testing $at_desc ..."
10053   $at_traceon
10054
10055
10056
10057
10058
10059   { set +x
10060 $as_echo "$at_srcdir/exclude05.at:24:
10061 mkdir v7
10062 (cd v7
10063 TEST_TAR_FORMAT=v7
10064 export TEST_TAR_FORMAT
10065 TAR_OPTIONS=\"-H v7\"
10066 export TAR_OPTIONS
10067 rm -rf *
10068
10069
10070 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10071
10072
10073 rm -rf testdir exclfile
10074 mkdir -p testdir
10075 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10076  while read name
10077  do
10078    genfile --file \$name
10079  done
10080
10081 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10082
10083 tar cf archive --anchored --exclude-from=exclfile \\
10084                testdir
10085 tar tf archive | sort
10086
10087 echo \"NEXT\"
10088 tar cf archive --exclude-from=exclfile \\
10089                testdir
10090 tar tf archive | sort
10091
10092 rm -rf testdir exclfile
10093
10094 )"
10095 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10096 ( $at_check_trace;
10097 mkdir v7
10098 (cd v7
10099 TEST_TAR_FORMAT=v7
10100 export TEST_TAR_FORMAT
10101 TAR_OPTIONS="-H v7"
10102 export TAR_OPTIONS
10103 rm -rf *
10104
10105
10106 test -z "`sort < /dev/null 2>&1`" || exit 77
10107
10108
10109 rm -rf testdir exclfile
10110 mkdir -p testdir
10111 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10112  while read name
10113  do
10114    genfile --file $name
10115  done
10116
10117 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10118
10119 tar cf archive --anchored --exclude-from=exclfile \
10120                testdir
10121 tar tf archive | sort
10122
10123 echo "NEXT"
10124 tar cf archive --exclude-from=exclfile \
10125                testdir
10126 tar tf archive | sort
10127
10128 rm -rf testdir exclfile
10129
10130 )
10131 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10132 at_status=$? at_failed=false
10133 $at_check_filter
10134 at_fn_diff_devnull "$at_stderr" || at_failed=:
10135 echo >>"$at_stdout"; $as_echo "testdir/
10136 testdir/file10
10137 testdir/file11
10138 testdir/file9
10139 NEXT
10140 testdir/
10141 testdir/file10
10142 testdir/file11
10143 testdir/file9
10144 " | \
10145   $at_diff - "$at_stdout" || at_failed=:
10146 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10147 $at_failed && at_fn_log_failure
10148 $at_traceon; }
10149
10150               { set +x
10151 $as_echo "$at_srcdir/exclude05.at:24:
10152 mkdir oldgnu
10153 (cd oldgnu
10154 TEST_TAR_FORMAT=oldgnu
10155 export TEST_TAR_FORMAT
10156 TAR_OPTIONS=\"-H oldgnu\"
10157 export TAR_OPTIONS
10158 rm -rf *
10159
10160
10161 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10162
10163
10164 rm -rf testdir exclfile
10165 mkdir -p testdir
10166 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10167  while read name
10168  do
10169    genfile --file \$name
10170  done
10171
10172 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10173
10174 tar cf archive --anchored --exclude-from=exclfile \\
10175                testdir
10176 tar tf archive | sort
10177
10178 echo \"NEXT\"
10179 tar cf archive --exclude-from=exclfile \\
10180                testdir
10181 tar tf archive | sort
10182
10183 rm -rf testdir exclfile
10184
10185 )"
10186 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10187 ( $at_check_trace;
10188 mkdir oldgnu
10189 (cd oldgnu
10190 TEST_TAR_FORMAT=oldgnu
10191 export TEST_TAR_FORMAT
10192 TAR_OPTIONS="-H oldgnu"
10193 export TAR_OPTIONS
10194 rm -rf *
10195
10196
10197 test -z "`sort < /dev/null 2>&1`" || exit 77
10198
10199
10200 rm -rf testdir exclfile
10201 mkdir -p testdir
10202 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10203  while read name
10204  do
10205    genfile --file $name
10206  done
10207
10208 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10209
10210 tar cf archive --anchored --exclude-from=exclfile \
10211                testdir
10212 tar tf archive | sort
10213
10214 echo "NEXT"
10215 tar cf archive --exclude-from=exclfile \
10216                testdir
10217 tar tf archive | sort
10218
10219 rm -rf testdir exclfile
10220
10221 )
10222 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10223 at_status=$? at_failed=false
10224 $at_check_filter
10225 at_fn_diff_devnull "$at_stderr" || at_failed=:
10226 echo >>"$at_stdout"; $as_echo "testdir/
10227 testdir/file10
10228 testdir/file11
10229 testdir/file9
10230 NEXT
10231 testdir/
10232 testdir/file10
10233 testdir/file11
10234 testdir/file9
10235 " | \
10236   $at_diff - "$at_stdout" || at_failed=:
10237 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10238 $at_failed && at_fn_log_failure
10239 $at_traceon; }
10240
10241               { set +x
10242 $as_echo "$at_srcdir/exclude05.at:24:
10243 mkdir ustar
10244 (cd ustar
10245 TEST_TAR_FORMAT=ustar
10246 export TEST_TAR_FORMAT
10247 TAR_OPTIONS=\"-H ustar\"
10248 export TAR_OPTIONS
10249 rm -rf *
10250
10251
10252 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10253
10254
10255 rm -rf testdir exclfile
10256 mkdir -p testdir
10257 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10258  while read name
10259  do
10260    genfile --file \$name
10261  done
10262
10263 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10264
10265 tar cf archive --anchored --exclude-from=exclfile \\
10266                testdir
10267 tar tf archive | sort
10268
10269 echo \"NEXT\"
10270 tar cf archive --exclude-from=exclfile \\
10271                testdir
10272 tar tf archive | sort
10273
10274 rm -rf testdir exclfile
10275
10276 )"
10277 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10278 ( $at_check_trace;
10279 mkdir ustar
10280 (cd ustar
10281 TEST_TAR_FORMAT=ustar
10282 export TEST_TAR_FORMAT
10283 TAR_OPTIONS="-H ustar"
10284 export TAR_OPTIONS
10285 rm -rf *
10286
10287
10288 test -z "`sort < /dev/null 2>&1`" || exit 77
10289
10290
10291 rm -rf testdir exclfile
10292 mkdir -p testdir
10293 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10294  while read name
10295  do
10296    genfile --file $name
10297  done
10298
10299 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10300
10301 tar cf archive --anchored --exclude-from=exclfile \
10302                testdir
10303 tar tf archive | sort
10304
10305 echo "NEXT"
10306 tar cf archive --exclude-from=exclfile \
10307                testdir
10308 tar tf archive | sort
10309
10310 rm -rf testdir exclfile
10311
10312 )
10313 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10314 at_status=$? at_failed=false
10315 $at_check_filter
10316 at_fn_diff_devnull "$at_stderr" || at_failed=:
10317 echo >>"$at_stdout"; $as_echo "testdir/
10318 testdir/file10
10319 testdir/file11
10320 testdir/file9
10321 NEXT
10322 testdir/
10323 testdir/file10
10324 testdir/file11
10325 testdir/file9
10326 " | \
10327   $at_diff - "$at_stdout" || at_failed=:
10328 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10329 $at_failed && at_fn_log_failure
10330 $at_traceon; }
10331
10332               { set +x
10333 $as_echo "$at_srcdir/exclude05.at:24:
10334 mkdir posix
10335 (cd posix
10336 TEST_TAR_FORMAT=posix
10337 export TEST_TAR_FORMAT
10338 TAR_OPTIONS=\"-H posix\"
10339 export TAR_OPTIONS
10340 rm -rf *
10341
10342
10343 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10344
10345
10346 rm -rf testdir exclfile
10347 mkdir -p testdir
10348 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10349  while read name
10350  do
10351    genfile --file \$name
10352  done
10353
10354 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10355
10356 tar cf archive --anchored --exclude-from=exclfile \\
10357                testdir
10358 tar tf archive | sort
10359
10360 echo \"NEXT\"
10361 tar cf archive --exclude-from=exclfile \\
10362                testdir
10363 tar tf archive | sort
10364
10365 rm -rf testdir exclfile
10366
10367 )"
10368 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10369 ( $at_check_trace;
10370 mkdir posix
10371 (cd posix
10372 TEST_TAR_FORMAT=posix
10373 export TEST_TAR_FORMAT
10374 TAR_OPTIONS="-H posix"
10375 export TAR_OPTIONS
10376 rm -rf *
10377
10378
10379 test -z "`sort < /dev/null 2>&1`" || exit 77
10380
10381
10382 rm -rf testdir exclfile
10383 mkdir -p testdir
10384 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10385  while read name
10386  do
10387    genfile --file $name
10388  done
10389
10390 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10391
10392 tar cf archive --anchored --exclude-from=exclfile \
10393                testdir
10394 tar tf archive | sort
10395
10396 echo "NEXT"
10397 tar cf archive --exclude-from=exclfile \
10398                testdir
10399 tar tf archive | sort
10400
10401 rm -rf testdir exclfile
10402
10403 )
10404 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10405 at_status=$? at_failed=false
10406 $at_check_filter
10407 at_fn_diff_devnull "$at_stderr" || at_failed=:
10408 echo >>"$at_stdout"; $as_echo "testdir/
10409 testdir/file10
10410 testdir/file11
10411 testdir/file9
10412 NEXT
10413 testdir/
10414 testdir/file10
10415 testdir/file11
10416 testdir/file9
10417 " | \
10418   $at_diff - "$at_stdout" || at_failed=:
10419 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10420 $at_failed && at_fn_log_failure
10421 $at_traceon; }
10422
10423               { set +x
10424 $as_echo "$at_srcdir/exclude05.at:24:
10425 mkdir gnu
10426 (cd gnu
10427 TEST_TAR_FORMAT=gnu
10428 export TEST_TAR_FORMAT
10429 TAR_OPTIONS=\"-H gnu\"
10430 export TAR_OPTIONS
10431 rm -rf *
10432
10433
10434 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10435
10436
10437 rm -rf testdir exclfile
10438 mkdir -p testdir
10439 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10440  while read name
10441  do
10442    genfile --file \$name
10443  done
10444
10445 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10446
10447 tar cf archive --anchored --exclude-from=exclfile \\
10448                testdir
10449 tar tf archive | sort
10450
10451 echo \"NEXT\"
10452 tar cf archive --exclude-from=exclfile \\
10453                testdir
10454 tar tf archive | sort
10455
10456 rm -rf testdir exclfile
10457
10458 )"
10459 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10460 ( $at_check_trace;
10461 mkdir gnu
10462 (cd gnu
10463 TEST_TAR_FORMAT=gnu
10464 export TEST_TAR_FORMAT
10465 TAR_OPTIONS="-H gnu"
10466 export TAR_OPTIONS
10467 rm -rf *
10468
10469
10470 test -z "`sort < /dev/null 2>&1`" || exit 77
10471
10472
10473 rm -rf testdir exclfile
10474 mkdir -p testdir
10475 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10476  while read name
10477  do
10478    genfile --file $name
10479  done
10480
10481 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10482
10483 tar cf archive --anchored --exclude-from=exclfile \
10484                testdir
10485 tar tf archive | sort
10486
10487 echo "NEXT"
10488 tar cf archive --exclude-from=exclfile \
10489                testdir
10490 tar tf archive | sort
10491
10492 rm -rf testdir exclfile
10493
10494 )
10495 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10496 at_status=$? at_failed=false
10497 $at_check_filter
10498 at_fn_diff_devnull "$at_stderr" || at_failed=:
10499 echo >>"$at_stdout"; $as_echo "testdir/
10500 testdir/file10
10501 testdir/file11
10502 testdir/file9
10503 NEXT
10504 testdir/
10505 testdir/file10
10506 testdir/file11
10507 testdir/file9
10508 " | \
10509   $at_diff - "$at_stdout" || at_failed=:
10510 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10511 $at_failed && at_fn_log_failure
10512 $at_traceon; }
10513
10514
10515
10516
10517   set +x
10518   $at_times_p && times >"$at_times_file"
10519 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10520 read at_status <"$at_status_file"
10521 #AT_STOP_38
10522 #AT_START_39
10523 at_fn_group_banner 39 'exclude06.at:26' \
10524   "exclude: long files in pax archives" "            " 7
10525 at_xfail=no
10526       test -f $XFAILFILE && at_xfail=yes
10527 (
10528   $as_echo "39. $at_setup_line: testing $at_desc ..."
10529   $at_traceon
10530
10531
10532
10533
10534
10535
10536
10537   { set +x
10538 $as_echo "$at_srcdir/exclude06.at:31:
10539 mkdir pax
10540 (cd pax
10541 TEST_TAR_FORMAT=pax
10542 export TEST_TAR_FORMAT
10543 TAR_OPTIONS=\"-H pax\"
10544 export TAR_OPTIONS
10545 rm -rf *
10546
10547
10548 install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null  || exit 77
10549 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
10550 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
10551
10552 tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
10553 mkdir out
10554 tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
10555 find out -type f
10556 )"
10557 at_fn_check_prepare_notrace 'an embedded newline' "exclude06.at:31"
10558 ( $at_check_trace;
10559 mkdir pax
10560 (cd pax
10561 TEST_TAR_FORMAT=pax
10562 export TEST_TAR_FORMAT
10563 TAR_OPTIONS="-H pax"
10564 export TAR_OPTIONS
10565 rm -rf *
10566
10567
10568 install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null  || exit 77
10569 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
10570 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
10571
10572 tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
10573 mkdir out
10574 tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
10575 find out -type f
10576 )
10577 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10578 at_status=$? at_failed=false
10579 $at_check_filter
10580 at_fn_diff_devnull "$at_stderr" || at_failed=:
10581 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
10582 " | \
10583   $at_diff - "$at_stdout" || at_failed=:
10584 at_fn_check_status 0 $at_status "$at_srcdir/exclude06.at:31"
10585 $at_failed && at_fn_log_failure
10586 $at_traceon; }
10587
10588
10589
10590
10591
10592   set +x
10593   $at_times_p && times >"$at_times_file"
10594 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10595 read at_status <"$at_status_file"
10596 #AT_STOP_39
10597 #AT_START_40
10598 at_fn_group_banner 40 'exclude07.at:19' \
10599   "exclude: --exclude-backups option" "              " 7
10600 at_xfail=no
10601       test -f $XFAILFILE && at_xfail=yes
10602 (
10603   $as_echo "40. $at_setup_line: testing $at_desc ..."
10604   $at_traceon
10605
10606
10607
10608
10609
10610   { set +x
10611 $as_echo "$at_srcdir/exclude07.at:22:
10612 mkdir v7
10613 (cd v7
10614 TEST_TAR_FORMAT=v7
10615 export TEST_TAR_FORMAT
10616 TAR_OPTIONS=\"-H v7\"
10617 export TAR_OPTIONS
10618 rm -rf *
10619
10620 mkdir dir
10621 genfile --file dir/file
10622 genfile --file dir/file~
10623 genfile --file \"dir/.#file\"
10624 genfile --file \"dir/#file#\"
10625
10626 tar -v -c -f archive --exclude-backups dir
10627 )"
10628 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
10629 ( $at_check_trace;
10630 mkdir v7
10631 (cd v7
10632 TEST_TAR_FORMAT=v7
10633 export TEST_TAR_FORMAT
10634 TAR_OPTIONS="-H v7"
10635 export TAR_OPTIONS
10636 rm -rf *
10637
10638 mkdir dir
10639 genfile --file dir/file
10640 genfile --file dir/file~
10641 genfile --file "dir/.#file"
10642 genfile --file "dir/#file#"
10643
10644 tar -v -c -f archive --exclude-backups dir
10645 )
10646 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10647 at_status=$? at_failed=false
10648 $at_check_filter
10649 at_fn_diff_devnull "$at_stderr" || at_failed=:
10650 echo >>"$at_stdout"; $as_echo "dir/
10651 dir/file
10652 " | \
10653   $at_diff - "$at_stdout" || at_failed=:
10654 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
10655 $at_failed && at_fn_log_failure
10656 $at_traceon; }
10657
10658               { set +x
10659 $as_echo "$at_srcdir/exclude07.at:22:
10660 mkdir oldgnu
10661 (cd oldgnu
10662 TEST_TAR_FORMAT=oldgnu
10663 export TEST_TAR_FORMAT
10664 TAR_OPTIONS=\"-H oldgnu\"
10665 export TAR_OPTIONS
10666 rm -rf *
10667
10668 mkdir dir
10669 genfile --file dir/file
10670 genfile --file dir/file~
10671 genfile --file \"dir/.#file\"
10672 genfile --file \"dir/#file#\"
10673
10674 tar -v -c -f archive --exclude-backups dir
10675 )"
10676 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
10677 ( $at_check_trace;
10678 mkdir oldgnu
10679 (cd oldgnu
10680 TEST_TAR_FORMAT=oldgnu
10681 export TEST_TAR_FORMAT
10682 TAR_OPTIONS="-H oldgnu"
10683 export TAR_OPTIONS
10684 rm -rf *
10685
10686 mkdir dir
10687 genfile --file dir/file
10688 genfile --file dir/file~
10689 genfile --file "dir/.#file"
10690 genfile --file "dir/#file#"
10691
10692 tar -v -c -f archive --exclude-backups dir
10693 )
10694 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10695 at_status=$? at_failed=false
10696 $at_check_filter
10697 at_fn_diff_devnull "$at_stderr" || at_failed=:
10698 echo >>"$at_stdout"; $as_echo "dir/
10699 dir/file
10700 " | \
10701   $at_diff - "$at_stdout" || at_failed=:
10702 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
10703 $at_failed && at_fn_log_failure
10704 $at_traceon; }
10705
10706               { set +x
10707 $as_echo "$at_srcdir/exclude07.at:22:
10708 mkdir ustar
10709 (cd ustar
10710 TEST_TAR_FORMAT=ustar
10711 export TEST_TAR_FORMAT
10712 TAR_OPTIONS=\"-H ustar\"
10713 export TAR_OPTIONS
10714 rm -rf *
10715
10716 mkdir dir
10717 genfile --file dir/file
10718 genfile --file dir/file~
10719 genfile --file \"dir/.#file\"
10720 genfile --file \"dir/#file#\"
10721
10722 tar -v -c -f archive --exclude-backups dir
10723 )"
10724 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
10725 ( $at_check_trace;
10726 mkdir ustar
10727 (cd ustar
10728 TEST_TAR_FORMAT=ustar
10729 export TEST_TAR_FORMAT
10730 TAR_OPTIONS="-H ustar"
10731 export TAR_OPTIONS
10732 rm -rf *
10733
10734 mkdir dir
10735 genfile --file dir/file
10736 genfile --file dir/file~
10737 genfile --file "dir/.#file"
10738 genfile --file "dir/#file#"
10739
10740 tar -v -c -f archive --exclude-backups dir
10741 )
10742 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10743 at_status=$? at_failed=false
10744 $at_check_filter
10745 at_fn_diff_devnull "$at_stderr" || at_failed=:
10746 echo >>"$at_stdout"; $as_echo "dir/
10747 dir/file
10748 " | \
10749   $at_diff - "$at_stdout" || at_failed=:
10750 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
10751 $at_failed && at_fn_log_failure
10752 $at_traceon; }
10753
10754               { set +x
10755 $as_echo "$at_srcdir/exclude07.at:22:
10756 mkdir posix
10757 (cd posix
10758 TEST_TAR_FORMAT=posix
10759 export TEST_TAR_FORMAT
10760 TAR_OPTIONS=\"-H posix\"
10761 export TAR_OPTIONS
10762 rm -rf *
10763
10764 mkdir dir
10765 genfile --file dir/file
10766 genfile --file dir/file~
10767 genfile --file \"dir/.#file\"
10768 genfile --file \"dir/#file#\"
10769
10770 tar -v -c -f archive --exclude-backups dir
10771 )"
10772 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
10773 ( $at_check_trace;
10774 mkdir posix
10775 (cd posix
10776 TEST_TAR_FORMAT=posix
10777 export TEST_TAR_FORMAT
10778 TAR_OPTIONS="-H posix"
10779 export TAR_OPTIONS
10780 rm -rf *
10781
10782 mkdir dir
10783 genfile --file dir/file
10784 genfile --file dir/file~
10785 genfile --file "dir/.#file"
10786 genfile --file "dir/#file#"
10787
10788 tar -v -c -f archive --exclude-backups dir
10789 )
10790 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10791 at_status=$? at_failed=false
10792 $at_check_filter
10793 at_fn_diff_devnull "$at_stderr" || at_failed=:
10794 echo >>"$at_stdout"; $as_echo "dir/
10795 dir/file
10796 " | \
10797   $at_diff - "$at_stdout" || at_failed=:
10798 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
10799 $at_failed && at_fn_log_failure
10800 $at_traceon; }
10801
10802               { set +x
10803 $as_echo "$at_srcdir/exclude07.at:22:
10804 mkdir gnu
10805 (cd gnu
10806 TEST_TAR_FORMAT=gnu
10807 export TEST_TAR_FORMAT
10808 TAR_OPTIONS=\"-H gnu\"
10809 export TAR_OPTIONS
10810 rm -rf *
10811
10812 mkdir dir
10813 genfile --file dir/file
10814 genfile --file dir/file~
10815 genfile --file \"dir/.#file\"
10816 genfile --file \"dir/#file#\"
10817
10818 tar -v -c -f archive --exclude-backups dir
10819 )"
10820 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
10821 ( $at_check_trace;
10822 mkdir gnu
10823 (cd gnu
10824 TEST_TAR_FORMAT=gnu
10825 export TEST_TAR_FORMAT
10826 TAR_OPTIONS="-H gnu"
10827 export TAR_OPTIONS
10828 rm -rf *
10829
10830 mkdir dir
10831 genfile --file dir/file
10832 genfile --file dir/file~
10833 genfile --file "dir/.#file"
10834 genfile --file "dir/#file#"
10835
10836 tar -v -c -f archive --exclude-backups dir
10837 )
10838 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10839 at_status=$? at_failed=false
10840 $at_check_filter
10841 at_fn_diff_devnull "$at_stderr" || at_failed=:
10842 echo >>"$at_stdout"; $as_echo "dir/
10843 dir/file
10844 " | \
10845   $at_diff - "$at_stdout" || at_failed=:
10846 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
10847 $at_failed && at_fn_log_failure
10848 $at_traceon; }
10849
10850
10851
10852
10853   set +x
10854   $at_times_p && times >"$at_times_file"
10855 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10856 read at_status <"$at_status_file"
10857 #AT_STOP_40
10858 #AT_START_41
10859 at_fn_group_banner 41 'exclude08.at:36' \
10860   "--exclude-tag option" "                           " 7
10861 at_xfail=no
10862       test -f $XFAILFILE && at_xfail=yes
10863 (
10864   $as_echo "41. $at_setup_line: testing $at_desc ..."
10865   $at_traceon
10866
10867
10868
10869
10870
10871   { set +x
10872 $as_echo "$at_srcdir/exclude08.at:39:
10873 mkdir v7
10874 (cd v7
10875 TEST_TAR_FORMAT=v7
10876 export TEST_TAR_FORMAT
10877 TAR_OPTIONS=\"-H v7\"
10878 export TAR_OPTIONS
10879 rm -rf *
10880
10881
10882 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10883
10884 mkexcltest etest
10885 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
10886 )"
10887 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
10888 ( $at_check_trace;
10889 mkdir v7
10890 (cd v7
10891 TEST_TAR_FORMAT=v7
10892 export TEST_TAR_FORMAT
10893 TAR_OPTIONS="-H v7"
10894 export TAR_OPTIONS
10895 rm -rf *
10896
10897
10898 test -z "`sort < /dev/null 2>&1`" || exit 77
10899
10900 mkexcltest etest
10901 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
10902 )
10903 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10904 at_status=$? at_failed=false
10905 $at_check_filter
10906 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
10907 " | \
10908   $at_diff - "$at_stderr" || at_failed=:
10909 echo >>"$at_stdout"; $as_echo "etest/
10910 etest/subdir/
10911 etest/subdir/excludeme
10912 etest/top-level-file
10913 " | \
10914   $at_diff - "$at_stdout" || at_failed=:
10915 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
10916 $at_failed && at_fn_log_failure
10917 $at_traceon; }
10918
10919               { set +x
10920 $as_echo "$at_srcdir/exclude08.at:39:
10921 mkdir oldgnu
10922 (cd oldgnu
10923 TEST_TAR_FORMAT=oldgnu
10924 export TEST_TAR_FORMAT
10925 TAR_OPTIONS=\"-H oldgnu\"
10926 export TAR_OPTIONS
10927 rm -rf *
10928
10929
10930 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10931
10932 mkexcltest etest
10933 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
10934 )"
10935 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
10936 ( $at_check_trace;
10937 mkdir oldgnu
10938 (cd oldgnu
10939 TEST_TAR_FORMAT=oldgnu
10940 export TEST_TAR_FORMAT
10941 TAR_OPTIONS="-H oldgnu"
10942 export TAR_OPTIONS
10943 rm -rf *
10944
10945
10946 test -z "`sort < /dev/null 2>&1`" || exit 77
10947
10948 mkexcltest etest
10949 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
10950 )
10951 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10952 at_status=$? at_failed=false
10953 $at_check_filter
10954 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
10955 " | \
10956   $at_diff - "$at_stderr" || at_failed=:
10957 echo >>"$at_stdout"; $as_echo "etest/
10958 etest/subdir/
10959 etest/subdir/excludeme
10960 etest/top-level-file
10961 " | \
10962   $at_diff - "$at_stdout" || at_failed=:
10963 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
10964 $at_failed && at_fn_log_failure
10965 $at_traceon; }
10966
10967               { set +x
10968 $as_echo "$at_srcdir/exclude08.at:39:
10969 mkdir ustar
10970 (cd ustar
10971 TEST_TAR_FORMAT=ustar
10972 export TEST_TAR_FORMAT
10973 TAR_OPTIONS=\"-H ustar\"
10974 export TAR_OPTIONS
10975 rm -rf *
10976
10977
10978 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10979
10980 mkexcltest etest
10981 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
10982 )"
10983 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
10984 ( $at_check_trace;
10985 mkdir ustar
10986 (cd ustar
10987 TEST_TAR_FORMAT=ustar
10988 export TEST_TAR_FORMAT
10989 TAR_OPTIONS="-H ustar"
10990 export TAR_OPTIONS
10991 rm -rf *
10992
10993
10994 test -z "`sort < /dev/null 2>&1`" || exit 77
10995
10996 mkexcltest etest
10997 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
10998 )
10999 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11000 at_status=$? at_failed=false
11001 $at_check_filter
11002 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11003 " | \
11004   $at_diff - "$at_stderr" || at_failed=:
11005 echo >>"$at_stdout"; $as_echo "etest/
11006 etest/subdir/
11007 etest/subdir/excludeme
11008 etest/top-level-file
11009 " | \
11010   $at_diff - "$at_stdout" || at_failed=:
11011 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
11012 $at_failed && at_fn_log_failure
11013 $at_traceon; }
11014
11015               { set +x
11016 $as_echo "$at_srcdir/exclude08.at:39:
11017 mkdir posix
11018 (cd posix
11019 TEST_TAR_FORMAT=posix
11020 export TEST_TAR_FORMAT
11021 TAR_OPTIONS=\"-H posix\"
11022 export TAR_OPTIONS
11023 rm -rf *
11024
11025
11026 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11027
11028 mkexcltest etest
11029 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11030 )"
11031 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
11032 ( $at_check_trace;
11033 mkdir posix
11034 (cd posix
11035 TEST_TAR_FORMAT=posix
11036 export TEST_TAR_FORMAT
11037 TAR_OPTIONS="-H posix"
11038 export TAR_OPTIONS
11039 rm -rf *
11040
11041
11042 test -z "`sort < /dev/null 2>&1`" || exit 77
11043
11044 mkexcltest etest
11045 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11046 )
11047 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11048 at_status=$? at_failed=false
11049 $at_check_filter
11050 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11051 " | \
11052   $at_diff - "$at_stderr" || at_failed=:
11053 echo >>"$at_stdout"; $as_echo "etest/
11054 etest/subdir/
11055 etest/subdir/excludeme
11056 etest/top-level-file
11057 " | \
11058   $at_diff - "$at_stdout" || at_failed=:
11059 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
11060 $at_failed && at_fn_log_failure
11061 $at_traceon; }
11062
11063               { set +x
11064 $as_echo "$at_srcdir/exclude08.at:39:
11065 mkdir gnu
11066 (cd gnu
11067 TEST_TAR_FORMAT=gnu
11068 export TEST_TAR_FORMAT
11069 TAR_OPTIONS=\"-H gnu\"
11070 export TAR_OPTIONS
11071 rm -rf *
11072
11073
11074 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11075
11076 mkexcltest etest
11077 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11078 )"
11079 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
11080 ( $at_check_trace;
11081 mkdir gnu
11082 (cd gnu
11083 TEST_TAR_FORMAT=gnu
11084 export TEST_TAR_FORMAT
11085 TAR_OPTIONS="-H gnu"
11086 export TAR_OPTIONS
11087 rm -rf *
11088
11089
11090 test -z "`sort < /dev/null 2>&1`" || exit 77
11091
11092 mkexcltest etest
11093 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11094 )
11095 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11096 at_status=$? at_failed=false
11097 $at_check_filter
11098 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11099 " | \
11100   $at_diff - "$at_stderr" || at_failed=:
11101 echo >>"$at_stdout"; $as_echo "etest/
11102 etest/subdir/
11103 etest/subdir/excludeme
11104 etest/top-level-file
11105 " | \
11106   $at_diff - "$at_stdout" || at_failed=:
11107 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
11108 $at_failed && at_fn_log_failure
11109 $at_traceon; }
11110
11111
11112
11113
11114   set +x
11115   $at_times_p && times >"$at_times_file"
11116 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11117 read at_status <"$at_status_file"
11118 #AT_STOP_41
11119 #AT_START_42
11120 at_fn_group_banner 42 'exclude09.at:37' \
11121   "--exclude-tag option and --listed-incremental" "  " 7
11122 at_xfail=no
11123       test -f $XFAILFILE && at_xfail=yes
11124 (
11125   $as_echo "42. $at_setup_line: testing $at_desc ..."
11126   $at_traceon
11127
11128
11129
11130
11131
11132   { set +x
11133 $as_echo "$at_srcdir/exclude09.at:40:
11134 mkdir gnu
11135 (cd gnu
11136 TEST_TAR_FORMAT=gnu
11137 export TEST_TAR_FORMAT
11138 TAR_OPTIONS=\"-H gnu\"
11139 export TAR_OPTIONS
11140 rm -rf *
11141
11142
11143 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11144
11145 mkexcltest etest
11146 tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
11147 )"
11148 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude09.at:40"
11149 ( $at_check_trace;
11150 mkdir gnu
11151 (cd gnu
11152 TEST_TAR_FORMAT=gnu
11153 export TEST_TAR_FORMAT
11154 TAR_OPTIONS="-H gnu"
11155 export TAR_OPTIONS
11156 rm -rf *
11157
11158
11159 test -z "`sort < /dev/null 2>&1`" || exit 77
11160
11161 mkexcltest etest
11162 tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
11163 )
11164 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11165 at_status=$? at_failed=false
11166 $at_check_filter
11167 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
11168 tar: etest/subdir: Directory is new
11169 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
11170 " | \
11171   $at_diff - "$at_stderr" || at_failed=:
11172 echo >>"$at_stdout"; $as_echo "etest/
11173 etest/subdir/
11174 etest/subdir/excludeme
11175 etest/top-level-file
11176 " | \
11177   $at_diff - "$at_stdout" || at_failed=:
11178 at_fn_check_status 0 $at_status "$at_srcdir/exclude09.at:40"
11179 $at_failed && at_fn_log_failure
11180 $at_traceon; }
11181
11182
11183
11184
11185   set +x
11186   $at_times_p && times >"$at_times_file"
11187 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11188 read at_status <"$at_status_file"
11189 #AT_STOP_42
11190 #AT_START_43
11191 at_fn_group_banner 43 'exclude10.at:38' \
11192   "--exclude-tag option in incremental pass" "       " 7
11193 at_xfail=no
11194       test -f $XFAILFILE && at_xfail=yes
11195 (
11196   $as_echo "43. $at_setup_line: testing $at_desc ..."
11197   $at_traceon
11198
11199
11200
11201
11202
11203   { set +x
11204 $as_echo "$at_srcdir/exclude10.at:41:
11205 mkdir gnu
11206 (cd gnu
11207 TEST_TAR_FORMAT=gnu
11208 export TEST_TAR_FORMAT
11209 TAR_OPTIONS=\"-H gnu\"
11210 export TAR_OPTIONS
11211 rm -rf *
11212
11213
11214 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11215
11216 mkexcltest etest
11217 rm etest/subdir/excludeme
11218 decho \"# Level 0\"
11219 tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
11220 touch etest/subdir/excludeme
11221 touch etest/subdir/otherfile
11222
11223 decho \"# Level 1\"
11224 cp snar-0 snar-1
11225 tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
11226 )"
11227 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude10.at:41"
11228 ( $at_check_trace;
11229 mkdir gnu
11230 (cd gnu
11231 TEST_TAR_FORMAT=gnu
11232 export TEST_TAR_FORMAT
11233 TAR_OPTIONS="-H gnu"
11234 export TAR_OPTIONS
11235 rm -rf *
11236
11237
11238 test -z "`sort < /dev/null 2>&1`" || exit 77
11239
11240 mkexcltest etest
11241 rm etest/subdir/excludeme
11242 decho "# Level 0"
11243 tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
11244 touch etest/subdir/excludeme
11245 touch etest/subdir/otherfile
11246
11247 decho "# Level 1"
11248 cp snar-0 snar-1
11249 tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
11250 )
11251 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11252 at_status=$? at_failed=false
11253 $at_check_filter
11254 echo >>"$at_stderr"; $as_echo "# Level 0
11255 tar: etest: Directory is new
11256 tar: etest/subdir: Directory is new
11257 # Level 1
11258 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
11259 " | \
11260   $at_diff - "$at_stderr" || at_failed=:
11261 echo >>"$at_stdout"; $as_echo "# Level 0
11262 etest/
11263 etest/subdir/
11264 etest/subdir/subdir-file
11265 etest/top-level-file
11266 # Level 1
11267 etest/
11268 etest/subdir/
11269 etest/subdir/excludeme
11270 " | \
11271   $at_diff - "$at_stdout" || at_failed=:
11272 at_fn_check_status 0 $at_status "$at_srcdir/exclude10.at:41"
11273 $at_failed && at_fn_log_failure
11274 $at_traceon; }
11275
11276
11277
11278
11279   set +x
11280   $at_times_p && times >"$at_times_file"
11281 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11282 read at_status <"$at_status_file"
11283 #AT_STOP_43
11284 #AT_START_44
11285 at_fn_group_banner 44 'exclude11.at:36' \
11286   "--exclude-tag-under option" "                     " 7
11287 at_xfail=no
11288       test -f $XFAILFILE && at_xfail=yes
11289 (
11290   $as_echo "44. $at_setup_line: testing $at_desc ..."
11291   $at_traceon
11292
11293
11294
11295
11296
11297   { set +x
11298 $as_echo "$at_srcdir/exclude11.at:39:
11299 mkdir v7
11300 (cd v7
11301 TEST_TAR_FORMAT=v7
11302 export TEST_TAR_FORMAT
11303 TAR_OPTIONS=\"-H v7\"
11304 export TAR_OPTIONS
11305 rm -rf *
11306
11307
11308 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11309
11310 mkexcltest etest
11311 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11312 )"
11313 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11314 ( $at_check_trace;
11315 mkdir v7
11316 (cd v7
11317 TEST_TAR_FORMAT=v7
11318 export TEST_TAR_FORMAT
11319 TAR_OPTIONS="-H v7"
11320 export TAR_OPTIONS
11321 rm -rf *
11322
11323
11324 test -z "`sort < /dev/null 2>&1`" || exit 77
11325
11326 mkexcltest etest
11327 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11328 )
11329 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11330 at_status=$? at_failed=false
11331 $at_check_filter
11332 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11333 " | \
11334   $at_diff - "$at_stderr" || at_failed=:
11335 echo >>"$at_stdout"; $as_echo "etest/
11336 etest/subdir/
11337 etest/top-level-file
11338 " | \
11339   $at_diff - "$at_stdout" || at_failed=:
11340 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11341 $at_failed && at_fn_log_failure
11342 $at_traceon; }
11343
11344               { set +x
11345 $as_echo "$at_srcdir/exclude11.at:39:
11346 mkdir oldgnu
11347 (cd oldgnu
11348 TEST_TAR_FORMAT=oldgnu
11349 export TEST_TAR_FORMAT
11350 TAR_OPTIONS=\"-H oldgnu\"
11351 export TAR_OPTIONS
11352 rm -rf *
11353
11354
11355 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11356
11357 mkexcltest etest
11358 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11359 )"
11360 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11361 ( $at_check_trace;
11362 mkdir oldgnu
11363 (cd oldgnu
11364 TEST_TAR_FORMAT=oldgnu
11365 export TEST_TAR_FORMAT
11366 TAR_OPTIONS="-H oldgnu"
11367 export TAR_OPTIONS
11368 rm -rf *
11369
11370
11371 test -z "`sort < /dev/null 2>&1`" || exit 77
11372
11373 mkexcltest etest
11374 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11375 )
11376 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11377 at_status=$? at_failed=false
11378 $at_check_filter
11379 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11380 " | \
11381   $at_diff - "$at_stderr" || at_failed=:
11382 echo >>"$at_stdout"; $as_echo "etest/
11383 etest/subdir/
11384 etest/top-level-file
11385 " | \
11386   $at_diff - "$at_stdout" || at_failed=:
11387 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11388 $at_failed && at_fn_log_failure
11389 $at_traceon; }
11390
11391               { set +x
11392 $as_echo "$at_srcdir/exclude11.at:39:
11393 mkdir ustar
11394 (cd ustar
11395 TEST_TAR_FORMAT=ustar
11396 export TEST_TAR_FORMAT
11397 TAR_OPTIONS=\"-H ustar\"
11398 export TAR_OPTIONS
11399 rm -rf *
11400
11401
11402 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11403
11404 mkexcltest etest
11405 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11406 )"
11407 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11408 ( $at_check_trace;
11409 mkdir ustar
11410 (cd ustar
11411 TEST_TAR_FORMAT=ustar
11412 export TEST_TAR_FORMAT
11413 TAR_OPTIONS="-H ustar"
11414 export TAR_OPTIONS
11415 rm -rf *
11416
11417
11418 test -z "`sort < /dev/null 2>&1`" || exit 77
11419
11420 mkexcltest etest
11421 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11422 )
11423 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11424 at_status=$? at_failed=false
11425 $at_check_filter
11426 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11427 " | \
11428   $at_diff - "$at_stderr" || at_failed=:
11429 echo >>"$at_stdout"; $as_echo "etest/
11430 etest/subdir/
11431 etest/top-level-file
11432 " | \
11433   $at_diff - "$at_stdout" || at_failed=:
11434 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11435 $at_failed && at_fn_log_failure
11436 $at_traceon; }
11437
11438               { set +x
11439 $as_echo "$at_srcdir/exclude11.at:39:
11440 mkdir posix
11441 (cd posix
11442 TEST_TAR_FORMAT=posix
11443 export TEST_TAR_FORMAT
11444 TAR_OPTIONS=\"-H posix\"
11445 export TAR_OPTIONS
11446 rm -rf *
11447
11448
11449 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11450
11451 mkexcltest etest
11452 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11453 )"
11454 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11455 ( $at_check_trace;
11456 mkdir posix
11457 (cd posix
11458 TEST_TAR_FORMAT=posix
11459 export TEST_TAR_FORMAT
11460 TAR_OPTIONS="-H posix"
11461 export TAR_OPTIONS
11462 rm -rf *
11463
11464
11465 test -z "`sort < /dev/null 2>&1`" || exit 77
11466
11467 mkexcltest etest
11468 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11469 )
11470 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11471 at_status=$? at_failed=false
11472 $at_check_filter
11473 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11474 " | \
11475   $at_diff - "$at_stderr" || at_failed=:
11476 echo >>"$at_stdout"; $as_echo "etest/
11477 etest/subdir/
11478 etest/top-level-file
11479 " | \
11480   $at_diff - "$at_stdout" || at_failed=:
11481 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11482 $at_failed && at_fn_log_failure
11483 $at_traceon; }
11484
11485               { set +x
11486 $as_echo "$at_srcdir/exclude11.at:39:
11487 mkdir gnu
11488 (cd gnu
11489 TEST_TAR_FORMAT=gnu
11490 export TEST_TAR_FORMAT
11491 TAR_OPTIONS=\"-H gnu\"
11492 export TAR_OPTIONS
11493 rm -rf *
11494
11495
11496 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11497
11498 mkexcltest etest
11499 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11500 )"
11501 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11502 ( $at_check_trace;
11503 mkdir gnu
11504 (cd gnu
11505 TEST_TAR_FORMAT=gnu
11506 export TEST_TAR_FORMAT
11507 TAR_OPTIONS="-H gnu"
11508 export TAR_OPTIONS
11509 rm -rf *
11510
11511
11512 test -z "`sort < /dev/null 2>&1`" || exit 77
11513
11514 mkexcltest etest
11515 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11516 )
11517 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11518 at_status=$? at_failed=false
11519 $at_check_filter
11520 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11521 " | \
11522   $at_diff - "$at_stderr" || at_failed=:
11523 echo >>"$at_stdout"; $as_echo "etest/
11524 etest/subdir/
11525 etest/top-level-file
11526 " | \
11527   $at_diff - "$at_stdout" || at_failed=:
11528 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11529 $at_failed && at_fn_log_failure
11530 $at_traceon; }
11531
11532
11533
11534
11535   set +x
11536   $at_times_p && times >"$at_times_file"
11537 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11538 read at_status <"$at_status_file"
11539 #AT_STOP_44
11540 #AT_START_45
11541 at_fn_group_banner 45 'exclude12.at:37' \
11542   "--exclude-tag-under and --listed-incremental" "   " 7
11543 at_xfail=no
11544       test -f $XFAILFILE && at_xfail=yes
11545 (
11546   $as_echo "45. $at_setup_line: testing $at_desc ..."
11547   $at_traceon
11548
11549
11550
11551
11552
11553   { set +x
11554 $as_echo "$at_srcdir/exclude12.at:40:
11555 mkdir gnu
11556 (cd gnu
11557 TEST_TAR_FORMAT=gnu
11558 export TEST_TAR_FORMAT
11559 TAR_OPTIONS=\"-H gnu\"
11560 export TAR_OPTIONS
11561 rm -rf *
11562
11563
11564 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11565
11566 mkexcltest etest
11567 tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
11568 )"
11569 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude12.at:40"
11570 ( $at_check_trace;
11571 mkdir gnu
11572 (cd gnu
11573 TEST_TAR_FORMAT=gnu
11574 export TEST_TAR_FORMAT
11575 TAR_OPTIONS="-H gnu"
11576 export TAR_OPTIONS
11577 rm -rf *
11578
11579
11580 test -z "`sort < /dev/null 2>&1`" || exit 77
11581
11582 mkexcltest etest
11583 tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
11584 )
11585 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11586 at_status=$? at_failed=false
11587 $at_check_filter
11588 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
11589 tar: etest/subdir: Directory is new
11590 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
11591 " | \
11592   $at_diff - "$at_stderr" || at_failed=:
11593 echo >>"$at_stdout"; $as_echo "etest/
11594 etest/subdir/
11595 etest/top-level-file
11596 " | \
11597   $at_diff - "$at_stdout" || at_failed=:
11598 at_fn_check_status 0 $at_status "$at_srcdir/exclude12.at:40"
11599 $at_failed && at_fn_log_failure
11600 $at_traceon; }
11601
11602
11603
11604
11605   set +x
11606   $at_times_p && times >"$at_times_file"
11607 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11608 read at_status <"$at_status_file"
11609 #AT_STOP_45
11610 #AT_START_46
11611 at_fn_group_banner 46 'exclude13.at:39' \
11612   "--exclude-tag-under option in incremental pass" " " 7
11613 at_xfail=no
11614       test -f $XFAILFILE && at_xfail=yes
11615 (
11616   $as_echo "46. $at_setup_line: testing $at_desc ..."
11617   $at_traceon
11618
11619
11620
11621
11622
11623   { set +x
11624 $as_echo "$at_srcdir/exclude13.at:42:
11625 mkdir gnu
11626 (cd gnu
11627 TEST_TAR_FORMAT=gnu
11628 export TEST_TAR_FORMAT
11629 TAR_OPTIONS=\"-H gnu\"
11630 export TAR_OPTIONS
11631 rm -rf *
11632
11633
11634 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11635
11636 mkexcltest etest
11637 rm etest/subdir/excludeme
11638 decho \"# Level 0\"
11639 tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
11640 touch etest/subdir/excludeme
11641 touch etest/subdir/otherfile
11642
11643 decho \"# Level 1\"
11644 cp snar-0 snar-1
11645 tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
11646 )"
11647 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude13.at:42"
11648 ( $at_check_trace;
11649 mkdir gnu
11650 (cd gnu
11651 TEST_TAR_FORMAT=gnu
11652 export TEST_TAR_FORMAT
11653 TAR_OPTIONS="-H gnu"
11654 export TAR_OPTIONS
11655 rm -rf *
11656
11657
11658 test -z "`sort < /dev/null 2>&1`" || exit 77
11659
11660 mkexcltest etest
11661 rm etest/subdir/excludeme
11662 decho "# Level 0"
11663 tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
11664 touch etest/subdir/excludeme
11665 touch etest/subdir/otherfile
11666
11667 decho "# Level 1"
11668 cp snar-0 snar-1
11669 tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
11670 )
11671 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11672 at_status=$? at_failed=false
11673 $at_check_filter
11674 echo >>"$at_stderr"; $as_echo "# Level 0
11675 tar: etest: Directory is new
11676 tar: etest/subdir: Directory is new
11677 # Level 1
11678 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
11679 " | \
11680   $at_diff - "$at_stderr" || at_failed=:
11681 echo >>"$at_stdout"; $as_echo "# Level 0
11682 etest/
11683 etest/subdir/
11684 etest/subdir/subdir-file
11685 etest/top-level-file
11686 # Level 1
11687 etest/
11688 etest/subdir/
11689 " | \
11690   $at_diff - "$at_stdout" || at_failed=:
11691 at_fn_check_status 0 $at_status "$at_srcdir/exclude13.at:42"
11692 $at_failed && at_fn_log_failure
11693 $at_traceon; }
11694
11695
11696
11697
11698   set +x
11699   $at_times_p && times >"$at_times_file"
11700 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11701 read at_status <"$at_status_file"
11702 #AT_STOP_46
11703 #AT_START_47
11704 at_fn_group_banner 47 'exclude14.at:36' \
11705   "--exclude-tag-all option" "                       " 7
11706 at_xfail=no
11707       test -f $XFAILFILE && at_xfail=yes
11708 (
11709   $as_echo "47. $at_setup_line: testing $at_desc ..."
11710   $at_traceon
11711
11712
11713
11714
11715
11716   { set +x
11717 $as_echo "$at_srcdir/exclude14.at:39:
11718 mkdir v7
11719 (cd v7
11720 TEST_TAR_FORMAT=v7
11721 export TEST_TAR_FORMAT
11722 TAR_OPTIONS=\"-H v7\"
11723 export TAR_OPTIONS
11724 rm -rf *
11725
11726
11727 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11728
11729 mkexcltest etest
11730 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11731 )"
11732 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
11733 ( $at_check_trace;
11734 mkdir v7
11735 (cd v7
11736 TEST_TAR_FORMAT=v7
11737 export TEST_TAR_FORMAT
11738 TAR_OPTIONS="-H v7"
11739 export TAR_OPTIONS
11740 rm -rf *
11741
11742
11743 test -z "`sort < /dev/null 2>&1`" || exit 77
11744
11745 mkexcltest etest
11746 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11747 )
11748 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11749 at_status=$? at_failed=false
11750 $at_check_filter
11751 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
11752 " | \
11753   $at_diff - "$at_stderr" || at_failed=:
11754 echo >>"$at_stdout"; $as_echo "etest/
11755 etest/top-level-file
11756 " | \
11757   $at_diff - "$at_stdout" || at_failed=:
11758 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
11759 $at_failed && at_fn_log_failure
11760 $at_traceon; }
11761
11762               { set +x
11763 $as_echo "$at_srcdir/exclude14.at:39:
11764 mkdir oldgnu
11765 (cd oldgnu
11766 TEST_TAR_FORMAT=oldgnu
11767 export TEST_TAR_FORMAT
11768 TAR_OPTIONS=\"-H oldgnu\"
11769 export TAR_OPTIONS
11770 rm -rf *
11771
11772
11773 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11774
11775 mkexcltest etest
11776 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11777 )"
11778 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
11779 ( $at_check_trace;
11780 mkdir oldgnu
11781 (cd oldgnu
11782 TEST_TAR_FORMAT=oldgnu
11783 export TEST_TAR_FORMAT
11784 TAR_OPTIONS="-H oldgnu"
11785 export TAR_OPTIONS
11786 rm -rf *
11787
11788
11789 test -z "`sort < /dev/null 2>&1`" || exit 77
11790
11791 mkexcltest etest
11792 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11793 )
11794 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11795 at_status=$? at_failed=false
11796 $at_check_filter
11797 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
11798 " | \
11799   $at_diff - "$at_stderr" || at_failed=:
11800 echo >>"$at_stdout"; $as_echo "etest/
11801 etest/top-level-file
11802 " | \
11803   $at_diff - "$at_stdout" || at_failed=:
11804 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
11805 $at_failed && at_fn_log_failure
11806 $at_traceon; }
11807
11808               { set +x
11809 $as_echo "$at_srcdir/exclude14.at:39:
11810 mkdir ustar
11811 (cd ustar
11812 TEST_TAR_FORMAT=ustar
11813 export TEST_TAR_FORMAT
11814 TAR_OPTIONS=\"-H ustar\"
11815 export TAR_OPTIONS
11816 rm -rf *
11817
11818
11819 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11820
11821 mkexcltest etest
11822 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11823 )"
11824 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
11825 ( $at_check_trace;
11826 mkdir ustar
11827 (cd ustar
11828 TEST_TAR_FORMAT=ustar
11829 export TEST_TAR_FORMAT
11830 TAR_OPTIONS="-H ustar"
11831 export TAR_OPTIONS
11832 rm -rf *
11833
11834
11835 test -z "`sort < /dev/null 2>&1`" || exit 77
11836
11837 mkexcltest etest
11838 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11839 )
11840 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11841 at_status=$? at_failed=false
11842 $at_check_filter
11843 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
11844 " | \
11845   $at_diff - "$at_stderr" || at_failed=:
11846 echo >>"$at_stdout"; $as_echo "etest/
11847 etest/top-level-file
11848 " | \
11849   $at_diff - "$at_stdout" || at_failed=:
11850 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
11851 $at_failed && at_fn_log_failure
11852 $at_traceon; }
11853
11854               { set +x
11855 $as_echo "$at_srcdir/exclude14.at:39:
11856 mkdir posix
11857 (cd posix
11858 TEST_TAR_FORMAT=posix
11859 export TEST_TAR_FORMAT
11860 TAR_OPTIONS=\"-H posix\"
11861 export TAR_OPTIONS
11862 rm -rf *
11863
11864
11865 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11866
11867 mkexcltest etest
11868 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11869 )"
11870 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
11871 ( $at_check_trace;
11872 mkdir posix
11873 (cd posix
11874 TEST_TAR_FORMAT=posix
11875 export TEST_TAR_FORMAT
11876 TAR_OPTIONS="-H posix"
11877 export TAR_OPTIONS
11878 rm -rf *
11879
11880
11881 test -z "`sort < /dev/null 2>&1`" || exit 77
11882
11883 mkexcltest etest
11884 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11885 )
11886 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11887 at_status=$? at_failed=false
11888 $at_check_filter
11889 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
11890 " | \
11891   $at_diff - "$at_stderr" || at_failed=:
11892 echo >>"$at_stdout"; $as_echo "etest/
11893 etest/top-level-file
11894 " | \
11895   $at_diff - "$at_stdout" || at_failed=:
11896 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
11897 $at_failed && at_fn_log_failure
11898 $at_traceon; }
11899
11900               { set +x
11901 $as_echo "$at_srcdir/exclude14.at:39:
11902 mkdir gnu
11903 (cd gnu
11904 TEST_TAR_FORMAT=gnu
11905 export TEST_TAR_FORMAT
11906 TAR_OPTIONS=\"-H gnu\"
11907 export TAR_OPTIONS
11908 rm -rf *
11909
11910
11911 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11912
11913 mkexcltest etest
11914 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11915 )"
11916 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
11917 ( $at_check_trace;
11918 mkdir gnu
11919 (cd gnu
11920 TEST_TAR_FORMAT=gnu
11921 export TEST_TAR_FORMAT
11922 TAR_OPTIONS="-H gnu"
11923 export TAR_OPTIONS
11924 rm -rf *
11925
11926
11927 test -z "`sort < /dev/null 2>&1`" || exit 77
11928
11929 mkexcltest etest
11930 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
11931 )
11932 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11933 at_status=$? at_failed=false
11934 $at_check_filter
11935 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
11936 " | \
11937   $at_diff - "$at_stderr" || at_failed=:
11938 echo >>"$at_stdout"; $as_echo "etest/
11939 etest/top-level-file
11940 " | \
11941   $at_diff - "$at_stdout" || at_failed=:
11942 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
11943 $at_failed && at_fn_log_failure
11944 $at_traceon; }
11945
11946
11947
11948
11949   set +x
11950   $at_times_p && times >"$at_times_file"
11951 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11952 read at_status <"$at_status_file"
11953 #AT_STOP_47
11954 #AT_START_48
11955 at_fn_group_banner 48 'exclude15.at:36' \
11956   "--exclude-tag-all and --listed-incremental" "     " 7
11957 at_xfail=no
11958       test -f $XFAILFILE && at_xfail=yes
11959 (
11960   $as_echo "48. $at_setup_line: testing $at_desc ..."
11961   $at_traceon
11962
11963
11964
11965
11966
11967   { set +x
11968 $as_echo "$at_srcdir/exclude15.at:39:
11969 mkdir gnu
11970 (cd gnu
11971 TEST_TAR_FORMAT=gnu
11972 export TEST_TAR_FORMAT
11973 TAR_OPTIONS=\"-H gnu\"
11974 export TAR_OPTIONS
11975 rm -rf *
11976
11977
11978 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11979
11980 mkexcltest etest
11981 tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
11982 )"
11983 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude15.at:39"
11984 ( $at_check_trace;
11985 mkdir gnu
11986 (cd gnu
11987 TEST_TAR_FORMAT=gnu
11988 export TEST_TAR_FORMAT
11989 TAR_OPTIONS="-H gnu"
11990 export TAR_OPTIONS
11991 rm -rf *
11992
11993
11994 test -z "`sort < /dev/null 2>&1`" || exit 77
11995
11996 mkexcltest etest
11997 tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
11998 )
11999 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12000 at_status=$? at_failed=false
12001 $at_check_filter
12002 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
12003 tar: etest/subdir: Directory is new
12004 tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
12005 " | \
12006   $at_diff - "$at_stderr" || at_failed=:
12007 echo >>"$at_stdout"; $as_echo "etest/
12008 etest/top-level-file
12009 " | \
12010   $at_diff - "$at_stdout" || at_failed=:
12011 at_fn_check_status 0 $at_status "$at_srcdir/exclude15.at:39"
12012 $at_failed && at_fn_log_failure
12013 $at_traceon; }
12014
12015
12016
12017
12018   set +x
12019   $at_times_p && times >"$at_times_file"
12020 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12021 read at_status <"$at_status_file"
12022 #AT_STOP_48
12023 #AT_START_49
12024 at_fn_group_banner 49 'exclude16.at:38' \
12025   "--exclude-tag-all option in incremental pass" "   " 7
12026 at_xfail=no
12027       test -f $XFAILFILE && at_xfail=yes
12028 (
12029   $as_echo "49. $at_setup_line: testing $at_desc ..."
12030   $at_traceon
12031
12032
12033
12034
12035
12036   { set +x
12037 $as_echo "$at_srcdir/exclude16.at:41:
12038 mkdir gnu
12039 (cd gnu
12040 TEST_TAR_FORMAT=gnu
12041 export TEST_TAR_FORMAT
12042 TAR_OPTIONS=\"-H gnu\"
12043 export TAR_OPTIONS
12044 rm -rf *
12045
12046
12047 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12048
12049 mkexcltest etest
12050 rm etest/subdir/excludeme
12051 decho \"# Level 0\"
12052 tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
12053 touch etest/subdir/excludeme
12054 touch etest/subdir/otherfile
12055
12056 decho \"# Level 1\"
12057 cp snar-0 snar-1
12058 tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
12059 )"
12060 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude16.at:41"
12061 ( $at_check_trace;
12062 mkdir gnu
12063 (cd gnu
12064 TEST_TAR_FORMAT=gnu
12065 export TEST_TAR_FORMAT
12066 TAR_OPTIONS="-H gnu"
12067 export TAR_OPTIONS
12068 rm -rf *
12069
12070
12071 test -z "`sort < /dev/null 2>&1`" || exit 77
12072
12073 mkexcltest etest
12074 rm etest/subdir/excludeme
12075 decho "# Level 0"
12076 tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
12077 touch etest/subdir/excludeme
12078 touch etest/subdir/otherfile
12079
12080 decho "# Level 1"
12081 cp snar-0 snar-1
12082 tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
12083 )
12084 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12085 at_status=$? at_failed=false
12086 $at_check_filter
12087 echo >>"$at_stderr"; $as_echo "# Level 0
12088 tar: etest: Directory is new
12089 tar: etest/subdir: Directory is new
12090 # Level 1
12091 tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
12092 " | \
12093   $at_diff - "$at_stderr" || at_failed=:
12094 echo >>"$at_stdout"; $as_echo "# Level 0
12095 etest/
12096 etest/subdir/
12097 etest/subdir/subdir-file
12098 etest/top-level-file
12099 # Level 1
12100 etest/
12101 " | \
12102   $at_diff - "$at_stdout" || at_failed=:
12103 at_fn_check_status 0 $at_status "$at_srcdir/exclude16.at:41"
12104 $at_failed && at_fn_log_failure
12105 $at_traceon; }
12106
12107
12108
12109
12110   set +x
12111   $at_times_p && times >"$at_times_file"
12112 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12113 read at_status <"$at_status_file"
12114 #AT_STOP_49
12115 #AT_START_50
12116 at_fn_group_banner 50 'delete01.at:23' \
12117   "deleting a member after a big one" "              " 8
12118 at_xfail=no
12119       test -f $XFAILFILE && at_xfail=yes
12120 (
12121   $as_echo "50. $at_setup_line: testing $at_desc ..."
12122   $at_traceon
12123
12124
12125
12126
12127
12128   { set +x
12129 $as_echo "$at_srcdir/delete01.at:26:
12130 mkdir v7
12131 (cd v7
12132 TEST_TAR_FORMAT=v7
12133 export TEST_TAR_FORMAT
12134 TAR_OPTIONS=\"-H v7\"
12135 export TAR_OPTIONS
12136 rm -rf *
12137
12138 genfile -l 50000 --file file1
12139 genfile -l 1024 --file file2
12140 tar cf archive file1 file2
12141 tar f archive --delete file2
12142 tar tf archive)"
12143 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12144 ( $at_check_trace;
12145 mkdir v7
12146 (cd v7
12147 TEST_TAR_FORMAT=v7
12148 export TEST_TAR_FORMAT
12149 TAR_OPTIONS="-H v7"
12150 export TAR_OPTIONS
12151 rm -rf *
12152
12153 genfile -l 50000 --file file1
12154 genfile -l 1024 --file file2
12155 tar cf archive file1 file2
12156 tar f archive --delete file2
12157 tar tf archive)
12158 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12159 at_status=$? at_failed=false
12160 $at_check_filter
12161 at_fn_diff_devnull "$at_stderr" || at_failed=:
12162 echo >>"$at_stdout"; $as_echo "file1
12163 " | \
12164   $at_diff - "$at_stdout" || at_failed=:
12165 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12166 $at_failed && at_fn_log_failure
12167 $at_traceon; }
12168
12169               { set +x
12170 $as_echo "$at_srcdir/delete01.at:26:
12171 mkdir oldgnu
12172 (cd oldgnu
12173 TEST_TAR_FORMAT=oldgnu
12174 export TEST_TAR_FORMAT
12175 TAR_OPTIONS=\"-H oldgnu\"
12176 export TAR_OPTIONS
12177 rm -rf *
12178
12179 genfile -l 50000 --file file1
12180 genfile -l 1024 --file file2
12181 tar cf archive file1 file2
12182 tar f archive --delete file2
12183 tar tf archive)"
12184 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12185 ( $at_check_trace;
12186 mkdir oldgnu
12187 (cd oldgnu
12188 TEST_TAR_FORMAT=oldgnu
12189 export TEST_TAR_FORMAT
12190 TAR_OPTIONS="-H oldgnu"
12191 export TAR_OPTIONS
12192 rm -rf *
12193
12194 genfile -l 50000 --file file1
12195 genfile -l 1024 --file file2
12196 tar cf archive file1 file2
12197 tar f archive --delete file2
12198 tar tf archive)
12199 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12200 at_status=$? at_failed=false
12201 $at_check_filter
12202 at_fn_diff_devnull "$at_stderr" || at_failed=:
12203 echo >>"$at_stdout"; $as_echo "file1
12204 " | \
12205   $at_diff - "$at_stdout" || at_failed=:
12206 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12207 $at_failed && at_fn_log_failure
12208 $at_traceon; }
12209
12210               { set +x
12211 $as_echo "$at_srcdir/delete01.at:26:
12212 mkdir ustar
12213 (cd ustar
12214 TEST_TAR_FORMAT=ustar
12215 export TEST_TAR_FORMAT
12216 TAR_OPTIONS=\"-H ustar\"
12217 export TAR_OPTIONS
12218 rm -rf *
12219
12220 genfile -l 50000 --file file1
12221 genfile -l 1024 --file file2
12222 tar cf archive file1 file2
12223 tar f archive --delete file2
12224 tar tf archive)"
12225 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12226 ( $at_check_trace;
12227 mkdir ustar
12228 (cd ustar
12229 TEST_TAR_FORMAT=ustar
12230 export TEST_TAR_FORMAT
12231 TAR_OPTIONS="-H ustar"
12232 export TAR_OPTIONS
12233 rm -rf *
12234
12235 genfile -l 50000 --file file1
12236 genfile -l 1024 --file file2
12237 tar cf archive file1 file2
12238 tar f archive --delete file2
12239 tar tf archive)
12240 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12241 at_status=$? at_failed=false
12242 $at_check_filter
12243 at_fn_diff_devnull "$at_stderr" || at_failed=:
12244 echo >>"$at_stdout"; $as_echo "file1
12245 " | \
12246   $at_diff - "$at_stdout" || at_failed=:
12247 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12248 $at_failed && at_fn_log_failure
12249 $at_traceon; }
12250
12251               { set +x
12252 $as_echo "$at_srcdir/delete01.at:26:
12253 mkdir posix
12254 (cd posix
12255 TEST_TAR_FORMAT=posix
12256 export TEST_TAR_FORMAT
12257 TAR_OPTIONS=\"-H posix\"
12258 export TAR_OPTIONS
12259 rm -rf *
12260
12261 genfile -l 50000 --file file1
12262 genfile -l 1024 --file file2
12263 tar cf archive file1 file2
12264 tar f archive --delete file2
12265 tar tf archive)"
12266 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12267 ( $at_check_trace;
12268 mkdir posix
12269 (cd posix
12270 TEST_TAR_FORMAT=posix
12271 export TEST_TAR_FORMAT
12272 TAR_OPTIONS="-H posix"
12273 export TAR_OPTIONS
12274 rm -rf *
12275
12276 genfile -l 50000 --file file1
12277 genfile -l 1024 --file file2
12278 tar cf archive file1 file2
12279 tar f archive --delete file2
12280 tar tf archive)
12281 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12282 at_status=$? at_failed=false
12283 $at_check_filter
12284 at_fn_diff_devnull "$at_stderr" || at_failed=:
12285 echo >>"$at_stdout"; $as_echo "file1
12286 " | \
12287   $at_diff - "$at_stdout" || at_failed=:
12288 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12289 $at_failed && at_fn_log_failure
12290 $at_traceon; }
12291
12292               { set +x
12293 $as_echo "$at_srcdir/delete01.at:26:
12294 mkdir gnu
12295 (cd gnu
12296 TEST_TAR_FORMAT=gnu
12297 export TEST_TAR_FORMAT
12298 TAR_OPTIONS=\"-H gnu\"
12299 export TAR_OPTIONS
12300 rm -rf *
12301
12302 genfile -l 50000 --file file1
12303 genfile -l 1024 --file file2
12304 tar cf archive file1 file2
12305 tar f archive --delete file2
12306 tar tf archive)"
12307 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12308 ( $at_check_trace;
12309 mkdir gnu
12310 (cd gnu
12311 TEST_TAR_FORMAT=gnu
12312 export TEST_TAR_FORMAT
12313 TAR_OPTIONS="-H gnu"
12314 export TAR_OPTIONS
12315 rm -rf *
12316
12317 genfile -l 50000 --file file1
12318 genfile -l 1024 --file file2
12319 tar cf archive file1 file2
12320 tar f archive --delete file2
12321 tar tf archive)
12322 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12323 at_status=$? at_failed=false
12324 $at_check_filter
12325 at_fn_diff_devnull "$at_stderr" || at_failed=:
12326 echo >>"$at_stdout"; $as_echo "file1
12327 " | \
12328   $at_diff - "$at_stdout" || at_failed=:
12329 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12330 $at_failed && at_fn_log_failure
12331 $at_traceon; }
12332
12333
12334
12335
12336   set +x
12337   $at_times_p && times >"$at_times_file"
12338 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12339 read at_status <"$at_status_file"
12340 #AT_STOP_50
12341 #AT_START_51
12342 at_fn_group_banner 51 'delete02.at:23' \
12343   "deleting a member from stdin archive" "           " 8
12344 at_xfail=no
12345       test -f $XFAILFILE && at_xfail=yes
12346 (
12347   $as_echo "51. $at_setup_line: testing $at_desc ..."
12348   $at_traceon
12349
12350
12351
12352
12353
12354   { set +x
12355 $as_echo "$at_srcdir/delete02.at:26:
12356 mkdir v7
12357 (cd v7
12358 TEST_TAR_FORMAT=v7
12359 export TEST_TAR_FORMAT
12360 TAR_OPTIONS=\"-H v7\"
12361 export TAR_OPTIONS
12362 rm -rf *
12363
12364 genfile -l 3073 -p zeros --file 1
12365 cp 1 2
12366 cp 2 3
12367 tar cf archive 1 2 3
12368 tar tf archive
12369 cat archive | tar f - --delete 2 > archive2
12370 echo separator
12371 tar tf archive2)"
12372 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12373 ( $at_check_trace;
12374 mkdir v7
12375 (cd v7
12376 TEST_TAR_FORMAT=v7
12377 export TEST_TAR_FORMAT
12378 TAR_OPTIONS="-H v7"
12379 export TAR_OPTIONS
12380 rm -rf *
12381
12382 genfile -l 3073 -p zeros --file 1
12383 cp 1 2
12384 cp 2 3
12385 tar cf archive 1 2 3
12386 tar tf archive
12387 cat archive | tar f - --delete 2 > archive2
12388 echo separator
12389 tar tf archive2)
12390 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12391 at_status=$? at_failed=false
12392 $at_check_filter
12393 at_fn_diff_devnull "$at_stderr" || at_failed=:
12394 echo >>"$at_stdout"; $as_echo "1
12395 2
12396 3
12397 separator
12398 1
12399 3
12400 " | \
12401   $at_diff - "$at_stdout" || at_failed=:
12402 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
12403 $at_failed && at_fn_log_failure
12404 $at_traceon; }
12405
12406               { set +x
12407 $as_echo "$at_srcdir/delete02.at:26:
12408 mkdir oldgnu
12409 (cd oldgnu
12410 TEST_TAR_FORMAT=oldgnu
12411 export TEST_TAR_FORMAT
12412 TAR_OPTIONS=\"-H oldgnu\"
12413 export TAR_OPTIONS
12414 rm -rf *
12415
12416 genfile -l 3073 -p zeros --file 1
12417 cp 1 2
12418 cp 2 3
12419 tar cf archive 1 2 3
12420 tar tf archive
12421 cat archive | tar f - --delete 2 > archive2
12422 echo separator
12423 tar tf archive2)"
12424 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12425 ( $at_check_trace;
12426 mkdir oldgnu
12427 (cd oldgnu
12428 TEST_TAR_FORMAT=oldgnu
12429 export TEST_TAR_FORMAT
12430 TAR_OPTIONS="-H oldgnu"
12431 export TAR_OPTIONS
12432 rm -rf *
12433
12434 genfile -l 3073 -p zeros --file 1
12435 cp 1 2
12436 cp 2 3
12437 tar cf archive 1 2 3
12438 tar tf archive
12439 cat archive | tar f - --delete 2 > archive2
12440 echo separator
12441 tar tf archive2)
12442 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12443 at_status=$? at_failed=false
12444 $at_check_filter
12445 at_fn_diff_devnull "$at_stderr" || at_failed=:
12446 echo >>"$at_stdout"; $as_echo "1
12447 2
12448 3
12449 separator
12450 1
12451 3
12452 " | \
12453   $at_diff - "$at_stdout" || at_failed=:
12454 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
12455 $at_failed && at_fn_log_failure
12456 $at_traceon; }
12457
12458               { set +x
12459 $as_echo "$at_srcdir/delete02.at:26:
12460 mkdir ustar
12461 (cd ustar
12462 TEST_TAR_FORMAT=ustar
12463 export TEST_TAR_FORMAT
12464 TAR_OPTIONS=\"-H ustar\"
12465 export TAR_OPTIONS
12466 rm -rf *
12467
12468 genfile -l 3073 -p zeros --file 1
12469 cp 1 2
12470 cp 2 3
12471 tar cf archive 1 2 3
12472 tar tf archive
12473 cat archive | tar f - --delete 2 > archive2
12474 echo separator
12475 tar tf archive2)"
12476 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12477 ( $at_check_trace;
12478 mkdir ustar
12479 (cd ustar
12480 TEST_TAR_FORMAT=ustar
12481 export TEST_TAR_FORMAT
12482 TAR_OPTIONS="-H ustar"
12483 export TAR_OPTIONS
12484 rm -rf *
12485
12486 genfile -l 3073 -p zeros --file 1
12487 cp 1 2
12488 cp 2 3
12489 tar cf archive 1 2 3
12490 tar tf archive
12491 cat archive | tar f - --delete 2 > archive2
12492 echo separator
12493 tar tf archive2)
12494 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12495 at_status=$? at_failed=false
12496 $at_check_filter
12497 at_fn_diff_devnull "$at_stderr" || at_failed=:
12498 echo >>"$at_stdout"; $as_echo "1
12499 2
12500 3
12501 separator
12502 1
12503 3
12504 " | \
12505   $at_diff - "$at_stdout" || at_failed=:
12506 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
12507 $at_failed && at_fn_log_failure
12508 $at_traceon; }
12509
12510               { set +x
12511 $as_echo "$at_srcdir/delete02.at:26:
12512 mkdir posix
12513 (cd posix
12514 TEST_TAR_FORMAT=posix
12515 export TEST_TAR_FORMAT
12516 TAR_OPTIONS=\"-H posix\"
12517 export TAR_OPTIONS
12518 rm -rf *
12519
12520 genfile -l 3073 -p zeros --file 1
12521 cp 1 2
12522 cp 2 3
12523 tar cf archive 1 2 3
12524 tar tf archive
12525 cat archive | tar f - --delete 2 > archive2
12526 echo separator
12527 tar tf archive2)"
12528 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12529 ( $at_check_trace;
12530 mkdir posix
12531 (cd posix
12532 TEST_TAR_FORMAT=posix
12533 export TEST_TAR_FORMAT
12534 TAR_OPTIONS="-H posix"
12535 export TAR_OPTIONS
12536 rm -rf *
12537
12538 genfile -l 3073 -p zeros --file 1
12539 cp 1 2
12540 cp 2 3
12541 tar cf archive 1 2 3
12542 tar tf archive
12543 cat archive | tar f - --delete 2 > archive2
12544 echo separator
12545 tar tf archive2)
12546 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12547 at_status=$? at_failed=false
12548 $at_check_filter
12549 at_fn_diff_devnull "$at_stderr" || at_failed=:
12550 echo >>"$at_stdout"; $as_echo "1
12551 2
12552 3
12553 separator
12554 1
12555 3
12556 " | \
12557   $at_diff - "$at_stdout" || at_failed=:
12558 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
12559 $at_failed && at_fn_log_failure
12560 $at_traceon; }
12561
12562               { set +x
12563 $as_echo "$at_srcdir/delete02.at:26:
12564 mkdir gnu
12565 (cd gnu
12566 TEST_TAR_FORMAT=gnu
12567 export TEST_TAR_FORMAT
12568 TAR_OPTIONS=\"-H gnu\"
12569 export TAR_OPTIONS
12570 rm -rf *
12571
12572 genfile -l 3073 -p zeros --file 1
12573 cp 1 2
12574 cp 2 3
12575 tar cf archive 1 2 3
12576 tar tf archive
12577 cat archive | tar f - --delete 2 > archive2
12578 echo separator
12579 tar tf archive2)"
12580 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12581 ( $at_check_trace;
12582 mkdir gnu
12583 (cd gnu
12584 TEST_TAR_FORMAT=gnu
12585 export TEST_TAR_FORMAT
12586 TAR_OPTIONS="-H gnu"
12587 export TAR_OPTIONS
12588 rm -rf *
12589
12590 genfile -l 3073 -p zeros --file 1
12591 cp 1 2
12592 cp 2 3
12593 tar cf archive 1 2 3
12594 tar tf archive
12595 cat archive | tar f - --delete 2 > archive2
12596 echo separator
12597 tar tf archive2)
12598 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12599 at_status=$? at_failed=false
12600 $at_check_filter
12601 at_fn_diff_devnull "$at_stderr" || at_failed=:
12602 echo >>"$at_stdout"; $as_echo "1
12603 2
12604 3
12605 separator
12606 1
12607 3
12608 " | \
12609   $at_diff - "$at_stdout" || at_failed=:
12610 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
12611 $at_failed && at_fn_log_failure
12612 $at_traceon; }
12613
12614
12615
12616
12617   set +x
12618   $at_times_p && times >"$at_times_file"
12619 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12620 read at_status <"$at_status_file"
12621 #AT_STOP_51
12622 #AT_START_52
12623 at_fn_group_banner 52 'delete03.at:21' \
12624   "deleting members with long names" "               " 8
12625 at_xfail=no
12626       test -f $XFAILFILE && at_xfail=yes
12627 (
12628   $as_echo "52. $at_setup_line: testing $at_desc ..."
12629   $at_traceon
12630
12631
12632
12633
12634
12635
12636
12637   { set +x
12638 $as_echo "$at_srcdir/delete03.at:26:
12639 mkdir gnu
12640 (cd gnu
12641 TEST_TAR_FORMAT=gnu
12642 export TEST_TAR_FORMAT
12643 TAR_OPTIONS=\"-H gnu\"
12644 export TAR_OPTIONS
12645 rm -rf *
12646
12647
12648 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
12649 rm -f \$prefix*
12650 for i in 1 2 3 4 5 6 7 8 9
12651 do touch \$prefix\$i
12652 done
12653 tar -cf archive ./\$prefix* &&
12654  tar --delete -f archive ./\${prefix}5 &&
12655  tar -tf archive
12656 )"
12657 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
12658 ( $at_check_trace;
12659 mkdir gnu
12660 (cd gnu
12661 TEST_TAR_FORMAT=gnu
12662 export TEST_TAR_FORMAT
12663 TAR_OPTIONS="-H gnu"
12664 export TAR_OPTIONS
12665 rm -rf *
12666
12667
12668 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
12669 rm -f $prefix*
12670 for i in 1 2 3 4 5 6 7 8 9
12671 do touch $prefix$i
12672 done
12673 tar -cf archive ./$prefix* &&
12674  tar --delete -f archive ./${prefix}5 &&
12675  tar -tf archive
12676 )
12677 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12678 at_status=$? at_failed=false
12679 $at_check_filter
12680 at_fn_diff_devnull "$at_stderr" || at_failed=:
12681 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
12682 ./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
12683 ./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
12684 ./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
12685 ./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
12686 ./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
12687 ./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
12688 ./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
12689 " | \
12690   $at_diff - "$at_stdout" || at_failed=:
12691 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
12692 $at_failed && at_fn_log_failure
12693 $at_traceon; }
12694
12695               { set +x
12696 $as_echo "$at_srcdir/delete03.at:26:
12697 mkdir oldgnu
12698 (cd oldgnu
12699 TEST_TAR_FORMAT=oldgnu
12700 export TEST_TAR_FORMAT
12701 TAR_OPTIONS=\"-H oldgnu\"
12702 export TAR_OPTIONS
12703 rm -rf *
12704
12705
12706 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
12707 rm -f \$prefix*
12708 for i in 1 2 3 4 5 6 7 8 9
12709 do touch \$prefix\$i
12710 done
12711 tar -cf archive ./\$prefix* &&
12712  tar --delete -f archive ./\${prefix}5 &&
12713  tar -tf archive
12714 )"
12715 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
12716 ( $at_check_trace;
12717 mkdir oldgnu
12718 (cd oldgnu
12719 TEST_TAR_FORMAT=oldgnu
12720 export TEST_TAR_FORMAT
12721 TAR_OPTIONS="-H oldgnu"
12722 export TAR_OPTIONS
12723 rm -rf *
12724
12725
12726 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
12727 rm -f $prefix*
12728 for i in 1 2 3 4 5 6 7 8 9
12729 do touch $prefix$i
12730 done
12731 tar -cf archive ./$prefix* &&
12732  tar --delete -f archive ./${prefix}5 &&
12733  tar -tf archive
12734 )
12735 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12736 at_status=$? at_failed=false
12737 $at_check_filter
12738 at_fn_diff_devnull "$at_stderr" || at_failed=:
12739 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
12740 ./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
12741 ./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
12742 ./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
12743 ./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
12744 ./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
12745 ./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
12746 ./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
12747 " | \
12748   $at_diff - "$at_stdout" || at_failed=:
12749 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
12750 $at_failed && at_fn_log_failure
12751 $at_traceon; }
12752
12753               { set +x
12754 $as_echo "$at_srcdir/delete03.at:26:
12755 mkdir posix
12756 (cd posix
12757 TEST_TAR_FORMAT=posix
12758 export TEST_TAR_FORMAT
12759 TAR_OPTIONS=\"-H posix\"
12760 export TAR_OPTIONS
12761 rm -rf *
12762
12763
12764 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
12765 rm -f \$prefix*
12766 for i in 1 2 3 4 5 6 7 8 9
12767 do touch \$prefix\$i
12768 done
12769 tar -cf archive ./\$prefix* &&
12770  tar --delete -f archive ./\${prefix}5 &&
12771  tar -tf archive
12772 )"
12773 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
12774 ( $at_check_trace;
12775 mkdir posix
12776 (cd posix
12777 TEST_TAR_FORMAT=posix
12778 export TEST_TAR_FORMAT
12779 TAR_OPTIONS="-H posix"
12780 export TAR_OPTIONS
12781 rm -rf *
12782
12783
12784 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
12785 rm -f $prefix*
12786 for i in 1 2 3 4 5 6 7 8 9
12787 do touch $prefix$i
12788 done
12789 tar -cf archive ./$prefix* &&
12790  tar --delete -f archive ./${prefix}5 &&
12791  tar -tf archive
12792 )
12793 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12794 at_status=$? at_failed=false
12795 $at_check_filter
12796 at_fn_diff_devnull "$at_stderr" || at_failed=:
12797 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
12798 ./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
12799 ./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
12800 ./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
12801 ./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
12802 ./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
12803 ./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
12804 ./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
12805 " | \
12806   $at_diff - "$at_stdout" || at_failed=:
12807 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
12808 $at_failed && at_fn_log_failure
12809 $at_traceon; }
12810
12811
12812
12813
12814
12815   set +x
12816   $at_times_p && times >"$at_times_file"
12817 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12818 read at_status <"$at_status_file"
12819 #AT_STOP_52
12820 #AT_START_53
12821 at_fn_group_banner 53 'delete04.at:23' \
12822   "deleting a large last member" "                   " 8
12823 at_xfail=no
12824       test -f $XFAILFILE && at_xfail=yes
12825 (
12826   $as_echo "53. $at_setup_line: testing $at_desc ..."
12827   $at_traceon
12828
12829
12830
12831
12832
12833   { set +x
12834 $as_echo "$at_srcdir/delete04.at:26:
12835 mkdir v7
12836 (cd v7
12837 TEST_TAR_FORMAT=v7
12838 export TEST_TAR_FORMAT
12839 TAR_OPTIONS=\"-H v7\"
12840 export TAR_OPTIONS
12841 rm -rf *
12842
12843 genfile -l      3 -f file1
12844 genfile -l      5 -f file2
12845 genfile -l      3 -f file3
12846 genfile -l      6 -f file4
12847 genfile -l     24 -f file5
12848 genfile -l     13 -f file6
12849 genfile -l   1385 -f file7
12850 genfile -l     30 -f file8
12851 genfile -l     10 -f file9
12852 genfile -l 256000 -f file10
12853 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
12854 tar f archive --delete file10
12855 tar tf archive
12856 )"
12857 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
12858 ( $at_check_trace;
12859 mkdir v7
12860 (cd v7
12861 TEST_TAR_FORMAT=v7
12862 export TEST_TAR_FORMAT
12863 TAR_OPTIONS="-H v7"
12864 export TAR_OPTIONS
12865 rm -rf *
12866
12867 genfile -l      3 -f file1
12868 genfile -l      5 -f file2
12869 genfile -l      3 -f file3
12870 genfile -l      6 -f file4
12871 genfile -l     24 -f file5
12872 genfile -l     13 -f file6
12873 genfile -l   1385 -f file7
12874 genfile -l     30 -f file8
12875 genfile -l     10 -f file9
12876 genfile -l 256000 -f file10
12877 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
12878 tar f archive --delete file10
12879 tar tf archive
12880 )
12881 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12882 at_status=$? at_failed=false
12883 $at_check_filter
12884 at_fn_diff_devnull "$at_stderr" || at_failed=:
12885 echo >>"$at_stdout"; $as_echo "file1
12886 file2
12887 file3
12888 file4
12889 file5
12890 file6
12891 file7
12892 file8
12893 file9
12894 " | \
12895   $at_diff - "$at_stdout" || at_failed=:
12896 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
12897 $at_failed && at_fn_log_failure
12898 $at_traceon; }
12899
12900               { set +x
12901 $as_echo "$at_srcdir/delete04.at:26:
12902 mkdir oldgnu
12903 (cd oldgnu
12904 TEST_TAR_FORMAT=oldgnu
12905 export TEST_TAR_FORMAT
12906 TAR_OPTIONS=\"-H oldgnu\"
12907 export TAR_OPTIONS
12908 rm -rf *
12909
12910 genfile -l      3 -f file1
12911 genfile -l      5 -f file2
12912 genfile -l      3 -f file3
12913 genfile -l      6 -f file4
12914 genfile -l     24 -f file5
12915 genfile -l     13 -f file6
12916 genfile -l   1385 -f file7
12917 genfile -l     30 -f file8
12918 genfile -l     10 -f file9
12919 genfile -l 256000 -f file10
12920 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
12921 tar f archive --delete file10
12922 tar tf archive
12923 )"
12924 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
12925 ( $at_check_trace;
12926 mkdir oldgnu
12927 (cd oldgnu
12928 TEST_TAR_FORMAT=oldgnu
12929 export TEST_TAR_FORMAT
12930 TAR_OPTIONS="-H oldgnu"
12931 export TAR_OPTIONS
12932 rm -rf *
12933
12934 genfile -l      3 -f file1
12935 genfile -l      5 -f file2
12936 genfile -l      3 -f file3
12937 genfile -l      6 -f file4
12938 genfile -l     24 -f file5
12939 genfile -l     13 -f file6
12940 genfile -l   1385 -f file7
12941 genfile -l     30 -f file8
12942 genfile -l     10 -f file9
12943 genfile -l 256000 -f file10
12944 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
12945 tar f archive --delete file10
12946 tar tf archive
12947 )
12948 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12949 at_status=$? at_failed=false
12950 $at_check_filter
12951 at_fn_diff_devnull "$at_stderr" || at_failed=:
12952 echo >>"$at_stdout"; $as_echo "file1
12953 file2
12954 file3
12955 file4
12956 file5
12957 file6
12958 file7
12959 file8
12960 file9
12961 " | \
12962   $at_diff - "$at_stdout" || at_failed=:
12963 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
12964 $at_failed && at_fn_log_failure
12965 $at_traceon; }
12966
12967               { set +x
12968 $as_echo "$at_srcdir/delete04.at:26:
12969 mkdir ustar
12970 (cd ustar
12971 TEST_TAR_FORMAT=ustar
12972 export TEST_TAR_FORMAT
12973 TAR_OPTIONS=\"-H ustar\"
12974 export TAR_OPTIONS
12975 rm -rf *
12976
12977 genfile -l      3 -f file1
12978 genfile -l      5 -f file2
12979 genfile -l      3 -f file3
12980 genfile -l      6 -f file4
12981 genfile -l     24 -f file5
12982 genfile -l     13 -f file6
12983 genfile -l   1385 -f file7
12984 genfile -l     30 -f file8
12985 genfile -l     10 -f file9
12986 genfile -l 256000 -f file10
12987 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
12988 tar f archive --delete file10
12989 tar tf archive
12990 )"
12991 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
12992 ( $at_check_trace;
12993 mkdir ustar
12994 (cd ustar
12995 TEST_TAR_FORMAT=ustar
12996 export TEST_TAR_FORMAT
12997 TAR_OPTIONS="-H ustar"
12998 export TAR_OPTIONS
12999 rm -rf *
13000
13001 genfile -l      3 -f file1
13002 genfile -l      5 -f file2
13003 genfile -l      3 -f file3
13004 genfile -l      6 -f file4
13005 genfile -l     24 -f file5
13006 genfile -l     13 -f file6
13007 genfile -l   1385 -f file7
13008 genfile -l     30 -f file8
13009 genfile -l     10 -f file9
13010 genfile -l 256000 -f file10
13011 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13012 tar f archive --delete file10
13013 tar tf archive
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 "file1
13020 file2
13021 file3
13022 file4
13023 file5
13024 file6
13025 file7
13026 file8
13027 file9
13028 " | \
13029   $at_diff - "$at_stdout" || at_failed=:
13030 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
13031 $at_failed && at_fn_log_failure
13032 $at_traceon; }
13033
13034               { set +x
13035 $as_echo "$at_srcdir/delete04.at:26:
13036 mkdir posix
13037 (cd posix
13038 TEST_TAR_FORMAT=posix
13039 export TEST_TAR_FORMAT
13040 TAR_OPTIONS=\"-H posix\"
13041 export TAR_OPTIONS
13042 rm -rf *
13043
13044 genfile -l      3 -f file1
13045 genfile -l      5 -f file2
13046 genfile -l      3 -f file3
13047 genfile -l      6 -f file4
13048 genfile -l     24 -f file5
13049 genfile -l     13 -f file6
13050 genfile -l   1385 -f file7
13051 genfile -l     30 -f file8
13052 genfile -l     10 -f file9
13053 genfile -l 256000 -f file10
13054 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13055 tar f archive --delete file10
13056 tar tf archive
13057 )"
13058 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
13059 ( $at_check_trace;
13060 mkdir posix
13061 (cd posix
13062 TEST_TAR_FORMAT=posix
13063 export TEST_TAR_FORMAT
13064 TAR_OPTIONS="-H posix"
13065 export TAR_OPTIONS
13066 rm -rf *
13067
13068 genfile -l      3 -f file1
13069 genfile -l      5 -f file2
13070 genfile -l      3 -f file3
13071 genfile -l      6 -f file4
13072 genfile -l     24 -f file5
13073 genfile -l     13 -f file6
13074 genfile -l   1385 -f file7
13075 genfile -l     30 -f file8
13076 genfile -l     10 -f file9
13077 genfile -l 256000 -f file10
13078 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13079 tar f archive --delete file10
13080 tar tf archive
13081 )
13082 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13083 at_status=$? at_failed=false
13084 $at_check_filter
13085 at_fn_diff_devnull "$at_stderr" || at_failed=:
13086 echo >>"$at_stdout"; $as_echo "file1
13087 file2
13088 file3
13089 file4
13090 file5
13091 file6
13092 file7
13093 file8
13094 file9
13095 " | \
13096   $at_diff - "$at_stdout" || at_failed=:
13097 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
13098 $at_failed && at_fn_log_failure
13099 $at_traceon; }
13100
13101               { set +x
13102 $as_echo "$at_srcdir/delete04.at:26:
13103 mkdir gnu
13104 (cd gnu
13105 TEST_TAR_FORMAT=gnu
13106 export TEST_TAR_FORMAT
13107 TAR_OPTIONS=\"-H gnu\"
13108 export TAR_OPTIONS
13109 rm -rf *
13110
13111 genfile -l      3 -f file1
13112 genfile -l      5 -f file2
13113 genfile -l      3 -f file3
13114 genfile -l      6 -f file4
13115 genfile -l     24 -f file5
13116 genfile -l     13 -f file6
13117 genfile -l   1385 -f file7
13118 genfile -l     30 -f file8
13119 genfile -l     10 -f file9
13120 genfile -l 256000 -f file10
13121 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13122 tar f archive --delete file10
13123 tar tf archive
13124 )"
13125 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
13126 ( $at_check_trace;
13127 mkdir gnu
13128 (cd gnu
13129 TEST_TAR_FORMAT=gnu
13130 export TEST_TAR_FORMAT
13131 TAR_OPTIONS="-H gnu"
13132 export TAR_OPTIONS
13133 rm -rf *
13134
13135 genfile -l      3 -f file1
13136 genfile -l      5 -f file2
13137 genfile -l      3 -f file3
13138 genfile -l      6 -f file4
13139 genfile -l     24 -f file5
13140 genfile -l     13 -f file6
13141 genfile -l   1385 -f file7
13142 genfile -l     30 -f file8
13143 genfile -l     10 -f file9
13144 genfile -l 256000 -f file10
13145 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13146 tar f archive --delete file10
13147 tar tf archive
13148 )
13149 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13150 at_status=$? at_failed=false
13151 $at_check_filter
13152 at_fn_diff_devnull "$at_stderr" || at_failed=:
13153 echo >>"$at_stdout"; $as_echo "file1
13154 file2
13155 file3
13156 file4
13157 file5
13158 file6
13159 file7
13160 file8
13161 file9
13162 " | \
13163   $at_diff - "$at_stdout" || at_failed=:
13164 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
13165 $at_failed && at_fn_log_failure
13166 $at_traceon; }
13167
13168
13169
13170
13171   set +x
13172   $at_times_p && times >"$at_times_file"
13173 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13174 read at_status <"$at_status_file"
13175 #AT_STOP_53
13176 #AT_START_54
13177 at_fn_group_banner 54 'delete05.at:27' \
13178   "deleting non-existing member" "                   " 8
13179 at_xfail=no
13180       test -f $XFAILFILE && at_xfail=yes
13181 (
13182   $as_echo "54. $at_setup_line: testing $at_desc ..."
13183   $at_traceon
13184
13185
13186
13187
13188
13189   { set +x
13190 $as_echo "$at_srcdir/delete05.at:30:
13191 mkdir v7
13192 (cd v7
13193 TEST_TAR_FORMAT=v7
13194 export TEST_TAR_FORMAT
13195 TAR_OPTIONS=\"-H v7\"
13196 export TAR_OPTIONS
13197 rm -rf *
13198
13199 genfile -l 1024 -f en
13200 genfile -l 1024 -f to
13201
13202 tar cf archive en to
13203 # Make sure we don't use bogus blocking factor.
13204 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13205 tar --file archive --blocking-factor=20 --delete tre
13206 tar tf archive
13207 )"
13208 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13209 ( $at_check_trace;
13210 mkdir v7
13211 (cd v7
13212 TEST_TAR_FORMAT=v7
13213 export TEST_TAR_FORMAT
13214 TAR_OPTIONS="-H v7"
13215 export TAR_OPTIONS
13216 rm -rf *
13217
13218 genfile -l 1024 -f en
13219 genfile -l 1024 -f to
13220
13221 tar cf archive en to
13222 # Make sure we don't use bogus blocking factor.
13223 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13224 tar --file archive --blocking-factor=20 --delete tre
13225 tar tf archive
13226 )
13227 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13228 at_status=$? at_failed=false
13229 $at_check_filter
13230 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13231 tar: Exiting with failure status due to previous errors
13232 " | \
13233   $at_diff - "$at_stderr" || at_failed=:
13234 echo >>"$at_stdout"; $as_echo "en
13235 to
13236 " | \
13237   $at_diff - "$at_stdout" || at_failed=:
13238 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13239 $at_failed && at_fn_log_failure
13240 $at_traceon; }
13241
13242               { set +x
13243 $as_echo "$at_srcdir/delete05.at:30:
13244 mkdir oldgnu
13245 (cd oldgnu
13246 TEST_TAR_FORMAT=oldgnu
13247 export TEST_TAR_FORMAT
13248 TAR_OPTIONS=\"-H oldgnu\"
13249 export TAR_OPTIONS
13250 rm -rf *
13251
13252 genfile -l 1024 -f en
13253 genfile -l 1024 -f to
13254
13255 tar cf archive en to
13256 # Make sure we don't use bogus blocking factor.
13257 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13258 tar --file archive --blocking-factor=20 --delete tre
13259 tar tf archive
13260 )"
13261 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13262 ( $at_check_trace;
13263 mkdir oldgnu
13264 (cd oldgnu
13265 TEST_TAR_FORMAT=oldgnu
13266 export TEST_TAR_FORMAT
13267 TAR_OPTIONS="-H oldgnu"
13268 export TAR_OPTIONS
13269 rm -rf *
13270
13271 genfile -l 1024 -f en
13272 genfile -l 1024 -f to
13273
13274 tar cf archive en to
13275 # Make sure we don't use bogus blocking factor.
13276 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13277 tar --file archive --blocking-factor=20 --delete tre
13278 tar tf archive
13279 )
13280 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13281 at_status=$? at_failed=false
13282 $at_check_filter
13283 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13284 tar: Exiting with failure status due to previous errors
13285 " | \
13286   $at_diff - "$at_stderr" || at_failed=:
13287 echo >>"$at_stdout"; $as_echo "en
13288 to
13289 " | \
13290   $at_diff - "$at_stdout" || at_failed=:
13291 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13292 $at_failed && at_fn_log_failure
13293 $at_traceon; }
13294
13295               { set +x
13296 $as_echo "$at_srcdir/delete05.at:30:
13297 mkdir ustar
13298 (cd ustar
13299 TEST_TAR_FORMAT=ustar
13300 export TEST_TAR_FORMAT
13301 TAR_OPTIONS=\"-H ustar\"
13302 export TAR_OPTIONS
13303 rm -rf *
13304
13305 genfile -l 1024 -f en
13306 genfile -l 1024 -f to
13307
13308 tar cf archive en to
13309 # Make sure we don't use bogus blocking factor.
13310 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13311 tar --file archive --blocking-factor=20 --delete tre
13312 tar tf archive
13313 )"
13314 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13315 ( $at_check_trace;
13316 mkdir ustar
13317 (cd ustar
13318 TEST_TAR_FORMAT=ustar
13319 export TEST_TAR_FORMAT
13320 TAR_OPTIONS="-H ustar"
13321 export TAR_OPTIONS
13322 rm -rf *
13323
13324 genfile -l 1024 -f en
13325 genfile -l 1024 -f to
13326
13327 tar cf archive en to
13328 # Make sure we don't use bogus blocking factor.
13329 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13330 tar --file archive --blocking-factor=20 --delete tre
13331 tar tf archive
13332 )
13333 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13334 at_status=$? at_failed=false
13335 $at_check_filter
13336 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13337 tar: Exiting with failure status due to previous errors
13338 " | \
13339   $at_diff - "$at_stderr" || at_failed=:
13340 echo >>"$at_stdout"; $as_echo "en
13341 to
13342 " | \
13343   $at_diff - "$at_stdout" || at_failed=:
13344 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13345 $at_failed && at_fn_log_failure
13346 $at_traceon; }
13347
13348               { set +x
13349 $as_echo "$at_srcdir/delete05.at:30:
13350 mkdir posix
13351 (cd posix
13352 TEST_TAR_FORMAT=posix
13353 export TEST_TAR_FORMAT
13354 TAR_OPTIONS=\"-H posix\"
13355 export TAR_OPTIONS
13356 rm -rf *
13357
13358 genfile -l 1024 -f en
13359 genfile -l 1024 -f to
13360
13361 tar cf archive en to
13362 # Make sure we don't use bogus blocking factor.
13363 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13364 tar --file archive --blocking-factor=20 --delete tre
13365 tar tf archive
13366 )"
13367 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13368 ( $at_check_trace;
13369 mkdir posix
13370 (cd posix
13371 TEST_TAR_FORMAT=posix
13372 export TEST_TAR_FORMAT
13373 TAR_OPTIONS="-H posix"
13374 export TAR_OPTIONS
13375 rm -rf *
13376
13377 genfile -l 1024 -f en
13378 genfile -l 1024 -f to
13379
13380 tar cf archive en to
13381 # Make sure we don't use bogus blocking factor.
13382 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13383 tar --file archive --blocking-factor=20 --delete tre
13384 tar tf archive
13385 )
13386 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13387 at_status=$? at_failed=false
13388 $at_check_filter
13389 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13390 tar: Exiting with failure status due to previous errors
13391 " | \
13392   $at_diff - "$at_stderr" || at_failed=:
13393 echo >>"$at_stdout"; $as_echo "en
13394 to
13395 " | \
13396   $at_diff - "$at_stdout" || at_failed=:
13397 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13398 $at_failed && at_fn_log_failure
13399 $at_traceon; }
13400
13401               { set +x
13402 $as_echo "$at_srcdir/delete05.at:30:
13403 mkdir gnu
13404 (cd gnu
13405 TEST_TAR_FORMAT=gnu
13406 export TEST_TAR_FORMAT
13407 TAR_OPTIONS=\"-H gnu\"
13408 export TAR_OPTIONS
13409 rm -rf *
13410
13411 genfile -l 1024 -f en
13412 genfile -l 1024 -f to
13413
13414 tar cf archive en to
13415 # Make sure we don't use bogus blocking factor.
13416 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13417 tar --file archive --blocking-factor=20 --delete tre
13418 tar tf archive
13419 )"
13420 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13421 ( $at_check_trace;
13422 mkdir gnu
13423 (cd gnu
13424 TEST_TAR_FORMAT=gnu
13425 export TEST_TAR_FORMAT
13426 TAR_OPTIONS="-H gnu"
13427 export TAR_OPTIONS
13428 rm -rf *
13429
13430 genfile -l 1024 -f en
13431 genfile -l 1024 -f to
13432
13433 tar cf archive en to
13434 # Make sure we don't use bogus blocking factor.
13435 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13436 tar --file archive --blocking-factor=20 --delete tre
13437 tar tf archive
13438 )
13439 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13440 at_status=$? at_failed=false
13441 $at_check_filter
13442 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13443 tar: Exiting with failure status due to previous errors
13444 " | \
13445   $at_diff - "$at_stderr" || at_failed=:
13446 echo >>"$at_stdout"; $as_echo "en
13447 to
13448 " | \
13449   $at_diff - "$at_stdout" || at_failed=:
13450 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13451 $at_failed && at_fn_log_failure
13452 $at_traceon; }
13453
13454
13455
13456
13457   set +x
13458   $at_times_p && times >"$at_times_file"
13459 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13460 read at_status <"$at_status_file"
13461 #AT_STOP_54
13462 #AT_START_55
13463 at_fn_group_banner 55 'extrac01.at:23' \
13464   "extract over an existing directory" "             " 9
13465 at_xfail=no
13466       test -f $XFAILFILE && at_xfail=yes
13467 (
13468   $as_echo "55. $at_setup_line: testing $at_desc ..."
13469   $at_traceon
13470
13471
13472
13473
13474
13475   { set +x
13476 $as_echo "$at_srcdir/extrac01.at:26:
13477 mkdir v7
13478 (cd v7
13479 TEST_TAR_FORMAT=v7
13480 export TEST_TAR_FORMAT
13481 TAR_OPTIONS=\"-H v7\"
13482 export TAR_OPTIONS
13483 rm -rf *
13484
13485 mkdir directory
13486 touch directory/file
13487 tar cf archive directory || exit 1
13488 tar xf archive --warning=no-timestamp || exit 1
13489 )"
13490 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
13491 ( $at_check_trace;
13492 mkdir v7
13493 (cd v7
13494 TEST_TAR_FORMAT=v7
13495 export TEST_TAR_FORMAT
13496 TAR_OPTIONS="-H v7"
13497 export TAR_OPTIONS
13498 rm -rf *
13499
13500 mkdir directory
13501 touch directory/file
13502 tar cf archive directory || exit 1
13503 tar xf archive --warning=no-timestamp || exit 1
13504 )
13505 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13506 at_status=$? at_failed=false
13507 $at_check_filter
13508 at_fn_diff_devnull "$at_stderr" || at_failed=:
13509 at_fn_diff_devnull "$at_stdout" || at_failed=:
13510 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
13511 $at_failed && at_fn_log_failure
13512 $at_traceon; }
13513
13514               { set +x
13515 $as_echo "$at_srcdir/extrac01.at:26:
13516 mkdir oldgnu
13517 (cd oldgnu
13518 TEST_TAR_FORMAT=oldgnu
13519 export TEST_TAR_FORMAT
13520 TAR_OPTIONS=\"-H oldgnu\"
13521 export TAR_OPTIONS
13522 rm -rf *
13523
13524 mkdir directory
13525 touch directory/file
13526 tar cf archive directory || exit 1
13527 tar xf archive --warning=no-timestamp || exit 1
13528 )"
13529 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
13530 ( $at_check_trace;
13531 mkdir oldgnu
13532 (cd oldgnu
13533 TEST_TAR_FORMAT=oldgnu
13534 export TEST_TAR_FORMAT
13535 TAR_OPTIONS="-H oldgnu"
13536 export TAR_OPTIONS
13537 rm -rf *
13538
13539 mkdir directory
13540 touch directory/file
13541 tar cf archive directory || exit 1
13542 tar xf archive --warning=no-timestamp || exit 1
13543 )
13544 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13545 at_status=$? at_failed=false
13546 $at_check_filter
13547 at_fn_diff_devnull "$at_stderr" || at_failed=:
13548 at_fn_diff_devnull "$at_stdout" || at_failed=:
13549 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
13550 $at_failed && at_fn_log_failure
13551 $at_traceon; }
13552
13553               { set +x
13554 $as_echo "$at_srcdir/extrac01.at:26:
13555 mkdir ustar
13556 (cd ustar
13557 TEST_TAR_FORMAT=ustar
13558 export TEST_TAR_FORMAT
13559 TAR_OPTIONS=\"-H ustar\"
13560 export TAR_OPTIONS
13561 rm -rf *
13562
13563 mkdir directory
13564 touch directory/file
13565 tar cf archive directory || exit 1
13566 tar xf archive --warning=no-timestamp || exit 1
13567 )"
13568 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
13569 ( $at_check_trace;
13570 mkdir ustar
13571 (cd ustar
13572 TEST_TAR_FORMAT=ustar
13573 export TEST_TAR_FORMAT
13574 TAR_OPTIONS="-H ustar"
13575 export TAR_OPTIONS
13576 rm -rf *
13577
13578 mkdir directory
13579 touch directory/file
13580 tar cf archive directory || exit 1
13581 tar xf archive --warning=no-timestamp || exit 1
13582 )
13583 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13584 at_status=$? at_failed=false
13585 $at_check_filter
13586 at_fn_diff_devnull "$at_stderr" || at_failed=:
13587 at_fn_diff_devnull "$at_stdout" || at_failed=:
13588 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
13589 $at_failed && at_fn_log_failure
13590 $at_traceon; }
13591
13592               { set +x
13593 $as_echo "$at_srcdir/extrac01.at:26:
13594 mkdir posix
13595 (cd posix
13596 TEST_TAR_FORMAT=posix
13597 export TEST_TAR_FORMAT
13598 TAR_OPTIONS=\"-H posix\"
13599 export TAR_OPTIONS
13600 rm -rf *
13601
13602 mkdir directory
13603 touch directory/file
13604 tar cf archive directory || exit 1
13605 tar xf archive --warning=no-timestamp || exit 1
13606 )"
13607 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
13608 ( $at_check_trace;
13609 mkdir posix
13610 (cd posix
13611 TEST_TAR_FORMAT=posix
13612 export TEST_TAR_FORMAT
13613 TAR_OPTIONS="-H posix"
13614 export TAR_OPTIONS
13615 rm -rf *
13616
13617 mkdir directory
13618 touch directory/file
13619 tar cf archive directory || exit 1
13620 tar xf archive --warning=no-timestamp || exit 1
13621 )
13622 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13623 at_status=$? at_failed=false
13624 $at_check_filter
13625 at_fn_diff_devnull "$at_stderr" || at_failed=:
13626 at_fn_diff_devnull "$at_stdout" || at_failed=:
13627 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
13628 $at_failed && at_fn_log_failure
13629 $at_traceon; }
13630
13631               { set +x
13632 $as_echo "$at_srcdir/extrac01.at:26:
13633 mkdir gnu
13634 (cd gnu
13635 TEST_TAR_FORMAT=gnu
13636 export TEST_TAR_FORMAT
13637 TAR_OPTIONS=\"-H gnu\"
13638 export TAR_OPTIONS
13639 rm -rf *
13640
13641 mkdir directory
13642 touch directory/file
13643 tar cf archive directory || exit 1
13644 tar xf archive --warning=no-timestamp || exit 1
13645 )"
13646 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
13647 ( $at_check_trace;
13648 mkdir gnu
13649 (cd gnu
13650 TEST_TAR_FORMAT=gnu
13651 export TEST_TAR_FORMAT
13652 TAR_OPTIONS="-H gnu"
13653 export TAR_OPTIONS
13654 rm -rf *
13655
13656 mkdir directory
13657 touch directory/file
13658 tar cf archive directory || exit 1
13659 tar xf archive --warning=no-timestamp || exit 1
13660 )
13661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13662 at_status=$? at_failed=false
13663 $at_check_filter
13664 at_fn_diff_devnull "$at_stderr" || at_failed=:
13665 at_fn_diff_devnull "$at_stdout" || at_failed=:
13666 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
13667 $at_failed && at_fn_log_failure
13668 $at_traceon; }
13669
13670
13671
13672
13673   set +x
13674   $at_times_p && times >"$at_times_file"
13675 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13676 read at_status <"$at_status_file"
13677 #AT_STOP_55
13678 #AT_START_56
13679 at_fn_group_banner 56 'extrac02.at:23' \
13680   "extracting symlinks over an existing file" "      " 9
13681 at_xfail=no
13682       test -f $XFAILFILE && at_xfail=yes
13683 (
13684   $as_echo "56. $at_setup_line: testing $at_desc ..."
13685   $at_traceon
13686
13687
13688
13689 # FIXME: Skip if symlinks are not supported on the system
13690
13691
13692
13693   { set +x
13694 $as_echo "$at_srcdir/extrac02.at:28:
13695 mkdir v7
13696 (cd v7
13697 TEST_TAR_FORMAT=v7
13698 export TEST_TAR_FORMAT
13699 TAR_OPTIONS=\"-H v7\"
13700 export TAR_OPTIONS
13701 rm -rf *
13702
13703 touch file
13704 ln -s file link 2> /dev/null || ln file link
13705 tar cf archive link
13706 rm link
13707 touch link
13708 tar xf archive
13709 )"
13710 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
13711 ( $at_check_trace;
13712 mkdir v7
13713 (cd v7
13714 TEST_TAR_FORMAT=v7
13715 export TEST_TAR_FORMAT
13716 TAR_OPTIONS="-H v7"
13717 export TAR_OPTIONS
13718 rm -rf *
13719
13720 touch file
13721 ln -s file link 2> /dev/null || ln file link
13722 tar cf archive link
13723 rm link
13724 touch link
13725 tar xf archive
13726 )
13727 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13728 at_status=$? at_failed=false
13729 $at_check_filter
13730 at_fn_diff_devnull "$at_stderr" || at_failed=:
13731 at_fn_diff_devnull "$at_stdout" || at_failed=:
13732 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
13733 $at_failed && at_fn_log_failure
13734 $at_traceon; }
13735
13736               { set +x
13737 $as_echo "$at_srcdir/extrac02.at:28:
13738 mkdir oldgnu
13739 (cd oldgnu
13740 TEST_TAR_FORMAT=oldgnu
13741 export TEST_TAR_FORMAT
13742 TAR_OPTIONS=\"-H oldgnu\"
13743 export TAR_OPTIONS
13744 rm -rf *
13745
13746 touch file
13747 ln -s file link 2> /dev/null || ln file link
13748 tar cf archive link
13749 rm link
13750 touch link
13751 tar xf archive
13752 )"
13753 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
13754 ( $at_check_trace;
13755 mkdir oldgnu
13756 (cd oldgnu
13757 TEST_TAR_FORMAT=oldgnu
13758 export TEST_TAR_FORMAT
13759 TAR_OPTIONS="-H oldgnu"
13760 export TAR_OPTIONS
13761 rm -rf *
13762
13763 touch file
13764 ln -s file link 2> /dev/null || ln file link
13765 tar cf archive link
13766 rm link
13767 touch link
13768 tar xf archive
13769 )
13770 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13771 at_status=$? at_failed=false
13772 $at_check_filter
13773 at_fn_diff_devnull "$at_stderr" || at_failed=:
13774 at_fn_diff_devnull "$at_stdout" || at_failed=:
13775 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
13776 $at_failed && at_fn_log_failure
13777 $at_traceon; }
13778
13779               { set +x
13780 $as_echo "$at_srcdir/extrac02.at:28:
13781 mkdir ustar
13782 (cd ustar
13783 TEST_TAR_FORMAT=ustar
13784 export TEST_TAR_FORMAT
13785 TAR_OPTIONS=\"-H ustar\"
13786 export TAR_OPTIONS
13787 rm -rf *
13788
13789 touch file
13790 ln -s file link 2> /dev/null || ln file link
13791 tar cf archive link
13792 rm link
13793 touch link
13794 tar xf archive
13795 )"
13796 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
13797 ( $at_check_trace;
13798 mkdir ustar
13799 (cd ustar
13800 TEST_TAR_FORMAT=ustar
13801 export TEST_TAR_FORMAT
13802 TAR_OPTIONS="-H ustar"
13803 export TAR_OPTIONS
13804 rm -rf *
13805
13806 touch file
13807 ln -s file link 2> /dev/null || ln file link
13808 tar cf archive link
13809 rm link
13810 touch link
13811 tar xf archive
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 at_fn_diff_devnull "$at_stdout" || at_failed=:
13818 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
13819 $at_failed && at_fn_log_failure
13820 $at_traceon; }
13821
13822               { set +x
13823 $as_echo "$at_srcdir/extrac02.at:28:
13824 mkdir posix
13825 (cd posix
13826 TEST_TAR_FORMAT=posix
13827 export TEST_TAR_FORMAT
13828 TAR_OPTIONS=\"-H posix\"
13829 export TAR_OPTIONS
13830 rm -rf *
13831
13832 touch file
13833 ln -s file link 2> /dev/null || ln file link
13834 tar cf archive link
13835 rm link
13836 touch link
13837 tar xf archive
13838 )"
13839 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
13840 ( $at_check_trace;
13841 mkdir posix
13842 (cd posix
13843 TEST_TAR_FORMAT=posix
13844 export TEST_TAR_FORMAT
13845 TAR_OPTIONS="-H posix"
13846 export TAR_OPTIONS
13847 rm -rf *
13848
13849 touch file
13850 ln -s file link 2> /dev/null || ln file link
13851 tar cf archive link
13852 rm link
13853 touch link
13854 tar xf archive
13855 )
13856 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13857 at_status=$? at_failed=false
13858 $at_check_filter
13859 at_fn_diff_devnull "$at_stderr" || at_failed=:
13860 at_fn_diff_devnull "$at_stdout" || at_failed=:
13861 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
13862 $at_failed && at_fn_log_failure
13863 $at_traceon; }
13864
13865               { set +x
13866 $as_echo "$at_srcdir/extrac02.at:28:
13867 mkdir gnu
13868 (cd gnu
13869 TEST_TAR_FORMAT=gnu
13870 export TEST_TAR_FORMAT
13871 TAR_OPTIONS=\"-H gnu\"
13872 export TAR_OPTIONS
13873 rm -rf *
13874
13875 touch file
13876 ln -s file link 2> /dev/null || ln file link
13877 tar cf archive link
13878 rm link
13879 touch link
13880 tar xf archive
13881 )"
13882 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
13883 ( $at_check_trace;
13884 mkdir gnu
13885 (cd gnu
13886 TEST_TAR_FORMAT=gnu
13887 export TEST_TAR_FORMAT
13888 TAR_OPTIONS="-H gnu"
13889 export TAR_OPTIONS
13890 rm -rf *
13891
13892 touch file
13893 ln -s file link 2> /dev/null || ln file link
13894 tar cf archive link
13895 rm link
13896 touch link
13897 tar xf archive
13898 )
13899 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13900 at_status=$? at_failed=false
13901 $at_check_filter
13902 at_fn_diff_devnull "$at_stderr" || at_failed=:
13903 at_fn_diff_devnull "$at_stdout" || at_failed=:
13904 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
13905 $at_failed && at_fn_log_failure
13906 $at_traceon; }
13907
13908
13909
13910
13911   set +x
13912   $at_times_p && times >"$at_times_file"
13913 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13914 read at_status <"$at_status_file"
13915 #AT_STOP_56
13916 #AT_START_57
13917 at_fn_group_banner 57 'extrac03.at:23' \
13918   "extraction loops" "                               " 9
13919 at_xfail=no
13920       test -f $XFAILFILE && at_xfail=yes
13921 (
13922   $as_echo "57. $at_setup_line: testing $at_desc ..."
13923   $at_traceon
13924
13925
13926
13927
13928
13929   { set +x
13930 $as_echo "$at_srcdir/extrac03.at:26:
13931 mkdir v7
13932 (cd v7
13933 TEST_TAR_FORMAT=v7
13934 export TEST_TAR_FORMAT
13935 TAR_OPTIONS=\"-H v7\"
13936 export TAR_OPTIONS
13937 rm -rf *
13938
13939 mkdir directory
13940 tar -cPvf archive directory/../directory
13941 echo separator
13942 tar -xPvf archive --warning=no-timestamp)"
13943 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
13944 ( $at_check_trace;
13945 mkdir v7
13946 (cd v7
13947 TEST_TAR_FORMAT=v7
13948 export TEST_TAR_FORMAT
13949 TAR_OPTIONS="-H v7"
13950 export TAR_OPTIONS
13951 rm -rf *
13952
13953 mkdir directory
13954 tar -cPvf archive directory/../directory
13955 echo separator
13956 tar -xPvf archive --warning=no-timestamp)
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 "directory/../directory/
13962 separator
13963 directory/../directory/
13964 " | \
13965   $at_diff - "$at_stdout" || at_failed=:
13966 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
13967 $at_failed && at_fn_log_failure
13968 $at_traceon; }
13969
13970               { set +x
13971 $as_echo "$at_srcdir/extrac03.at:26:
13972 mkdir oldgnu
13973 (cd oldgnu
13974 TEST_TAR_FORMAT=oldgnu
13975 export TEST_TAR_FORMAT
13976 TAR_OPTIONS=\"-H oldgnu\"
13977 export TAR_OPTIONS
13978 rm -rf *
13979
13980 mkdir directory
13981 tar -cPvf archive directory/../directory
13982 echo separator
13983 tar -xPvf archive --warning=no-timestamp)"
13984 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
13985 ( $at_check_trace;
13986 mkdir oldgnu
13987 (cd oldgnu
13988 TEST_TAR_FORMAT=oldgnu
13989 export TEST_TAR_FORMAT
13990 TAR_OPTIONS="-H oldgnu"
13991 export TAR_OPTIONS
13992 rm -rf *
13993
13994 mkdir directory
13995 tar -cPvf archive directory/../directory
13996 echo separator
13997 tar -xPvf archive --warning=no-timestamp)
13998 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13999 at_status=$? at_failed=false
14000 $at_check_filter
14001 at_fn_diff_devnull "$at_stderr" || at_failed=:
14002 echo >>"$at_stdout"; $as_echo "directory/../directory/
14003 separator
14004 directory/../directory/
14005 " | \
14006   $at_diff - "$at_stdout" || at_failed=:
14007 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14008 $at_failed && at_fn_log_failure
14009 $at_traceon; }
14010
14011               { set +x
14012 $as_echo "$at_srcdir/extrac03.at:26:
14013 mkdir ustar
14014 (cd ustar
14015 TEST_TAR_FORMAT=ustar
14016 export TEST_TAR_FORMAT
14017 TAR_OPTIONS=\"-H ustar\"
14018 export TAR_OPTIONS
14019 rm -rf *
14020
14021 mkdir directory
14022 tar -cPvf archive directory/../directory
14023 echo separator
14024 tar -xPvf archive --warning=no-timestamp)"
14025 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
14026 ( $at_check_trace;
14027 mkdir ustar
14028 (cd ustar
14029 TEST_TAR_FORMAT=ustar
14030 export TEST_TAR_FORMAT
14031 TAR_OPTIONS="-H ustar"
14032 export TAR_OPTIONS
14033 rm -rf *
14034
14035 mkdir directory
14036 tar -cPvf archive directory/../directory
14037 echo separator
14038 tar -xPvf archive --warning=no-timestamp)
14039 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14040 at_status=$? at_failed=false
14041 $at_check_filter
14042 at_fn_diff_devnull "$at_stderr" || at_failed=:
14043 echo >>"$at_stdout"; $as_echo "directory/../directory/
14044 separator
14045 directory/../directory/
14046 " | \
14047   $at_diff - "$at_stdout" || at_failed=:
14048 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14049 $at_failed && at_fn_log_failure
14050 $at_traceon; }
14051
14052               { set +x
14053 $as_echo "$at_srcdir/extrac03.at:26:
14054 mkdir posix
14055 (cd posix
14056 TEST_TAR_FORMAT=posix
14057 export TEST_TAR_FORMAT
14058 TAR_OPTIONS=\"-H posix\"
14059 export TAR_OPTIONS
14060 rm -rf *
14061
14062 mkdir directory
14063 tar -cPvf archive directory/../directory
14064 echo separator
14065 tar -xPvf archive --warning=no-timestamp)"
14066 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
14067 ( $at_check_trace;
14068 mkdir posix
14069 (cd posix
14070 TEST_TAR_FORMAT=posix
14071 export TEST_TAR_FORMAT
14072 TAR_OPTIONS="-H posix"
14073 export TAR_OPTIONS
14074 rm -rf *
14075
14076 mkdir directory
14077 tar -cPvf archive directory/../directory
14078 echo separator
14079 tar -xPvf archive --warning=no-timestamp)
14080 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14081 at_status=$? at_failed=false
14082 $at_check_filter
14083 at_fn_diff_devnull "$at_stderr" || at_failed=:
14084 echo >>"$at_stdout"; $as_echo "directory/../directory/
14085 separator
14086 directory/../directory/
14087 " | \
14088   $at_diff - "$at_stdout" || at_failed=:
14089 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14090 $at_failed && at_fn_log_failure
14091 $at_traceon; }
14092
14093               { set +x
14094 $as_echo "$at_srcdir/extrac03.at:26:
14095 mkdir gnu
14096 (cd gnu
14097 TEST_TAR_FORMAT=gnu
14098 export TEST_TAR_FORMAT
14099 TAR_OPTIONS=\"-H gnu\"
14100 export TAR_OPTIONS
14101 rm -rf *
14102
14103 mkdir directory
14104 tar -cPvf archive directory/../directory
14105 echo separator
14106 tar -xPvf archive --warning=no-timestamp)"
14107 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
14108 ( $at_check_trace;
14109 mkdir gnu
14110 (cd gnu
14111 TEST_TAR_FORMAT=gnu
14112 export TEST_TAR_FORMAT
14113 TAR_OPTIONS="-H gnu"
14114 export TAR_OPTIONS
14115 rm -rf *
14116
14117 mkdir directory
14118 tar -cPvf archive directory/../directory
14119 echo separator
14120 tar -xPvf archive --warning=no-timestamp)
14121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14122 at_status=$? at_failed=false
14123 $at_check_filter
14124 at_fn_diff_devnull "$at_stderr" || at_failed=:
14125 echo >>"$at_stdout"; $as_echo "directory/../directory/
14126 separator
14127 directory/../directory/
14128 " | \
14129   $at_diff - "$at_stdout" || at_failed=:
14130 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14131 $at_failed && at_fn_log_failure
14132 $at_traceon; }
14133
14134
14135
14136
14137   set +x
14138   $at_times_p && times >"$at_times_file"
14139 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14140 read at_status <"$at_status_file"
14141 #AT_STOP_57
14142 #AT_START_58
14143 at_fn_group_banner 58 'extrac04.at:23' \
14144   "extract + fnmatch" "                              " 9
14145 at_xfail=no
14146       test -f $XFAILFILE && at_xfail=yes
14147 (
14148   $as_echo "58. $at_setup_line: testing $at_desc ..."
14149   $at_traceon
14150
14151
14152
14153
14154
14155   { set +x
14156 $as_echo "$at_srcdir/extrac04.at:26:
14157 mkdir v7
14158 (cd v7
14159 TEST_TAR_FORMAT=v7
14160 export TEST_TAR_FORMAT
14161 TAR_OPTIONS=\"-H v7\"
14162 export TAR_OPTIONS
14163 rm -rf *
14164
14165
14166 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14167
14168 touch file1
14169 mkdir directory
14170 mkdir directory/subdirectory
14171 touch directory/file1
14172 touch directory/file2
14173 touch directory/subdirectory/file1
14174 touch directory/subdirectory/file2
14175 tar -cf archive ./file1 directory
14176 tar -tf archive \\
14177   --exclude='./*1' \\
14178   --exclude='d*/*1' \\
14179   --exclude='d*/s*/*2' | sort
14180 )"
14181 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14182 ( $at_check_trace;
14183 mkdir v7
14184 (cd v7
14185 TEST_TAR_FORMAT=v7
14186 export TEST_TAR_FORMAT
14187 TAR_OPTIONS="-H v7"
14188 export TAR_OPTIONS
14189 rm -rf *
14190
14191
14192 test -z "`sort < /dev/null 2>&1`" || exit 77
14193
14194 touch file1
14195 mkdir directory
14196 mkdir directory/subdirectory
14197 touch directory/file1
14198 touch directory/file2
14199 touch directory/subdirectory/file1
14200 touch directory/subdirectory/file2
14201 tar -cf archive ./file1 directory
14202 tar -tf archive \
14203   --exclude='./*1' \
14204   --exclude='d*/*1' \
14205   --exclude='d*/s*/*2' | sort
14206 )
14207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14208 at_status=$? at_failed=false
14209 $at_check_filter
14210 at_fn_diff_devnull "$at_stderr" || at_failed=:
14211 echo >>"$at_stdout"; $as_echo "directory/
14212 directory/file2
14213 directory/subdirectory/
14214 " | \
14215   $at_diff - "$at_stdout" || at_failed=:
14216 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14217 $at_failed && at_fn_log_failure
14218 $at_traceon; }
14219
14220               { set +x
14221 $as_echo "$at_srcdir/extrac04.at:26:
14222 mkdir oldgnu
14223 (cd oldgnu
14224 TEST_TAR_FORMAT=oldgnu
14225 export TEST_TAR_FORMAT
14226 TAR_OPTIONS=\"-H oldgnu\"
14227 export TAR_OPTIONS
14228 rm -rf *
14229
14230
14231 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14232
14233 touch file1
14234 mkdir directory
14235 mkdir directory/subdirectory
14236 touch directory/file1
14237 touch directory/file2
14238 touch directory/subdirectory/file1
14239 touch directory/subdirectory/file2
14240 tar -cf archive ./file1 directory
14241 tar -tf archive \\
14242   --exclude='./*1' \\
14243   --exclude='d*/*1' \\
14244   --exclude='d*/s*/*2' | sort
14245 )"
14246 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14247 ( $at_check_trace;
14248 mkdir oldgnu
14249 (cd oldgnu
14250 TEST_TAR_FORMAT=oldgnu
14251 export TEST_TAR_FORMAT
14252 TAR_OPTIONS="-H oldgnu"
14253 export TAR_OPTIONS
14254 rm -rf *
14255
14256
14257 test -z "`sort < /dev/null 2>&1`" || exit 77
14258
14259 touch file1
14260 mkdir directory
14261 mkdir directory/subdirectory
14262 touch directory/file1
14263 touch directory/file2
14264 touch directory/subdirectory/file1
14265 touch directory/subdirectory/file2
14266 tar -cf archive ./file1 directory
14267 tar -tf archive \
14268   --exclude='./*1' \
14269   --exclude='d*/*1' \
14270   --exclude='d*/s*/*2' | sort
14271 )
14272 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14273 at_status=$? at_failed=false
14274 $at_check_filter
14275 at_fn_diff_devnull "$at_stderr" || at_failed=:
14276 echo >>"$at_stdout"; $as_echo "directory/
14277 directory/file2
14278 directory/subdirectory/
14279 " | \
14280   $at_diff - "$at_stdout" || at_failed=:
14281 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14282 $at_failed && at_fn_log_failure
14283 $at_traceon; }
14284
14285               { set +x
14286 $as_echo "$at_srcdir/extrac04.at:26:
14287 mkdir ustar
14288 (cd ustar
14289 TEST_TAR_FORMAT=ustar
14290 export TEST_TAR_FORMAT
14291 TAR_OPTIONS=\"-H ustar\"
14292 export TAR_OPTIONS
14293 rm -rf *
14294
14295
14296 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14297
14298 touch file1
14299 mkdir directory
14300 mkdir directory/subdirectory
14301 touch directory/file1
14302 touch directory/file2
14303 touch directory/subdirectory/file1
14304 touch directory/subdirectory/file2
14305 tar -cf archive ./file1 directory
14306 tar -tf archive \\
14307   --exclude='./*1' \\
14308   --exclude='d*/*1' \\
14309   --exclude='d*/s*/*2' | sort
14310 )"
14311 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14312 ( $at_check_trace;
14313 mkdir ustar
14314 (cd ustar
14315 TEST_TAR_FORMAT=ustar
14316 export TEST_TAR_FORMAT
14317 TAR_OPTIONS="-H ustar"
14318 export TAR_OPTIONS
14319 rm -rf *
14320
14321
14322 test -z "`sort < /dev/null 2>&1`" || exit 77
14323
14324 touch file1
14325 mkdir directory
14326 mkdir directory/subdirectory
14327 touch directory/file1
14328 touch directory/file2
14329 touch directory/subdirectory/file1
14330 touch directory/subdirectory/file2
14331 tar -cf archive ./file1 directory
14332 tar -tf archive \
14333   --exclude='./*1' \
14334   --exclude='d*/*1' \
14335   --exclude='d*/s*/*2' | sort
14336 )
14337 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14338 at_status=$? at_failed=false
14339 $at_check_filter
14340 at_fn_diff_devnull "$at_stderr" || at_failed=:
14341 echo >>"$at_stdout"; $as_echo "directory/
14342 directory/file2
14343 directory/subdirectory/
14344 " | \
14345   $at_diff - "$at_stdout" || at_failed=:
14346 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14347 $at_failed && at_fn_log_failure
14348 $at_traceon; }
14349
14350               { set +x
14351 $as_echo "$at_srcdir/extrac04.at:26:
14352 mkdir posix
14353 (cd posix
14354 TEST_TAR_FORMAT=posix
14355 export TEST_TAR_FORMAT
14356 TAR_OPTIONS=\"-H posix\"
14357 export TAR_OPTIONS
14358 rm -rf *
14359
14360
14361 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14362
14363 touch file1
14364 mkdir directory
14365 mkdir directory/subdirectory
14366 touch directory/file1
14367 touch directory/file2
14368 touch directory/subdirectory/file1
14369 touch directory/subdirectory/file2
14370 tar -cf archive ./file1 directory
14371 tar -tf archive \\
14372   --exclude='./*1' \\
14373   --exclude='d*/*1' \\
14374   --exclude='d*/s*/*2' | sort
14375 )"
14376 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14377 ( $at_check_trace;
14378 mkdir posix
14379 (cd posix
14380 TEST_TAR_FORMAT=posix
14381 export TEST_TAR_FORMAT
14382 TAR_OPTIONS="-H posix"
14383 export TAR_OPTIONS
14384 rm -rf *
14385
14386
14387 test -z "`sort < /dev/null 2>&1`" || exit 77
14388
14389 touch file1
14390 mkdir directory
14391 mkdir directory/subdirectory
14392 touch directory/file1
14393 touch directory/file2
14394 touch directory/subdirectory/file1
14395 touch directory/subdirectory/file2
14396 tar -cf archive ./file1 directory
14397 tar -tf archive \
14398   --exclude='./*1' \
14399   --exclude='d*/*1' \
14400   --exclude='d*/s*/*2' | sort
14401 )
14402 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14403 at_status=$? at_failed=false
14404 $at_check_filter
14405 at_fn_diff_devnull "$at_stderr" || at_failed=:
14406 echo >>"$at_stdout"; $as_echo "directory/
14407 directory/file2
14408 directory/subdirectory/
14409 " | \
14410   $at_diff - "$at_stdout" || at_failed=:
14411 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14412 $at_failed && at_fn_log_failure
14413 $at_traceon; }
14414
14415               { set +x
14416 $as_echo "$at_srcdir/extrac04.at:26:
14417 mkdir gnu
14418 (cd gnu
14419 TEST_TAR_FORMAT=gnu
14420 export TEST_TAR_FORMAT
14421 TAR_OPTIONS=\"-H gnu\"
14422 export TAR_OPTIONS
14423 rm -rf *
14424
14425
14426 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14427
14428 touch file1
14429 mkdir directory
14430 mkdir directory/subdirectory
14431 touch directory/file1
14432 touch directory/file2
14433 touch directory/subdirectory/file1
14434 touch directory/subdirectory/file2
14435 tar -cf archive ./file1 directory
14436 tar -tf archive \\
14437   --exclude='./*1' \\
14438   --exclude='d*/*1' \\
14439   --exclude='d*/s*/*2' | sort
14440 )"
14441 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14442 ( $at_check_trace;
14443 mkdir gnu
14444 (cd gnu
14445 TEST_TAR_FORMAT=gnu
14446 export TEST_TAR_FORMAT
14447 TAR_OPTIONS="-H gnu"
14448 export TAR_OPTIONS
14449 rm -rf *
14450
14451
14452 test -z "`sort < /dev/null 2>&1`" || exit 77
14453
14454 touch file1
14455 mkdir directory
14456 mkdir directory/subdirectory
14457 touch directory/file1
14458 touch directory/file2
14459 touch directory/subdirectory/file1
14460 touch directory/subdirectory/file2
14461 tar -cf archive ./file1 directory
14462 tar -tf archive \
14463   --exclude='./*1' \
14464   --exclude='d*/*1' \
14465   --exclude='d*/s*/*2' | sort
14466 )
14467 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14468 at_status=$? at_failed=false
14469 $at_check_filter
14470 at_fn_diff_devnull "$at_stderr" || at_failed=:
14471 echo >>"$at_stdout"; $as_echo "directory/
14472 directory/file2
14473 directory/subdirectory/
14474 " | \
14475   $at_diff - "$at_stdout" || at_failed=:
14476 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14477 $at_failed && at_fn_log_failure
14478 $at_traceon; }
14479
14480
14481
14482
14483   set +x
14484   $at_times_p && times >"$at_times_file"
14485 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14486 read at_status <"$at_status_file"
14487 #AT_STOP_58
14488 #AT_START_59
14489 at_fn_group_banner 59 'extrac05.at:30' \
14490   "extracting selected members from pax" "           " 9
14491 at_xfail=no
14492       test -f $XFAILFILE && at_xfail=yes
14493 (
14494   $as_echo "59. $at_setup_line: testing $at_desc ..."
14495   $at_traceon
14496
14497
14498
14499 cat >list <<'_ATEOF'
14500 jeden
14501 cztery
14502 _ATEOF
14503
14504
14505
14506
14507   { set +x
14508 $as_echo "$at_srcdir/extrac05.at:38:
14509 mkdir posix
14510 (cd posix
14511 TEST_TAR_FORMAT=posix
14512 export TEST_TAR_FORMAT
14513 TAR_OPTIONS=\"-H posix\"
14514 export TAR_OPTIONS
14515 rm -rf *
14516
14517 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
14518 genfile --length 118 --file jeden
14519 genfile --length 223 --file dwa
14520 genfile --length 517 --file trzy
14521 genfile --length 110 --file cztery
14522
14523 tar cf archive jeden dwa trzy cztery || exit 1
14524
14525 mkdir dir
14526 cd dir
14527
14528 tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
14529
14530 cd ..
14531 )"
14532 at_fn_check_prepare_notrace 'an embedded newline' "extrac05.at:38"
14533 ( $at_check_trace;
14534 mkdir posix
14535 (cd posix
14536 TEST_TAR_FORMAT=posix
14537 export TEST_TAR_FORMAT
14538 TAR_OPTIONS="-H posix"
14539 export TAR_OPTIONS
14540 rm -rf *
14541
14542 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
14543 genfile --length 118 --file jeden
14544 genfile --length 223 --file dwa
14545 genfile --length 517 --file trzy
14546 genfile --length 110 --file cztery
14547
14548 tar cf archive jeden dwa trzy cztery || exit 1
14549
14550 mkdir dir
14551 cd dir
14552
14553 tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
14554
14555 cd ..
14556 )
14557 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14558 at_status=$? at_failed=false
14559 $at_check_filter
14560 at_fn_diff_devnull "$at_stderr" || at_failed=:
14561 echo >>"$at_stdout"; $as_echo "jeden
14562 cztery
14563 " | \
14564   $at_diff - "$at_stdout" || at_failed=:
14565 at_fn_check_status 0 $at_status "$at_srcdir/extrac05.at:38"
14566 $at_failed && at_fn_log_failure
14567 $at_traceon; }
14568
14569
14570
14571
14572   set +x
14573   $at_times_p && times >"$at_times_file"
14574 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14575 read at_status <"$at_status_file"
14576 #AT_STOP_59
14577 #AT_START_60
14578 at_fn_group_banner 60 'extrac06.at:34' \
14579   "mode of extracted directories" "                  " 9
14580 at_xfail=no
14581       test -f $XFAILFILE && at_xfail=yes
14582 (
14583   $as_echo "60. $at_setup_line: testing $at_desc ..."
14584   $at_traceon
14585
14586
14587
14588
14589
14590   { set +x
14591 $as_echo "$at_srcdir/extrac06.at:37:
14592 mkdir v7
14593 (cd v7
14594 TEST_TAR_FORMAT=v7
14595 export TEST_TAR_FORMAT
14596 TAR_OPTIONS=\"-H v7\"
14597 export TAR_OPTIONS
14598 rm -rf *
14599
14600
14601 # Force umask
14602 umask 022
14603
14604 # Make sure user's umask is honored, even if we are superuser
14605 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
14606
14607 # Create a directory
14608 mkdir directory
14609 chmod 777 directory
14610 genfile --stat=mode:777 directory
14611
14612 # Archive it
14613 tar cf arc directory
14614
14615 # Change its permissions ...
14616 chmod 755 directory
14617 genfile --stat=mode:777 directory
14618
14619 # ... and attempt to restore it twice
14620 tar xf arc directory --warning=no-timestamp
14621 genfile --stat=mode:777 directory
14622
14623 tar xf arc directory --warning=no-timestamp
14624 genfile --stat=mode:777 directory
14625
14626 # After both restores, the directory mode should be 755
14627 )"
14628 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
14629 ( $at_check_trace;
14630 mkdir v7
14631 (cd v7
14632 TEST_TAR_FORMAT=v7
14633 export TEST_TAR_FORMAT
14634 TAR_OPTIONS="-H v7"
14635 export TAR_OPTIONS
14636 rm -rf *
14637
14638
14639 # Force umask
14640 umask 022
14641
14642 # Make sure user's umask is honored, even if we are superuser
14643 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
14644
14645 # Create a directory
14646 mkdir directory
14647 chmod 777 directory
14648 genfile --stat=mode:777 directory
14649
14650 # Archive it
14651 tar cf arc directory
14652
14653 # Change its permissions ...
14654 chmod 755 directory
14655 genfile --stat=mode:777 directory
14656
14657 # ... and attempt to restore it twice
14658 tar xf arc directory --warning=no-timestamp
14659 genfile --stat=mode:777 directory
14660
14661 tar xf arc directory --warning=no-timestamp
14662 genfile --stat=mode:777 directory
14663
14664 # After both restores, the directory mode should be 755
14665 )
14666 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14667 at_status=$? at_failed=false
14668 $at_check_filter
14669 at_fn_diff_devnull "$at_stderr" || at_failed=:
14670 echo >>"$at_stdout"; $as_echo "777
14671 755
14672 755
14673 755
14674 " | \
14675   $at_diff - "$at_stdout" || at_failed=:
14676 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
14677 $at_failed && at_fn_log_failure
14678 $at_traceon; }
14679
14680               { set +x
14681 $as_echo "$at_srcdir/extrac06.at:37:
14682 mkdir oldgnu
14683 (cd oldgnu
14684 TEST_TAR_FORMAT=oldgnu
14685 export TEST_TAR_FORMAT
14686 TAR_OPTIONS=\"-H oldgnu\"
14687 export TAR_OPTIONS
14688 rm -rf *
14689
14690
14691 # Force umask
14692 umask 022
14693
14694 # Make sure user's umask is honored, even if we are superuser
14695 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
14696
14697 # Create a directory
14698 mkdir directory
14699 chmod 777 directory
14700 genfile --stat=mode:777 directory
14701
14702 # Archive it
14703 tar cf arc directory
14704
14705 # Change its permissions ...
14706 chmod 755 directory
14707 genfile --stat=mode:777 directory
14708
14709 # ... and attempt to restore it twice
14710 tar xf arc directory --warning=no-timestamp
14711 genfile --stat=mode:777 directory
14712
14713 tar xf arc directory --warning=no-timestamp
14714 genfile --stat=mode:777 directory
14715
14716 # After both restores, the directory mode should be 755
14717 )"
14718 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
14719 ( $at_check_trace;
14720 mkdir oldgnu
14721 (cd oldgnu
14722 TEST_TAR_FORMAT=oldgnu
14723 export TEST_TAR_FORMAT
14724 TAR_OPTIONS="-H oldgnu"
14725 export TAR_OPTIONS
14726 rm -rf *
14727
14728
14729 # Force umask
14730 umask 022
14731
14732 # Make sure user's umask is honored, even if we are superuser
14733 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
14734
14735 # Create a directory
14736 mkdir directory
14737 chmod 777 directory
14738 genfile --stat=mode:777 directory
14739
14740 # Archive it
14741 tar cf arc directory
14742
14743 # Change its permissions ...
14744 chmod 755 directory
14745 genfile --stat=mode:777 directory
14746
14747 # ... and attempt to restore it twice
14748 tar xf arc directory --warning=no-timestamp
14749 genfile --stat=mode:777 directory
14750
14751 tar xf arc directory --warning=no-timestamp
14752 genfile --stat=mode:777 directory
14753
14754 # After both restores, the directory mode should be 755
14755 )
14756 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14757 at_status=$? at_failed=false
14758 $at_check_filter
14759 at_fn_diff_devnull "$at_stderr" || at_failed=:
14760 echo >>"$at_stdout"; $as_echo "777
14761 755
14762 755
14763 755
14764 " | \
14765   $at_diff - "$at_stdout" || at_failed=:
14766 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
14767 $at_failed && at_fn_log_failure
14768 $at_traceon; }
14769
14770               { set +x
14771 $as_echo "$at_srcdir/extrac06.at:37:
14772 mkdir ustar
14773 (cd ustar
14774 TEST_TAR_FORMAT=ustar
14775 export TEST_TAR_FORMAT
14776 TAR_OPTIONS=\"-H ustar\"
14777 export TAR_OPTIONS
14778 rm -rf *
14779
14780
14781 # Force umask
14782 umask 022
14783
14784 # Make sure user's umask is honored, even if we are superuser
14785 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
14786
14787 # Create a directory
14788 mkdir directory
14789 chmod 777 directory
14790 genfile --stat=mode:777 directory
14791
14792 # Archive it
14793 tar cf arc directory
14794
14795 # Change its permissions ...
14796 chmod 755 directory
14797 genfile --stat=mode:777 directory
14798
14799 # ... and attempt to restore it twice
14800 tar xf arc directory --warning=no-timestamp
14801 genfile --stat=mode:777 directory
14802
14803 tar xf arc directory --warning=no-timestamp
14804 genfile --stat=mode:777 directory
14805
14806 # After both restores, the directory mode should be 755
14807 )"
14808 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
14809 ( $at_check_trace;
14810 mkdir ustar
14811 (cd ustar
14812 TEST_TAR_FORMAT=ustar
14813 export TEST_TAR_FORMAT
14814 TAR_OPTIONS="-H ustar"
14815 export TAR_OPTIONS
14816 rm -rf *
14817
14818
14819 # Force umask
14820 umask 022
14821
14822 # Make sure user's umask is honored, even if we are superuser
14823 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
14824
14825 # Create a directory
14826 mkdir directory
14827 chmod 777 directory
14828 genfile --stat=mode:777 directory
14829
14830 # Archive it
14831 tar cf arc directory
14832
14833 # Change its permissions ...
14834 chmod 755 directory
14835 genfile --stat=mode:777 directory
14836
14837 # ... and attempt to restore it twice
14838 tar xf arc directory --warning=no-timestamp
14839 genfile --stat=mode:777 directory
14840
14841 tar xf arc directory --warning=no-timestamp
14842 genfile --stat=mode:777 directory
14843
14844 # After both restores, the directory mode should be 755
14845 )
14846 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14847 at_status=$? at_failed=false
14848 $at_check_filter
14849 at_fn_diff_devnull "$at_stderr" || at_failed=:
14850 echo >>"$at_stdout"; $as_echo "777
14851 755
14852 755
14853 755
14854 " | \
14855   $at_diff - "$at_stdout" || at_failed=:
14856 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
14857 $at_failed && at_fn_log_failure
14858 $at_traceon; }
14859
14860               { set +x
14861 $as_echo "$at_srcdir/extrac06.at:37:
14862 mkdir posix
14863 (cd posix
14864 TEST_TAR_FORMAT=posix
14865 export TEST_TAR_FORMAT
14866 TAR_OPTIONS=\"-H posix\"
14867 export TAR_OPTIONS
14868 rm -rf *
14869
14870
14871 # Force umask
14872 umask 022
14873
14874 # Make sure user's umask is honored, even if we are superuser
14875 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
14876
14877 # Create a directory
14878 mkdir directory
14879 chmod 777 directory
14880 genfile --stat=mode:777 directory
14881
14882 # Archive it
14883 tar cf arc directory
14884
14885 # Change its permissions ...
14886 chmod 755 directory
14887 genfile --stat=mode:777 directory
14888
14889 # ... and attempt to restore it twice
14890 tar xf arc directory --warning=no-timestamp
14891 genfile --stat=mode:777 directory
14892
14893 tar xf arc directory --warning=no-timestamp
14894 genfile --stat=mode:777 directory
14895
14896 # After both restores, the directory mode should be 755
14897 )"
14898 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
14899 ( $at_check_trace;
14900 mkdir posix
14901 (cd posix
14902 TEST_TAR_FORMAT=posix
14903 export TEST_TAR_FORMAT
14904 TAR_OPTIONS="-H posix"
14905 export TAR_OPTIONS
14906 rm -rf *
14907
14908
14909 # Force umask
14910 umask 022
14911
14912 # Make sure user's umask is honored, even if we are superuser
14913 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
14914
14915 # Create a directory
14916 mkdir directory
14917 chmod 777 directory
14918 genfile --stat=mode:777 directory
14919
14920 # Archive it
14921 tar cf arc directory
14922
14923 # Change its permissions ...
14924 chmod 755 directory
14925 genfile --stat=mode:777 directory
14926
14927 # ... and attempt to restore it twice
14928 tar xf arc directory --warning=no-timestamp
14929 genfile --stat=mode:777 directory
14930
14931 tar xf arc directory --warning=no-timestamp
14932 genfile --stat=mode:777 directory
14933
14934 # After both restores, the directory mode should be 755
14935 )
14936 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14937 at_status=$? at_failed=false
14938 $at_check_filter
14939 at_fn_diff_devnull "$at_stderr" || at_failed=:
14940 echo >>"$at_stdout"; $as_echo "777
14941 755
14942 755
14943 755
14944 " | \
14945   $at_diff - "$at_stdout" || at_failed=:
14946 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
14947 $at_failed && at_fn_log_failure
14948 $at_traceon; }
14949
14950               { set +x
14951 $as_echo "$at_srcdir/extrac06.at:37:
14952 mkdir gnu
14953 (cd gnu
14954 TEST_TAR_FORMAT=gnu
14955 export TEST_TAR_FORMAT
14956 TAR_OPTIONS=\"-H gnu\"
14957 export TAR_OPTIONS
14958 rm -rf *
14959
14960
14961 # Force umask
14962 umask 022
14963
14964 # Make sure user's umask is honored, even if we are superuser
14965 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
14966
14967 # Create a directory
14968 mkdir directory
14969 chmod 777 directory
14970 genfile --stat=mode:777 directory
14971
14972 # Archive it
14973 tar cf arc directory
14974
14975 # Change its permissions ...
14976 chmod 755 directory
14977 genfile --stat=mode:777 directory
14978
14979 # ... and attempt to restore it twice
14980 tar xf arc directory --warning=no-timestamp
14981 genfile --stat=mode:777 directory
14982
14983 tar xf arc directory --warning=no-timestamp
14984 genfile --stat=mode:777 directory
14985
14986 # After both restores, the directory mode should be 755
14987 )"
14988 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
14989 ( $at_check_trace;
14990 mkdir gnu
14991 (cd gnu
14992 TEST_TAR_FORMAT=gnu
14993 export TEST_TAR_FORMAT
14994 TAR_OPTIONS="-H gnu"
14995 export TAR_OPTIONS
14996 rm -rf *
14997
14998
14999 # Force umask
15000 umask 022
15001
15002 # Make sure user's umask is honored, even if we are superuser
15003 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
15004
15005 # Create a directory
15006 mkdir directory
15007 chmod 777 directory
15008 genfile --stat=mode:777 directory
15009
15010 # Archive it
15011 tar cf arc directory
15012
15013 # Change its permissions ...
15014 chmod 755 directory
15015 genfile --stat=mode:777 directory
15016
15017 # ... and attempt to restore it twice
15018 tar xf arc directory --warning=no-timestamp
15019 genfile --stat=mode:777 directory
15020
15021 tar xf arc directory --warning=no-timestamp
15022 genfile --stat=mode:777 directory
15023
15024 # After both restores, the directory mode should be 755
15025 )
15026 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15027 at_status=$? at_failed=false
15028 $at_check_filter
15029 at_fn_diff_devnull "$at_stderr" || at_failed=:
15030 echo >>"$at_stdout"; $as_echo "777
15031 755
15032 755
15033 755
15034 " | \
15035   $at_diff - "$at_stdout" || at_failed=:
15036 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
15037 $at_failed && at_fn_log_failure
15038 $at_traceon; }
15039
15040
15041
15042
15043   set +x
15044   $at_times_p && times >"$at_times_file"
15045 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15046 read at_status <"$at_status_file"
15047 #AT_STOP_60
15048 #AT_START_61
15049 at_fn_group_banner 61 'extrac07.at:27' \
15050   "extracting symlinks to a read-only dir" "         " 9
15051 at_xfail=no
15052       test -f $XFAILFILE && at_xfail=yes
15053 (
15054   $as_echo "61. $at_setup_line: testing $at_desc ..."
15055   $at_traceon
15056
15057
15058
15059
15060
15061   { set +x
15062 $as_echo "$at_srcdir/extrac07.at:30:
15063 mkdir ustar
15064 (cd ustar
15065 TEST_TAR_FORMAT=ustar
15066 export TEST_TAR_FORMAT
15067 TAR_OPTIONS=\"-H ustar\"
15068 export TAR_OPTIONS
15069 rm -rf *
15070
15071
15072 echo \"test\" > \$\$
15073 chmod 0 \$\$
15074 cat \$\$ > /dev/null 2>&1
15075 result=\$?
15076 rm -f \$\$
15077 test \$result -eq 0 && exit 77
15078
15079
15080 echo Prepare the directory
15081 mkdir dir
15082 genfile -f foo
15083 cd dir
15084 ln -s ../foo .
15085 cd ..
15086 chmod a-w dir
15087
15088 echo Create the archive
15089 tar cf archive dir || exit 1
15090
15091 chmod +w dir
15092
15093 echo Extract
15094 mkdir out
15095 tar -C out -xvf archive
15096 )"
15097 at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30"
15098 ( $at_check_trace;
15099 mkdir ustar
15100 (cd ustar
15101 TEST_TAR_FORMAT=ustar
15102 export TEST_TAR_FORMAT
15103 TAR_OPTIONS="-H ustar"
15104 export TAR_OPTIONS
15105 rm -rf *
15106
15107
15108 echo "test" > $$
15109 chmod 0 $$
15110 cat $$ > /dev/null 2>&1
15111 result=$?
15112 rm -f $$
15113 test $result -eq 0 && exit 77
15114
15115
15116 echo Prepare the directory
15117 mkdir dir
15118 genfile -f foo
15119 cd dir
15120 ln -s ../foo .
15121 cd ..
15122 chmod a-w dir
15123
15124 echo Create the archive
15125 tar cf archive dir || exit 1
15126
15127 chmod +w dir
15128
15129 echo Extract
15130 mkdir out
15131 tar -C out -xvf archive
15132 )
15133 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15134 at_status=$? at_failed=false
15135 $at_check_filter
15136 at_fn_diff_devnull "$at_stderr" || at_failed=:
15137 echo >>"$at_stdout"; $as_echo "Prepare the directory
15138 Create the archive
15139 Extract
15140 dir/
15141 dir/foo
15142 " | \
15143   $at_diff - "$at_stdout" || at_failed=:
15144 at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30"
15145 $at_failed && at_fn_log_failure
15146 $at_traceon; }
15147
15148
15149  # Testing one format is enough
15150
15151   set +x
15152   $at_times_p && times >"$at_times_file"
15153 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15154 read at_status <"$at_status_file"
15155 #AT_STOP_61
15156 #AT_START_62
15157 at_fn_group_banner 62 'extrac08.at:33' \
15158   "restoring mode on existing directory" "           " 9
15159 at_xfail=no
15160       test -f $XFAILFILE && at_xfail=yes
15161 (
15162   $as_echo "62. $at_setup_line: testing $at_desc ..."
15163   $at_traceon
15164
15165
15166
15167
15168
15169   { set +x
15170 $as_echo "$at_srcdir/extrac08.at:36:
15171 mkdir v7
15172 (cd v7
15173 TEST_TAR_FORMAT=v7
15174 export TEST_TAR_FORMAT
15175 TAR_OPTIONS=\"-H v7\"
15176 export TAR_OPTIONS
15177 rm -rf *
15178
15179 umask 000
15180 mkdir dir
15181 chmod 755 dir
15182 echo bla > dir/file
15183 tar cf test.tar dir
15184 chmod 700 dir
15185 tar xfv test.tar --warning=no-timestamp
15186 genfile --stat=mode.777 dir
15187 )"
15188 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15189 ( $at_check_trace;
15190 mkdir v7
15191 (cd v7
15192 TEST_TAR_FORMAT=v7
15193 export TEST_TAR_FORMAT
15194 TAR_OPTIONS="-H v7"
15195 export TAR_OPTIONS
15196 rm -rf *
15197
15198 umask 000
15199 mkdir dir
15200 chmod 755 dir
15201 echo bla > dir/file
15202 tar cf test.tar dir
15203 chmod 700 dir
15204 tar xfv test.tar --warning=no-timestamp
15205 genfile --stat=mode.777 dir
15206 )
15207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15208 at_status=$? at_failed=false
15209 $at_check_filter
15210 at_fn_diff_devnull "$at_stderr" || at_failed=:
15211 echo >>"$at_stdout"; $as_echo "dir/
15212 dir/file
15213 755
15214 " | \
15215   $at_diff - "$at_stdout" || at_failed=:
15216 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15217 $at_failed && at_fn_log_failure
15218 $at_traceon; }
15219
15220               { set +x
15221 $as_echo "$at_srcdir/extrac08.at:36:
15222 mkdir oldgnu
15223 (cd oldgnu
15224 TEST_TAR_FORMAT=oldgnu
15225 export TEST_TAR_FORMAT
15226 TAR_OPTIONS=\"-H oldgnu\"
15227 export TAR_OPTIONS
15228 rm -rf *
15229
15230 umask 000
15231 mkdir dir
15232 chmod 755 dir
15233 echo bla > dir/file
15234 tar cf test.tar dir
15235 chmod 700 dir
15236 tar xfv test.tar --warning=no-timestamp
15237 genfile --stat=mode.777 dir
15238 )"
15239 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15240 ( $at_check_trace;
15241 mkdir oldgnu
15242 (cd oldgnu
15243 TEST_TAR_FORMAT=oldgnu
15244 export TEST_TAR_FORMAT
15245 TAR_OPTIONS="-H oldgnu"
15246 export TAR_OPTIONS
15247 rm -rf *
15248
15249 umask 000
15250 mkdir dir
15251 chmod 755 dir
15252 echo bla > dir/file
15253 tar cf test.tar dir
15254 chmod 700 dir
15255 tar xfv test.tar --warning=no-timestamp
15256 genfile --stat=mode.777 dir
15257 )
15258 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15259 at_status=$? at_failed=false
15260 $at_check_filter
15261 at_fn_diff_devnull "$at_stderr" || at_failed=:
15262 echo >>"$at_stdout"; $as_echo "dir/
15263 dir/file
15264 755
15265 " | \
15266   $at_diff - "$at_stdout" || at_failed=:
15267 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15268 $at_failed && at_fn_log_failure
15269 $at_traceon; }
15270
15271               { set +x
15272 $as_echo "$at_srcdir/extrac08.at:36:
15273 mkdir ustar
15274 (cd ustar
15275 TEST_TAR_FORMAT=ustar
15276 export TEST_TAR_FORMAT
15277 TAR_OPTIONS=\"-H ustar\"
15278 export TAR_OPTIONS
15279 rm -rf *
15280
15281 umask 000
15282 mkdir dir
15283 chmod 755 dir
15284 echo bla > dir/file
15285 tar cf test.tar dir
15286 chmod 700 dir
15287 tar xfv test.tar --warning=no-timestamp
15288 genfile --stat=mode.777 dir
15289 )"
15290 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15291 ( $at_check_trace;
15292 mkdir ustar
15293 (cd ustar
15294 TEST_TAR_FORMAT=ustar
15295 export TEST_TAR_FORMAT
15296 TAR_OPTIONS="-H ustar"
15297 export TAR_OPTIONS
15298 rm -rf *
15299
15300 umask 000
15301 mkdir dir
15302 chmod 755 dir
15303 echo bla > dir/file
15304 tar cf test.tar dir
15305 chmod 700 dir
15306 tar xfv test.tar --warning=no-timestamp
15307 genfile --stat=mode.777 dir
15308 )
15309 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15310 at_status=$? at_failed=false
15311 $at_check_filter
15312 at_fn_diff_devnull "$at_stderr" || at_failed=:
15313 echo >>"$at_stdout"; $as_echo "dir/
15314 dir/file
15315 755
15316 " | \
15317   $at_diff - "$at_stdout" || at_failed=:
15318 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15319 $at_failed && at_fn_log_failure
15320 $at_traceon; }
15321
15322               { set +x
15323 $as_echo "$at_srcdir/extrac08.at:36:
15324 mkdir posix
15325 (cd posix
15326 TEST_TAR_FORMAT=posix
15327 export TEST_TAR_FORMAT
15328 TAR_OPTIONS=\"-H posix\"
15329 export TAR_OPTIONS
15330 rm -rf *
15331
15332 umask 000
15333 mkdir dir
15334 chmod 755 dir
15335 echo bla > dir/file
15336 tar cf test.tar dir
15337 chmod 700 dir
15338 tar xfv test.tar --warning=no-timestamp
15339 genfile --stat=mode.777 dir
15340 )"
15341 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15342 ( $at_check_trace;
15343 mkdir posix
15344 (cd posix
15345 TEST_TAR_FORMAT=posix
15346 export TEST_TAR_FORMAT
15347 TAR_OPTIONS="-H posix"
15348 export TAR_OPTIONS
15349 rm -rf *
15350
15351 umask 000
15352 mkdir dir
15353 chmod 755 dir
15354 echo bla > dir/file
15355 tar cf test.tar dir
15356 chmod 700 dir
15357 tar xfv test.tar --warning=no-timestamp
15358 genfile --stat=mode.777 dir
15359 )
15360 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15361 at_status=$? at_failed=false
15362 $at_check_filter
15363 at_fn_diff_devnull "$at_stderr" || at_failed=:
15364 echo >>"$at_stdout"; $as_echo "dir/
15365 dir/file
15366 755
15367 " | \
15368   $at_diff - "$at_stdout" || at_failed=:
15369 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15370 $at_failed && at_fn_log_failure
15371 $at_traceon; }
15372
15373               { set +x
15374 $as_echo "$at_srcdir/extrac08.at:36:
15375 mkdir gnu
15376 (cd gnu
15377 TEST_TAR_FORMAT=gnu
15378 export TEST_TAR_FORMAT
15379 TAR_OPTIONS=\"-H gnu\"
15380 export TAR_OPTIONS
15381 rm -rf *
15382
15383 umask 000
15384 mkdir dir
15385 chmod 755 dir
15386 echo bla > dir/file
15387 tar cf test.tar dir
15388 chmod 700 dir
15389 tar xfv test.tar --warning=no-timestamp
15390 genfile --stat=mode.777 dir
15391 )"
15392 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15393 ( $at_check_trace;
15394 mkdir gnu
15395 (cd gnu
15396 TEST_TAR_FORMAT=gnu
15397 export TEST_TAR_FORMAT
15398 TAR_OPTIONS="-H gnu"
15399 export TAR_OPTIONS
15400 rm -rf *
15401
15402 umask 000
15403 mkdir dir
15404 chmod 755 dir
15405 echo bla > dir/file
15406 tar cf test.tar dir
15407 chmod 700 dir
15408 tar xfv test.tar --warning=no-timestamp
15409 genfile --stat=mode.777 dir
15410 )
15411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15412 at_status=$? at_failed=false
15413 $at_check_filter
15414 at_fn_diff_devnull "$at_stderr" || at_failed=:
15415 echo >>"$at_stdout"; $as_echo "dir/
15416 dir/file
15417 755
15418 " | \
15419   $at_diff - "$at_stdout" || at_failed=:
15420 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15421 $at_failed && at_fn_log_failure
15422 $at_traceon; }
15423
15424
15425
15426
15427   set +x
15428   $at_times_p && times >"$at_times_file"
15429 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15430 read at_status <"$at_status_file"
15431 #AT_STOP_62
15432 #AT_START_63
15433 at_fn_group_banner 63 'extrac09.at:24' \
15434   "no need to save dir with unreadable . and .." "   " 9
15435 at_xfail=no
15436       test -f $XFAILFILE && at_xfail=yes
15437 (
15438   $as_echo "63. $at_setup_line: testing $at_desc ..."
15439   $at_traceon
15440
15441
15442
15443
15444
15445   { set +x
15446 $as_echo "$at_srcdir/extrac09.at:27:
15447 mkdir gnu
15448 (cd gnu
15449 TEST_TAR_FORMAT=gnu
15450 export TEST_TAR_FORMAT
15451 TAR_OPTIONS=\"-H gnu\"
15452 export TAR_OPTIONS
15453 rm -rf *
15454
15455
15456 echo \"test\" > \$\$
15457 chmod 0 \$\$
15458 cat \$\$ > /dev/null 2>&1
15459 result=\$?
15460 rm -f \$\$
15461 test \$result -eq 0 && exit 77
15462
15463
15464 mkdir dir
15465 mkdir dir/sub
15466 mkdir dir/sub/extract
15467 genfile --file dir/sub/f
15468 cd dir/sub
15469
15470 tar -cf archive.tar f
15471
15472 chmod a-r . ..
15473 tar -xvf archive.tar -C extract f
15474 status=\$?
15475 chmod a+r . ..
15476 cmp f extract/f || status=\$?
15477 exit \$status
15478 )"
15479 at_fn_check_prepare_notrace 'an embedded newline' "extrac09.at:27"
15480 ( $at_check_trace;
15481 mkdir gnu
15482 (cd gnu
15483 TEST_TAR_FORMAT=gnu
15484 export TEST_TAR_FORMAT
15485 TAR_OPTIONS="-H gnu"
15486 export TAR_OPTIONS
15487 rm -rf *
15488
15489
15490 echo "test" > $$
15491 chmod 0 $$
15492 cat $$ > /dev/null 2>&1
15493 result=$?
15494 rm -f $$
15495 test $result -eq 0 && exit 77
15496
15497
15498 mkdir dir
15499 mkdir dir/sub
15500 mkdir dir/sub/extract
15501 genfile --file dir/sub/f
15502 cd dir/sub
15503
15504 tar -cf archive.tar f
15505
15506 chmod a-r . ..
15507 tar -xvf archive.tar -C extract f
15508 status=$?
15509 chmod a+r . ..
15510 cmp f extract/f || status=$?
15511 exit $status
15512 )
15513 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15514 at_status=$? at_failed=false
15515 $at_check_filter
15516 at_fn_diff_devnull "$at_stderr" || at_failed=:
15517 echo >>"$at_stdout"; $as_echo "f
15518 " | \
15519   $at_diff - "$at_stdout" || at_failed=:
15520 at_fn_check_status 0 $at_status "$at_srcdir/extrac09.at:27"
15521 $at_failed && at_fn_log_failure
15522 $at_traceon; }
15523
15524
15525
15526
15527   set +x
15528   $at_times_p && times >"$at_times_file"
15529 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15530 read at_status <"$at_status_file"
15531 #AT_STOP_63
15532 #AT_START_64
15533 at_fn_group_banner 64 'extrac10.at:29' \
15534   "-C and delayed setting of metadata" "             " 9
15535 at_xfail=no
15536       test -f $XFAILFILE && at_xfail=yes
15537 (
15538   $as_echo "64. $at_setup_line: testing $at_desc ..."
15539   $at_traceon
15540
15541
15542
15543
15544
15545   { set +x
15546 $as_echo "$at_srcdir/extrac10.at:32:
15547 mkdir gnu
15548 (cd gnu
15549 TEST_TAR_FORMAT=gnu
15550 export TEST_TAR_FORMAT
15551 TAR_OPTIONS=\"-H gnu\"
15552 export TAR_OPTIONS
15553 rm -rf *
15554
15555 mkdir d x x/y
15556 echo foo >d/d1
15557 echo bar >e
15558
15559 tar -cf archive.tar d e &&
15560 tar -xf archive.tar -C x d -C y e &&
15561 diff -r d x/d &&
15562 diff e x/y/e
15563 )"
15564 at_fn_check_prepare_notrace 'an embedded newline' "extrac10.at:32"
15565 ( $at_check_trace;
15566 mkdir gnu
15567 (cd gnu
15568 TEST_TAR_FORMAT=gnu
15569 export TEST_TAR_FORMAT
15570 TAR_OPTIONS="-H gnu"
15571 export TAR_OPTIONS
15572 rm -rf *
15573
15574 mkdir d x x/y
15575 echo foo >d/d1
15576 echo bar >e
15577
15578 tar -cf archive.tar d e &&
15579 tar -xf archive.tar -C x d -C y e &&
15580 diff -r d x/d &&
15581 diff e x/y/e
15582 )
15583 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15584 at_status=$? at_failed=false
15585 $at_check_filter
15586 at_fn_diff_devnull "$at_stderr" || at_failed=:
15587 at_fn_diff_devnull "$at_stdout" || at_failed=:
15588 at_fn_check_status 0 $at_status "$at_srcdir/extrac10.at:32"
15589 $at_failed && at_fn_log_failure
15590 $at_traceon; }
15591
15592
15593
15594
15595   set +x
15596   $at_times_p && times >"$at_times_file"
15597 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15598 read at_status <"$at_status_file"
15599 #AT_STOP_64
15600 #AT_START_65
15601 at_fn_group_banner 65 'extrac11.at:25' \
15602   "scarce file descriptors" "                        " 9
15603 at_xfail=no
15604       test -f $XFAILFILE && at_xfail=yes
15605 (
15606   $as_echo "65. $at_setup_line: testing $at_desc ..."
15607   $at_traceon
15608
15609
15610
15611
15612
15613   { set +x
15614 $as_echo "$at_srcdir/extrac11.at:28:
15615 mkdir gnu
15616 (cd gnu
15617 TEST_TAR_FORMAT=gnu
15618 export TEST_TAR_FORMAT
15619 TAR_OPTIONS=\"-H gnu\"
15620 export TAR_OPTIONS
15621 rm -rf *
15622
15623 exec </dev/null
15624 dirs='a
15625       a/b
15626       a/b/c
15627       a/b/c/d
15628       a/b/c/d/e
15629       a/b/c/d/e/f
15630       a/b/c/d/e/f/g
15631       a/b/c/d/e/f/g/h
15632       a/b/c/d/e/f/g/h/i
15633       a/b/c/d/e/f/g/h/i/j
15634       a/b/c/d/e/f/g/h/i/j/k
15635 '
15636 files=
15637 mkdir \$dirs dest1 dest2 dest3 || exit
15638 for dir in \$dirs; do
15639   for file in X Y Z; do
15640     echo \$file >\$dir/\$file || exit
15641     files=\"\$files \$file\"
15642   done
15643 done
15644
15645 # Check that \"ulimit\" itself works.  Close file descriptors before
15646 # invoking ulimit, to work around a bug (or a \"feature\") in some shells,
15647 # where they squirrel away dups of file descriptors into FD 10 and up
15648 # before closing the originals.
15649 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
15650    ulimit -n 100 &&
15651    tar -cf archive1.tar a &&
15652    tar -xf archive1.tar -C dest1 a
15653   ) &&
15654   diff -r a dest1/a
15655 ) >/dev/null 2>&1 ||
15656    exit 77
15657
15658 # Another test that \"ulimit\" itself works:
15659 # tar should fail when completely starved of file descriptors.
15660 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
15661    ulimit -n 4 &&
15662    tar -cf archive2.tar a &&
15663    tar -xf archive2.tar -C dest2 a
15664   ) &&
15665   diff -r a dest2/a
15666 ) >/dev/null 2>&1 &&
15667    exit 77
15668
15669 # Tar should work when there are few, but enough, file descriptors.
15670 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
15671    ulimit -n 10 &&
15672    tar -cf archive3.tar a &&
15673    tar -xf archive3.tar -C dest3 a
15674   ) &&
15675   diff -r a dest3/a >/dev/null 2>&1
15676 ) || { diff -r a dest3/a; exit 1; }
15677 )"
15678 at_fn_check_prepare_notrace 'an embedded newline' "extrac11.at:28"
15679 ( $at_check_trace;
15680 mkdir gnu
15681 (cd gnu
15682 TEST_TAR_FORMAT=gnu
15683 export TEST_TAR_FORMAT
15684 TAR_OPTIONS="-H gnu"
15685 export TAR_OPTIONS
15686 rm -rf *
15687
15688 exec </dev/null
15689 dirs='a
15690       a/b
15691       a/b/c
15692       a/b/c/d
15693       a/b/c/d/e
15694       a/b/c/d/e/f
15695       a/b/c/d/e/f/g
15696       a/b/c/d/e/f/g/h
15697       a/b/c/d/e/f/g/h/i
15698       a/b/c/d/e/f/g/h/i/j
15699       a/b/c/d/e/f/g/h/i/j/k
15700 '
15701 files=
15702 mkdir $dirs dest1 dest2 dest3 || exit
15703 for dir in $dirs; do
15704   for file in X Y Z; do
15705     echo $file >$dir/$file || exit
15706     files="$files $file"
15707   done
15708 done
15709
15710 # Check that "ulimit" itself works.  Close file descriptors before
15711 # invoking ulimit, to work around a bug (or a "feature") in some shells,
15712 # where they squirrel away dups of file descriptors into FD 10 and up
15713 # before closing the originals.
15714 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
15715    ulimit -n 100 &&
15716    tar -cf archive1.tar a &&
15717    tar -xf archive1.tar -C dest1 a
15718   ) &&
15719   diff -r a dest1/a
15720 ) >/dev/null 2>&1 ||
15721    exit 77
15722
15723 # Another test that "ulimit" itself works:
15724 # tar should fail when completely starved of file descriptors.
15725 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
15726    ulimit -n 4 &&
15727    tar -cf archive2.tar a &&
15728    tar -xf archive2.tar -C dest2 a
15729   ) &&
15730   diff -r a dest2/a
15731 ) >/dev/null 2>&1 &&
15732    exit 77
15733
15734 # Tar should work when there are few, but enough, file descriptors.
15735 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
15736    ulimit -n 10 &&
15737    tar -cf archive3.tar a &&
15738    tar -xf archive3.tar -C dest3 a
15739   ) &&
15740   diff -r a dest3/a >/dev/null 2>&1
15741 ) || { diff -r a dest3/a; exit 1; }
15742 )
15743 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15744 at_status=$? at_failed=false
15745 $at_check_filter
15746 at_fn_diff_devnull "$at_stderr" || at_failed=:
15747 at_fn_diff_devnull "$at_stdout" || at_failed=:
15748 at_fn_check_status 0 $at_status "$at_srcdir/extrac11.at:28"
15749 $at_failed && at_fn_log_failure
15750 $at_traceon; }
15751
15752
15753
15754
15755   set +x
15756   $at_times_p && times >"$at_times_file"
15757 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15758 read at_status <"$at_status_file"
15759 #AT_STOP_65
15760 #AT_START_66
15761 at_fn_group_banner 66 'extrac12.at:25' \
15762   "extract dot permissions" "                        " 9
15763 at_xfail=no
15764       test -f $XFAILFILE && at_xfail=yes
15765 (
15766   $as_echo "66. $at_setup_line: testing $at_desc ..."
15767   $at_traceon
15768
15769
15770
15771
15772
15773   { set +x
15774 $as_echo "$at_srcdir/extrac12.at:28:
15775 mkdir gnu
15776 (cd gnu
15777 TEST_TAR_FORMAT=gnu
15778 export TEST_TAR_FORMAT
15779 TAR_OPTIONS=\"-H gnu\"
15780 export TAR_OPTIONS
15781 rm -rf *
15782
15783 mkdir src dst
15784 echo file1 >src/file1
15785 echo file2 >src/file2
15786 chmod a-w src
15787
15788 tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
15789 tar -xf archive.tar -C dst &&
15790 cmp src/file1 dst/file1 &&
15791 cmp src/file2 dst/file2
15792 )"
15793 at_fn_check_prepare_notrace 'an embedded newline' "extrac12.at:28"
15794 ( $at_check_trace;
15795 mkdir gnu
15796 (cd gnu
15797 TEST_TAR_FORMAT=gnu
15798 export TEST_TAR_FORMAT
15799 TAR_OPTIONS="-H gnu"
15800 export TAR_OPTIONS
15801 rm -rf *
15802
15803 mkdir src dst
15804 echo file1 >src/file1
15805 echo file2 >src/file2
15806 chmod a-w src
15807
15808 tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
15809 tar -xf archive.tar -C dst &&
15810 cmp src/file1 dst/file1 &&
15811 cmp src/file2 dst/file2
15812 )
15813 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15814 at_status=$? at_failed=false
15815 $at_check_filter
15816 at_fn_diff_devnull "$at_stderr" || at_failed=:
15817 at_fn_diff_devnull "$at_stdout" || at_failed=:
15818 at_fn_check_status 0 $at_status "$at_srcdir/extrac12.at:28"
15819 $at_failed && at_fn_log_failure
15820 $at_traceon; }
15821
15822
15823
15824
15825   set +x
15826   $at_times_p && times >"$at_times_file"
15827 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15828 read at_status <"$at_status_file"
15829 #AT_STOP_66
15830 #AT_START_67
15831 at_fn_group_banner 67 'extrac13.at:26' \
15832   "extract over symlinks" "                          " 9
15833 at_xfail=no
15834       test -f $XFAILFILE && at_xfail=yes
15835 (
15836   $as_echo "67. $at_setup_line: testing $at_desc ..."
15837   $at_traceon
15838
15839
15840
15841
15842
15843   { set +x
15844 $as_echo "$at_srcdir/extrac13.at:29:
15845 mkdir gnu
15846 (cd gnu
15847 TEST_TAR_FORMAT=gnu
15848 export TEST_TAR_FORMAT
15849 TAR_OPTIONS=\"-H gnu\"
15850 export TAR_OPTIONS
15851 rm -rf *
15852
15853 mkdir src dst1 dst2 dst3
15854 echo file1 >src/file1
15855 ln -s target1 dst1/file1
15856 echo target1 >dst1/target1
15857 echo target1 >target1
15858
15859 tar -cf archive.tar -C src . &&
15860 tar -xf archive.tar -C dst1 --warning=no-timestamp &&
15861 diff src/file1 dst1/file1 &&
15862 diff target1 dst1/target1
15863
15864 ln -s target1 dst2/file1
15865 echo target1 >dst2/target1
15866 tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
15867 diff src/file1 dst2/file1 &&
15868 diff target1 dst2/target1
15869
15870 ln -s target1 dst3/file1
15871 echo target1 >dst3/target1
15872 tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
15873 diff src/file1 dst3/file1 &&
15874 diff src/file1 dst3/target1
15875 )"
15876 at_fn_check_prepare_notrace 'an embedded newline' "extrac13.at:29"
15877 ( $at_check_trace;
15878 mkdir gnu
15879 (cd gnu
15880 TEST_TAR_FORMAT=gnu
15881 export TEST_TAR_FORMAT
15882 TAR_OPTIONS="-H gnu"
15883 export TAR_OPTIONS
15884 rm -rf *
15885
15886 mkdir src dst1 dst2 dst3
15887 echo file1 >src/file1
15888 ln -s target1 dst1/file1
15889 echo target1 >dst1/target1
15890 echo target1 >target1
15891
15892 tar -cf archive.tar -C src . &&
15893 tar -xf archive.tar -C dst1 --warning=no-timestamp &&
15894 diff src/file1 dst1/file1 &&
15895 diff target1 dst1/target1
15896
15897 ln -s target1 dst2/file1
15898 echo target1 >dst2/target1
15899 tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
15900 diff src/file1 dst2/file1 &&
15901 diff target1 dst2/target1
15902
15903 ln -s target1 dst3/file1
15904 echo target1 >dst3/target1
15905 tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
15906 diff src/file1 dst3/file1 &&
15907 diff src/file1 dst3/target1
15908 )
15909 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15910 at_status=$? at_failed=false
15911 $at_check_filter
15912 at_fn_diff_devnull "$at_stderr" || at_failed=:
15913 at_fn_diff_devnull "$at_stdout" || at_failed=:
15914 at_fn_check_status 0 $at_status "$at_srcdir/extrac13.at:29"
15915 $at_failed && at_fn_log_failure
15916 $at_traceon; }
15917
15918
15919
15920
15921   set +x
15922   $at_times_p && times >"$at_times_file"
15923 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15924 read at_status <"$at_status_file"
15925 #AT_STOP_67
15926 #AT_START_68
15927 at_fn_group_banner 68 'extrac14.at:25' \
15928   "extract -C symlink" "                             " 9
15929 at_xfail=no
15930       test -f $XFAILFILE && at_xfail=yes
15931 (
15932   $as_echo "68. $at_setup_line: testing $at_desc ..."
15933   $at_traceon
15934
15935
15936
15937
15938
15939   { set +x
15940 $as_echo "$at_srcdir/extrac14.at:28:
15941 mkdir gnu
15942 (cd gnu
15943 TEST_TAR_FORMAT=gnu
15944 export TEST_TAR_FORMAT
15945 TAR_OPTIONS=\"-H gnu\"
15946 export TAR_OPTIONS
15947 rm -rf *
15948
15949 mkdir dest
15950 ln -s dest symlink
15951 echo foo >foo
15952 tar -cf archive.tar foo &&
15953 tar -xf archive.tar -C symlink --warning=no-timestamp &&
15954 cmp foo dest/foo
15955 )"
15956 at_fn_check_prepare_notrace 'an embedded newline' "extrac14.at:28"
15957 ( $at_check_trace;
15958 mkdir gnu
15959 (cd gnu
15960 TEST_TAR_FORMAT=gnu
15961 export TEST_TAR_FORMAT
15962 TAR_OPTIONS="-H gnu"
15963 export TAR_OPTIONS
15964 rm -rf *
15965
15966 mkdir dest
15967 ln -s dest symlink
15968 echo foo >foo
15969 tar -cf archive.tar foo &&
15970 tar -xf archive.tar -C symlink --warning=no-timestamp &&
15971 cmp foo dest/foo
15972 )
15973 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15974 at_status=$? at_failed=false
15975 $at_check_filter
15976 at_fn_diff_devnull "$at_stderr" || at_failed=:
15977 at_fn_diff_devnull "$at_stdout" || at_failed=:
15978 at_fn_check_status 0 $at_status "$at_srcdir/extrac14.at:28"
15979 $at_failed && at_fn_log_failure
15980 $at_traceon; }
15981
15982
15983
15984
15985   set +x
15986   $at_times_p && times >"$at_times_file"
15987 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15988 read at_status <"$at_status_file"
15989 #AT_STOP_68
15990 #AT_START_69
15991 at_fn_group_banner 69 'extrac15.at:25' \
15992   "extract parent mkdir failure" "                   " 9
15993 at_xfail=no
15994       test -f $XFAILFILE && at_xfail=yes
15995 (
15996   $as_echo "69. $at_setup_line: testing $at_desc ..."
15997   $at_traceon
15998
15999
16000
16001
16002
16003   { set +x
16004 $as_echo "$at_srcdir/extrac15.at:28:
16005 mkdir gnu
16006 (cd gnu
16007 TEST_TAR_FORMAT=gnu
16008 export TEST_TAR_FORMAT
16009 TAR_OPTIONS=\"-H gnu\"
16010 export TAR_OPTIONS
16011 rm -rf *
16012
16013
16014 echo \"test\" > \$\$
16015 chmod 0 \$\$
16016 cat \$\$ > /dev/null 2>&1
16017 result=\$?
16018 rm -f \$\$
16019 test \$result -eq 0 && exit 77
16020
16021
16022 mkdir src src/a src/a/b dest dest/a
16023 touch src/a/b/c
16024 chmod a-w dest/a
16025
16026 tar -cf archive.tar -C src a/b/c &&
16027 if tar -xf archive.tar -C dest a/b/c
16028 then (exit 1)
16029 else (exit 0)
16030 fi
16031 )"
16032 at_fn_check_prepare_notrace 'an embedded newline' "extrac15.at:28"
16033 ( $at_check_trace;
16034 mkdir gnu
16035 (cd gnu
16036 TEST_TAR_FORMAT=gnu
16037 export TEST_TAR_FORMAT
16038 TAR_OPTIONS="-H gnu"
16039 export TAR_OPTIONS
16040 rm -rf *
16041
16042
16043 echo "test" > $$
16044 chmod 0 $$
16045 cat $$ > /dev/null 2>&1
16046 result=$?
16047 rm -f $$
16048 test $result -eq 0 && exit 77
16049
16050
16051 mkdir src src/a src/a/b dest dest/a
16052 touch src/a/b/c
16053 chmod a-w dest/a
16054
16055 tar -cf archive.tar -C src a/b/c &&
16056 if tar -xf archive.tar -C dest a/b/c
16057 then (exit 1)
16058 else (exit 0)
16059 fi
16060 )
16061 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16062 at_status=$? at_failed=false
16063 $at_check_filter
16064 echo >>"$at_stderr"; $as_echo "tar: a/b: Cannot mkdir: Permission denied
16065 tar: a/b/c: Cannot open: No such file or directory
16066 tar: Exiting with failure status due to previous errors
16067 " | \
16068   $at_diff - "$at_stderr" || at_failed=:
16069 at_fn_diff_devnull "$at_stdout" || at_failed=:
16070 at_fn_check_status 0 $at_status "$at_srcdir/extrac15.at:28"
16071 $at_failed && at_fn_log_failure
16072 $at_traceon; }
16073
16074
16075
16076
16077   set +x
16078   $at_times_p && times >"$at_times_file"
16079 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16080 read at_status <"$at_status_file"
16081 #AT_STOP_69
16082 #AT_START_70
16083 at_fn_group_banner 70 'extrac16.at:26' \
16084   "extract empty directory with -C" "                " 9
16085 at_xfail=no
16086       test -f $XFAILFILE && at_xfail=yes
16087 (
16088   $as_echo "70. $at_setup_line: testing $at_desc ..."
16089   $at_traceon
16090
16091
16092
16093
16094
16095   { set +x
16096 $as_echo "$at_srcdir/extrac16.at:29:
16097 mkdir gnu
16098 (cd gnu
16099 TEST_TAR_FORMAT=gnu
16100 export TEST_TAR_FORMAT
16101 TAR_OPTIONS=\"-H gnu\"
16102 export TAR_OPTIONS
16103 rm -rf *
16104
16105 mkdir src src/a src/a/b dest
16106 touch src/a/c
16107
16108 tar -cf archive.tar -C src a &&
16109 tar -xf archive.tar -C dest
16110 )"
16111 at_fn_check_prepare_notrace 'an embedded newline' "extrac16.at:29"
16112 ( $at_check_trace;
16113 mkdir gnu
16114 (cd gnu
16115 TEST_TAR_FORMAT=gnu
16116 export TEST_TAR_FORMAT
16117 TAR_OPTIONS="-H gnu"
16118 export TAR_OPTIONS
16119 rm -rf *
16120
16121 mkdir src src/a src/a/b dest
16122 touch src/a/c
16123
16124 tar -cf archive.tar -C src a &&
16125 tar -xf archive.tar -C dest
16126 )
16127 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16128 at_status=$? at_failed=false
16129 $at_check_filter
16130 at_fn_diff_devnull "$at_stderr" || at_failed=:
16131 at_fn_diff_devnull "$at_stdout" || at_failed=:
16132 at_fn_check_status 0 $at_status "$at_srcdir/extrac16.at:29"
16133 $at_failed && at_fn_log_failure
16134 $at_traceon; }
16135
16136
16137
16138
16139   set +x
16140   $at_times_p && times >"$at_times_file"
16141 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16142 read at_status <"$at_status_file"
16143 #AT_STOP_70
16144 #AT_START_71
16145 at_fn_group_banner 71 'extrac17.at:21' \
16146   "name matching/transformation ordering" "          " 9
16147 at_xfail=no
16148       test -f $XFAILFILE && at_xfail=yes
16149 (
16150   $as_echo "71. $at_setup_line: testing $at_desc ..."
16151   $at_traceon
16152
16153
16154
16155 # Description: Tar 1.24 changed the ordering of name matching and
16156 # name transformation so that the former saw already transformed
16157 # file names (see commit 9c194c99 and exclude06.at).  This reverted
16158 # ordering made it impossible to match file names in certain cases.
16159 # In particular, the testcase below would not extract anything.
16160 #
16161 # Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
16162 # References: <x6r5fd9jye@gzp>, <20101026175126.29028@Pirx.gnu.org.ua>
16163 #             http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
16164
16165
16166
16167   { set +x
16168 $as_echo "$at_srcdir/extrac17.at:34:
16169 mkdir v7
16170 (cd v7
16171 TEST_TAR_FORMAT=v7
16172 export TEST_TAR_FORMAT
16173 TAR_OPTIONS=\"-H v7\"
16174 export TAR_OPTIONS
16175 rm -rf *
16176
16177 mkdir dir dir/subdir1 dir/subdir2 out
16178 genfile --file dir/subdir1/file1
16179 genfile --file dir/subdir2/file2
16180
16181 tar cf dir.tar dir
16182
16183 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16184   dir/subdir1/
16185 )"
16186 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16187 ( $at_check_trace;
16188 mkdir v7
16189 (cd v7
16190 TEST_TAR_FORMAT=v7
16191 export TEST_TAR_FORMAT
16192 TAR_OPTIONS="-H v7"
16193 export TAR_OPTIONS
16194 rm -rf *
16195
16196 mkdir dir dir/subdir1 dir/subdir2 out
16197 genfile --file dir/subdir1/file1
16198 genfile --file dir/subdir2/file2
16199
16200 tar cf dir.tar dir
16201
16202 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16203   dir/subdir1/
16204 )
16205 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16206 at_status=$? at_failed=false
16207 $at_check_filter
16208 at_fn_diff_devnull "$at_stderr" || at_failed=:
16209 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16210 " | \
16211   $at_diff - "$at_stdout" || at_failed=:
16212 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16213 $at_failed && at_fn_log_failure
16214 $at_traceon; }
16215
16216               { set +x
16217 $as_echo "$at_srcdir/extrac17.at:34:
16218 mkdir oldgnu
16219 (cd oldgnu
16220 TEST_TAR_FORMAT=oldgnu
16221 export TEST_TAR_FORMAT
16222 TAR_OPTIONS=\"-H oldgnu\"
16223 export TAR_OPTIONS
16224 rm -rf *
16225
16226 mkdir dir dir/subdir1 dir/subdir2 out
16227 genfile --file dir/subdir1/file1
16228 genfile --file dir/subdir2/file2
16229
16230 tar cf dir.tar dir
16231
16232 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16233   dir/subdir1/
16234 )"
16235 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16236 ( $at_check_trace;
16237 mkdir oldgnu
16238 (cd oldgnu
16239 TEST_TAR_FORMAT=oldgnu
16240 export TEST_TAR_FORMAT
16241 TAR_OPTIONS="-H oldgnu"
16242 export TAR_OPTIONS
16243 rm -rf *
16244
16245 mkdir dir dir/subdir1 dir/subdir2 out
16246 genfile --file dir/subdir1/file1
16247 genfile --file dir/subdir2/file2
16248
16249 tar cf dir.tar dir
16250
16251 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16252   dir/subdir1/
16253 )
16254 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16255 at_status=$? at_failed=false
16256 $at_check_filter
16257 at_fn_diff_devnull "$at_stderr" || at_failed=:
16258 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16259 " | \
16260   $at_diff - "$at_stdout" || at_failed=:
16261 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16262 $at_failed && at_fn_log_failure
16263 $at_traceon; }
16264
16265               { set +x
16266 $as_echo "$at_srcdir/extrac17.at:34:
16267 mkdir ustar
16268 (cd ustar
16269 TEST_TAR_FORMAT=ustar
16270 export TEST_TAR_FORMAT
16271 TAR_OPTIONS=\"-H ustar\"
16272 export TAR_OPTIONS
16273 rm -rf *
16274
16275 mkdir dir dir/subdir1 dir/subdir2 out
16276 genfile --file dir/subdir1/file1
16277 genfile --file dir/subdir2/file2
16278
16279 tar cf dir.tar dir
16280
16281 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16282   dir/subdir1/
16283 )"
16284 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16285 ( $at_check_trace;
16286 mkdir ustar
16287 (cd ustar
16288 TEST_TAR_FORMAT=ustar
16289 export TEST_TAR_FORMAT
16290 TAR_OPTIONS="-H ustar"
16291 export TAR_OPTIONS
16292 rm -rf *
16293
16294 mkdir dir dir/subdir1 dir/subdir2 out
16295 genfile --file dir/subdir1/file1
16296 genfile --file dir/subdir2/file2
16297
16298 tar cf dir.tar dir
16299
16300 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16301   dir/subdir1/
16302 )
16303 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16304 at_status=$? at_failed=false
16305 $at_check_filter
16306 at_fn_diff_devnull "$at_stderr" || at_failed=:
16307 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16308 " | \
16309   $at_diff - "$at_stdout" || at_failed=:
16310 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16311 $at_failed && at_fn_log_failure
16312 $at_traceon; }
16313
16314               { set +x
16315 $as_echo "$at_srcdir/extrac17.at:34:
16316 mkdir posix
16317 (cd posix
16318 TEST_TAR_FORMAT=posix
16319 export TEST_TAR_FORMAT
16320 TAR_OPTIONS=\"-H posix\"
16321 export TAR_OPTIONS
16322 rm -rf *
16323
16324 mkdir dir dir/subdir1 dir/subdir2 out
16325 genfile --file dir/subdir1/file1
16326 genfile --file dir/subdir2/file2
16327
16328 tar cf dir.tar dir
16329
16330 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16331   dir/subdir1/
16332 )"
16333 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16334 ( $at_check_trace;
16335 mkdir posix
16336 (cd posix
16337 TEST_TAR_FORMAT=posix
16338 export TEST_TAR_FORMAT
16339 TAR_OPTIONS="-H posix"
16340 export TAR_OPTIONS
16341 rm -rf *
16342
16343 mkdir dir dir/subdir1 dir/subdir2 out
16344 genfile --file dir/subdir1/file1
16345 genfile --file dir/subdir2/file2
16346
16347 tar cf dir.tar dir
16348
16349 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16350   dir/subdir1/
16351 )
16352 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16353 at_status=$? at_failed=false
16354 $at_check_filter
16355 at_fn_diff_devnull "$at_stderr" || at_failed=:
16356 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16357 " | \
16358   $at_diff - "$at_stdout" || at_failed=:
16359 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16360 $at_failed && at_fn_log_failure
16361 $at_traceon; }
16362
16363               { set +x
16364 $as_echo "$at_srcdir/extrac17.at:34:
16365 mkdir gnu
16366 (cd gnu
16367 TEST_TAR_FORMAT=gnu
16368 export TEST_TAR_FORMAT
16369 TAR_OPTIONS=\"-H gnu\"
16370 export TAR_OPTIONS
16371 rm -rf *
16372
16373 mkdir dir dir/subdir1 dir/subdir2 out
16374 genfile --file dir/subdir1/file1
16375 genfile --file dir/subdir2/file2
16376
16377 tar cf dir.tar dir
16378
16379 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16380   dir/subdir1/
16381 )"
16382 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16383 ( $at_check_trace;
16384 mkdir gnu
16385 (cd gnu
16386 TEST_TAR_FORMAT=gnu
16387 export TEST_TAR_FORMAT
16388 TAR_OPTIONS="-H gnu"
16389 export TAR_OPTIONS
16390 rm -rf *
16391
16392 mkdir dir dir/subdir1 dir/subdir2 out
16393 genfile --file dir/subdir1/file1
16394 genfile --file dir/subdir2/file2
16395
16396 tar cf dir.tar dir
16397
16398 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16399   dir/subdir1/
16400 )
16401 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16402 at_status=$? at_failed=false
16403 $at_check_filter
16404 at_fn_diff_devnull "$at_stderr" || at_failed=:
16405 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16406 " | \
16407   $at_diff - "$at_stdout" || at_failed=:
16408 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16409 $at_failed && at_fn_log_failure
16410 $at_traceon; }
16411
16412
16413
16414
16415   set +x
16416   $at_times_p && times >"$at_times_file"
16417 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16418 read at_status <"$at_status_file"
16419 #AT_STOP_71
16420 #AT_START_72
16421 at_fn_group_banner 72 'extrac18.at:34' \
16422   "keep-old-files" "                                 " 9
16423 at_xfail=no
16424       test -f $XFAILFILE && at_xfail=yes
16425 (
16426   $as_echo "72. $at_setup_line: testing $at_desc ..."
16427   $at_traceon
16428
16429
16430
16431
16432
16433   { set +x
16434 $as_echo "$at_srcdir/extrac18.at:37:
16435 mkdir v7
16436 (cd v7
16437 TEST_TAR_FORMAT=v7
16438 export TEST_TAR_FORMAT
16439 TAR_OPTIONS=\"-H v7\"
16440 export TAR_OPTIONS
16441 rm -rf *
16442
16443 mkdir dir
16444 cd dir
16445 echo 'Old file a' > a
16446 echo 'Old file b' > b
16447
16448 tar cf ../archive .
16449
16450 rm b
16451 echo 'File a' > a
16452
16453 tar -x -k -f ../archive
16454 echo status=\$?
16455
16456 cat a
16457 )"
16458 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
16459 ( $at_check_trace;
16460 mkdir v7
16461 (cd v7
16462 TEST_TAR_FORMAT=v7
16463 export TEST_TAR_FORMAT
16464 TAR_OPTIONS="-H v7"
16465 export TAR_OPTIONS
16466 rm -rf *
16467
16468 mkdir dir
16469 cd dir
16470 echo 'Old file a' > a
16471 echo 'Old file b' > b
16472
16473 tar cf ../archive .
16474
16475 rm b
16476 echo 'File a' > a
16477
16478 tar -x -k -f ../archive
16479 echo status=$?
16480
16481 cat a
16482 )
16483 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16484 at_status=$? at_failed=false
16485 $at_check_filter
16486 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
16487 tar: Exiting with failure status due to previous errors
16488 " | \
16489   $at_diff - "$at_stderr" || at_failed=:
16490 echo >>"$at_stdout"; $as_echo "status=2
16491 File a
16492 " | \
16493   $at_diff - "$at_stdout" || at_failed=:
16494 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
16495 $at_failed && at_fn_log_failure
16496 $at_traceon; }
16497
16498               { set +x
16499 $as_echo "$at_srcdir/extrac18.at:37:
16500 mkdir oldgnu
16501 (cd oldgnu
16502 TEST_TAR_FORMAT=oldgnu
16503 export TEST_TAR_FORMAT
16504 TAR_OPTIONS=\"-H oldgnu\"
16505 export TAR_OPTIONS
16506 rm -rf *
16507
16508 mkdir dir
16509 cd dir
16510 echo 'Old file a' > a
16511 echo 'Old file b' > b
16512
16513 tar cf ../archive .
16514
16515 rm b
16516 echo 'File a' > a
16517
16518 tar -x -k -f ../archive
16519 echo status=\$?
16520
16521 cat a
16522 )"
16523 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
16524 ( $at_check_trace;
16525 mkdir oldgnu
16526 (cd oldgnu
16527 TEST_TAR_FORMAT=oldgnu
16528 export TEST_TAR_FORMAT
16529 TAR_OPTIONS="-H oldgnu"
16530 export TAR_OPTIONS
16531 rm -rf *
16532
16533 mkdir dir
16534 cd dir
16535 echo 'Old file a' > a
16536 echo 'Old file b' > b
16537
16538 tar cf ../archive .
16539
16540 rm b
16541 echo 'File a' > a
16542
16543 tar -x -k -f ../archive
16544 echo status=$?
16545
16546 cat a
16547 )
16548 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16549 at_status=$? at_failed=false
16550 $at_check_filter
16551 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
16552 tar: Exiting with failure status due to previous errors
16553 " | \
16554   $at_diff - "$at_stderr" || at_failed=:
16555 echo >>"$at_stdout"; $as_echo "status=2
16556 File a
16557 " | \
16558   $at_diff - "$at_stdout" || at_failed=:
16559 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
16560 $at_failed && at_fn_log_failure
16561 $at_traceon; }
16562
16563               { set +x
16564 $as_echo "$at_srcdir/extrac18.at:37:
16565 mkdir ustar
16566 (cd ustar
16567 TEST_TAR_FORMAT=ustar
16568 export TEST_TAR_FORMAT
16569 TAR_OPTIONS=\"-H ustar\"
16570 export TAR_OPTIONS
16571 rm -rf *
16572
16573 mkdir dir
16574 cd dir
16575 echo 'Old file a' > a
16576 echo 'Old file b' > b
16577
16578 tar cf ../archive .
16579
16580 rm b
16581 echo 'File a' > a
16582
16583 tar -x -k -f ../archive
16584 echo status=\$?
16585
16586 cat a
16587 )"
16588 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
16589 ( $at_check_trace;
16590 mkdir ustar
16591 (cd ustar
16592 TEST_TAR_FORMAT=ustar
16593 export TEST_TAR_FORMAT
16594 TAR_OPTIONS="-H ustar"
16595 export TAR_OPTIONS
16596 rm -rf *
16597
16598 mkdir dir
16599 cd dir
16600 echo 'Old file a' > a
16601 echo 'Old file b' > b
16602
16603 tar cf ../archive .
16604
16605 rm b
16606 echo 'File a' > a
16607
16608 tar -x -k -f ../archive
16609 echo status=$?
16610
16611 cat a
16612 )
16613 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16614 at_status=$? at_failed=false
16615 $at_check_filter
16616 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
16617 tar: Exiting with failure status due to previous errors
16618 " | \
16619   $at_diff - "$at_stderr" || at_failed=:
16620 echo >>"$at_stdout"; $as_echo "status=2
16621 File a
16622 " | \
16623   $at_diff - "$at_stdout" || at_failed=:
16624 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
16625 $at_failed && at_fn_log_failure
16626 $at_traceon; }
16627
16628               { set +x
16629 $as_echo "$at_srcdir/extrac18.at:37:
16630 mkdir posix
16631 (cd posix
16632 TEST_TAR_FORMAT=posix
16633 export TEST_TAR_FORMAT
16634 TAR_OPTIONS=\"-H posix\"
16635 export TAR_OPTIONS
16636 rm -rf *
16637
16638 mkdir dir
16639 cd dir
16640 echo 'Old file a' > a
16641 echo 'Old file b' > b
16642
16643 tar cf ../archive .
16644
16645 rm b
16646 echo 'File a' > a
16647
16648 tar -x -k -f ../archive
16649 echo status=\$?
16650
16651 cat a
16652 )"
16653 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
16654 ( $at_check_trace;
16655 mkdir posix
16656 (cd posix
16657 TEST_TAR_FORMAT=posix
16658 export TEST_TAR_FORMAT
16659 TAR_OPTIONS="-H posix"
16660 export TAR_OPTIONS
16661 rm -rf *
16662
16663 mkdir dir
16664 cd dir
16665 echo 'Old file a' > a
16666 echo 'Old file b' > b
16667
16668 tar cf ../archive .
16669
16670 rm b
16671 echo 'File a' > a
16672
16673 tar -x -k -f ../archive
16674 echo status=$?
16675
16676 cat a
16677 )
16678 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16679 at_status=$? at_failed=false
16680 $at_check_filter
16681 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
16682 tar: Exiting with failure status due to previous errors
16683 " | \
16684   $at_diff - "$at_stderr" || at_failed=:
16685 echo >>"$at_stdout"; $as_echo "status=2
16686 File a
16687 " | \
16688   $at_diff - "$at_stdout" || at_failed=:
16689 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
16690 $at_failed && at_fn_log_failure
16691 $at_traceon; }
16692
16693               { set +x
16694 $as_echo "$at_srcdir/extrac18.at:37:
16695 mkdir gnu
16696 (cd gnu
16697 TEST_TAR_FORMAT=gnu
16698 export TEST_TAR_FORMAT
16699 TAR_OPTIONS=\"-H gnu\"
16700 export TAR_OPTIONS
16701 rm -rf *
16702
16703 mkdir dir
16704 cd dir
16705 echo 'Old file a' > a
16706 echo 'Old file b' > b
16707
16708 tar cf ../archive .
16709
16710 rm b
16711 echo 'File a' > a
16712
16713 tar -x -k -f ../archive
16714 echo status=\$?
16715
16716 cat a
16717 )"
16718 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
16719 ( $at_check_trace;
16720 mkdir gnu
16721 (cd gnu
16722 TEST_TAR_FORMAT=gnu
16723 export TEST_TAR_FORMAT
16724 TAR_OPTIONS="-H gnu"
16725 export TAR_OPTIONS
16726 rm -rf *
16727
16728 mkdir dir
16729 cd dir
16730 echo 'Old file a' > a
16731 echo 'Old file b' > b
16732
16733 tar cf ../archive .
16734
16735 rm b
16736 echo 'File a' > a
16737
16738 tar -x -k -f ../archive
16739 echo status=$?
16740
16741 cat a
16742 )
16743 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16744 at_status=$? at_failed=false
16745 $at_check_filter
16746 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
16747 tar: Exiting with failure status due to previous errors
16748 " | \
16749   $at_diff - "$at_stderr" || at_failed=:
16750 echo >>"$at_stdout"; $as_echo "status=2
16751 File a
16752 " | \
16753   $at_diff - "$at_stdout" || at_failed=:
16754 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
16755 $at_failed && at_fn_log_failure
16756 $at_traceon; }
16757
16758
16759
16760
16761   set +x
16762   $at_times_p && times >"$at_times_file"
16763 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16764 read at_status <"$at_status_file"
16765 #AT_STOP_72
16766 #AT_START_73
16767 at_fn_group_banner 73 'extrac19.at:21' \
16768   "skip-old-files" "                                 " 9
16769 at_xfail=no
16770       test -f $XFAILFILE && at_xfail=yes
16771 (
16772   $as_echo "73. $at_setup_line: testing $at_desc ..."
16773   $at_traceon
16774
16775
16776
16777
16778
16779   { set +x
16780 $as_echo "$at_srcdir/extrac19.at:24:
16781 mkdir v7
16782 (cd v7
16783 TEST_TAR_FORMAT=v7
16784 export TEST_TAR_FORMAT
16785 TAR_OPTIONS=\"-H v7\"
16786 export TAR_OPTIONS
16787 rm -rf *
16788
16789 mkdir dir
16790 cd dir
16791 echo 'Old file a' > a
16792 echo 'Old file b' > b
16793
16794 tar cf ../archive .
16795
16796 rm b
16797 echo 'File a' > a
16798
16799 tar -x --skip-old-files -f ../archive
16800 echo status=\$?
16801
16802 cat a
16803 )"
16804 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
16805 ( $at_check_trace;
16806 mkdir v7
16807 (cd v7
16808 TEST_TAR_FORMAT=v7
16809 export TEST_TAR_FORMAT
16810 TAR_OPTIONS="-H v7"
16811 export TAR_OPTIONS
16812 rm -rf *
16813
16814 mkdir dir
16815 cd dir
16816 echo 'Old file a' > a
16817 echo 'Old file b' > b
16818
16819 tar cf ../archive .
16820
16821 rm b
16822 echo 'File a' > a
16823
16824 tar -x --skip-old-files -f ../archive
16825 echo status=$?
16826
16827 cat a
16828 )
16829 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16830 at_status=$? at_failed=false
16831 $at_check_filter
16832 at_fn_diff_devnull "$at_stderr" || at_failed=:
16833 echo >>"$at_stdout"; $as_echo "status=0
16834 File a
16835 " | \
16836   $at_diff - "$at_stdout" || at_failed=:
16837 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
16838 $at_failed && at_fn_log_failure
16839 $at_traceon; }
16840
16841               { set +x
16842 $as_echo "$at_srcdir/extrac19.at:24:
16843 mkdir oldgnu
16844 (cd oldgnu
16845 TEST_TAR_FORMAT=oldgnu
16846 export TEST_TAR_FORMAT
16847 TAR_OPTIONS=\"-H oldgnu\"
16848 export TAR_OPTIONS
16849 rm -rf *
16850
16851 mkdir dir
16852 cd dir
16853 echo 'Old file a' > a
16854 echo 'Old file b' > b
16855
16856 tar cf ../archive .
16857
16858 rm b
16859 echo 'File a' > a
16860
16861 tar -x --skip-old-files -f ../archive
16862 echo status=\$?
16863
16864 cat a
16865 )"
16866 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
16867 ( $at_check_trace;
16868 mkdir oldgnu
16869 (cd oldgnu
16870 TEST_TAR_FORMAT=oldgnu
16871 export TEST_TAR_FORMAT
16872 TAR_OPTIONS="-H oldgnu"
16873 export TAR_OPTIONS
16874 rm -rf *
16875
16876 mkdir dir
16877 cd dir
16878 echo 'Old file a' > a
16879 echo 'Old file b' > b
16880
16881 tar cf ../archive .
16882
16883 rm b
16884 echo 'File a' > a
16885
16886 tar -x --skip-old-files -f ../archive
16887 echo status=$?
16888
16889 cat a
16890 )
16891 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16892 at_status=$? at_failed=false
16893 $at_check_filter
16894 at_fn_diff_devnull "$at_stderr" || at_failed=:
16895 echo >>"$at_stdout"; $as_echo "status=0
16896 File a
16897 " | \
16898   $at_diff - "$at_stdout" || at_failed=:
16899 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
16900 $at_failed && at_fn_log_failure
16901 $at_traceon; }
16902
16903               { set +x
16904 $as_echo "$at_srcdir/extrac19.at:24:
16905 mkdir ustar
16906 (cd ustar
16907 TEST_TAR_FORMAT=ustar
16908 export TEST_TAR_FORMAT
16909 TAR_OPTIONS=\"-H ustar\"
16910 export TAR_OPTIONS
16911 rm -rf *
16912
16913 mkdir dir
16914 cd dir
16915 echo 'Old file a' > a
16916 echo 'Old file b' > b
16917
16918 tar cf ../archive .
16919
16920 rm b
16921 echo 'File a' > a
16922
16923 tar -x --skip-old-files -f ../archive
16924 echo status=\$?
16925
16926 cat a
16927 )"
16928 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
16929 ( $at_check_trace;
16930 mkdir ustar
16931 (cd ustar
16932 TEST_TAR_FORMAT=ustar
16933 export TEST_TAR_FORMAT
16934 TAR_OPTIONS="-H ustar"
16935 export TAR_OPTIONS
16936 rm -rf *
16937
16938 mkdir dir
16939 cd dir
16940 echo 'Old file a' > a
16941 echo 'Old file b' > b
16942
16943 tar cf ../archive .
16944
16945 rm b
16946 echo 'File a' > a
16947
16948 tar -x --skip-old-files -f ../archive
16949 echo status=$?
16950
16951 cat a
16952 )
16953 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16954 at_status=$? at_failed=false
16955 $at_check_filter
16956 at_fn_diff_devnull "$at_stderr" || at_failed=:
16957 echo >>"$at_stdout"; $as_echo "status=0
16958 File a
16959 " | \
16960   $at_diff - "$at_stdout" || at_failed=:
16961 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
16962 $at_failed && at_fn_log_failure
16963 $at_traceon; }
16964
16965               { set +x
16966 $as_echo "$at_srcdir/extrac19.at:24:
16967 mkdir posix
16968 (cd posix
16969 TEST_TAR_FORMAT=posix
16970 export TEST_TAR_FORMAT
16971 TAR_OPTIONS=\"-H posix\"
16972 export TAR_OPTIONS
16973 rm -rf *
16974
16975 mkdir dir
16976 cd dir
16977 echo 'Old file a' > a
16978 echo 'Old file b' > b
16979
16980 tar cf ../archive .
16981
16982 rm b
16983 echo 'File a' > a
16984
16985 tar -x --skip-old-files -f ../archive
16986 echo status=\$?
16987
16988 cat a
16989 )"
16990 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
16991 ( $at_check_trace;
16992 mkdir posix
16993 (cd posix
16994 TEST_TAR_FORMAT=posix
16995 export TEST_TAR_FORMAT
16996 TAR_OPTIONS="-H posix"
16997 export TAR_OPTIONS
16998 rm -rf *
16999
17000 mkdir dir
17001 cd dir
17002 echo 'Old file a' > a
17003 echo 'Old file b' > b
17004
17005 tar cf ../archive .
17006
17007 rm b
17008 echo 'File a' > a
17009
17010 tar -x --skip-old-files -f ../archive
17011 echo status=$?
17012
17013 cat a
17014 )
17015 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17016 at_status=$? at_failed=false
17017 $at_check_filter
17018 at_fn_diff_devnull "$at_stderr" || at_failed=:
17019 echo >>"$at_stdout"; $as_echo "status=0
17020 File a
17021 " | \
17022   $at_diff - "$at_stdout" || at_failed=:
17023 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
17024 $at_failed && at_fn_log_failure
17025 $at_traceon; }
17026
17027               { set +x
17028 $as_echo "$at_srcdir/extrac19.at:24:
17029 mkdir gnu
17030 (cd gnu
17031 TEST_TAR_FORMAT=gnu
17032 export TEST_TAR_FORMAT
17033 TAR_OPTIONS=\"-H gnu\"
17034 export TAR_OPTIONS
17035 rm -rf *
17036
17037 mkdir dir
17038 cd dir
17039 echo 'Old file a' > a
17040 echo 'Old file b' > b
17041
17042 tar cf ../archive .
17043
17044 rm b
17045 echo 'File a' > a
17046
17047 tar -x --skip-old-files -f ../archive
17048 echo status=\$?
17049
17050 cat a
17051 )"
17052 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
17053 ( $at_check_trace;
17054 mkdir gnu
17055 (cd gnu
17056 TEST_TAR_FORMAT=gnu
17057 export TEST_TAR_FORMAT
17058 TAR_OPTIONS="-H gnu"
17059 export TAR_OPTIONS
17060 rm -rf *
17061
17062 mkdir dir
17063 cd dir
17064 echo 'Old file a' > a
17065 echo 'Old file b' > b
17066
17067 tar cf ../archive .
17068
17069 rm b
17070 echo 'File a' > a
17071
17072 tar -x --skip-old-files -f ../archive
17073 echo status=$?
17074
17075 cat a
17076 )
17077 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17078 at_status=$? at_failed=false
17079 $at_check_filter
17080 at_fn_diff_devnull "$at_stderr" || at_failed=:
17081 echo >>"$at_stdout"; $as_echo "status=0
17082 File a
17083 " | \
17084   $at_diff - "$at_stdout" || at_failed=:
17085 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
17086 $at_failed && at_fn_log_failure
17087 $at_traceon; }
17088
17089
17090
17091
17092   set +x
17093   $at_times_p && times >"$at_times_file"
17094 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17095 read at_status <"$at_status_file"
17096 #AT_STOP_73
17097 #AT_START_74
17098 at_fn_group_banner 74 'backup01.at:33' \
17099   "extracting existing dir with --backup" "          " 9
17100 at_xfail=no
17101       test -f $XFAILFILE && at_xfail=yes
17102 (
17103   $as_echo "74. $at_setup_line: testing $at_desc ..."
17104   $at_traceon
17105
17106
17107
17108
17109
17110   { set +x
17111 $as_echo "$at_srcdir/backup01.at:36:
17112 mkdir v7
17113 (cd v7
17114 TEST_TAR_FORMAT=v7
17115 export TEST_TAR_FORMAT
17116 TAR_OPTIONS=\"-H v7\"
17117 export TAR_OPTIONS
17118 rm -rf *
17119
17120 unset VERSION_CONTROL
17121 mkdir dir1 dir2
17122 echo bla > dir1/file1
17123 tar cf test.tar dir1 dir2
17124 tar xfv test.tar --backup --warning=no-timestamp
17125 )"
17126 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17127 ( $at_check_trace;
17128 mkdir v7
17129 (cd v7
17130 TEST_TAR_FORMAT=v7
17131 export TEST_TAR_FORMAT
17132 TAR_OPTIONS="-H v7"
17133 export TAR_OPTIONS
17134 rm -rf *
17135
17136 unset VERSION_CONTROL
17137 mkdir dir1 dir2
17138 echo bla > dir1/file1
17139 tar cf test.tar dir1 dir2
17140 tar xfv test.tar --backup --warning=no-timestamp
17141 )
17142 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17143 at_status=$? at_failed=false
17144 $at_check_filter
17145 at_fn_diff_devnull "$at_stderr" || at_failed=:
17146 echo >>"$at_stdout"; $as_echo "dir1/
17147 dir1/file1
17148 Renaming 'dir1/file1' to 'dir1/file1~'
17149 dir2/
17150 " | \
17151   $at_diff - "$at_stdout" || at_failed=:
17152 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17153 $at_failed && at_fn_log_failure
17154 $at_traceon; }
17155
17156               { set +x
17157 $as_echo "$at_srcdir/backup01.at:36:
17158 mkdir oldgnu
17159 (cd oldgnu
17160 TEST_TAR_FORMAT=oldgnu
17161 export TEST_TAR_FORMAT
17162 TAR_OPTIONS=\"-H oldgnu\"
17163 export TAR_OPTIONS
17164 rm -rf *
17165
17166 unset VERSION_CONTROL
17167 mkdir dir1 dir2
17168 echo bla > dir1/file1
17169 tar cf test.tar dir1 dir2
17170 tar xfv test.tar --backup --warning=no-timestamp
17171 )"
17172 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17173 ( $at_check_trace;
17174 mkdir oldgnu
17175 (cd oldgnu
17176 TEST_TAR_FORMAT=oldgnu
17177 export TEST_TAR_FORMAT
17178 TAR_OPTIONS="-H oldgnu"
17179 export TAR_OPTIONS
17180 rm -rf *
17181
17182 unset VERSION_CONTROL
17183 mkdir dir1 dir2
17184 echo bla > dir1/file1
17185 tar cf test.tar dir1 dir2
17186 tar xfv test.tar --backup --warning=no-timestamp
17187 )
17188 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17189 at_status=$? at_failed=false
17190 $at_check_filter
17191 at_fn_diff_devnull "$at_stderr" || at_failed=:
17192 echo >>"$at_stdout"; $as_echo "dir1/
17193 dir1/file1
17194 Renaming 'dir1/file1' to 'dir1/file1~'
17195 dir2/
17196 " | \
17197   $at_diff - "$at_stdout" || at_failed=:
17198 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17199 $at_failed && at_fn_log_failure
17200 $at_traceon; }
17201
17202               { set +x
17203 $as_echo "$at_srcdir/backup01.at:36:
17204 mkdir ustar
17205 (cd ustar
17206 TEST_TAR_FORMAT=ustar
17207 export TEST_TAR_FORMAT
17208 TAR_OPTIONS=\"-H ustar\"
17209 export TAR_OPTIONS
17210 rm -rf *
17211
17212 unset VERSION_CONTROL
17213 mkdir dir1 dir2
17214 echo bla > dir1/file1
17215 tar cf test.tar dir1 dir2
17216 tar xfv test.tar --backup --warning=no-timestamp
17217 )"
17218 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17219 ( $at_check_trace;
17220 mkdir ustar
17221 (cd ustar
17222 TEST_TAR_FORMAT=ustar
17223 export TEST_TAR_FORMAT
17224 TAR_OPTIONS="-H ustar"
17225 export TAR_OPTIONS
17226 rm -rf *
17227
17228 unset VERSION_CONTROL
17229 mkdir dir1 dir2
17230 echo bla > dir1/file1
17231 tar cf test.tar dir1 dir2
17232 tar xfv test.tar --backup --warning=no-timestamp
17233 )
17234 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17235 at_status=$? at_failed=false
17236 $at_check_filter
17237 at_fn_diff_devnull "$at_stderr" || at_failed=:
17238 echo >>"$at_stdout"; $as_echo "dir1/
17239 dir1/file1
17240 Renaming 'dir1/file1' to 'dir1/file1~'
17241 dir2/
17242 " | \
17243   $at_diff - "$at_stdout" || at_failed=:
17244 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17245 $at_failed && at_fn_log_failure
17246 $at_traceon; }
17247
17248               { set +x
17249 $as_echo "$at_srcdir/backup01.at:36:
17250 mkdir posix
17251 (cd posix
17252 TEST_TAR_FORMAT=posix
17253 export TEST_TAR_FORMAT
17254 TAR_OPTIONS=\"-H posix\"
17255 export TAR_OPTIONS
17256 rm -rf *
17257
17258 unset VERSION_CONTROL
17259 mkdir dir1 dir2
17260 echo bla > dir1/file1
17261 tar cf test.tar dir1 dir2
17262 tar xfv test.tar --backup --warning=no-timestamp
17263 )"
17264 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17265 ( $at_check_trace;
17266 mkdir posix
17267 (cd posix
17268 TEST_TAR_FORMAT=posix
17269 export TEST_TAR_FORMAT
17270 TAR_OPTIONS="-H posix"
17271 export TAR_OPTIONS
17272 rm -rf *
17273
17274 unset VERSION_CONTROL
17275 mkdir dir1 dir2
17276 echo bla > dir1/file1
17277 tar cf test.tar dir1 dir2
17278 tar xfv test.tar --backup --warning=no-timestamp
17279 )
17280 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17281 at_status=$? at_failed=false
17282 $at_check_filter
17283 at_fn_diff_devnull "$at_stderr" || at_failed=:
17284 echo >>"$at_stdout"; $as_echo "dir1/
17285 dir1/file1
17286 Renaming 'dir1/file1' to 'dir1/file1~'
17287 dir2/
17288 " | \
17289   $at_diff - "$at_stdout" || at_failed=:
17290 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17291 $at_failed && at_fn_log_failure
17292 $at_traceon; }
17293
17294               { set +x
17295 $as_echo "$at_srcdir/backup01.at:36:
17296 mkdir gnu
17297 (cd gnu
17298 TEST_TAR_FORMAT=gnu
17299 export TEST_TAR_FORMAT
17300 TAR_OPTIONS=\"-H gnu\"
17301 export TAR_OPTIONS
17302 rm -rf *
17303
17304 unset VERSION_CONTROL
17305 mkdir dir1 dir2
17306 echo bla > dir1/file1
17307 tar cf test.tar dir1 dir2
17308 tar xfv test.tar --backup --warning=no-timestamp
17309 )"
17310 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17311 ( $at_check_trace;
17312 mkdir gnu
17313 (cd gnu
17314 TEST_TAR_FORMAT=gnu
17315 export TEST_TAR_FORMAT
17316 TAR_OPTIONS="-H gnu"
17317 export TAR_OPTIONS
17318 rm -rf *
17319
17320 unset VERSION_CONTROL
17321 mkdir dir1 dir2
17322 echo bla > dir1/file1
17323 tar cf test.tar dir1 dir2
17324 tar xfv test.tar --backup --warning=no-timestamp
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 "dir1/
17331 dir1/file1
17332 Renaming 'dir1/file1' to 'dir1/file1~'
17333 dir2/
17334 " | \
17335   $at_diff - "$at_stdout" || at_failed=:
17336 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17337 $at_failed && at_fn_log_failure
17338 $at_traceon; }
17339
17340
17341
17342
17343   set +x
17344   $at_times_p && times >"$at_times_file"
17345 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17346 read at_status <"$at_status_file"
17347 #AT_STOP_74
17348 #AT_START_75
17349 at_fn_group_banner 75 'label01.at:21' \
17350   "single-volume label" "                            " 10
17351 at_xfail=no
17352       test -f $XFAILFILE && at_xfail=yes
17353 (
17354   $as_echo "75. $at_setup_line: testing $at_desc ..."
17355   $at_traceon
17356
17357
17358
17359
17360
17361   { set +x
17362 $as_echo "$at_srcdir/label01.at:24:
17363 mkdir gnu
17364 (cd gnu
17365 TEST_TAR_FORMAT=gnu
17366 export TEST_TAR_FORMAT
17367 TAR_OPTIONS=\"-H gnu\"
17368 export TAR_OPTIONS
17369 rm -rf *
17370
17371 genfile --file foo
17372 genfile --file bar
17373 tar -cf archive --label=Test foo bar
17374 tar tf archive
17375 )"
17376 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
17377 ( $at_check_trace;
17378 mkdir gnu
17379 (cd gnu
17380 TEST_TAR_FORMAT=gnu
17381 export TEST_TAR_FORMAT
17382 TAR_OPTIONS="-H gnu"
17383 export TAR_OPTIONS
17384 rm -rf *
17385
17386 genfile --file foo
17387 genfile --file bar
17388 tar -cf archive --label=Test foo bar
17389 tar tf archive
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 "Test
17396 foo
17397 bar
17398 " | \
17399   $at_diff - "$at_stdout" || at_failed=:
17400 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
17401 $at_failed && at_fn_log_failure
17402 $at_traceon; }
17403
17404               { set +x
17405 $as_echo "$at_srcdir/label01.at:24:
17406 mkdir oldgnu
17407 (cd oldgnu
17408 TEST_TAR_FORMAT=oldgnu
17409 export TEST_TAR_FORMAT
17410 TAR_OPTIONS=\"-H oldgnu\"
17411 export TAR_OPTIONS
17412 rm -rf *
17413
17414 genfile --file foo
17415 genfile --file bar
17416 tar -cf archive --label=Test foo bar
17417 tar tf archive
17418 )"
17419 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
17420 ( $at_check_trace;
17421 mkdir oldgnu
17422 (cd oldgnu
17423 TEST_TAR_FORMAT=oldgnu
17424 export TEST_TAR_FORMAT
17425 TAR_OPTIONS="-H oldgnu"
17426 export TAR_OPTIONS
17427 rm -rf *
17428
17429 genfile --file foo
17430 genfile --file bar
17431 tar -cf archive --label=Test foo bar
17432 tar tf archive
17433 )
17434 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17435 at_status=$? at_failed=false
17436 $at_check_filter
17437 at_fn_diff_devnull "$at_stderr" || at_failed=:
17438 echo >>"$at_stdout"; $as_echo "Test
17439 foo
17440 bar
17441 " | \
17442   $at_diff - "$at_stdout" || at_failed=:
17443 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
17444 $at_failed && at_fn_log_failure
17445 $at_traceon; }
17446
17447               { set +x
17448 $as_echo "$at_srcdir/label01.at:24:
17449 mkdir posix
17450 (cd posix
17451 TEST_TAR_FORMAT=posix
17452 export TEST_TAR_FORMAT
17453 TAR_OPTIONS=\"-H posix\"
17454 export TAR_OPTIONS
17455 rm -rf *
17456
17457 genfile --file foo
17458 genfile --file bar
17459 tar -cf archive --label=Test foo bar
17460 tar tf archive
17461 )"
17462 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
17463 ( $at_check_trace;
17464 mkdir posix
17465 (cd posix
17466 TEST_TAR_FORMAT=posix
17467 export TEST_TAR_FORMAT
17468 TAR_OPTIONS="-H posix"
17469 export TAR_OPTIONS
17470 rm -rf *
17471
17472 genfile --file foo
17473 genfile --file bar
17474 tar -cf archive --label=Test foo bar
17475 tar tf archive
17476 )
17477 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17478 at_status=$? at_failed=false
17479 $at_check_filter
17480 at_fn_diff_devnull "$at_stderr" || at_failed=:
17481 echo >>"$at_stdout"; $as_echo "Test
17482 foo
17483 bar
17484 " | \
17485   $at_diff - "$at_stdout" || at_failed=:
17486 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
17487 $at_failed && at_fn_log_failure
17488 $at_traceon; }
17489
17490
17491
17492
17493   set +x
17494   $at_times_p && times >"$at_times_file"
17495 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17496 read at_status <"$at_status_file"
17497 #AT_STOP_75
17498 #AT_START_76
17499 at_fn_group_banner 76 'label02.at:21' \
17500   "multi-volume label" "                             " 10
17501 at_xfail=no
17502       test -f $XFAILFILE && at_xfail=yes
17503 (
17504   $as_echo "76. $at_setup_line: testing $at_desc ..."
17505   $at_traceon
17506
17507
17508
17509
17510
17511   { set +x
17512 $as_echo "$at_srcdir/label02.at:24:
17513 mkdir gnu
17514 (cd gnu
17515 TEST_TAR_FORMAT=gnu
17516 export TEST_TAR_FORMAT
17517 TAR_OPTIONS=\"-H gnu\"
17518 export TAR_OPTIONS
17519 rm -rf *
17520
17521 exec <&-
17522 genfile --length 0 --file foo
17523 genfile --length 12288 --file bar
17524 genfile --length 12288 --file baz
17525 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
17526 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
17527 )"
17528 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
17529 ( $at_check_trace;
17530 mkdir gnu
17531 (cd gnu
17532 TEST_TAR_FORMAT=gnu
17533 export TEST_TAR_FORMAT
17534 TAR_OPTIONS="-H gnu"
17535 export TAR_OPTIONS
17536 rm -rf *
17537
17538 exec <&-
17539 genfile --length 0 --file foo
17540 genfile --length 12288 --file bar
17541 genfile --length 12288 --file baz
17542 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
17543 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
17544 )
17545 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17546 at_status=$? at_failed=false
17547 $at_check_filter
17548 at_fn_diff_devnull "$at_stderr" || at_failed=:
17549 echo >>"$at_stdout"; $as_echo "Test Volume 1
17550 foo
17551 bar
17552 baz
17553 " | \
17554   $at_diff - "$at_stdout" || at_failed=:
17555 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
17556 $at_failed && at_fn_log_failure
17557 $at_traceon; }
17558
17559               { set +x
17560 $as_echo "$at_srcdir/label02.at:24:
17561 mkdir oldgnu
17562 (cd oldgnu
17563 TEST_TAR_FORMAT=oldgnu
17564 export TEST_TAR_FORMAT
17565 TAR_OPTIONS=\"-H oldgnu\"
17566 export TAR_OPTIONS
17567 rm -rf *
17568
17569 exec <&-
17570 genfile --length 0 --file foo
17571 genfile --length 12288 --file bar
17572 genfile --length 12288 --file baz
17573 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
17574 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
17575 )"
17576 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
17577 ( $at_check_trace;
17578 mkdir oldgnu
17579 (cd oldgnu
17580 TEST_TAR_FORMAT=oldgnu
17581 export TEST_TAR_FORMAT
17582 TAR_OPTIONS="-H oldgnu"
17583 export TAR_OPTIONS
17584 rm -rf *
17585
17586 exec <&-
17587 genfile --length 0 --file foo
17588 genfile --length 12288 --file bar
17589 genfile --length 12288 --file baz
17590 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
17591 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
17592 )
17593 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17594 at_status=$? at_failed=false
17595 $at_check_filter
17596 at_fn_diff_devnull "$at_stderr" || at_failed=:
17597 echo >>"$at_stdout"; $as_echo "Test Volume 1
17598 foo
17599 bar
17600 baz
17601 " | \
17602   $at_diff - "$at_stdout" || at_failed=:
17603 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
17604 $at_failed && at_fn_log_failure
17605 $at_traceon; }
17606
17607               { set +x
17608 $as_echo "$at_srcdir/label02.at:24:
17609 mkdir posix
17610 (cd posix
17611 TEST_TAR_FORMAT=posix
17612 export TEST_TAR_FORMAT
17613 TAR_OPTIONS=\"-H posix\"
17614 export TAR_OPTIONS
17615 rm -rf *
17616
17617 exec <&-
17618 genfile --length 0 --file foo
17619 genfile --length 12288 --file bar
17620 genfile --length 12288 --file baz
17621 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
17622 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
17623 )"
17624 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
17625 ( $at_check_trace;
17626 mkdir posix
17627 (cd posix
17628 TEST_TAR_FORMAT=posix
17629 export TEST_TAR_FORMAT
17630 TAR_OPTIONS="-H posix"
17631 export TAR_OPTIONS
17632 rm -rf *
17633
17634 exec <&-
17635 genfile --length 0 --file foo
17636 genfile --length 12288 --file bar
17637 genfile --length 12288 --file baz
17638 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
17639 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
17640 )
17641 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17642 at_status=$? at_failed=false
17643 $at_check_filter
17644 at_fn_diff_devnull "$at_stderr" || at_failed=:
17645 echo >>"$at_stdout"; $as_echo "Test Volume 1
17646 foo
17647 bar
17648 baz
17649 " | \
17650   $at_diff - "$at_stdout" || at_failed=:
17651 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
17652 $at_failed && at_fn_log_failure
17653 $at_traceon; }
17654
17655
17656
17657
17658   set +x
17659   $at_times_p && times >"$at_times_file"
17660 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17661 read at_status <"$at_status_file"
17662 #AT_STOP_76
17663 #AT_START_77
17664 at_fn_group_banner 77 'label03.at:27' \
17665   "test-label option" "                              " 10
17666 at_xfail=no
17667       test -f $XFAILFILE && at_xfail=yes
17668 (
17669   $as_echo "77. $at_setup_line: testing $at_desc ..."
17670   $at_traceon
17671
17672
17673
17674
17675
17676   { set +x
17677 $as_echo "$at_srcdir/label03.at:30:
17678 mkdir gnu
17679 (cd gnu
17680 TEST_TAR_FORMAT=gnu
17681 export TEST_TAR_FORMAT
17682 TAR_OPTIONS=\"-H gnu\"
17683 export TAR_OPTIONS
17684 rm -rf *
17685
17686 exec <&-
17687 genfile --file file
17688 tar -c --label='iamalabel' --file iamanarchive file
17689 tar -c --file unlabeled.tar file
17690 decho \"# Display label\"
17691 tar --test-label --file=iamanarchive; echo \$?
17692 decho \"# Display label: unlabeled\"
17693 tar --test-label --file=unlabeled.tar; echo \$?
17694 decho \"# Test label: success\"
17695 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
17696 decho \"# Test label: failure\"
17697 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
17698 decho \"# Test label: unlabeled\"
17699 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
17700 decho \"# Test label, verbose: success\"
17701 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
17702 decho \"# Test label, verbose: failure\"
17703 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
17704 decho \"# Test label: multiple arguments\"
17705 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
17706 decho \"# Test label: wildcards\"
17707 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
17708 )"
17709 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
17710 ( $at_check_trace;
17711 mkdir gnu
17712 (cd gnu
17713 TEST_TAR_FORMAT=gnu
17714 export TEST_TAR_FORMAT
17715 TAR_OPTIONS="-H gnu"
17716 export TAR_OPTIONS
17717 rm -rf *
17718
17719 exec <&-
17720 genfile --file file
17721 tar -c --label='iamalabel' --file iamanarchive file
17722 tar -c --file unlabeled.tar file
17723 decho "# Display label"
17724 tar --test-label --file=iamanarchive; echo $?
17725 decho "# Display label: unlabeled"
17726 tar --test-label --file=unlabeled.tar; echo $?
17727 decho "# Test label: success"
17728 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
17729 decho "# Test label: failure"
17730 tar --test-label --file=iamanarchive 'amalabel'; echo $?
17731 decho "# Test label: unlabeled"
17732 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
17733 decho "# Test label, verbose: success"
17734 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
17735 decho "# Test label, verbose: failure"
17736 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
17737 decho "# Test label: multiple arguments"
17738 tar --test-label --file=iamanarchive a iamalabel b; echo $?
17739 decho "# Test label: wildcards"
17740 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
17741 )
17742 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17743 at_status=$? at_failed=false
17744 $at_check_filter
17745 echo >>"$at_stderr"; $as_echo "# Display label
17746 # Display label: unlabeled
17747 # Test label: success
17748 # Test label: failure
17749 # Test label: unlabeled
17750 # Test label, verbose: success
17751 # Test label, verbose: failure
17752 tar: Archive label mismatch
17753 # Test label: multiple arguments
17754 # Test label: wildcards
17755 " | \
17756   $at_diff - "$at_stderr" || at_failed=:
17757 echo >>"$at_stdout"; $as_echo "# Display label
17758 iamalabel
17759 0
17760 # Display label: unlabeled
17761 0
17762 # Test label: success
17763 0
17764 # Test label: failure
17765 1
17766 # Test label: unlabeled
17767 1
17768 # Test label, verbose: success
17769 iamalabel
17770 0
17771 # Test label, verbose: failure
17772 iamalabel
17773 1
17774 # Test label: multiple arguments
17775 0
17776 # Test label: wildcards
17777 0
17778 " | \
17779   $at_diff - "$at_stdout" || at_failed=:
17780 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
17781 $at_failed && at_fn_log_failure
17782 $at_traceon; }
17783
17784               { set +x
17785 $as_echo "$at_srcdir/label03.at:30:
17786 mkdir oldgnu
17787 (cd oldgnu
17788 TEST_TAR_FORMAT=oldgnu
17789 export TEST_TAR_FORMAT
17790 TAR_OPTIONS=\"-H oldgnu\"
17791 export TAR_OPTIONS
17792 rm -rf *
17793
17794 exec <&-
17795 genfile --file file
17796 tar -c --label='iamalabel' --file iamanarchive file
17797 tar -c --file unlabeled.tar file
17798 decho \"# Display label\"
17799 tar --test-label --file=iamanarchive; echo \$?
17800 decho \"# Display label: unlabeled\"
17801 tar --test-label --file=unlabeled.tar; echo \$?
17802 decho \"# Test label: success\"
17803 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
17804 decho \"# Test label: failure\"
17805 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
17806 decho \"# Test label: unlabeled\"
17807 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
17808 decho \"# Test label, verbose: success\"
17809 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
17810 decho \"# Test label, verbose: failure\"
17811 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
17812 decho \"# Test label: multiple arguments\"
17813 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
17814 decho \"# Test label: wildcards\"
17815 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
17816 )"
17817 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
17818 ( $at_check_trace;
17819 mkdir oldgnu
17820 (cd oldgnu
17821 TEST_TAR_FORMAT=oldgnu
17822 export TEST_TAR_FORMAT
17823 TAR_OPTIONS="-H oldgnu"
17824 export TAR_OPTIONS
17825 rm -rf *
17826
17827 exec <&-
17828 genfile --file file
17829 tar -c --label='iamalabel' --file iamanarchive file
17830 tar -c --file unlabeled.tar file
17831 decho "# Display label"
17832 tar --test-label --file=iamanarchive; echo $?
17833 decho "# Display label: unlabeled"
17834 tar --test-label --file=unlabeled.tar; echo $?
17835 decho "# Test label: success"
17836 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
17837 decho "# Test label: failure"
17838 tar --test-label --file=iamanarchive 'amalabel'; echo $?
17839 decho "# Test label: unlabeled"
17840 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
17841 decho "# Test label, verbose: success"
17842 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
17843 decho "# Test label, verbose: failure"
17844 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
17845 decho "# Test label: multiple arguments"
17846 tar --test-label --file=iamanarchive a iamalabel b; echo $?
17847 decho "# Test label: wildcards"
17848 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
17849 )
17850 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17851 at_status=$? at_failed=false
17852 $at_check_filter
17853 echo >>"$at_stderr"; $as_echo "# Display label
17854 # Display label: unlabeled
17855 # Test label: success
17856 # Test label: failure
17857 # Test label: unlabeled
17858 # Test label, verbose: success
17859 # Test label, verbose: failure
17860 tar: Archive label mismatch
17861 # Test label: multiple arguments
17862 # Test label: wildcards
17863 " | \
17864   $at_diff - "$at_stderr" || at_failed=:
17865 echo >>"$at_stdout"; $as_echo "# Display label
17866 iamalabel
17867 0
17868 # Display label: unlabeled
17869 0
17870 # Test label: success
17871 0
17872 # Test label: failure
17873 1
17874 # Test label: unlabeled
17875 1
17876 # Test label, verbose: success
17877 iamalabel
17878 0
17879 # Test label, verbose: failure
17880 iamalabel
17881 1
17882 # Test label: multiple arguments
17883 0
17884 # Test label: wildcards
17885 0
17886 " | \
17887   $at_diff - "$at_stdout" || at_failed=:
17888 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
17889 $at_failed && at_fn_log_failure
17890 $at_traceon; }
17891
17892               { set +x
17893 $as_echo "$at_srcdir/label03.at:30:
17894 mkdir posix
17895 (cd posix
17896 TEST_TAR_FORMAT=posix
17897 export TEST_TAR_FORMAT
17898 TAR_OPTIONS=\"-H posix\"
17899 export TAR_OPTIONS
17900 rm -rf *
17901
17902 exec <&-
17903 genfile --file file
17904 tar -c --label='iamalabel' --file iamanarchive file
17905 tar -c --file unlabeled.tar file
17906 decho \"# Display label\"
17907 tar --test-label --file=iamanarchive; echo \$?
17908 decho \"# Display label: unlabeled\"
17909 tar --test-label --file=unlabeled.tar; echo \$?
17910 decho \"# Test label: success\"
17911 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
17912 decho \"# Test label: failure\"
17913 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
17914 decho \"# Test label: unlabeled\"
17915 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
17916 decho \"# Test label, verbose: success\"
17917 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
17918 decho \"# Test label, verbose: failure\"
17919 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
17920 decho \"# Test label: multiple arguments\"
17921 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
17922 decho \"# Test label: wildcards\"
17923 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
17924 )"
17925 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
17926 ( $at_check_trace;
17927 mkdir posix
17928 (cd posix
17929 TEST_TAR_FORMAT=posix
17930 export TEST_TAR_FORMAT
17931 TAR_OPTIONS="-H posix"
17932 export TAR_OPTIONS
17933 rm -rf *
17934
17935 exec <&-
17936 genfile --file file
17937 tar -c --label='iamalabel' --file iamanarchive file
17938 tar -c --file unlabeled.tar file
17939 decho "# Display label"
17940 tar --test-label --file=iamanarchive; echo $?
17941 decho "# Display label: unlabeled"
17942 tar --test-label --file=unlabeled.tar; echo $?
17943 decho "# Test label: success"
17944 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
17945 decho "# Test label: failure"
17946 tar --test-label --file=iamanarchive 'amalabel'; echo $?
17947 decho "# Test label: unlabeled"
17948 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
17949 decho "# Test label, verbose: success"
17950 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
17951 decho "# Test label, verbose: failure"
17952 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
17953 decho "# Test label: multiple arguments"
17954 tar --test-label --file=iamanarchive a iamalabel b; echo $?
17955 decho "# Test label: wildcards"
17956 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
17957 )
17958 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17959 at_status=$? at_failed=false
17960 $at_check_filter
17961 echo >>"$at_stderr"; $as_echo "# Display label
17962 # Display label: unlabeled
17963 # Test label: success
17964 # Test label: failure
17965 # Test label: unlabeled
17966 # Test label, verbose: success
17967 # Test label, verbose: failure
17968 tar: Archive label mismatch
17969 # Test label: multiple arguments
17970 # Test label: wildcards
17971 " | \
17972   $at_diff - "$at_stderr" || at_failed=:
17973 echo >>"$at_stdout"; $as_echo "# Display label
17974 iamalabel
17975 0
17976 # Display label: unlabeled
17977 0
17978 # Test label: success
17979 0
17980 # Test label: failure
17981 1
17982 # Test label: unlabeled
17983 1
17984 # Test label, verbose: success
17985 iamalabel
17986 0
17987 # Test label, verbose: failure
17988 iamalabel
17989 1
17990 # Test label: multiple arguments
17991 0
17992 # Test label: wildcards
17993 0
17994 " | \
17995   $at_diff - "$at_stdout" || at_failed=:
17996 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
17997 $at_failed && at_fn_log_failure
17998 $at_traceon; }
17999
18000
18001
18002
18003   set +x
18004   $at_times_p && times >"$at_times_file"
18005 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18006 read at_status <"$at_status_file"
18007 #AT_STOP_77
18008 #AT_START_78
18009 at_fn_group_banner 78 'label04.at:27' \
18010   "label with non-create option" "                   " 10
18011 at_xfail=no
18012       test -f $XFAILFILE && at_xfail=yes
18013 (
18014   $as_echo "78. $at_setup_line: testing $at_desc ..."
18015   $at_traceon
18016
18017
18018
18019
18020
18021   { set +x
18022 $as_echo "$at_srcdir/label04.at:30:
18023 mkdir gnu
18024 (cd gnu
18025 TEST_TAR_FORMAT=gnu
18026 export TEST_TAR_FORMAT
18027 TAR_OPTIONS=\"-H gnu\"
18028 export TAR_OPTIONS
18029 rm -rf *
18030
18031 exec <&-
18032 genfile --file file
18033 decho \"# Create volume\"
18034 tar -c -f archive --label='New volume' file
18035 decho \"# Update: wrong label\"
18036 tar -rf archive --label='My volume' file; echo \$?
18037 decho \"# Update: right label\"
18038 tar -rf archive --label='New volume' file
18039 )"
18040 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
18041 ( $at_check_trace;
18042 mkdir gnu
18043 (cd gnu
18044 TEST_TAR_FORMAT=gnu
18045 export TEST_TAR_FORMAT
18046 TAR_OPTIONS="-H gnu"
18047 export TAR_OPTIONS
18048 rm -rf *
18049
18050 exec <&-
18051 genfile --file file
18052 decho "# Create volume"
18053 tar -c -f archive --label='New volume' file
18054 decho "# Update: wrong label"
18055 tar -rf archive --label='My volume' file; echo $?
18056 decho "# Update: right label"
18057 tar -rf archive --label='New volume' file
18058 )
18059 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18060 at_status=$? at_failed=false
18061 $at_check_filter
18062 echo >>"$at_stderr"; $as_echo "# Create volume
18063 # Update: wrong label
18064 tar: Volume 'New volume' does not match 'My volume'
18065 tar: Error is not recoverable: exiting now
18066 # Update: right label
18067 " | \
18068   $at_diff - "$at_stderr" || at_failed=:
18069 echo >>"$at_stdout"; $as_echo "# Create volume
18070 # Update: wrong label
18071 2
18072 # Update: right label
18073 " | \
18074   $at_diff - "$at_stdout" || at_failed=:
18075 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
18076 $at_failed && at_fn_log_failure
18077 $at_traceon; }
18078
18079               { set +x
18080 $as_echo "$at_srcdir/label04.at:30:
18081 mkdir oldgnu
18082 (cd oldgnu
18083 TEST_TAR_FORMAT=oldgnu
18084 export TEST_TAR_FORMAT
18085 TAR_OPTIONS=\"-H oldgnu\"
18086 export TAR_OPTIONS
18087 rm -rf *
18088
18089 exec <&-
18090 genfile --file file
18091 decho \"# Create volume\"
18092 tar -c -f archive --label='New volume' file
18093 decho \"# Update: wrong label\"
18094 tar -rf archive --label='My volume' file; echo \$?
18095 decho \"# Update: right label\"
18096 tar -rf archive --label='New volume' file
18097 )"
18098 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
18099 ( $at_check_trace;
18100 mkdir oldgnu
18101 (cd oldgnu
18102 TEST_TAR_FORMAT=oldgnu
18103 export TEST_TAR_FORMAT
18104 TAR_OPTIONS="-H oldgnu"
18105 export TAR_OPTIONS
18106 rm -rf *
18107
18108 exec <&-
18109 genfile --file file
18110 decho "# Create volume"
18111 tar -c -f archive --label='New volume' file
18112 decho "# Update: wrong label"
18113 tar -rf archive --label='My volume' file; echo $?
18114 decho "# Update: right label"
18115 tar -rf archive --label='New volume' file
18116 )
18117 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18118 at_status=$? at_failed=false
18119 $at_check_filter
18120 echo >>"$at_stderr"; $as_echo "# Create volume
18121 # Update: wrong label
18122 tar: Volume 'New volume' does not match 'My volume'
18123 tar: Error is not recoverable: exiting now
18124 # Update: right label
18125 " | \
18126   $at_diff - "$at_stderr" || at_failed=:
18127 echo >>"$at_stdout"; $as_echo "# Create volume
18128 # Update: wrong label
18129 2
18130 # Update: right label
18131 " | \
18132   $at_diff - "$at_stdout" || at_failed=:
18133 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
18134 $at_failed && at_fn_log_failure
18135 $at_traceon; }
18136
18137               { set +x
18138 $as_echo "$at_srcdir/label04.at:30:
18139 mkdir posix
18140 (cd posix
18141 TEST_TAR_FORMAT=posix
18142 export TEST_TAR_FORMAT
18143 TAR_OPTIONS=\"-H posix\"
18144 export TAR_OPTIONS
18145 rm -rf *
18146
18147 exec <&-
18148 genfile --file file
18149 decho \"# Create volume\"
18150 tar -c -f archive --label='New volume' file
18151 decho \"# Update: wrong label\"
18152 tar -rf archive --label='My volume' file; echo \$?
18153 decho \"# Update: right label\"
18154 tar -rf archive --label='New volume' file
18155 )"
18156 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
18157 ( $at_check_trace;
18158 mkdir posix
18159 (cd posix
18160 TEST_TAR_FORMAT=posix
18161 export TEST_TAR_FORMAT
18162 TAR_OPTIONS="-H posix"
18163 export TAR_OPTIONS
18164 rm -rf *
18165
18166 exec <&-
18167 genfile --file file
18168 decho "# Create volume"
18169 tar -c -f archive --label='New volume' file
18170 decho "# Update: wrong label"
18171 tar -rf archive --label='My volume' file; echo $?
18172 decho "# Update: right label"
18173 tar -rf archive --label='New volume' file
18174 )
18175 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18176 at_status=$? at_failed=false
18177 $at_check_filter
18178 echo >>"$at_stderr"; $as_echo "# Create volume
18179 # Update: wrong label
18180 tar: Volume 'New volume' does not match 'My volume'
18181 tar: Error is not recoverable: exiting now
18182 # Update: right label
18183 " | \
18184   $at_diff - "$at_stderr" || at_failed=:
18185 echo >>"$at_stdout"; $as_echo "# Create volume
18186 # Update: wrong label
18187 2
18188 # Update: right label
18189 " | \
18190   $at_diff - "$at_stdout" || at_failed=:
18191 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
18192 $at_failed && at_fn_log_failure
18193 $at_traceon; }
18194
18195
18196
18197
18198   set +x
18199   $at_times_p && times >"$at_times_file"
18200 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18201 read at_status <"$at_status_file"
18202 #AT_STOP_78
18203 #AT_START_79
18204 at_fn_group_banner 79 'label05.at:24' \
18205   "label with non-create option" "                   " 10
18206 at_xfail=no
18207       test -f $XFAILFILE && at_xfail=yes
18208 (
18209   $as_echo "79. $at_setup_line: testing $at_desc ..."
18210   $at_traceon
18211
18212
18213
18214
18215
18216   { set +x
18217 $as_echo "$at_srcdir/label05.at:27:
18218 mkdir gnu
18219 (cd gnu
18220 TEST_TAR_FORMAT=gnu
18221 export TEST_TAR_FORMAT
18222 TAR_OPTIONS=\"-H gnu\"
18223 export TAR_OPTIONS
18224 rm -rf *
18225
18226 exec <&-
18227 genfile --file file
18228 decho \"# Create volume\"
18229 tar -c -f archive file
18230 decho \"# Update: wrong label\"
18231 tar -rf archive --label='My volume' file; echo \$?
18232 decho \"# Update: right label\"
18233 tar -rf archive file
18234 )"
18235 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
18236 ( $at_check_trace;
18237 mkdir gnu
18238 (cd gnu
18239 TEST_TAR_FORMAT=gnu
18240 export TEST_TAR_FORMAT
18241 TAR_OPTIONS="-H gnu"
18242 export TAR_OPTIONS
18243 rm -rf *
18244
18245 exec <&-
18246 genfile --file file
18247 decho "# Create volume"
18248 tar -c -f archive file
18249 decho "# Update: wrong label"
18250 tar -rf archive --label='My volume' file; echo $?
18251 decho "# Update: right label"
18252 tar -rf archive file
18253 )
18254 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18255 at_status=$? at_failed=false
18256 $at_check_filter
18257 echo >>"$at_stderr"; $as_echo "# Create volume
18258 # Update: wrong label
18259 tar: Archive not labeled to match 'My volume'
18260 tar: Error is not recoverable: exiting now
18261 # Update: right label
18262 " | \
18263   $at_diff - "$at_stderr" || at_failed=:
18264 echo >>"$at_stdout"; $as_echo "# Create volume
18265 # Update: wrong label
18266 2
18267 # Update: right label
18268 " | \
18269   $at_diff - "$at_stdout" || at_failed=:
18270 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
18271 $at_failed && at_fn_log_failure
18272 $at_traceon; }
18273
18274               { set +x
18275 $as_echo "$at_srcdir/label05.at:27:
18276 mkdir oldgnu
18277 (cd oldgnu
18278 TEST_TAR_FORMAT=oldgnu
18279 export TEST_TAR_FORMAT
18280 TAR_OPTIONS=\"-H oldgnu\"
18281 export TAR_OPTIONS
18282 rm -rf *
18283
18284 exec <&-
18285 genfile --file file
18286 decho \"# Create volume\"
18287 tar -c -f archive file
18288 decho \"# Update: wrong label\"
18289 tar -rf archive --label='My volume' file; echo \$?
18290 decho \"# Update: right label\"
18291 tar -rf archive file
18292 )"
18293 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
18294 ( $at_check_trace;
18295 mkdir oldgnu
18296 (cd oldgnu
18297 TEST_TAR_FORMAT=oldgnu
18298 export TEST_TAR_FORMAT
18299 TAR_OPTIONS="-H oldgnu"
18300 export TAR_OPTIONS
18301 rm -rf *
18302
18303 exec <&-
18304 genfile --file file
18305 decho "# Create volume"
18306 tar -c -f archive file
18307 decho "# Update: wrong label"
18308 tar -rf archive --label='My volume' file; echo $?
18309 decho "# Update: right label"
18310 tar -rf archive file
18311 )
18312 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18313 at_status=$? at_failed=false
18314 $at_check_filter
18315 echo >>"$at_stderr"; $as_echo "# Create volume
18316 # Update: wrong label
18317 tar: Archive not labeled to match 'My volume'
18318 tar: Error is not recoverable: exiting now
18319 # Update: right label
18320 " | \
18321   $at_diff - "$at_stderr" || at_failed=:
18322 echo >>"$at_stdout"; $as_echo "# Create volume
18323 # Update: wrong label
18324 2
18325 # Update: right label
18326 " | \
18327   $at_diff - "$at_stdout" || at_failed=:
18328 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
18329 $at_failed && at_fn_log_failure
18330 $at_traceon; }
18331
18332               { set +x
18333 $as_echo "$at_srcdir/label05.at:27:
18334 mkdir posix
18335 (cd posix
18336 TEST_TAR_FORMAT=posix
18337 export TEST_TAR_FORMAT
18338 TAR_OPTIONS=\"-H posix\"
18339 export TAR_OPTIONS
18340 rm -rf *
18341
18342 exec <&-
18343 genfile --file file
18344 decho \"# Create volume\"
18345 tar -c -f archive file
18346 decho \"# Update: wrong label\"
18347 tar -rf archive --label='My volume' file; echo \$?
18348 decho \"# Update: right label\"
18349 tar -rf archive file
18350 )"
18351 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
18352 ( $at_check_trace;
18353 mkdir posix
18354 (cd posix
18355 TEST_TAR_FORMAT=posix
18356 export TEST_TAR_FORMAT
18357 TAR_OPTIONS="-H posix"
18358 export TAR_OPTIONS
18359 rm -rf *
18360
18361 exec <&-
18362 genfile --file file
18363 decho "# Create volume"
18364 tar -c -f archive file
18365 decho "# Update: wrong label"
18366 tar -rf archive --label='My volume' file; echo $?
18367 decho "# Update: right label"
18368 tar -rf archive file
18369 )
18370 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18371 at_status=$? at_failed=false
18372 $at_check_filter
18373 echo >>"$at_stderr"; $as_echo "# Create volume
18374 # Update: wrong label
18375 tar: Archive not labeled to match 'My volume'
18376 tar: Error is not recoverable: exiting now
18377 # Update: right label
18378 " | \
18379   $at_diff - "$at_stderr" || at_failed=:
18380 echo >>"$at_stdout"; $as_echo "# Create volume
18381 # Update: wrong label
18382 2
18383 # Update: right label
18384 " | \
18385   $at_diff - "$at_stdout" || at_failed=:
18386 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
18387 $at_failed && at_fn_log_failure
18388 $at_traceon; }
18389
18390
18391
18392
18393   set +x
18394   $at_times_p && times >"$at_times_file"
18395 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18396 read at_status <"$at_status_file"
18397 #AT_STOP_79
18398 #AT_START_80
18399 at_fn_group_banner 80 'incremental.at:23' \
18400   "incremental" "                                    " 11
18401 at_xfail=no
18402       test -f $XFAILFILE && at_xfail=yes
18403 (
18404   $as_echo "80. $at_setup_line: testing $at_desc ..."
18405   $at_traceon
18406
18407
18408
18409
18410
18411   { set +x
18412 $as_echo "$at_srcdir/incremental.at:26:
18413 mkdir gnu
18414 (cd gnu
18415 TEST_TAR_FORMAT=gnu
18416 export TEST_TAR_FORMAT
18417 TAR_OPTIONS=\"-H gnu\"
18418 export TAR_OPTIONS
18419 rm -rf *
18420
18421 mkdir structure
18422 echo x >structure/file
18423
18424 # On Nextstep (and perhaps other 4.3BSD systems),
18425 # a newly created file's ctime isn't updated
18426 # until the next sync or stat operation on the file.
18427 ls -l structure/file >/dev/null
18428
18429 # If the time of an initial backup and the creation time of a file contained
18430 # in that backup are the same, the file will be backed up again when an
18431 # incremental backup is done, because the incremental backup backs up
18432 # files created \"on or after\" the initial backup time.  Without the sleep
18433 # command, behaviour of tar becomes variable, depending whether the system
18434 # clock ticked over to the next second between creating the file and
18435 # backing it up.
18436 sleep 1
18437
18438 tar cf archive --listed=list structure
18439 tar cfv archive --listed=list structure
18440 echo separator
18441 # ReiserFS often offsets the timestamps of newly created files
18442 # 1 second to the past.  Try to compensate for it, until a better
18443 # solution is found.
18444 sleep 2
18445 echo y >structure/file
18446 tar cfv archive --listed=list structure
18447 )"
18448 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
18449 ( $at_check_trace;
18450 mkdir gnu
18451 (cd gnu
18452 TEST_TAR_FORMAT=gnu
18453 export TEST_TAR_FORMAT
18454 TAR_OPTIONS="-H gnu"
18455 export TAR_OPTIONS
18456 rm -rf *
18457
18458 mkdir structure
18459 echo x >structure/file
18460
18461 # On Nextstep (and perhaps other 4.3BSD systems),
18462 # a newly created file's ctime isn't updated
18463 # until the next sync or stat operation on the file.
18464 ls -l structure/file >/dev/null
18465
18466 # If the time of an initial backup and the creation time of a file contained
18467 # in that backup are the same, the file will be backed up again when an
18468 # incremental backup is done, because the incremental backup backs up
18469 # files created "on or after" the initial backup time.  Without the sleep
18470 # command, behaviour of tar becomes variable, depending whether the system
18471 # clock ticked over to the next second between creating the file and
18472 # backing it up.
18473 sleep 1
18474
18475 tar cf archive --listed=list structure
18476 tar cfv archive --listed=list structure
18477 echo separator
18478 # ReiserFS often offsets the timestamps of newly created files
18479 # 1 second to the past.  Try to compensate for it, until a better
18480 # solution is found.
18481 sleep 2
18482 echo y >structure/file
18483 tar cfv archive --listed=list structure
18484 )
18485 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18486 at_status=$? at_failed=false
18487 $at_check_filter
18488 at_fn_diff_devnull "$at_stderr" || at_failed=:
18489 echo >>"$at_stdout"; $as_echo "structure/
18490 separator
18491 structure/
18492 structure/file
18493 " | \
18494   $at_diff - "$at_stdout" || at_failed=:
18495 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
18496 $at_failed && at_fn_log_failure
18497 $at_traceon; }
18498
18499               { set +x
18500 $as_echo "$at_srcdir/incremental.at:26:
18501 mkdir oldgnu
18502 (cd oldgnu
18503 TEST_TAR_FORMAT=oldgnu
18504 export TEST_TAR_FORMAT
18505 TAR_OPTIONS=\"-H oldgnu\"
18506 export TAR_OPTIONS
18507 rm -rf *
18508
18509 mkdir structure
18510 echo x >structure/file
18511
18512 # On Nextstep (and perhaps other 4.3BSD systems),
18513 # a newly created file's ctime isn't updated
18514 # until the next sync or stat operation on the file.
18515 ls -l structure/file >/dev/null
18516
18517 # If the time of an initial backup and the creation time of a file contained
18518 # in that backup are the same, the file will be backed up again when an
18519 # incremental backup is done, because the incremental backup backs up
18520 # files created \"on or after\" the initial backup time.  Without the sleep
18521 # command, behaviour of tar becomes variable, depending whether the system
18522 # clock ticked over to the next second between creating the file and
18523 # backing it up.
18524 sleep 1
18525
18526 tar cf archive --listed=list structure
18527 tar cfv archive --listed=list structure
18528 echo separator
18529 # ReiserFS often offsets the timestamps of newly created files
18530 # 1 second to the past.  Try to compensate for it, until a better
18531 # solution is found.
18532 sleep 2
18533 echo y >structure/file
18534 tar cfv archive --listed=list structure
18535 )"
18536 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
18537 ( $at_check_trace;
18538 mkdir oldgnu
18539 (cd oldgnu
18540 TEST_TAR_FORMAT=oldgnu
18541 export TEST_TAR_FORMAT
18542 TAR_OPTIONS="-H oldgnu"
18543 export TAR_OPTIONS
18544 rm -rf *
18545
18546 mkdir structure
18547 echo x >structure/file
18548
18549 # On Nextstep (and perhaps other 4.3BSD systems),
18550 # a newly created file's ctime isn't updated
18551 # until the next sync or stat operation on the file.
18552 ls -l structure/file >/dev/null
18553
18554 # If the time of an initial backup and the creation time of a file contained
18555 # in that backup are the same, the file will be backed up again when an
18556 # incremental backup is done, because the incremental backup backs up
18557 # files created "on or after" the initial backup time.  Without the sleep
18558 # command, behaviour of tar becomes variable, depending whether the system
18559 # clock ticked over to the next second between creating the file and
18560 # backing it up.
18561 sleep 1
18562
18563 tar cf archive --listed=list structure
18564 tar cfv archive --listed=list structure
18565 echo separator
18566 # ReiserFS often offsets the timestamps of newly created files
18567 # 1 second to the past.  Try to compensate for it, until a better
18568 # solution is found.
18569 sleep 2
18570 echo y >structure/file
18571 tar cfv archive --listed=list structure
18572 )
18573 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18574 at_status=$? at_failed=false
18575 $at_check_filter
18576 at_fn_diff_devnull "$at_stderr" || at_failed=:
18577 echo >>"$at_stdout"; $as_echo "structure/
18578 separator
18579 structure/
18580 structure/file
18581 " | \
18582   $at_diff - "$at_stdout" || at_failed=:
18583 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
18584 $at_failed && at_fn_log_failure
18585 $at_traceon; }
18586
18587               { set +x
18588 $as_echo "$at_srcdir/incremental.at:26:
18589 mkdir posix
18590 (cd posix
18591 TEST_TAR_FORMAT=posix
18592 export TEST_TAR_FORMAT
18593 TAR_OPTIONS=\"-H posix\"
18594 export TAR_OPTIONS
18595 rm -rf *
18596
18597 mkdir structure
18598 echo x >structure/file
18599
18600 # On Nextstep (and perhaps other 4.3BSD systems),
18601 # a newly created file's ctime isn't updated
18602 # until the next sync or stat operation on the file.
18603 ls -l structure/file >/dev/null
18604
18605 # If the time of an initial backup and the creation time of a file contained
18606 # in that backup are the same, the file will be backed up again when an
18607 # incremental backup is done, because the incremental backup backs up
18608 # files created \"on or after\" the initial backup time.  Without the sleep
18609 # command, behaviour of tar becomes variable, depending whether the system
18610 # clock ticked over to the next second between creating the file and
18611 # backing it up.
18612 sleep 1
18613
18614 tar cf archive --listed=list structure
18615 tar cfv archive --listed=list structure
18616 echo separator
18617 # ReiserFS often offsets the timestamps of newly created files
18618 # 1 second to the past.  Try to compensate for it, until a better
18619 # solution is found.
18620 sleep 2
18621 echo y >structure/file
18622 tar cfv archive --listed=list structure
18623 )"
18624 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
18625 ( $at_check_trace;
18626 mkdir posix
18627 (cd posix
18628 TEST_TAR_FORMAT=posix
18629 export TEST_TAR_FORMAT
18630 TAR_OPTIONS="-H posix"
18631 export TAR_OPTIONS
18632 rm -rf *
18633
18634 mkdir structure
18635 echo x >structure/file
18636
18637 # On Nextstep (and perhaps other 4.3BSD systems),
18638 # a newly created file's ctime isn't updated
18639 # until the next sync or stat operation on the file.
18640 ls -l structure/file >/dev/null
18641
18642 # If the time of an initial backup and the creation time of a file contained
18643 # in that backup are the same, the file will be backed up again when an
18644 # incremental backup is done, because the incremental backup backs up
18645 # files created "on or after" the initial backup time.  Without the sleep
18646 # command, behaviour of tar becomes variable, depending whether the system
18647 # clock ticked over to the next second between creating the file and
18648 # backing it up.
18649 sleep 1
18650
18651 tar cf archive --listed=list structure
18652 tar cfv archive --listed=list structure
18653 echo separator
18654 # ReiserFS often offsets the timestamps of newly created files
18655 # 1 second to the past.  Try to compensate for it, until a better
18656 # solution is found.
18657 sleep 2
18658 echo y >structure/file
18659 tar cfv archive --listed=list structure
18660 )
18661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18662 at_status=$? at_failed=false
18663 $at_check_filter
18664 at_fn_diff_devnull "$at_stderr" || at_failed=:
18665 echo >>"$at_stdout"; $as_echo "structure/
18666 separator
18667 structure/
18668 structure/file
18669 " | \
18670   $at_diff - "$at_stdout" || at_failed=:
18671 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
18672 $at_failed && at_fn_log_failure
18673 $at_traceon; }
18674
18675
18676
18677
18678   set +x
18679   $at_times_p && times >"$at_times_file"
18680 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18681 read at_status <"$at_status_file"
18682 #AT_STOP_80
18683 #AT_START_81
18684 at_fn_group_banner 81 'incr01.at:27' \
18685   "restore broken symlinks from incremental" "       " 11
18686 at_xfail=no
18687       test -f $XFAILFILE && at_xfail=yes
18688 (
18689   $as_echo "81. $at_setup_line: testing $at_desc ..."
18690   $at_traceon
18691
18692
18693
18694
18695
18696   { set +x
18697 $as_echo "$at_srcdir/incr01.at:30:
18698 mkdir gnu
18699 (cd gnu
18700 TEST_TAR_FORMAT=gnu
18701 export TEST_TAR_FORMAT
18702 TAR_OPTIONS=\"-H gnu\"
18703 export TAR_OPTIONS
18704 rm -rf *
18705
18706 mkdir directory
18707 \$as_ln_s foo directory/bar
18708
18709 tar -cf archive.0 -g db directory
18710 rm directory/bar
18711 tar -cf archive.1 -g db directory
18712
18713 mv directory orig
18714
18715 tar xvfg archive.0 /dev/null --warning=no-timestamp
18716 echo separator
18717 tar xvfg archive.1 /dev/null --warning=no-timestamp
18718 )"
18719 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
18720 ( $at_check_trace;
18721 mkdir gnu
18722 (cd gnu
18723 TEST_TAR_FORMAT=gnu
18724 export TEST_TAR_FORMAT
18725 TAR_OPTIONS="-H gnu"
18726 export TAR_OPTIONS
18727 rm -rf *
18728
18729 mkdir directory
18730 $as_ln_s foo directory/bar
18731
18732 tar -cf archive.0 -g db directory
18733 rm directory/bar
18734 tar -cf archive.1 -g db directory
18735
18736 mv directory orig
18737
18738 tar xvfg archive.0 /dev/null --warning=no-timestamp
18739 echo separator
18740 tar xvfg archive.1 /dev/null --warning=no-timestamp
18741 )
18742 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18743 at_status=$? at_failed=false
18744 $at_check_filter
18745 at_fn_diff_devnull "$at_stderr" || at_failed=:
18746 echo >>"$at_stdout"; $as_echo "directory/
18747 directory/bar
18748 separator
18749 directory/
18750 tar: Deleting 'directory/bar'
18751 " | \
18752   $at_diff - "$at_stdout" || at_failed=:
18753 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
18754 $at_failed && at_fn_log_failure
18755 $at_traceon; }
18756
18757               { set +x
18758 $as_echo "$at_srcdir/incr01.at:30:
18759 mkdir oldgnu
18760 (cd oldgnu
18761 TEST_TAR_FORMAT=oldgnu
18762 export TEST_TAR_FORMAT
18763 TAR_OPTIONS=\"-H oldgnu\"
18764 export TAR_OPTIONS
18765 rm -rf *
18766
18767 mkdir directory
18768 \$as_ln_s foo directory/bar
18769
18770 tar -cf archive.0 -g db directory
18771 rm directory/bar
18772 tar -cf archive.1 -g db directory
18773
18774 mv directory orig
18775
18776 tar xvfg archive.0 /dev/null --warning=no-timestamp
18777 echo separator
18778 tar xvfg archive.1 /dev/null --warning=no-timestamp
18779 )"
18780 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
18781 ( $at_check_trace;
18782 mkdir oldgnu
18783 (cd oldgnu
18784 TEST_TAR_FORMAT=oldgnu
18785 export TEST_TAR_FORMAT
18786 TAR_OPTIONS="-H oldgnu"
18787 export TAR_OPTIONS
18788 rm -rf *
18789
18790 mkdir directory
18791 $as_ln_s foo directory/bar
18792
18793 tar -cf archive.0 -g db directory
18794 rm directory/bar
18795 tar -cf archive.1 -g db directory
18796
18797 mv directory orig
18798
18799 tar xvfg archive.0 /dev/null --warning=no-timestamp
18800 echo separator
18801 tar xvfg archive.1 /dev/null --warning=no-timestamp
18802 )
18803 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18804 at_status=$? at_failed=false
18805 $at_check_filter
18806 at_fn_diff_devnull "$at_stderr" || at_failed=:
18807 echo >>"$at_stdout"; $as_echo "directory/
18808 directory/bar
18809 separator
18810 directory/
18811 tar: Deleting 'directory/bar'
18812 " | \
18813   $at_diff - "$at_stdout" || at_failed=:
18814 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
18815 $at_failed && at_fn_log_failure
18816 $at_traceon; }
18817
18818               { set +x
18819 $as_echo "$at_srcdir/incr01.at:30:
18820 mkdir posix
18821 (cd posix
18822 TEST_TAR_FORMAT=posix
18823 export TEST_TAR_FORMAT
18824 TAR_OPTIONS=\"-H posix\"
18825 export TAR_OPTIONS
18826 rm -rf *
18827
18828 mkdir directory
18829 \$as_ln_s foo directory/bar
18830
18831 tar -cf archive.0 -g db directory
18832 rm directory/bar
18833 tar -cf archive.1 -g db directory
18834
18835 mv directory orig
18836
18837 tar xvfg archive.0 /dev/null --warning=no-timestamp
18838 echo separator
18839 tar xvfg archive.1 /dev/null --warning=no-timestamp
18840 )"
18841 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
18842 ( $at_check_trace;
18843 mkdir posix
18844 (cd posix
18845 TEST_TAR_FORMAT=posix
18846 export TEST_TAR_FORMAT
18847 TAR_OPTIONS="-H posix"
18848 export TAR_OPTIONS
18849 rm -rf *
18850
18851 mkdir directory
18852 $as_ln_s foo directory/bar
18853
18854 tar -cf archive.0 -g db directory
18855 rm directory/bar
18856 tar -cf archive.1 -g db directory
18857
18858 mv directory orig
18859
18860 tar xvfg archive.0 /dev/null --warning=no-timestamp
18861 echo separator
18862 tar xvfg archive.1 /dev/null --warning=no-timestamp
18863 )
18864 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18865 at_status=$? at_failed=false
18866 $at_check_filter
18867 at_fn_diff_devnull "$at_stderr" || at_failed=:
18868 echo >>"$at_stdout"; $as_echo "directory/
18869 directory/bar
18870 separator
18871 directory/
18872 tar: Deleting 'directory/bar'
18873 " | \
18874   $at_diff - "$at_stdout" || at_failed=:
18875 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
18876 $at_failed && at_fn_log_failure
18877 $at_traceon; }
18878
18879
18880
18881
18882   set +x
18883   $at_times_p && times >"$at_times_file"
18884 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18885 read at_status <"$at_status_file"
18886 #AT_STOP_81
18887 #AT_START_82
18888 at_fn_group_banner 82 'incr02.at:32' \
18889   "restoring timestamps from incremental" "          " 11
18890 at_xfail=no
18891       test -f $XFAILFILE && at_xfail=yes
18892 (
18893   $as_echo "82. $at_setup_line: testing $at_desc ..."
18894   $at_traceon
18895
18896
18897
18898
18899
18900   { set +x
18901 $as_echo "$at_srcdir/incr02.at:35:
18902 mkdir gnu
18903 (cd gnu
18904 TEST_TAR_FORMAT=gnu
18905 export TEST_TAR_FORMAT
18906 TAR_OPTIONS=\"-H gnu\"
18907 export TAR_OPTIONS
18908 rm -rf *
18909
18910 # Create directory structure
18911 mkdir dir
18912 mkdir dir/subdir1
18913 mkdir dir/subdir2
18914 genfile --length 10 --file dir/subdir1/file
18915
18916 # Save mtime for later comparison
18917 genfile --stat=mtime dir/subdir1 > ts
18918
18919 # Create an archive. Using incremental mode makes sure the
18920 # archive will have a directory-first member ordering,
18921 # i.e.:
18922 # dir/
18923 # dir/subdir1/
18924 # dir/subdir2/
18925 # dir/subdir1/foofile
18926 #
18927 # When restoring from this directory structure, 'dir/subdir2/' used to
18928 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
18929 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
18930 # latter clobbered the directory timestamp.
18931
18932 tar -cf archive -g db dir
18933
18934 # Move away the directory
18935 mv dir orig
18936
18937 # Wait enough time for timestamps to differ in case of failure.
18938 sleep 5
18939
18940 # Restore the directory
18941 tar -xf archive dir
18942
18943 # Check the timestamp
18944 genfile --stat=mtime dir/subdir1 | diff ts -
18945 )"
18946 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
18947 ( $at_check_trace;
18948 mkdir gnu
18949 (cd gnu
18950 TEST_TAR_FORMAT=gnu
18951 export TEST_TAR_FORMAT
18952 TAR_OPTIONS="-H gnu"
18953 export TAR_OPTIONS
18954 rm -rf *
18955
18956 # Create directory structure
18957 mkdir dir
18958 mkdir dir/subdir1
18959 mkdir dir/subdir2
18960 genfile --length 10 --file dir/subdir1/file
18961
18962 # Save mtime for later comparison
18963 genfile --stat=mtime dir/subdir1 > ts
18964
18965 # Create an archive. Using incremental mode makes sure the
18966 # archive will have a directory-first member ordering,
18967 # i.e.:
18968 # dir/
18969 # dir/subdir1/
18970 # dir/subdir2/
18971 # dir/subdir1/foofile
18972 #
18973 # When restoring from this directory structure, 'dir/subdir2/' used to
18974 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
18975 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
18976 # latter clobbered the directory timestamp.
18977
18978 tar -cf archive -g db dir
18979
18980 # Move away the directory
18981 mv dir orig
18982
18983 # Wait enough time for timestamps to differ in case of failure.
18984 sleep 5
18985
18986 # Restore the directory
18987 tar -xf archive dir
18988
18989 # Check the timestamp
18990 genfile --stat=mtime dir/subdir1 | diff ts -
18991 )
18992 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18993 at_status=$? at_failed=false
18994 $at_check_filter
18995 at_fn_diff_devnull "$at_stderr" || at_failed=:
18996 at_fn_diff_devnull "$at_stdout" || at_failed=:
18997 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
18998 $at_failed && at_fn_log_failure
18999 $at_traceon; }
19000
19001               { set +x
19002 $as_echo "$at_srcdir/incr02.at:35:
19003 mkdir oldgnu
19004 (cd oldgnu
19005 TEST_TAR_FORMAT=oldgnu
19006 export TEST_TAR_FORMAT
19007 TAR_OPTIONS=\"-H oldgnu\"
19008 export TAR_OPTIONS
19009 rm -rf *
19010
19011 # Create directory structure
19012 mkdir dir
19013 mkdir dir/subdir1
19014 mkdir dir/subdir2
19015 genfile --length 10 --file dir/subdir1/file
19016
19017 # Save mtime for later comparison
19018 genfile --stat=mtime dir/subdir1 > ts
19019
19020 # Create an archive. Using incremental mode makes sure the
19021 # archive will have a directory-first member ordering,
19022 # i.e.:
19023 # dir/
19024 # dir/subdir1/
19025 # dir/subdir2/
19026 # dir/subdir1/foofile
19027 #
19028 # When restoring from this directory structure, 'dir/subdir2/' used to
19029 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19030 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19031 # latter clobbered the directory timestamp.
19032
19033 tar -cf archive -g db dir
19034
19035 # Move away the directory
19036 mv dir orig
19037
19038 # Wait enough time for timestamps to differ in case of failure.
19039 sleep 5
19040
19041 # Restore the directory
19042 tar -xf archive dir
19043
19044 # Check the timestamp
19045 genfile --stat=mtime dir/subdir1 | diff ts -
19046 )"
19047 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
19048 ( $at_check_trace;
19049 mkdir oldgnu
19050 (cd oldgnu
19051 TEST_TAR_FORMAT=oldgnu
19052 export TEST_TAR_FORMAT
19053 TAR_OPTIONS="-H oldgnu"
19054 export TAR_OPTIONS
19055 rm -rf *
19056
19057 # Create directory structure
19058 mkdir dir
19059 mkdir dir/subdir1
19060 mkdir dir/subdir2
19061 genfile --length 10 --file dir/subdir1/file
19062
19063 # Save mtime for later comparison
19064 genfile --stat=mtime dir/subdir1 > ts
19065
19066 # Create an archive. Using incremental mode makes sure the
19067 # archive will have a directory-first member ordering,
19068 # i.e.:
19069 # dir/
19070 # dir/subdir1/
19071 # dir/subdir2/
19072 # dir/subdir1/foofile
19073 #
19074 # When restoring from this directory structure, 'dir/subdir2/' used to
19075 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19076 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19077 # latter clobbered the directory timestamp.
19078
19079 tar -cf archive -g db dir
19080
19081 # Move away the directory
19082 mv dir orig
19083
19084 # Wait enough time for timestamps to differ in case of failure.
19085 sleep 5
19086
19087 # Restore the directory
19088 tar -xf archive dir
19089
19090 # Check the timestamp
19091 genfile --stat=mtime dir/subdir1 | diff ts -
19092 )
19093 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19094 at_status=$? at_failed=false
19095 $at_check_filter
19096 at_fn_diff_devnull "$at_stderr" || at_failed=:
19097 at_fn_diff_devnull "$at_stdout" || at_failed=:
19098 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
19099 $at_failed && at_fn_log_failure
19100 $at_traceon; }
19101
19102               { set +x
19103 $as_echo "$at_srcdir/incr02.at:35:
19104 mkdir posix
19105 (cd posix
19106 TEST_TAR_FORMAT=posix
19107 export TEST_TAR_FORMAT
19108 TAR_OPTIONS=\"-H posix\"
19109 export TAR_OPTIONS
19110 rm -rf *
19111
19112 # Create directory structure
19113 mkdir dir
19114 mkdir dir/subdir1
19115 mkdir dir/subdir2
19116 genfile --length 10 --file dir/subdir1/file
19117
19118 # Save mtime for later comparison
19119 genfile --stat=mtime dir/subdir1 > ts
19120
19121 # Create an archive. Using incremental mode makes sure the
19122 # archive will have a directory-first member ordering,
19123 # i.e.:
19124 # dir/
19125 # dir/subdir1/
19126 # dir/subdir2/
19127 # dir/subdir1/foofile
19128 #
19129 # When restoring from this directory structure, 'dir/subdir2/' used to
19130 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19131 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19132 # latter clobbered the directory timestamp.
19133
19134 tar -cf archive -g db dir
19135
19136 # Move away the directory
19137 mv dir orig
19138
19139 # Wait enough time for timestamps to differ in case of failure.
19140 sleep 5
19141
19142 # Restore the directory
19143 tar -xf archive dir
19144
19145 # Check the timestamp
19146 genfile --stat=mtime dir/subdir1 | diff ts -
19147 )"
19148 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
19149 ( $at_check_trace;
19150 mkdir posix
19151 (cd posix
19152 TEST_TAR_FORMAT=posix
19153 export TEST_TAR_FORMAT
19154 TAR_OPTIONS="-H posix"
19155 export TAR_OPTIONS
19156 rm -rf *
19157
19158 # Create directory structure
19159 mkdir dir
19160 mkdir dir/subdir1
19161 mkdir dir/subdir2
19162 genfile --length 10 --file dir/subdir1/file
19163
19164 # Save mtime for later comparison
19165 genfile --stat=mtime dir/subdir1 > ts
19166
19167 # Create an archive. Using incremental mode makes sure the
19168 # archive will have a directory-first member ordering,
19169 # i.e.:
19170 # dir/
19171 # dir/subdir1/
19172 # dir/subdir2/
19173 # dir/subdir1/foofile
19174 #
19175 # When restoring from this directory structure, 'dir/subdir2/' used to
19176 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19177 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19178 # latter clobbered the directory timestamp.
19179
19180 tar -cf archive -g db dir
19181
19182 # Move away the directory
19183 mv dir orig
19184
19185 # Wait enough time for timestamps to differ in case of failure.
19186 sleep 5
19187
19188 # Restore the directory
19189 tar -xf archive dir
19190
19191 # Check the timestamp
19192 genfile --stat=mtime dir/subdir1 | diff ts -
19193 )
19194 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19195 at_status=$? at_failed=false
19196 $at_check_filter
19197 at_fn_diff_devnull "$at_stderr" || at_failed=:
19198 at_fn_diff_devnull "$at_stdout" || at_failed=:
19199 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
19200 $at_failed && at_fn_log_failure
19201 $at_traceon; }
19202
19203
19204
19205
19206   set +x
19207   $at_times_p && times >"$at_times_file"
19208 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19209 read at_status <"$at_status_file"
19210 #AT_STOP_82
19211 #AT_START_83
19212 at_fn_group_banner 83 'listed01.at:26' \
19213   "--listed for individual files" "                  " 11
19214 at_xfail=no
19215       test -f $XFAILFILE && at_xfail=yes
19216 (
19217   $as_echo "83. $at_setup_line: testing $at_desc ..."
19218   $at_traceon
19219
19220
19221
19222
19223
19224   { set +x
19225 $as_echo "$at_srcdir/listed01.at:29:
19226 mkdir gnu
19227 (cd gnu
19228 TEST_TAR_FORMAT=gnu
19229 export TEST_TAR_FORMAT
19230 TAR_OPTIONS=\"-H gnu\"
19231 export TAR_OPTIONS
19232 rm -rf *
19233
19234 mkdir directory
19235 genfile --length 10240 --pattern zeros --file directory/file1
19236 # Let the things settle
19237 sleep 1
19238
19239 tar --create \\
19240     --file=archive.1 \\
19241     --listed-incremental=listing \\
19242     directory/file*
19243
19244 tar tf archive.1 || exit 1
19245
19246 sleep 2
19247
19248 genfile --length 10240 --pattern zeros --file directory/file2
19249
19250 echo \"separator\"
19251 cp listing listing.old
19252 tar --create \\
19253     --file=archive.2 \\
19254     --listed-incremental=listing \\
19255     directory/file* || exit 1
19256
19257 tar tf archive.2 || exit 1
19258 )"
19259 at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:29"
19260 ( $at_check_trace;
19261 mkdir gnu
19262 (cd gnu
19263 TEST_TAR_FORMAT=gnu
19264 export TEST_TAR_FORMAT
19265 TAR_OPTIONS="-H gnu"
19266 export TAR_OPTIONS
19267 rm -rf *
19268
19269 mkdir directory
19270 genfile --length 10240 --pattern zeros --file directory/file1
19271 # Let the things settle
19272 sleep 1
19273
19274 tar --create \
19275     --file=archive.1 \
19276     --listed-incremental=listing \
19277     directory/file*
19278
19279 tar tf archive.1 || exit 1
19280
19281 sleep 2
19282
19283 genfile --length 10240 --pattern zeros --file directory/file2
19284
19285 echo "separator"
19286 cp listing listing.old
19287 tar --create \
19288     --file=archive.2 \
19289     --listed-incremental=listing \
19290     directory/file* || exit 1
19291
19292 tar tf archive.2 || exit 1
19293 )
19294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19295 at_status=$? at_failed=false
19296 $at_check_filter
19297 at_fn_diff_devnull "$at_stderr" || at_failed=:
19298 echo >>"$at_stdout"; $as_echo "directory/file1
19299 separator
19300 directory/file2
19301 " | \
19302   $at_diff - "$at_stdout" || at_failed=:
19303 at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:29"
19304 $at_failed && at_fn_log_failure
19305 $at_traceon; }
19306
19307               { set +x
19308 $as_echo "$at_srcdir/listed01.at:29:
19309 mkdir oldgnu
19310 (cd oldgnu
19311 TEST_TAR_FORMAT=oldgnu
19312 export TEST_TAR_FORMAT
19313 TAR_OPTIONS=\"-H oldgnu\"
19314 export TAR_OPTIONS
19315 rm -rf *
19316
19317 mkdir directory
19318 genfile --length 10240 --pattern zeros --file directory/file1
19319 # Let the things settle
19320 sleep 1
19321
19322 tar --create \\
19323     --file=archive.1 \\
19324     --listed-incremental=listing \\
19325     directory/file*
19326
19327 tar tf archive.1 || exit 1
19328
19329 sleep 2
19330
19331 genfile --length 10240 --pattern zeros --file directory/file2
19332
19333 echo \"separator\"
19334 cp listing listing.old
19335 tar --create \\
19336     --file=archive.2 \\
19337     --listed-incremental=listing \\
19338     directory/file* || exit 1
19339
19340 tar tf archive.2 || exit 1
19341 )"
19342 at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:29"
19343 ( $at_check_trace;
19344 mkdir oldgnu
19345 (cd oldgnu
19346 TEST_TAR_FORMAT=oldgnu
19347 export TEST_TAR_FORMAT
19348 TAR_OPTIONS="-H oldgnu"
19349 export TAR_OPTIONS
19350 rm -rf *
19351
19352 mkdir directory
19353 genfile --length 10240 --pattern zeros --file directory/file1
19354 # Let the things settle
19355 sleep 1
19356
19357 tar --create \
19358     --file=archive.1 \
19359     --listed-incremental=listing \
19360     directory/file*
19361
19362 tar tf archive.1 || exit 1
19363
19364 sleep 2
19365
19366 genfile --length 10240 --pattern zeros --file directory/file2
19367
19368 echo "separator"
19369 cp listing listing.old
19370 tar --create \
19371     --file=archive.2 \
19372     --listed-incremental=listing \
19373     directory/file* || exit 1
19374
19375 tar tf archive.2 || exit 1
19376 )
19377 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19378 at_status=$? at_failed=false
19379 $at_check_filter
19380 at_fn_diff_devnull "$at_stderr" || at_failed=:
19381 echo >>"$at_stdout"; $as_echo "directory/file1
19382 separator
19383 directory/file2
19384 " | \
19385   $at_diff - "$at_stdout" || at_failed=:
19386 at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:29"
19387 $at_failed && at_fn_log_failure
19388 $at_traceon; }
19389
19390
19391
19392
19393   set +x
19394   $at_times_p && times >"$at_times_file"
19395 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19396 read at_status <"$at_status_file"
19397 #AT_STOP_83
19398 #AT_START_84
19399 at_fn_group_banner 84 'listed02.at:28' \
19400   "working --listed" "                               " 11
19401 at_xfail=no
19402       test -f $XFAILFILE && at_xfail=yes
19403 (
19404   $as_echo "84. $at_setup_line: testing $at_desc ..."
19405   $at_traceon
19406
19407
19408
19409
19410
19411   { set +x
19412 $as_echo "$at_srcdir/listed02.at:31:
19413 mkdir gnu
19414 (cd gnu
19415 TEST_TAR_FORMAT=gnu
19416 export TEST_TAR_FORMAT
19417 TAR_OPTIONS=\"-H gnu\"
19418 export TAR_OPTIONS
19419 rm -rf *
19420
19421
19422 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
19423
19424 echo Create directories
19425
19426 mkdir tart
19427 sleep 1
19428 mkdir tart/c0
19429 sleep 1
19430 mkdir tart/c1
19431 sleep 1
19432
19433 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
19434 do
19435   echo File \$file > \$file
19436   sleep 1
19437 done
19438
19439 sleep 1
19440 echo Creating main archive
19441 echo >&2 \"Creating main archive\"
19442 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
19443
19444 # The above prints two lines to stderr announcing the new directories c0 and c1.
19445 # Ensure that they appear in this script's stderr in sorted order.
19446 sort err 1>&2; rm -f err
19447
19448 sleep 1
19449 echo Modifying filesystem
19450 rm tart/a1
19451
19452 mv tart/b1 tart/b2
19453 mv tart/c1 tart/c2
19454 touch tart/c2/ca3
19455
19456 echo Directory contents
19457 find tart -print | sort 2>/dev/null
19458
19459 sleep 1
19460 echo Creating incremental archive
19461 echo >&2 \"Creating incremental archive\"
19462 cp -p tart.incr1 tart.incr2
19463 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
19464
19465 sleep 1
19466
19467 rm -rf tart/*
19468 echo Extracting main archive
19469 echo >&2 \"Extracting main archive\"
19470 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
19471 echo Extracting incremental archive
19472 # This command should produce three messages about deletion
19473 # of the existing files, that may appear in any order. Piping
19474 # to sort makes sure we don't depend on any particular ordering.
19475 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
19476
19477 echo Final files:
19478 find tart -print | sort 2>/dev/null
19479 )"
19480 at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:31"
19481 ( $at_check_trace;
19482 mkdir gnu
19483 (cd gnu
19484 TEST_TAR_FORMAT=gnu
19485 export TEST_TAR_FORMAT
19486 TAR_OPTIONS="-H gnu"
19487 export TAR_OPTIONS
19488 rm -rf *
19489
19490
19491 test -z "`sort < /dev/null 2>&1`" || exit 77
19492
19493 echo Create directories
19494
19495 mkdir tart
19496 sleep 1
19497 mkdir tart/c0
19498 sleep 1
19499 mkdir tart/c1
19500 sleep 1
19501
19502 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
19503 do
19504   echo File $file > $file
19505   sleep 1
19506 done
19507
19508 sleep 1
19509 echo Creating main archive
19510 echo >&2 "Creating main archive"
19511 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
19512
19513 # The above prints two lines to stderr announcing the new directories c0 and c1.
19514 # Ensure that they appear in this script's stderr in sorted order.
19515 sort err 1>&2; rm -f err
19516
19517 sleep 1
19518 echo Modifying filesystem
19519 rm tart/a1
19520
19521 mv tart/b1 tart/b2
19522 mv tart/c1 tart/c2
19523 touch tart/c2/ca3
19524
19525 echo Directory contents
19526 find tart -print | sort 2>/dev/null
19527
19528 sleep 1
19529 echo Creating incremental archive
19530 echo >&2 "Creating incremental archive"
19531 cp -p tart.incr1 tart.incr2
19532 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
19533
19534 sleep 1
19535
19536 rm -rf tart/*
19537 echo Extracting main archive
19538 echo >&2 "Extracting main archive"
19539 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
19540 echo Extracting incremental archive
19541 # This command should produce three messages about deletion
19542 # of the existing files, that may appear in any order. Piping
19543 # to sort makes sure we don't depend on any particular ordering.
19544 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
19545
19546 echo Final files:
19547 find tart -print | sort 2>/dev/null
19548 )
19549 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19550 at_status=$? at_failed=false
19551 $at_check_filter
19552 echo >>"$at_stderr"; $as_echo "Creating main archive
19553 tar: tart/c0: Directory is new
19554 tar: tart/c1: Directory is new
19555 tar: tart: Directory is new
19556 Creating incremental archive
19557 tar: tart/c2: Directory has been renamed from 'tart/c1'
19558 Extracting main archive
19559 " | \
19560   $at_diff - "$at_stderr" || at_failed=:
19561 echo >>"$at_stdout"; $as_echo "Create directories
19562 Creating main archive
19563 tart/
19564 tart/c0/
19565 tart/c1/
19566 tart/a1
19567 tart/b1
19568 tart/c0/cq1
19569 tart/c0/cq2
19570 tart/c1/ca1
19571 tart/c1/ca2
19572 Modifying filesystem
19573 Directory contents
19574 tart
19575 tart/b2
19576 tart/c0
19577 tart/c0/cq1
19578 tart/c0/cq2
19579 tart/c2
19580 tart/c2/ca1
19581 tart/c2/ca2
19582 tart/c2/ca3
19583 Creating incremental archive
19584 tart/
19585 tart/c0/
19586 tart/c2/
19587 tart/b2
19588 tart/c2/ca3
19589 Extracting main archive
19590 tart/
19591 tart/c0/
19592 tart/c1/
19593 tart/a1
19594 tart/b1
19595 tart/c0/cq1
19596 tart/c0/cq2
19597 tart/c1/ca1
19598 tart/c1/ca2
19599 Extracting incremental archive
19600 tar: Deleting 'tart/a1'
19601 tar: Deleting 'tart/b1'
19602 tart/
19603 tart/b2
19604 tart/c0/
19605 tart/c2/
19606 tart/c2/ca3
19607 Final files:
19608 tart
19609 tart/b2
19610 tart/c0
19611 tart/c0/cq1
19612 tart/c0/cq2
19613 tart/c2
19614 tart/c2/ca1
19615 tart/c2/ca2
19616 tart/c2/ca3
19617 " | \
19618   $at_diff - "$at_stdout" || at_failed=:
19619 at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:31"
19620 $at_failed && at_fn_log_failure
19621 $at_traceon; }
19622
19623               { set +x
19624 $as_echo "$at_srcdir/listed02.at:31:
19625 mkdir oldgnu
19626 (cd oldgnu
19627 TEST_TAR_FORMAT=oldgnu
19628 export TEST_TAR_FORMAT
19629 TAR_OPTIONS=\"-H oldgnu\"
19630 export TAR_OPTIONS
19631 rm -rf *
19632
19633
19634 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
19635
19636 echo Create directories
19637
19638 mkdir tart
19639 sleep 1
19640 mkdir tart/c0
19641 sleep 1
19642 mkdir tart/c1
19643 sleep 1
19644
19645 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
19646 do
19647   echo File \$file > \$file
19648   sleep 1
19649 done
19650
19651 sleep 1
19652 echo Creating main archive
19653 echo >&2 \"Creating main archive\"
19654 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
19655
19656 # The above prints two lines to stderr announcing the new directories c0 and c1.
19657 # Ensure that they appear in this script's stderr in sorted order.
19658 sort err 1>&2; rm -f err
19659
19660 sleep 1
19661 echo Modifying filesystem
19662 rm tart/a1
19663
19664 mv tart/b1 tart/b2
19665 mv tart/c1 tart/c2
19666 touch tart/c2/ca3
19667
19668 echo Directory contents
19669 find tart -print | sort 2>/dev/null
19670
19671 sleep 1
19672 echo Creating incremental archive
19673 echo >&2 \"Creating incremental archive\"
19674 cp -p tart.incr1 tart.incr2
19675 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
19676
19677 sleep 1
19678
19679 rm -rf tart/*
19680 echo Extracting main archive
19681 echo >&2 \"Extracting main archive\"
19682 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
19683 echo Extracting incremental archive
19684 # This command should produce three messages about deletion
19685 # of the existing files, that may appear in any order. Piping
19686 # to sort makes sure we don't depend on any particular ordering.
19687 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
19688
19689 echo Final files:
19690 find tart -print | sort 2>/dev/null
19691 )"
19692 at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:31"
19693 ( $at_check_trace;
19694 mkdir oldgnu
19695 (cd oldgnu
19696 TEST_TAR_FORMAT=oldgnu
19697 export TEST_TAR_FORMAT
19698 TAR_OPTIONS="-H oldgnu"
19699 export TAR_OPTIONS
19700 rm -rf *
19701
19702
19703 test -z "`sort < /dev/null 2>&1`" || exit 77
19704
19705 echo Create directories
19706
19707 mkdir tart
19708 sleep 1
19709 mkdir tart/c0
19710 sleep 1
19711 mkdir tart/c1
19712 sleep 1
19713
19714 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
19715 do
19716   echo File $file > $file
19717   sleep 1
19718 done
19719
19720 sleep 1
19721 echo Creating main archive
19722 echo >&2 "Creating main archive"
19723 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
19724
19725 # The above prints two lines to stderr announcing the new directories c0 and c1.
19726 # Ensure that they appear in this script's stderr in sorted order.
19727 sort err 1>&2; rm -f err
19728
19729 sleep 1
19730 echo Modifying filesystem
19731 rm tart/a1
19732
19733 mv tart/b1 tart/b2
19734 mv tart/c1 tart/c2
19735 touch tart/c2/ca3
19736
19737 echo Directory contents
19738 find tart -print | sort 2>/dev/null
19739
19740 sleep 1
19741 echo Creating incremental archive
19742 echo >&2 "Creating incremental archive"
19743 cp -p tart.incr1 tart.incr2
19744 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
19745
19746 sleep 1
19747
19748 rm -rf tart/*
19749 echo Extracting main archive
19750 echo >&2 "Extracting main archive"
19751 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
19752 echo Extracting incremental archive
19753 # This command should produce three messages about deletion
19754 # of the existing files, that may appear in any order. Piping
19755 # to sort makes sure we don't depend on any particular ordering.
19756 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
19757
19758 echo Final files:
19759 find tart -print | sort 2>/dev/null
19760 )
19761 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19762 at_status=$? at_failed=false
19763 $at_check_filter
19764 echo >>"$at_stderr"; $as_echo "Creating main archive
19765 tar: tart/c0: Directory is new
19766 tar: tart/c1: Directory is new
19767 tar: tart: Directory is new
19768 Creating incremental archive
19769 tar: tart/c2: Directory has been renamed from 'tart/c1'
19770 Extracting main archive
19771 " | \
19772   $at_diff - "$at_stderr" || at_failed=:
19773 echo >>"$at_stdout"; $as_echo "Create directories
19774 Creating main archive
19775 tart/
19776 tart/c0/
19777 tart/c1/
19778 tart/a1
19779 tart/b1
19780 tart/c0/cq1
19781 tart/c0/cq2
19782 tart/c1/ca1
19783 tart/c1/ca2
19784 Modifying filesystem
19785 Directory contents
19786 tart
19787 tart/b2
19788 tart/c0
19789 tart/c0/cq1
19790 tart/c0/cq2
19791 tart/c2
19792 tart/c2/ca1
19793 tart/c2/ca2
19794 tart/c2/ca3
19795 Creating incremental archive
19796 tart/
19797 tart/c0/
19798 tart/c2/
19799 tart/b2
19800 tart/c2/ca3
19801 Extracting main archive
19802 tart/
19803 tart/c0/
19804 tart/c1/
19805 tart/a1
19806 tart/b1
19807 tart/c0/cq1
19808 tart/c0/cq2
19809 tart/c1/ca1
19810 tart/c1/ca2
19811 Extracting incremental archive
19812 tar: Deleting 'tart/a1'
19813 tar: Deleting 'tart/b1'
19814 tart/
19815 tart/b2
19816 tart/c0/
19817 tart/c2/
19818 tart/c2/ca3
19819 Final files:
19820 tart
19821 tart/b2
19822 tart/c0
19823 tart/c0/cq1
19824 tart/c0/cq2
19825 tart/c2
19826 tart/c2/ca1
19827 tart/c2/ca2
19828 tart/c2/ca3
19829 " | \
19830   $at_diff - "$at_stdout" || at_failed=:
19831 at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:31"
19832 $at_failed && at_fn_log_failure
19833 $at_traceon; }
19834
19835
19836
19837
19838   set +x
19839   $at_times_p && times >"$at_times_file"
19840 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19841 read at_status <"$at_status_file"
19842 #AT_STOP_84
19843 #AT_START_85
19844 at_fn_group_banner 85 'listed03.at:24' \
19845   "incremental dump when the parent directory is unreadable" "" 11
19846 at_xfail=no
19847       test -f $XFAILFILE && at_xfail=yes
19848 (
19849   $as_echo "85. $at_setup_line: testing $at_desc ..."
19850   $at_traceon
19851
19852
19853
19854
19855
19856   { set +x
19857 $as_echo "$at_srcdir/listed03.at:27:
19858 mkdir gnu
19859 (cd gnu
19860 TEST_TAR_FORMAT=gnu
19861 export TEST_TAR_FORMAT
19862 TAR_OPTIONS=\"-H gnu\"
19863 export TAR_OPTIONS
19864 rm -rf *
19865
19866
19867 echo \"test\" > \$\$
19868 chmod 0 \$\$
19869 cat \$\$ > /dev/null 2>&1
19870 result=\$?
19871 rm -f \$\$
19872 test \$result -eq 0 && exit 77
19873
19874
19875 mkdir dir
19876 mkdir dir/sub
19877 mkdir dir/sub/a
19878 genfile --file dir/sub/a/file
19879 cd dir/sub
19880
19881 chmod a-r ..
19882 tar -c -f archive.tar --listed-incremental=db.1 -v a
19883 status=\$?
19884 chmod a+r ..
19885 exit \$status
19886 )"
19887 at_fn_check_prepare_notrace 'an embedded newline' "listed03.at:27"
19888 ( $at_check_trace;
19889 mkdir gnu
19890 (cd gnu
19891 TEST_TAR_FORMAT=gnu
19892 export TEST_TAR_FORMAT
19893 TAR_OPTIONS="-H gnu"
19894 export TAR_OPTIONS
19895 rm -rf *
19896
19897
19898 echo "test" > $$
19899 chmod 0 $$
19900 cat $$ > /dev/null 2>&1
19901 result=$?
19902 rm -f $$
19903 test $result -eq 0 && exit 77
19904
19905
19906 mkdir dir
19907 mkdir dir/sub
19908 mkdir dir/sub/a
19909 genfile --file dir/sub/a/file
19910 cd dir/sub
19911
19912 chmod a-r ..
19913 tar -c -f archive.tar --listed-incremental=db.1 -v a
19914 status=$?
19915 chmod a+r ..
19916 exit $status
19917 )
19918 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19919 at_status=$? at_failed=false
19920 $at_check_filter
19921 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
19922 " | \
19923   $at_diff - "$at_stderr" || at_failed=:
19924 echo >>"$at_stdout"; $as_echo "a/
19925 a/file
19926 " | \
19927   $at_diff - "$at_stdout" || at_failed=:
19928 at_fn_check_status 0 $at_status "$at_srcdir/listed03.at:27"
19929 $at_failed && at_fn_log_failure
19930 $at_traceon; }
19931
19932
19933
19934
19935   set +x
19936   $at_times_p && times >"$at_times_file"
19937 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19938 read at_status <"$at_status_file"
19939 #AT_STOP_85
19940 #AT_START_86
19941 at_fn_group_banner 86 'listed04.at:26' \
19942   "--listed-incremental and --one-file-system" "     " 11
19943 at_xfail=no
19944       test -f $XFAILFILE && at_xfail=yes
19945 (
19946   $as_echo "86. $at_setup_line: testing $at_desc ..."
19947   $at_traceon
19948
19949
19950
19951
19952
19953   { set +x
19954 $as_echo "$at_srcdir/listed04.at:29:
19955 mkdir gnu
19956 (cd gnu
19957 TEST_TAR_FORMAT=gnu
19958 export TEST_TAR_FORMAT
19959 TAR_OPTIONS=\"-H gnu\"
19960 export TAR_OPTIONS
19961 rm -rf *
19962
19963
19964 mkdir dir
19965 echo a >dir/a
19966 echo b >dir/b
19967
19968 tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
19969 tar -tf archive.tar || exit
19970 )"
19971 at_fn_check_prepare_notrace 'an embedded newline' "listed04.at:29"
19972 ( $at_check_trace;
19973 mkdir gnu
19974 (cd gnu
19975 TEST_TAR_FORMAT=gnu
19976 export TEST_TAR_FORMAT
19977 TAR_OPTIONS="-H gnu"
19978 export TAR_OPTIONS
19979 rm -rf *
19980
19981
19982 mkdir dir
19983 echo a >dir/a
19984 echo b >dir/b
19985
19986 tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
19987 tar -tf archive.tar || exit
19988 )
19989 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19990 at_status=$? at_failed=false
19991 $at_check_filter
19992 echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
19993 " | \
19994   $at_diff - "$at_stderr" || at_failed=:
19995 echo >>"$at_stdout"; $as_echo "dir/
19996 dir/a
19997 dir/b
19998 dir/
19999 dir/a
20000 dir/b
20001 " | \
20002   $at_diff - "$at_stdout" || at_failed=:
20003 at_fn_check_status 0 $at_status "$at_srcdir/listed04.at:29"
20004 $at_failed && at_fn_log_failure
20005 $at_traceon; }
20006
20007
20008
20009
20010   set +x
20011   $at_times_p && times >"$at_times_file"
20012 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20013 read at_status <"$at_status_file"
20014 #AT_STOP_86
20015 #AT_START_87
20016 at_fn_group_banner 87 'listed05.at:33' \
20017   "--listed-incremental and remounted directories" " " 11
20018 at_xfail=no
20019       test -f $XFAILFILE && at_xfail=yes
20020 (
20021   $as_echo "87. $at_setup_line: testing $at_desc ..."
20022   $at_traceon
20023
20024
20025
20026
20027
20028   { set +x
20029 $as_echo "$at_srcdir/listed05.at:36:
20030 mkdir gnu
20031 (cd gnu
20032 TEST_TAR_FORMAT=gnu
20033 export TEST_TAR_FORMAT
20034 TAR_OPTIONS=\"-H gnu\"
20035 export TAR_OPTIONS
20036 rm -rf *
20037
20038
20039 echo \"test\" > \$\$
20040 chmod 0 \$\$
20041 cat \$\$ > /dev/null 2>&1
20042 result=\$?
20043 rm -f \$\$
20044 test \$result -eq 0 || exit 77
20045
20046 options=\"-C tartest --create --one-file-system --verbose\"
20047 rm -rf archive-01.snar archive-01.tar tartest subdir
20048
20049 # Create initial structure
20050 mkdir tartest
20051 echo \"hi\" > tartest/top-level-file
20052 mkdir tartest/subdir
20053 echo \"hi\" > tartest/subdir/subdir-file
20054
20055 echo \"# Level 0\"
20056 tar \$options --file archive-0.tar --listed-incremental=archive-0.snar .
20057
20058 echo \"# Remount\"
20059 mv tartest/subdir .
20060 mkdir tartest/subdir
20061 mount -t ramfs none tartest/subdir || exit 77
20062 tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
20063
20064 echo \"# Level 1\"
20065 cp archive-0.snar archive-1.snar
20066 tar \$options --file archive-1.tar --listed-incremental=archive-1.snar .
20067
20068 umount tartest/subdir
20069 )"
20070 at_fn_check_prepare_notrace 'an embedded newline' "listed05.at:36"
20071 ( $at_check_trace;
20072 mkdir gnu
20073 (cd gnu
20074 TEST_TAR_FORMAT=gnu
20075 export TEST_TAR_FORMAT
20076 TAR_OPTIONS="-H gnu"
20077 export TAR_OPTIONS
20078 rm -rf *
20079
20080
20081 echo "test" > $$
20082 chmod 0 $$
20083 cat $$ > /dev/null 2>&1
20084 result=$?
20085 rm -f $$
20086 test $result -eq 0 || exit 77
20087
20088 options="-C tartest --create --one-file-system --verbose"
20089 rm -rf archive-01.snar archive-01.tar tartest subdir
20090
20091 # Create initial structure
20092 mkdir tartest
20093 echo "hi" > tartest/top-level-file
20094 mkdir tartest/subdir
20095 echo "hi" > tartest/subdir/subdir-file
20096
20097 echo "# Level 0"
20098 tar $options --file archive-0.tar --listed-incremental=archive-0.snar .
20099
20100 echo "# Remount"
20101 mv tartest/subdir .
20102 mkdir tartest/subdir
20103 mount -t ramfs none tartest/subdir || exit 77
20104 tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
20105
20106 echo "# Level 1"
20107 cp archive-0.snar archive-1.snar
20108 tar $options --file archive-1.tar --listed-incremental=archive-1.snar .
20109
20110 umount tartest/subdir
20111 )
20112 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20113 at_status=$? at_failed=false
20114 $at_check_filter
20115 echo >>"$at_stderr"; $as_echo "tar: .: Directory is new
20116 tar: ./subdir: Directory is new
20117 tar: ./subdir: directory is on a different filesystem; not dumped
20118 " | \
20119   $at_diff - "$at_stderr" || at_failed=:
20120 echo >>"$at_stdout"; $as_echo "# Level 0
20121 ./
20122 ./subdir/
20123 ./top-level-file
20124 ./subdir/subdir-file
20125 # Remount
20126 # Level 1
20127 ./
20128 ./subdir/
20129 " | \
20130   $at_diff - "$at_stdout" || at_failed=:
20131 at_fn_check_status 0 $at_status "$at_srcdir/listed05.at:36"
20132 $at_failed && at_fn_log_failure
20133 $at_traceon; }
20134
20135
20136
20137
20138   set +x
20139   $at_times_p && times >"$at_times_file"
20140 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20141 read at_status <"$at_status_file"
20142 #AT_STOP_87
20143 #AT_START_88
20144 at_fn_group_banner 88 'incr03.at:28' \
20145   "renamed files in incrementals" "                  " 11
20146 at_xfail=no
20147       test -f $XFAILFILE && at_xfail=yes
20148 (
20149   $as_echo "88. $at_setup_line: testing $at_desc ..."
20150   $at_traceon
20151
20152
20153
20154
20155
20156   { set +x
20157 $as_echo "$at_srcdir/incr03.at:31:
20158 mkdir gnu
20159 (cd gnu
20160 TEST_TAR_FORMAT=gnu
20161 export TEST_TAR_FORMAT
20162 TAR_OPTIONS=\"-H gnu\"
20163 export TAR_OPTIONS
20164 rm -rf *
20165
20166
20167 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
20168
20169 mkdir directory
20170 genfile --file=directory/x
20171 genfile --file=directory/y
20172
20173 sleep 1
20174
20175 tar -cf archive.1 -g db directory
20176
20177 mv directory/x directory/z
20178 cp db db.old
20179 tar -cf archive.2 -g db directory
20180
20181 mv directory orig
20182
20183 echo Listing of archive.1
20184 tar -tf archive.1 | sort
20185 echo Listing of archive.2
20186 tar -tf archive.2 | sort
20187
20188 echo Directory after first restore
20189 tar -xf archive.1 -g db --warning=no-timestamp
20190 find directory | sort
20191
20192 echo Directory after second restore
20193 tar -xf archive.2 -g db --warning=no-timestamp
20194 find directory | sort
20195 )"
20196 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
20197 ( $at_check_trace;
20198 mkdir gnu
20199 (cd gnu
20200 TEST_TAR_FORMAT=gnu
20201 export TEST_TAR_FORMAT
20202 TAR_OPTIONS="-H gnu"
20203 export TAR_OPTIONS
20204 rm -rf *
20205
20206
20207 test -z "`sort < /dev/null 2>&1`" || exit 77
20208
20209 mkdir directory
20210 genfile --file=directory/x
20211 genfile --file=directory/y
20212
20213 sleep 1
20214
20215 tar -cf archive.1 -g db directory
20216
20217 mv directory/x directory/z
20218 cp db db.old
20219 tar -cf archive.2 -g db directory
20220
20221 mv directory orig
20222
20223 echo Listing of archive.1
20224 tar -tf archive.1 | sort
20225 echo Listing of archive.2
20226 tar -tf archive.2 | sort
20227
20228 echo Directory after first restore
20229 tar -xf archive.1 -g db --warning=no-timestamp
20230 find directory | sort
20231
20232 echo Directory after second restore
20233 tar -xf archive.2 -g db --warning=no-timestamp
20234 find directory | sort
20235 )
20236 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20237 at_status=$? at_failed=false
20238 $at_check_filter
20239 at_fn_diff_devnull "$at_stderr" || at_failed=:
20240 echo >>"$at_stdout"; $as_echo "Listing of archive.1
20241 directory/
20242 directory/x
20243 directory/y
20244 Listing of archive.2
20245 directory/
20246 directory/z
20247 Directory after first restore
20248 directory
20249 directory/x
20250 directory/y
20251 Directory after second restore
20252 directory
20253 directory/y
20254 directory/z
20255 " | \
20256   $at_diff - "$at_stdout" || at_failed=:
20257 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
20258 $at_failed && at_fn_log_failure
20259 $at_traceon; }
20260
20261               { set +x
20262 $as_echo "$at_srcdir/incr03.at:31:
20263 mkdir oldgnu
20264 (cd oldgnu
20265 TEST_TAR_FORMAT=oldgnu
20266 export TEST_TAR_FORMAT
20267 TAR_OPTIONS=\"-H oldgnu\"
20268 export TAR_OPTIONS
20269 rm -rf *
20270
20271
20272 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
20273
20274 mkdir directory
20275 genfile --file=directory/x
20276 genfile --file=directory/y
20277
20278 sleep 1
20279
20280 tar -cf archive.1 -g db directory
20281
20282 mv directory/x directory/z
20283 cp db db.old
20284 tar -cf archive.2 -g db directory
20285
20286 mv directory orig
20287
20288 echo Listing of archive.1
20289 tar -tf archive.1 | sort
20290 echo Listing of archive.2
20291 tar -tf archive.2 | sort
20292
20293 echo Directory after first restore
20294 tar -xf archive.1 -g db --warning=no-timestamp
20295 find directory | sort
20296
20297 echo Directory after second restore
20298 tar -xf archive.2 -g db --warning=no-timestamp
20299 find directory | sort
20300 )"
20301 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
20302 ( $at_check_trace;
20303 mkdir oldgnu
20304 (cd oldgnu
20305 TEST_TAR_FORMAT=oldgnu
20306 export TEST_TAR_FORMAT
20307 TAR_OPTIONS="-H oldgnu"
20308 export TAR_OPTIONS
20309 rm -rf *
20310
20311
20312 test -z "`sort < /dev/null 2>&1`" || exit 77
20313
20314 mkdir directory
20315 genfile --file=directory/x
20316 genfile --file=directory/y
20317
20318 sleep 1
20319
20320 tar -cf archive.1 -g db directory
20321
20322 mv directory/x directory/z
20323 cp db db.old
20324 tar -cf archive.2 -g db directory
20325
20326 mv directory orig
20327
20328 echo Listing of archive.1
20329 tar -tf archive.1 | sort
20330 echo Listing of archive.2
20331 tar -tf archive.2 | sort
20332
20333 echo Directory after first restore
20334 tar -xf archive.1 -g db --warning=no-timestamp
20335 find directory | sort
20336
20337 echo Directory after second restore
20338 tar -xf archive.2 -g db --warning=no-timestamp
20339 find directory | sort
20340 )
20341 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20342 at_status=$? at_failed=false
20343 $at_check_filter
20344 at_fn_diff_devnull "$at_stderr" || at_failed=:
20345 echo >>"$at_stdout"; $as_echo "Listing of archive.1
20346 directory/
20347 directory/x
20348 directory/y
20349 Listing of archive.2
20350 directory/
20351 directory/z
20352 Directory after first restore
20353 directory
20354 directory/x
20355 directory/y
20356 Directory after second restore
20357 directory
20358 directory/y
20359 directory/z
20360 " | \
20361   $at_diff - "$at_stdout" || at_failed=:
20362 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
20363 $at_failed && at_fn_log_failure
20364 $at_traceon; }
20365
20366               { set +x
20367 $as_echo "$at_srcdir/incr03.at:31:
20368 mkdir posix
20369 (cd posix
20370 TEST_TAR_FORMAT=posix
20371 export TEST_TAR_FORMAT
20372 TAR_OPTIONS=\"-H posix\"
20373 export TAR_OPTIONS
20374 rm -rf *
20375
20376
20377 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
20378
20379 mkdir directory
20380 genfile --file=directory/x
20381 genfile --file=directory/y
20382
20383 sleep 1
20384
20385 tar -cf archive.1 -g db directory
20386
20387 mv directory/x directory/z
20388 cp db db.old
20389 tar -cf archive.2 -g db directory
20390
20391 mv directory orig
20392
20393 echo Listing of archive.1
20394 tar -tf archive.1 | sort
20395 echo Listing of archive.2
20396 tar -tf archive.2 | sort
20397
20398 echo Directory after first restore
20399 tar -xf archive.1 -g db --warning=no-timestamp
20400 find directory | sort
20401
20402 echo Directory after second restore
20403 tar -xf archive.2 -g db --warning=no-timestamp
20404 find directory | sort
20405 )"
20406 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
20407 ( $at_check_trace;
20408 mkdir posix
20409 (cd posix
20410 TEST_TAR_FORMAT=posix
20411 export TEST_TAR_FORMAT
20412 TAR_OPTIONS="-H posix"
20413 export TAR_OPTIONS
20414 rm -rf *
20415
20416
20417 test -z "`sort < /dev/null 2>&1`" || exit 77
20418
20419 mkdir directory
20420 genfile --file=directory/x
20421 genfile --file=directory/y
20422
20423 sleep 1
20424
20425 tar -cf archive.1 -g db directory
20426
20427 mv directory/x directory/z
20428 cp db db.old
20429 tar -cf archive.2 -g db directory
20430
20431 mv directory orig
20432
20433 echo Listing of archive.1
20434 tar -tf archive.1 | sort
20435 echo Listing of archive.2
20436 tar -tf archive.2 | sort
20437
20438 echo Directory after first restore
20439 tar -xf archive.1 -g db --warning=no-timestamp
20440 find directory | sort
20441
20442 echo Directory after second restore
20443 tar -xf archive.2 -g db --warning=no-timestamp
20444 find directory | sort
20445 )
20446 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20447 at_status=$? at_failed=false
20448 $at_check_filter
20449 at_fn_diff_devnull "$at_stderr" || at_failed=:
20450 echo >>"$at_stdout"; $as_echo "Listing of archive.1
20451 directory/
20452 directory/x
20453 directory/y
20454 Listing of archive.2
20455 directory/
20456 directory/z
20457 Directory after first restore
20458 directory
20459 directory/x
20460 directory/y
20461 Directory after second restore
20462 directory
20463 directory/y
20464 directory/z
20465 " | \
20466   $at_diff - "$at_stdout" || at_failed=:
20467 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
20468 $at_failed && at_fn_log_failure
20469 $at_traceon; }
20470
20471
20472
20473
20474   set +x
20475   $at_times_p && times >"$at_times_file"
20476 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20477 read at_status <"$at_status_file"
20478 #AT_STOP_88
20479 #AT_START_89
20480 at_fn_group_banner 89 'incr04.at:29' \
20481   "proper icontents initialization" "                " 11
20482 at_xfail=no
20483       test -f $XFAILFILE && at_xfail=yes
20484 (
20485   $as_echo "89. $at_setup_line: testing $at_desc ..."
20486   $at_traceon
20487
20488
20489
20490
20491
20492
20493
20494   { set +x
20495 $as_echo "$at_srcdir/incr04.at:34:
20496 mkdir gnu
20497 (cd gnu
20498 TEST_TAR_FORMAT=gnu
20499 export TEST_TAR_FORMAT
20500 TAR_OPTIONS=\"-H gnu\"
20501 export TAR_OPTIONS
20502 rm -rf *
20503
20504
20505 install-sh -d a/b >/dev/null  || exit 77
20506 awk 'BEGIN {
20507   for (i=1;i<=142;i++)
20508     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
20509   }' < /dev/null | genfile --files-from -
20510
20511 sleep 1
20512
20513 echo \"Initial dump\"
20514 tar cvf a0.tar -g a.sna a
20515 mv a/b a/c
20516 echo \"Incremental dump\"
20517 tar cvf a1.tar -g a.sna a
20518 )"
20519 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
20520 ( $at_check_trace;
20521 mkdir gnu
20522 (cd gnu
20523 TEST_TAR_FORMAT=gnu
20524 export TEST_TAR_FORMAT
20525 TAR_OPTIONS="-H gnu"
20526 export TAR_OPTIONS
20527 rm -rf *
20528
20529
20530 install-sh -d a/b >/dev/null  || exit 77
20531 awk 'BEGIN {
20532   for (i=1;i<=142;i++)
20533     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
20534   }' < /dev/null | genfile --files-from -
20535
20536 sleep 1
20537
20538 echo "Initial dump"
20539 tar cvf a0.tar -g a.sna a
20540 mv a/b a/c
20541 echo "Incremental dump"
20542 tar cvf a1.tar -g a.sna a
20543 )
20544 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20545 at_status=$? at_failed=false
20546 $at_check_filter
20547 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
20548 tar: a/b: Directory is new
20549 tar: a/c: Directory has been renamed from 'a/b'
20550 " | \
20551   $at_diff - "$at_stderr" || at_failed=:
20552 echo >>"$at_stdout"; $as_echo "Initial dump
20553 a/
20554 a/b/
20555 a/b/one_31_chars_long_file_name_001
20556 a/b/one_31_chars_long_file_name_002
20557 a/b/one_31_chars_long_file_name_003
20558 a/b/one_31_chars_long_file_name_004
20559 a/b/one_31_chars_long_file_name_005
20560 a/b/one_31_chars_long_file_name_006
20561 a/b/one_31_chars_long_file_name_007
20562 a/b/one_31_chars_long_file_name_008
20563 a/b/one_31_chars_long_file_name_009
20564 a/b/one_31_chars_long_file_name_010
20565 a/b/one_31_chars_long_file_name_011
20566 a/b/one_31_chars_long_file_name_012
20567 a/b/one_31_chars_long_file_name_013
20568 a/b/one_31_chars_long_file_name_014
20569 a/b/one_31_chars_long_file_name_015
20570 a/b/one_31_chars_long_file_name_016
20571 a/b/one_31_chars_long_file_name_017
20572 a/b/one_31_chars_long_file_name_018
20573 a/b/one_31_chars_long_file_name_019
20574 a/b/one_31_chars_long_file_name_020
20575 a/b/one_31_chars_long_file_name_021
20576 a/b/one_31_chars_long_file_name_022
20577 a/b/one_31_chars_long_file_name_023
20578 a/b/one_31_chars_long_file_name_024
20579 a/b/one_31_chars_long_file_name_025
20580 a/b/one_31_chars_long_file_name_026
20581 a/b/one_31_chars_long_file_name_027
20582 a/b/one_31_chars_long_file_name_028
20583 a/b/one_31_chars_long_file_name_029
20584 a/b/one_31_chars_long_file_name_030
20585 a/b/one_31_chars_long_file_name_031
20586 a/b/one_31_chars_long_file_name_032
20587 a/b/one_31_chars_long_file_name_033
20588 a/b/one_31_chars_long_file_name_034
20589 a/b/one_31_chars_long_file_name_035
20590 a/b/one_31_chars_long_file_name_036
20591 a/b/one_31_chars_long_file_name_037
20592 a/b/one_31_chars_long_file_name_038
20593 a/b/one_31_chars_long_file_name_039
20594 a/b/one_31_chars_long_file_name_040
20595 a/b/one_31_chars_long_file_name_041
20596 a/b/one_31_chars_long_file_name_042
20597 a/b/one_31_chars_long_file_name_043
20598 a/b/one_31_chars_long_file_name_044
20599 a/b/one_31_chars_long_file_name_045
20600 a/b/one_31_chars_long_file_name_046
20601 a/b/one_31_chars_long_file_name_047
20602 a/b/one_31_chars_long_file_name_048
20603 a/b/one_31_chars_long_file_name_049
20604 a/b/one_31_chars_long_file_name_050
20605 a/b/one_31_chars_long_file_name_051
20606 a/b/one_31_chars_long_file_name_052
20607 a/b/one_31_chars_long_file_name_053
20608 a/b/one_31_chars_long_file_name_054
20609 a/b/one_31_chars_long_file_name_055
20610 a/b/one_31_chars_long_file_name_056
20611 a/b/one_31_chars_long_file_name_057
20612 a/b/one_31_chars_long_file_name_058
20613 a/b/one_31_chars_long_file_name_059
20614 a/b/one_31_chars_long_file_name_060
20615 a/b/one_31_chars_long_file_name_061
20616 a/b/one_31_chars_long_file_name_062
20617 a/b/one_31_chars_long_file_name_063
20618 a/b/one_31_chars_long_file_name_064
20619 a/b/one_31_chars_long_file_name_065
20620 a/b/one_31_chars_long_file_name_066
20621 a/b/one_31_chars_long_file_name_067
20622 a/b/one_31_chars_long_file_name_068
20623 a/b/one_31_chars_long_file_name_069
20624 a/b/one_31_chars_long_file_name_070
20625 a/b/one_31_chars_long_file_name_071
20626 a/b/one_31_chars_long_file_name_072
20627 a/b/one_31_chars_long_file_name_073
20628 a/b/one_31_chars_long_file_name_074
20629 a/b/one_31_chars_long_file_name_075
20630 a/b/one_31_chars_long_file_name_076
20631 a/b/one_31_chars_long_file_name_077
20632 a/b/one_31_chars_long_file_name_078
20633 a/b/one_31_chars_long_file_name_079
20634 a/b/one_31_chars_long_file_name_080
20635 a/b/one_31_chars_long_file_name_081
20636 a/b/one_31_chars_long_file_name_082
20637 a/b/one_31_chars_long_file_name_083
20638 a/b/one_31_chars_long_file_name_084
20639 a/b/one_31_chars_long_file_name_085
20640 a/b/one_31_chars_long_file_name_086
20641 a/b/one_31_chars_long_file_name_087
20642 a/b/one_31_chars_long_file_name_088
20643 a/b/one_31_chars_long_file_name_089
20644 a/b/one_31_chars_long_file_name_090
20645 a/b/one_31_chars_long_file_name_091
20646 a/b/one_31_chars_long_file_name_092
20647 a/b/one_31_chars_long_file_name_093
20648 a/b/one_31_chars_long_file_name_094
20649 a/b/one_31_chars_long_file_name_095
20650 a/b/one_31_chars_long_file_name_096
20651 a/b/one_31_chars_long_file_name_097
20652 a/b/one_31_chars_long_file_name_098
20653 a/b/one_31_chars_long_file_name_099
20654 a/b/one_31_chars_long_file_name_100
20655 a/b/one_31_chars_long_file_name_101
20656 a/b/one_31_chars_long_file_name_102
20657 a/b/one_31_chars_long_file_name_103
20658 a/b/one_31_chars_long_file_name_104
20659 a/b/one_31_chars_long_file_name_105
20660 a/b/one_31_chars_long_file_name_106
20661 a/b/one_31_chars_long_file_name_107
20662 a/b/one_31_chars_long_file_name_108
20663 a/b/one_31_chars_long_file_name_109
20664 a/b/one_31_chars_long_file_name_110
20665 a/b/one_31_chars_long_file_name_111
20666 a/b/one_31_chars_long_file_name_112
20667 a/b/one_31_chars_long_file_name_113
20668 a/b/one_31_chars_long_file_name_114
20669 a/b/one_31_chars_long_file_name_115
20670 a/b/one_31_chars_long_file_name_116
20671 a/b/one_31_chars_long_file_name_117
20672 a/b/one_31_chars_long_file_name_118
20673 a/b/one_31_chars_long_file_name_119
20674 a/b/one_31_chars_long_file_name_120
20675 a/b/one_31_chars_long_file_name_121
20676 a/b/one_31_chars_long_file_name_122
20677 a/b/one_31_chars_long_file_name_123
20678 a/b/one_31_chars_long_file_name_124
20679 a/b/one_31_chars_long_file_name_125
20680 a/b/one_31_chars_long_file_name_126
20681 a/b/one_31_chars_long_file_name_127
20682 a/b/one_31_chars_long_file_name_128
20683 a/b/one_31_chars_long_file_name_129
20684 a/b/one_31_chars_long_file_name_130
20685 a/b/one_31_chars_long_file_name_131
20686 a/b/one_31_chars_long_file_name_132
20687 a/b/one_31_chars_long_file_name_133
20688 a/b/one_31_chars_long_file_name_134
20689 a/b/one_31_chars_long_file_name_135
20690 a/b/one_31_chars_long_file_name_136
20691 a/b/one_31_chars_long_file_name_137
20692 a/b/one_31_chars_long_file_name_138
20693 a/b/one_31_chars_long_file_name_139
20694 a/b/one_31_chars_long_file_name_140
20695 a/b/one_31_chars_long_file_name_141
20696 a/b/one_31_chars_long_file_name_142
20697 Incremental dump
20698 a/
20699 a/c/
20700 " | \
20701   $at_diff - "$at_stdout" || at_failed=:
20702 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
20703 $at_failed && at_fn_log_failure
20704 $at_traceon; }
20705
20706               { set +x
20707 $as_echo "$at_srcdir/incr04.at:34:
20708 mkdir oldgnu
20709 (cd oldgnu
20710 TEST_TAR_FORMAT=oldgnu
20711 export TEST_TAR_FORMAT
20712 TAR_OPTIONS=\"-H oldgnu\"
20713 export TAR_OPTIONS
20714 rm -rf *
20715
20716
20717 install-sh -d a/b >/dev/null  || exit 77
20718 awk 'BEGIN {
20719   for (i=1;i<=142;i++)
20720     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
20721   }' < /dev/null | genfile --files-from -
20722
20723 sleep 1
20724
20725 echo \"Initial dump\"
20726 tar cvf a0.tar -g a.sna a
20727 mv a/b a/c
20728 echo \"Incremental dump\"
20729 tar cvf a1.tar -g a.sna a
20730 )"
20731 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
20732 ( $at_check_trace;
20733 mkdir oldgnu
20734 (cd oldgnu
20735 TEST_TAR_FORMAT=oldgnu
20736 export TEST_TAR_FORMAT
20737 TAR_OPTIONS="-H oldgnu"
20738 export TAR_OPTIONS
20739 rm -rf *
20740
20741
20742 install-sh -d a/b >/dev/null  || exit 77
20743 awk 'BEGIN {
20744   for (i=1;i<=142;i++)
20745     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
20746   }' < /dev/null | genfile --files-from -
20747
20748 sleep 1
20749
20750 echo "Initial dump"
20751 tar cvf a0.tar -g a.sna a
20752 mv a/b a/c
20753 echo "Incremental dump"
20754 tar cvf a1.tar -g a.sna a
20755 )
20756 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20757 at_status=$? at_failed=false
20758 $at_check_filter
20759 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
20760 tar: a/b: Directory is new
20761 tar: a/c: Directory has been renamed from 'a/b'
20762 " | \
20763   $at_diff - "$at_stderr" || at_failed=:
20764 echo >>"$at_stdout"; $as_echo "Initial dump
20765 a/
20766 a/b/
20767 a/b/one_31_chars_long_file_name_001
20768 a/b/one_31_chars_long_file_name_002
20769 a/b/one_31_chars_long_file_name_003
20770 a/b/one_31_chars_long_file_name_004
20771 a/b/one_31_chars_long_file_name_005
20772 a/b/one_31_chars_long_file_name_006
20773 a/b/one_31_chars_long_file_name_007
20774 a/b/one_31_chars_long_file_name_008
20775 a/b/one_31_chars_long_file_name_009
20776 a/b/one_31_chars_long_file_name_010
20777 a/b/one_31_chars_long_file_name_011
20778 a/b/one_31_chars_long_file_name_012
20779 a/b/one_31_chars_long_file_name_013
20780 a/b/one_31_chars_long_file_name_014
20781 a/b/one_31_chars_long_file_name_015
20782 a/b/one_31_chars_long_file_name_016
20783 a/b/one_31_chars_long_file_name_017
20784 a/b/one_31_chars_long_file_name_018
20785 a/b/one_31_chars_long_file_name_019
20786 a/b/one_31_chars_long_file_name_020
20787 a/b/one_31_chars_long_file_name_021
20788 a/b/one_31_chars_long_file_name_022
20789 a/b/one_31_chars_long_file_name_023
20790 a/b/one_31_chars_long_file_name_024
20791 a/b/one_31_chars_long_file_name_025
20792 a/b/one_31_chars_long_file_name_026
20793 a/b/one_31_chars_long_file_name_027
20794 a/b/one_31_chars_long_file_name_028
20795 a/b/one_31_chars_long_file_name_029
20796 a/b/one_31_chars_long_file_name_030
20797 a/b/one_31_chars_long_file_name_031
20798 a/b/one_31_chars_long_file_name_032
20799 a/b/one_31_chars_long_file_name_033
20800 a/b/one_31_chars_long_file_name_034
20801 a/b/one_31_chars_long_file_name_035
20802 a/b/one_31_chars_long_file_name_036
20803 a/b/one_31_chars_long_file_name_037
20804 a/b/one_31_chars_long_file_name_038
20805 a/b/one_31_chars_long_file_name_039
20806 a/b/one_31_chars_long_file_name_040
20807 a/b/one_31_chars_long_file_name_041
20808 a/b/one_31_chars_long_file_name_042
20809 a/b/one_31_chars_long_file_name_043
20810 a/b/one_31_chars_long_file_name_044
20811 a/b/one_31_chars_long_file_name_045
20812 a/b/one_31_chars_long_file_name_046
20813 a/b/one_31_chars_long_file_name_047
20814 a/b/one_31_chars_long_file_name_048
20815 a/b/one_31_chars_long_file_name_049
20816 a/b/one_31_chars_long_file_name_050
20817 a/b/one_31_chars_long_file_name_051
20818 a/b/one_31_chars_long_file_name_052
20819 a/b/one_31_chars_long_file_name_053
20820 a/b/one_31_chars_long_file_name_054
20821 a/b/one_31_chars_long_file_name_055
20822 a/b/one_31_chars_long_file_name_056
20823 a/b/one_31_chars_long_file_name_057
20824 a/b/one_31_chars_long_file_name_058
20825 a/b/one_31_chars_long_file_name_059
20826 a/b/one_31_chars_long_file_name_060
20827 a/b/one_31_chars_long_file_name_061
20828 a/b/one_31_chars_long_file_name_062
20829 a/b/one_31_chars_long_file_name_063
20830 a/b/one_31_chars_long_file_name_064
20831 a/b/one_31_chars_long_file_name_065
20832 a/b/one_31_chars_long_file_name_066
20833 a/b/one_31_chars_long_file_name_067
20834 a/b/one_31_chars_long_file_name_068
20835 a/b/one_31_chars_long_file_name_069
20836 a/b/one_31_chars_long_file_name_070
20837 a/b/one_31_chars_long_file_name_071
20838 a/b/one_31_chars_long_file_name_072
20839 a/b/one_31_chars_long_file_name_073
20840 a/b/one_31_chars_long_file_name_074
20841 a/b/one_31_chars_long_file_name_075
20842 a/b/one_31_chars_long_file_name_076
20843 a/b/one_31_chars_long_file_name_077
20844 a/b/one_31_chars_long_file_name_078
20845 a/b/one_31_chars_long_file_name_079
20846 a/b/one_31_chars_long_file_name_080
20847 a/b/one_31_chars_long_file_name_081
20848 a/b/one_31_chars_long_file_name_082
20849 a/b/one_31_chars_long_file_name_083
20850 a/b/one_31_chars_long_file_name_084
20851 a/b/one_31_chars_long_file_name_085
20852 a/b/one_31_chars_long_file_name_086
20853 a/b/one_31_chars_long_file_name_087
20854 a/b/one_31_chars_long_file_name_088
20855 a/b/one_31_chars_long_file_name_089
20856 a/b/one_31_chars_long_file_name_090
20857 a/b/one_31_chars_long_file_name_091
20858 a/b/one_31_chars_long_file_name_092
20859 a/b/one_31_chars_long_file_name_093
20860 a/b/one_31_chars_long_file_name_094
20861 a/b/one_31_chars_long_file_name_095
20862 a/b/one_31_chars_long_file_name_096
20863 a/b/one_31_chars_long_file_name_097
20864 a/b/one_31_chars_long_file_name_098
20865 a/b/one_31_chars_long_file_name_099
20866 a/b/one_31_chars_long_file_name_100
20867 a/b/one_31_chars_long_file_name_101
20868 a/b/one_31_chars_long_file_name_102
20869 a/b/one_31_chars_long_file_name_103
20870 a/b/one_31_chars_long_file_name_104
20871 a/b/one_31_chars_long_file_name_105
20872 a/b/one_31_chars_long_file_name_106
20873 a/b/one_31_chars_long_file_name_107
20874 a/b/one_31_chars_long_file_name_108
20875 a/b/one_31_chars_long_file_name_109
20876 a/b/one_31_chars_long_file_name_110
20877 a/b/one_31_chars_long_file_name_111
20878 a/b/one_31_chars_long_file_name_112
20879 a/b/one_31_chars_long_file_name_113
20880 a/b/one_31_chars_long_file_name_114
20881 a/b/one_31_chars_long_file_name_115
20882 a/b/one_31_chars_long_file_name_116
20883 a/b/one_31_chars_long_file_name_117
20884 a/b/one_31_chars_long_file_name_118
20885 a/b/one_31_chars_long_file_name_119
20886 a/b/one_31_chars_long_file_name_120
20887 a/b/one_31_chars_long_file_name_121
20888 a/b/one_31_chars_long_file_name_122
20889 a/b/one_31_chars_long_file_name_123
20890 a/b/one_31_chars_long_file_name_124
20891 a/b/one_31_chars_long_file_name_125
20892 a/b/one_31_chars_long_file_name_126
20893 a/b/one_31_chars_long_file_name_127
20894 a/b/one_31_chars_long_file_name_128
20895 a/b/one_31_chars_long_file_name_129
20896 a/b/one_31_chars_long_file_name_130
20897 a/b/one_31_chars_long_file_name_131
20898 a/b/one_31_chars_long_file_name_132
20899 a/b/one_31_chars_long_file_name_133
20900 a/b/one_31_chars_long_file_name_134
20901 a/b/one_31_chars_long_file_name_135
20902 a/b/one_31_chars_long_file_name_136
20903 a/b/one_31_chars_long_file_name_137
20904 a/b/one_31_chars_long_file_name_138
20905 a/b/one_31_chars_long_file_name_139
20906 a/b/one_31_chars_long_file_name_140
20907 a/b/one_31_chars_long_file_name_141
20908 a/b/one_31_chars_long_file_name_142
20909 Incremental dump
20910 a/
20911 a/c/
20912 " | \
20913   $at_diff - "$at_stdout" || at_failed=:
20914 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
20915 $at_failed && at_fn_log_failure
20916 $at_traceon; }
20917
20918               { set +x
20919 $as_echo "$at_srcdir/incr04.at:34:
20920 mkdir posix
20921 (cd posix
20922 TEST_TAR_FORMAT=posix
20923 export TEST_TAR_FORMAT
20924 TAR_OPTIONS=\"-H posix\"
20925 export TAR_OPTIONS
20926 rm -rf *
20927
20928
20929 install-sh -d a/b >/dev/null  || exit 77
20930 awk 'BEGIN {
20931   for (i=1;i<=142;i++)
20932     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
20933   }' < /dev/null | genfile --files-from -
20934
20935 sleep 1
20936
20937 echo \"Initial dump\"
20938 tar cvf a0.tar -g a.sna a
20939 mv a/b a/c
20940 echo \"Incremental dump\"
20941 tar cvf a1.tar -g a.sna a
20942 )"
20943 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
20944 ( $at_check_trace;
20945 mkdir posix
20946 (cd posix
20947 TEST_TAR_FORMAT=posix
20948 export TEST_TAR_FORMAT
20949 TAR_OPTIONS="-H posix"
20950 export TAR_OPTIONS
20951 rm -rf *
20952
20953
20954 install-sh -d a/b >/dev/null  || exit 77
20955 awk 'BEGIN {
20956   for (i=1;i<=142;i++)
20957     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
20958   }' < /dev/null | genfile --files-from -
20959
20960 sleep 1
20961
20962 echo "Initial dump"
20963 tar cvf a0.tar -g a.sna a
20964 mv a/b a/c
20965 echo "Incremental dump"
20966 tar cvf a1.tar -g a.sna a
20967 )
20968 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20969 at_status=$? at_failed=false
20970 $at_check_filter
20971 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
20972 tar: a/b: Directory is new
20973 tar: a/c: Directory has been renamed from 'a/b'
20974 " | \
20975   $at_diff - "$at_stderr" || at_failed=:
20976 echo >>"$at_stdout"; $as_echo "Initial dump
20977 a/
20978 a/b/
20979 a/b/one_31_chars_long_file_name_001
20980 a/b/one_31_chars_long_file_name_002
20981 a/b/one_31_chars_long_file_name_003
20982 a/b/one_31_chars_long_file_name_004
20983 a/b/one_31_chars_long_file_name_005
20984 a/b/one_31_chars_long_file_name_006
20985 a/b/one_31_chars_long_file_name_007
20986 a/b/one_31_chars_long_file_name_008
20987 a/b/one_31_chars_long_file_name_009
20988 a/b/one_31_chars_long_file_name_010
20989 a/b/one_31_chars_long_file_name_011
20990 a/b/one_31_chars_long_file_name_012
20991 a/b/one_31_chars_long_file_name_013
20992 a/b/one_31_chars_long_file_name_014
20993 a/b/one_31_chars_long_file_name_015
20994 a/b/one_31_chars_long_file_name_016
20995 a/b/one_31_chars_long_file_name_017
20996 a/b/one_31_chars_long_file_name_018
20997 a/b/one_31_chars_long_file_name_019
20998 a/b/one_31_chars_long_file_name_020
20999 a/b/one_31_chars_long_file_name_021
21000 a/b/one_31_chars_long_file_name_022
21001 a/b/one_31_chars_long_file_name_023
21002 a/b/one_31_chars_long_file_name_024
21003 a/b/one_31_chars_long_file_name_025
21004 a/b/one_31_chars_long_file_name_026
21005 a/b/one_31_chars_long_file_name_027
21006 a/b/one_31_chars_long_file_name_028
21007 a/b/one_31_chars_long_file_name_029
21008 a/b/one_31_chars_long_file_name_030
21009 a/b/one_31_chars_long_file_name_031
21010 a/b/one_31_chars_long_file_name_032
21011 a/b/one_31_chars_long_file_name_033
21012 a/b/one_31_chars_long_file_name_034
21013 a/b/one_31_chars_long_file_name_035
21014 a/b/one_31_chars_long_file_name_036
21015 a/b/one_31_chars_long_file_name_037
21016 a/b/one_31_chars_long_file_name_038
21017 a/b/one_31_chars_long_file_name_039
21018 a/b/one_31_chars_long_file_name_040
21019 a/b/one_31_chars_long_file_name_041
21020 a/b/one_31_chars_long_file_name_042
21021 a/b/one_31_chars_long_file_name_043
21022 a/b/one_31_chars_long_file_name_044
21023 a/b/one_31_chars_long_file_name_045
21024 a/b/one_31_chars_long_file_name_046
21025 a/b/one_31_chars_long_file_name_047
21026 a/b/one_31_chars_long_file_name_048
21027 a/b/one_31_chars_long_file_name_049
21028 a/b/one_31_chars_long_file_name_050
21029 a/b/one_31_chars_long_file_name_051
21030 a/b/one_31_chars_long_file_name_052
21031 a/b/one_31_chars_long_file_name_053
21032 a/b/one_31_chars_long_file_name_054
21033 a/b/one_31_chars_long_file_name_055
21034 a/b/one_31_chars_long_file_name_056
21035 a/b/one_31_chars_long_file_name_057
21036 a/b/one_31_chars_long_file_name_058
21037 a/b/one_31_chars_long_file_name_059
21038 a/b/one_31_chars_long_file_name_060
21039 a/b/one_31_chars_long_file_name_061
21040 a/b/one_31_chars_long_file_name_062
21041 a/b/one_31_chars_long_file_name_063
21042 a/b/one_31_chars_long_file_name_064
21043 a/b/one_31_chars_long_file_name_065
21044 a/b/one_31_chars_long_file_name_066
21045 a/b/one_31_chars_long_file_name_067
21046 a/b/one_31_chars_long_file_name_068
21047 a/b/one_31_chars_long_file_name_069
21048 a/b/one_31_chars_long_file_name_070
21049 a/b/one_31_chars_long_file_name_071
21050 a/b/one_31_chars_long_file_name_072
21051 a/b/one_31_chars_long_file_name_073
21052 a/b/one_31_chars_long_file_name_074
21053 a/b/one_31_chars_long_file_name_075
21054 a/b/one_31_chars_long_file_name_076
21055 a/b/one_31_chars_long_file_name_077
21056 a/b/one_31_chars_long_file_name_078
21057 a/b/one_31_chars_long_file_name_079
21058 a/b/one_31_chars_long_file_name_080
21059 a/b/one_31_chars_long_file_name_081
21060 a/b/one_31_chars_long_file_name_082
21061 a/b/one_31_chars_long_file_name_083
21062 a/b/one_31_chars_long_file_name_084
21063 a/b/one_31_chars_long_file_name_085
21064 a/b/one_31_chars_long_file_name_086
21065 a/b/one_31_chars_long_file_name_087
21066 a/b/one_31_chars_long_file_name_088
21067 a/b/one_31_chars_long_file_name_089
21068 a/b/one_31_chars_long_file_name_090
21069 a/b/one_31_chars_long_file_name_091
21070 a/b/one_31_chars_long_file_name_092
21071 a/b/one_31_chars_long_file_name_093
21072 a/b/one_31_chars_long_file_name_094
21073 a/b/one_31_chars_long_file_name_095
21074 a/b/one_31_chars_long_file_name_096
21075 a/b/one_31_chars_long_file_name_097
21076 a/b/one_31_chars_long_file_name_098
21077 a/b/one_31_chars_long_file_name_099
21078 a/b/one_31_chars_long_file_name_100
21079 a/b/one_31_chars_long_file_name_101
21080 a/b/one_31_chars_long_file_name_102
21081 a/b/one_31_chars_long_file_name_103
21082 a/b/one_31_chars_long_file_name_104
21083 a/b/one_31_chars_long_file_name_105
21084 a/b/one_31_chars_long_file_name_106
21085 a/b/one_31_chars_long_file_name_107
21086 a/b/one_31_chars_long_file_name_108
21087 a/b/one_31_chars_long_file_name_109
21088 a/b/one_31_chars_long_file_name_110
21089 a/b/one_31_chars_long_file_name_111
21090 a/b/one_31_chars_long_file_name_112
21091 a/b/one_31_chars_long_file_name_113
21092 a/b/one_31_chars_long_file_name_114
21093 a/b/one_31_chars_long_file_name_115
21094 a/b/one_31_chars_long_file_name_116
21095 a/b/one_31_chars_long_file_name_117
21096 a/b/one_31_chars_long_file_name_118
21097 a/b/one_31_chars_long_file_name_119
21098 a/b/one_31_chars_long_file_name_120
21099 a/b/one_31_chars_long_file_name_121
21100 a/b/one_31_chars_long_file_name_122
21101 a/b/one_31_chars_long_file_name_123
21102 a/b/one_31_chars_long_file_name_124
21103 a/b/one_31_chars_long_file_name_125
21104 a/b/one_31_chars_long_file_name_126
21105 a/b/one_31_chars_long_file_name_127
21106 a/b/one_31_chars_long_file_name_128
21107 a/b/one_31_chars_long_file_name_129
21108 a/b/one_31_chars_long_file_name_130
21109 a/b/one_31_chars_long_file_name_131
21110 a/b/one_31_chars_long_file_name_132
21111 a/b/one_31_chars_long_file_name_133
21112 a/b/one_31_chars_long_file_name_134
21113 a/b/one_31_chars_long_file_name_135
21114 a/b/one_31_chars_long_file_name_136
21115 a/b/one_31_chars_long_file_name_137
21116 a/b/one_31_chars_long_file_name_138
21117 a/b/one_31_chars_long_file_name_139
21118 a/b/one_31_chars_long_file_name_140
21119 a/b/one_31_chars_long_file_name_141
21120 a/b/one_31_chars_long_file_name_142
21121 Incremental dump
21122 a/
21123 a/c/
21124 " | \
21125   $at_diff - "$at_stdout" || at_failed=:
21126 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
21127 $at_failed && at_fn_log_failure
21128 $at_traceon; }
21129
21130
21131
21132
21133
21134   set +x
21135   $at_times_p && times >"$at_times_file"
21136 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21137 read at_status <"$at_status_file"
21138 #AT_STOP_89
21139 #AT_START_90
21140 at_fn_group_banner 90 'incr05.at:21' \
21141   "incremental dumps with -C" "                      " 11
21142 at_xfail=no
21143       test -f $XFAILFILE && at_xfail=yes
21144 (
21145   $as_echo "90. $at_setup_line: testing $at_desc ..."
21146   $at_traceon
21147
21148
21149
21150
21151
21152   { set +x
21153 $as_echo "$at_srcdir/incr05.at:24:
21154 mkdir gnu
21155 (cd gnu
21156 TEST_TAR_FORMAT=gnu
21157 export TEST_TAR_FORMAT
21158 TAR_OPTIONS=\"-H gnu\"
21159 export TAR_OPTIONS
21160 rm -rf *
21161
21162 mkdir dir
21163 mkdir dir/sub
21164 genfile --file dir/file1
21165 genfile --file dir/sub/file2
21166
21167 echo Level 0
21168 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21169
21170 genfile --file dir/file3
21171 echo Level 1
21172 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21173 )"
21174 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
21175 ( $at_check_trace;
21176 mkdir gnu
21177 (cd gnu
21178 TEST_TAR_FORMAT=gnu
21179 export TEST_TAR_FORMAT
21180 TAR_OPTIONS="-H gnu"
21181 export TAR_OPTIONS
21182 rm -rf *
21183
21184 mkdir dir
21185 mkdir dir/sub
21186 genfile --file dir/file1
21187 genfile --file dir/sub/file2
21188
21189 echo Level 0
21190 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21191
21192 genfile --file dir/file3
21193 echo Level 1
21194 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21195 )
21196 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21197 at_status=$? at_failed=false
21198 $at_check_filter
21199 at_fn_diff_devnull "$at_stderr" || at_failed=:
21200 echo >>"$at_stdout"; $as_echo "Level 0
21201 ./
21202 ./sub/
21203 ./file1
21204 ./sub/file2
21205 Level 1
21206 ./
21207 ./sub/
21208 ./file3
21209 " | \
21210   $at_diff - "$at_stdout" || at_failed=:
21211 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
21212 $at_failed && at_fn_log_failure
21213 $at_traceon; }
21214
21215               { set +x
21216 $as_echo "$at_srcdir/incr05.at:24:
21217 mkdir oldgnu
21218 (cd oldgnu
21219 TEST_TAR_FORMAT=oldgnu
21220 export TEST_TAR_FORMAT
21221 TAR_OPTIONS=\"-H oldgnu\"
21222 export TAR_OPTIONS
21223 rm -rf *
21224
21225 mkdir dir
21226 mkdir dir/sub
21227 genfile --file dir/file1
21228 genfile --file dir/sub/file2
21229
21230 echo Level 0
21231 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21232
21233 genfile --file dir/file3
21234 echo Level 1
21235 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21236 )"
21237 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
21238 ( $at_check_trace;
21239 mkdir oldgnu
21240 (cd oldgnu
21241 TEST_TAR_FORMAT=oldgnu
21242 export TEST_TAR_FORMAT
21243 TAR_OPTIONS="-H oldgnu"
21244 export TAR_OPTIONS
21245 rm -rf *
21246
21247 mkdir dir
21248 mkdir dir/sub
21249 genfile --file dir/file1
21250 genfile --file dir/sub/file2
21251
21252 echo Level 0
21253 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21254
21255 genfile --file dir/file3
21256 echo Level 1
21257 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21258 )
21259 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21260 at_status=$? at_failed=false
21261 $at_check_filter
21262 at_fn_diff_devnull "$at_stderr" || at_failed=:
21263 echo >>"$at_stdout"; $as_echo "Level 0
21264 ./
21265 ./sub/
21266 ./file1
21267 ./sub/file2
21268 Level 1
21269 ./
21270 ./sub/
21271 ./file3
21272 " | \
21273   $at_diff - "$at_stdout" || at_failed=:
21274 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
21275 $at_failed && at_fn_log_failure
21276 $at_traceon; }
21277
21278               { set +x
21279 $as_echo "$at_srcdir/incr05.at:24:
21280 mkdir posix
21281 (cd posix
21282 TEST_TAR_FORMAT=posix
21283 export TEST_TAR_FORMAT
21284 TAR_OPTIONS=\"-H posix\"
21285 export TAR_OPTIONS
21286 rm -rf *
21287
21288 mkdir dir
21289 mkdir dir/sub
21290 genfile --file dir/file1
21291 genfile --file dir/sub/file2
21292
21293 echo Level 0
21294 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21295
21296 genfile --file dir/file3
21297 echo Level 1
21298 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21299 )"
21300 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
21301 ( $at_check_trace;
21302 mkdir posix
21303 (cd posix
21304 TEST_TAR_FORMAT=posix
21305 export TEST_TAR_FORMAT
21306 TAR_OPTIONS="-H posix"
21307 export TAR_OPTIONS
21308 rm -rf *
21309
21310 mkdir dir
21311 mkdir dir/sub
21312 genfile --file dir/file1
21313 genfile --file dir/sub/file2
21314
21315 echo Level 0
21316 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21317
21318 genfile --file dir/file3
21319 echo Level 1
21320 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21321 )
21322 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21323 at_status=$? at_failed=false
21324 $at_check_filter
21325 at_fn_diff_devnull "$at_stderr" || at_failed=:
21326 echo >>"$at_stdout"; $as_echo "Level 0
21327 ./
21328 ./sub/
21329 ./file1
21330 ./sub/file2
21331 Level 1
21332 ./
21333 ./sub/
21334 ./file3
21335 " | \
21336   $at_diff - "$at_stdout" || at_failed=:
21337 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
21338 $at_failed && at_fn_log_failure
21339 $at_traceon; }
21340
21341
21342
21343
21344   set +x
21345   $at_times_p && times >"$at_times_file"
21346 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21347 read at_status <"$at_status_file"
21348 #AT_STOP_90
21349 #AT_START_91
21350 at_fn_group_banner 91 'incr06.at:21' \
21351   "incremental dumps of nested directories" "        " 11
21352 at_xfail=no
21353       test -f $XFAILFILE && at_xfail=yes
21354 (
21355   $as_echo "91. $at_setup_line: testing $at_desc ..."
21356   $at_traceon
21357
21358
21359
21360
21361
21362   { set +x
21363 $as_echo "$at_srcdir/incr06.at:24:
21364 mkdir gnu
21365 (cd gnu
21366 TEST_TAR_FORMAT=gnu
21367 export TEST_TAR_FORMAT
21368 TAR_OPTIONS=\"-H gnu\"
21369 export TAR_OPTIONS
21370 rm -rf *
21371
21372 mkdir dir
21373 mkdir dir/sub
21374 mkdir dir/sub/a
21375 mkdir dir/sub/b
21376 genfile --file dir/file1
21377 genfile --file dir/sub/file2
21378 genfile --file dir/sub/a/file3
21379
21380 echo Level 0 . sub
21381 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21382 echo Level 0 sub .
21383 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21384
21385 mkdir dir/c
21386 genfile --file dir/sub/b/file4
21387
21388 echo Level 1 . sub
21389 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21390 echo Level 1 sub .
21391 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21392 )"
21393 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
21394 ( $at_check_trace;
21395 mkdir gnu
21396 (cd gnu
21397 TEST_TAR_FORMAT=gnu
21398 export TEST_TAR_FORMAT
21399 TAR_OPTIONS="-H gnu"
21400 export TAR_OPTIONS
21401 rm -rf *
21402
21403 mkdir dir
21404 mkdir dir/sub
21405 mkdir dir/sub/a
21406 mkdir dir/sub/b
21407 genfile --file dir/file1
21408 genfile --file dir/sub/file2
21409 genfile --file dir/sub/a/file3
21410
21411 echo Level 0 . sub
21412 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21413 echo Level 0 sub .
21414 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21415
21416 mkdir dir/c
21417 genfile --file dir/sub/b/file4
21418
21419 echo Level 1 . sub
21420 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21421 echo Level 1 sub .
21422 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21423 )
21424 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21425 at_status=$? at_failed=false
21426 $at_check_filter
21427 at_fn_diff_devnull "$at_stderr" || at_failed=:
21428 echo >>"$at_stdout"; $as_echo "Level 0 . sub
21429 ./
21430 sub/
21431 sub/a/
21432 sub/b/
21433 ./file1
21434 sub/file2
21435 sub/a/file3
21436 Level 0 sub .
21437 ./
21438 sub/
21439 sub/a/
21440 sub/b/
21441 ./file1
21442 sub/file2
21443 sub/a/file3
21444 Level 1 . sub
21445 ./
21446 ./c/
21447 sub/
21448 sub/a/
21449 sub/b/
21450 sub/b/file4
21451 Level 1 sub .
21452 ./
21453 ./c/
21454 sub/
21455 sub/a/
21456 sub/b/
21457 sub/b/file4
21458 " | \
21459   $at_diff - "$at_stdout" || at_failed=:
21460 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
21461 $at_failed && at_fn_log_failure
21462 $at_traceon; }
21463
21464               { set +x
21465 $as_echo "$at_srcdir/incr06.at:24:
21466 mkdir oldgnu
21467 (cd oldgnu
21468 TEST_TAR_FORMAT=oldgnu
21469 export TEST_TAR_FORMAT
21470 TAR_OPTIONS=\"-H oldgnu\"
21471 export TAR_OPTIONS
21472 rm -rf *
21473
21474 mkdir dir
21475 mkdir dir/sub
21476 mkdir dir/sub/a
21477 mkdir dir/sub/b
21478 genfile --file dir/file1
21479 genfile --file dir/sub/file2
21480 genfile --file dir/sub/a/file3
21481
21482 echo Level 0 . sub
21483 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21484 echo Level 0 sub .
21485 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21486
21487 mkdir dir/c
21488 genfile --file dir/sub/b/file4
21489
21490 echo Level 1 . sub
21491 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21492 echo Level 1 sub .
21493 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21494 )"
21495 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
21496 ( $at_check_trace;
21497 mkdir oldgnu
21498 (cd oldgnu
21499 TEST_TAR_FORMAT=oldgnu
21500 export TEST_TAR_FORMAT
21501 TAR_OPTIONS="-H oldgnu"
21502 export TAR_OPTIONS
21503 rm -rf *
21504
21505 mkdir dir
21506 mkdir dir/sub
21507 mkdir dir/sub/a
21508 mkdir dir/sub/b
21509 genfile --file dir/file1
21510 genfile --file dir/sub/file2
21511 genfile --file dir/sub/a/file3
21512
21513 echo Level 0 . sub
21514 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21515 echo Level 0 sub .
21516 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21517
21518 mkdir dir/c
21519 genfile --file dir/sub/b/file4
21520
21521 echo Level 1 . sub
21522 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21523 echo Level 1 sub .
21524 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21525 )
21526 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21527 at_status=$? at_failed=false
21528 $at_check_filter
21529 at_fn_diff_devnull "$at_stderr" || at_failed=:
21530 echo >>"$at_stdout"; $as_echo "Level 0 . sub
21531 ./
21532 sub/
21533 sub/a/
21534 sub/b/
21535 ./file1
21536 sub/file2
21537 sub/a/file3
21538 Level 0 sub .
21539 ./
21540 sub/
21541 sub/a/
21542 sub/b/
21543 ./file1
21544 sub/file2
21545 sub/a/file3
21546 Level 1 . sub
21547 ./
21548 ./c/
21549 sub/
21550 sub/a/
21551 sub/b/
21552 sub/b/file4
21553 Level 1 sub .
21554 ./
21555 ./c/
21556 sub/
21557 sub/a/
21558 sub/b/
21559 sub/b/file4
21560 " | \
21561   $at_diff - "$at_stdout" || at_failed=:
21562 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
21563 $at_failed && at_fn_log_failure
21564 $at_traceon; }
21565
21566               { set +x
21567 $as_echo "$at_srcdir/incr06.at:24:
21568 mkdir posix
21569 (cd posix
21570 TEST_TAR_FORMAT=posix
21571 export TEST_TAR_FORMAT
21572 TAR_OPTIONS=\"-H posix\"
21573 export TAR_OPTIONS
21574 rm -rf *
21575
21576 mkdir dir
21577 mkdir dir/sub
21578 mkdir dir/sub/a
21579 mkdir dir/sub/b
21580 genfile --file dir/file1
21581 genfile --file dir/sub/file2
21582 genfile --file dir/sub/a/file3
21583
21584 echo Level 0 . sub
21585 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21586 echo Level 0 sub .
21587 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21588
21589 mkdir dir/c
21590 genfile --file dir/sub/b/file4
21591
21592 echo Level 1 . sub
21593 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21594 echo Level 1 sub .
21595 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21596 )"
21597 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
21598 ( $at_check_trace;
21599 mkdir posix
21600 (cd posix
21601 TEST_TAR_FORMAT=posix
21602 export TEST_TAR_FORMAT
21603 TAR_OPTIONS="-H posix"
21604 export TAR_OPTIONS
21605 rm -rf *
21606
21607 mkdir dir
21608 mkdir dir/sub
21609 mkdir dir/sub/a
21610 mkdir dir/sub/b
21611 genfile --file dir/file1
21612 genfile --file dir/sub/file2
21613 genfile --file dir/sub/a/file3
21614
21615 echo Level 0 . sub
21616 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21617 echo Level 0 sub .
21618 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21619
21620 mkdir dir/c
21621 genfile --file dir/sub/b/file4
21622
21623 echo Level 1 . sub
21624 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21625 echo Level 1 sub .
21626 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21627 )
21628 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21629 at_status=$? at_failed=false
21630 $at_check_filter
21631 at_fn_diff_devnull "$at_stderr" || at_failed=:
21632 echo >>"$at_stdout"; $as_echo "Level 0 . sub
21633 ./
21634 sub/
21635 sub/a/
21636 sub/b/
21637 ./file1
21638 sub/file2
21639 sub/a/file3
21640 Level 0 sub .
21641 ./
21642 sub/
21643 sub/a/
21644 sub/b/
21645 ./file1
21646 sub/file2
21647 sub/a/file3
21648 Level 1 . sub
21649 ./
21650 ./c/
21651 sub/
21652 sub/a/
21653 sub/b/
21654 sub/b/file4
21655 Level 1 sub .
21656 ./
21657 ./c/
21658 sub/
21659 sub/a/
21660 sub/b/
21661 sub/b/file4
21662 " | \
21663   $at_diff - "$at_stdout" || at_failed=:
21664 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
21665 $at_failed && at_fn_log_failure
21666 $at_traceon; }
21667
21668
21669
21670
21671   set +x
21672   $at_times_p && times >"$at_times_file"
21673 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21674 read at_status <"$at_status_file"
21675 #AT_STOP_91
21676 #AT_START_92
21677 at_fn_group_banner 92 'incr07.at:18' \
21678   "incremental restores with -C" "                   " 11
21679 at_xfail=no
21680       test -f $XFAILFILE && at_xfail=yes
21681 (
21682   $as_echo "92. $at_setup_line: testing $at_desc ..."
21683   $at_traceon
21684
21685
21686
21687 # Tar 1.26 had problems extracting from incremental restores when given
21688 # the -C option.  The code in incremen.c:try_purge_directory and
21689 # misc.c:remove_any_file was using savedir(), which ignored eventual changes
21690 # in the current working directory and caused the malfunctioning.
21691 #
21692 # The problem was reported by Piotr Rotter on 2013-03-22.
21693 #
21694 # This testcase is based on scripts provided by Piotr Rotter and Nathan
21695 # Stratton Treadway.
21696 #
21697 # References: <514C8F56.90900@active24.pl>,
21698 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00036.html,
21699 #             <20130326181922.GZ3732@shire.ontko.com>,
21700 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00042.html,
21701 #             <20130327051828.GA3732@shire.ontko.com>,
21702 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00043.html,
21703 #             <20130327054957.GB3732@shire.ontko.com>,
21704 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00044.html
21705
21706
21707
21708   { set +x
21709 $as_echo "$at_srcdir/incr07.at:40:
21710 mkdir gnu
21711 (cd gnu
21712 TEST_TAR_FORMAT=gnu
21713 export TEST_TAR_FORMAT
21714 TAR_OPTIONS=\"-H gnu\"
21715 export TAR_OPTIONS
21716 rm -rf *
21717
21718 mkdir A
21719 echo 'a' > A/a
21720 echo 'a' > A/b
21721
21722 decho C0
21723 tar -g test.snar -vcf test.0.tar A
21724
21725 echo 'a' > A/c
21726 decho C1
21727 tar -g test.snar -vcf test.1.tar A
21728
21729 rm -f A/a
21730 decho C2
21731 tar -g test.snar -vcf test.2.tar A
21732
21733 mkdir ext
21734 rm -rf A
21735
21736 decho E0
21737 tar -g test.snar -vxf test.0.tar -C ext/
21738 decho E1
21739 tar -g test.snar -vxf test.1.tar -C ext/
21740
21741 decho E2
21742 tar -g test.snar -vxf test.2.tar -C ext/
21743
21744 mkdir ext/A/B
21745 touch ext/A/B/file
21746
21747 decho E3
21748 tar -g test.snar -vxf test.2.tar -C ext/
21749
21750 echo FIN
21751 test -d A && echo >&2 \"toplevel A exists\"
21752 exit 0
21753 )"
21754 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
21755 ( $at_check_trace;
21756 mkdir gnu
21757 (cd gnu
21758 TEST_TAR_FORMAT=gnu
21759 export TEST_TAR_FORMAT
21760 TAR_OPTIONS="-H gnu"
21761 export TAR_OPTIONS
21762 rm -rf *
21763
21764 mkdir A
21765 echo 'a' > A/a
21766 echo 'a' > A/b
21767
21768 decho C0
21769 tar -g test.snar -vcf test.0.tar A
21770
21771 echo 'a' > A/c
21772 decho C1
21773 tar -g test.snar -vcf test.1.tar A
21774
21775 rm -f A/a
21776 decho C2
21777 tar -g test.snar -vcf test.2.tar A
21778
21779 mkdir ext
21780 rm -rf A
21781
21782 decho E0
21783 tar -g test.snar -vxf test.0.tar -C ext/
21784 decho E1
21785 tar -g test.snar -vxf test.1.tar -C ext/
21786
21787 decho E2
21788 tar -g test.snar -vxf test.2.tar -C ext/
21789
21790 mkdir ext/A/B
21791 touch ext/A/B/file
21792
21793 decho E3
21794 tar -g test.snar -vxf test.2.tar -C ext/
21795
21796 echo FIN
21797 test -d A && echo >&2 "toplevel A exists"
21798 exit 0
21799 )
21800 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21801 at_status=$? at_failed=false
21802 $at_check_filter
21803 echo >>"$at_stderr"; $as_echo "C0
21804 tar: A: Directory is new
21805 C1
21806 C2
21807 E0
21808 E1
21809 E2
21810 E3
21811 " | \
21812   $at_diff - "$at_stderr" || at_failed=:
21813 echo >>"$at_stdout"; $as_echo "C0
21814 A/
21815 A/a
21816 A/b
21817 C1
21818 A/
21819 A/c
21820 C2
21821 A/
21822 E0
21823 A/
21824 A/a
21825 A/b
21826 E1
21827 A/
21828 A/c
21829 E2
21830 A/
21831 tar: Deleting 'A/a'
21832 E3
21833 A/
21834 tar: Deleting 'A/B'
21835 FIN
21836 " | \
21837   $at_diff - "$at_stdout" || at_failed=:
21838 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
21839 $at_failed && at_fn_log_failure
21840 $at_traceon; }
21841
21842               { set +x
21843 $as_echo "$at_srcdir/incr07.at:40:
21844 mkdir oldgnu
21845 (cd oldgnu
21846 TEST_TAR_FORMAT=oldgnu
21847 export TEST_TAR_FORMAT
21848 TAR_OPTIONS=\"-H oldgnu\"
21849 export TAR_OPTIONS
21850 rm -rf *
21851
21852 mkdir A
21853 echo 'a' > A/a
21854 echo 'a' > A/b
21855
21856 decho C0
21857 tar -g test.snar -vcf test.0.tar A
21858
21859 echo 'a' > A/c
21860 decho C1
21861 tar -g test.snar -vcf test.1.tar A
21862
21863 rm -f A/a
21864 decho C2
21865 tar -g test.snar -vcf test.2.tar A
21866
21867 mkdir ext
21868 rm -rf A
21869
21870 decho E0
21871 tar -g test.snar -vxf test.0.tar -C ext/
21872 decho E1
21873 tar -g test.snar -vxf test.1.tar -C ext/
21874
21875 decho E2
21876 tar -g test.snar -vxf test.2.tar -C ext/
21877
21878 mkdir ext/A/B
21879 touch ext/A/B/file
21880
21881 decho E3
21882 tar -g test.snar -vxf test.2.tar -C ext/
21883
21884 echo FIN
21885 test -d A && echo >&2 \"toplevel A exists\"
21886 exit 0
21887 )"
21888 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
21889 ( $at_check_trace;
21890 mkdir oldgnu
21891 (cd oldgnu
21892 TEST_TAR_FORMAT=oldgnu
21893 export TEST_TAR_FORMAT
21894 TAR_OPTIONS="-H oldgnu"
21895 export TAR_OPTIONS
21896 rm -rf *
21897
21898 mkdir A
21899 echo 'a' > A/a
21900 echo 'a' > A/b
21901
21902 decho C0
21903 tar -g test.snar -vcf test.0.tar A
21904
21905 echo 'a' > A/c
21906 decho C1
21907 tar -g test.snar -vcf test.1.tar A
21908
21909 rm -f A/a
21910 decho C2
21911 tar -g test.snar -vcf test.2.tar A
21912
21913 mkdir ext
21914 rm -rf A
21915
21916 decho E0
21917 tar -g test.snar -vxf test.0.tar -C ext/
21918 decho E1
21919 tar -g test.snar -vxf test.1.tar -C ext/
21920
21921 decho E2
21922 tar -g test.snar -vxf test.2.tar -C ext/
21923
21924 mkdir ext/A/B
21925 touch ext/A/B/file
21926
21927 decho E3
21928 tar -g test.snar -vxf test.2.tar -C ext/
21929
21930 echo FIN
21931 test -d A && echo >&2 "toplevel A exists"
21932 exit 0
21933 )
21934 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21935 at_status=$? at_failed=false
21936 $at_check_filter
21937 echo >>"$at_stderr"; $as_echo "C0
21938 tar: A: Directory is new
21939 C1
21940 C2
21941 E0
21942 E1
21943 E2
21944 E3
21945 " | \
21946   $at_diff - "$at_stderr" || at_failed=:
21947 echo >>"$at_stdout"; $as_echo "C0
21948 A/
21949 A/a
21950 A/b
21951 C1
21952 A/
21953 A/c
21954 C2
21955 A/
21956 E0
21957 A/
21958 A/a
21959 A/b
21960 E1
21961 A/
21962 A/c
21963 E2
21964 A/
21965 tar: Deleting 'A/a'
21966 E3
21967 A/
21968 tar: Deleting 'A/B'
21969 FIN
21970 " | \
21971   $at_diff - "$at_stdout" || at_failed=:
21972 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
21973 $at_failed && at_fn_log_failure
21974 $at_traceon; }
21975
21976               { set +x
21977 $as_echo "$at_srcdir/incr07.at:40:
21978 mkdir posix
21979 (cd posix
21980 TEST_TAR_FORMAT=posix
21981 export TEST_TAR_FORMAT
21982 TAR_OPTIONS=\"-H posix\"
21983 export TAR_OPTIONS
21984 rm -rf *
21985
21986 mkdir A
21987 echo 'a' > A/a
21988 echo 'a' > A/b
21989
21990 decho C0
21991 tar -g test.snar -vcf test.0.tar A
21992
21993 echo 'a' > A/c
21994 decho C1
21995 tar -g test.snar -vcf test.1.tar A
21996
21997 rm -f A/a
21998 decho C2
21999 tar -g test.snar -vcf test.2.tar A
22000
22001 mkdir ext
22002 rm -rf A
22003
22004 decho E0
22005 tar -g test.snar -vxf test.0.tar -C ext/
22006 decho E1
22007 tar -g test.snar -vxf test.1.tar -C ext/
22008
22009 decho E2
22010 tar -g test.snar -vxf test.2.tar -C ext/
22011
22012 mkdir ext/A/B
22013 touch ext/A/B/file
22014
22015 decho E3
22016 tar -g test.snar -vxf test.2.tar -C ext/
22017
22018 echo FIN
22019 test -d A && echo >&2 \"toplevel A exists\"
22020 exit 0
22021 )"
22022 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
22023 ( $at_check_trace;
22024 mkdir posix
22025 (cd posix
22026 TEST_TAR_FORMAT=posix
22027 export TEST_TAR_FORMAT
22028 TAR_OPTIONS="-H posix"
22029 export TAR_OPTIONS
22030 rm -rf *
22031
22032 mkdir A
22033 echo 'a' > A/a
22034 echo 'a' > A/b
22035
22036 decho C0
22037 tar -g test.snar -vcf test.0.tar A
22038
22039 echo 'a' > A/c
22040 decho C1
22041 tar -g test.snar -vcf test.1.tar A
22042
22043 rm -f A/a
22044 decho C2
22045 tar -g test.snar -vcf test.2.tar A
22046
22047 mkdir ext
22048 rm -rf A
22049
22050 decho E0
22051 tar -g test.snar -vxf test.0.tar -C ext/
22052 decho E1
22053 tar -g test.snar -vxf test.1.tar -C ext/
22054
22055 decho E2
22056 tar -g test.snar -vxf test.2.tar -C ext/
22057
22058 mkdir ext/A/B
22059 touch ext/A/B/file
22060
22061 decho E3
22062 tar -g test.snar -vxf test.2.tar -C ext/
22063
22064 echo FIN
22065 test -d A && echo >&2 "toplevel A exists"
22066 exit 0
22067 )
22068 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22069 at_status=$? at_failed=false
22070 $at_check_filter
22071 echo >>"$at_stderr"; $as_echo "C0
22072 tar: A: Directory is new
22073 C1
22074 C2
22075 E0
22076 E1
22077 E2
22078 E3
22079 " | \
22080   $at_diff - "$at_stderr" || at_failed=:
22081 echo >>"$at_stdout"; $as_echo "C0
22082 A/
22083 A/a
22084 A/b
22085 C1
22086 A/
22087 A/c
22088 C2
22089 A/
22090 E0
22091 A/
22092 A/a
22093 A/b
22094 E1
22095 A/
22096 A/c
22097 E2
22098 A/
22099 tar: Deleting 'A/a'
22100 E3
22101 A/
22102 tar: Deleting 'A/B'
22103 FIN
22104 " | \
22105   $at_diff - "$at_stdout" || at_failed=:
22106 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
22107 $at_failed && at_fn_log_failure
22108 $at_traceon; }
22109
22110
22111
22112
22113   set +x
22114   $at_times_p && times >"$at_times_file"
22115 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22116 read at_status <"$at_status_file"
22117 #AT_STOP_92
22118 #AT_START_93
22119 at_fn_group_banner 93 'incr08.at:38' \
22120   "filename normalization" "                         " 11
22121 at_xfail=no
22122       test -f $XFAILFILE && at_xfail=yes
22123 (
22124   $as_echo "93. $at_setup_line: testing $at_desc ..."
22125   $at_traceon
22126
22127
22128
22129
22130
22131   { set +x
22132 $as_echo "$at_srcdir/incr08.at:41:
22133 mkdir gnu
22134 (cd gnu
22135 TEST_TAR_FORMAT=gnu
22136 export TEST_TAR_FORMAT
22137 TAR_OPTIONS=\"-H gnu\"
22138 export TAR_OPTIONS
22139 rm -rf *
22140
22141
22142 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22143
22144 mkdir tartest
22145 cd tartest
22146 mkdir foo
22147 mkdir foo/subdir
22148 mkdir foo/subdir/dir1
22149 mkdir subdir
22150 mkdir subdir/dir2
22151 decho A
22152 find .|sort
22153
22154 decho B
22155 DIR=\`pwd\`
22156 tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . \$DIR 2>../err |\\
22157   sed \"s|\$DIR|ABSPATH|\"
22158 sed \"s|\$DIR|ABSPATH|\" ../err >&2
22159 )"
22160 at_fn_check_prepare_notrace 'a `...` command substitution' "incr08.at:41"
22161 ( $at_check_trace;
22162 mkdir gnu
22163 (cd gnu
22164 TEST_TAR_FORMAT=gnu
22165 export TEST_TAR_FORMAT
22166 TAR_OPTIONS="-H gnu"
22167 export TAR_OPTIONS
22168 rm -rf *
22169
22170
22171 test -z "`sort < /dev/null 2>&1`" || exit 77
22172
22173 mkdir tartest
22174 cd tartest
22175 mkdir foo
22176 mkdir foo/subdir
22177 mkdir foo/subdir/dir1
22178 mkdir subdir
22179 mkdir subdir/dir2
22180 decho A
22181 find .|sort
22182
22183 decho B
22184 DIR=`pwd`
22185 tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . $DIR 2>../err |\
22186   sed "s|$DIR|ABSPATH|"
22187 sed "s|$DIR|ABSPATH|" ../err >&2
22188 )
22189 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22190 at_status=$? at_failed=false
22191 $at_check_filter
22192 echo >>"$at_stderr"; $as_echo "A
22193 B
22194 tar: .: Directory is new
22195 tar: ./subdir: Directory is new
22196 tar: ./subdir/dir1: Directory is new
22197 tar: ABSPATH: Directory is new
22198 tar: ABSPATH/subdir: Directory is new
22199 tar: ABSPATH/subdir/dir2: Directory is new
22200 tar: Removing leading \`/' from member names
22201 " | \
22202   $at_diff - "$at_stderr" || at_failed=:
22203 echo >>"$at_stdout"; $as_echo "A
22204 .
22205 ./foo
22206 ./foo/subdir
22207 ./foo/subdir/dir1
22208 ./subdir
22209 ./subdir/dir2
22210 B
22211 ./
22212 ./subdir/
22213 ./subdir/dir1/
22214 ABSPATH/
22215 ABSPATH/subdir/
22216 ABSPATH/subdir/dir2/
22217 " | \
22218   $at_diff - "$at_stdout" || at_failed=:
22219 at_fn_check_status 0 $at_status "$at_srcdir/incr08.at:41"
22220 $at_failed && at_fn_log_failure
22221 $at_traceon; }
22222
22223
22224
22225
22226   set +x
22227   $at_times_p && times >"$at_times_file"
22228 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22229 read at_status <"$at_status_file"
22230 #AT_STOP_93
22231 #AT_START_94
22232 at_fn_group_banner 94 'incr09.at:26' \
22233   "incremental with alternating -C" "                " 11
22234 at_xfail=no
22235       test -f $XFAILFILE && at_xfail=yes
22236 (
22237   $as_echo "94. $at_setup_line: testing $at_desc ..."
22238   $at_traceon
22239
22240
22241
22242
22243
22244   { set +x
22245 $as_echo "$at_srcdir/incr09.at:29:
22246 mkdir gnu
22247 (cd gnu
22248 TEST_TAR_FORMAT=gnu
22249 export TEST_TAR_FORMAT
22250 TAR_OPTIONS=\"-H gnu\"
22251 export TAR_OPTIONS
22252 rm -rf *
22253
22254
22255 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22256
22257 mkdir foo bar middle
22258 echo foo/foo_file > foo/foo_file
22259 echo bar/bar_file > bar/bar_file
22260 echo middle/file > middle/middle_file
22261 decho A
22262 tar -cvf foo.tar --incremental -C foo . -C \`pwd\` middle  -C bar .
22263
22264 rm foo.tar
22265 >toplevel_file
22266 decho B
22267 tar -cvf foo.tar --incremental -C foo . -C \`pwd\` toplevel_file  -C bar .
22268 )"
22269 at_fn_check_prepare_notrace 'a `...` command substitution' "incr09.at:29"
22270 ( $at_check_trace;
22271 mkdir gnu
22272 (cd gnu
22273 TEST_TAR_FORMAT=gnu
22274 export TEST_TAR_FORMAT
22275 TAR_OPTIONS="-H gnu"
22276 export TAR_OPTIONS
22277 rm -rf *
22278
22279
22280 test -z "`sort < /dev/null 2>&1`" || exit 77
22281
22282 mkdir foo bar middle
22283 echo foo/foo_file > foo/foo_file
22284 echo bar/bar_file > bar/bar_file
22285 echo middle/file > middle/middle_file
22286 decho A
22287 tar -cvf foo.tar --incremental -C foo . -C `pwd` middle  -C bar .
22288
22289 rm foo.tar
22290 >toplevel_file
22291 decho B
22292 tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file  -C bar .
22293 )
22294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22295 at_status=$? at_failed=false
22296 $at_check_filter
22297 echo >>"$at_stderr"; $as_echo "A
22298 tar: .: Directory is new
22299 tar: middle: Directory is new
22300 tar: .: Directory is new
22301 B
22302 tar: .: Directory is new
22303 tar: .: Directory is new
22304 " | \
22305   $at_diff - "$at_stderr" || at_failed=:
22306 echo >>"$at_stdout"; $as_echo "A
22307 ./
22308 ./
22309 middle/
22310 ./bar_file
22311 ./foo_file
22312 middle/middle_file
22313 B
22314 ./
22315 ./
22316 toplevel_file
22317 ./bar_file
22318 ./foo_file
22319 " | \
22320   $at_diff - "$at_stdout" || at_failed=:
22321 at_fn_check_status 0 $at_status "$at_srcdir/incr09.at:29"
22322 $at_failed && at_fn_log_failure
22323 $at_traceon; }
22324
22325
22326
22327
22328   set +x
22329   $at_times_p && times >"$at_times_file"
22330 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22331 read at_status <"$at_status_file"
22332 #AT_STOP_94
22333 #AT_START_95
22334 at_fn_group_banner 95 'filerem01.at:36' \
22335   "file removed as we read it (ca. 22 seconds)" "    " 12
22336 at_xfail=no
22337       test -f $XFAILFILE && at_xfail=yes
22338 (
22339   $as_echo "95. $at_setup_line: testing $at_desc ..."
22340   $at_traceon
22341
22342
22343
22344
22345
22346   { set +x
22347 $as_echo "$at_srcdir/filerem01.at:39:
22348 mkdir gnu
22349 (cd gnu
22350 TEST_TAR_FORMAT=gnu
22351 export TEST_TAR_FORMAT
22352 TAR_OPTIONS=\"-H gnu\"
22353 export TAR_OPTIONS
22354 rm -rf *
22355
22356 mkdir dir
22357 mkdir dir/sub
22358 genfile --file dir/file1
22359 genfile --file dir/sub/file2
22360
22361 genfile --run --checkpoint=3 --unlink dir/file1 -- \\
22362        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
22363        --checkpoint-action='echo' -c -f archive.tar \\
22364        --listed-incremental db -v dir >/dev/null
22365 )"
22366 at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
22367 ( $at_check_trace;
22368 mkdir gnu
22369 (cd gnu
22370 TEST_TAR_FORMAT=gnu
22371 export TEST_TAR_FORMAT
22372 TAR_OPTIONS="-H gnu"
22373 export TAR_OPTIONS
22374 rm -rf *
22375
22376 mkdir dir
22377 mkdir dir/sub
22378 genfile --file dir/file1
22379 genfile --file dir/sub/file2
22380
22381 genfile --run --checkpoint=3 --unlink dir/file1 -- \
22382        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
22383        --checkpoint-action='echo' -c -f archive.tar \
22384        --listed-incremental db -v dir >/dev/null
22385 )
22386 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22387 at_status=$? at_failed=false
22388 $at_check_filter
22389 echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
22390 tar: dir/sub: Directory is new
22391 tar: dir/file1: File removed before we read it
22392 " | \
22393   $at_diff - "$at_stderr" || at_failed=:
22394 echo stdout:; cat "$at_stdout"
22395 at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
22396 $at_failed && at_fn_log_failure
22397 $at_traceon; }
22398
22399               { set +x
22400 $as_echo "$at_srcdir/filerem01.at:39:
22401 mkdir posix
22402 (cd posix
22403 TEST_TAR_FORMAT=posix
22404 export TEST_TAR_FORMAT
22405 TAR_OPTIONS=\"-H posix\"
22406 export TAR_OPTIONS
22407 rm -rf *
22408
22409 mkdir dir
22410 mkdir dir/sub
22411 genfile --file dir/file1
22412 genfile --file dir/sub/file2
22413
22414 genfile --run --checkpoint=3 --unlink dir/file1 -- \\
22415        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
22416        --checkpoint-action='echo' -c -f archive.tar \\
22417        --listed-incremental db -v dir >/dev/null
22418 )"
22419 at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
22420 ( $at_check_trace;
22421 mkdir posix
22422 (cd posix
22423 TEST_TAR_FORMAT=posix
22424 export TEST_TAR_FORMAT
22425 TAR_OPTIONS="-H posix"
22426 export TAR_OPTIONS
22427 rm -rf *
22428
22429 mkdir dir
22430 mkdir dir/sub
22431 genfile --file dir/file1
22432 genfile --file dir/sub/file2
22433
22434 genfile --run --checkpoint=3 --unlink dir/file1 -- \
22435        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
22436        --checkpoint-action='echo' -c -f archive.tar \
22437        --listed-incremental db -v dir >/dev/null
22438 )
22439 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22440 at_status=$? at_failed=false
22441 $at_check_filter
22442 echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
22443 tar: dir/sub: Directory is new
22444 tar: dir/file1: File removed before we read it
22445 " | \
22446   $at_diff - "$at_stderr" || at_failed=:
22447 echo stdout:; cat "$at_stdout"
22448 at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
22449 $at_failed && at_fn_log_failure
22450 $at_traceon; }
22451
22452
22453
22454
22455 # Timing information:
22456 #
22457 # For -Hgnu the above command line takes about 8 seconds to execute and
22458 # produces:
22459 #
22460 # tar: dir: Directory is new
22461 # tar: dir/sub: Directory is new
22462 # dir/
22463 # tar: Write checkpoint 1
22464 # tar: Write checkpoint 2
22465 # dir/sub/
22466 # tar: Write checkpoint 3
22467 # tar: Write checkpoint 4
22468 # dir/file1
22469 # tar: Write checkpoint 5
22470 # dir/sub/file2
22471 # tar: Write checkpoint 6
22472 # tar: Write checkpoint 7
22473 # tar: Write checkpoint 8
22474 #
22475 # For -Hposix the above command line takes about 14 seconds to execute and
22476 # produces:
22477 #
22478 # ./tar: dir: Directory is new
22479 # ./tar: dir/sub: Directory is new
22480 # dir/
22481 # ./tar: Write checkpoint 1
22482 # ./tar: Write checkpoint 2
22483 # ./tar: Write checkpoint 3
22484 # dir/sub/
22485 # ./tar: Write checkpoint 4
22486 # ./tar: Write checkpoint 5
22487 # ./tar: Write checkpoint 6
22488 # dir/file1
22489 # ./tar: Write checkpoint 7
22490 # ./tar: Write checkpoint 8
22491 # ./tar: Write checkpoint 9
22492 # dir/sub/file2
22493 # ./tar: Write checkpoint 10
22494 # ./tar: Write checkpoint 11
22495 # ./tar: Write checkpoint 12
22496 # ./tar: Write checkpoint 13
22497 # ./tar: Write checkpoint 14
22498
22499
22500   set +x
22501   $at_times_p && times >"$at_times_file"
22502 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22503 read at_status <"$at_status_file"
22504 #AT_STOP_95
22505 #AT_START_96
22506 at_fn_group_banner 96 'filerem02.at:26' \
22507   "toplevel file removed (ca. 24 seconds)" "         " 12
22508 at_xfail=no
22509       test -f $XFAILFILE && at_xfail=yes
22510 (
22511   $as_echo "96. $at_setup_line: testing $at_desc ..."
22512   $at_traceon
22513
22514
22515
22516
22517
22518   { set +x
22519 $as_echo "$at_srcdir/filerem02.at:29:
22520 mkdir gnu
22521 (cd gnu
22522 TEST_TAR_FORMAT=gnu
22523 export TEST_TAR_FORMAT
22524 TAR_OPTIONS=\"-H gnu\"
22525 export TAR_OPTIONS
22526 rm -rf *
22527
22528 mkdir dir
22529 mkdir dir/sub
22530 genfile --file dir/file1
22531 genfile --file dir/sub/file2
22532 mkdir dir2
22533 genfile --file dir2/file1
22534
22535 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
22536        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
22537        --checkpoint-action='echo' -c -f archive.tar \\
22538        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
22539 )"
22540 at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
22541 ( $at_check_trace;
22542 mkdir gnu
22543 (cd gnu
22544 TEST_TAR_FORMAT=gnu
22545 export TEST_TAR_FORMAT
22546 TAR_OPTIONS="-H gnu"
22547 export TAR_OPTIONS
22548 rm -rf *
22549
22550 mkdir dir
22551 mkdir dir/sub
22552 genfile --file dir/file1
22553 genfile --file dir/sub/file2
22554 mkdir dir2
22555 genfile --file dir2/file1
22556
22557 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
22558        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
22559        --checkpoint-action='echo' -c -f archive.tar \
22560        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
22561 )
22562 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22563 at_status=$? at_failed=false
22564 $at_check_filter
22565 echo stderr:; cat "$at_stderr"
22566 echo stdout:; cat "$at_stdout"
22567 at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
22568 $at_failed && at_fn_log_failure
22569 $at_traceon; }
22570
22571               { set +x
22572 $as_echo "$at_srcdir/filerem02.at:29:
22573 mkdir posix
22574 (cd posix
22575 TEST_TAR_FORMAT=posix
22576 export TEST_TAR_FORMAT
22577 TAR_OPTIONS=\"-H posix\"
22578 export TAR_OPTIONS
22579 rm -rf *
22580
22581 mkdir dir
22582 mkdir dir/sub
22583 genfile --file dir/file1
22584 genfile --file dir/sub/file2
22585 mkdir dir2
22586 genfile --file dir2/file1
22587
22588 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
22589        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
22590        --checkpoint-action='echo' -c -f archive.tar \\
22591        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
22592 )"
22593 at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
22594 ( $at_check_trace;
22595 mkdir posix
22596 (cd posix
22597 TEST_TAR_FORMAT=posix
22598 export TEST_TAR_FORMAT
22599 TAR_OPTIONS="-H posix"
22600 export TAR_OPTIONS
22601 rm -rf *
22602
22603 mkdir dir
22604 mkdir dir/sub
22605 genfile --file dir/file1
22606 genfile --file dir/sub/file2
22607 mkdir dir2
22608 genfile --file dir2/file1
22609
22610 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
22611        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
22612        --checkpoint-action='echo' -c -f archive.tar \
22613        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
22614 )
22615 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22616 at_status=$? at_failed=false
22617 $at_check_filter
22618 echo stderr:; cat "$at_stderr"
22619 echo stdout:; cat "$at_stdout"
22620 at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
22621 $at_failed && at_fn_log_failure
22622 $at_traceon; }
22623
22624
22625
22626
22627 # Ignore stdout and stderr because their contents depend on
22628 # the file system implementation.
22629
22630 # Timing information: see filerem01.at
22631
22632   set +x
22633   $at_times_p && times >"$at_times_file"
22634 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22635 read at_status <"$at_status_file"
22636 #AT_STOP_96
22637 #AT_START_97
22638 at_fn_group_banner 97 'rename01.at:24' \
22639   "renamed dirs in incrementals" "                   " 13
22640 at_xfail=no
22641       test -f $XFAILFILE && at_xfail=yes
22642 (
22643   $as_echo "97. $at_setup_line: testing $at_desc ..."
22644   $at_traceon
22645
22646
22647
22648
22649
22650   { set +x
22651 $as_echo "$at_srcdir/rename01.at:27:
22652 mkdir gnu
22653 (cd gnu
22654 TEST_TAR_FORMAT=gnu
22655 export TEST_TAR_FORMAT
22656 TAR_OPTIONS=\"-H gnu\"
22657 export TAR_OPTIONS
22658 rm -rf *
22659
22660
22661 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22662
22663
22664 mkdir foo
22665 genfile --file foo/file1
22666 genfile --file foo/file2
22667 mkdir foo/bar
22668 genfile --file foo/bar/file
22669
22670 echo \"Creating base archive\"
22671 tar -g incr -cf arch.1 -v foo
22672
22673 mv foo/bar foo/baz
22674
22675 echo \"Creating incremental archive\"
22676 tar -g incr -cf arch.2 -v foo
22677
22678 mv foo old
22679
22680 tar xfg arch.1 /dev/null
22681
22682 echo \"Begin directory listing 1\"
22683 find foo | sort
22684 echo \"End directory listing 1\"
22685
22686 tar xfg arch.2 /dev/null
22687 echo Begin directory listing 2
22688 find foo | sort
22689 echo End directory listing 2
22690 )"
22691 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
22692 ( $at_check_trace;
22693 mkdir gnu
22694 (cd gnu
22695 TEST_TAR_FORMAT=gnu
22696 export TEST_TAR_FORMAT
22697 TAR_OPTIONS="-H gnu"
22698 export TAR_OPTIONS
22699 rm -rf *
22700
22701
22702 test -z "`sort < /dev/null 2>&1`" || exit 77
22703
22704
22705 mkdir foo
22706 genfile --file foo/file1
22707 genfile --file foo/file2
22708 mkdir foo/bar
22709 genfile --file foo/bar/file
22710
22711 echo "Creating base archive"
22712 tar -g incr -cf arch.1 -v foo
22713
22714 mv foo/bar foo/baz
22715
22716 echo "Creating incremental archive"
22717 tar -g incr -cf arch.2 -v foo
22718
22719 mv foo old
22720
22721 tar xfg arch.1 /dev/null
22722
22723 echo "Begin directory listing 1"
22724 find foo | sort
22725 echo "End directory listing 1"
22726
22727 tar xfg arch.2 /dev/null
22728 echo Begin directory listing 2
22729 find foo | sort
22730 echo End directory listing 2
22731 )
22732 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22733 at_status=$? at_failed=false
22734 $at_check_filter
22735 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
22736 tar: foo/bar: Directory is new
22737 tar: foo/baz: Directory has been renamed from 'foo/bar'
22738 " | \
22739   $at_diff - "$at_stderr" || at_failed=:
22740 echo >>"$at_stdout"; $as_echo "Creating base archive
22741 foo/
22742 foo/bar/
22743 foo/file1
22744 foo/file2
22745 foo/bar/file
22746 Creating incremental archive
22747 foo/
22748 foo/baz/
22749 Begin directory listing 1
22750 foo
22751 foo/bar
22752 foo/bar/file
22753 foo/file1
22754 foo/file2
22755 End directory listing 1
22756 Begin directory listing 2
22757 foo
22758 foo/baz
22759 foo/baz/file
22760 foo/file1
22761 foo/file2
22762 End directory listing 2
22763 " | \
22764   $at_diff - "$at_stdout" || at_failed=:
22765 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
22766 $at_failed && at_fn_log_failure
22767 $at_traceon; }
22768
22769               { set +x
22770 $as_echo "$at_srcdir/rename01.at:27:
22771 mkdir oldgnu
22772 (cd oldgnu
22773 TEST_TAR_FORMAT=oldgnu
22774 export TEST_TAR_FORMAT
22775 TAR_OPTIONS=\"-H oldgnu\"
22776 export TAR_OPTIONS
22777 rm -rf *
22778
22779
22780 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22781
22782
22783 mkdir foo
22784 genfile --file foo/file1
22785 genfile --file foo/file2
22786 mkdir foo/bar
22787 genfile --file foo/bar/file
22788
22789 echo \"Creating base archive\"
22790 tar -g incr -cf arch.1 -v foo
22791
22792 mv foo/bar foo/baz
22793
22794 echo \"Creating incremental archive\"
22795 tar -g incr -cf arch.2 -v foo
22796
22797 mv foo old
22798
22799 tar xfg arch.1 /dev/null
22800
22801 echo \"Begin directory listing 1\"
22802 find foo | sort
22803 echo \"End directory listing 1\"
22804
22805 tar xfg arch.2 /dev/null
22806 echo Begin directory listing 2
22807 find foo | sort
22808 echo End directory listing 2
22809 )"
22810 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
22811 ( $at_check_trace;
22812 mkdir oldgnu
22813 (cd oldgnu
22814 TEST_TAR_FORMAT=oldgnu
22815 export TEST_TAR_FORMAT
22816 TAR_OPTIONS="-H oldgnu"
22817 export TAR_OPTIONS
22818 rm -rf *
22819
22820
22821 test -z "`sort < /dev/null 2>&1`" || exit 77
22822
22823
22824 mkdir foo
22825 genfile --file foo/file1
22826 genfile --file foo/file2
22827 mkdir foo/bar
22828 genfile --file foo/bar/file
22829
22830 echo "Creating base archive"
22831 tar -g incr -cf arch.1 -v foo
22832
22833 mv foo/bar foo/baz
22834
22835 echo "Creating incremental archive"
22836 tar -g incr -cf arch.2 -v foo
22837
22838 mv foo old
22839
22840 tar xfg arch.1 /dev/null
22841
22842 echo "Begin directory listing 1"
22843 find foo | sort
22844 echo "End directory listing 1"
22845
22846 tar xfg arch.2 /dev/null
22847 echo Begin directory listing 2
22848 find foo | sort
22849 echo End directory listing 2
22850 )
22851 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22852 at_status=$? at_failed=false
22853 $at_check_filter
22854 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
22855 tar: foo/bar: Directory is new
22856 tar: foo/baz: Directory has been renamed from 'foo/bar'
22857 " | \
22858   $at_diff - "$at_stderr" || at_failed=:
22859 echo >>"$at_stdout"; $as_echo "Creating base archive
22860 foo/
22861 foo/bar/
22862 foo/file1
22863 foo/file2
22864 foo/bar/file
22865 Creating incremental archive
22866 foo/
22867 foo/baz/
22868 Begin directory listing 1
22869 foo
22870 foo/bar
22871 foo/bar/file
22872 foo/file1
22873 foo/file2
22874 End directory listing 1
22875 Begin directory listing 2
22876 foo
22877 foo/baz
22878 foo/baz/file
22879 foo/file1
22880 foo/file2
22881 End directory listing 2
22882 " | \
22883   $at_diff - "$at_stdout" || at_failed=:
22884 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
22885 $at_failed && at_fn_log_failure
22886 $at_traceon; }
22887
22888               { set +x
22889 $as_echo "$at_srcdir/rename01.at:27:
22890 mkdir posix
22891 (cd posix
22892 TEST_TAR_FORMAT=posix
22893 export TEST_TAR_FORMAT
22894 TAR_OPTIONS=\"-H posix\"
22895 export TAR_OPTIONS
22896 rm -rf *
22897
22898
22899 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22900
22901
22902 mkdir foo
22903 genfile --file foo/file1
22904 genfile --file foo/file2
22905 mkdir foo/bar
22906 genfile --file foo/bar/file
22907
22908 echo \"Creating base archive\"
22909 tar -g incr -cf arch.1 -v foo
22910
22911 mv foo/bar foo/baz
22912
22913 echo \"Creating incremental archive\"
22914 tar -g incr -cf arch.2 -v foo
22915
22916 mv foo old
22917
22918 tar xfg arch.1 /dev/null
22919
22920 echo \"Begin directory listing 1\"
22921 find foo | sort
22922 echo \"End directory listing 1\"
22923
22924 tar xfg arch.2 /dev/null
22925 echo Begin directory listing 2
22926 find foo | sort
22927 echo End directory listing 2
22928 )"
22929 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
22930 ( $at_check_trace;
22931 mkdir posix
22932 (cd posix
22933 TEST_TAR_FORMAT=posix
22934 export TEST_TAR_FORMAT
22935 TAR_OPTIONS="-H posix"
22936 export TAR_OPTIONS
22937 rm -rf *
22938
22939
22940 test -z "`sort < /dev/null 2>&1`" || exit 77
22941
22942
22943 mkdir foo
22944 genfile --file foo/file1
22945 genfile --file foo/file2
22946 mkdir foo/bar
22947 genfile --file foo/bar/file
22948
22949 echo "Creating base archive"
22950 tar -g incr -cf arch.1 -v foo
22951
22952 mv foo/bar foo/baz
22953
22954 echo "Creating incremental archive"
22955 tar -g incr -cf arch.2 -v foo
22956
22957 mv foo old
22958
22959 tar xfg arch.1 /dev/null
22960
22961 echo "Begin directory listing 1"
22962 find foo | sort
22963 echo "End directory listing 1"
22964
22965 tar xfg arch.2 /dev/null
22966 echo Begin directory listing 2
22967 find foo | sort
22968 echo End directory listing 2
22969 )
22970 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22971 at_status=$? at_failed=false
22972 $at_check_filter
22973 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
22974 tar: foo/bar: Directory is new
22975 tar: foo/baz: Directory has been renamed from 'foo/bar'
22976 " | \
22977   $at_diff - "$at_stderr" || at_failed=:
22978 echo >>"$at_stdout"; $as_echo "Creating base archive
22979 foo/
22980 foo/bar/
22981 foo/file1
22982 foo/file2
22983 foo/bar/file
22984 Creating incremental archive
22985 foo/
22986 foo/baz/
22987 Begin directory listing 1
22988 foo
22989 foo/bar
22990 foo/bar/file
22991 foo/file1
22992 foo/file2
22993 End directory listing 1
22994 Begin directory listing 2
22995 foo
22996 foo/baz
22997 foo/baz/file
22998 foo/file1
22999 foo/file2
23000 End directory listing 2
23001 " | \
23002   $at_diff - "$at_stdout" || at_failed=:
23003 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
23004 $at_failed && at_fn_log_failure
23005 $at_traceon; }
23006
23007
23008
23009
23010   set +x
23011   $at_times_p && times >"$at_times_file"
23012 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23013 read at_status <"$at_status_file"
23014 #AT_STOP_97
23015 #AT_START_98
23016 at_fn_group_banner 98 'rename02.at:24' \
23017   "move between hierarchies" "                       " 13
23018 at_xfail=no
23019       test -f $XFAILFILE && at_xfail=yes
23020 (
23021   $as_echo "98. $at_setup_line: testing $at_desc ..."
23022   $at_traceon
23023
23024
23025
23026
23027
23028   { set +x
23029 $as_echo "$at_srcdir/rename02.at:27:
23030 mkdir gnu
23031 (cd gnu
23032 TEST_TAR_FORMAT=gnu
23033 export TEST_TAR_FORMAT
23034 TAR_OPTIONS=\"-H gnu\"
23035 export TAR_OPTIONS
23036 rm -rf *
23037
23038
23039 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23040
23041 mkdir foo
23042 genfile --file foo/file1
23043 genfile --file foo/file2
23044 mkdir foo/bar
23045 genfile --file foo/bar/file.r
23046 mkdir foo/bar/baz
23047 genfile --file foo/bar/baz/file.z
23048
23049 sleep 1
23050
23051 echo \"Creating base archive\"
23052 tar -g incr -cf arch.1 -v foo
23053
23054 mv foo/bar/baz foo
23055
23056 echo \"Creating incremental archive\"
23057 tar -g incr -cf arch.2 -v foo
23058
23059 mv foo old
23060
23061 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23062 sort tmperr >&2
23063
23064 echo \"Begin directory listing 1\"
23065 find foo | sort
23066 echo \"End directory listing 1\"
23067
23068 tar xfgv arch.2 /dev/null --warning=no-timestamp
23069 echo Begin directory listing 2
23070 find foo | sort
23071 echo End directory listing 2
23072 )"
23073 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
23074 ( $at_check_trace;
23075 mkdir gnu
23076 (cd gnu
23077 TEST_TAR_FORMAT=gnu
23078 export TEST_TAR_FORMAT
23079 TAR_OPTIONS="-H gnu"
23080 export TAR_OPTIONS
23081 rm -rf *
23082
23083
23084 test -z "`sort < /dev/null 2>&1`" || exit 77
23085
23086 mkdir foo
23087 genfile --file foo/file1
23088 genfile --file foo/file2
23089 mkdir foo/bar
23090 genfile --file foo/bar/file.r
23091 mkdir foo/bar/baz
23092 genfile --file foo/bar/baz/file.z
23093
23094 sleep 1
23095
23096 echo "Creating base archive"
23097 tar -g incr -cf arch.1 -v foo
23098
23099 mv foo/bar/baz foo
23100
23101 echo "Creating incremental archive"
23102 tar -g incr -cf arch.2 -v foo
23103
23104 mv foo old
23105
23106 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23107 sort tmperr >&2
23108
23109 echo "Begin directory listing 1"
23110 find foo | sort
23111 echo "End directory listing 1"
23112
23113 tar xfgv arch.2 /dev/null --warning=no-timestamp
23114 echo Begin directory listing 2
23115 find foo | sort
23116 echo End directory listing 2
23117 )
23118 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23119 at_status=$? at_failed=false
23120 $at_check_filter
23121 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23122 tar: foo/bar: Directory is new
23123 tar: foo/bar/baz: Directory is new
23124 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
23125 " | \
23126   $at_diff - "$at_stderr" || at_failed=:
23127 echo >>"$at_stdout"; $as_echo "Creating base archive
23128 foo/
23129 foo/bar/
23130 foo/bar/baz/
23131 foo/file1
23132 foo/file2
23133 foo/bar/file.r
23134 foo/bar/baz/file.z
23135 Creating incremental archive
23136 foo/
23137 foo/bar/
23138 foo/baz/
23139 Begin directory listing 1
23140 foo
23141 foo/bar
23142 foo/bar/baz
23143 foo/bar/baz/file.z
23144 foo/bar/file.r
23145 foo/file1
23146 foo/file2
23147 End directory listing 1
23148 foo/
23149 foo/bar/
23150 foo/baz/
23151 Begin directory listing 2
23152 foo
23153 foo/bar
23154 foo/bar/file.r
23155 foo/baz
23156 foo/baz/file.z
23157 foo/file1
23158 foo/file2
23159 End directory listing 2
23160 " | \
23161   $at_diff - "$at_stdout" || at_failed=:
23162 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
23163 $at_failed && at_fn_log_failure
23164 $at_traceon; }
23165
23166               { set +x
23167 $as_echo "$at_srcdir/rename02.at:27:
23168 mkdir oldgnu
23169 (cd oldgnu
23170 TEST_TAR_FORMAT=oldgnu
23171 export TEST_TAR_FORMAT
23172 TAR_OPTIONS=\"-H oldgnu\"
23173 export TAR_OPTIONS
23174 rm -rf *
23175
23176
23177 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23178
23179 mkdir foo
23180 genfile --file foo/file1
23181 genfile --file foo/file2
23182 mkdir foo/bar
23183 genfile --file foo/bar/file.r
23184 mkdir foo/bar/baz
23185 genfile --file foo/bar/baz/file.z
23186
23187 sleep 1
23188
23189 echo \"Creating base archive\"
23190 tar -g incr -cf arch.1 -v foo
23191
23192 mv foo/bar/baz foo
23193
23194 echo \"Creating incremental archive\"
23195 tar -g incr -cf arch.2 -v foo
23196
23197 mv foo old
23198
23199 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23200 sort tmperr >&2
23201
23202 echo \"Begin directory listing 1\"
23203 find foo | sort
23204 echo \"End directory listing 1\"
23205
23206 tar xfgv arch.2 /dev/null --warning=no-timestamp
23207 echo Begin directory listing 2
23208 find foo | sort
23209 echo End directory listing 2
23210 )"
23211 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
23212 ( $at_check_trace;
23213 mkdir oldgnu
23214 (cd oldgnu
23215 TEST_TAR_FORMAT=oldgnu
23216 export TEST_TAR_FORMAT
23217 TAR_OPTIONS="-H oldgnu"
23218 export TAR_OPTIONS
23219 rm -rf *
23220
23221
23222 test -z "`sort < /dev/null 2>&1`" || exit 77
23223
23224 mkdir foo
23225 genfile --file foo/file1
23226 genfile --file foo/file2
23227 mkdir foo/bar
23228 genfile --file foo/bar/file.r
23229 mkdir foo/bar/baz
23230 genfile --file foo/bar/baz/file.z
23231
23232 sleep 1
23233
23234 echo "Creating base archive"
23235 tar -g incr -cf arch.1 -v foo
23236
23237 mv foo/bar/baz foo
23238
23239 echo "Creating incremental archive"
23240 tar -g incr -cf arch.2 -v foo
23241
23242 mv foo old
23243
23244 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23245 sort tmperr >&2
23246
23247 echo "Begin directory listing 1"
23248 find foo | sort
23249 echo "End directory listing 1"
23250
23251 tar xfgv arch.2 /dev/null --warning=no-timestamp
23252 echo Begin directory listing 2
23253 find foo | sort
23254 echo End directory listing 2
23255 )
23256 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23257 at_status=$? at_failed=false
23258 $at_check_filter
23259 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23260 tar: foo/bar: Directory is new
23261 tar: foo/bar/baz: Directory is new
23262 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
23263 " | \
23264   $at_diff - "$at_stderr" || at_failed=:
23265 echo >>"$at_stdout"; $as_echo "Creating base archive
23266 foo/
23267 foo/bar/
23268 foo/bar/baz/
23269 foo/file1
23270 foo/file2
23271 foo/bar/file.r
23272 foo/bar/baz/file.z
23273 Creating incremental archive
23274 foo/
23275 foo/bar/
23276 foo/baz/
23277 Begin directory listing 1
23278 foo
23279 foo/bar
23280 foo/bar/baz
23281 foo/bar/baz/file.z
23282 foo/bar/file.r
23283 foo/file1
23284 foo/file2
23285 End directory listing 1
23286 foo/
23287 foo/bar/
23288 foo/baz/
23289 Begin directory listing 2
23290 foo
23291 foo/bar
23292 foo/bar/file.r
23293 foo/baz
23294 foo/baz/file.z
23295 foo/file1
23296 foo/file2
23297 End directory listing 2
23298 " | \
23299   $at_diff - "$at_stdout" || at_failed=:
23300 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
23301 $at_failed && at_fn_log_failure
23302 $at_traceon; }
23303
23304               { set +x
23305 $as_echo "$at_srcdir/rename02.at:27:
23306 mkdir posix
23307 (cd posix
23308 TEST_TAR_FORMAT=posix
23309 export TEST_TAR_FORMAT
23310 TAR_OPTIONS=\"-H posix\"
23311 export TAR_OPTIONS
23312 rm -rf *
23313
23314
23315 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23316
23317 mkdir foo
23318 genfile --file foo/file1
23319 genfile --file foo/file2
23320 mkdir foo/bar
23321 genfile --file foo/bar/file.r
23322 mkdir foo/bar/baz
23323 genfile --file foo/bar/baz/file.z
23324
23325 sleep 1
23326
23327 echo \"Creating base archive\"
23328 tar -g incr -cf arch.1 -v foo
23329
23330 mv foo/bar/baz foo
23331
23332 echo \"Creating incremental archive\"
23333 tar -g incr -cf arch.2 -v foo
23334
23335 mv foo old
23336
23337 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23338 sort tmperr >&2
23339
23340 echo \"Begin directory listing 1\"
23341 find foo | sort
23342 echo \"End directory listing 1\"
23343
23344 tar xfgv arch.2 /dev/null --warning=no-timestamp
23345 echo Begin directory listing 2
23346 find foo | sort
23347 echo End directory listing 2
23348 )"
23349 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
23350 ( $at_check_trace;
23351 mkdir posix
23352 (cd posix
23353 TEST_TAR_FORMAT=posix
23354 export TEST_TAR_FORMAT
23355 TAR_OPTIONS="-H posix"
23356 export TAR_OPTIONS
23357 rm -rf *
23358
23359
23360 test -z "`sort < /dev/null 2>&1`" || exit 77
23361
23362 mkdir foo
23363 genfile --file foo/file1
23364 genfile --file foo/file2
23365 mkdir foo/bar
23366 genfile --file foo/bar/file.r
23367 mkdir foo/bar/baz
23368 genfile --file foo/bar/baz/file.z
23369
23370 sleep 1
23371
23372 echo "Creating base archive"
23373 tar -g incr -cf arch.1 -v foo
23374
23375 mv foo/bar/baz foo
23376
23377 echo "Creating incremental archive"
23378 tar -g incr -cf arch.2 -v foo
23379
23380 mv foo old
23381
23382 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23383 sort tmperr >&2
23384
23385 echo "Begin directory listing 1"
23386 find foo | sort
23387 echo "End directory listing 1"
23388
23389 tar xfgv arch.2 /dev/null --warning=no-timestamp
23390 echo Begin directory listing 2
23391 find foo | sort
23392 echo End directory listing 2
23393 )
23394 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23395 at_status=$? at_failed=false
23396 $at_check_filter
23397 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23398 tar: foo/bar: Directory is new
23399 tar: foo/bar/baz: Directory is new
23400 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
23401 " | \
23402   $at_diff - "$at_stderr" || at_failed=:
23403 echo >>"$at_stdout"; $as_echo "Creating base archive
23404 foo/
23405 foo/bar/
23406 foo/bar/baz/
23407 foo/file1
23408 foo/file2
23409 foo/bar/file.r
23410 foo/bar/baz/file.z
23411 Creating incremental archive
23412 foo/
23413 foo/bar/
23414 foo/baz/
23415 Begin directory listing 1
23416 foo
23417 foo/bar
23418 foo/bar/baz
23419 foo/bar/baz/file.z
23420 foo/bar/file.r
23421 foo/file1
23422 foo/file2
23423 End directory listing 1
23424 foo/
23425 foo/bar/
23426 foo/baz/
23427 Begin directory listing 2
23428 foo
23429 foo/bar
23430 foo/bar/file.r
23431 foo/baz
23432 foo/baz/file.z
23433 foo/file1
23434 foo/file2
23435 End directory listing 2
23436 " | \
23437   $at_diff - "$at_stdout" || at_failed=:
23438 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
23439 $at_failed && at_fn_log_failure
23440 $at_traceon; }
23441
23442
23443
23444
23445   set +x
23446   $at_times_p && times >"$at_times_file"
23447 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23448 read at_status <"$at_status_file"
23449 #AT_STOP_98
23450 #AT_START_99
23451 at_fn_group_banner 99 'rename03.at:23' \
23452   "cyclic renames" "                                 " 13
23453 at_xfail=no
23454       test -f $XFAILFILE && at_xfail=yes
23455 (
23456   $as_echo "99. $at_setup_line: testing $at_desc ..."
23457   $at_traceon
23458
23459
23460
23461
23462
23463   { set +x
23464 $as_echo "$at_srcdir/rename03.at:26:
23465 mkdir gnu
23466 (cd gnu
23467 TEST_TAR_FORMAT=gnu
23468 export TEST_TAR_FORMAT
23469 TAR_OPTIONS=\"-H gnu\"
23470 export TAR_OPTIONS
23471 rm -rf *
23472
23473
23474 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23475
23476
23477 mkdir foo
23478 genfile --file foo/file1
23479 genfile --file foo/file2
23480
23481 mkdir foo/a
23482 genfile --file foo/a/filea
23483
23484 mkdir foo/b
23485 genfile --file foo/b/fileb
23486
23487 mkdir foo/c
23488 genfile --file foo/c/filec
23489
23490 sleep 1
23491
23492 echo \"First dump\"
23493 echo \"First dump\">&2
23494 tar -g incr -cf arch.1 -v foo 2>tmperr
23495 sort tmperr >&2
23496
23497 # Shuffle directories:
23498 (cd foo
23499 mv a \$\$
23500 mv c a
23501 mv b c
23502 mv \$\$ b)
23503
23504 echo \"Second dump\"
23505 echo \"Second dump\" >&2
23506 tar -g incr -cf arch.2 -v foo 2>tmperr
23507 sort tmperr >&2
23508
23509 tar xfg arch.1 /dev/null --warning=no-timestamp
23510
23511 echo \"Begin directory listing 1\"
23512 find foo | sort
23513 echo \"End directory listing 1\"
23514
23515 tar xfgv arch.2 /dev/null --warning=no-timestamp
23516 echo Begin directory listing 2
23517 find foo | sort
23518 echo End directory listing 2
23519 )"
23520 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
23521 ( $at_check_trace;
23522 mkdir gnu
23523 (cd gnu
23524 TEST_TAR_FORMAT=gnu
23525 export TEST_TAR_FORMAT
23526 TAR_OPTIONS="-H gnu"
23527 export TAR_OPTIONS
23528 rm -rf *
23529
23530
23531 test -z "`sort < /dev/null 2>&1`" || exit 77
23532
23533
23534 mkdir foo
23535 genfile --file foo/file1
23536 genfile --file foo/file2
23537
23538 mkdir foo/a
23539 genfile --file foo/a/filea
23540
23541 mkdir foo/b
23542 genfile --file foo/b/fileb
23543
23544 mkdir foo/c
23545 genfile --file foo/c/filec
23546
23547 sleep 1
23548
23549 echo "First dump"
23550 echo "First dump">&2
23551 tar -g incr -cf arch.1 -v foo 2>tmperr
23552 sort tmperr >&2
23553
23554 # Shuffle directories:
23555 (cd foo
23556 mv a $$
23557 mv c a
23558 mv b c
23559 mv $$ b)
23560
23561 echo "Second dump"
23562 echo "Second dump" >&2
23563 tar -g incr -cf arch.2 -v foo 2>tmperr
23564 sort tmperr >&2
23565
23566 tar xfg arch.1 /dev/null --warning=no-timestamp
23567
23568 echo "Begin directory listing 1"
23569 find foo | sort
23570 echo "End directory listing 1"
23571
23572 tar xfgv arch.2 /dev/null --warning=no-timestamp
23573 echo Begin directory listing 2
23574 find foo | sort
23575 echo End directory listing 2
23576 )
23577 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23578 at_status=$? at_failed=false
23579 $at_check_filter
23580 echo >>"$at_stderr"; $as_echo "First dump
23581 tar: foo/a: Directory is new
23582 tar: foo/b: Directory is new
23583 tar: foo/c: Directory is new
23584 tar: foo: Directory is new
23585 Second dump
23586 tar: foo/a: Directory has been renamed from 'foo/c'
23587 tar: foo/b: Directory has been renamed from 'foo/a'
23588 tar: foo/c: Directory has been renamed from 'foo/b'
23589 " | \
23590   $at_diff - "$at_stderr" || at_failed=:
23591 echo >>"$at_stdout"; $as_echo "First dump
23592 foo/
23593 foo/a/
23594 foo/b/
23595 foo/c/
23596 foo/file1
23597 foo/file2
23598 foo/a/filea
23599 foo/b/fileb
23600 foo/c/filec
23601 Second dump
23602 foo/
23603 foo/a/
23604 foo/b/
23605 foo/c/
23606 Begin directory listing 1
23607 foo
23608 foo/a
23609 foo/a/filea
23610 foo/b
23611 foo/b/fileb
23612 foo/c
23613 foo/c/filec
23614 foo/file1
23615 foo/file2
23616 End directory listing 1
23617 foo/
23618 foo/a/
23619 foo/b/
23620 foo/c/
23621 Begin directory listing 2
23622 foo
23623 foo/a
23624 foo/a/filec
23625 foo/b
23626 foo/b/filea
23627 foo/c
23628 foo/c/fileb
23629 foo/file1
23630 foo/file2
23631 End directory listing 2
23632 " | \
23633   $at_diff - "$at_stdout" || at_failed=:
23634 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
23635 $at_failed && at_fn_log_failure
23636 $at_traceon; }
23637
23638               { set +x
23639 $as_echo "$at_srcdir/rename03.at:26:
23640 mkdir oldgnu
23641 (cd oldgnu
23642 TEST_TAR_FORMAT=oldgnu
23643 export TEST_TAR_FORMAT
23644 TAR_OPTIONS=\"-H oldgnu\"
23645 export TAR_OPTIONS
23646 rm -rf *
23647
23648
23649 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23650
23651
23652 mkdir foo
23653 genfile --file foo/file1
23654 genfile --file foo/file2
23655
23656 mkdir foo/a
23657 genfile --file foo/a/filea
23658
23659 mkdir foo/b
23660 genfile --file foo/b/fileb
23661
23662 mkdir foo/c
23663 genfile --file foo/c/filec
23664
23665 sleep 1
23666
23667 echo \"First dump\"
23668 echo \"First dump\">&2
23669 tar -g incr -cf arch.1 -v foo 2>tmperr
23670 sort tmperr >&2
23671
23672 # Shuffle directories:
23673 (cd foo
23674 mv a \$\$
23675 mv c a
23676 mv b c
23677 mv \$\$ b)
23678
23679 echo \"Second dump\"
23680 echo \"Second dump\" >&2
23681 tar -g incr -cf arch.2 -v foo 2>tmperr
23682 sort tmperr >&2
23683
23684 tar xfg arch.1 /dev/null --warning=no-timestamp
23685
23686 echo \"Begin directory listing 1\"
23687 find foo | sort
23688 echo \"End directory listing 1\"
23689
23690 tar xfgv arch.2 /dev/null --warning=no-timestamp
23691 echo Begin directory listing 2
23692 find foo | sort
23693 echo End directory listing 2
23694 )"
23695 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
23696 ( $at_check_trace;
23697 mkdir oldgnu
23698 (cd oldgnu
23699 TEST_TAR_FORMAT=oldgnu
23700 export TEST_TAR_FORMAT
23701 TAR_OPTIONS="-H oldgnu"
23702 export TAR_OPTIONS
23703 rm -rf *
23704
23705
23706 test -z "`sort < /dev/null 2>&1`" || exit 77
23707
23708
23709 mkdir foo
23710 genfile --file foo/file1
23711 genfile --file foo/file2
23712
23713 mkdir foo/a
23714 genfile --file foo/a/filea
23715
23716 mkdir foo/b
23717 genfile --file foo/b/fileb
23718
23719 mkdir foo/c
23720 genfile --file foo/c/filec
23721
23722 sleep 1
23723
23724 echo "First dump"
23725 echo "First dump">&2
23726 tar -g incr -cf arch.1 -v foo 2>tmperr
23727 sort tmperr >&2
23728
23729 # Shuffle directories:
23730 (cd foo
23731 mv a $$
23732 mv c a
23733 mv b c
23734 mv $$ b)
23735
23736 echo "Second dump"
23737 echo "Second dump" >&2
23738 tar -g incr -cf arch.2 -v foo 2>tmperr
23739 sort tmperr >&2
23740
23741 tar xfg arch.1 /dev/null --warning=no-timestamp
23742
23743 echo "Begin directory listing 1"
23744 find foo | sort
23745 echo "End directory listing 1"
23746
23747 tar xfgv arch.2 /dev/null --warning=no-timestamp
23748 echo Begin directory listing 2
23749 find foo | sort
23750 echo End directory listing 2
23751 )
23752 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23753 at_status=$? at_failed=false
23754 $at_check_filter
23755 echo >>"$at_stderr"; $as_echo "First dump
23756 tar: foo/a: Directory is new
23757 tar: foo/b: Directory is new
23758 tar: foo/c: Directory is new
23759 tar: foo: Directory is new
23760 Second dump
23761 tar: foo/a: Directory has been renamed from 'foo/c'
23762 tar: foo/b: Directory has been renamed from 'foo/a'
23763 tar: foo/c: Directory has been renamed from 'foo/b'
23764 " | \
23765   $at_diff - "$at_stderr" || at_failed=:
23766 echo >>"$at_stdout"; $as_echo "First dump
23767 foo/
23768 foo/a/
23769 foo/b/
23770 foo/c/
23771 foo/file1
23772 foo/file2
23773 foo/a/filea
23774 foo/b/fileb
23775 foo/c/filec
23776 Second dump
23777 foo/
23778 foo/a/
23779 foo/b/
23780 foo/c/
23781 Begin directory listing 1
23782 foo
23783 foo/a
23784 foo/a/filea
23785 foo/b
23786 foo/b/fileb
23787 foo/c
23788 foo/c/filec
23789 foo/file1
23790 foo/file2
23791 End directory listing 1
23792 foo/
23793 foo/a/
23794 foo/b/
23795 foo/c/
23796 Begin directory listing 2
23797 foo
23798 foo/a
23799 foo/a/filec
23800 foo/b
23801 foo/b/filea
23802 foo/c
23803 foo/c/fileb
23804 foo/file1
23805 foo/file2
23806 End directory listing 2
23807 " | \
23808   $at_diff - "$at_stdout" || at_failed=:
23809 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
23810 $at_failed && at_fn_log_failure
23811 $at_traceon; }
23812
23813               { set +x
23814 $as_echo "$at_srcdir/rename03.at:26:
23815 mkdir posix
23816 (cd posix
23817 TEST_TAR_FORMAT=posix
23818 export TEST_TAR_FORMAT
23819 TAR_OPTIONS=\"-H posix\"
23820 export TAR_OPTIONS
23821 rm -rf *
23822
23823
23824 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23825
23826
23827 mkdir foo
23828 genfile --file foo/file1
23829 genfile --file foo/file2
23830
23831 mkdir foo/a
23832 genfile --file foo/a/filea
23833
23834 mkdir foo/b
23835 genfile --file foo/b/fileb
23836
23837 mkdir foo/c
23838 genfile --file foo/c/filec
23839
23840 sleep 1
23841
23842 echo \"First dump\"
23843 echo \"First dump\">&2
23844 tar -g incr -cf arch.1 -v foo 2>tmperr
23845 sort tmperr >&2
23846
23847 # Shuffle directories:
23848 (cd foo
23849 mv a \$\$
23850 mv c a
23851 mv b c
23852 mv \$\$ b)
23853
23854 echo \"Second dump\"
23855 echo \"Second dump\" >&2
23856 tar -g incr -cf arch.2 -v foo 2>tmperr
23857 sort tmperr >&2
23858
23859 tar xfg arch.1 /dev/null --warning=no-timestamp
23860
23861 echo \"Begin directory listing 1\"
23862 find foo | sort
23863 echo \"End directory listing 1\"
23864
23865 tar xfgv arch.2 /dev/null --warning=no-timestamp
23866 echo Begin directory listing 2
23867 find foo | sort
23868 echo End directory listing 2
23869 )"
23870 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
23871 ( $at_check_trace;
23872 mkdir posix
23873 (cd posix
23874 TEST_TAR_FORMAT=posix
23875 export TEST_TAR_FORMAT
23876 TAR_OPTIONS="-H posix"
23877 export TAR_OPTIONS
23878 rm -rf *
23879
23880
23881 test -z "`sort < /dev/null 2>&1`" || exit 77
23882
23883
23884 mkdir foo
23885 genfile --file foo/file1
23886 genfile --file foo/file2
23887
23888 mkdir foo/a
23889 genfile --file foo/a/filea
23890
23891 mkdir foo/b
23892 genfile --file foo/b/fileb
23893
23894 mkdir foo/c
23895 genfile --file foo/c/filec
23896
23897 sleep 1
23898
23899 echo "First dump"
23900 echo "First dump">&2
23901 tar -g incr -cf arch.1 -v foo 2>tmperr
23902 sort tmperr >&2
23903
23904 # Shuffle directories:
23905 (cd foo
23906 mv a $$
23907 mv c a
23908 mv b c
23909 mv $$ b)
23910
23911 echo "Second dump"
23912 echo "Second dump" >&2
23913 tar -g incr -cf arch.2 -v foo 2>tmperr
23914 sort tmperr >&2
23915
23916 tar xfg arch.1 /dev/null --warning=no-timestamp
23917
23918 echo "Begin directory listing 1"
23919 find foo | sort
23920 echo "End directory listing 1"
23921
23922 tar xfgv arch.2 /dev/null --warning=no-timestamp
23923 echo Begin directory listing 2
23924 find foo | sort
23925 echo End directory listing 2
23926 )
23927 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23928 at_status=$? at_failed=false
23929 $at_check_filter
23930 echo >>"$at_stderr"; $as_echo "First dump
23931 tar: foo/a: Directory is new
23932 tar: foo/b: Directory is new
23933 tar: foo/c: Directory is new
23934 tar: foo: Directory is new
23935 Second dump
23936 tar: foo/a: Directory has been renamed from 'foo/c'
23937 tar: foo/b: Directory has been renamed from 'foo/a'
23938 tar: foo/c: Directory has been renamed from 'foo/b'
23939 " | \
23940   $at_diff - "$at_stderr" || at_failed=:
23941 echo >>"$at_stdout"; $as_echo "First dump
23942 foo/
23943 foo/a/
23944 foo/b/
23945 foo/c/
23946 foo/file1
23947 foo/file2
23948 foo/a/filea
23949 foo/b/fileb
23950 foo/c/filec
23951 Second dump
23952 foo/
23953 foo/a/
23954 foo/b/
23955 foo/c/
23956 Begin directory listing 1
23957 foo
23958 foo/a
23959 foo/a/filea
23960 foo/b
23961 foo/b/fileb
23962 foo/c
23963 foo/c/filec
23964 foo/file1
23965 foo/file2
23966 End directory listing 1
23967 foo/
23968 foo/a/
23969 foo/b/
23970 foo/c/
23971 Begin directory listing 2
23972 foo
23973 foo/a
23974 foo/a/filec
23975 foo/b
23976 foo/b/filea
23977 foo/c
23978 foo/c/fileb
23979 foo/file1
23980 foo/file2
23981 End directory listing 2
23982 " | \
23983   $at_diff - "$at_stdout" || at_failed=:
23984 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
23985 $at_failed && at_fn_log_failure
23986 $at_traceon; }
23987
23988
23989
23990
23991   set +x
23992   $at_times_p && times >"$at_times_file"
23993 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23994 read at_status <"$at_status_file"
23995 #AT_STOP_99
23996 #AT_START_100
23997 at_fn_group_banner 100 'rename04.at:27' \
23998   "renamed directory containing subdirectories" "    " 13
23999 at_xfail=no
24000       test -f $XFAILFILE && at_xfail=yes
24001 (
24002   $as_echo "100. $at_setup_line: testing $at_desc ..."
24003   $at_traceon
24004
24005
24006
24007
24008
24009   { set +x
24010 $as_echo "$at_srcdir/rename04.at:30:
24011 mkdir gnu
24012 (cd gnu
24013 TEST_TAR_FORMAT=gnu
24014 export TEST_TAR_FORMAT
24015 TAR_OPTIONS=\"-H gnu\"
24016 export TAR_OPTIONS
24017 rm -rf *
24018
24019
24020 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24021
24022
24023 decho Creating directory structure
24024 mkdir directory
24025 mkdir directory/subdir
24026 genfile --file=directory/file
24027
24028 decho Creating initial archive
24029 tar -cf archive.1 -g db.1 directory
24030
24031 decho Renaming
24032 mv directory dir
24033
24034 decho Creating incremental archive
24035 cp db.1 db.2
24036 tar -cf archive.2 -g db.2 dir
24037
24038 mv dir orig
24039
24040 decho First restore
24041 tar -xf archive.1 -g db.1
24042 find directory | sort
24043
24044 decho Second restore
24045 tar -xf archive.2 -g db.2
24046 find dir | sort
24047 )"
24048 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
24049 ( $at_check_trace;
24050 mkdir gnu
24051 (cd gnu
24052 TEST_TAR_FORMAT=gnu
24053 export TEST_TAR_FORMAT
24054 TAR_OPTIONS="-H gnu"
24055 export TAR_OPTIONS
24056 rm -rf *
24057
24058
24059 test -z "`sort < /dev/null 2>&1`" || exit 77
24060
24061
24062 decho Creating directory structure
24063 mkdir directory
24064 mkdir directory/subdir
24065 genfile --file=directory/file
24066
24067 decho Creating initial archive
24068 tar -cf archive.1 -g db.1 directory
24069
24070 decho Renaming
24071 mv directory dir
24072
24073 decho Creating incremental archive
24074 cp db.1 db.2
24075 tar -cf archive.2 -g db.2 dir
24076
24077 mv dir orig
24078
24079 decho First restore
24080 tar -xf archive.1 -g db.1
24081 find directory | sort
24082
24083 decho Second restore
24084 tar -xf archive.2 -g db.2
24085 find dir | sort
24086 )
24087 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24088 at_status=$? at_failed=false
24089 $at_check_filter
24090 echo >>"$at_stderr"; $as_echo "Creating directory structure
24091 Creating initial archive
24092 Renaming
24093 Creating incremental archive
24094 First restore
24095 Second restore
24096 " | \
24097   $at_diff - "$at_stderr" || at_failed=:
24098 echo >>"$at_stdout"; $as_echo "Creating directory structure
24099 Creating initial archive
24100 Renaming
24101 Creating incremental archive
24102 First restore
24103 directory
24104 directory/file
24105 directory/subdir
24106 Second restore
24107 dir
24108 dir/subdir
24109 " | \
24110   $at_diff - "$at_stdout" || at_failed=:
24111 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
24112 $at_failed && at_fn_log_failure
24113 $at_traceon; }
24114
24115               { set +x
24116 $as_echo "$at_srcdir/rename04.at:30:
24117 mkdir oldgnu
24118 (cd oldgnu
24119 TEST_TAR_FORMAT=oldgnu
24120 export TEST_TAR_FORMAT
24121 TAR_OPTIONS=\"-H oldgnu\"
24122 export TAR_OPTIONS
24123 rm -rf *
24124
24125
24126 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24127
24128
24129 decho Creating directory structure
24130 mkdir directory
24131 mkdir directory/subdir
24132 genfile --file=directory/file
24133
24134 decho Creating initial archive
24135 tar -cf archive.1 -g db.1 directory
24136
24137 decho Renaming
24138 mv directory dir
24139
24140 decho Creating incremental archive
24141 cp db.1 db.2
24142 tar -cf archive.2 -g db.2 dir
24143
24144 mv dir orig
24145
24146 decho First restore
24147 tar -xf archive.1 -g db.1
24148 find directory | sort
24149
24150 decho Second restore
24151 tar -xf archive.2 -g db.2
24152 find dir | sort
24153 )"
24154 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
24155 ( $at_check_trace;
24156 mkdir oldgnu
24157 (cd oldgnu
24158 TEST_TAR_FORMAT=oldgnu
24159 export TEST_TAR_FORMAT
24160 TAR_OPTIONS="-H oldgnu"
24161 export TAR_OPTIONS
24162 rm -rf *
24163
24164
24165 test -z "`sort < /dev/null 2>&1`" || exit 77
24166
24167
24168 decho Creating directory structure
24169 mkdir directory
24170 mkdir directory/subdir
24171 genfile --file=directory/file
24172
24173 decho Creating initial archive
24174 tar -cf archive.1 -g db.1 directory
24175
24176 decho Renaming
24177 mv directory dir
24178
24179 decho Creating incremental archive
24180 cp db.1 db.2
24181 tar -cf archive.2 -g db.2 dir
24182
24183 mv dir orig
24184
24185 decho First restore
24186 tar -xf archive.1 -g db.1
24187 find directory | sort
24188
24189 decho Second restore
24190 tar -xf archive.2 -g db.2
24191 find dir | sort
24192 )
24193 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24194 at_status=$? at_failed=false
24195 $at_check_filter
24196 echo >>"$at_stderr"; $as_echo "Creating directory structure
24197 Creating initial archive
24198 Renaming
24199 Creating incremental archive
24200 First restore
24201 Second restore
24202 " | \
24203   $at_diff - "$at_stderr" || at_failed=:
24204 echo >>"$at_stdout"; $as_echo "Creating directory structure
24205 Creating initial archive
24206 Renaming
24207 Creating incremental archive
24208 First restore
24209 directory
24210 directory/file
24211 directory/subdir
24212 Second restore
24213 dir
24214 dir/subdir
24215 " | \
24216   $at_diff - "$at_stdout" || at_failed=:
24217 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
24218 $at_failed && at_fn_log_failure
24219 $at_traceon; }
24220
24221               { set +x
24222 $as_echo "$at_srcdir/rename04.at:30:
24223 mkdir posix
24224 (cd posix
24225 TEST_TAR_FORMAT=posix
24226 export TEST_TAR_FORMAT
24227 TAR_OPTIONS=\"-H posix\"
24228 export TAR_OPTIONS
24229 rm -rf *
24230
24231
24232 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24233
24234
24235 decho Creating directory structure
24236 mkdir directory
24237 mkdir directory/subdir
24238 genfile --file=directory/file
24239
24240 decho Creating initial archive
24241 tar -cf archive.1 -g db.1 directory
24242
24243 decho Renaming
24244 mv directory dir
24245
24246 decho Creating incremental archive
24247 cp db.1 db.2
24248 tar -cf archive.2 -g db.2 dir
24249
24250 mv dir orig
24251
24252 decho First restore
24253 tar -xf archive.1 -g db.1
24254 find directory | sort
24255
24256 decho Second restore
24257 tar -xf archive.2 -g db.2
24258 find dir | sort
24259 )"
24260 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
24261 ( $at_check_trace;
24262 mkdir posix
24263 (cd posix
24264 TEST_TAR_FORMAT=posix
24265 export TEST_TAR_FORMAT
24266 TAR_OPTIONS="-H posix"
24267 export TAR_OPTIONS
24268 rm -rf *
24269
24270
24271 test -z "`sort < /dev/null 2>&1`" || exit 77
24272
24273
24274 decho Creating directory structure
24275 mkdir directory
24276 mkdir directory/subdir
24277 genfile --file=directory/file
24278
24279 decho Creating initial archive
24280 tar -cf archive.1 -g db.1 directory
24281
24282 decho Renaming
24283 mv directory dir
24284
24285 decho Creating incremental archive
24286 cp db.1 db.2
24287 tar -cf archive.2 -g db.2 dir
24288
24289 mv dir orig
24290
24291 decho First restore
24292 tar -xf archive.1 -g db.1
24293 find directory | sort
24294
24295 decho Second restore
24296 tar -xf archive.2 -g db.2
24297 find dir | sort
24298 )
24299 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24300 at_status=$? at_failed=false
24301 $at_check_filter
24302 echo >>"$at_stderr"; $as_echo "Creating directory structure
24303 Creating initial archive
24304 Renaming
24305 Creating incremental archive
24306 First restore
24307 Second restore
24308 " | \
24309   $at_diff - "$at_stderr" || at_failed=:
24310 echo >>"$at_stdout"; $as_echo "Creating directory structure
24311 Creating initial archive
24312 Renaming
24313 Creating incremental archive
24314 First restore
24315 directory
24316 directory/file
24317 directory/subdir
24318 Second restore
24319 dir
24320 dir/subdir
24321 " | \
24322   $at_diff - "$at_stdout" || at_failed=:
24323 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
24324 $at_failed && at_fn_log_failure
24325 $at_traceon; }
24326
24327
24328
24329
24330   set +x
24331   $at_times_p && times >"$at_times_file"
24332 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24333 read at_status <"$at_status_file"
24334 #AT_STOP_100
24335 #AT_START_101
24336 at_fn_group_banner 101 'rename05.at:24' \
24337   "renamed subdirectories" "                         " 13
24338 at_xfail=no
24339       test -f $XFAILFILE && at_xfail=yes
24340 (
24341   $as_echo "101. $at_setup_line: testing $at_desc ..."
24342   $at_traceon
24343
24344
24345
24346
24347
24348   { set +x
24349 $as_echo "$at_srcdir/rename05.at:27:
24350 mkdir gnu
24351 (cd gnu
24352 TEST_TAR_FORMAT=gnu
24353 export TEST_TAR_FORMAT
24354 TAR_OPTIONS=\"-H gnu\"
24355 export TAR_OPTIONS
24356 rm -rf *
24357
24358
24359 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24360
24361
24362 decho Creating directory structure
24363 mkdir directory
24364 mkdir directory/subdir
24365 genfile --file=directory/file
24366
24367 decho Creating initial archive
24368 tar -cf archive.1 -g db.1 directory
24369
24370 decho Renaming
24371 mv directory/subdir directory/subdir.0
24372 mv directory dir
24373
24374 decho Creating incremental archive
24375 cp db.1 db.2
24376 tar -cf archive.2 -g db.2 dir
24377
24378 mv dir orig
24379
24380 decho First restore
24381 tar -xf archive.1 -g db.1 --warning=no-timestamp
24382 find directory | sort
24383
24384 decho Second restore
24385 tar -xf archive.2 -g db.2 --warning=no-timestamp
24386 find dir | sort
24387 )"
24388 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
24389 ( $at_check_trace;
24390 mkdir gnu
24391 (cd gnu
24392 TEST_TAR_FORMAT=gnu
24393 export TEST_TAR_FORMAT
24394 TAR_OPTIONS="-H gnu"
24395 export TAR_OPTIONS
24396 rm -rf *
24397
24398
24399 test -z "`sort < /dev/null 2>&1`" || exit 77
24400
24401
24402 decho Creating directory structure
24403 mkdir directory
24404 mkdir directory/subdir
24405 genfile --file=directory/file
24406
24407 decho Creating initial archive
24408 tar -cf archive.1 -g db.1 directory
24409
24410 decho Renaming
24411 mv directory/subdir directory/subdir.0
24412 mv directory dir
24413
24414 decho Creating incremental archive
24415 cp db.1 db.2
24416 tar -cf archive.2 -g db.2 dir
24417
24418 mv dir orig
24419
24420 decho First restore
24421 tar -xf archive.1 -g db.1 --warning=no-timestamp
24422 find directory | sort
24423
24424 decho Second restore
24425 tar -xf archive.2 -g db.2 --warning=no-timestamp
24426 find dir | sort
24427 )
24428 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24429 at_status=$? at_failed=false
24430 $at_check_filter
24431 echo >>"$at_stderr"; $as_echo "Creating directory structure
24432 Creating initial archive
24433 Renaming
24434 Creating incremental archive
24435 First restore
24436 Second restore
24437 " | \
24438   $at_diff - "$at_stderr" || at_failed=:
24439 echo >>"$at_stdout"; $as_echo "Creating directory structure
24440 Creating initial archive
24441 Renaming
24442 Creating incremental archive
24443 First restore
24444 directory
24445 directory/file
24446 directory/subdir
24447 Second restore
24448 dir
24449 dir/subdir.0
24450 " | \
24451   $at_diff - "$at_stdout" || at_failed=:
24452 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
24453 $at_failed && at_fn_log_failure
24454 $at_traceon; }
24455
24456               { set +x
24457 $as_echo "$at_srcdir/rename05.at:27:
24458 mkdir oldgnu
24459 (cd oldgnu
24460 TEST_TAR_FORMAT=oldgnu
24461 export TEST_TAR_FORMAT
24462 TAR_OPTIONS=\"-H oldgnu\"
24463 export TAR_OPTIONS
24464 rm -rf *
24465
24466
24467 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24468
24469
24470 decho Creating directory structure
24471 mkdir directory
24472 mkdir directory/subdir
24473 genfile --file=directory/file
24474
24475 decho Creating initial archive
24476 tar -cf archive.1 -g db.1 directory
24477
24478 decho Renaming
24479 mv directory/subdir directory/subdir.0
24480 mv directory dir
24481
24482 decho Creating incremental archive
24483 cp db.1 db.2
24484 tar -cf archive.2 -g db.2 dir
24485
24486 mv dir orig
24487
24488 decho First restore
24489 tar -xf archive.1 -g db.1 --warning=no-timestamp
24490 find directory | sort
24491
24492 decho Second restore
24493 tar -xf archive.2 -g db.2 --warning=no-timestamp
24494 find dir | sort
24495 )"
24496 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
24497 ( $at_check_trace;
24498 mkdir oldgnu
24499 (cd oldgnu
24500 TEST_TAR_FORMAT=oldgnu
24501 export TEST_TAR_FORMAT
24502 TAR_OPTIONS="-H oldgnu"
24503 export TAR_OPTIONS
24504 rm -rf *
24505
24506
24507 test -z "`sort < /dev/null 2>&1`" || exit 77
24508
24509
24510 decho Creating directory structure
24511 mkdir directory
24512 mkdir directory/subdir
24513 genfile --file=directory/file
24514
24515 decho Creating initial archive
24516 tar -cf archive.1 -g db.1 directory
24517
24518 decho Renaming
24519 mv directory/subdir directory/subdir.0
24520 mv directory dir
24521
24522 decho Creating incremental archive
24523 cp db.1 db.2
24524 tar -cf archive.2 -g db.2 dir
24525
24526 mv dir orig
24527
24528 decho First restore
24529 tar -xf archive.1 -g db.1 --warning=no-timestamp
24530 find directory | sort
24531
24532 decho Second restore
24533 tar -xf archive.2 -g db.2 --warning=no-timestamp
24534 find dir | sort
24535 )
24536 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24537 at_status=$? at_failed=false
24538 $at_check_filter
24539 echo >>"$at_stderr"; $as_echo "Creating directory structure
24540 Creating initial archive
24541 Renaming
24542 Creating incremental archive
24543 First restore
24544 Second restore
24545 " | \
24546   $at_diff - "$at_stderr" || at_failed=:
24547 echo >>"$at_stdout"; $as_echo "Creating directory structure
24548 Creating initial archive
24549 Renaming
24550 Creating incremental archive
24551 First restore
24552 directory
24553 directory/file
24554 directory/subdir
24555 Second restore
24556 dir
24557 dir/subdir.0
24558 " | \
24559   $at_diff - "$at_stdout" || at_failed=:
24560 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
24561 $at_failed && at_fn_log_failure
24562 $at_traceon; }
24563
24564               { set +x
24565 $as_echo "$at_srcdir/rename05.at:27:
24566 mkdir posix
24567 (cd posix
24568 TEST_TAR_FORMAT=posix
24569 export TEST_TAR_FORMAT
24570 TAR_OPTIONS=\"-H posix\"
24571 export TAR_OPTIONS
24572 rm -rf *
24573
24574
24575 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24576
24577
24578 decho Creating directory structure
24579 mkdir directory
24580 mkdir directory/subdir
24581 genfile --file=directory/file
24582
24583 decho Creating initial archive
24584 tar -cf archive.1 -g db.1 directory
24585
24586 decho Renaming
24587 mv directory/subdir directory/subdir.0
24588 mv directory dir
24589
24590 decho Creating incremental archive
24591 cp db.1 db.2
24592 tar -cf archive.2 -g db.2 dir
24593
24594 mv dir orig
24595
24596 decho First restore
24597 tar -xf archive.1 -g db.1 --warning=no-timestamp
24598 find directory | sort
24599
24600 decho Second restore
24601 tar -xf archive.2 -g db.2 --warning=no-timestamp
24602 find dir | sort
24603 )"
24604 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
24605 ( $at_check_trace;
24606 mkdir posix
24607 (cd posix
24608 TEST_TAR_FORMAT=posix
24609 export TEST_TAR_FORMAT
24610 TAR_OPTIONS="-H posix"
24611 export TAR_OPTIONS
24612 rm -rf *
24613
24614
24615 test -z "`sort < /dev/null 2>&1`" || exit 77
24616
24617
24618 decho Creating directory structure
24619 mkdir directory
24620 mkdir directory/subdir
24621 genfile --file=directory/file
24622
24623 decho Creating initial archive
24624 tar -cf archive.1 -g db.1 directory
24625
24626 decho Renaming
24627 mv directory/subdir directory/subdir.0
24628 mv directory dir
24629
24630 decho Creating incremental archive
24631 cp db.1 db.2
24632 tar -cf archive.2 -g db.2 dir
24633
24634 mv dir orig
24635
24636 decho First restore
24637 tar -xf archive.1 -g db.1 --warning=no-timestamp
24638 find directory | sort
24639
24640 decho Second restore
24641 tar -xf archive.2 -g db.2 --warning=no-timestamp
24642 find dir | sort
24643 )
24644 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24645 at_status=$? at_failed=false
24646 $at_check_filter
24647 echo >>"$at_stderr"; $as_echo "Creating directory structure
24648 Creating initial archive
24649 Renaming
24650 Creating incremental archive
24651 First restore
24652 Second restore
24653 " | \
24654   $at_diff - "$at_stderr" || at_failed=:
24655 echo >>"$at_stdout"; $as_echo "Creating directory structure
24656 Creating initial archive
24657 Renaming
24658 Creating incremental archive
24659 First restore
24660 directory
24661 directory/file
24662 directory/subdir
24663 Second restore
24664 dir
24665 dir/subdir.0
24666 " | \
24667   $at_diff - "$at_stdout" || at_failed=:
24668 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
24669 $at_failed && at_fn_log_failure
24670 $at_traceon; }
24671
24672
24673
24674
24675   set +x
24676   $at_times_p && times >"$at_times_file"
24677 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24678 read at_status <"$at_status_file"
24679 #AT_STOP_101
24680 #AT_START_102
24681 at_fn_group_banner 102 'chtype.at:27' \
24682   "changed file types in incrementals" "             " 13
24683 at_xfail=no
24684       test -f $XFAILFILE && at_xfail=yes
24685 (
24686   $as_echo "102. $at_setup_line: testing $at_desc ..."
24687   $at_traceon
24688
24689
24690
24691
24692
24693   { set +x
24694 $as_echo "$at_srcdir/chtype.at:30:
24695 mkdir gnu
24696 (cd gnu
24697 TEST_TAR_FORMAT=gnu
24698 export TEST_TAR_FORMAT
24699 TAR_OPTIONS=\"-H gnu\"
24700 export TAR_OPTIONS
24701 rm -rf *
24702
24703
24704 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24705
24706
24707 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
24708 mkdir directory/a
24709 genfile --file directory/a/a
24710
24711 echo First backup
24712 tar --create --file=archive.1 --listed-incremental=db.1 directory
24713
24714 sleep 2
24715
24716 # Remove directory b and create a file with this name.
24717 # Previous versions were not able to restore over this file.
24718 rm -r directory/b
24719 genfile --file directory/b
24720 genfile --file directory/a/b
24721
24722 echo Second backup
24723 tar --create --file=archive.2 --listed-incremental=db.2 directory
24724
24725 # Delete a
24726 rm -r directory
24727
24728 echo Restore archive.1
24729 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
24730 echo Restore archive.2
24731 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
24732 find directory | sort
24733 )"
24734 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
24735 ( $at_check_trace;
24736 mkdir gnu
24737 (cd gnu
24738 TEST_TAR_FORMAT=gnu
24739 export TEST_TAR_FORMAT
24740 TAR_OPTIONS="-H gnu"
24741 export TAR_OPTIONS
24742 rm -rf *
24743
24744
24745 test -z "`sort < /dev/null 2>&1`" || exit 77
24746
24747
24748 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
24749 mkdir directory/a
24750 genfile --file directory/a/a
24751
24752 echo First backup
24753 tar --create --file=archive.1 --listed-incremental=db.1 directory
24754
24755 sleep 2
24756
24757 # Remove directory b and create a file with this name.
24758 # Previous versions were not able to restore over this file.
24759 rm -r directory/b
24760 genfile --file directory/b
24761 genfile --file directory/a/b
24762
24763 echo Second backup
24764 tar --create --file=archive.2 --listed-incremental=db.2 directory
24765
24766 # Delete a
24767 rm -r directory
24768
24769 echo Restore archive.1
24770 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
24771 echo Restore archive.2
24772 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
24773 find directory | sort
24774 )
24775 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24776 at_status=$? at_failed=false
24777 $at_check_filter
24778 at_fn_diff_devnull "$at_stderr" || at_failed=:
24779 echo >>"$at_stdout"; $as_echo "First backup
24780 Second backup
24781 Restore archive.1
24782 Restore archive.2
24783 directory
24784 directory/a
24785 directory/a/a
24786 directory/a/b
24787 directory/b
24788 " | \
24789   $at_diff - "$at_stdout" || at_failed=:
24790 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
24791 $at_failed && at_fn_log_failure
24792 $at_traceon; }
24793
24794               { set +x
24795 $as_echo "$at_srcdir/chtype.at:30:
24796 mkdir oldgnu
24797 (cd oldgnu
24798 TEST_TAR_FORMAT=oldgnu
24799 export TEST_TAR_FORMAT
24800 TAR_OPTIONS=\"-H oldgnu\"
24801 export TAR_OPTIONS
24802 rm -rf *
24803
24804
24805 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24806
24807
24808 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
24809 mkdir directory/a
24810 genfile --file directory/a/a
24811
24812 echo First backup
24813 tar --create --file=archive.1 --listed-incremental=db.1 directory
24814
24815 sleep 2
24816
24817 # Remove directory b and create a file with this name.
24818 # Previous versions were not able to restore over this file.
24819 rm -r directory/b
24820 genfile --file directory/b
24821 genfile --file directory/a/b
24822
24823 echo Second backup
24824 tar --create --file=archive.2 --listed-incremental=db.2 directory
24825
24826 # Delete a
24827 rm -r directory
24828
24829 echo Restore archive.1
24830 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
24831 echo Restore archive.2
24832 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
24833 find directory | sort
24834 )"
24835 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
24836 ( $at_check_trace;
24837 mkdir oldgnu
24838 (cd oldgnu
24839 TEST_TAR_FORMAT=oldgnu
24840 export TEST_TAR_FORMAT
24841 TAR_OPTIONS="-H oldgnu"
24842 export TAR_OPTIONS
24843 rm -rf *
24844
24845
24846 test -z "`sort < /dev/null 2>&1`" || exit 77
24847
24848
24849 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
24850 mkdir directory/a
24851 genfile --file directory/a/a
24852
24853 echo First backup
24854 tar --create --file=archive.1 --listed-incremental=db.1 directory
24855
24856 sleep 2
24857
24858 # Remove directory b and create a file with this name.
24859 # Previous versions were not able to restore over this file.
24860 rm -r directory/b
24861 genfile --file directory/b
24862 genfile --file directory/a/b
24863
24864 echo Second backup
24865 tar --create --file=archive.2 --listed-incremental=db.2 directory
24866
24867 # Delete a
24868 rm -r directory
24869
24870 echo Restore archive.1
24871 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
24872 echo Restore archive.2
24873 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
24874 find directory | sort
24875 )
24876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24877 at_status=$? at_failed=false
24878 $at_check_filter
24879 at_fn_diff_devnull "$at_stderr" || at_failed=:
24880 echo >>"$at_stdout"; $as_echo "First backup
24881 Second backup
24882 Restore archive.1
24883 Restore archive.2
24884 directory
24885 directory/a
24886 directory/a/a
24887 directory/a/b
24888 directory/b
24889 " | \
24890   $at_diff - "$at_stdout" || at_failed=:
24891 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
24892 $at_failed && at_fn_log_failure
24893 $at_traceon; }
24894
24895               { set +x
24896 $as_echo "$at_srcdir/chtype.at:30:
24897 mkdir posix
24898 (cd posix
24899 TEST_TAR_FORMAT=posix
24900 export TEST_TAR_FORMAT
24901 TAR_OPTIONS=\"-H posix\"
24902 export TAR_OPTIONS
24903 rm -rf *
24904
24905
24906 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24907
24908
24909 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
24910 mkdir directory/a
24911 genfile --file directory/a/a
24912
24913 echo First backup
24914 tar --create --file=archive.1 --listed-incremental=db.1 directory
24915
24916 sleep 2
24917
24918 # Remove directory b and create a file with this name.
24919 # Previous versions were not able to restore over this file.
24920 rm -r directory/b
24921 genfile --file directory/b
24922 genfile --file directory/a/b
24923
24924 echo Second backup
24925 tar --create --file=archive.2 --listed-incremental=db.2 directory
24926
24927 # Delete a
24928 rm -r directory
24929
24930 echo Restore archive.1
24931 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
24932 echo Restore archive.2
24933 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
24934 find directory | sort
24935 )"
24936 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
24937 ( $at_check_trace;
24938 mkdir posix
24939 (cd posix
24940 TEST_TAR_FORMAT=posix
24941 export TEST_TAR_FORMAT
24942 TAR_OPTIONS="-H posix"
24943 export TAR_OPTIONS
24944 rm -rf *
24945
24946
24947 test -z "`sort < /dev/null 2>&1`" || exit 77
24948
24949
24950 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
24951 mkdir directory/a
24952 genfile --file directory/a/a
24953
24954 echo First backup
24955 tar --create --file=archive.1 --listed-incremental=db.1 directory
24956
24957 sleep 2
24958
24959 # Remove directory b and create a file with this name.
24960 # Previous versions were not able to restore over this file.
24961 rm -r directory/b
24962 genfile --file directory/b
24963 genfile --file directory/a/b
24964
24965 echo Second backup
24966 tar --create --file=archive.2 --listed-incremental=db.2 directory
24967
24968 # Delete a
24969 rm -r directory
24970
24971 echo Restore archive.1
24972 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
24973 echo Restore archive.2
24974 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
24975 find directory | sort
24976 )
24977 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24978 at_status=$? at_failed=false
24979 $at_check_filter
24980 at_fn_diff_devnull "$at_stderr" || at_failed=:
24981 echo >>"$at_stdout"; $as_echo "First backup
24982 Second backup
24983 Restore archive.1
24984 Restore archive.2
24985 directory
24986 directory/a
24987 directory/a/a
24988 directory/a/b
24989 directory/b
24990 " | \
24991   $at_diff - "$at_stdout" || at_failed=:
24992 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
24993 $at_failed && at_fn_log_failure
24994 $at_traceon; }
24995
24996
24997
24998
24999   set +x
25000   $at_times_p && times >"$at_times_file"
25001 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25002 read at_status <"$at_status_file"
25003 #AT_STOP_102
25004 #AT_START_103
25005 at_fn_group_banner 103 'ignfail.at:23' \
25006   "ignfail" "                                        " 14
25007 at_xfail=no
25008       test -f $XFAILFILE && at_xfail=yes
25009 (
25010   $as_echo "103. $at_setup_line: testing $at_desc ..."
25011   $at_traceon
25012
25013
25014
25015
25016
25017   { set +x
25018 $as_echo "$at_srcdir/ignfail.at:26:
25019 mkdir v7
25020 (cd v7
25021 TEST_TAR_FORMAT=v7
25022 export TEST_TAR_FORMAT
25023 TAR_OPTIONS=\"-H v7\"
25024 export TAR_OPTIONS
25025 rm -rf *
25026
25027 # The test is meaningless for super-user.
25028
25029 echo \"test\" > \$\$
25030 chmod 0 \$\$
25031 cat \$\$ > /dev/null 2>&1
25032 result=\$?
25033 rm -f \$\$
25034 test \$result -eq 0 && exit 77
25035
25036
25037 touch file
25038 mkdir directory
25039 touch directory/file
25040
25041 echo 1>&2 -----
25042 chmod 000 file
25043 tar cf archive file
25044 status=\$?
25045 chmod 600 file
25046 test \$status = 2 || exit 1
25047
25048 echo 1>&2 -----
25049 chmod 000 file
25050 tar cf archive --ignore-failed-read file || exit 1
25051 status=\$?
25052 chmod 600 file
25053 test \$status = 0 || exit 1
25054
25055 echo 1>&2 -----
25056 chmod 000 directory
25057 tar cf archive directory
25058 status=\$?
25059 chmod 700 directory
25060 test \$status = 2 || exit 1
25061
25062 echo 1>&2 -----
25063 chmod 000 directory
25064 tar cf archive --ignore-failed-read directory || exit 1
25065 status=\$?
25066 chmod 700 directory
25067 test \$status = 0
25068 )"
25069 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25070 ( $at_check_trace;
25071 mkdir v7
25072 (cd v7
25073 TEST_TAR_FORMAT=v7
25074 export TEST_TAR_FORMAT
25075 TAR_OPTIONS="-H v7"
25076 export TAR_OPTIONS
25077 rm -rf *
25078
25079 # The test is meaningless for super-user.
25080
25081 echo "test" > $$
25082 chmod 0 $$
25083 cat $$ > /dev/null 2>&1
25084 result=$?
25085 rm -f $$
25086 test $result -eq 0 && exit 77
25087
25088
25089 touch file
25090 mkdir directory
25091 touch directory/file
25092
25093 echo 1>&2 -----
25094 chmod 000 file
25095 tar cf archive file
25096 status=$?
25097 chmod 600 file
25098 test $status = 2 || exit 1
25099
25100 echo 1>&2 -----
25101 chmod 000 file
25102 tar cf archive --ignore-failed-read file || exit 1
25103 status=$?
25104 chmod 600 file
25105 test $status = 0 || exit 1
25106
25107 echo 1>&2 -----
25108 chmod 000 directory
25109 tar cf archive directory
25110 status=$?
25111 chmod 700 directory
25112 test $status = 2 || exit 1
25113
25114 echo 1>&2 -----
25115 chmod 000 directory
25116 tar cf archive --ignore-failed-read directory || exit 1
25117 status=$?
25118 chmod 700 directory
25119 test $status = 0
25120 )
25121 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25122 at_status=$? at_failed=false
25123 $at_check_filter
25124 echo >>"$at_stderr"; $as_echo "-----
25125 tar: file: Cannot open: Permission denied
25126 tar: Exiting with failure status due to previous errors
25127 -----
25128 tar: file: Warning: Cannot open: Permission denied
25129 -----
25130 tar: directory: Cannot open: Permission denied
25131 tar: Exiting with failure status due to previous errors
25132 -----
25133 tar: directory: Warning: Cannot open: Permission denied
25134 " | \
25135   $at_diff - "$at_stderr" || at_failed=:
25136 at_fn_diff_devnull "$at_stdout" || at_failed=:
25137 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25138 $at_failed && at_fn_log_failure
25139 $at_traceon; }
25140
25141               { set +x
25142 $as_echo "$at_srcdir/ignfail.at:26:
25143 mkdir oldgnu
25144 (cd oldgnu
25145 TEST_TAR_FORMAT=oldgnu
25146 export TEST_TAR_FORMAT
25147 TAR_OPTIONS=\"-H oldgnu\"
25148 export TAR_OPTIONS
25149 rm -rf *
25150
25151 # The test is meaningless for super-user.
25152
25153 echo \"test\" > \$\$
25154 chmod 0 \$\$
25155 cat \$\$ > /dev/null 2>&1
25156 result=\$?
25157 rm -f \$\$
25158 test \$result -eq 0 && exit 77
25159
25160
25161 touch file
25162 mkdir directory
25163 touch directory/file
25164
25165 echo 1>&2 -----
25166 chmod 000 file
25167 tar cf archive file
25168 status=\$?
25169 chmod 600 file
25170 test \$status = 2 || exit 1
25171
25172 echo 1>&2 -----
25173 chmod 000 file
25174 tar cf archive --ignore-failed-read file || exit 1
25175 status=\$?
25176 chmod 600 file
25177 test \$status = 0 || exit 1
25178
25179 echo 1>&2 -----
25180 chmod 000 directory
25181 tar cf archive directory
25182 status=\$?
25183 chmod 700 directory
25184 test \$status = 2 || exit 1
25185
25186 echo 1>&2 -----
25187 chmod 000 directory
25188 tar cf archive --ignore-failed-read directory || exit 1
25189 status=\$?
25190 chmod 700 directory
25191 test \$status = 0
25192 )"
25193 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25194 ( $at_check_trace;
25195 mkdir oldgnu
25196 (cd oldgnu
25197 TEST_TAR_FORMAT=oldgnu
25198 export TEST_TAR_FORMAT
25199 TAR_OPTIONS="-H oldgnu"
25200 export TAR_OPTIONS
25201 rm -rf *
25202
25203 # The test is meaningless for super-user.
25204
25205 echo "test" > $$
25206 chmod 0 $$
25207 cat $$ > /dev/null 2>&1
25208 result=$?
25209 rm -f $$
25210 test $result -eq 0 && exit 77
25211
25212
25213 touch file
25214 mkdir directory
25215 touch directory/file
25216
25217 echo 1>&2 -----
25218 chmod 000 file
25219 tar cf archive file
25220 status=$?
25221 chmod 600 file
25222 test $status = 2 || exit 1
25223
25224 echo 1>&2 -----
25225 chmod 000 file
25226 tar cf archive --ignore-failed-read file || exit 1
25227 status=$?
25228 chmod 600 file
25229 test $status = 0 || exit 1
25230
25231 echo 1>&2 -----
25232 chmod 000 directory
25233 tar cf archive directory
25234 status=$?
25235 chmod 700 directory
25236 test $status = 2 || exit 1
25237
25238 echo 1>&2 -----
25239 chmod 000 directory
25240 tar cf archive --ignore-failed-read directory || exit 1
25241 status=$?
25242 chmod 700 directory
25243 test $status = 0
25244 )
25245 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25246 at_status=$? at_failed=false
25247 $at_check_filter
25248 echo >>"$at_stderr"; $as_echo "-----
25249 tar: file: Cannot open: Permission denied
25250 tar: Exiting with failure status due to previous errors
25251 -----
25252 tar: file: Warning: Cannot open: Permission denied
25253 -----
25254 tar: directory: Cannot open: Permission denied
25255 tar: Exiting with failure status due to previous errors
25256 -----
25257 tar: directory: Warning: Cannot open: Permission denied
25258 " | \
25259   $at_diff - "$at_stderr" || at_failed=:
25260 at_fn_diff_devnull "$at_stdout" || at_failed=:
25261 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25262 $at_failed && at_fn_log_failure
25263 $at_traceon; }
25264
25265               { set +x
25266 $as_echo "$at_srcdir/ignfail.at:26:
25267 mkdir ustar
25268 (cd ustar
25269 TEST_TAR_FORMAT=ustar
25270 export TEST_TAR_FORMAT
25271 TAR_OPTIONS=\"-H ustar\"
25272 export TAR_OPTIONS
25273 rm -rf *
25274
25275 # The test is meaningless for super-user.
25276
25277 echo \"test\" > \$\$
25278 chmod 0 \$\$
25279 cat \$\$ > /dev/null 2>&1
25280 result=\$?
25281 rm -f \$\$
25282 test \$result -eq 0 && exit 77
25283
25284
25285 touch file
25286 mkdir directory
25287 touch directory/file
25288
25289 echo 1>&2 -----
25290 chmod 000 file
25291 tar cf archive file
25292 status=\$?
25293 chmod 600 file
25294 test \$status = 2 || exit 1
25295
25296 echo 1>&2 -----
25297 chmod 000 file
25298 tar cf archive --ignore-failed-read file || exit 1
25299 status=\$?
25300 chmod 600 file
25301 test \$status = 0 || exit 1
25302
25303 echo 1>&2 -----
25304 chmod 000 directory
25305 tar cf archive directory
25306 status=\$?
25307 chmod 700 directory
25308 test \$status = 2 || exit 1
25309
25310 echo 1>&2 -----
25311 chmod 000 directory
25312 tar cf archive --ignore-failed-read directory || exit 1
25313 status=\$?
25314 chmod 700 directory
25315 test \$status = 0
25316 )"
25317 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25318 ( $at_check_trace;
25319 mkdir ustar
25320 (cd ustar
25321 TEST_TAR_FORMAT=ustar
25322 export TEST_TAR_FORMAT
25323 TAR_OPTIONS="-H ustar"
25324 export TAR_OPTIONS
25325 rm -rf *
25326
25327 # The test is meaningless for super-user.
25328
25329 echo "test" > $$
25330 chmod 0 $$
25331 cat $$ > /dev/null 2>&1
25332 result=$?
25333 rm -f $$
25334 test $result -eq 0 && exit 77
25335
25336
25337 touch file
25338 mkdir directory
25339 touch directory/file
25340
25341 echo 1>&2 -----
25342 chmod 000 file
25343 tar cf archive file
25344 status=$?
25345 chmod 600 file
25346 test $status = 2 || exit 1
25347
25348 echo 1>&2 -----
25349 chmod 000 file
25350 tar cf archive --ignore-failed-read file || exit 1
25351 status=$?
25352 chmod 600 file
25353 test $status = 0 || exit 1
25354
25355 echo 1>&2 -----
25356 chmod 000 directory
25357 tar cf archive directory
25358 status=$?
25359 chmod 700 directory
25360 test $status = 2 || exit 1
25361
25362 echo 1>&2 -----
25363 chmod 000 directory
25364 tar cf archive --ignore-failed-read directory || exit 1
25365 status=$?
25366 chmod 700 directory
25367 test $status = 0
25368 )
25369 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25370 at_status=$? at_failed=false
25371 $at_check_filter
25372 echo >>"$at_stderr"; $as_echo "-----
25373 tar: file: Cannot open: Permission denied
25374 tar: Exiting with failure status due to previous errors
25375 -----
25376 tar: file: Warning: Cannot open: Permission denied
25377 -----
25378 tar: directory: Cannot open: Permission denied
25379 tar: Exiting with failure status due to previous errors
25380 -----
25381 tar: directory: Warning: Cannot open: Permission denied
25382 " | \
25383   $at_diff - "$at_stderr" || at_failed=:
25384 at_fn_diff_devnull "$at_stdout" || at_failed=:
25385 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25386 $at_failed && at_fn_log_failure
25387 $at_traceon; }
25388
25389               { set +x
25390 $as_echo "$at_srcdir/ignfail.at:26:
25391 mkdir posix
25392 (cd posix
25393 TEST_TAR_FORMAT=posix
25394 export TEST_TAR_FORMAT
25395 TAR_OPTIONS=\"-H posix\"
25396 export TAR_OPTIONS
25397 rm -rf *
25398
25399 # The test is meaningless for super-user.
25400
25401 echo \"test\" > \$\$
25402 chmod 0 \$\$
25403 cat \$\$ > /dev/null 2>&1
25404 result=\$?
25405 rm -f \$\$
25406 test \$result -eq 0 && exit 77
25407
25408
25409 touch file
25410 mkdir directory
25411 touch directory/file
25412
25413 echo 1>&2 -----
25414 chmod 000 file
25415 tar cf archive file
25416 status=\$?
25417 chmod 600 file
25418 test \$status = 2 || exit 1
25419
25420 echo 1>&2 -----
25421 chmod 000 file
25422 tar cf archive --ignore-failed-read file || exit 1
25423 status=\$?
25424 chmod 600 file
25425 test \$status = 0 || exit 1
25426
25427 echo 1>&2 -----
25428 chmod 000 directory
25429 tar cf archive directory
25430 status=\$?
25431 chmod 700 directory
25432 test \$status = 2 || exit 1
25433
25434 echo 1>&2 -----
25435 chmod 000 directory
25436 tar cf archive --ignore-failed-read directory || exit 1
25437 status=\$?
25438 chmod 700 directory
25439 test \$status = 0
25440 )"
25441 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25442 ( $at_check_trace;
25443 mkdir posix
25444 (cd posix
25445 TEST_TAR_FORMAT=posix
25446 export TEST_TAR_FORMAT
25447 TAR_OPTIONS="-H posix"
25448 export TAR_OPTIONS
25449 rm -rf *
25450
25451 # The test is meaningless for super-user.
25452
25453 echo "test" > $$
25454 chmod 0 $$
25455 cat $$ > /dev/null 2>&1
25456 result=$?
25457 rm -f $$
25458 test $result -eq 0 && exit 77
25459
25460
25461 touch file
25462 mkdir directory
25463 touch directory/file
25464
25465 echo 1>&2 -----
25466 chmod 000 file
25467 tar cf archive file
25468 status=$?
25469 chmod 600 file
25470 test $status = 2 || exit 1
25471
25472 echo 1>&2 -----
25473 chmod 000 file
25474 tar cf archive --ignore-failed-read file || exit 1
25475 status=$?
25476 chmod 600 file
25477 test $status = 0 || exit 1
25478
25479 echo 1>&2 -----
25480 chmod 000 directory
25481 tar cf archive directory
25482 status=$?
25483 chmod 700 directory
25484 test $status = 2 || exit 1
25485
25486 echo 1>&2 -----
25487 chmod 000 directory
25488 tar cf archive --ignore-failed-read directory || exit 1
25489 status=$?
25490 chmod 700 directory
25491 test $status = 0
25492 )
25493 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25494 at_status=$? at_failed=false
25495 $at_check_filter
25496 echo >>"$at_stderr"; $as_echo "-----
25497 tar: file: Cannot open: Permission denied
25498 tar: Exiting with failure status due to previous errors
25499 -----
25500 tar: file: Warning: Cannot open: Permission denied
25501 -----
25502 tar: directory: Cannot open: Permission denied
25503 tar: Exiting with failure status due to previous errors
25504 -----
25505 tar: directory: Warning: Cannot open: Permission denied
25506 " | \
25507   $at_diff - "$at_stderr" || at_failed=:
25508 at_fn_diff_devnull "$at_stdout" || at_failed=:
25509 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25510 $at_failed && at_fn_log_failure
25511 $at_traceon; }
25512
25513               { set +x
25514 $as_echo "$at_srcdir/ignfail.at:26:
25515 mkdir gnu
25516 (cd gnu
25517 TEST_TAR_FORMAT=gnu
25518 export TEST_TAR_FORMAT
25519 TAR_OPTIONS=\"-H gnu\"
25520 export TAR_OPTIONS
25521 rm -rf *
25522
25523 # The test is meaningless for super-user.
25524
25525 echo \"test\" > \$\$
25526 chmod 0 \$\$
25527 cat \$\$ > /dev/null 2>&1
25528 result=\$?
25529 rm -f \$\$
25530 test \$result -eq 0 && exit 77
25531
25532
25533 touch file
25534 mkdir directory
25535 touch directory/file
25536
25537 echo 1>&2 -----
25538 chmod 000 file
25539 tar cf archive file
25540 status=\$?
25541 chmod 600 file
25542 test \$status = 2 || exit 1
25543
25544 echo 1>&2 -----
25545 chmod 000 file
25546 tar cf archive --ignore-failed-read file || exit 1
25547 status=\$?
25548 chmod 600 file
25549 test \$status = 0 || exit 1
25550
25551 echo 1>&2 -----
25552 chmod 000 directory
25553 tar cf archive directory
25554 status=\$?
25555 chmod 700 directory
25556 test \$status = 2 || exit 1
25557
25558 echo 1>&2 -----
25559 chmod 000 directory
25560 tar cf archive --ignore-failed-read directory || exit 1
25561 status=\$?
25562 chmod 700 directory
25563 test \$status = 0
25564 )"
25565 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25566 ( $at_check_trace;
25567 mkdir gnu
25568 (cd gnu
25569 TEST_TAR_FORMAT=gnu
25570 export TEST_TAR_FORMAT
25571 TAR_OPTIONS="-H gnu"
25572 export TAR_OPTIONS
25573 rm -rf *
25574
25575 # The test is meaningless for super-user.
25576
25577 echo "test" > $$
25578 chmod 0 $$
25579 cat $$ > /dev/null 2>&1
25580 result=$?
25581 rm -f $$
25582 test $result -eq 0 && exit 77
25583
25584
25585 touch file
25586 mkdir directory
25587 touch directory/file
25588
25589 echo 1>&2 -----
25590 chmod 000 file
25591 tar cf archive file
25592 status=$?
25593 chmod 600 file
25594 test $status = 2 || exit 1
25595
25596 echo 1>&2 -----
25597 chmod 000 file
25598 tar cf archive --ignore-failed-read file || exit 1
25599 status=$?
25600 chmod 600 file
25601 test $status = 0 || exit 1
25602
25603 echo 1>&2 -----
25604 chmod 000 directory
25605 tar cf archive directory
25606 status=$?
25607 chmod 700 directory
25608 test $status = 2 || exit 1
25609
25610 echo 1>&2 -----
25611 chmod 000 directory
25612 tar cf archive --ignore-failed-read directory || exit 1
25613 status=$?
25614 chmod 700 directory
25615 test $status = 0
25616 )
25617 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25618 at_status=$? at_failed=false
25619 $at_check_filter
25620 echo >>"$at_stderr"; $as_echo "-----
25621 tar: file: Cannot open: Permission denied
25622 tar: Exiting with failure status due to previous errors
25623 -----
25624 tar: file: Warning: Cannot open: Permission denied
25625 -----
25626 tar: directory: Cannot open: Permission denied
25627 tar: Exiting with failure status due to previous errors
25628 -----
25629 tar: directory: Warning: Cannot open: Permission denied
25630 " | \
25631   $at_diff - "$at_stderr" || at_failed=:
25632 at_fn_diff_devnull "$at_stdout" || at_failed=:
25633 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25634 $at_failed && at_fn_log_failure
25635 $at_traceon; }
25636
25637
25638
25639
25640   set +x
25641   $at_times_p && times >"$at_times_file"
25642 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25643 read at_status <"$at_status_file"
25644 #AT_STOP_103
25645 #AT_START_104
25646 at_fn_group_banner 104 'link01.at:33' \
25647   "link count gt 2" "                                " 15
25648 at_xfail=no
25649       test -f $XFAILFILE && at_xfail=yes
25650 (
25651   $as_echo "104. $at_setup_line: testing $at_desc ..."
25652   $at_traceon
25653
25654
25655
25656
25657
25658   { set +x
25659 $as_echo "$at_srcdir/link01.at:36:
25660 mkdir v7
25661 (cd v7
25662 TEST_TAR_FORMAT=v7
25663 export TEST_TAR_FORMAT
25664 TAR_OPTIONS=\"-H v7\"
25665 export TAR_OPTIONS
25666 rm -rf *
25667
25668 mkdir directory
25669 mkdir directory/test1
25670 mkdir directory/test2
25671
25672 echo TEST > directory/test1/test.txt
25673 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25674
25675 tar cf archive directory/test1/test.txt directory/test1/test.txt
25676
25677 rm -r directory
25678 tar xf archive --warning=no-timestamp
25679
25680 ls directory/test1
25681 )"
25682 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
25683 ( $at_check_trace;
25684 mkdir v7
25685 (cd v7
25686 TEST_TAR_FORMAT=v7
25687 export TEST_TAR_FORMAT
25688 TAR_OPTIONS="-H v7"
25689 export TAR_OPTIONS
25690 rm -rf *
25691
25692 mkdir directory
25693 mkdir directory/test1
25694 mkdir directory/test2
25695
25696 echo TEST > directory/test1/test.txt
25697 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25698
25699 tar cf archive directory/test1/test.txt directory/test1/test.txt
25700
25701 rm -r directory
25702 tar xf archive --warning=no-timestamp
25703
25704 ls directory/test1
25705 )
25706 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25707 at_status=$? at_failed=false
25708 $at_check_filter
25709 at_fn_diff_devnull "$at_stderr" || at_failed=:
25710 echo >>"$at_stdout"; $as_echo "test.txt
25711 " | \
25712   $at_diff - "$at_stdout" || at_failed=:
25713 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
25714 $at_failed && at_fn_log_failure
25715 $at_traceon; }
25716
25717               { set +x
25718 $as_echo "$at_srcdir/link01.at:36:
25719 mkdir oldgnu
25720 (cd oldgnu
25721 TEST_TAR_FORMAT=oldgnu
25722 export TEST_TAR_FORMAT
25723 TAR_OPTIONS=\"-H oldgnu\"
25724 export TAR_OPTIONS
25725 rm -rf *
25726
25727 mkdir directory
25728 mkdir directory/test1
25729 mkdir directory/test2
25730
25731 echo TEST > directory/test1/test.txt
25732 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25733
25734 tar cf archive directory/test1/test.txt directory/test1/test.txt
25735
25736 rm -r directory
25737 tar xf archive --warning=no-timestamp
25738
25739 ls directory/test1
25740 )"
25741 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
25742 ( $at_check_trace;
25743 mkdir oldgnu
25744 (cd oldgnu
25745 TEST_TAR_FORMAT=oldgnu
25746 export TEST_TAR_FORMAT
25747 TAR_OPTIONS="-H oldgnu"
25748 export TAR_OPTIONS
25749 rm -rf *
25750
25751 mkdir directory
25752 mkdir directory/test1
25753 mkdir directory/test2
25754
25755 echo TEST > directory/test1/test.txt
25756 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25757
25758 tar cf archive directory/test1/test.txt directory/test1/test.txt
25759
25760 rm -r directory
25761 tar xf archive --warning=no-timestamp
25762
25763 ls directory/test1
25764 )
25765 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25766 at_status=$? at_failed=false
25767 $at_check_filter
25768 at_fn_diff_devnull "$at_stderr" || at_failed=:
25769 echo >>"$at_stdout"; $as_echo "test.txt
25770 " | \
25771   $at_diff - "$at_stdout" || at_failed=:
25772 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
25773 $at_failed && at_fn_log_failure
25774 $at_traceon; }
25775
25776               { set +x
25777 $as_echo "$at_srcdir/link01.at:36:
25778 mkdir ustar
25779 (cd ustar
25780 TEST_TAR_FORMAT=ustar
25781 export TEST_TAR_FORMAT
25782 TAR_OPTIONS=\"-H ustar\"
25783 export TAR_OPTIONS
25784 rm -rf *
25785
25786 mkdir directory
25787 mkdir directory/test1
25788 mkdir directory/test2
25789
25790 echo TEST > directory/test1/test.txt
25791 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25792
25793 tar cf archive directory/test1/test.txt directory/test1/test.txt
25794
25795 rm -r directory
25796 tar xf archive --warning=no-timestamp
25797
25798 ls directory/test1
25799 )"
25800 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
25801 ( $at_check_trace;
25802 mkdir ustar
25803 (cd ustar
25804 TEST_TAR_FORMAT=ustar
25805 export TEST_TAR_FORMAT
25806 TAR_OPTIONS="-H ustar"
25807 export TAR_OPTIONS
25808 rm -rf *
25809
25810 mkdir directory
25811 mkdir directory/test1
25812 mkdir directory/test2
25813
25814 echo TEST > directory/test1/test.txt
25815 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25816
25817 tar cf archive directory/test1/test.txt directory/test1/test.txt
25818
25819 rm -r directory
25820 tar xf archive --warning=no-timestamp
25821
25822 ls directory/test1
25823 )
25824 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25825 at_status=$? at_failed=false
25826 $at_check_filter
25827 at_fn_diff_devnull "$at_stderr" || at_failed=:
25828 echo >>"$at_stdout"; $as_echo "test.txt
25829 " | \
25830   $at_diff - "$at_stdout" || at_failed=:
25831 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
25832 $at_failed && at_fn_log_failure
25833 $at_traceon; }
25834
25835               { set +x
25836 $as_echo "$at_srcdir/link01.at:36:
25837 mkdir posix
25838 (cd posix
25839 TEST_TAR_FORMAT=posix
25840 export TEST_TAR_FORMAT
25841 TAR_OPTIONS=\"-H posix\"
25842 export TAR_OPTIONS
25843 rm -rf *
25844
25845 mkdir directory
25846 mkdir directory/test1
25847 mkdir directory/test2
25848
25849 echo TEST > directory/test1/test.txt
25850 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25851
25852 tar cf archive directory/test1/test.txt directory/test1/test.txt
25853
25854 rm -r directory
25855 tar xf archive --warning=no-timestamp
25856
25857 ls directory/test1
25858 )"
25859 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
25860 ( $at_check_trace;
25861 mkdir posix
25862 (cd posix
25863 TEST_TAR_FORMAT=posix
25864 export TEST_TAR_FORMAT
25865 TAR_OPTIONS="-H posix"
25866 export TAR_OPTIONS
25867 rm -rf *
25868
25869 mkdir directory
25870 mkdir directory/test1
25871 mkdir directory/test2
25872
25873 echo TEST > directory/test1/test.txt
25874 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25875
25876 tar cf archive directory/test1/test.txt directory/test1/test.txt
25877
25878 rm -r directory
25879 tar xf archive --warning=no-timestamp
25880
25881 ls directory/test1
25882 )
25883 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25884 at_status=$? at_failed=false
25885 $at_check_filter
25886 at_fn_diff_devnull "$at_stderr" || at_failed=:
25887 echo >>"$at_stdout"; $as_echo "test.txt
25888 " | \
25889   $at_diff - "$at_stdout" || at_failed=:
25890 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
25891 $at_failed && at_fn_log_failure
25892 $at_traceon; }
25893
25894               { set +x
25895 $as_echo "$at_srcdir/link01.at:36:
25896 mkdir gnu
25897 (cd gnu
25898 TEST_TAR_FORMAT=gnu
25899 export TEST_TAR_FORMAT
25900 TAR_OPTIONS=\"-H gnu\"
25901 export TAR_OPTIONS
25902 rm -rf *
25903
25904 mkdir directory
25905 mkdir directory/test1
25906 mkdir directory/test2
25907
25908 echo TEST > directory/test1/test.txt
25909 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25910
25911 tar cf archive directory/test1/test.txt directory/test1/test.txt
25912
25913 rm -r directory
25914 tar xf archive --warning=no-timestamp
25915
25916 ls directory/test1
25917 )"
25918 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
25919 ( $at_check_trace;
25920 mkdir gnu
25921 (cd gnu
25922 TEST_TAR_FORMAT=gnu
25923 export TEST_TAR_FORMAT
25924 TAR_OPTIONS="-H gnu"
25925 export TAR_OPTIONS
25926 rm -rf *
25927
25928 mkdir directory
25929 mkdir directory/test1
25930 mkdir directory/test2
25931
25932 echo TEST > directory/test1/test.txt
25933 ln directory/test1/test.txt directory/test2/test.txt || exit 77
25934
25935 tar cf archive directory/test1/test.txt directory/test1/test.txt
25936
25937 rm -r directory
25938 tar xf archive --warning=no-timestamp
25939
25940 ls directory/test1
25941 )
25942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25943 at_status=$? at_failed=false
25944 $at_check_filter
25945 at_fn_diff_devnull "$at_stderr" || at_failed=:
25946 echo >>"$at_stdout"; $as_echo "test.txt
25947 " | \
25948   $at_diff - "$at_stdout" || at_failed=:
25949 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
25950 $at_failed && at_fn_log_failure
25951 $at_traceon; }
25952
25953
25954
25955
25956   set +x
25957   $at_times_p && times >"$at_times_file"
25958 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25959 read at_status <"$at_status_file"
25960 #AT_STOP_104
25961 #AT_START_105
25962 at_fn_group_banner 105 'link02.at:32' \
25963   "preserve hard links with --remove-files" "        " 15
25964 at_xfail=no
25965       test -f $XFAILFILE && at_xfail=yes
25966 (
25967   $as_echo "105. $at_setup_line: testing $at_desc ..."
25968   $at_traceon
25969
25970
25971
25972
25973
25974   { set +x
25975 $as_echo "$at_srcdir/link02.at:35:
25976 mkdir v7
25977 (cd v7
25978 TEST_TAR_FORMAT=v7
25979 export TEST_TAR_FORMAT
25980 TAR_OPTIONS=\"-H v7\"
25981 export TAR_OPTIONS
25982 rm -rf *
25983
25984 genfile -l 64 -f file1
25985 ln file1 file2
25986 ln file2 file3
25987 ln file3 file4
25988 tar -c -f archive --remove-files file1 file2 file3 file4
25989 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
25990 )"
25991 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
25992 ( $at_check_trace;
25993 mkdir v7
25994 (cd v7
25995 TEST_TAR_FORMAT=v7
25996 export TEST_TAR_FORMAT
25997 TAR_OPTIONS="-H v7"
25998 export TAR_OPTIONS
25999 rm -rf *
26000
26001 genfile -l 64 -f file1
26002 ln file1 file2
26003 ln file2 file3
26004 ln file3 file4
26005 tar -c -f archive --remove-files file1 file2 file3 file4
26006 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26007 )
26008 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26009 at_status=$? at_failed=false
26010 $at_check_filter
26011 at_fn_diff_devnull "$at_stderr" || at_failed=:
26012 echo >>"$at_stdout"; $as_echo "file1
26013 file1
26014 file1
26015 " | \
26016   $at_diff - "$at_stdout" || at_failed=:
26017 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26018 $at_failed && at_fn_log_failure
26019 $at_traceon; }
26020
26021               { set +x
26022 $as_echo "$at_srcdir/link02.at:35:
26023 mkdir oldgnu
26024 (cd oldgnu
26025 TEST_TAR_FORMAT=oldgnu
26026 export TEST_TAR_FORMAT
26027 TAR_OPTIONS=\"-H oldgnu\"
26028 export TAR_OPTIONS
26029 rm -rf *
26030
26031 genfile -l 64 -f file1
26032 ln file1 file2
26033 ln file2 file3
26034 ln file3 file4
26035 tar -c -f archive --remove-files file1 file2 file3 file4
26036 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26037 )"
26038 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26039 ( $at_check_trace;
26040 mkdir oldgnu
26041 (cd oldgnu
26042 TEST_TAR_FORMAT=oldgnu
26043 export TEST_TAR_FORMAT
26044 TAR_OPTIONS="-H oldgnu"
26045 export TAR_OPTIONS
26046 rm -rf *
26047
26048 genfile -l 64 -f file1
26049 ln file1 file2
26050 ln file2 file3
26051 ln file3 file4
26052 tar -c -f archive --remove-files file1 file2 file3 file4
26053 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26054 )
26055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26056 at_status=$? at_failed=false
26057 $at_check_filter
26058 at_fn_diff_devnull "$at_stderr" || at_failed=:
26059 echo >>"$at_stdout"; $as_echo "file1
26060 file1
26061 file1
26062 " | \
26063   $at_diff - "$at_stdout" || at_failed=:
26064 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26065 $at_failed && at_fn_log_failure
26066 $at_traceon; }
26067
26068               { set +x
26069 $as_echo "$at_srcdir/link02.at:35:
26070 mkdir ustar
26071 (cd ustar
26072 TEST_TAR_FORMAT=ustar
26073 export TEST_TAR_FORMAT
26074 TAR_OPTIONS=\"-H ustar\"
26075 export TAR_OPTIONS
26076 rm -rf *
26077
26078 genfile -l 64 -f file1
26079 ln file1 file2
26080 ln file2 file3
26081 ln file3 file4
26082 tar -c -f archive --remove-files file1 file2 file3 file4
26083 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26084 )"
26085 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26086 ( $at_check_trace;
26087 mkdir ustar
26088 (cd ustar
26089 TEST_TAR_FORMAT=ustar
26090 export TEST_TAR_FORMAT
26091 TAR_OPTIONS="-H ustar"
26092 export TAR_OPTIONS
26093 rm -rf *
26094
26095 genfile -l 64 -f file1
26096 ln file1 file2
26097 ln file2 file3
26098 ln file3 file4
26099 tar -c -f archive --remove-files file1 file2 file3 file4
26100 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26101 )
26102 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26103 at_status=$? at_failed=false
26104 $at_check_filter
26105 at_fn_diff_devnull "$at_stderr" || at_failed=:
26106 echo >>"$at_stdout"; $as_echo "file1
26107 file1
26108 file1
26109 " | \
26110   $at_diff - "$at_stdout" || at_failed=:
26111 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26112 $at_failed && at_fn_log_failure
26113 $at_traceon; }
26114
26115               { set +x
26116 $as_echo "$at_srcdir/link02.at:35:
26117 mkdir posix
26118 (cd posix
26119 TEST_TAR_FORMAT=posix
26120 export TEST_TAR_FORMAT
26121 TAR_OPTIONS=\"-H posix\"
26122 export TAR_OPTIONS
26123 rm -rf *
26124
26125 genfile -l 64 -f file1
26126 ln file1 file2
26127 ln file2 file3
26128 ln file3 file4
26129 tar -c -f archive --remove-files file1 file2 file3 file4
26130 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26131 )"
26132 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26133 ( $at_check_trace;
26134 mkdir posix
26135 (cd posix
26136 TEST_TAR_FORMAT=posix
26137 export TEST_TAR_FORMAT
26138 TAR_OPTIONS="-H posix"
26139 export TAR_OPTIONS
26140 rm -rf *
26141
26142 genfile -l 64 -f file1
26143 ln file1 file2
26144 ln file2 file3
26145 ln file3 file4
26146 tar -c -f archive --remove-files file1 file2 file3 file4
26147 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26148 )
26149 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26150 at_status=$? at_failed=false
26151 $at_check_filter
26152 at_fn_diff_devnull "$at_stderr" || at_failed=:
26153 echo >>"$at_stdout"; $as_echo "file1
26154 file1
26155 file1
26156 " | \
26157   $at_diff - "$at_stdout" || at_failed=:
26158 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26159 $at_failed && at_fn_log_failure
26160 $at_traceon; }
26161
26162               { set +x
26163 $as_echo "$at_srcdir/link02.at:35:
26164 mkdir gnu
26165 (cd gnu
26166 TEST_TAR_FORMAT=gnu
26167 export TEST_TAR_FORMAT
26168 TAR_OPTIONS=\"-H gnu\"
26169 export TAR_OPTIONS
26170 rm -rf *
26171
26172 genfile -l 64 -f file1
26173 ln file1 file2
26174 ln file2 file3
26175 ln file3 file4
26176 tar -c -f archive --remove-files file1 file2 file3 file4
26177 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26178 )"
26179 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26180 ( $at_check_trace;
26181 mkdir gnu
26182 (cd gnu
26183 TEST_TAR_FORMAT=gnu
26184 export TEST_TAR_FORMAT
26185 TAR_OPTIONS="-H gnu"
26186 export TAR_OPTIONS
26187 rm -rf *
26188
26189 genfile -l 64 -f file1
26190 ln file1 file2
26191 ln file2 file3
26192 ln file3 file4
26193 tar -c -f archive --remove-files file1 file2 file3 file4
26194 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26195 )
26196 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26197 at_status=$? at_failed=false
26198 $at_check_filter
26199 at_fn_diff_devnull "$at_stderr" || at_failed=:
26200 echo >>"$at_stdout"; $as_echo "file1
26201 file1
26202 file1
26203 " | \
26204   $at_diff - "$at_stdout" || at_failed=:
26205 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26206 $at_failed && at_fn_log_failure
26207 $at_traceon; }
26208
26209
26210
26211
26212   set +x
26213   $at_times_p && times >"$at_times_file"
26214 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26215 read at_status <"$at_status_file"
26216 #AT_STOP_105
26217 #AT_START_106
26218 at_fn_group_banner 106 'link03.at:24' \
26219   "working -l with --remove-files" "                 " 15
26220 at_xfail=no
26221       test -f $XFAILFILE && at_xfail=yes
26222 (
26223   $as_echo "106. $at_setup_line: testing $at_desc ..."
26224   $at_traceon
26225
26226
26227
26228
26229
26230
26231
26232   { set +x
26233 $as_echo "$at_srcdir/link03.at:34:
26234 mkdir v7
26235 (cd v7
26236 TEST_TAR_FORMAT=v7
26237 export TEST_TAR_FORMAT
26238 TAR_OPTIONS=\"-H v7\"
26239 export TAR_OPTIONS
26240 rm -rf *
26241
26242
26243 genfile -l 64 -f file1
26244 ln file1 file2
26245 ln file2 file3
26246 ln file3 file4
26247
26248 echo archive.1
26249 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26250
26251 genfile -l 64 -f file1
26252 ln file1 file2
26253 ln file2 file3
26254 ln file3 file4
26255
26256 echo archive.2
26257 tar -c -f archive.2 -l --remove-files file1 file2 file3
26258 echo testing archive.2
26259 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26260 )"
26261 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26262 ( $at_check_trace;
26263 mkdir v7
26264 (cd v7
26265 TEST_TAR_FORMAT=v7
26266 export TEST_TAR_FORMAT
26267 TAR_OPTIONS="-H v7"
26268 export TAR_OPTIONS
26269 rm -rf *
26270
26271
26272 genfile -l 64 -f file1
26273 ln file1 file2
26274 ln file2 file3
26275 ln file3 file4
26276
26277 echo archive.1
26278 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26279
26280 genfile -l 64 -f file1
26281 ln file1 file2
26282 ln file2 file3
26283 ln file3 file4
26284
26285 echo archive.2
26286 tar -c -f archive.2 -l --remove-files file1 file2 file3
26287 echo testing archive.2
26288 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26289 )
26290 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26291 at_status=$? at_failed=false
26292 $at_check_filter
26293 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26294 " | \
26295   $at_diff - "$at_stderr" || at_failed=:
26296 echo >>"$at_stdout"; $as_echo "archive.1
26297 archive.2
26298 testing archive.2
26299 file1
26300 file1
26301 " | \
26302   $at_diff - "$at_stdout" || at_failed=:
26303 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26304 $at_failed && at_fn_log_failure
26305 $at_traceon; }
26306
26307               { set +x
26308 $as_echo "$at_srcdir/link03.at:34:
26309 mkdir oldgnu
26310 (cd oldgnu
26311 TEST_TAR_FORMAT=oldgnu
26312 export TEST_TAR_FORMAT
26313 TAR_OPTIONS=\"-H oldgnu\"
26314 export TAR_OPTIONS
26315 rm -rf *
26316
26317
26318 genfile -l 64 -f file1
26319 ln file1 file2
26320 ln file2 file3
26321 ln file3 file4
26322
26323 echo archive.1
26324 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26325
26326 genfile -l 64 -f file1
26327 ln file1 file2
26328 ln file2 file3
26329 ln file3 file4
26330
26331 echo archive.2
26332 tar -c -f archive.2 -l --remove-files file1 file2 file3
26333 echo testing archive.2
26334 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26335 )"
26336 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26337 ( $at_check_trace;
26338 mkdir oldgnu
26339 (cd oldgnu
26340 TEST_TAR_FORMAT=oldgnu
26341 export TEST_TAR_FORMAT
26342 TAR_OPTIONS="-H oldgnu"
26343 export TAR_OPTIONS
26344 rm -rf *
26345
26346
26347 genfile -l 64 -f file1
26348 ln file1 file2
26349 ln file2 file3
26350 ln file3 file4
26351
26352 echo archive.1
26353 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26354
26355 genfile -l 64 -f file1
26356 ln file1 file2
26357 ln file2 file3
26358 ln file3 file4
26359
26360 echo archive.2
26361 tar -c -f archive.2 -l --remove-files file1 file2 file3
26362 echo testing archive.2
26363 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26364 )
26365 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26366 at_status=$? at_failed=false
26367 $at_check_filter
26368 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26369 " | \
26370   $at_diff - "$at_stderr" || at_failed=:
26371 echo >>"$at_stdout"; $as_echo "archive.1
26372 archive.2
26373 testing archive.2
26374 file1
26375 file1
26376 " | \
26377   $at_diff - "$at_stdout" || at_failed=:
26378 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26379 $at_failed && at_fn_log_failure
26380 $at_traceon; }
26381
26382               { set +x
26383 $as_echo "$at_srcdir/link03.at:34:
26384 mkdir ustar
26385 (cd ustar
26386 TEST_TAR_FORMAT=ustar
26387 export TEST_TAR_FORMAT
26388 TAR_OPTIONS=\"-H ustar\"
26389 export TAR_OPTIONS
26390 rm -rf *
26391
26392
26393 genfile -l 64 -f file1
26394 ln file1 file2
26395 ln file2 file3
26396 ln file3 file4
26397
26398 echo archive.1
26399 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26400
26401 genfile -l 64 -f file1
26402 ln file1 file2
26403 ln file2 file3
26404 ln file3 file4
26405
26406 echo archive.2
26407 tar -c -f archive.2 -l --remove-files file1 file2 file3
26408 echo testing archive.2
26409 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26410 )"
26411 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26412 ( $at_check_trace;
26413 mkdir ustar
26414 (cd ustar
26415 TEST_TAR_FORMAT=ustar
26416 export TEST_TAR_FORMAT
26417 TAR_OPTIONS="-H ustar"
26418 export TAR_OPTIONS
26419 rm -rf *
26420
26421
26422 genfile -l 64 -f file1
26423 ln file1 file2
26424 ln file2 file3
26425 ln file3 file4
26426
26427 echo archive.1
26428 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26429
26430 genfile -l 64 -f file1
26431 ln file1 file2
26432 ln file2 file3
26433 ln file3 file4
26434
26435 echo archive.2
26436 tar -c -f archive.2 -l --remove-files file1 file2 file3
26437 echo testing archive.2
26438 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26439 )
26440 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26441 at_status=$? at_failed=false
26442 $at_check_filter
26443 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26444 " | \
26445   $at_diff - "$at_stderr" || at_failed=:
26446 echo >>"$at_stdout"; $as_echo "archive.1
26447 archive.2
26448 testing archive.2
26449 file1
26450 file1
26451 " | \
26452   $at_diff - "$at_stdout" || at_failed=:
26453 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26454 $at_failed && at_fn_log_failure
26455 $at_traceon; }
26456
26457               { set +x
26458 $as_echo "$at_srcdir/link03.at:34:
26459 mkdir posix
26460 (cd posix
26461 TEST_TAR_FORMAT=posix
26462 export TEST_TAR_FORMAT
26463 TAR_OPTIONS=\"-H posix\"
26464 export TAR_OPTIONS
26465 rm -rf *
26466
26467
26468 genfile -l 64 -f file1
26469 ln file1 file2
26470 ln file2 file3
26471 ln file3 file4
26472
26473 echo archive.1
26474 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26475
26476 genfile -l 64 -f file1
26477 ln file1 file2
26478 ln file2 file3
26479 ln file3 file4
26480
26481 echo archive.2
26482 tar -c -f archive.2 -l --remove-files file1 file2 file3
26483 echo testing archive.2
26484 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26485 )"
26486 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26487 ( $at_check_trace;
26488 mkdir posix
26489 (cd posix
26490 TEST_TAR_FORMAT=posix
26491 export TEST_TAR_FORMAT
26492 TAR_OPTIONS="-H posix"
26493 export TAR_OPTIONS
26494 rm -rf *
26495
26496
26497 genfile -l 64 -f file1
26498 ln file1 file2
26499 ln file2 file3
26500 ln file3 file4
26501
26502 echo archive.1
26503 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26504
26505 genfile -l 64 -f file1
26506 ln file1 file2
26507 ln file2 file3
26508 ln file3 file4
26509
26510 echo archive.2
26511 tar -c -f archive.2 -l --remove-files file1 file2 file3
26512 echo testing archive.2
26513 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26514 )
26515 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26516 at_status=$? at_failed=false
26517 $at_check_filter
26518 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26519 " | \
26520   $at_diff - "$at_stderr" || at_failed=:
26521 echo >>"$at_stdout"; $as_echo "archive.1
26522 archive.2
26523 testing archive.2
26524 file1
26525 file1
26526 " | \
26527   $at_diff - "$at_stdout" || at_failed=:
26528 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26529 $at_failed && at_fn_log_failure
26530 $at_traceon; }
26531
26532               { set +x
26533 $as_echo "$at_srcdir/link03.at:34:
26534 mkdir gnu
26535 (cd gnu
26536 TEST_TAR_FORMAT=gnu
26537 export TEST_TAR_FORMAT
26538 TAR_OPTIONS=\"-H gnu\"
26539 export TAR_OPTIONS
26540 rm -rf *
26541
26542
26543 genfile -l 64 -f file1
26544 ln file1 file2
26545 ln file2 file3
26546 ln file3 file4
26547
26548 echo archive.1
26549 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26550
26551 genfile -l 64 -f file1
26552 ln file1 file2
26553 ln file2 file3
26554 ln file3 file4
26555
26556 echo archive.2
26557 tar -c -f archive.2 -l --remove-files file1 file2 file3
26558 echo testing archive.2
26559 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26560 )"
26561 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26562 ( $at_check_trace;
26563 mkdir gnu
26564 (cd gnu
26565 TEST_TAR_FORMAT=gnu
26566 export TEST_TAR_FORMAT
26567 TAR_OPTIONS="-H gnu"
26568 export TAR_OPTIONS
26569 rm -rf *
26570
26571
26572 genfile -l 64 -f file1
26573 ln file1 file2
26574 ln file2 file3
26575 ln file3 file4
26576
26577 echo archive.1
26578 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26579
26580 genfile -l 64 -f file1
26581 ln file1 file2
26582 ln file2 file3
26583 ln file3 file4
26584
26585 echo archive.2
26586 tar -c -f archive.2 -l --remove-files file1 file2 file3
26587 echo testing archive.2
26588 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26589 )
26590 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26591 at_status=$? at_failed=false
26592 $at_check_filter
26593 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26594 " | \
26595   $at_diff - "$at_stderr" || at_failed=:
26596 echo >>"$at_stdout"; $as_echo "archive.1
26597 archive.2
26598 testing archive.2
26599 file1
26600 file1
26601 " | \
26602   $at_diff - "$at_stdout" || at_failed=:
26603 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26604 $at_failed && at_fn_log_failure
26605 $at_traceon; }
26606
26607
26608
26609
26610
26611   set +x
26612   $at_times_p && times >"$at_times_file"
26613 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26614 read at_status <"$at_status_file"
26615 #AT_STOP_106
26616 #AT_START_107
26617 at_fn_group_banner 107 'link04.at:29' \
26618   "link count is 1 but multiple occurrences" "       " 15
26619 at_xfail=no
26620       test -f $XFAILFILE && at_xfail=yes
26621 (
26622   $as_echo "107. $at_setup_line: testing $at_desc ..."
26623   $at_traceon
26624
26625
26626
26627
26628
26629   { set +x
26630 $as_echo "$at_srcdir/link04.at:32:
26631 mkdir v7
26632 (cd v7
26633 TEST_TAR_FORMAT=v7
26634 export TEST_TAR_FORMAT
26635 TAR_OPTIONS=\"-H v7\"
26636 export TAR_OPTIONS
26637 rm -rf *
26638
26639 mkdir dir
26640 echo TEST > dir/file
26641 ln -s file dir/symlink || exit 77
26642
26643 tar cf archive dir dir
26644 tar tvf archive | sed '
26645   s,.*[0-9] dir/,dir/,
26646 ' | sort
26647
26648 echo ==
26649
26650 tar chf archive dir
26651 tar tvf archive | sed '
26652   s,.*[0-9] dir/,dir/,
26653   s,file,FOO,g
26654   s,symlink,FOO,g
26655 ' | sort
26656 )"
26657 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
26658 ( $at_check_trace;
26659 mkdir v7
26660 (cd v7
26661 TEST_TAR_FORMAT=v7
26662 export TEST_TAR_FORMAT
26663 TAR_OPTIONS="-H v7"
26664 export TAR_OPTIONS
26665 rm -rf *
26666
26667 mkdir dir
26668 echo TEST > dir/file
26669 ln -s file dir/symlink || exit 77
26670
26671 tar cf archive dir dir
26672 tar tvf archive | sed '
26673   s,.*[0-9] dir/,dir/,
26674 ' | sort
26675
26676 echo ==
26677
26678 tar chf archive dir
26679 tar tvf archive | sed '
26680   s,.*[0-9] dir/,dir/,
26681   s,file,FOO,g
26682   s,symlink,FOO,g
26683 ' | sort
26684 )
26685 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26686 at_status=$? at_failed=false
26687 $at_check_filter
26688 at_fn_diff_devnull "$at_stderr" || at_failed=:
26689 echo >>"$at_stdout"; $as_echo "dir/
26690 dir/
26691 dir/file
26692 dir/file link to dir/file
26693 dir/symlink -> file
26694 dir/symlink link to dir/symlink
26695 ==
26696 dir/
26697 dir/FOO
26698 dir/FOO link to dir/FOO
26699 " | \
26700   $at_diff - "$at_stdout" || at_failed=:
26701 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
26702 $at_failed && at_fn_log_failure
26703 $at_traceon; }
26704
26705               { set +x
26706 $as_echo "$at_srcdir/link04.at:32:
26707 mkdir oldgnu
26708 (cd oldgnu
26709 TEST_TAR_FORMAT=oldgnu
26710 export TEST_TAR_FORMAT
26711 TAR_OPTIONS=\"-H oldgnu\"
26712 export TAR_OPTIONS
26713 rm -rf *
26714
26715 mkdir dir
26716 echo TEST > dir/file
26717 ln -s file dir/symlink || exit 77
26718
26719 tar cf archive dir dir
26720 tar tvf archive | sed '
26721   s,.*[0-9] dir/,dir/,
26722 ' | sort
26723
26724 echo ==
26725
26726 tar chf archive dir
26727 tar tvf archive | sed '
26728   s,.*[0-9] dir/,dir/,
26729   s,file,FOO,g
26730   s,symlink,FOO,g
26731 ' | sort
26732 )"
26733 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
26734 ( $at_check_trace;
26735 mkdir oldgnu
26736 (cd oldgnu
26737 TEST_TAR_FORMAT=oldgnu
26738 export TEST_TAR_FORMAT
26739 TAR_OPTIONS="-H oldgnu"
26740 export TAR_OPTIONS
26741 rm -rf *
26742
26743 mkdir dir
26744 echo TEST > dir/file
26745 ln -s file dir/symlink || exit 77
26746
26747 tar cf archive dir dir
26748 tar tvf archive | sed '
26749   s,.*[0-9] dir/,dir/,
26750 ' | sort
26751
26752 echo ==
26753
26754 tar chf archive dir
26755 tar tvf archive | sed '
26756   s,.*[0-9] dir/,dir/,
26757   s,file,FOO,g
26758   s,symlink,FOO,g
26759 ' | sort
26760 )
26761 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26762 at_status=$? at_failed=false
26763 $at_check_filter
26764 at_fn_diff_devnull "$at_stderr" || at_failed=:
26765 echo >>"$at_stdout"; $as_echo "dir/
26766 dir/
26767 dir/file
26768 dir/file link to dir/file
26769 dir/symlink -> file
26770 dir/symlink link to dir/symlink
26771 ==
26772 dir/
26773 dir/FOO
26774 dir/FOO link to dir/FOO
26775 " | \
26776   $at_diff - "$at_stdout" || at_failed=:
26777 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
26778 $at_failed && at_fn_log_failure
26779 $at_traceon; }
26780
26781               { set +x
26782 $as_echo "$at_srcdir/link04.at:32:
26783 mkdir ustar
26784 (cd ustar
26785 TEST_TAR_FORMAT=ustar
26786 export TEST_TAR_FORMAT
26787 TAR_OPTIONS=\"-H ustar\"
26788 export TAR_OPTIONS
26789 rm -rf *
26790
26791 mkdir dir
26792 echo TEST > dir/file
26793 ln -s file dir/symlink || exit 77
26794
26795 tar cf archive dir dir
26796 tar tvf archive | sed '
26797   s,.*[0-9] dir/,dir/,
26798 ' | sort
26799
26800 echo ==
26801
26802 tar chf archive dir
26803 tar tvf archive | sed '
26804   s,.*[0-9] dir/,dir/,
26805   s,file,FOO,g
26806   s,symlink,FOO,g
26807 ' | sort
26808 )"
26809 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
26810 ( $at_check_trace;
26811 mkdir ustar
26812 (cd ustar
26813 TEST_TAR_FORMAT=ustar
26814 export TEST_TAR_FORMAT
26815 TAR_OPTIONS="-H ustar"
26816 export TAR_OPTIONS
26817 rm -rf *
26818
26819 mkdir dir
26820 echo TEST > dir/file
26821 ln -s file dir/symlink || exit 77
26822
26823 tar cf archive dir dir
26824 tar tvf archive | sed '
26825   s,.*[0-9] dir/,dir/,
26826 ' | sort
26827
26828 echo ==
26829
26830 tar chf archive dir
26831 tar tvf archive | sed '
26832   s,.*[0-9] dir/,dir/,
26833   s,file,FOO,g
26834   s,symlink,FOO,g
26835 ' | sort
26836 )
26837 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26838 at_status=$? at_failed=false
26839 $at_check_filter
26840 at_fn_diff_devnull "$at_stderr" || at_failed=:
26841 echo >>"$at_stdout"; $as_echo "dir/
26842 dir/
26843 dir/file
26844 dir/file link to dir/file
26845 dir/symlink -> file
26846 dir/symlink link to dir/symlink
26847 ==
26848 dir/
26849 dir/FOO
26850 dir/FOO link to dir/FOO
26851 " | \
26852   $at_diff - "$at_stdout" || at_failed=:
26853 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
26854 $at_failed && at_fn_log_failure
26855 $at_traceon; }
26856
26857               { set +x
26858 $as_echo "$at_srcdir/link04.at:32:
26859 mkdir posix
26860 (cd posix
26861 TEST_TAR_FORMAT=posix
26862 export TEST_TAR_FORMAT
26863 TAR_OPTIONS=\"-H posix\"
26864 export TAR_OPTIONS
26865 rm -rf *
26866
26867 mkdir dir
26868 echo TEST > dir/file
26869 ln -s file dir/symlink || exit 77
26870
26871 tar cf archive dir dir
26872 tar tvf archive | sed '
26873   s,.*[0-9] dir/,dir/,
26874 ' | sort
26875
26876 echo ==
26877
26878 tar chf archive dir
26879 tar tvf archive | sed '
26880   s,.*[0-9] dir/,dir/,
26881   s,file,FOO,g
26882   s,symlink,FOO,g
26883 ' | sort
26884 )"
26885 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
26886 ( $at_check_trace;
26887 mkdir posix
26888 (cd posix
26889 TEST_TAR_FORMAT=posix
26890 export TEST_TAR_FORMAT
26891 TAR_OPTIONS="-H posix"
26892 export TAR_OPTIONS
26893 rm -rf *
26894
26895 mkdir dir
26896 echo TEST > dir/file
26897 ln -s file dir/symlink || exit 77
26898
26899 tar cf archive dir dir
26900 tar tvf archive | sed '
26901   s,.*[0-9] dir/,dir/,
26902 ' | sort
26903
26904 echo ==
26905
26906 tar chf archive dir
26907 tar tvf archive | sed '
26908   s,.*[0-9] dir/,dir/,
26909   s,file,FOO,g
26910   s,symlink,FOO,g
26911 ' | sort
26912 )
26913 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26914 at_status=$? at_failed=false
26915 $at_check_filter
26916 at_fn_diff_devnull "$at_stderr" || at_failed=:
26917 echo >>"$at_stdout"; $as_echo "dir/
26918 dir/
26919 dir/file
26920 dir/file link to dir/file
26921 dir/symlink -> file
26922 dir/symlink link to dir/symlink
26923 ==
26924 dir/
26925 dir/FOO
26926 dir/FOO link to dir/FOO
26927 " | \
26928   $at_diff - "$at_stdout" || at_failed=:
26929 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
26930 $at_failed && at_fn_log_failure
26931 $at_traceon; }
26932
26933               { set +x
26934 $as_echo "$at_srcdir/link04.at:32:
26935 mkdir gnu
26936 (cd gnu
26937 TEST_TAR_FORMAT=gnu
26938 export TEST_TAR_FORMAT
26939 TAR_OPTIONS=\"-H gnu\"
26940 export TAR_OPTIONS
26941 rm -rf *
26942
26943 mkdir dir
26944 echo TEST > dir/file
26945 ln -s file dir/symlink || exit 77
26946
26947 tar cf archive dir dir
26948 tar tvf archive | sed '
26949   s,.*[0-9] dir/,dir/,
26950 ' | sort
26951
26952 echo ==
26953
26954 tar chf archive dir
26955 tar tvf archive | sed '
26956   s,.*[0-9] dir/,dir/,
26957   s,file,FOO,g
26958   s,symlink,FOO,g
26959 ' | sort
26960 )"
26961 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
26962 ( $at_check_trace;
26963 mkdir gnu
26964 (cd gnu
26965 TEST_TAR_FORMAT=gnu
26966 export TEST_TAR_FORMAT
26967 TAR_OPTIONS="-H gnu"
26968 export TAR_OPTIONS
26969 rm -rf *
26970
26971 mkdir dir
26972 echo TEST > dir/file
26973 ln -s file dir/symlink || exit 77
26974
26975 tar cf archive dir dir
26976 tar tvf archive | sed '
26977   s,.*[0-9] dir/,dir/,
26978 ' | sort
26979
26980 echo ==
26981
26982 tar chf archive dir
26983 tar tvf archive | sed '
26984   s,.*[0-9] dir/,dir/,
26985   s,file,FOO,g
26986   s,symlink,FOO,g
26987 ' | sort
26988 )
26989 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26990 at_status=$? at_failed=false
26991 $at_check_filter
26992 at_fn_diff_devnull "$at_stderr" || at_failed=:
26993 echo >>"$at_stdout"; $as_echo "dir/
26994 dir/
26995 dir/file
26996 dir/file link to dir/file
26997 dir/symlink -> file
26998 dir/symlink link to dir/symlink
26999 ==
27000 dir/
27001 dir/FOO
27002 dir/FOO link to dir/FOO
27003 " | \
27004   $at_diff - "$at_stdout" || at_failed=:
27005 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
27006 $at_failed && at_fn_log_failure
27007 $at_traceon; }
27008
27009
27010
27011
27012   set +x
27013   $at_times_p && times >"$at_times_file"
27014 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27015 read at_status <"$at_status_file"
27016 #AT_STOP_107
27017 #AT_START_108
27018 at_fn_group_banner 108 'longv7.at:24' \
27019   "long names in V7 archives" "                      " 16
27020 at_xfail=no
27021       test -f $XFAILFILE && at_xfail=yes
27022 (
27023   $as_echo "108. $at_setup_line: testing $at_desc ..."
27024   $at_traceon
27025
27026
27027
27028
27029
27030
27031
27032
27033   { set +x
27034 $as_echo "$at_srcdir/longv7.at:30:
27035 mkdir v7
27036 (cd v7
27037 TEST_TAR_FORMAT=v7
27038 export TEST_TAR_FORMAT
27039 TAR_OPTIONS=\"-H v7\"
27040 export TAR_OPTIONS
27041 rm -rf *
27042
27043 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
27044 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
27045
27046 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
27047 echo separator
27048 tar tf archive
27049 )"
27050 at_fn_check_prepare_notrace 'an embedded newline' "longv7.at:30"
27051 ( $at_check_trace;
27052 mkdir v7
27053 (cd v7
27054 TEST_TAR_FORMAT=v7
27055 export TEST_TAR_FORMAT
27056 TAR_OPTIONS="-H v7"
27057 export TAR_OPTIONS
27058 rm -rf *
27059
27060 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
27061 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
27062
27063 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
27064 echo separator
27065 tar tf archive
27066 )
27067 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27068 at_status=$? at_failed=false
27069 $at_check_filter
27070 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
27071 tar: Exiting with failure status due to previous errors
27072 " | \
27073   $at_diff - "$at_stderr" || at_failed=:
27074 echo >>"$at_stdout"; $as_echo "separator
27075 this_is_a_very_long_name_for_a_directory_which_causes_problems/
27076 " | \
27077   $at_diff - "$at_stdout" || at_failed=:
27078 at_fn_check_status 0 $at_status "$at_srcdir/longv7.at:30"
27079 $at_failed && at_fn_log_failure
27080 $at_traceon; }
27081
27082
27083
27084
27085
27086
27087   set +x
27088   $at_times_p && times >"$at_times_file"
27089 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27090 read at_status <"$at_status_file"
27091 #AT_STOP_108
27092 #AT_START_109
27093 at_fn_group_banner 109 'long01.at:28' \
27094   "long file names divisible by block size" "        " 16
27095 at_xfail=no
27096       test -f $XFAILFILE && at_xfail=yes
27097 (
27098   $as_echo "109. $at_setup_line: testing $at_desc ..."
27099   $at_traceon
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109   { set +x
27110 $as_echo "$at_srcdir/long01.at:36:
27111 mkdir gnu
27112 (cd gnu
27113 TEST_TAR_FORMAT=gnu
27114 export TEST_TAR_FORMAT
27115 TAR_OPTIONS=\"-H gnu\"
27116 export TAR_OPTIONS
27117 rm -rf *
27118
27119
27120 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
27121 echo test > endfile
27122
27123 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
27124 tar tf archive)"
27125 at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
27126 ( $at_check_trace;
27127 mkdir gnu
27128 (cd gnu
27129 TEST_TAR_FORMAT=gnu
27130 export TEST_TAR_FORMAT
27131 TAR_OPTIONS="-H gnu"
27132 export TAR_OPTIONS
27133 rm -rf *
27134
27135
27136 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
27137 echo test > endfile
27138
27139 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
27140 tar tf archive)
27141 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27142 at_status=$? at_failed=false
27143 $at_check_filter
27144 at_fn_diff_devnull "$at_stderr" || at_failed=:
27145 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
27146 endfile
27147 " | \
27148   $at_diff - "$at_stdout" || at_failed=:
27149 at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
27150 $at_failed && at_fn_log_failure
27151 $at_traceon; }
27152
27153               { set +x
27154 $as_echo "$at_srcdir/long01.at:36:
27155 mkdir oldgnu
27156 (cd oldgnu
27157 TEST_TAR_FORMAT=oldgnu
27158 export TEST_TAR_FORMAT
27159 TAR_OPTIONS=\"-H oldgnu\"
27160 export TAR_OPTIONS
27161 rm -rf *
27162
27163
27164 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
27165 echo test > endfile
27166
27167 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
27168 tar tf archive)"
27169 at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
27170 ( $at_check_trace;
27171 mkdir oldgnu
27172 (cd oldgnu
27173 TEST_TAR_FORMAT=oldgnu
27174 export TEST_TAR_FORMAT
27175 TAR_OPTIONS="-H oldgnu"
27176 export TAR_OPTIONS
27177 rm -rf *
27178
27179
27180 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
27181 echo test > endfile
27182
27183 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
27184 tar tf archive)
27185 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27186 at_status=$? at_failed=false
27187 $at_check_filter
27188 at_fn_diff_devnull "$at_stderr" || at_failed=:
27189 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
27190 endfile
27191 " | \
27192   $at_diff - "$at_stdout" || at_failed=:
27193 at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
27194 $at_failed && at_fn_log_failure
27195 $at_traceon; }
27196
27197
27198
27199
27200
27201
27202   set +x
27203   $at_times_p && times >"$at_times_file"
27204 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27205 read at_status <"$at_status_file"
27206 #AT_STOP_109
27207 #AT_START_110
27208 at_fn_group_banner 110 'lustar01.at:21' \
27209   "ustar: unsplittable file name" "                  " 16
27210 at_xfail=no
27211       test -f $XFAILFILE && at_xfail=yes
27212 (
27213   $as_echo "110. $at_setup_line: testing $at_desc ..."
27214   $at_traceon
27215
27216
27217
27218
27219
27220
27221
27222   { set +x
27223 $as_echo "$at_srcdir/lustar01.at:27:
27224 mkdir ustar
27225 (cd ustar
27226 TEST_TAR_FORMAT=ustar
27227 export TEST_TAR_FORMAT
27228 TAR_OPTIONS=\"-H ustar\"
27229 export TAR_OPTIONS
27230 rm -rf *
27231
27232 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
27233 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
27234 )"
27235 at_fn_check_prepare_notrace 'an embedded newline' "lustar01.at:27"
27236 ( $at_check_trace;
27237 mkdir ustar
27238 (cd ustar
27239 TEST_TAR_FORMAT=ustar
27240 export TEST_TAR_FORMAT
27241 TAR_OPTIONS="-H ustar"
27242 export TAR_OPTIONS
27243 rm -rf *
27244
27245 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
27246 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
27247 )
27248 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27249 at_status=$? at_failed=false
27250 $at_check_filter
27251 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
27252 tar: Exiting with failure status due to previous errors
27253 " | \
27254   $at_diff - "$at_stderr" || at_failed=:
27255 at_fn_diff_devnull "$at_stdout" || at_failed=:
27256 at_fn_check_status 2 $at_status "$at_srcdir/lustar01.at:27"
27257 $at_failed && at_fn_log_failure
27258 $at_traceon; }
27259
27260
27261
27262
27263
27264   set +x
27265   $at_times_p && times >"$at_times_file"
27266 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27267 read at_status <"$at_status_file"
27268 #AT_STOP_110
27269 #AT_START_111
27270 at_fn_group_banner 111 'lustar02.at:21' \
27271   "ustar: unsplittable path name" "                  " 16
27272 at_xfail=no
27273       test -f $XFAILFILE && at_xfail=yes
27274 (
27275   $as_echo "111. $at_setup_line: testing $at_desc ..."
27276   $at_traceon
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288   { set +x
27289 $as_echo "$at_srcdir/lustar02.at:32:
27290 mkdir ustar
27291 (cd ustar
27292 TEST_TAR_FORMAT=ustar
27293 export TEST_TAR_FORMAT
27294 TAR_OPTIONS=\"-H ustar\"
27295 export TAR_OPTIONS
27296 rm -rf *
27297
27298
27299 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
27300 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
27301 )"
27302 at_fn_check_prepare_notrace 'an embedded newline' "lustar02.at:32"
27303 ( $at_check_trace;
27304 mkdir ustar
27305 (cd ustar
27306 TEST_TAR_FORMAT=ustar
27307 export TEST_TAR_FORMAT
27308 TAR_OPTIONS="-H ustar"
27309 export TAR_OPTIONS
27310 rm -rf *
27311
27312
27313 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
27314 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
27315 )
27316 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27317 at_status=$? at_failed=false
27318 $at_check_filter
27319 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
27320 tar: Exiting with failure status due to previous errors
27321 " | \
27322   $at_diff - "$at_stderr" || at_failed=:
27323 at_fn_diff_devnull "$at_stdout" || at_failed=:
27324 at_fn_check_status 2 $at_status "$at_srcdir/lustar02.at:32"
27325 $at_failed && at_fn_log_failure
27326 $at_traceon; }
27327
27328
27329
27330
27331
27332
27333
27334
27335   set +x
27336   $at_times_p && times >"$at_times_file"
27337 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27338 read at_status <"$at_status_file"
27339 #AT_STOP_111
27340 #AT_START_112
27341 at_fn_group_banner 112 'lustar03.at:21' \
27342   "ustar: splitting long names" "                    " 16
27343 at_xfail=no
27344       test -f $XFAILFILE && at_xfail=yes
27345 (
27346   $as_echo "112. $at_setup_line: testing $at_desc ..."
27347   $at_traceon
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357   { set +x
27358 $as_echo "$at_srcdir/lustar03.at:29:
27359 mkdir ustar
27360 (cd ustar
27361 TEST_TAR_FORMAT=ustar
27362 export TEST_TAR_FORMAT
27363 TAR_OPTIONS=\"-H ustar\"
27364 export TAR_OPTIONS
27365 rm -rf *
27366
27367
27368 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
27369 echo \"Create archive\"
27370 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
27371 echo \"List archive\"
27372 tar tf archive)"
27373 at_fn_check_prepare_notrace 'an embedded newline' "lustar03.at:29"
27374 ( $at_check_trace;
27375 mkdir ustar
27376 (cd ustar
27377 TEST_TAR_FORMAT=ustar
27378 export TEST_TAR_FORMAT
27379 TAR_OPTIONS="-H ustar"
27380 export TAR_OPTIONS
27381 rm -rf *
27382
27383
27384 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
27385 echo "Create archive"
27386 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
27387 echo "List archive"
27388 tar tf archive)
27389 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27390 at_status=$? at_failed=false
27391 $at_check_filter
27392 at_fn_diff_devnull "$at_stderr" || at_failed=:
27393 echo >>"$at_stdout"; $as_echo "Create archive
27394 List archive
27395 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/
27396 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
27397 " | \
27398   $at_diff - "$at_stdout" || at_failed=:
27399 at_fn_check_status 0 $at_status "$at_srcdir/lustar03.at:29"
27400 $at_failed && at_fn_log_failure
27401 $at_traceon; }
27402
27403
27404
27405
27406
27407
27408   set +x
27409   $at_times_p && times >"$at_times_file"
27410 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27411 read at_status <"$at_status_file"
27412 #AT_STOP_112
27413 #AT_START_113
27414 at_fn_group_banner 113 'old.at:23' \
27415   "old archives" "                                   " 16
27416 at_xfail=no
27417 (
27418   $as_echo "113. $at_setup_line: testing $at_desc ..."
27419   $at_traceon
27420
27421
27422
27423 unset TAR_OPTIONS
27424 { set +x
27425 $as_echo "$at_srcdir/old.at:27:
27426 mkdir directory
27427 tar cfvo archive directory || exit 1
27428 tar tf archive
27429 "
27430 at_fn_check_prepare_notrace 'an embedded newline' "old.at:27"
27431 ( $at_check_trace;
27432 mkdir directory
27433 tar cfvo archive directory || exit 1
27434 tar tf archive
27435
27436 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27437 at_status=$? at_failed=false
27438 $at_check_filter
27439 at_fn_diff_devnull "$at_stderr" || at_failed=:
27440 echo >>"$at_stdout"; $as_echo "directory/
27441 directory/
27442 " | \
27443   $at_diff - "$at_stdout" || at_failed=:
27444 at_fn_check_status 0 $at_status "$at_srcdir/old.at:27"
27445 $at_failed && at_fn_log_failure
27446 $at_traceon; }
27447
27448
27449   set +x
27450   $at_times_p && times >"$at_times_file"
27451 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27452 read at_status <"$at_status_file"
27453 #AT_STOP_113
27454 #AT_START_114
27455 at_fn_group_banner 114 'time01.at:20' \
27456   "time: tricky time stamps" "                       " 16
27457 at_xfail=no
27458       test -f $XFAILFILE && at_xfail=yes
27459 (
27460   $as_echo "114. $at_setup_line: testing $at_desc ..."
27461   $at_traceon
27462
27463
27464
27465
27466
27467   { set +x
27468 $as_echo "$at_srcdir/time01.at:23:
27469 mkdir pax
27470 (cd pax
27471 TEST_TAR_FORMAT=pax
27472 export TEST_TAR_FORMAT
27473 TAR_OPTIONS=\"-H pax\"
27474 export TAR_OPTIONS
27475 rm -rf *
27476
27477 export TZ=UTC0
27478 mkdir dir
27479
27480 # Test files with time stamps that are near common sources of error,
27481 # typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
27482 # Use GNU-style @ notation for very large time stamps, since they
27483 # typically don't render into years correctly due to int overflow.
27484 for s in \\
27485   @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \\
27486   0000-01-01T00:00:00 0000-01-01T00:00:01 \\
27487   0000-01-02T00:00:00 \\
27488   1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \\
27489   1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \\
27490   1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \\
27491   1901-12-14T20:45:51 \\
27492   1969-12-31T23:59:58 1969-12-31T23:59:59 \\
27493   1970-01-01T00:00:00 1970-01-01T00:00:01 \\
27494   2038-01-18T03:14:07 \\
27495   2038-01-19T03:14:07 2038-01-19T03:14:08 \\
27496   2106-02-07T06:28:15 2106-02-07T06:28:16 \\
27497   2242-03-16T12:56:31 2242-03-16T12:56:32 \\
27498   9999-12-31T23:59:58 9999-12-31T23:59:59 \\
27499   @9223372036854775807 @9223372036854775808
27500 do
27501   # Skip a time stamp \$s if it's out of range for this platform,
27502   # of if it uses a notation that this platform does not recognize.
27503   touch -d \$s dir/f\$s >/dev/null 2>&1 || continue
27504
27505   # Likewise for \$s.1.  If \$s is the most negative time stamp and
27506   # time stamps are signed, then \$s.1 is out of range.
27507   touch -d \$s.1 dir/f\$s.\$ns >/dev/null 2>&1 || continue
27508
27509   for frac in   01 001 00001 000001 0000001 00000001 000000001 0000000001 \\
27510               9 99 999 99999 999999 9999999 99999999 999999999 9999999999
27511   do
27512     touch -d \$s.\$frac dir/f\$s.\$frac
27513   done
27514 done
27515
27516 tar -c -f archive.tar dir
27517 tar -d -f archive.tar dir
27518 )"
27519 at_fn_check_prepare_notrace 'an embedded newline' "time01.at:23"
27520 ( $at_check_trace;
27521 mkdir pax
27522 (cd pax
27523 TEST_TAR_FORMAT=pax
27524 export TEST_TAR_FORMAT
27525 TAR_OPTIONS="-H pax"
27526 export TAR_OPTIONS
27527 rm -rf *
27528
27529 export TZ=UTC0
27530 mkdir dir
27531
27532 # Test files with time stamps that are near common sources of error,
27533 # typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
27534 # Use GNU-style @ notation for very large time stamps, since they
27535 # typically don't render into years correctly due to int overflow.
27536 for s in \
27537   @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \
27538   0000-01-01T00:00:00 0000-01-01T00:00:01 \
27539   0000-01-02T00:00:00 \
27540   1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \
27541   1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \
27542   1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \
27543   1901-12-14T20:45:51 \
27544   1969-12-31T23:59:58 1969-12-31T23:59:59 \
27545   1970-01-01T00:00:00 1970-01-01T00:00:01 \
27546   2038-01-18T03:14:07 \
27547   2038-01-19T03:14:07 2038-01-19T03:14:08 \
27548   2106-02-07T06:28:15 2106-02-07T06:28:16 \
27549   2242-03-16T12:56:31 2242-03-16T12:56:32 \
27550   9999-12-31T23:59:58 9999-12-31T23:59:59 \
27551   @9223372036854775807 @9223372036854775808
27552 do
27553   # Skip a time stamp $s if it's out of range for this platform,
27554   # of if it uses a notation that this platform does not recognize.
27555   touch -d $s dir/f$s >/dev/null 2>&1 || continue
27556
27557   # Likewise for $s.1.  If $s is the most negative time stamp and
27558   # time stamps are signed, then $s.1 is out of range.
27559   touch -d $s.1 dir/f$s.$ns >/dev/null 2>&1 || continue
27560
27561   for frac in   01 001 00001 000001 0000001 00000001 000000001 0000000001 \
27562               9 99 999 99999 999999 9999999 99999999 999999999 9999999999
27563   do
27564     touch -d $s.$frac dir/f$s.$frac
27565   done
27566 done
27567
27568 tar -c -f archive.tar dir
27569 tar -d -f archive.tar dir
27570 )
27571 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27572 at_status=$? at_failed=false
27573 $at_check_filter
27574 at_fn_diff_devnull "$at_stderr" || at_failed=:
27575 at_fn_diff_devnull "$at_stdout" || at_failed=:
27576 at_fn_check_status 0 $at_status "$at_srcdir/time01.at:23"
27577 $at_failed && at_fn_log_failure
27578 $at_traceon; }
27579
27580
27581
27582
27583   set +x
27584   $at_times_p && times >"$at_times_file"
27585 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27586 read at_status <"$at_status_file"
27587 #AT_STOP_114
27588 #AT_START_115
27589 at_fn_group_banner 115 'multiv01.at:23' \
27590   "multivolume dumps from pipes" "                   " 17
27591 at_xfail=no
27592       test -f $XFAILFILE && at_xfail=yes
27593 (
27594   $as_echo "115. $at_setup_line: testing $at_desc ..."
27595   $at_traceon
27596
27597
27598
27599 # Fixme: should be configurable
27600 #  TRUSS=truss -o /tmp/tr
27601 #  TRUSS=strace
27602
27603
27604
27605   { set +x
27606 $as_echo "$at_srcdir/multiv01.at:30:
27607 mkdir gnu
27608 (cd gnu
27609 TEST_TAR_FORMAT=gnu
27610 export TEST_TAR_FORMAT
27611 TAR_OPTIONS=\"-H gnu\"
27612 export TAR_OPTIONS
27613 rm -rf *
27614
27615 exec <&-
27616 genfile --length 7168 --file file1
27617
27618 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
27619               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
27620   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
27621   for count in 2 3 4 5 6 7 8 ; do
27622     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
27623   done
27624 done >file2
27625
27626 if test \$TEST_TAR_FORMAT = pax; then
27627   TAPE_LENGTH=11
27628 else
27629   TAPE_LENGTH=10
27630 fi
27631
27632 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
27633   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
27634
27635 mkdir extract-dir-pipe
27636 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
27637 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
27638       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
27639       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
27640
27641 cmp file1 extract-dir-pipe/file1
27642 cmp file2 extract-dir-pipe/file2
27643 )"
27644 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30"
27645 ( $at_check_trace;
27646 mkdir gnu
27647 (cd gnu
27648 TEST_TAR_FORMAT=gnu
27649 export TEST_TAR_FORMAT
27650 TAR_OPTIONS="-H gnu"
27651 export TAR_OPTIONS
27652 rm -rf *
27653
27654 exec <&-
27655 genfile --length 7168 --file file1
27656
27657 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
27658               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
27659   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
27660   for count in 2 3 4 5 6 7 8 ; do
27661     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
27662   done
27663 done >file2
27664
27665 if test $TEST_TAR_FORMAT = pax; then
27666   TAPE_LENGTH=11
27667 else
27668   TAPE_LENGTH=10
27669 fi
27670
27671 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
27672   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
27673
27674 mkdir extract-dir-pipe
27675 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
27676 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
27677       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
27678       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
27679
27680 cmp file1 extract-dir-pipe/file1
27681 cmp file2 extract-dir-pipe/file2
27682 )
27683 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27684 at_status=$? at_failed=false
27685 $at_check_filter
27686 at_fn_diff_devnull "$at_stderr" || at_failed=:
27687 at_fn_diff_devnull "$at_stdout" || at_failed=:
27688 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30"
27689 $at_failed && at_fn_log_failure
27690 $at_traceon; }
27691
27692               { set +x
27693 $as_echo "$at_srcdir/multiv01.at:30:
27694 mkdir oldgnu
27695 (cd oldgnu
27696 TEST_TAR_FORMAT=oldgnu
27697 export TEST_TAR_FORMAT
27698 TAR_OPTIONS=\"-H oldgnu\"
27699 export TAR_OPTIONS
27700 rm -rf *
27701
27702 exec <&-
27703 genfile --length 7168 --file file1
27704
27705 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
27706               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
27707   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
27708   for count in 2 3 4 5 6 7 8 ; do
27709     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
27710   done
27711 done >file2
27712
27713 if test \$TEST_TAR_FORMAT = pax; then
27714   TAPE_LENGTH=11
27715 else
27716   TAPE_LENGTH=10
27717 fi
27718
27719 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
27720   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
27721
27722 mkdir extract-dir-pipe
27723 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
27724 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
27725       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
27726       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
27727
27728 cmp file1 extract-dir-pipe/file1
27729 cmp file2 extract-dir-pipe/file2
27730 )"
27731 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30"
27732 ( $at_check_trace;
27733 mkdir oldgnu
27734 (cd oldgnu
27735 TEST_TAR_FORMAT=oldgnu
27736 export TEST_TAR_FORMAT
27737 TAR_OPTIONS="-H oldgnu"
27738 export TAR_OPTIONS
27739 rm -rf *
27740
27741 exec <&-
27742 genfile --length 7168 --file file1
27743
27744 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
27745               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
27746   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
27747   for count in 2 3 4 5 6 7 8 ; do
27748     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
27749   done
27750 done >file2
27751
27752 if test $TEST_TAR_FORMAT = pax; then
27753   TAPE_LENGTH=11
27754 else
27755   TAPE_LENGTH=10
27756 fi
27757
27758 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
27759   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
27760
27761 mkdir extract-dir-pipe
27762 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
27763 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
27764       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
27765       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
27766
27767 cmp file1 extract-dir-pipe/file1
27768 cmp file2 extract-dir-pipe/file2
27769 )
27770 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27771 at_status=$? at_failed=false
27772 $at_check_filter
27773 at_fn_diff_devnull "$at_stderr" || at_failed=:
27774 at_fn_diff_devnull "$at_stdout" || at_failed=:
27775 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30"
27776 $at_failed && at_fn_log_failure
27777 $at_traceon; }
27778
27779               { set +x
27780 $as_echo "$at_srcdir/multiv01.at:30:
27781 mkdir pax
27782 (cd pax
27783 TEST_TAR_FORMAT=pax
27784 export TEST_TAR_FORMAT
27785 TAR_OPTIONS=\"-H pax\"
27786 export TAR_OPTIONS
27787 rm -rf *
27788
27789 exec <&-
27790 genfile --length 7168 --file file1
27791
27792 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
27793               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
27794   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
27795   for count in 2 3 4 5 6 7 8 ; do
27796     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
27797   done
27798 done >file2
27799
27800 if test \$TEST_TAR_FORMAT = pax; then
27801   TAPE_LENGTH=11
27802 else
27803   TAPE_LENGTH=10
27804 fi
27805
27806 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
27807   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
27808
27809 mkdir extract-dir-pipe
27810 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
27811 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
27812       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
27813       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
27814
27815 cmp file1 extract-dir-pipe/file1
27816 cmp file2 extract-dir-pipe/file2
27817 )"
27818 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30"
27819 ( $at_check_trace;
27820 mkdir pax
27821 (cd pax
27822 TEST_TAR_FORMAT=pax
27823 export TEST_TAR_FORMAT
27824 TAR_OPTIONS="-H pax"
27825 export TAR_OPTIONS
27826 rm -rf *
27827
27828 exec <&-
27829 genfile --length 7168 --file file1
27830
27831 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
27832               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
27833   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
27834   for count in 2 3 4 5 6 7 8 ; do
27835     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
27836   done
27837 done >file2
27838
27839 if test $TEST_TAR_FORMAT = pax; then
27840   TAPE_LENGTH=11
27841 else
27842   TAPE_LENGTH=10
27843 fi
27844
27845 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
27846   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
27847
27848 mkdir extract-dir-pipe
27849 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
27850 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
27851       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
27852       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
27853
27854 cmp file1 extract-dir-pipe/file1
27855 cmp file2 extract-dir-pipe/file2
27856 )
27857 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27858 at_status=$? at_failed=false
27859 $at_check_filter
27860 at_fn_diff_devnull "$at_stderr" || at_failed=:
27861 at_fn_diff_devnull "$at_stdout" || at_failed=:
27862 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30"
27863 $at_failed && at_fn_log_failure
27864 $at_traceon; }
27865
27866
27867
27868
27869   set +x
27870   $at_times_p && times >"$at_times_file"
27871 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27872 read at_status <"$at_status_file"
27873 #AT_STOP_115
27874 #AT_START_116
27875 at_fn_group_banner 116 'multiv02.at:28' \
27876   "skipping a straddling member" "                   " 17
27877 at_xfail=no
27878       test -f $XFAILFILE && at_xfail=yes
27879 (
27880   $as_echo "116. $at_setup_line: testing $at_desc ..."
27881   $at_traceon
27882
27883
27884
27885
27886
27887   { set +x
27888 $as_echo "$at_srcdir/multiv02.at:31:
27889 mkdir gnu
27890 (cd gnu
27891 TEST_TAR_FORMAT=gnu
27892 export TEST_TAR_FORMAT
27893 TAR_OPTIONS=\"-H gnu\"
27894 export TAR_OPTIONS
27895 rm -rf *
27896
27897 genfile --length 10240 --file en
27898 genfile --length 20000 --file to
27899 genfile --length 20000 --file tre
27900 genfile --length 10240 --file fire
27901
27902 exec <&-
27903
27904 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
27905 echo separator
27906 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
27907 )"
27908 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
27909 ( $at_check_trace;
27910 mkdir gnu
27911 (cd gnu
27912 TEST_TAR_FORMAT=gnu
27913 export TEST_TAR_FORMAT
27914 TAR_OPTIONS="-H gnu"
27915 export TAR_OPTIONS
27916 rm -rf *
27917
27918 genfile --length 10240 --file en
27919 genfile --length 20000 --file to
27920 genfile --length 20000 --file tre
27921 genfile --length 10240 --file fire
27922
27923 exec <&-
27924
27925 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
27926 echo separator
27927 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
27928 )
27929 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27930 at_status=$? at_failed=false
27931 $at_check_filter
27932 at_fn_diff_devnull "$at_stderr" || at_failed=:
27933 echo >>"$at_stdout"; $as_echo "separator
27934 en
27935 " | \
27936   $at_diff - "$at_stdout" || at_failed=:
27937 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
27938 $at_failed && at_fn_log_failure
27939 $at_traceon; }
27940
27941               { set +x
27942 $as_echo "$at_srcdir/multiv02.at:31:
27943 mkdir oldgnu
27944 (cd oldgnu
27945 TEST_TAR_FORMAT=oldgnu
27946 export TEST_TAR_FORMAT
27947 TAR_OPTIONS=\"-H oldgnu\"
27948 export TAR_OPTIONS
27949 rm -rf *
27950
27951 genfile --length 10240 --file en
27952 genfile --length 20000 --file to
27953 genfile --length 20000 --file tre
27954 genfile --length 10240 --file fire
27955
27956 exec <&-
27957
27958 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
27959 echo separator
27960 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
27961 )"
27962 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
27963 ( $at_check_trace;
27964 mkdir oldgnu
27965 (cd oldgnu
27966 TEST_TAR_FORMAT=oldgnu
27967 export TEST_TAR_FORMAT
27968 TAR_OPTIONS="-H oldgnu"
27969 export TAR_OPTIONS
27970 rm -rf *
27971
27972 genfile --length 10240 --file en
27973 genfile --length 20000 --file to
27974 genfile --length 20000 --file tre
27975 genfile --length 10240 --file fire
27976
27977 exec <&-
27978
27979 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
27980 echo separator
27981 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
27982 )
27983 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27984 at_status=$? at_failed=false
27985 $at_check_filter
27986 at_fn_diff_devnull "$at_stderr" || at_failed=:
27987 echo >>"$at_stdout"; $as_echo "separator
27988 en
27989 " | \
27990   $at_diff - "$at_stdout" || at_failed=:
27991 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
27992 $at_failed && at_fn_log_failure
27993 $at_traceon; }
27994
27995               { set +x
27996 $as_echo "$at_srcdir/multiv02.at:31:
27997 mkdir pax
27998 (cd pax
27999 TEST_TAR_FORMAT=pax
28000 export TEST_TAR_FORMAT
28001 TAR_OPTIONS=\"-H pax\"
28002 export TAR_OPTIONS
28003 rm -rf *
28004
28005 genfile --length 10240 --file en
28006 genfile --length 20000 --file to
28007 genfile --length 20000 --file tre
28008 genfile --length 10240 --file fire
28009
28010 exec <&-
28011
28012 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
28013 echo separator
28014 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
28015 )"
28016 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
28017 ( $at_check_trace;
28018 mkdir pax
28019 (cd pax
28020 TEST_TAR_FORMAT=pax
28021 export TEST_TAR_FORMAT
28022 TAR_OPTIONS="-H pax"
28023 export TAR_OPTIONS
28024 rm -rf *
28025
28026 genfile --length 10240 --file en
28027 genfile --length 20000 --file to
28028 genfile --length 20000 --file tre
28029 genfile --length 10240 --file fire
28030
28031 exec <&-
28032
28033 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
28034 echo separator
28035 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
28036 )
28037 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28038 at_status=$? at_failed=false
28039 $at_check_filter
28040 at_fn_diff_devnull "$at_stderr" || at_failed=:
28041 echo >>"$at_stdout"; $as_echo "separator
28042 en
28043 " | \
28044   $at_diff - "$at_stdout" || at_failed=:
28045 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
28046 $at_failed && at_fn_log_failure
28047 $at_traceon; }
28048
28049
28050
28051
28052   set +x
28053   $at_times_p && times >"$at_times_file"
28054 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28055 read at_status <"$at_status_file"
28056 #AT_STOP_116
28057 #AT_START_117
28058 at_fn_group_banner 117 'multiv03.at:30' \
28059   "MV archive & long filenames" "                    " 17
28060 at_xfail=no
28061       test -f $XFAILFILE && at_xfail=yes
28062 (
28063   $as_echo "117. $at_setup_line: testing $at_desc ..."
28064   $at_traceon
28065
28066
28067
28068
28069
28070   { set +x
28071 $as_echo "$at_srcdir/multiv03.at:33:
28072 mkdir gnu
28073 (cd gnu
28074 TEST_TAR_FORMAT=gnu
28075 export TEST_TAR_FORMAT
28076 TAR_OPTIONS=\"-H gnu\"
28077 export TAR_OPTIONS
28078 rm -rf *
28079
28080 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
28081 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
28082
28083 cat > ../experr <<EOF
28084 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
28085 tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
28086 EOF
28087
28088 cat > ../expout <<EOF
28089 \$AFILE
28090 separator-1
28091 separator-2
28092 EOF
28093
28094 genfile --length 15360 --file \$AFILE
28095
28096 exec <&-
28097
28098 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
28099 tar -tM -f arch.1 -f arch.2 || exit 1
28100
28101 echo separator-1
28102
28103 genfile --length 15360 --file \$BFILE
28104 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
28105
28106 echo separator-2
28107 mv \$BFILE bfile
28108 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
28109 cmp \$BFILE bfile
28110 )"
28111 at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
28112 ( $at_check_trace;
28113 mkdir gnu
28114 (cd gnu
28115 TEST_TAR_FORMAT=gnu
28116 export TEST_TAR_FORMAT
28117 TAR_OPTIONS="-H gnu"
28118 export TAR_OPTIONS
28119 rm -rf *
28120
28121 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
28122 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
28123
28124 cat > ../experr <<EOF
28125 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
28126 tar: '$BFILE' is possibly continued on this volume: header contains truncated name
28127 EOF
28128
28129 cat > ../expout <<EOF
28130 $AFILE
28131 separator-1
28132 separator-2
28133 EOF
28134
28135 genfile --length 15360 --file $AFILE
28136
28137 exec <&-
28138
28139 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
28140 tar -tM -f arch.1 -f arch.2 || exit 1
28141
28142 echo separator-1
28143
28144 genfile --length 15360 --file $BFILE
28145 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
28146
28147 echo separator-2
28148 mv $BFILE bfile
28149 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
28150 cmp $BFILE bfile
28151 )
28152 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28153 at_status=$? at_failed=false
28154 $at_check_filter
28155 $at_diff experr "$at_stderr" || at_failed=:
28156 $at_diff expout "$at_stdout" || at_failed=:
28157 at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
28158 $at_failed && at_fn_log_failure
28159 $at_traceon; }
28160
28161               { set +x
28162 $as_echo "$at_srcdir/multiv03.at:33:
28163 mkdir oldgnu
28164 (cd oldgnu
28165 TEST_TAR_FORMAT=oldgnu
28166 export TEST_TAR_FORMAT
28167 TAR_OPTIONS=\"-H oldgnu\"
28168 export TAR_OPTIONS
28169 rm -rf *
28170
28171 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
28172 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
28173
28174 cat > ../experr <<EOF
28175 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
28176 tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
28177 EOF
28178
28179 cat > ../expout <<EOF
28180 \$AFILE
28181 separator-1
28182 separator-2
28183 EOF
28184
28185 genfile --length 15360 --file \$AFILE
28186
28187 exec <&-
28188
28189 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
28190 tar -tM -f arch.1 -f arch.2 || exit 1
28191
28192 echo separator-1
28193
28194 genfile --length 15360 --file \$BFILE
28195 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
28196
28197 echo separator-2
28198 mv \$BFILE bfile
28199 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
28200 cmp \$BFILE bfile
28201 )"
28202 at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
28203 ( $at_check_trace;
28204 mkdir oldgnu
28205 (cd oldgnu
28206 TEST_TAR_FORMAT=oldgnu
28207 export TEST_TAR_FORMAT
28208 TAR_OPTIONS="-H oldgnu"
28209 export TAR_OPTIONS
28210 rm -rf *
28211
28212 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
28213 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
28214
28215 cat > ../experr <<EOF
28216 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
28217 tar: '$BFILE' is possibly continued on this volume: header contains truncated name
28218 EOF
28219
28220 cat > ../expout <<EOF
28221 $AFILE
28222 separator-1
28223 separator-2
28224 EOF
28225
28226 genfile --length 15360 --file $AFILE
28227
28228 exec <&-
28229
28230 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
28231 tar -tM -f arch.1 -f arch.2 || exit 1
28232
28233 echo separator-1
28234
28235 genfile --length 15360 --file $BFILE
28236 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
28237
28238 echo separator-2
28239 mv $BFILE bfile
28240 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
28241 cmp $BFILE bfile
28242 )
28243 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28244 at_status=$? at_failed=false
28245 $at_check_filter
28246 $at_diff experr "$at_stderr" || at_failed=:
28247 $at_diff expout "$at_stdout" || at_failed=:
28248 at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
28249 $at_failed && at_fn_log_failure
28250 $at_traceon; }
28251
28252
28253
28254
28255   set +x
28256   $at_times_p && times >"$at_times_file"
28257 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28258 read at_status <"$at_status_file"
28259 #AT_STOP_117
28260 #AT_START_118
28261 at_fn_group_banner 118 'multiv04.at:36' \
28262   "split directory members in a MV archive" "        " 17
28263 at_xfail=no
28264       test -f $XFAILFILE && at_xfail=yes
28265 (
28266   $as_echo "118. $at_setup_line: testing $at_desc ..."
28267   $at_traceon
28268
28269
28270
28271
28272
28273   { set +x
28274 $as_echo "$at_srcdir/multiv04.at:39:
28275 mkdir gnu
28276 (cd gnu
28277 TEST_TAR_FORMAT=gnu
28278 export TEST_TAR_FORMAT
28279 TAR_OPTIONS=\"-H gnu\"
28280 export TAR_OPTIONS
28281 rm -rf *
28282
28283
28284 mkdir directory
28285 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
28286
28287 exec <&-
28288
28289 sleep 2
28290
28291 tar --listed-incremental=list -c -f archive.a directory
28292
28293 sleep 2
28294
28295 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
28296
28297 echo separator
28298
28299 tar -MRt -f arc.1 -f arc.2)"
28300 at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
28301 ( $at_check_trace;
28302 mkdir gnu
28303 (cd gnu
28304 TEST_TAR_FORMAT=gnu
28305 export TEST_TAR_FORMAT
28306 TAR_OPTIONS="-H gnu"
28307 export TAR_OPTIONS
28308 rm -rf *
28309
28310
28311 mkdir directory
28312 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
28313
28314 exec <&-
28315
28316 sleep 2
28317
28318 tar --listed-incremental=list -c -f archive.a directory
28319
28320 sleep 2
28321
28322 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
28323
28324 echo separator
28325
28326 tar -MRt -f arc.1 -f arc.2)
28327 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28328 at_status=$? at_failed=false
28329 $at_check_filter
28330 at_fn_diff_devnull "$at_stderr" || at_failed=:
28331 echo >>"$at_stdout"; $as_echo "directory/
28332 separator
28333 block 0: directory/
28334 block 35: ** Block of NULs **
28335 " | \
28336   $at_diff - "$at_stdout" || at_failed=:
28337 at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
28338 $at_failed && at_fn_log_failure
28339 $at_traceon; }
28340
28341               { set +x
28342 $as_echo "$at_srcdir/multiv04.at:39:
28343 mkdir oldgnu
28344 (cd oldgnu
28345 TEST_TAR_FORMAT=oldgnu
28346 export TEST_TAR_FORMAT
28347 TAR_OPTIONS=\"-H oldgnu\"
28348 export TAR_OPTIONS
28349 rm -rf *
28350
28351
28352 mkdir directory
28353 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
28354
28355 exec <&-
28356
28357 sleep 2
28358
28359 tar --listed-incremental=list -c -f archive.a directory
28360
28361 sleep 2
28362
28363 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
28364
28365 echo separator
28366
28367 tar -MRt -f arc.1 -f arc.2)"
28368 at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
28369 ( $at_check_trace;
28370 mkdir oldgnu
28371 (cd oldgnu
28372 TEST_TAR_FORMAT=oldgnu
28373 export TEST_TAR_FORMAT
28374 TAR_OPTIONS="-H oldgnu"
28375 export TAR_OPTIONS
28376 rm -rf *
28377
28378
28379 mkdir directory
28380 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
28381
28382 exec <&-
28383
28384 sleep 2
28385
28386 tar --listed-incremental=list -c -f archive.a directory
28387
28388 sleep 2
28389
28390 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
28391
28392 echo separator
28393
28394 tar -MRt -f arc.1 -f arc.2)
28395 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28396 at_status=$? at_failed=false
28397 $at_check_filter
28398 at_fn_diff_devnull "$at_stderr" || at_failed=:
28399 echo >>"$at_stdout"; $as_echo "directory/
28400 separator
28401 block 0: directory/
28402 block 35: ** Block of NULs **
28403 " | \
28404   $at_diff - "$at_stdout" || at_failed=:
28405 at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
28406 $at_failed && at_fn_log_failure
28407 $at_traceon; }
28408
28409
28410
28411
28412   set +x
28413   $at_times_p && times >"$at_times_file"
28414 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28415 read at_status <"$at_status_file"
28416 #AT_STOP_118
28417 #AT_START_119
28418 at_fn_group_banner 119 'multiv05.at:26' \
28419   "Restoring after an out of sync volume" "          " 17
28420 at_xfail=no
28421       test -f $XFAILFILE && at_xfail=yes
28422 (
28423   $as_echo "119. $at_setup_line: testing $at_desc ..."
28424   $at_traceon
28425
28426
28427
28428
28429
28430
28431   { set +x
28432 $as_echo "$at_srcdir/multiv05.at:30:
28433 mkdir gnu
28434 (cd gnu
28435 TEST_TAR_FORMAT=gnu
28436 export TEST_TAR_FORMAT
28437 TAR_OPTIONS=\"-H gnu\"
28438 export TAR_OPTIONS
28439 rm -rf *
28440
28441 exec <&-
28442
28443 genfile --length 250k --file jeden
28444 genfile --length 250k --file dwa
28445 genfile --length 250k --file trzy
28446 genfile --length 250k --file cztery
28447 genfile --length 250k --file piec
28448 genfile --length 250k --file szesc
28449
28450
28451 echo Creating archive
28452 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
28453 echo separator
28454 mkdir bak
28455 mv jeden dwa trzy cztery piec szesc bak
28456 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
28457 echo Diffing jeden
28458    cmp bak/jeden jeden || exit 1
28459 echo Diffing dwa
28460    cmp bak/dwa dwa || exit 1
28461 echo Diffing trzy
28462    cmp bak/trzy trzy || exit 1
28463 echo Diffing cztery
28464    cmp bak/cztery cztery || exit 1
28465 echo Diffing piec
28466    cmp bak/piec piec || exit 1
28467 echo Diffing szesc
28468    cmp bak/szesc szesc || exit 1
28469 )"
28470 at_fn_check_prepare_notrace 'an embedded newline' "multiv05.at:30"
28471 ( $at_check_trace;
28472 mkdir gnu
28473 (cd gnu
28474 TEST_TAR_FORMAT=gnu
28475 export TEST_TAR_FORMAT
28476 TAR_OPTIONS="-H gnu"
28477 export TAR_OPTIONS
28478 rm -rf *
28479
28480 exec <&-
28481
28482 genfile --length 250k --file jeden
28483 genfile --length 250k --file dwa
28484 genfile --length 250k --file trzy
28485 genfile --length 250k --file cztery
28486 genfile --length 250k --file piec
28487 genfile --length 250k --file szesc
28488
28489
28490 echo Creating archive
28491 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
28492 echo separator
28493 mkdir bak
28494 mv jeden dwa trzy cztery piec szesc bak
28495 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
28496 echo Diffing jeden
28497    cmp bak/jeden jeden || exit 1
28498 echo Diffing dwa
28499    cmp bak/dwa dwa || exit 1
28500 echo Diffing trzy
28501    cmp bak/trzy trzy || exit 1
28502 echo Diffing cztery
28503    cmp bak/cztery cztery || exit 1
28504 echo Diffing piec
28505    cmp bak/piec piec || exit 1
28506 echo Diffing szesc
28507    cmp bak/szesc szesc || exit 1
28508 )
28509 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28510 at_status=$? at_failed=false
28511 $at_check_filter
28512 echo >>"$at_stderr"; $as_echo "tar: 'trzy' is not continued on this volume
28513 " | \
28514   $at_diff - "$at_stderr" || at_failed=:
28515 echo >>"$at_stdout"; $as_echo "Creating archive
28516 separator
28517 jeden
28518 dwa
28519 trzy
28520 cztery
28521 piec
28522 szesc
28523 Diffing jeden
28524 Diffing dwa
28525 Diffing trzy
28526 Diffing cztery
28527 Diffing piec
28528 Diffing szesc
28529 " | \
28530   $at_diff - "$at_stdout" || at_failed=:
28531 at_fn_check_status 0 $at_status "$at_srcdir/multiv05.at:30"
28532 $at_failed && at_fn_log_failure
28533 $at_traceon; }
28534
28535
28536
28537
28538
28539   set +x
28540   $at_times_p && times >"$at_times_file"
28541 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28542 read at_status <"$at_status_file"
28543 #AT_STOP_119
28544 #AT_START_120
28545 at_fn_group_banner 120 'multiv06.at:27' \
28546   "Multivolumes with L=record_size" "                " 17
28547 at_xfail=no
28548       test -f $XFAILFILE && at_xfail=yes
28549 (
28550   $as_echo "120. $at_setup_line: testing $at_desc ..."
28551   $at_traceon
28552
28553
28554
28555
28556
28557   { set +x
28558 $as_echo "$at_srcdir/multiv06.at:30:
28559 mkdir gnu
28560 (cd gnu
28561 TEST_TAR_FORMAT=gnu
28562 export TEST_TAR_FORMAT
28563 TAR_OPTIONS=\"-H gnu\"
28564 export TAR_OPTIONS
28565 rm -rf *
28566
28567 exec <&-
28568 decho Creating file
28569 genfile --length 20139 --file file
28570 decho Creating archive
28571 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
28572 decho Testing archive
28573 tar -t -M -farc.1 -farc.2 -farc.3)"
28574 at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
28575 ( $at_check_trace;
28576 mkdir gnu
28577 (cd gnu
28578 TEST_TAR_FORMAT=gnu
28579 export TEST_TAR_FORMAT
28580 TAR_OPTIONS="-H gnu"
28581 export TAR_OPTIONS
28582 rm -rf *
28583
28584 exec <&-
28585 decho Creating file
28586 genfile --length 20139 --file file
28587 decho Creating archive
28588 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
28589 decho Testing archive
28590 tar -t -M -farc.1 -farc.2 -farc.3)
28591 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28592 at_status=$? at_failed=false
28593 $at_check_filter
28594 echo >>"$at_stderr"; $as_echo "Creating file
28595 Creating archive
28596 Testing archive
28597 " | \
28598   $at_diff - "$at_stderr" || at_failed=:
28599 echo >>"$at_stdout"; $as_echo "Creating file
28600 Creating archive
28601 Testing archive
28602 file
28603 " | \
28604   $at_diff - "$at_stdout" || at_failed=:
28605 at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
28606 $at_failed && at_fn_log_failure
28607 $at_traceon; }
28608
28609               { set +x
28610 $as_echo "$at_srcdir/multiv06.at:30:
28611 mkdir pax
28612 (cd pax
28613 TEST_TAR_FORMAT=pax
28614 export TEST_TAR_FORMAT
28615 TAR_OPTIONS=\"-H pax\"
28616 export TAR_OPTIONS
28617 rm -rf *
28618
28619 exec <&-
28620 decho Creating file
28621 genfile --length 20139 --file file
28622 decho Creating archive
28623 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
28624 decho Testing archive
28625 tar -t -M -farc.1 -farc.2 -farc.3)"
28626 at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
28627 ( $at_check_trace;
28628 mkdir pax
28629 (cd pax
28630 TEST_TAR_FORMAT=pax
28631 export TEST_TAR_FORMAT
28632 TAR_OPTIONS="-H pax"
28633 export TAR_OPTIONS
28634 rm -rf *
28635
28636 exec <&-
28637 decho Creating file
28638 genfile --length 20139 --file file
28639 decho Creating archive
28640 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
28641 decho Testing archive
28642 tar -t -M -farc.1 -farc.2 -farc.3)
28643 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28644 at_status=$? at_failed=false
28645 $at_check_filter
28646 echo >>"$at_stderr"; $as_echo "Creating file
28647 Creating archive
28648 Testing archive
28649 " | \
28650   $at_diff - "$at_stderr" || at_failed=:
28651 echo >>"$at_stdout"; $as_echo "Creating file
28652 Creating archive
28653 Testing archive
28654 file
28655 " | \
28656   $at_diff - "$at_stdout" || at_failed=:
28657 at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
28658 $at_failed && at_fn_log_failure
28659 $at_traceon; }
28660
28661
28662
28663
28664   set +x
28665   $at_times_p && times >"$at_times_file"
28666 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28667 read at_status <"$at_status_file"
28668 #AT_STOP_120
28669 #AT_START_121
28670 at_fn_group_banner 121 'multiv07.at:28' \
28671   "volumes split at an extended header" "            " 17
28672 at_xfail=no
28673       test -f $XFAILFILE && at_xfail=yes
28674 (
28675   $as_echo "121. $at_setup_line: testing $at_desc ..."
28676   $at_traceon
28677
28678
28679
28680 { set +x
28681 $as_echo "$at_srcdir/multiv07.at:31:
28682
28683
28684 test -z \"\$TEST_DATA_DIR\" && exit 77
28685 tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
28686
28687 test -z \"\$TEST_DATA_DIR\" && exit 77
28688 tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
28689
28690 exec <&-
28691
28692 cd \$TEST_DATA_DIR
28693 tar -t -M -fxsplit-1.tar -fxsplit-2.tar
28694 "
28695 at_fn_check_prepare_notrace 'an embedded newline' "multiv07.at:31"
28696 ( $at_check_trace;
28697
28698
28699 test -z "$TEST_DATA_DIR" && exit 77
28700 tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
28701
28702 test -z "$TEST_DATA_DIR" && exit 77
28703 tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
28704
28705 exec <&-
28706
28707 cd $TEST_DATA_DIR
28708 tar -t -M -fxsplit-1.tar -fxsplit-2.tar
28709
28710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28711 at_status=$? at_failed=false
28712 $at_check_filter
28713 at_fn_diff_devnull "$at_stderr" || at_failed=:
28714 echo >>"$at_stdout"; $as_echo "Archive volumes split at an extended header Volume 1
28715 foo
28716 bar
28717 " | \
28718   $at_diff - "$at_stdout" || at_failed=:
28719 at_fn_check_status 0 $at_status "$at_srcdir/multiv07.at:31"
28720 $at_failed && at_fn_log_failure
28721 $at_traceon; }
28722
28723
28724   set +x
28725   $at_times_p && times >"$at_times_file"
28726 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28727 read at_status <"$at_status_file"
28728 #AT_STOP_121
28729 #AT_START_122
28730 at_fn_group_banner 122 'multiv08.at:25' \
28731   "multivolume header creation" "                    " 17
28732 at_xfail=no
28733       test -f $XFAILFILE && at_xfail=yes
28734 (
28735   $as_echo "122. $at_setup_line: testing $at_desc ..."
28736   $at_traceon
28737
28738
28739
28740
28741
28742   { set +x
28743 $as_echo "$at_srcdir/multiv08.at:28:
28744 mkdir gnu
28745 (cd gnu
28746 TEST_TAR_FORMAT=gnu
28747 export TEST_TAR_FORMAT
28748 TAR_OPTIONS=\"-H gnu\"
28749 export TAR_OPTIONS
28750 rm -rf *
28751
28752 genfile --length 9472 --file a
28753 genfile --length 9984 --file b
28754 decho Creating
28755 tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
28756 decho Testing
28757 tar -tMR -f A.tar -f B.tar -f C.tar
28758 )"
28759 at_fn_check_prepare_notrace 'an embedded newline' "multiv08.at:28"
28760 ( $at_check_trace;
28761 mkdir gnu
28762 (cd gnu
28763 TEST_TAR_FORMAT=gnu
28764 export TEST_TAR_FORMAT
28765 TAR_OPTIONS="-H gnu"
28766 export TAR_OPTIONS
28767 rm -rf *
28768
28769 genfile --length 9472 --file a
28770 genfile --length 9984 --file b
28771 decho Creating
28772 tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
28773 decho Testing
28774 tar -tMR -f A.tar -f B.tar -f C.tar
28775 )
28776 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28777 at_status=$? at_failed=false
28778 $at_check_filter
28779 echo >>"$at_stderr"; $as_echo "Creating
28780 Testing
28781 " | \
28782   $at_diff - "$at_stderr" || at_failed=:
28783 echo >>"$at_stdout"; $as_echo "Creating
28784 Testing
28785 block 0: a
28786 block 21: b
28787 block 43: ** Block of NULs **
28788 " | \
28789   $at_diff - "$at_stdout" || at_failed=:
28790 at_fn_check_status 0 $at_status "$at_srcdir/multiv08.at:28"
28791 $at_failed && at_fn_log_failure
28792 $at_traceon; }
28793
28794
28795
28796
28797   set +x
28798   $at_times_p && times >"$at_times_file"
28799 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28800 read at_status <"$at_status_file"
28801 #AT_STOP_122
28802 #AT_START_123
28803 at_fn_group_banner 123 'owner.at:21' \
28804   "--owner and --group" "                            " 18
28805 at_xfail=no
28806       test -f $XFAILFILE && at_xfail=yes
28807 (
28808   $as_echo "123. $at_setup_line: testing $at_desc ..."
28809   $at_traceon
28810
28811
28812
28813
28814
28815   { set +x
28816 $as_echo "$at_srcdir/owner.at:24:
28817 mkdir gnu
28818 (cd gnu
28819 TEST_TAR_FORMAT=gnu
28820 export TEST_TAR_FORMAT
28821 TAR_OPTIONS=\"-H gnu\"
28822 export TAR_OPTIONS
28823 rm -rf *
28824
28825 export TZ=UTC0
28826
28827 genfile --file a
28828
28829 tar --owner=\"Joe the Plumber:1234\" \\
28830     --group=\"Plumber's Union:5678\" \\
28831     --mtime='@0' \\
28832     --mode='u=rw,go=r' \\
28833     -cf arc a
28834
28835 tar -tvf arc
28836 tar --numeric-owner -tvf arc
28837 )"
28838 at_fn_check_prepare_notrace 'an embedded newline' "owner.at:24"
28839 ( $at_check_trace;
28840 mkdir gnu
28841 (cd gnu
28842 TEST_TAR_FORMAT=gnu
28843 export TEST_TAR_FORMAT
28844 TAR_OPTIONS="-H gnu"
28845 export TAR_OPTIONS
28846 rm -rf *
28847
28848 export TZ=UTC0
28849
28850 genfile --file a
28851
28852 tar --owner="Joe the Plumber:1234" \
28853     --group="Plumber's Union:5678" \
28854     --mtime='@0' \
28855     --mode='u=rw,go=r' \
28856     -cf arc a
28857
28858 tar -tvf arc
28859 tar --numeric-owner -tvf arc
28860 )
28861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28862 at_status=$? at_failed=false
28863 $at_check_filter
28864 at_fn_diff_devnull "$at_stderr" || at_failed=:
28865 echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
28866 -rw-r--r-- 1234/5678         0 1970-01-01 00:00 a
28867 " | \
28868   $at_diff - "$at_stdout" || at_failed=:
28869 at_fn_check_status 0 $at_status "$at_srcdir/owner.at:24"
28870 $at_failed && at_fn_log_failure
28871 $at_traceon; }
28872
28873
28874
28875
28876   set +x
28877   $at_times_p && times >"$at_times_file"
28878 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28879 read at_status <"$at_status_file"
28880 #AT_STOP_123
28881 #AT_START_124
28882 at_fn_group_banner 124 'sparse01.at:21' \
28883   "sparse files" "                                   " 19
28884 at_xfail=no
28885       test -f $XFAILFILE && at_xfail=yes
28886 (
28887   $as_echo "124. $at_setup_line: testing $at_desc ..."
28888   $at_traceon
28889
28890
28891
28892
28893
28894   { set +x
28895 $as_echo "$at_srcdir/sparse01.at:24:
28896 mkdir posix
28897 (cd posix
28898 TEST_TAR_FORMAT=posix
28899 export TEST_TAR_FORMAT
28900 TAR_OPTIONS=\"-H posix\"
28901 export TAR_OPTIONS
28902 rm -rf *
28903
28904 genfile --length 1000 -f begin
28905 genfile --length 1000 -f end
28906 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
28907 tar -c -f archive --sparse begin sparsefile end || exit 1
28908 echo separator
28909
28910 tar tfv archive
28911 echo separator
28912 mkdir directory
28913 tar Cxf directory archive --warning=no-timestamp
28914 genfile --stat=name,size sparsefile
28915 cmp sparsefile directory/sparsefile
28916 )"
28917 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
28918 ( $at_check_trace;
28919 mkdir posix
28920 (cd posix
28921 TEST_TAR_FORMAT=posix
28922 export TEST_TAR_FORMAT
28923 TAR_OPTIONS="-H posix"
28924 export TAR_OPTIONS
28925 rm -rf *
28926
28927 genfile --length 1000 -f begin
28928 genfile --length 1000 -f end
28929 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
28930 tar -c -f archive --sparse begin sparsefile end || exit 1
28931 echo separator
28932
28933 tar tfv archive
28934 echo separator
28935 mkdir directory
28936 tar Cxf directory archive --warning=no-timestamp
28937 genfile --stat=name,size sparsefile
28938 cmp sparsefile directory/sparsefile
28939 )
28940 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28941 at_status=$? at_failed=false
28942 $at_check_filter
28943 at_fn_diff_devnull "$at_stderr" || at_failed=:
28944 echo stdout:; tee stdout <"$at_stdout"
28945 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
28946 $at_failed && at_fn_log_failure
28947 $at_traceon; }
28948
28949               { set +x
28950 $as_echo "$at_srcdir/sparse01.at:24:
28951 mkdir gnu
28952 (cd gnu
28953 TEST_TAR_FORMAT=gnu
28954 export TEST_TAR_FORMAT
28955 TAR_OPTIONS=\"-H gnu\"
28956 export TAR_OPTIONS
28957 rm -rf *
28958
28959 genfile --length 1000 -f begin
28960 genfile --length 1000 -f end
28961 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
28962 tar -c -f archive --sparse begin sparsefile end || exit 1
28963 echo separator
28964
28965 tar tfv archive
28966 echo separator
28967 mkdir directory
28968 tar Cxf directory archive --warning=no-timestamp
28969 genfile --stat=name,size sparsefile
28970 cmp sparsefile directory/sparsefile
28971 )"
28972 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
28973 ( $at_check_trace;
28974 mkdir gnu
28975 (cd gnu
28976 TEST_TAR_FORMAT=gnu
28977 export TEST_TAR_FORMAT
28978 TAR_OPTIONS="-H gnu"
28979 export TAR_OPTIONS
28980 rm -rf *
28981
28982 genfile --length 1000 -f begin
28983 genfile --length 1000 -f end
28984 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
28985 tar -c -f archive --sparse begin sparsefile end || exit 1
28986 echo separator
28987
28988 tar tfv archive
28989 echo separator
28990 mkdir directory
28991 tar Cxf directory archive --warning=no-timestamp
28992 genfile --stat=name,size sparsefile
28993 cmp sparsefile directory/sparsefile
28994 )
28995 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28996 at_status=$? at_failed=false
28997 $at_check_filter
28998 at_fn_diff_devnull "$at_stderr" || at_failed=:
28999 echo stdout:; tee stdout <"$at_stdout"
29000 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
29001 $at_failed && at_fn_log_failure
29002 $at_traceon; }
29003
29004               { set +x
29005 $as_echo "$at_srcdir/sparse01.at:24:
29006 mkdir oldgnu
29007 (cd oldgnu
29008 TEST_TAR_FORMAT=oldgnu
29009 export TEST_TAR_FORMAT
29010 TAR_OPTIONS=\"-H oldgnu\"
29011 export TAR_OPTIONS
29012 rm -rf *
29013
29014 genfile --length 1000 -f begin
29015 genfile --length 1000 -f end
29016 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29017 tar -c -f archive --sparse begin sparsefile end || exit 1
29018 echo separator
29019
29020 tar tfv archive
29021 echo separator
29022 mkdir directory
29023 tar Cxf directory archive --warning=no-timestamp
29024 genfile --stat=name,size sparsefile
29025 cmp sparsefile directory/sparsefile
29026 )"
29027 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
29028 ( $at_check_trace;
29029 mkdir oldgnu
29030 (cd oldgnu
29031 TEST_TAR_FORMAT=oldgnu
29032 export TEST_TAR_FORMAT
29033 TAR_OPTIONS="-H oldgnu"
29034 export TAR_OPTIONS
29035 rm -rf *
29036
29037 genfile --length 1000 -f begin
29038 genfile --length 1000 -f end
29039 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29040 tar -c -f archive --sparse begin sparsefile end || exit 1
29041 echo separator
29042
29043 tar tfv archive
29044 echo separator
29045 mkdir directory
29046 tar Cxf directory archive --warning=no-timestamp
29047 genfile --stat=name,size sparsefile
29048 cmp sparsefile directory/sparsefile
29049 )
29050 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29051 at_status=$? at_failed=false
29052 $at_check_filter
29053 at_fn_diff_devnull "$at_stderr" || at_failed=:
29054 echo stdout:; tee stdout <"$at_stdout"
29055 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
29056 $at_failed && at_fn_log_failure
29057 $at_traceon; }
29058
29059
29060
29061
29062
29063 cat >stdout.re <<'_ATEOF'
29064 separator
29065 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
29066 -rw-r--r-- ^ ^ *  *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
29067 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
29068 separator
29069 sparsefile 10344448
29070 _ATEOF
29071
29072 awk '{print NR " " $0}' stdout > $$.1
29073 awk '{print NR " " $0}' stdout.re | join - $$.1 |
29074 while read NUM RE LINE
29075 do
29076   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
29077 done
29078
29079
29080   set +x
29081   $at_times_p && times >"$at_times_file"
29082 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29083 read at_status <"$at_status_file"
29084 #AT_STOP_124
29085 #AT_START_125
29086 at_fn_group_banner 125 'sparse02.at:21' \
29087   "extracting sparse file over a pipe" "             " 19
29088 at_xfail=no
29089       test -f $XFAILFILE && at_xfail=yes
29090 (
29091   $as_echo "125. $at_setup_line: testing $at_desc ..."
29092   $at_traceon
29093
29094
29095
29096 # Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
29097 # References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
29098 # http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
29099
29100
29101
29102   { set +x
29103 $as_echo "$at_srcdir/sparse02.at:28:
29104 mkdir posix
29105 (cd posix
29106 TEST_TAR_FORMAT=posix
29107 export TEST_TAR_FORMAT
29108 TAR_OPTIONS=\"-H posix\"
29109 export TAR_OPTIONS
29110 rm -rf *
29111
29112 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29113 tar -c -f archive --sparse sparsefile || exit 1
29114 echo separator
29115
29116 tar xfO archive | cat - > sparsecopy || exit 1
29117 cmp sparsefile sparsecopy
29118 )"
29119 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
29120 ( $at_check_trace;
29121 mkdir posix
29122 (cd posix
29123 TEST_TAR_FORMAT=posix
29124 export TEST_TAR_FORMAT
29125 TAR_OPTIONS="-H posix"
29126 export TAR_OPTIONS
29127 rm -rf *
29128
29129 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29130 tar -c -f archive --sparse sparsefile || exit 1
29131 echo separator
29132
29133 tar xfO archive | cat - > sparsecopy || exit 1
29134 cmp sparsefile sparsecopy
29135 )
29136 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29137 at_status=$? at_failed=false
29138 $at_check_filter
29139 at_fn_diff_devnull "$at_stderr" || at_failed=:
29140 echo >>"$at_stdout"; $as_echo "separator
29141 " | \
29142   $at_diff - "$at_stdout" || at_failed=:
29143 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
29144 $at_failed && at_fn_log_failure
29145 $at_traceon; }
29146
29147               { set +x
29148 $as_echo "$at_srcdir/sparse02.at:28:
29149 mkdir gnu
29150 (cd gnu
29151 TEST_TAR_FORMAT=gnu
29152 export TEST_TAR_FORMAT
29153 TAR_OPTIONS=\"-H gnu\"
29154 export TAR_OPTIONS
29155 rm -rf *
29156
29157 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29158 tar -c -f archive --sparse sparsefile || exit 1
29159 echo separator
29160
29161 tar xfO archive | cat - > sparsecopy || exit 1
29162 cmp sparsefile sparsecopy
29163 )"
29164 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
29165 ( $at_check_trace;
29166 mkdir gnu
29167 (cd gnu
29168 TEST_TAR_FORMAT=gnu
29169 export TEST_TAR_FORMAT
29170 TAR_OPTIONS="-H gnu"
29171 export TAR_OPTIONS
29172 rm -rf *
29173
29174 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29175 tar -c -f archive --sparse sparsefile || exit 1
29176 echo separator
29177
29178 tar xfO archive | cat - > sparsecopy || exit 1
29179 cmp sparsefile sparsecopy
29180 )
29181 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29182 at_status=$? at_failed=false
29183 $at_check_filter
29184 at_fn_diff_devnull "$at_stderr" || at_failed=:
29185 echo >>"$at_stdout"; $as_echo "separator
29186 " | \
29187   $at_diff - "$at_stdout" || at_failed=:
29188 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
29189 $at_failed && at_fn_log_failure
29190 $at_traceon; }
29191
29192               { set +x
29193 $as_echo "$at_srcdir/sparse02.at:28:
29194 mkdir oldgnu
29195 (cd oldgnu
29196 TEST_TAR_FORMAT=oldgnu
29197 export TEST_TAR_FORMAT
29198 TAR_OPTIONS=\"-H oldgnu\"
29199 export TAR_OPTIONS
29200 rm -rf *
29201
29202 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29203 tar -c -f archive --sparse sparsefile || exit 1
29204 echo separator
29205
29206 tar xfO archive | cat - > sparsecopy || exit 1
29207 cmp sparsefile sparsecopy
29208 )"
29209 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
29210 ( $at_check_trace;
29211 mkdir oldgnu
29212 (cd oldgnu
29213 TEST_TAR_FORMAT=oldgnu
29214 export TEST_TAR_FORMAT
29215 TAR_OPTIONS="-H oldgnu"
29216 export TAR_OPTIONS
29217 rm -rf *
29218
29219 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29220 tar -c -f archive --sparse sparsefile || exit 1
29221 echo separator
29222
29223 tar xfO archive | cat - > sparsecopy || exit 1
29224 cmp sparsefile sparsecopy
29225 )
29226 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29227 at_status=$? at_failed=false
29228 $at_check_filter
29229 at_fn_diff_devnull "$at_stderr" || at_failed=:
29230 echo >>"$at_stdout"; $as_echo "separator
29231 " | \
29232   $at_diff - "$at_stdout" || at_failed=:
29233 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
29234 $at_failed && at_fn_log_failure
29235 $at_traceon; }
29236
29237
29238
29239
29240   set +x
29241   $at_times_p && times >"$at_times_file"
29242 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29243 read at_status <"$at_status_file"
29244 #AT_STOP_125
29245 #AT_START_126
29246 at_fn_group_banner 126 'sparse03.at:21' \
29247   "storing sparse files > 8G" "                      " 19
29248 at_xfail=no
29249       test -f $XFAILFILE && at_xfail=yes
29250 (
29251   $as_echo "126. $at_setup_line: testing $at_desc ..."
29252   $at_traceon
29253
29254
29255
29256 # Tar 1.15.1 incorrectly computed sparse member size if the extended
29257 # PAX header contained size keyword.
29258 # References: <87vf46nb36.fsf@penguin.cs.ucla.edu>
29259 # http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
29260
29261
29262
29263   { set +x
29264 $as_echo "$at_srcdir/sparse03.at:29:
29265 mkdir posix
29266 (cd posix
29267 TEST_TAR_FORMAT=posix
29268 export TEST_TAR_FORMAT
29269 TAR_OPTIONS=\"-H posix\"
29270 export TAR_OPTIONS
29271 rm -rf *
29272
29273 genfile --length 1000 --file begin
29274 genfile --length 1000 --file end
29275 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
29276 tar -c -f archive --sparse begin sparsefile end || exit 1
29277 echo separator
29278
29279 tar tfv archive
29280 echo separator
29281 mkdir directory
29282 tar Cxf directory archive
29283 genfile --stat=name,size sparsefile
29284 cmp sparsefile directory/sparsefile
29285 )"
29286 at_fn_check_prepare_notrace 'an embedded newline' "sparse03.at:29"
29287 ( $at_check_trace;
29288 mkdir posix
29289 (cd posix
29290 TEST_TAR_FORMAT=posix
29291 export TEST_TAR_FORMAT
29292 TAR_OPTIONS="-H posix"
29293 export TAR_OPTIONS
29294 rm -rf *
29295
29296 genfile --length 1000 --file begin
29297 genfile --length 1000 --file end
29298 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
29299 tar -c -f archive --sparse begin sparsefile end || exit 1
29300 echo separator
29301
29302 tar tfv archive
29303 echo separator
29304 mkdir directory
29305 tar Cxf directory archive
29306 genfile --stat=name,size sparsefile
29307 cmp sparsefile directory/sparsefile
29308 )
29309 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29310 at_status=$? at_failed=false
29311 $at_check_filter
29312 at_fn_diff_devnull "$at_stderr" || at_failed=:
29313 echo stdout:; tee stdout <"$at_stdout"
29314 at_fn_check_status 0 $at_status "$at_srcdir/sparse03.at:29"
29315 $at_failed && at_fn_log_failure
29316 $at_traceon; }
29317
29318
29319
29320
29321
29322 cat >stdout.re <<'_ATEOF'
29323 separator
29324 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
29325 -rw-r--r-- ^ ^ *  *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
29326 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
29327 separator
29328 sparsefile 8589935104
29329 _ATEOF
29330
29331 awk '{print NR " " $0}' stdout > $$.1
29332 awk '{print NR " " $0}' stdout.re | join - $$.1 |
29333 while read NUM RE LINE
29334 do
29335   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
29336 done
29337
29338
29339   set +x
29340   $at_times_p && times >"$at_times_file"
29341 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29342 read at_status <"$at_status_file"
29343 #AT_STOP_126
29344 #AT_START_127
29345 at_fn_group_banner 127 'sparse04.at:21' \
29346   "storing long sparse file names" "                 " 19
29347 at_xfail=no
29348       test -f $XFAILFILE && at_xfail=yes
29349 (
29350   $as_echo "127. $at_setup_line: testing $at_desc ..."
29351   $at_traceon
29352
29353
29354
29355 # Description: Tar versions from 1.15.92 to 1.25 would incorrectly
29356 # store sparse file names longer than 100 characters in pax mode.
29357 # Namely, the 'path' keyword of the produced PAX header would contain the
29358 # crafted name of the header itself, instead of that of the file.
29359 # Reported by: Kamil Dudka <kdudka@redhat.com>
29360 # References: <201011250026.44908.kdudka@redhat.com>,
29361 #             http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html
29362
29363
29364
29365
29366
29367   { set +x
29368 $as_echo "$at_srcdir/sparse04.at:35:
29369 mkdir pax
29370 (cd pax
29371 TEST_TAR_FORMAT=pax
29372 export TEST_TAR_FORMAT
29373 TAR_OPTIONS=\"-H pax\"
29374 export TAR_OPTIONS
29375 rm -rf *
29376
29377 genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
29378 tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
29379 )"
29380 at_fn_check_prepare_notrace 'an embedded newline' "sparse04.at:35"
29381 ( $at_check_trace;
29382 mkdir pax
29383 (cd pax
29384 TEST_TAR_FORMAT=pax
29385 export TEST_TAR_FORMAT
29386 TAR_OPTIONS="-H pax"
29387 export TAR_OPTIONS
29388 rm -rf *
29389
29390 genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
29391 tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
29392 )
29393 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29394 at_status=$? at_failed=false
29395 $at_check_filter
29396 at_fn_diff_devnull "$at_stderr" || at_failed=:
29397 echo >>"$at_stdout"; $as_echo "123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
29398 " | \
29399   $at_diff - "$at_stdout" || at_failed=:
29400 at_fn_check_status 0 $at_status "$at_srcdir/sparse04.at:35"
29401 $at_failed && at_fn_log_failure
29402 $at_traceon; }
29403
29404
29405
29406
29407
29408   set +x
29409   $at_times_p && times >"$at_times_file"
29410 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29411 read at_status <"$at_status_file"
29412 #AT_STOP_127
29413 #AT_START_128
29414 at_fn_group_banner 128 'sparsemv.at:21' \
29415   "sparse files in MV archives" "                    " 19
29416 at_xfail=no
29417       test -f $XFAILFILE && at_xfail=yes
29418 (
29419   $as_echo "128. $at_setup_line: testing $at_desc ..."
29420   $at_traceon
29421
29422
29423
29424 # Check if sparse files are correctly split between GNU multi-volume
29425 # archives.
29426 # There are two cases: the file can be split within an empty (null) block,
29427 # or within a data block. Since null blocks are not archived, the first
29428 # case means the file is split between two consecutive data blocks.
29429 #
29430
29431
29432
29433   { set +x
29434 $as_echo "$at_srcdir/sparsemv.at:31:
29435 mkdir gnu
29436 (cd gnu
29437 TEST_TAR_FORMAT=gnu
29438 export TEST_TAR_FORMAT
29439 TAR_OPTIONS=\"-H gnu\"
29440 export TAR_OPTIONS
29441 rm -rf *
29442
29443 exec <&-
29444 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29445 echo \"Pass 1: Split between data blocks\"
29446 echo \"Create archive\"
29447 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29448 echo \"Test archive\"
29449 tar --record-size=512 -t -M -f arc.1 -f arc.2
29450 echo \"Compare archive\"
29451 tar --record-size=512 -d -M -f arc.1 -f arc.2
29452
29453 echo \"Pass 2: Split within a data block\"
29454 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29455 echo \"Create archive\"
29456 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29457 echo \"Test archive\"
29458 tar --record-size=512 -t -M -f arc.1 -f arc.2
29459 echo \"Compare archive\"
29460 tar --record-size=512 -d -M -f arc.1 -f arc.2
29461 )"
29462 at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
29463 ( $at_check_trace;
29464 mkdir gnu
29465 (cd gnu
29466 TEST_TAR_FORMAT=gnu
29467 export TEST_TAR_FORMAT
29468 TAR_OPTIONS="-H gnu"
29469 export TAR_OPTIONS
29470 rm -rf *
29471
29472 exec <&-
29473 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29474 echo "Pass 1: Split between data blocks"
29475 echo "Create archive"
29476 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29477 echo "Test archive"
29478 tar --record-size=512 -t -M -f arc.1 -f arc.2
29479 echo "Compare archive"
29480 tar --record-size=512 -d -M -f arc.1 -f arc.2
29481
29482 echo "Pass 2: Split within a data block"
29483 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29484 echo "Create archive"
29485 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29486 echo "Test archive"
29487 tar --record-size=512 -t -M -f arc.1 -f arc.2
29488 echo "Compare archive"
29489 tar --record-size=512 -d -M -f arc.1 -f arc.2
29490 )
29491 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29492 at_status=$? at_failed=false
29493 $at_check_filter
29494 at_fn_diff_devnull "$at_stderr" || at_failed=:
29495 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
29496 Create archive
29497 Test archive
29498 sparsefile
29499 Compare archive
29500 Pass 2: Split within a data block
29501 Create archive
29502 Test archive
29503 sparsefile
29504 Compare archive
29505 " | \
29506   $at_diff - "$at_stdout" || at_failed=:
29507 at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
29508 $at_failed && at_fn_log_failure
29509 $at_traceon; }
29510
29511               { set +x
29512 $as_echo "$at_srcdir/sparsemv.at:31:
29513 mkdir oldgnu
29514 (cd oldgnu
29515 TEST_TAR_FORMAT=oldgnu
29516 export TEST_TAR_FORMAT
29517 TAR_OPTIONS=\"-H oldgnu\"
29518 export TAR_OPTIONS
29519 rm -rf *
29520
29521 exec <&-
29522 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29523 echo \"Pass 1: Split between data blocks\"
29524 echo \"Create archive\"
29525 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29526 echo \"Test archive\"
29527 tar --record-size=512 -t -M -f arc.1 -f arc.2
29528 echo \"Compare archive\"
29529 tar --record-size=512 -d -M -f arc.1 -f arc.2
29530
29531 echo \"Pass 2: Split within a data block\"
29532 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29533 echo \"Create archive\"
29534 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29535 echo \"Test archive\"
29536 tar --record-size=512 -t -M -f arc.1 -f arc.2
29537 echo \"Compare archive\"
29538 tar --record-size=512 -d -M -f arc.1 -f arc.2
29539 )"
29540 at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
29541 ( $at_check_trace;
29542 mkdir oldgnu
29543 (cd oldgnu
29544 TEST_TAR_FORMAT=oldgnu
29545 export TEST_TAR_FORMAT
29546 TAR_OPTIONS="-H oldgnu"
29547 export TAR_OPTIONS
29548 rm -rf *
29549
29550 exec <&-
29551 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29552 echo "Pass 1: Split between data blocks"
29553 echo "Create archive"
29554 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29555 echo "Test archive"
29556 tar --record-size=512 -t -M -f arc.1 -f arc.2
29557 echo "Compare archive"
29558 tar --record-size=512 -d -M -f arc.1 -f arc.2
29559
29560 echo "Pass 2: Split within a data block"
29561 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29562 echo "Create archive"
29563 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29564 echo "Test archive"
29565 tar --record-size=512 -t -M -f arc.1 -f arc.2
29566 echo "Compare archive"
29567 tar --record-size=512 -d -M -f arc.1 -f arc.2
29568 )
29569 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29570 at_status=$? at_failed=false
29571 $at_check_filter
29572 at_fn_diff_devnull "$at_stderr" || at_failed=:
29573 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
29574 Create archive
29575 Test archive
29576 sparsefile
29577 Compare archive
29578 Pass 2: Split within a data block
29579 Create archive
29580 Test archive
29581 sparsefile
29582 Compare archive
29583 " | \
29584   $at_diff - "$at_stdout" || at_failed=:
29585 at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
29586 $at_failed && at_fn_log_failure
29587 $at_traceon; }
29588
29589
29590
29591
29592   set +x
29593   $at_times_p && times >"$at_times_file"
29594 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29595 read at_status <"$at_status_file"
29596 #AT_STOP_128
29597 #AT_START_129
29598 at_fn_group_banner 129 'spmvp00.at:21' \
29599   "sparse files in PAX MV archives, v.0.0" "         " 19
29600 at_xfail=no
29601       test -f $XFAILFILE && at_xfail=yes
29602 (
29603   $as_echo "129. $at_setup_line: testing $at_desc ..."
29604   $at_traceon
29605
29606
29607
29608
29609
29610
29611   { set +x
29612 $as_echo "$at_srcdir/spmvp00.at:24:
29613 mkdir pax
29614 (cd pax
29615 TEST_TAR_FORMAT=pax
29616 export TEST_TAR_FORMAT
29617 TAR_OPTIONS=\"-H pax\"
29618 export TAR_OPTIONS
29619 rm -rf *
29620
29621 exec <&-
29622 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
29623 echo \"Pass 1: Split between data blocks\"
29624 echo \"Create archive\"
29625 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29626 echo \"Test archive\"
29627 tar -t -M -f arc.1 -f arc.2 -f arc.3
29628 echo \"Compare archive\"
29629 tar -d -M -f arc.1 -f arc.2 -f arc.3
29630
29631 echo \"Pass 2: Split within a data block\"
29632 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
29633 echo \"Create archive\"
29634 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29635 echo \"Test archive\"
29636 tar -t -M -f arc.1 -f arc.2 -f arc.3
29637 echo \"Compare archive\"
29638 tar -d -M -f arc.1 -f arc.2 -f arc.3
29639 )"
29640 at_fn_check_prepare_notrace 'an embedded newline' "spmvp00.at:24"
29641 ( $at_check_trace;
29642 mkdir pax
29643 (cd pax
29644 TEST_TAR_FORMAT=pax
29645 export TEST_TAR_FORMAT
29646 TAR_OPTIONS="-H pax"
29647 export TAR_OPTIONS
29648 rm -rf *
29649
29650 exec <&-
29651 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
29652 echo "Pass 1: Split between data blocks"
29653 echo "Create archive"
29654 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29655 echo "Test archive"
29656 tar -t -M -f arc.1 -f arc.2 -f arc.3
29657 echo "Compare archive"
29658 tar -d -M -f arc.1 -f arc.2 -f arc.3
29659
29660 echo "Pass 2: Split within a data block"
29661 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
29662 echo "Create archive"
29663 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29664 echo "Test archive"
29665 tar -t -M -f arc.1 -f arc.2 -f arc.3
29666 echo "Compare archive"
29667 tar -d -M -f arc.1 -f arc.2 -f arc.3
29668 )
29669 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29670 at_status=$? at_failed=false
29671 $at_check_filter
29672 at_fn_diff_devnull "$at_stderr" || at_failed=:
29673 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
29674 Create archive
29675 Test archive
29676 sparsefile
29677 Compare archive
29678 Pass 2: Split within a data block
29679 Create archive
29680 Test archive
29681 sparsefile
29682 Compare archive
29683 " | \
29684   $at_diff - "$at_stdout" || at_failed=:
29685 at_fn_check_status 0 $at_status "$at_srcdir/spmvp00.at:24"
29686 $at_failed && at_fn_log_failure
29687 $at_traceon; }
29688
29689
29690
29691
29692   set +x
29693   $at_times_p && times >"$at_times_file"
29694 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29695 read at_status <"$at_status_file"
29696 #AT_STOP_129
29697 #AT_START_130
29698 at_fn_group_banner 130 'spmvp01.at:21' \
29699   "sparse files in PAX MV archives, v.0.1" "         " 19
29700 at_xfail=no
29701       test -f $XFAILFILE && at_xfail=yes
29702 (
29703   $as_echo "130. $at_setup_line: testing $at_desc ..."
29704   $at_traceon
29705
29706
29707
29708
29709
29710
29711   { set +x
29712 $as_echo "$at_srcdir/spmvp01.at:24:
29713 mkdir pax
29714 (cd pax
29715 TEST_TAR_FORMAT=pax
29716 export TEST_TAR_FORMAT
29717 TAR_OPTIONS=\"-H pax\"
29718 export TAR_OPTIONS
29719 rm -rf *
29720
29721 exec <&-
29722 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29723 echo \"Pass 1: Split between data blocks\"
29724 echo \"Create archive\"
29725 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29726 echo \"Test archive\"
29727 tar -t -M -f arc.1 -f arc.2 -f arc.3
29728 echo \"Compare archive\"
29729 tar -d -M -f arc.1 -f arc.2 -f arc.3
29730
29731 echo \"Pass 2: Split within a data block\"
29732 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29733 echo \"Create archive\"
29734 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29735 echo \"Test archive\"
29736 tar -t -M -f arc.1 -f arc.2 -f arc.3
29737 echo \"Compare archive\"
29738 tar -d -M -f arc.1 -f arc.2 -f arc.3
29739 )"
29740 at_fn_check_prepare_notrace 'an embedded newline' "spmvp01.at:24"
29741 ( $at_check_trace;
29742 mkdir pax
29743 (cd pax
29744 TEST_TAR_FORMAT=pax
29745 export TEST_TAR_FORMAT
29746 TAR_OPTIONS="-H pax"
29747 export TAR_OPTIONS
29748 rm -rf *
29749
29750 exec <&-
29751 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29752 echo "Pass 1: Split between data blocks"
29753 echo "Create archive"
29754 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29755 echo "Test archive"
29756 tar -t -M -f arc.1 -f arc.2 -f arc.3
29757 echo "Compare archive"
29758 tar -d -M -f arc.1 -f arc.2 -f arc.3
29759
29760 echo "Pass 2: Split within a data block"
29761 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29762 echo "Create archive"
29763 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29764 echo "Test archive"
29765 tar -t -M -f arc.1 -f arc.2 -f arc.3
29766 echo "Compare archive"
29767 tar -d -M -f arc.1 -f arc.2 -f arc.3
29768 )
29769 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29770 at_status=$? at_failed=false
29771 $at_check_filter
29772 at_fn_diff_devnull "$at_stderr" || at_failed=:
29773 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
29774 Create archive
29775 Test archive
29776 sparsefile
29777 Compare archive
29778 Pass 2: Split within a data block
29779 Create archive
29780 Test archive
29781 sparsefile
29782 Compare archive
29783 " | \
29784   $at_diff - "$at_stdout" || at_failed=:
29785 at_fn_check_status 0 $at_status "$at_srcdir/spmvp01.at:24"
29786 $at_failed && at_fn_log_failure
29787 $at_traceon; }
29788
29789
29790
29791
29792   set +x
29793   $at_times_p && times >"$at_times_file"
29794 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29795 read at_status <"$at_status_file"
29796 #AT_STOP_130
29797 #AT_START_131
29798 at_fn_group_banner 131 'spmvp10.at:21' \
29799   "sparse files in PAX MV archives, v.1.0" "         " 19
29800 at_xfail=no
29801       test -f $XFAILFILE && at_xfail=yes
29802 (
29803   $as_echo "131. $at_setup_line: testing $at_desc ..."
29804   $at_traceon
29805
29806
29807
29808
29809
29810
29811   { set +x
29812 $as_echo "$at_srcdir/spmvp10.at:24:
29813 mkdir pax
29814 (cd pax
29815 TEST_TAR_FORMAT=pax
29816 export TEST_TAR_FORMAT
29817 TAR_OPTIONS=\"-H pax\"
29818 export TAR_OPTIONS
29819 rm -rf *
29820
29821 exec <&-
29822 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
29823 echo \"Pass 1: Split between data blocks\"
29824 echo \"Create archive\"
29825 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29826 echo \"Test archive\"
29827 tar -t -M -f arc.1 -f arc.2 -f arc.3
29828 echo \"Compare archive\"
29829 tar -d -M -f arc.1 -f arc.2 -f arc.3
29830
29831 echo \"Pass 2: Split within a data block\"
29832 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
29833 echo \"Create archive\"
29834 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29835 echo \"Test archive\"
29836 tar -t -M -f arc.1 -f arc.2 -f arc.3
29837 echo \"Compare archive\"
29838 tar -d -M -f arc.1 -f arc.2 -f arc.3
29839 )"
29840 at_fn_check_prepare_notrace 'an embedded newline' "spmvp10.at:24"
29841 ( $at_check_trace;
29842 mkdir pax
29843 (cd pax
29844 TEST_TAR_FORMAT=pax
29845 export TEST_TAR_FORMAT
29846 TAR_OPTIONS="-H pax"
29847 export TAR_OPTIONS
29848 rm -rf *
29849
29850 exec <&-
29851 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
29852 echo "Pass 1: Split between data blocks"
29853 echo "Create archive"
29854 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29855 echo "Test archive"
29856 tar -t -M -f arc.1 -f arc.2 -f arc.3
29857 echo "Compare archive"
29858 tar -d -M -f arc.1 -f arc.2 -f arc.3
29859
29860 echo "Pass 2: Split within a data block"
29861 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
29862 echo "Create archive"
29863 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
29864 echo "Test archive"
29865 tar -t -M -f arc.1 -f arc.2 -f arc.3
29866 echo "Compare archive"
29867 tar -d -M -f arc.1 -f arc.2 -f arc.3
29868 )
29869 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29870 at_status=$? at_failed=false
29871 $at_check_filter
29872 at_fn_diff_devnull "$at_stderr" || at_failed=:
29873 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
29874 Create archive
29875 Test archive
29876 sparsefile
29877 Compare archive
29878 Pass 2: Split within a data block
29879 Create archive
29880 Test archive
29881 sparsefile
29882 Compare archive
29883 " | \
29884   $at_diff - "$at_stdout" || at_failed=:
29885 at_fn_check_status 0 $at_status "$at_srcdir/spmvp10.at:24"
29886 $at_failed && at_fn_log_failure
29887 $at_traceon; }
29888
29889
29890
29891
29892   set +x
29893   $at_times_p && times >"$at_times_file"
29894 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29895 read at_status <"$at_status_file"
29896 #AT_STOP_131
29897 #AT_START_132
29898 at_fn_group_banner 132 'update.at:28' \
29899   "update unchanged directories" "                   " 20
29900 at_xfail=no
29901       test -f $XFAILFILE && at_xfail=yes
29902 (
29903   $as_echo "132. $at_setup_line: testing $at_desc ..."
29904   $at_traceon
29905
29906
29907
29908
29909
29910   { set +x
29911 $as_echo "$at_srcdir/update.at:31:
29912 mkdir v7
29913 (cd v7
29914 TEST_TAR_FORMAT=v7
29915 export TEST_TAR_FORMAT
29916 TAR_OPTIONS=\"-H v7\"
29917 export TAR_OPTIONS
29918 rm -rf *
29919
29920
29921 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
29922
29923 mkdir directory
29924 genfile --length 10240 --pattern zeros --file directory/file1
29925 genfile --length 10240 --pattern default --file directory/file2
29926
29927 tar cf archive directory || exit 1
29928 echo separator
29929 tar uf archive directory || exit 1
29930 echo separator
29931 tar tf archive | sort || exit 1
29932 )"
29933 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
29934 ( $at_check_trace;
29935 mkdir v7
29936 (cd v7
29937 TEST_TAR_FORMAT=v7
29938 export TEST_TAR_FORMAT
29939 TAR_OPTIONS="-H v7"
29940 export TAR_OPTIONS
29941 rm -rf *
29942
29943
29944 test -z "`sort < /dev/null 2>&1`" || exit 77
29945
29946 mkdir directory
29947 genfile --length 10240 --pattern zeros --file directory/file1
29948 genfile --length 10240 --pattern default --file directory/file2
29949
29950 tar cf archive directory || exit 1
29951 echo separator
29952 tar uf archive directory || exit 1
29953 echo separator
29954 tar tf archive | sort || exit 1
29955 )
29956 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29957 at_status=$? at_failed=false
29958 $at_check_filter
29959 at_fn_diff_devnull "$at_stderr" || at_failed=:
29960 echo >>"$at_stdout"; $as_echo "separator
29961 separator
29962 directory/
29963 directory/file1
29964 directory/file2
29965 " | \
29966   $at_diff - "$at_stdout" || at_failed=:
29967 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
29968 $at_failed && at_fn_log_failure
29969 $at_traceon; }
29970
29971               { set +x
29972 $as_echo "$at_srcdir/update.at:31:
29973 mkdir oldgnu
29974 (cd oldgnu
29975 TEST_TAR_FORMAT=oldgnu
29976 export TEST_TAR_FORMAT
29977 TAR_OPTIONS=\"-H oldgnu\"
29978 export TAR_OPTIONS
29979 rm -rf *
29980
29981
29982 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
29983
29984 mkdir directory
29985 genfile --length 10240 --pattern zeros --file directory/file1
29986 genfile --length 10240 --pattern default --file directory/file2
29987
29988 tar cf archive directory || exit 1
29989 echo separator
29990 tar uf archive directory || exit 1
29991 echo separator
29992 tar tf archive | sort || exit 1
29993 )"
29994 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
29995 ( $at_check_trace;
29996 mkdir oldgnu
29997 (cd oldgnu
29998 TEST_TAR_FORMAT=oldgnu
29999 export TEST_TAR_FORMAT
30000 TAR_OPTIONS="-H oldgnu"
30001 export TAR_OPTIONS
30002 rm -rf *
30003
30004
30005 test -z "`sort < /dev/null 2>&1`" || exit 77
30006
30007 mkdir directory
30008 genfile --length 10240 --pattern zeros --file directory/file1
30009 genfile --length 10240 --pattern default --file directory/file2
30010
30011 tar cf archive directory || exit 1
30012 echo separator
30013 tar uf archive directory || exit 1
30014 echo separator
30015 tar tf archive | sort || exit 1
30016 )
30017 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30018 at_status=$? at_failed=false
30019 $at_check_filter
30020 at_fn_diff_devnull "$at_stderr" || at_failed=:
30021 echo >>"$at_stdout"; $as_echo "separator
30022 separator
30023 directory/
30024 directory/file1
30025 directory/file2
30026 " | \
30027   $at_diff - "$at_stdout" || at_failed=:
30028 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30029 $at_failed && at_fn_log_failure
30030 $at_traceon; }
30031
30032               { set +x
30033 $as_echo "$at_srcdir/update.at:31:
30034 mkdir ustar
30035 (cd ustar
30036 TEST_TAR_FORMAT=ustar
30037 export TEST_TAR_FORMAT
30038 TAR_OPTIONS=\"-H ustar\"
30039 export TAR_OPTIONS
30040 rm -rf *
30041
30042
30043 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30044
30045 mkdir directory
30046 genfile --length 10240 --pattern zeros --file directory/file1
30047 genfile --length 10240 --pattern default --file directory/file2
30048
30049 tar cf archive directory || exit 1
30050 echo separator
30051 tar uf archive directory || exit 1
30052 echo separator
30053 tar tf archive | sort || exit 1
30054 )"
30055 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
30056 ( $at_check_trace;
30057 mkdir ustar
30058 (cd ustar
30059 TEST_TAR_FORMAT=ustar
30060 export TEST_TAR_FORMAT
30061 TAR_OPTIONS="-H ustar"
30062 export TAR_OPTIONS
30063 rm -rf *
30064
30065
30066 test -z "`sort < /dev/null 2>&1`" || exit 77
30067
30068 mkdir directory
30069 genfile --length 10240 --pattern zeros --file directory/file1
30070 genfile --length 10240 --pattern default --file directory/file2
30071
30072 tar cf archive directory || exit 1
30073 echo separator
30074 tar uf archive directory || exit 1
30075 echo separator
30076 tar tf archive | sort || exit 1
30077 )
30078 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30079 at_status=$? at_failed=false
30080 $at_check_filter
30081 at_fn_diff_devnull "$at_stderr" || at_failed=:
30082 echo >>"$at_stdout"; $as_echo "separator
30083 separator
30084 directory/
30085 directory/file1
30086 directory/file2
30087 " | \
30088   $at_diff - "$at_stdout" || at_failed=:
30089 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30090 $at_failed && at_fn_log_failure
30091 $at_traceon; }
30092
30093               { set +x
30094 $as_echo "$at_srcdir/update.at:31:
30095 mkdir posix
30096 (cd posix
30097 TEST_TAR_FORMAT=posix
30098 export TEST_TAR_FORMAT
30099 TAR_OPTIONS=\"-H posix\"
30100 export TAR_OPTIONS
30101 rm -rf *
30102
30103
30104 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30105
30106 mkdir directory
30107 genfile --length 10240 --pattern zeros --file directory/file1
30108 genfile --length 10240 --pattern default --file directory/file2
30109
30110 tar cf archive directory || exit 1
30111 echo separator
30112 tar uf archive directory || exit 1
30113 echo separator
30114 tar tf archive | sort || exit 1
30115 )"
30116 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
30117 ( $at_check_trace;
30118 mkdir posix
30119 (cd posix
30120 TEST_TAR_FORMAT=posix
30121 export TEST_TAR_FORMAT
30122 TAR_OPTIONS="-H posix"
30123 export TAR_OPTIONS
30124 rm -rf *
30125
30126
30127 test -z "`sort < /dev/null 2>&1`" || exit 77
30128
30129 mkdir directory
30130 genfile --length 10240 --pattern zeros --file directory/file1
30131 genfile --length 10240 --pattern default --file directory/file2
30132
30133 tar cf archive directory || exit 1
30134 echo separator
30135 tar uf archive directory || exit 1
30136 echo separator
30137 tar tf archive | sort || exit 1
30138 )
30139 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30140 at_status=$? at_failed=false
30141 $at_check_filter
30142 at_fn_diff_devnull "$at_stderr" || at_failed=:
30143 echo >>"$at_stdout"; $as_echo "separator
30144 separator
30145 directory/
30146 directory/file1
30147 directory/file2
30148 " | \
30149   $at_diff - "$at_stdout" || at_failed=:
30150 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30151 $at_failed && at_fn_log_failure
30152 $at_traceon; }
30153
30154               { set +x
30155 $as_echo "$at_srcdir/update.at:31:
30156 mkdir gnu
30157 (cd gnu
30158 TEST_TAR_FORMAT=gnu
30159 export TEST_TAR_FORMAT
30160 TAR_OPTIONS=\"-H gnu\"
30161 export TAR_OPTIONS
30162 rm -rf *
30163
30164
30165 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30166
30167 mkdir directory
30168 genfile --length 10240 --pattern zeros --file directory/file1
30169 genfile --length 10240 --pattern default --file directory/file2
30170
30171 tar cf archive directory || exit 1
30172 echo separator
30173 tar uf archive directory || exit 1
30174 echo separator
30175 tar tf archive | sort || exit 1
30176 )"
30177 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
30178 ( $at_check_trace;
30179 mkdir gnu
30180 (cd gnu
30181 TEST_TAR_FORMAT=gnu
30182 export TEST_TAR_FORMAT
30183 TAR_OPTIONS="-H gnu"
30184 export TAR_OPTIONS
30185 rm -rf *
30186
30187
30188 test -z "`sort < /dev/null 2>&1`" || exit 77
30189
30190 mkdir directory
30191 genfile --length 10240 --pattern zeros --file directory/file1
30192 genfile --length 10240 --pattern default --file directory/file2
30193
30194 tar cf archive directory || exit 1
30195 echo separator
30196 tar uf archive directory || exit 1
30197 echo separator
30198 tar tf archive | sort || exit 1
30199 )
30200 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30201 at_status=$? at_failed=false
30202 $at_check_filter
30203 at_fn_diff_devnull "$at_stderr" || at_failed=:
30204 echo >>"$at_stdout"; $as_echo "separator
30205 separator
30206 directory/
30207 directory/file1
30208 directory/file2
30209 " | \
30210   $at_diff - "$at_stdout" || at_failed=:
30211 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30212 $at_failed && at_fn_log_failure
30213 $at_traceon; }
30214
30215
30216
30217
30218   set +x
30219   $at_times_p && times >"$at_times_file"
30220 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30221 read at_status <"$at_status_file"
30222 #AT_STOP_132
30223 #AT_START_133
30224 at_fn_group_banner 133 'update01.at:29' \
30225   "update directories" "                             " 20
30226 at_xfail=no
30227       test -f $XFAILFILE && at_xfail=yes
30228 (
30229   $as_echo "133. $at_setup_line: testing $at_desc ..."
30230   $at_traceon
30231
30232
30233
30234
30235
30236   { set +x
30237 $as_echo "$at_srcdir/update01.at:32:
30238 mkdir v7
30239 (cd v7
30240 TEST_TAR_FORMAT=v7
30241 export TEST_TAR_FORMAT
30242 TAR_OPTIONS=\"-H v7\"
30243 export TAR_OPTIONS
30244 rm -rf *
30245
30246
30247 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30248
30249 mkdir a
30250 genfile --file a/b
30251
30252 tar cf arc a
30253
30254 echo \"separator\"
30255
30256 sleep 2
30257 genfile --file a/c
30258
30259 tar ufv arc a
30260 echo \"separator\"
30261 tar tf arc | sort || exit 1
30262 )"
30263 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30264 ( $at_check_trace;
30265 mkdir v7
30266 (cd v7
30267 TEST_TAR_FORMAT=v7
30268 export TEST_TAR_FORMAT
30269 TAR_OPTIONS="-H v7"
30270 export TAR_OPTIONS
30271 rm -rf *
30272
30273
30274 test -z "`sort < /dev/null 2>&1`" || exit 77
30275
30276 mkdir a
30277 genfile --file a/b
30278
30279 tar cf arc a
30280
30281 echo "separator"
30282
30283 sleep 2
30284 genfile --file a/c
30285
30286 tar ufv arc a
30287 echo "separator"
30288 tar tf arc | sort || exit 1
30289 )
30290 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30291 at_status=$? at_failed=false
30292 $at_check_filter
30293 at_fn_diff_devnull "$at_stderr" || at_failed=:
30294 echo >>"$at_stdout"; $as_echo "separator
30295 a/c
30296 separator
30297 a/
30298 a/b
30299 a/c
30300 " | \
30301   $at_diff - "$at_stdout" || at_failed=:
30302 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30303 $at_failed && at_fn_log_failure
30304 $at_traceon; }
30305
30306               { set +x
30307 $as_echo "$at_srcdir/update01.at:32:
30308 mkdir oldgnu
30309 (cd oldgnu
30310 TEST_TAR_FORMAT=oldgnu
30311 export TEST_TAR_FORMAT
30312 TAR_OPTIONS=\"-H oldgnu\"
30313 export TAR_OPTIONS
30314 rm -rf *
30315
30316
30317 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30318
30319 mkdir a
30320 genfile --file a/b
30321
30322 tar cf arc a
30323
30324 echo \"separator\"
30325
30326 sleep 2
30327 genfile --file a/c
30328
30329 tar ufv arc a
30330 echo \"separator\"
30331 tar tf arc | sort || exit 1
30332 )"
30333 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30334 ( $at_check_trace;
30335 mkdir oldgnu
30336 (cd oldgnu
30337 TEST_TAR_FORMAT=oldgnu
30338 export TEST_TAR_FORMAT
30339 TAR_OPTIONS="-H oldgnu"
30340 export TAR_OPTIONS
30341 rm -rf *
30342
30343
30344 test -z "`sort < /dev/null 2>&1`" || exit 77
30345
30346 mkdir a
30347 genfile --file a/b
30348
30349 tar cf arc a
30350
30351 echo "separator"
30352
30353 sleep 2
30354 genfile --file a/c
30355
30356 tar ufv arc a
30357 echo "separator"
30358 tar tf arc | sort || exit 1
30359 )
30360 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30361 at_status=$? at_failed=false
30362 $at_check_filter
30363 at_fn_diff_devnull "$at_stderr" || at_failed=:
30364 echo >>"$at_stdout"; $as_echo "separator
30365 a/c
30366 separator
30367 a/
30368 a/b
30369 a/c
30370 " | \
30371   $at_diff - "$at_stdout" || at_failed=:
30372 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30373 $at_failed && at_fn_log_failure
30374 $at_traceon; }
30375
30376               { set +x
30377 $as_echo "$at_srcdir/update01.at:32:
30378 mkdir ustar
30379 (cd ustar
30380 TEST_TAR_FORMAT=ustar
30381 export TEST_TAR_FORMAT
30382 TAR_OPTIONS=\"-H ustar\"
30383 export TAR_OPTIONS
30384 rm -rf *
30385
30386
30387 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30388
30389 mkdir a
30390 genfile --file a/b
30391
30392 tar cf arc a
30393
30394 echo \"separator\"
30395
30396 sleep 2
30397 genfile --file a/c
30398
30399 tar ufv arc a
30400 echo \"separator\"
30401 tar tf arc | sort || exit 1
30402 )"
30403 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30404 ( $at_check_trace;
30405 mkdir ustar
30406 (cd ustar
30407 TEST_TAR_FORMAT=ustar
30408 export TEST_TAR_FORMAT
30409 TAR_OPTIONS="-H ustar"
30410 export TAR_OPTIONS
30411 rm -rf *
30412
30413
30414 test -z "`sort < /dev/null 2>&1`" || exit 77
30415
30416 mkdir a
30417 genfile --file a/b
30418
30419 tar cf arc a
30420
30421 echo "separator"
30422
30423 sleep 2
30424 genfile --file a/c
30425
30426 tar ufv arc a
30427 echo "separator"
30428 tar tf arc | sort || exit 1
30429 )
30430 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30431 at_status=$? at_failed=false
30432 $at_check_filter
30433 at_fn_diff_devnull "$at_stderr" || at_failed=:
30434 echo >>"$at_stdout"; $as_echo "separator
30435 a/c
30436 separator
30437 a/
30438 a/b
30439 a/c
30440 " | \
30441   $at_diff - "$at_stdout" || at_failed=:
30442 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30443 $at_failed && at_fn_log_failure
30444 $at_traceon; }
30445
30446               { set +x
30447 $as_echo "$at_srcdir/update01.at:32:
30448 mkdir posix
30449 (cd posix
30450 TEST_TAR_FORMAT=posix
30451 export TEST_TAR_FORMAT
30452 TAR_OPTIONS=\"-H posix\"
30453 export TAR_OPTIONS
30454 rm -rf *
30455
30456
30457 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30458
30459 mkdir a
30460 genfile --file a/b
30461
30462 tar cf arc a
30463
30464 echo \"separator\"
30465
30466 sleep 2
30467 genfile --file a/c
30468
30469 tar ufv arc a
30470 echo \"separator\"
30471 tar tf arc | sort || exit 1
30472 )"
30473 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30474 ( $at_check_trace;
30475 mkdir posix
30476 (cd posix
30477 TEST_TAR_FORMAT=posix
30478 export TEST_TAR_FORMAT
30479 TAR_OPTIONS="-H posix"
30480 export TAR_OPTIONS
30481 rm -rf *
30482
30483
30484 test -z "`sort < /dev/null 2>&1`" || exit 77
30485
30486 mkdir a
30487 genfile --file a/b
30488
30489 tar cf arc a
30490
30491 echo "separator"
30492
30493 sleep 2
30494 genfile --file a/c
30495
30496 tar ufv arc a
30497 echo "separator"
30498 tar tf arc | sort || exit 1
30499 )
30500 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30501 at_status=$? at_failed=false
30502 $at_check_filter
30503 at_fn_diff_devnull "$at_stderr" || at_failed=:
30504 echo >>"$at_stdout"; $as_echo "separator
30505 a/c
30506 separator
30507 a/
30508 a/b
30509 a/c
30510 " | \
30511   $at_diff - "$at_stdout" || at_failed=:
30512 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30513 $at_failed && at_fn_log_failure
30514 $at_traceon; }
30515
30516               { set +x
30517 $as_echo "$at_srcdir/update01.at:32:
30518 mkdir gnu
30519 (cd gnu
30520 TEST_TAR_FORMAT=gnu
30521 export TEST_TAR_FORMAT
30522 TAR_OPTIONS=\"-H gnu\"
30523 export TAR_OPTIONS
30524 rm -rf *
30525
30526
30527 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30528
30529 mkdir a
30530 genfile --file a/b
30531
30532 tar cf arc a
30533
30534 echo \"separator\"
30535
30536 sleep 2
30537 genfile --file a/c
30538
30539 tar ufv arc a
30540 echo \"separator\"
30541 tar tf arc | sort || exit 1
30542 )"
30543 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30544 ( $at_check_trace;
30545 mkdir gnu
30546 (cd gnu
30547 TEST_TAR_FORMAT=gnu
30548 export TEST_TAR_FORMAT
30549 TAR_OPTIONS="-H gnu"
30550 export TAR_OPTIONS
30551 rm -rf *
30552
30553
30554 test -z "`sort < /dev/null 2>&1`" || exit 77
30555
30556 mkdir a
30557 genfile --file a/b
30558
30559 tar cf arc a
30560
30561 echo "separator"
30562
30563 sleep 2
30564 genfile --file a/c
30565
30566 tar ufv arc a
30567 echo "separator"
30568 tar tf arc | sort || exit 1
30569 )
30570 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30571 at_status=$? at_failed=false
30572 $at_check_filter
30573 at_fn_diff_devnull "$at_stderr" || at_failed=:
30574 echo >>"$at_stdout"; $as_echo "separator
30575 a/c
30576 separator
30577 a/
30578 a/b
30579 a/c
30580 " | \
30581   $at_diff - "$at_stdout" || at_failed=:
30582 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30583 $at_failed && at_fn_log_failure
30584 $at_traceon; }
30585
30586
30587
30588
30589   set +x
30590   $at_times_p && times >"$at_times_file"
30591 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30592 read at_status <"$at_status_file"
30593 #AT_STOP_133
30594 #AT_START_134
30595 at_fn_group_banner 134 'update02.at:26' \
30596   "update changed files" "                           " 20
30597 at_xfail=no
30598       test -f $XFAILFILE && at_xfail=yes
30599 (
30600   $as_echo "134. $at_setup_line: testing $at_desc ..."
30601   $at_traceon
30602
30603
30604
30605
30606
30607   { set +x
30608 $as_echo "$at_srcdir/update02.at:29:
30609 mkdir v7
30610 (cd v7
30611 TEST_TAR_FORMAT=v7
30612 export TEST_TAR_FORMAT
30613 TAR_OPTIONS=\"-H v7\"
30614 export TAR_OPTIONS
30615 rm -rf *
30616
30617
30618 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30619
30620 mkdir a
30621 genfile --file a/b
30622
30623 tar cf arc a
30624
30625 echo \"separator\"
30626
30627 sleep 2
30628 touch a/b
30629
30630 tar ufv arc a
30631 echo \"separator\"
30632 tar tf arc | sort || exit 1
30633 )"
30634 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
30635 ( $at_check_trace;
30636 mkdir v7
30637 (cd v7
30638 TEST_TAR_FORMAT=v7
30639 export TEST_TAR_FORMAT
30640 TAR_OPTIONS="-H v7"
30641 export TAR_OPTIONS
30642 rm -rf *
30643
30644
30645 test -z "`sort < /dev/null 2>&1`" || exit 77
30646
30647 mkdir a
30648 genfile --file a/b
30649
30650 tar cf arc a
30651
30652 echo "separator"
30653
30654 sleep 2
30655 touch a/b
30656
30657 tar ufv arc a
30658 echo "separator"
30659 tar tf arc | sort || exit 1
30660 )
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 "separator
30666 a/b
30667 separator
30668 a/
30669 a/b
30670 a/b
30671 " | \
30672   $at_diff - "$at_stdout" || at_failed=:
30673 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
30674 $at_failed && at_fn_log_failure
30675 $at_traceon; }
30676
30677               { set +x
30678 $as_echo "$at_srcdir/update02.at:29:
30679 mkdir oldgnu
30680 (cd oldgnu
30681 TEST_TAR_FORMAT=oldgnu
30682 export TEST_TAR_FORMAT
30683 TAR_OPTIONS=\"-H oldgnu\"
30684 export TAR_OPTIONS
30685 rm -rf *
30686
30687
30688 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30689
30690 mkdir a
30691 genfile --file a/b
30692
30693 tar cf arc a
30694
30695 echo \"separator\"
30696
30697 sleep 2
30698 touch a/b
30699
30700 tar ufv arc a
30701 echo \"separator\"
30702 tar tf arc | sort || exit 1
30703 )"
30704 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
30705 ( $at_check_trace;
30706 mkdir oldgnu
30707 (cd oldgnu
30708 TEST_TAR_FORMAT=oldgnu
30709 export TEST_TAR_FORMAT
30710 TAR_OPTIONS="-H oldgnu"
30711 export TAR_OPTIONS
30712 rm -rf *
30713
30714
30715 test -z "`sort < /dev/null 2>&1`" || exit 77
30716
30717 mkdir a
30718 genfile --file a/b
30719
30720 tar cf arc a
30721
30722 echo "separator"
30723
30724 sleep 2
30725 touch a/b
30726
30727 tar ufv arc a
30728 echo "separator"
30729 tar tf arc | sort || exit 1
30730 )
30731 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30732 at_status=$? at_failed=false
30733 $at_check_filter
30734 at_fn_diff_devnull "$at_stderr" || at_failed=:
30735 echo >>"$at_stdout"; $as_echo "separator
30736 a/b
30737 separator
30738 a/
30739 a/b
30740 a/b
30741 " | \
30742   $at_diff - "$at_stdout" || at_failed=:
30743 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
30744 $at_failed && at_fn_log_failure
30745 $at_traceon; }
30746
30747               { set +x
30748 $as_echo "$at_srcdir/update02.at:29:
30749 mkdir ustar
30750 (cd ustar
30751 TEST_TAR_FORMAT=ustar
30752 export TEST_TAR_FORMAT
30753 TAR_OPTIONS=\"-H ustar\"
30754 export TAR_OPTIONS
30755 rm -rf *
30756
30757
30758 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30759
30760 mkdir a
30761 genfile --file a/b
30762
30763 tar cf arc a
30764
30765 echo \"separator\"
30766
30767 sleep 2
30768 touch a/b
30769
30770 tar ufv arc a
30771 echo \"separator\"
30772 tar tf arc | sort || exit 1
30773 )"
30774 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
30775 ( $at_check_trace;
30776 mkdir ustar
30777 (cd ustar
30778 TEST_TAR_FORMAT=ustar
30779 export TEST_TAR_FORMAT
30780 TAR_OPTIONS="-H ustar"
30781 export TAR_OPTIONS
30782 rm -rf *
30783
30784
30785 test -z "`sort < /dev/null 2>&1`" || exit 77
30786
30787 mkdir a
30788 genfile --file a/b
30789
30790 tar cf arc a
30791
30792 echo "separator"
30793
30794 sleep 2
30795 touch a/b
30796
30797 tar ufv arc a
30798 echo "separator"
30799 tar tf arc | sort || exit 1
30800 )
30801 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30802 at_status=$? at_failed=false
30803 $at_check_filter
30804 at_fn_diff_devnull "$at_stderr" || at_failed=:
30805 echo >>"$at_stdout"; $as_echo "separator
30806 a/b
30807 separator
30808 a/
30809 a/b
30810 a/b
30811 " | \
30812   $at_diff - "$at_stdout" || at_failed=:
30813 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
30814 $at_failed && at_fn_log_failure
30815 $at_traceon; }
30816
30817               { set +x
30818 $as_echo "$at_srcdir/update02.at:29:
30819 mkdir posix
30820 (cd posix
30821 TEST_TAR_FORMAT=posix
30822 export TEST_TAR_FORMAT
30823 TAR_OPTIONS=\"-H posix\"
30824 export TAR_OPTIONS
30825 rm -rf *
30826
30827
30828 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30829
30830 mkdir a
30831 genfile --file a/b
30832
30833 tar cf arc a
30834
30835 echo \"separator\"
30836
30837 sleep 2
30838 touch a/b
30839
30840 tar ufv arc a
30841 echo \"separator\"
30842 tar tf arc | sort || exit 1
30843 )"
30844 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
30845 ( $at_check_trace;
30846 mkdir posix
30847 (cd posix
30848 TEST_TAR_FORMAT=posix
30849 export TEST_TAR_FORMAT
30850 TAR_OPTIONS="-H posix"
30851 export TAR_OPTIONS
30852 rm -rf *
30853
30854
30855 test -z "`sort < /dev/null 2>&1`" || exit 77
30856
30857 mkdir a
30858 genfile --file a/b
30859
30860 tar cf arc a
30861
30862 echo "separator"
30863
30864 sleep 2
30865 touch a/b
30866
30867 tar ufv arc a
30868 echo "separator"
30869 tar tf arc | sort || exit 1
30870 )
30871 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30872 at_status=$? at_failed=false
30873 $at_check_filter
30874 at_fn_diff_devnull "$at_stderr" || at_failed=:
30875 echo >>"$at_stdout"; $as_echo "separator
30876 a/b
30877 separator
30878 a/
30879 a/b
30880 a/b
30881 " | \
30882   $at_diff - "$at_stdout" || at_failed=:
30883 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
30884 $at_failed && at_fn_log_failure
30885 $at_traceon; }
30886
30887               { set +x
30888 $as_echo "$at_srcdir/update02.at:29:
30889 mkdir gnu
30890 (cd gnu
30891 TEST_TAR_FORMAT=gnu
30892 export TEST_TAR_FORMAT
30893 TAR_OPTIONS=\"-H gnu\"
30894 export TAR_OPTIONS
30895 rm -rf *
30896
30897
30898 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30899
30900 mkdir a
30901 genfile --file a/b
30902
30903 tar cf arc a
30904
30905 echo \"separator\"
30906
30907 sleep 2
30908 touch a/b
30909
30910 tar ufv arc a
30911 echo \"separator\"
30912 tar tf arc | sort || exit 1
30913 )"
30914 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
30915 ( $at_check_trace;
30916 mkdir gnu
30917 (cd gnu
30918 TEST_TAR_FORMAT=gnu
30919 export TEST_TAR_FORMAT
30920 TAR_OPTIONS="-H gnu"
30921 export TAR_OPTIONS
30922 rm -rf *
30923
30924
30925 test -z "`sort < /dev/null 2>&1`" || exit 77
30926
30927 mkdir a
30928 genfile --file a/b
30929
30930 tar cf arc a
30931
30932 echo "separator"
30933
30934 sleep 2
30935 touch a/b
30936
30937 tar ufv arc a
30938 echo "separator"
30939 tar tf arc | sort || exit 1
30940 )
30941 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30942 at_status=$? at_failed=false
30943 $at_check_filter
30944 at_fn_diff_devnull "$at_stderr" || at_failed=:
30945 echo >>"$at_stdout"; $as_echo "separator
30946 a/b
30947 separator
30948 a/
30949 a/b
30950 a/b
30951 " | \
30952   $at_diff - "$at_stdout" || at_failed=:
30953 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
30954 $at_failed && at_fn_log_failure
30955 $at_traceon; }
30956
30957
30958
30959
30960   set +x
30961   $at_times_p && times >"$at_times_file"
30962 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30963 read at_status <"$at_status_file"
30964 #AT_STOP_134
30965 #AT_START_135
30966 at_fn_group_banner 135 'verify.at:25' \
30967   "verify" "                                         " 21
30968 at_xfail=no
30969       test -f $XFAILFILE && at_xfail=yes
30970 (
30971   $as_echo "135. $at_setup_line: testing $at_desc ..."
30972   $at_traceon
30973
30974
30975
30976
30977
30978   { set +x
30979 $as_echo "$at_srcdir/verify.at:28:
30980 mkdir v7
30981 (cd v7
30982 TEST_TAR_FORMAT=v7
30983 export TEST_TAR_FORMAT
30984 TAR_OPTIONS=\"-H v7\"
30985 export TAR_OPTIONS
30986 rm -rf *
30987
30988 touch foo
30989 tar -cvf archive.tar --verify foo
30990 )"
30991 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
30992 ( $at_check_trace;
30993 mkdir v7
30994 (cd v7
30995 TEST_TAR_FORMAT=v7
30996 export TEST_TAR_FORMAT
30997 TAR_OPTIONS="-H v7"
30998 export TAR_OPTIONS
30999 rm -rf *
31000
31001 touch foo
31002 tar -cvf archive.tar --verify foo
31003 )
31004 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31005 at_status=$? at_failed=false
31006 $at_check_filter
31007 at_fn_diff_devnull "$at_stderr" || at_failed=:
31008 echo >>"$at_stdout"; $as_echo "foo
31009 Verify foo
31010 " | \
31011   $at_diff - "$at_stdout" || at_failed=:
31012 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31013 $at_failed && at_fn_log_failure
31014 $at_traceon; }
31015
31016               { set +x
31017 $as_echo "$at_srcdir/verify.at:28:
31018 mkdir oldgnu
31019 (cd oldgnu
31020 TEST_TAR_FORMAT=oldgnu
31021 export TEST_TAR_FORMAT
31022 TAR_OPTIONS=\"-H oldgnu\"
31023 export TAR_OPTIONS
31024 rm -rf *
31025
31026 touch foo
31027 tar -cvf archive.tar --verify foo
31028 )"
31029 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31030 ( $at_check_trace;
31031 mkdir oldgnu
31032 (cd oldgnu
31033 TEST_TAR_FORMAT=oldgnu
31034 export TEST_TAR_FORMAT
31035 TAR_OPTIONS="-H oldgnu"
31036 export TAR_OPTIONS
31037 rm -rf *
31038
31039 touch foo
31040 tar -cvf archive.tar --verify foo
31041 )
31042 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31043 at_status=$? at_failed=false
31044 $at_check_filter
31045 at_fn_diff_devnull "$at_stderr" || at_failed=:
31046 echo >>"$at_stdout"; $as_echo "foo
31047 Verify foo
31048 " | \
31049   $at_diff - "$at_stdout" || at_failed=:
31050 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31051 $at_failed && at_fn_log_failure
31052 $at_traceon; }
31053
31054               { set +x
31055 $as_echo "$at_srcdir/verify.at:28:
31056 mkdir ustar
31057 (cd ustar
31058 TEST_TAR_FORMAT=ustar
31059 export TEST_TAR_FORMAT
31060 TAR_OPTIONS=\"-H ustar\"
31061 export TAR_OPTIONS
31062 rm -rf *
31063
31064 touch foo
31065 tar -cvf archive.tar --verify foo
31066 )"
31067 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31068 ( $at_check_trace;
31069 mkdir ustar
31070 (cd ustar
31071 TEST_TAR_FORMAT=ustar
31072 export TEST_TAR_FORMAT
31073 TAR_OPTIONS="-H ustar"
31074 export TAR_OPTIONS
31075 rm -rf *
31076
31077 touch foo
31078 tar -cvf archive.tar --verify foo
31079 )
31080 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31081 at_status=$? at_failed=false
31082 $at_check_filter
31083 at_fn_diff_devnull "$at_stderr" || at_failed=:
31084 echo >>"$at_stdout"; $as_echo "foo
31085 Verify foo
31086 " | \
31087   $at_diff - "$at_stdout" || at_failed=:
31088 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31089 $at_failed && at_fn_log_failure
31090 $at_traceon; }
31091
31092               { set +x
31093 $as_echo "$at_srcdir/verify.at:28:
31094 mkdir posix
31095 (cd posix
31096 TEST_TAR_FORMAT=posix
31097 export TEST_TAR_FORMAT
31098 TAR_OPTIONS=\"-H posix\"
31099 export TAR_OPTIONS
31100 rm -rf *
31101
31102 touch foo
31103 tar -cvf archive.tar --verify foo
31104 )"
31105 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31106 ( $at_check_trace;
31107 mkdir posix
31108 (cd posix
31109 TEST_TAR_FORMAT=posix
31110 export TEST_TAR_FORMAT
31111 TAR_OPTIONS="-H posix"
31112 export TAR_OPTIONS
31113 rm -rf *
31114
31115 touch foo
31116 tar -cvf archive.tar --verify foo
31117 )
31118 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31119 at_status=$? at_failed=false
31120 $at_check_filter
31121 at_fn_diff_devnull "$at_stderr" || at_failed=:
31122 echo >>"$at_stdout"; $as_echo "foo
31123 Verify foo
31124 " | \
31125   $at_diff - "$at_stdout" || at_failed=:
31126 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31127 $at_failed && at_fn_log_failure
31128 $at_traceon; }
31129
31130               { set +x
31131 $as_echo "$at_srcdir/verify.at:28:
31132 mkdir gnu
31133 (cd gnu
31134 TEST_TAR_FORMAT=gnu
31135 export TEST_TAR_FORMAT
31136 TAR_OPTIONS=\"-H gnu\"
31137 export TAR_OPTIONS
31138 rm -rf *
31139
31140 touch foo
31141 tar -cvf archive.tar --verify foo
31142 )"
31143 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31144 ( $at_check_trace;
31145 mkdir gnu
31146 (cd gnu
31147 TEST_TAR_FORMAT=gnu
31148 export TEST_TAR_FORMAT
31149 TAR_OPTIONS="-H gnu"
31150 export TAR_OPTIONS
31151 rm -rf *
31152
31153 touch foo
31154 tar -cvf archive.tar --verify foo
31155 )
31156 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31157 at_status=$? at_failed=false
31158 $at_check_filter
31159 at_fn_diff_devnull "$at_stderr" || at_failed=:
31160 echo >>"$at_stdout"; $as_echo "foo
31161 Verify foo
31162 " | \
31163   $at_diff - "$at_stdout" || at_failed=:
31164 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31165 $at_failed && at_fn_log_failure
31166 $at_traceon; }
31167
31168
31169
31170
31171   set +x
31172   $at_times_p && times >"$at_times_file"
31173 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31174 read at_status <"$at_status_file"
31175 #AT_STOP_135
31176 #AT_START_136
31177 at_fn_group_banner 136 'volume.at:23' \
31178   "volume" "                                         " 22
31179 at_xfail=no
31180       test -f $XFAILFILE && at_xfail=yes
31181 (
31182   $as_echo "136. $at_setup_line: testing $at_desc ..."
31183   $at_traceon
31184
31185
31186
31187
31188
31189   { set +x
31190 $as_echo "$at_srcdir/volume.at:26:
31191 mkdir gnu
31192 (cd gnu
31193 TEST_TAR_FORMAT=gnu
31194 export TEST_TAR_FORMAT
31195 TAR_OPTIONS=\"-H gnu\"
31196 export TAR_OPTIONS
31197 rm -rf *
31198
31199 tar -cf archive -V label -T /dev/null || exit 1
31200
31201 tar xfV archive label || exit 1
31202 tar xfV archive 'la?el' || exit 1
31203 tar xfV archive 'l*l' || exit 1
31204
31205 echo 1>&2 -----
31206 tar xfV archive lab
31207 test \$? = 2 || exit 1
31208 echo 1>&2 -----
31209 tar xfV archive bel
31210 test \$? = 2 || exit 1
31211 echo 1>&2 -----
31212 tar xfV archive babel
31213 test \$? = 2
31214 )"
31215 at_fn_check_prepare_notrace 'an embedded newline' "volume.at:26"
31216 ( $at_check_trace;
31217 mkdir gnu
31218 (cd gnu
31219 TEST_TAR_FORMAT=gnu
31220 export TEST_TAR_FORMAT
31221 TAR_OPTIONS="-H gnu"
31222 export TAR_OPTIONS
31223 rm -rf *
31224
31225 tar -cf archive -V label -T /dev/null || exit 1
31226
31227 tar xfV archive label || exit 1
31228 tar xfV archive 'la?el' || exit 1
31229 tar xfV archive 'l*l' || exit 1
31230
31231 echo 1>&2 -----
31232 tar xfV archive lab
31233 test $? = 2 || exit 1
31234 echo 1>&2 -----
31235 tar xfV archive bel
31236 test $? = 2 || exit 1
31237 echo 1>&2 -----
31238 tar xfV archive babel
31239 test $? = 2
31240 )
31241 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31242 at_status=$? at_failed=false
31243 $at_check_filter
31244 echo >>"$at_stderr"; $as_echo "-----
31245 tar: Volume 'label' does not match 'lab'
31246 tar: Error is not recoverable: exiting now
31247 -----
31248 tar: Volume 'label' does not match 'bel'
31249 tar: Error is not recoverable: exiting now
31250 -----
31251 tar: Volume 'label' does not match 'babel'
31252 tar: Error is not recoverable: exiting now
31253 " | \
31254   $at_diff - "$at_stderr" || at_failed=:
31255 at_fn_diff_devnull "$at_stdout" || at_failed=:
31256 at_fn_check_status 0 $at_status "$at_srcdir/volume.at:26"
31257 $at_failed && at_fn_log_failure
31258 $at_traceon; }
31259
31260               { set +x
31261 $as_echo "$at_srcdir/volume.at:26:
31262 mkdir oldgnu
31263 (cd oldgnu
31264 TEST_TAR_FORMAT=oldgnu
31265 export TEST_TAR_FORMAT
31266 TAR_OPTIONS=\"-H oldgnu\"
31267 export TAR_OPTIONS
31268 rm -rf *
31269
31270 tar -cf archive -V label -T /dev/null || exit 1
31271
31272 tar xfV archive label || exit 1
31273 tar xfV archive 'la?el' || exit 1
31274 tar xfV archive 'l*l' || exit 1
31275
31276 echo 1>&2 -----
31277 tar xfV archive lab
31278 test \$? = 2 || exit 1
31279 echo 1>&2 -----
31280 tar xfV archive bel
31281 test \$? = 2 || exit 1
31282 echo 1>&2 -----
31283 tar xfV archive babel
31284 test \$? = 2
31285 )"
31286 at_fn_check_prepare_notrace 'an embedded newline' "volume.at:26"
31287 ( $at_check_trace;
31288 mkdir oldgnu
31289 (cd oldgnu
31290 TEST_TAR_FORMAT=oldgnu
31291 export TEST_TAR_FORMAT
31292 TAR_OPTIONS="-H oldgnu"
31293 export TAR_OPTIONS
31294 rm -rf *
31295
31296 tar -cf archive -V label -T /dev/null || exit 1
31297
31298 tar xfV archive label || exit 1
31299 tar xfV archive 'la?el' || exit 1
31300 tar xfV archive 'l*l' || exit 1
31301
31302 echo 1>&2 -----
31303 tar xfV archive lab
31304 test $? = 2 || exit 1
31305 echo 1>&2 -----
31306 tar xfV archive bel
31307 test $? = 2 || exit 1
31308 echo 1>&2 -----
31309 tar xfV archive babel
31310 test $? = 2
31311 )
31312 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31313 at_status=$? at_failed=false
31314 $at_check_filter
31315 echo >>"$at_stderr"; $as_echo "-----
31316 tar: Volume 'label' does not match 'lab'
31317 tar: Error is not recoverable: exiting now
31318 -----
31319 tar: Volume 'label' does not match 'bel'
31320 tar: Error is not recoverable: exiting now
31321 -----
31322 tar: Volume 'label' does not match 'babel'
31323 tar: Error is not recoverable: exiting now
31324 " | \
31325   $at_diff - "$at_stderr" || at_failed=:
31326 at_fn_diff_devnull "$at_stdout" || at_failed=:
31327 at_fn_check_status 0 $at_status "$at_srcdir/volume.at:26"
31328 $at_failed && at_fn_log_failure
31329 $at_traceon; }
31330
31331
31332
31333
31334   set +x
31335   $at_times_p && times >"$at_times_file"
31336 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31337 read at_status <"$at_status_file"
31338 #AT_STOP_136
31339 #AT_START_137
31340 at_fn_group_banner 137 'volsize.at:29' \
31341   "volume header size" "                             " 22
31342 at_xfail=no
31343       test -f $XFAILFILE && at_xfail=yes
31344 (
31345   $as_echo "137. $at_setup_line: testing $at_desc ..."
31346   $at_traceon
31347
31348
31349
31350
31351
31352   { set +x
31353 $as_echo "$at_srcdir/volsize.at:32:
31354 mkdir v7
31355 (cd v7
31356 TEST_TAR_FORMAT=v7
31357 export TEST_TAR_FORMAT
31358 TAR_OPTIONS=\"-H v7\"
31359 export TAR_OPTIONS
31360 rm -rf *
31361
31362
31363 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31364
31365
31366 test -z \"\$TEST_DATA_DIR\" && exit 77
31367 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
31368
31369 echo Short Listing
31370 tar tf \$TEST_DATA_DIR/abc.tar
31371 echo Verbose Listing
31372 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
31373 echo Extracted directory
31374 tar xf \$TEST_DATA_DIR/abc.tar
31375 find abc|sort
31376 )"
31377 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
31378 ( $at_check_trace;
31379 mkdir v7
31380 (cd v7
31381 TEST_TAR_FORMAT=v7
31382 export TEST_TAR_FORMAT
31383 TAR_OPTIONS="-H v7"
31384 export TAR_OPTIONS
31385 rm -rf *
31386
31387
31388 test -z "`sort < /dev/null 2>&1`" || exit 77
31389
31390
31391 test -z "$TEST_DATA_DIR" && exit 77
31392 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
31393
31394 echo Short Listing
31395 tar tf $TEST_DATA_DIR/abc.tar
31396 echo Verbose Listing
31397 tar --utc -tvf $TEST_DATA_DIR/abc.tar
31398 echo Extracted directory
31399 tar xf $TEST_DATA_DIR/abc.tar
31400 find abc|sort
31401 )
31402 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31403 at_status=$? at_failed=false
31404 $at_check_filter
31405 at_fn_diff_devnull "$at_stderr" || at_failed=:
31406 echo >>"$at_stdout"; $as_echo "Short Listing
31407 abc/not-a-file.gif
31408 abc/CCC
31409 Verbose Listing
31410 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
31411 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
31412 Extracted directory
31413 abc
31414 abc/CCC
31415 " | \
31416   $at_diff - "$at_stdout" || at_failed=:
31417 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
31418 $at_failed && at_fn_log_failure
31419 $at_traceon; }
31420
31421               { set +x
31422 $as_echo "$at_srcdir/volsize.at:32:
31423 mkdir oldgnu
31424 (cd oldgnu
31425 TEST_TAR_FORMAT=oldgnu
31426 export TEST_TAR_FORMAT
31427 TAR_OPTIONS=\"-H oldgnu\"
31428 export TAR_OPTIONS
31429 rm -rf *
31430
31431
31432 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31433
31434
31435 test -z \"\$TEST_DATA_DIR\" && exit 77
31436 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
31437
31438 echo Short Listing
31439 tar tf \$TEST_DATA_DIR/abc.tar
31440 echo Verbose Listing
31441 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
31442 echo Extracted directory
31443 tar xf \$TEST_DATA_DIR/abc.tar
31444 find abc|sort
31445 )"
31446 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
31447 ( $at_check_trace;
31448 mkdir oldgnu
31449 (cd oldgnu
31450 TEST_TAR_FORMAT=oldgnu
31451 export TEST_TAR_FORMAT
31452 TAR_OPTIONS="-H oldgnu"
31453 export TAR_OPTIONS
31454 rm -rf *
31455
31456
31457 test -z "`sort < /dev/null 2>&1`" || exit 77
31458
31459
31460 test -z "$TEST_DATA_DIR" && exit 77
31461 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
31462
31463 echo Short Listing
31464 tar tf $TEST_DATA_DIR/abc.tar
31465 echo Verbose Listing
31466 tar --utc -tvf $TEST_DATA_DIR/abc.tar
31467 echo Extracted directory
31468 tar xf $TEST_DATA_DIR/abc.tar
31469 find abc|sort
31470 )
31471 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31472 at_status=$? at_failed=false
31473 $at_check_filter
31474 at_fn_diff_devnull "$at_stderr" || at_failed=:
31475 echo >>"$at_stdout"; $as_echo "Short Listing
31476 abc/not-a-file.gif
31477 abc/CCC
31478 Verbose Listing
31479 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
31480 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
31481 Extracted directory
31482 abc
31483 abc/CCC
31484 " | \
31485   $at_diff - "$at_stdout" || at_failed=:
31486 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
31487 $at_failed && at_fn_log_failure
31488 $at_traceon; }
31489
31490               { set +x
31491 $as_echo "$at_srcdir/volsize.at:32:
31492 mkdir ustar
31493 (cd ustar
31494 TEST_TAR_FORMAT=ustar
31495 export TEST_TAR_FORMAT
31496 TAR_OPTIONS=\"-H ustar\"
31497 export TAR_OPTIONS
31498 rm -rf *
31499
31500
31501 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31502
31503
31504 test -z \"\$TEST_DATA_DIR\" && exit 77
31505 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
31506
31507 echo Short Listing
31508 tar tf \$TEST_DATA_DIR/abc.tar
31509 echo Verbose Listing
31510 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
31511 echo Extracted directory
31512 tar xf \$TEST_DATA_DIR/abc.tar
31513 find abc|sort
31514 )"
31515 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
31516 ( $at_check_trace;
31517 mkdir ustar
31518 (cd ustar
31519 TEST_TAR_FORMAT=ustar
31520 export TEST_TAR_FORMAT
31521 TAR_OPTIONS="-H ustar"
31522 export TAR_OPTIONS
31523 rm -rf *
31524
31525
31526 test -z "`sort < /dev/null 2>&1`" || exit 77
31527
31528
31529 test -z "$TEST_DATA_DIR" && exit 77
31530 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
31531
31532 echo Short Listing
31533 tar tf $TEST_DATA_DIR/abc.tar
31534 echo Verbose Listing
31535 tar --utc -tvf $TEST_DATA_DIR/abc.tar
31536 echo Extracted directory
31537 tar xf $TEST_DATA_DIR/abc.tar
31538 find abc|sort
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 "Short Listing
31545 abc/not-a-file.gif
31546 abc/CCC
31547 Verbose Listing
31548 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
31549 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
31550 Extracted directory
31551 abc
31552 abc/CCC
31553 " | \
31554   $at_diff - "$at_stdout" || at_failed=:
31555 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
31556 $at_failed && at_fn_log_failure
31557 $at_traceon; }
31558
31559               { set +x
31560 $as_echo "$at_srcdir/volsize.at:32:
31561 mkdir posix
31562 (cd posix
31563 TEST_TAR_FORMAT=posix
31564 export TEST_TAR_FORMAT
31565 TAR_OPTIONS=\"-H posix\"
31566 export TAR_OPTIONS
31567 rm -rf *
31568
31569
31570 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31571
31572
31573 test -z \"\$TEST_DATA_DIR\" && exit 77
31574 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
31575
31576 echo Short Listing
31577 tar tf \$TEST_DATA_DIR/abc.tar
31578 echo Verbose Listing
31579 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
31580 echo Extracted directory
31581 tar xf \$TEST_DATA_DIR/abc.tar
31582 find abc|sort
31583 )"
31584 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
31585 ( $at_check_trace;
31586 mkdir posix
31587 (cd posix
31588 TEST_TAR_FORMAT=posix
31589 export TEST_TAR_FORMAT
31590 TAR_OPTIONS="-H posix"
31591 export TAR_OPTIONS
31592 rm -rf *
31593
31594
31595 test -z "`sort < /dev/null 2>&1`" || exit 77
31596
31597
31598 test -z "$TEST_DATA_DIR" && exit 77
31599 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
31600
31601 echo Short Listing
31602 tar tf $TEST_DATA_DIR/abc.tar
31603 echo Verbose Listing
31604 tar --utc -tvf $TEST_DATA_DIR/abc.tar
31605 echo Extracted directory
31606 tar xf $TEST_DATA_DIR/abc.tar
31607 find abc|sort
31608 )
31609 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31610 at_status=$? at_failed=false
31611 $at_check_filter
31612 at_fn_diff_devnull "$at_stderr" || at_failed=:
31613 echo >>"$at_stdout"; $as_echo "Short Listing
31614 abc/not-a-file.gif
31615 abc/CCC
31616 Verbose Listing
31617 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
31618 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
31619 Extracted directory
31620 abc
31621 abc/CCC
31622 " | \
31623   $at_diff - "$at_stdout" || at_failed=:
31624 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
31625 $at_failed && at_fn_log_failure
31626 $at_traceon; }
31627
31628               { set +x
31629 $as_echo "$at_srcdir/volsize.at:32:
31630 mkdir gnu
31631 (cd gnu
31632 TEST_TAR_FORMAT=gnu
31633 export TEST_TAR_FORMAT
31634 TAR_OPTIONS=\"-H gnu\"
31635 export TAR_OPTIONS
31636 rm -rf *
31637
31638
31639 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31640
31641
31642 test -z \"\$TEST_DATA_DIR\" && exit 77
31643 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
31644
31645 echo Short Listing
31646 tar tf \$TEST_DATA_DIR/abc.tar
31647 echo Verbose Listing
31648 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
31649 echo Extracted directory
31650 tar xf \$TEST_DATA_DIR/abc.tar
31651 find abc|sort
31652 )"
31653 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
31654 ( $at_check_trace;
31655 mkdir gnu
31656 (cd gnu
31657 TEST_TAR_FORMAT=gnu
31658 export TEST_TAR_FORMAT
31659 TAR_OPTIONS="-H gnu"
31660 export TAR_OPTIONS
31661 rm -rf *
31662
31663
31664 test -z "`sort < /dev/null 2>&1`" || exit 77
31665
31666
31667 test -z "$TEST_DATA_DIR" && exit 77
31668 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
31669
31670 echo Short Listing
31671 tar tf $TEST_DATA_DIR/abc.tar
31672 echo Verbose Listing
31673 tar --utc -tvf $TEST_DATA_DIR/abc.tar
31674 echo Extracted directory
31675 tar xf $TEST_DATA_DIR/abc.tar
31676 find abc|sort
31677 )
31678 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31679 at_status=$? at_failed=false
31680 $at_check_filter
31681 at_fn_diff_devnull "$at_stderr" || at_failed=:
31682 echo >>"$at_stdout"; $as_echo "Short Listing
31683 abc/not-a-file.gif
31684 abc/CCC
31685 Verbose Listing
31686 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
31687 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
31688 Extracted directory
31689 abc
31690 abc/CCC
31691 " | \
31692   $at_diff - "$at_stdout" || at_failed=:
31693 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
31694 $at_failed && at_fn_log_failure
31695 $at_traceon; }
31696
31697
31698
31699
31700   set +x
31701   $at_times_p && times >"$at_times_file"
31702 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31703 read at_status <"$at_status_file"
31704 #AT_STOP_137
31705 #AT_START_138
31706 at_fn_group_banner 138 'comprec.at:21' \
31707   "compressed format recognition" "                  " 23
31708 at_xfail=no
31709       test -f $XFAILFILE && at_xfail=yes
31710 (
31711   $as_echo "138. $at_setup_line: testing $at_desc ..."
31712   $at_traceon
31713
31714
31715
31716
31717
31718
31719   { set +x
31720 $as_echo "$at_srcdir/comprec.at:25:
31721 mkdir v7
31722 (cd v7
31723 TEST_TAR_FORMAT=v7
31724 export TEST_TAR_FORMAT
31725 TAR_OPTIONS=\"-H v7\"
31726 export TAR_OPTIONS
31727 rm -rf *
31728
31729
31730 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31731
31732 genfile --length 10240 --file file1
31733 echo \"separator\"
31734 tar cfz archive file1
31735 echo \"separator\"
31736 mv file1 orig
31737 tar xfv archive --warning=no-timestamp
31738 cmp orig file1
31739 )"
31740 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
31741 ( $at_check_trace;
31742 mkdir v7
31743 (cd v7
31744 TEST_TAR_FORMAT=v7
31745 export TEST_TAR_FORMAT
31746 TAR_OPTIONS="-H v7"
31747 export TAR_OPTIONS
31748 rm -rf *
31749
31750
31751 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31752
31753 genfile --length 10240 --file file1
31754 echo "separator"
31755 tar cfz archive file1
31756 echo "separator"
31757 mv file1 orig
31758 tar xfv archive --warning=no-timestamp
31759 cmp orig file1
31760 )
31761 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31762 at_status=$? at_failed=false
31763 $at_check_filter
31764 at_fn_diff_devnull "$at_stderr" || at_failed=:
31765 echo >>"$at_stdout"; $as_echo "separator
31766 separator
31767 file1
31768 " | \
31769   $at_diff - "$at_stdout" || at_failed=:
31770 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
31771 $at_failed && at_fn_log_failure
31772 $at_traceon; }
31773
31774               { set +x
31775 $as_echo "$at_srcdir/comprec.at:25:
31776 mkdir oldgnu
31777 (cd oldgnu
31778 TEST_TAR_FORMAT=oldgnu
31779 export TEST_TAR_FORMAT
31780 TAR_OPTIONS=\"-H oldgnu\"
31781 export TAR_OPTIONS
31782 rm -rf *
31783
31784
31785 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31786
31787 genfile --length 10240 --file file1
31788 echo \"separator\"
31789 tar cfz archive file1
31790 echo \"separator\"
31791 mv file1 orig
31792 tar xfv archive --warning=no-timestamp
31793 cmp orig file1
31794 )"
31795 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
31796 ( $at_check_trace;
31797 mkdir oldgnu
31798 (cd oldgnu
31799 TEST_TAR_FORMAT=oldgnu
31800 export TEST_TAR_FORMAT
31801 TAR_OPTIONS="-H oldgnu"
31802 export TAR_OPTIONS
31803 rm -rf *
31804
31805
31806 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31807
31808 genfile --length 10240 --file file1
31809 echo "separator"
31810 tar cfz archive file1
31811 echo "separator"
31812 mv file1 orig
31813 tar xfv archive --warning=no-timestamp
31814 cmp orig file1
31815 )
31816 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31817 at_status=$? at_failed=false
31818 $at_check_filter
31819 at_fn_diff_devnull "$at_stderr" || at_failed=:
31820 echo >>"$at_stdout"; $as_echo "separator
31821 separator
31822 file1
31823 " | \
31824   $at_diff - "$at_stdout" || at_failed=:
31825 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
31826 $at_failed && at_fn_log_failure
31827 $at_traceon; }
31828
31829               { set +x
31830 $as_echo "$at_srcdir/comprec.at:25:
31831 mkdir ustar
31832 (cd ustar
31833 TEST_TAR_FORMAT=ustar
31834 export TEST_TAR_FORMAT
31835 TAR_OPTIONS=\"-H ustar\"
31836 export TAR_OPTIONS
31837 rm -rf *
31838
31839
31840 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31841
31842 genfile --length 10240 --file file1
31843 echo \"separator\"
31844 tar cfz archive file1
31845 echo \"separator\"
31846 mv file1 orig
31847 tar xfv archive --warning=no-timestamp
31848 cmp orig file1
31849 )"
31850 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
31851 ( $at_check_trace;
31852 mkdir ustar
31853 (cd ustar
31854 TEST_TAR_FORMAT=ustar
31855 export TEST_TAR_FORMAT
31856 TAR_OPTIONS="-H ustar"
31857 export TAR_OPTIONS
31858 rm -rf *
31859
31860
31861 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31862
31863 genfile --length 10240 --file file1
31864 echo "separator"
31865 tar cfz archive file1
31866 echo "separator"
31867 mv file1 orig
31868 tar xfv archive --warning=no-timestamp
31869 cmp orig file1
31870 )
31871 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31872 at_status=$? at_failed=false
31873 $at_check_filter
31874 at_fn_diff_devnull "$at_stderr" || at_failed=:
31875 echo >>"$at_stdout"; $as_echo "separator
31876 separator
31877 file1
31878 " | \
31879   $at_diff - "$at_stdout" || at_failed=:
31880 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
31881 $at_failed && at_fn_log_failure
31882 $at_traceon; }
31883
31884               { set +x
31885 $as_echo "$at_srcdir/comprec.at:25:
31886 mkdir posix
31887 (cd posix
31888 TEST_TAR_FORMAT=posix
31889 export TEST_TAR_FORMAT
31890 TAR_OPTIONS=\"-H posix\"
31891 export TAR_OPTIONS
31892 rm -rf *
31893
31894
31895 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31896
31897 genfile --length 10240 --file file1
31898 echo \"separator\"
31899 tar cfz archive file1
31900 echo \"separator\"
31901 mv file1 orig
31902 tar xfv archive --warning=no-timestamp
31903 cmp orig file1
31904 )"
31905 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
31906 ( $at_check_trace;
31907 mkdir posix
31908 (cd posix
31909 TEST_TAR_FORMAT=posix
31910 export TEST_TAR_FORMAT
31911 TAR_OPTIONS="-H posix"
31912 export TAR_OPTIONS
31913 rm -rf *
31914
31915
31916 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31917
31918 genfile --length 10240 --file file1
31919 echo "separator"
31920 tar cfz archive file1
31921 echo "separator"
31922 mv file1 orig
31923 tar xfv archive --warning=no-timestamp
31924 cmp orig file1
31925 )
31926 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31927 at_status=$? at_failed=false
31928 $at_check_filter
31929 at_fn_diff_devnull "$at_stderr" || at_failed=:
31930 echo >>"$at_stdout"; $as_echo "separator
31931 separator
31932 file1
31933 " | \
31934   $at_diff - "$at_stdout" || at_failed=:
31935 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
31936 $at_failed && at_fn_log_failure
31937 $at_traceon; }
31938
31939               { set +x
31940 $as_echo "$at_srcdir/comprec.at:25:
31941 mkdir gnu
31942 (cd gnu
31943 TEST_TAR_FORMAT=gnu
31944 export TEST_TAR_FORMAT
31945 TAR_OPTIONS=\"-H gnu\"
31946 export TAR_OPTIONS
31947 rm -rf *
31948
31949
31950 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31951
31952 genfile --length 10240 --file file1
31953 echo \"separator\"
31954 tar cfz archive file1
31955 echo \"separator\"
31956 mv file1 orig
31957 tar xfv archive --warning=no-timestamp
31958 cmp orig file1
31959 )"
31960 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
31961 ( $at_check_trace;
31962 mkdir gnu
31963 (cd gnu
31964 TEST_TAR_FORMAT=gnu
31965 export TEST_TAR_FORMAT
31966 TAR_OPTIONS="-H gnu"
31967 export TAR_OPTIONS
31968 rm -rf *
31969
31970
31971 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
31972
31973 genfile --length 10240 --file file1
31974 echo "separator"
31975 tar cfz archive file1
31976 echo "separator"
31977 mv file1 orig
31978 tar xfv archive --warning=no-timestamp
31979 cmp orig file1
31980 )
31981 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31982 at_status=$? at_failed=false
31983 $at_check_filter
31984 at_fn_diff_devnull "$at_stderr" || at_failed=:
31985 echo >>"$at_stdout"; $as_echo "separator
31986 separator
31987 file1
31988 " | \
31989   $at_diff - "$at_stdout" || at_failed=:
31990 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
31991 $at_failed && at_fn_log_failure
31992 $at_traceon; }
31993
31994
31995
31996
31997   set +x
31998   $at_times_p && times >"$at_times_file"
31999 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32000 read at_status <"$at_status_file"
32001 #AT_STOP_138
32002 #AT_START_139
32003 at_fn_group_banner 139 'shortfile.at:26' \
32004   "short input files" "                              " 23
32005 at_xfail=no
32006       test -f $XFAILFILE && at_xfail=yes
32007 (
32008   $as_echo "139. $at_setup_line: testing $at_desc ..."
32009   $at_traceon
32010
32011
32012
32013
32014
32015   { set +x
32016 $as_echo "$at_srcdir/shortfile.at:29:
32017 mkdir gnu
32018 (cd gnu
32019 TEST_TAR_FORMAT=gnu
32020 export TEST_TAR_FORMAT
32021 TAR_OPTIONS=\"-H gnu\"
32022 export TAR_OPTIONS
32023 rm -rf *
32024
32025 genfile --length 511 --file foo || exit 5
32026 tar tf foo
32027 )"
32028 at_fn_check_prepare_notrace 'an embedded newline' "shortfile.at:29"
32029 ( $at_check_trace;
32030 mkdir gnu
32031 (cd gnu
32032 TEST_TAR_FORMAT=gnu
32033 export TEST_TAR_FORMAT
32034 TAR_OPTIONS="-H gnu"
32035 export TAR_OPTIONS
32036 rm -rf *
32037
32038 genfile --length 511 --file foo || exit 5
32039 tar tf foo
32040 )
32041 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32042 at_status=$? at_failed=false
32043 $at_check_filter
32044 echo >>"$at_stderr"; $as_echo "tar: This does not look like a tar archive
32045 tar: Exiting with failure status due to previous errors
32046 " | \
32047   $at_diff - "$at_stderr" || at_failed=:
32048 at_fn_diff_devnull "$at_stdout" || at_failed=:
32049 at_fn_check_status 2 $at_status "$at_srcdir/shortfile.at:29"
32050 $at_failed && at_fn_log_failure
32051 $at_traceon; }
32052
32053
32054
32055
32056   set +x
32057   $at_times_p && times >"$at_times_file"
32058 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32059 read at_status <"$at_status_file"
32060 #AT_STOP_139
32061 #AT_START_140
32062 at_fn_group_banner 140 'shortupd.at:31' \
32063   "updating short archives" "                        " 23
32064 at_xfail=no
32065       test -f $XFAILFILE && at_xfail=yes
32066 (
32067   $as_echo "140. $at_setup_line: testing $at_desc ..."
32068   $at_traceon
32069
32070
32071
32072
32073
32074   { set +x
32075 $as_echo "$at_srcdir/shortupd.at:34:
32076 mkdir v7
32077 (cd v7
32078 TEST_TAR_FORMAT=v7
32079 export TEST_TAR_FORMAT
32080 TAR_OPTIONS=\"-H v7\"
32081 export TAR_OPTIONS
32082 rm -rf *
32083
32084 touch foo
32085 tar uf archive foo
32086 )"
32087 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32088 ( $at_check_trace;
32089 mkdir v7
32090 (cd v7
32091 TEST_TAR_FORMAT=v7
32092 export TEST_TAR_FORMAT
32093 TAR_OPTIONS="-H v7"
32094 export TAR_OPTIONS
32095 rm -rf *
32096
32097 touch foo
32098 tar uf archive foo
32099 )
32100 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32101 at_status=$? at_failed=false
32102 $at_check_filter
32103 at_fn_diff_devnull "$at_stderr" || at_failed=:
32104 at_fn_diff_devnull "$at_stdout" || at_failed=:
32105 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32106 $at_failed && at_fn_log_failure
32107 $at_traceon; }
32108
32109               { set +x
32110 $as_echo "$at_srcdir/shortupd.at:34:
32111 mkdir oldgnu
32112 (cd oldgnu
32113 TEST_TAR_FORMAT=oldgnu
32114 export TEST_TAR_FORMAT
32115 TAR_OPTIONS=\"-H oldgnu\"
32116 export TAR_OPTIONS
32117 rm -rf *
32118
32119 touch foo
32120 tar uf archive foo
32121 )"
32122 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32123 ( $at_check_trace;
32124 mkdir oldgnu
32125 (cd oldgnu
32126 TEST_TAR_FORMAT=oldgnu
32127 export TEST_TAR_FORMAT
32128 TAR_OPTIONS="-H oldgnu"
32129 export TAR_OPTIONS
32130 rm -rf *
32131
32132 touch foo
32133 tar uf archive foo
32134 )
32135 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32136 at_status=$? at_failed=false
32137 $at_check_filter
32138 at_fn_diff_devnull "$at_stderr" || at_failed=:
32139 at_fn_diff_devnull "$at_stdout" || at_failed=:
32140 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32141 $at_failed && at_fn_log_failure
32142 $at_traceon; }
32143
32144               { set +x
32145 $as_echo "$at_srcdir/shortupd.at:34:
32146 mkdir ustar
32147 (cd ustar
32148 TEST_TAR_FORMAT=ustar
32149 export TEST_TAR_FORMAT
32150 TAR_OPTIONS=\"-H ustar\"
32151 export TAR_OPTIONS
32152 rm -rf *
32153
32154 touch foo
32155 tar uf archive foo
32156 )"
32157 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32158 ( $at_check_trace;
32159 mkdir ustar
32160 (cd ustar
32161 TEST_TAR_FORMAT=ustar
32162 export TEST_TAR_FORMAT
32163 TAR_OPTIONS="-H ustar"
32164 export TAR_OPTIONS
32165 rm -rf *
32166
32167 touch foo
32168 tar uf archive foo
32169 )
32170 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32171 at_status=$? at_failed=false
32172 $at_check_filter
32173 at_fn_diff_devnull "$at_stderr" || at_failed=:
32174 at_fn_diff_devnull "$at_stdout" || at_failed=:
32175 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32176 $at_failed && at_fn_log_failure
32177 $at_traceon; }
32178
32179               { set +x
32180 $as_echo "$at_srcdir/shortupd.at:34:
32181 mkdir posix
32182 (cd posix
32183 TEST_TAR_FORMAT=posix
32184 export TEST_TAR_FORMAT
32185 TAR_OPTIONS=\"-H posix\"
32186 export TAR_OPTIONS
32187 rm -rf *
32188
32189 touch foo
32190 tar uf archive foo
32191 )"
32192 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32193 ( $at_check_trace;
32194 mkdir posix
32195 (cd posix
32196 TEST_TAR_FORMAT=posix
32197 export TEST_TAR_FORMAT
32198 TAR_OPTIONS="-H posix"
32199 export TAR_OPTIONS
32200 rm -rf *
32201
32202 touch foo
32203 tar uf archive foo
32204 )
32205 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32206 at_status=$? at_failed=false
32207 $at_check_filter
32208 at_fn_diff_devnull "$at_stderr" || at_failed=:
32209 at_fn_diff_devnull "$at_stdout" || at_failed=:
32210 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32211 $at_failed && at_fn_log_failure
32212 $at_traceon; }
32213
32214               { set +x
32215 $as_echo "$at_srcdir/shortupd.at:34:
32216 mkdir gnu
32217 (cd gnu
32218 TEST_TAR_FORMAT=gnu
32219 export TEST_TAR_FORMAT
32220 TAR_OPTIONS=\"-H gnu\"
32221 export TAR_OPTIONS
32222 rm -rf *
32223
32224 touch foo
32225 tar uf archive foo
32226 )"
32227 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32228 ( $at_check_trace;
32229 mkdir gnu
32230 (cd gnu
32231 TEST_TAR_FORMAT=gnu
32232 export TEST_TAR_FORMAT
32233 TAR_OPTIONS="-H gnu"
32234 export TAR_OPTIONS
32235 rm -rf *
32236
32237 touch foo
32238 tar uf archive foo
32239 )
32240 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32241 at_status=$? at_failed=false
32242 $at_check_filter
32243 at_fn_diff_devnull "$at_stderr" || at_failed=:
32244 at_fn_diff_devnull "$at_stdout" || at_failed=:
32245 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32246 $at_failed && at_fn_log_failure
32247 $at_traceon; }
32248
32249
32250
32251
32252   set +x
32253   $at_times_p && times >"$at_times_file"
32254 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32255 read at_status <"$at_status_file"
32256 #AT_STOP_140
32257 #AT_START_141
32258 at_fn_group_banner 141 'truncate.at:29' \
32259   "truncate" "                                       " 23
32260 at_xfail=no
32261       test -f $XFAILFILE && at_xfail=yes
32262 (
32263   $as_echo "141. $at_setup_line: testing $at_desc ..."
32264   $at_traceon
32265
32266
32267
32268
32269
32270   { set +x
32271 $as_echo "$at_srcdir/truncate.at:32:
32272 mkdir v7
32273 (cd v7
32274 TEST_TAR_FORMAT=v7
32275 export TEST_TAR_FORMAT
32276 TAR_OPTIONS=\"-H v7\"
32277 export TAR_OPTIONS
32278 rm -rf *
32279
32280 genfile --file foo --length 200k
32281 genfile --file baz
32282 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32283 echo Exit status: \$?
32284 echo separator
32285 genfile --file foo --seek 195k --length 5k --pattern=zeros
32286 tar dvf bar)"
32287 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32288 ( $at_check_trace;
32289 mkdir v7
32290 (cd v7
32291 TEST_TAR_FORMAT=v7
32292 export TEST_TAR_FORMAT
32293 TAR_OPTIONS="-H v7"
32294 export TAR_OPTIONS
32295 rm -rf *
32296
32297 genfile --file foo --length 200k
32298 genfile --file baz
32299 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32300 echo Exit status: $?
32301 echo separator
32302 genfile --file foo --seek 195k --length 5k --pattern=zeros
32303 tar dvf bar)
32304 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32305 at_status=$? at_failed=false
32306 $at_check_filter
32307 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32308 " | \
32309   $at_diff - "$at_stderr" || at_failed=:
32310 echo >>"$at_stdout"; $as_echo "foo
32311 baz
32312 Exit status: 1
32313 separator
32314 foo
32315 foo: Mod time differs
32316 baz
32317 " | \
32318   $at_diff - "$at_stdout" || at_failed=:
32319 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32320 $at_failed && at_fn_log_failure
32321 $at_traceon; }
32322
32323               { set +x
32324 $as_echo "$at_srcdir/truncate.at:32:
32325 mkdir oldgnu
32326 (cd oldgnu
32327 TEST_TAR_FORMAT=oldgnu
32328 export TEST_TAR_FORMAT
32329 TAR_OPTIONS=\"-H oldgnu\"
32330 export TAR_OPTIONS
32331 rm -rf *
32332
32333 genfile --file foo --length 200k
32334 genfile --file baz
32335 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32336 echo Exit status: \$?
32337 echo separator
32338 genfile --file foo --seek 195k --length 5k --pattern=zeros
32339 tar dvf bar)"
32340 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32341 ( $at_check_trace;
32342 mkdir oldgnu
32343 (cd oldgnu
32344 TEST_TAR_FORMAT=oldgnu
32345 export TEST_TAR_FORMAT
32346 TAR_OPTIONS="-H oldgnu"
32347 export TAR_OPTIONS
32348 rm -rf *
32349
32350 genfile --file foo --length 200k
32351 genfile --file baz
32352 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32353 echo Exit status: $?
32354 echo separator
32355 genfile --file foo --seek 195k --length 5k --pattern=zeros
32356 tar dvf bar)
32357 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32358 at_status=$? at_failed=false
32359 $at_check_filter
32360 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32361 " | \
32362   $at_diff - "$at_stderr" || at_failed=:
32363 echo >>"$at_stdout"; $as_echo "foo
32364 baz
32365 Exit status: 1
32366 separator
32367 foo
32368 foo: Mod time differs
32369 baz
32370 " | \
32371   $at_diff - "$at_stdout" || at_failed=:
32372 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32373 $at_failed && at_fn_log_failure
32374 $at_traceon; }
32375
32376               { set +x
32377 $as_echo "$at_srcdir/truncate.at:32:
32378 mkdir ustar
32379 (cd ustar
32380 TEST_TAR_FORMAT=ustar
32381 export TEST_TAR_FORMAT
32382 TAR_OPTIONS=\"-H ustar\"
32383 export TAR_OPTIONS
32384 rm -rf *
32385
32386 genfile --file foo --length 200k
32387 genfile --file baz
32388 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32389 echo Exit status: \$?
32390 echo separator
32391 genfile --file foo --seek 195k --length 5k --pattern=zeros
32392 tar dvf bar)"
32393 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32394 ( $at_check_trace;
32395 mkdir ustar
32396 (cd ustar
32397 TEST_TAR_FORMAT=ustar
32398 export TEST_TAR_FORMAT
32399 TAR_OPTIONS="-H ustar"
32400 export TAR_OPTIONS
32401 rm -rf *
32402
32403 genfile --file foo --length 200k
32404 genfile --file baz
32405 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32406 echo Exit status: $?
32407 echo separator
32408 genfile --file foo --seek 195k --length 5k --pattern=zeros
32409 tar dvf bar)
32410 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32411 at_status=$? at_failed=false
32412 $at_check_filter
32413 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32414 " | \
32415   $at_diff - "$at_stderr" || at_failed=:
32416 echo >>"$at_stdout"; $as_echo "foo
32417 baz
32418 Exit status: 1
32419 separator
32420 foo
32421 foo: Mod time differs
32422 baz
32423 " | \
32424   $at_diff - "$at_stdout" || at_failed=:
32425 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32426 $at_failed && at_fn_log_failure
32427 $at_traceon; }
32428
32429               { set +x
32430 $as_echo "$at_srcdir/truncate.at:32:
32431 mkdir posix
32432 (cd posix
32433 TEST_TAR_FORMAT=posix
32434 export TEST_TAR_FORMAT
32435 TAR_OPTIONS=\"-H posix\"
32436 export TAR_OPTIONS
32437 rm -rf *
32438
32439 genfile --file foo --length 200k
32440 genfile --file baz
32441 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32442 echo Exit status: \$?
32443 echo separator
32444 genfile --file foo --seek 195k --length 5k --pattern=zeros
32445 tar dvf bar)"
32446 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32447 ( $at_check_trace;
32448 mkdir posix
32449 (cd posix
32450 TEST_TAR_FORMAT=posix
32451 export TEST_TAR_FORMAT
32452 TAR_OPTIONS="-H posix"
32453 export TAR_OPTIONS
32454 rm -rf *
32455
32456 genfile --file foo --length 200k
32457 genfile --file baz
32458 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32459 echo Exit status: $?
32460 echo separator
32461 genfile --file foo --seek 195k --length 5k --pattern=zeros
32462 tar dvf bar)
32463 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32464 at_status=$? at_failed=false
32465 $at_check_filter
32466 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32467 " | \
32468   $at_diff - "$at_stderr" || at_failed=:
32469 echo >>"$at_stdout"; $as_echo "foo
32470 baz
32471 Exit status: 1
32472 separator
32473 foo
32474 foo: Mod time differs
32475 baz
32476 " | \
32477   $at_diff - "$at_stdout" || at_failed=:
32478 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32479 $at_failed && at_fn_log_failure
32480 $at_traceon; }
32481
32482               { set +x
32483 $as_echo "$at_srcdir/truncate.at:32:
32484 mkdir gnu
32485 (cd gnu
32486 TEST_TAR_FORMAT=gnu
32487 export TEST_TAR_FORMAT
32488 TAR_OPTIONS=\"-H gnu\"
32489 export TAR_OPTIONS
32490 rm -rf *
32491
32492 genfile --file foo --length 200k
32493 genfile --file baz
32494 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32495 echo Exit status: \$?
32496 echo separator
32497 genfile --file foo --seek 195k --length 5k --pattern=zeros
32498 tar dvf bar)"
32499 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32500 ( $at_check_trace;
32501 mkdir gnu
32502 (cd gnu
32503 TEST_TAR_FORMAT=gnu
32504 export TEST_TAR_FORMAT
32505 TAR_OPTIONS="-H gnu"
32506 export TAR_OPTIONS
32507 rm -rf *
32508
32509 genfile --file foo --length 200k
32510 genfile --file baz
32511 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32512 echo Exit status: $?
32513 echo separator
32514 genfile --file foo --seek 195k --length 5k --pattern=zeros
32515 tar dvf bar)
32516 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32517 at_status=$? at_failed=false
32518 $at_check_filter
32519 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32520 " | \
32521   $at_diff - "$at_stderr" || at_failed=:
32522 echo >>"$at_stdout"; $as_echo "foo
32523 baz
32524 Exit status: 1
32525 separator
32526 foo
32527 foo: Mod time differs
32528 baz
32529 " | \
32530   $at_diff - "$at_stdout" || at_failed=:
32531 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32532 $at_failed && at_fn_log_failure
32533 $at_traceon; }
32534
32535
32536
32537
32538   set +x
32539   $at_times_p && times >"$at_times_file"
32540 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32541 read at_status <"$at_status_file"
32542 #AT_STOP_141
32543 #AT_START_142
32544 at_fn_group_banner 142 'grow.at:24' \
32545   "grow" "                                           " 23
32546 at_xfail=no
32547       test -f $XFAILFILE && at_xfail=yes
32548 (
32549   $as_echo "142. $at_setup_line: testing $at_desc ..."
32550   $at_traceon
32551
32552
32553
32554
32555
32556   { set +x
32557 $as_echo "$at_srcdir/grow.at:27:
32558 mkdir v7
32559 (cd v7
32560 TEST_TAR_FORMAT=v7
32561 export TEST_TAR_FORMAT
32562 TAR_OPTIONS=\"-H v7\"
32563 export TAR_OPTIONS
32564 rm -rf *
32565
32566 genfile --file foo --length 50000k
32567 genfile --file baz
32568 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32569 )"
32570 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
32571 ( $at_check_trace;
32572 mkdir v7
32573 (cd v7
32574 TEST_TAR_FORMAT=v7
32575 export TEST_TAR_FORMAT
32576 TAR_OPTIONS="-H v7"
32577 export TAR_OPTIONS
32578 rm -rf *
32579
32580 genfile --file foo --length 50000k
32581 genfile --file baz
32582 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32583 )
32584 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32585 at_status=$? at_failed=false
32586 $at_check_filter
32587 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
32588 " | \
32589   $at_diff - "$at_stderr" || at_failed=:
32590 echo >>"$at_stdout"; $as_echo "foo
32591 baz
32592 " | \
32593   $at_diff - "$at_stdout" || at_failed=:
32594 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
32595 $at_failed && at_fn_log_failure
32596 $at_traceon; }
32597
32598               { set +x
32599 $as_echo "$at_srcdir/grow.at:27:
32600 mkdir oldgnu
32601 (cd oldgnu
32602 TEST_TAR_FORMAT=oldgnu
32603 export TEST_TAR_FORMAT
32604 TAR_OPTIONS=\"-H oldgnu\"
32605 export TAR_OPTIONS
32606 rm -rf *
32607
32608 genfile --file foo --length 50000k
32609 genfile --file baz
32610 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32611 )"
32612 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
32613 ( $at_check_trace;
32614 mkdir oldgnu
32615 (cd oldgnu
32616 TEST_TAR_FORMAT=oldgnu
32617 export TEST_TAR_FORMAT
32618 TAR_OPTIONS="-H oldgnu"
32619 export TAR_OPTIONS
32620 rm -rf *
32621
32622 genfile --file foo --length 50000k
32623 genfile --file baz
32624 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32625 )
32626 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32627 at_status=$? at_failed=false
32628 $at_check_filter
32629 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
32630 " | \
32631   $at_diff - "$at_stderr" || at_failed=:
32632 echo >>"$at_stdout"; $as_echo "foo
32633 baz
32634 " | \
32635   $at_diff - "$at_stdout" || at_failed=:
32636 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
32637 $at_failed && at_fn_log_failure
32638 $at_traceon; }
32639
32640               { set +x
32641 $as_echo "$at_srcdir/grow.at:27:
32642 mkdir ustar
32643 (cd ustar
32644 TEST_TAR_FORMAT=ustar
32645 export TEST_TAR_FORMAT
32646 TAR_OPTIONS=\"-H ustar\"
32647 export TAR_OPTIONS
32648 rm -rf *
32649
32650 genfile --file foo --length 50000k
32651 genfile --file baz
32652 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32653 )"
32654 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
32655 ( $at_check_trace;
32656 mkdir ustar
32657 (cd ustar
32658 TEST_TAR_FORMAT=ustar
32659 export TEST_TAR_FORMAT
32660 TAR_OPTIONS="-H ustar"
32661 export TAR_OPTIONS
32662 rm -rf *
32663
32664 genfile --file foo --length 50000k
32665 genfile --file baz
32666 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32667 )
32668 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32669 at_status=$? at_failed=false
32670 $at_check_filter
32671 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
32672 " | \
32673   $at_diff - "$at_stderr" || at_failed=:
32674 echo >>"$at_stdout"; $as_echo "foo
32675 baz
32676 " | \
32677   $at_diff - "$at_stdout" || at_failed=:
32678 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
32679 $at_failed && at_fn_log_failure
32680 $at_traceon; }
32681
32682               { set +x
32683 $as_echo "$at_srcdir/grow.at:27:
32684 mkdir posix
32685 (cd posix
32686 TEST_TAR_FORMAT=posix
32687 export TEST_TAR_FORMAT
32688 TAR_OPTIONS=\"-H posix\"
32689 export TAR_OPTIONS
32690 rm -rf *
32691
32692 genfile --file foo --length 50000k
32693 genfile --file baz
32694 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32695 )"
32696 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
32697 ( $at_check_trace;
32698 mkdir posix
32699 (cd posix
32700 TEST_TAR_FORMAT=posix
32701 export TEST_TAR_FORMAT
32702 TAR_OPTIONS="-H posix"
32703 export TAR_OPTIONS
32704 rm -rf *
32705
32706 genfile --file foo --length 50000k
32707 genfile --file baz
32708 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32709 )
32710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32711 at_status=$? at_failed=false
32712 $at_check_filter
32713 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
32714 " | \
32715   $at_diff - "$at_stderr" || at_failed=:
32716 echo >>"$at_stdout"; $as_echo "foo
32717 baz
32718 " | \
32719   $at_diff - "$at_stdout" || at_failed=:
32720 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
32721 $at_failed && at_fn_log_failure
32722 $at_traceon; }
32723
32724               { set +x
32725 $as_echo "$at_srcdir/grow.at:27:
32726 mkdir gnu
32727 (cd gnu
32728 TEST_TAR_FORMAT=gnu
32729 export TEST_TAR_FORMAT
32730 TAR_OPTIONS=\"-H gnu\"
32731 export TAR_OPTIONS
32732 rm -rf *
32733
32734 genfile --file foo --length 50000k
32735 genfile --file baz
32736 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32737 )"
32738 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
32739 ( $at_check_trace;
32740 mkdir gnu
32741 (cd gnu
32742 TEST_TAR_FORMAT=gnu
32743 export TEST_TAR_FORMAT
32744 TAR_OPTIONS="-H gnu"
32745 export TAR_OPTIONS
32746 rm -rf *
32747
32748 genfile --file foo --length 50000k
32749 genfile --file baz
32750 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
32751 )
32752 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32753 at_status=$? at_failed=false
32754 $at_check_filter
32755 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
32756 " | \
32757   $at_diff - "$at_stderr" || at_failed=:
32758 echo >>"$at_stdout"; $as_echo "foo
32759 baz
32760 " | \
32761   $at_diff - "$at_stdout" || at_failed=:
32762 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
32763 $at_failed && at_fn_log_failure
32764 $at_traceon; }
32765
32766
32767
32768
32769   set +x
32770   $at_times_p && times >"$at_times_file"
32771 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32772 read at_status <"$at_status_file"
32773 #AT_STOP_142
32774 #AT_START_143
32775 at_fn_group_banner 143 'sigpipe.at:21' \
32776   "sigpipe handling" "                               " 23
32777 at_xfail=no
32778 (
32779   $as_echo "143. $at_setup_line: testing $at_desc ..."
32780   $at_traceon
32781
32782
32783
32784 # Description: Tar 1.23 ignored sigpipe which lead to spurious "write
32785 # error" diagnostics when piping output to another programs.
32786 # Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
32787 # References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html
32788 #             <20100319184141.GC30047@wo.int.altlinux.org>
32789
32790 { set +x
32791 $as_echo "$at_srcdir/sigpipe.at:30:
32792
32793 case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
32794 ?*) exit 77;;
32795 esac
32796
32797
32798 genfile --length 2048 --file first
32799 genfile --length 2048 --file second
32800 genfile --length 2049 --file third
32801
32802 tar cf archive first second third
32803
32804 # Discard diagnostics that some shells generate about broken pipes.
32805 (tar tf archive 2>&3 | :) 3>&2 2>/dev/null
32806 "
32807 at_fn_check_prepare_notrace 'a `...` command substitution' "sigpipe.at:30"
32808 ( $at_check_trace;
32809
32810 case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
32811 ?*) exit 77;;
32812 esac
32813
32814
32815 genfile --length 2048 --file first
32816 genfile --length 2048 --file second
32817 genfile --length 2049 --file third
32818
32819 tar cf archive first second third
32820
32821 # Discard diagnostics that some shells generate about broken pipes.
32822 (tar tf archive 2>&3 | :) 3>&2 2>/dev/null
32823
32824 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32825 at_status=$? at_failed=false
32826 $at_check_filter
32827 at_fn_diff_devnull "$at_stderr" || at_failed=:
32828 at_fn_diff_devnull "$at_stdout" || at_failed=:
32829 at_fn_check_status 0 $at_status "$at_srcdir/sigpipe.at:30"
32830 $at_failed && at_fn_log_failure
32831 $at_traceon; }
32832
32833
32834   set +x
32835   $at_times_p && times >"$at_times_file"
32836 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32837 read at_status <"$at_status_file"
32838 #AT_STOP_143
32839 #AT_START_144
32840 at_fn_group_banner 144 'remfiles01.at:28' \
32841   "remove-files with compression" "                  " 24
32842 at_xfail=no
32843 (
32844   $as_echo "144. $at_setup_line: testing $at_desc ..."
32845   $at_traceon
32846
32847
32848
32849 unset TAR_OPTIONS
32850 { set +x
32851 $as_echo "$at_srcdir/remfiles01.at:32:
32852
32853 echo \"test\" > \$\$
32854 chmod 0 \$\$
32855 cat \$\$ > /dev/null 2>&1
32856 result=\$?
32857 rm -f \$\$
32858 test \$result -eq 0 && exit 77
32859
32860
32861 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32862
32863
32864 case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
32865 ?*) exit 77;;
32866 esac
32867
32868
32869 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32870
32871
32872 mkdir dir
32873 cd dir
32874 genfile --file a --length 0
32875 chmod 0 a
32876 genfile --file b
32877 mkdir c
32878
32879 # Depending on when the SIGPIPE gets delivered, the invocation below
32880 # may finish with either
32881 #  tar: a: Cannot write: Broken pipe
32882 # or
32883 #  tar: Child returned status 2
32884
32885 # Discard diagnostics that some shells generate about broken pipes,
32886 # and discard all of tar's diagnostics except for the ones saying \"(child)\".
32887 # Gzip's exit code is propagated to the shell.  Usually it is 141.
32888 # Convert all non-zero exits to 2 to make it predictable.
32889 (tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
32890 EC=\$?
32891 sed -n '/(child)/p' err >&2
32892 rm err
32893 find . | sort
32894 exit \$EC
32895 "
32896 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles01.at:32"
32897 ( $at_check_trace;
32898
32899 echo "test" > $$
32900 chmod 0 $$
32901 cat $$ > /dev/null 2>&1
32902 result=$?
32903 rm -f $$
32904 test $result -eq 0 && exit 77
32905
32906
32907 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32908
32909
32910 case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
32911 ?*) exit 77;;
32912 esac
32913
32914
32915 test -z "`sort < /dev/null 2>&1`" || exit 77
32916
32917
32918 mkdir dir
32919 cd dir
32920 genfile --file a --length 0
32921 chmod 0 a
32922 genfile --file b
32923 mkdir c
32924
32925 # Depending on when the SIGPIPE gets delivered, the invocation below
32926 # may finish with either
32927 #  tar: a: Cannot write: Broken pipe
32928 # or
32929 #  tar: Child returned status 2
32930
32931 # Discard diagnostics that some shells generate about broken pipes,
32932 # and discard all of tar's diagnostics except for the ones saying "(child)".
32933 # Gzip's exit code is propagated to the shell.  Usually it is 141.
32934 # Convert all non-zero exits to 2 to make it predictable.
32935 (tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
32936 EC=$?
32937 sed -n '/(child)/p' err >&2
32938 rm err
32939 find . | sort
32940 exit $EC
32941
32942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32943 at_status=$? at_failed=false
32944 $at_check_filter
32945 echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Permission denied
32946 tar (child): Error is not recoverable: exiting now
32947 " | \
32948   $at_diff - "$at_stderr" || at_failed=:
32949 echo >>"$at_stdout"; $as_echo ".
32950 ./a
32951 ./b
32952 ./c
32953 " | \
32954   $at_diff - "$at_stdout" || at_failed=:
32955 at_fn_check_status 2 $at_status "$at_srcdir/remfiles01.at:32"
32956 $at_failed && at_fn_log_failure
32957 $at_traceon; }
32958
32959
32960   set +x
32961   $at_times_p && times >"$at_times_file"
32962 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32963 read at_status <"$at_status_file"
32964 #AT_STOP_144
32965 #AT_START_145
32966 at_fn_group_banner 145 'remfiles02.at:28' \
32967   "remove-files with compression: grand-child" "     " 24
32968 at_xfail=no
32969 (
32970   $as_echo "145. $at_setup_line: testing $at_desc ..."
32971   $at_traceon
32972
32973
32974
32975 unset TAR_OPTIONS
32976 { set +x
32977 $as_echo "$at_srcdir/remfiles02.at:32:
32978
32979 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32980
32981
32982 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32983
32984
32985 mkdir dir
32986 cd dir
32987 mkdir a
32988 genfile --file b
32989 mkdir c
32990
32991 tar -c -f a -z --remove-files b c 2>err
32992 EC=\$?
32993 sed -n '/(child)/p' err >&2
32994 rm err
32995 find . | sort
32996 exit \$EC
32997 "
32998 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles02.at:32"
32999 ( $at_check_trace;
33000
33001 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
33002
33003
33004 test -z "`sort < /dev/null 2>&1`" || exit 77
33005
33006
33007 mkdir dir
33008 cd dir
33009 mkdir a
33010 genfile --file b
33011 mkdir c
33012
33013 tar -c -f a -z --remove-files b c 2>err
33014 EC=$?
33015 sed -n '/(child)/p' err >&2
33016 rm err
33017 find . | sort
33018 exit $EC
33019
33020 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33021 at_status=$? at_failed=false
33022 $at_check_filter
33023 echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Is a directory
33024 tar (child): Error is not recoverable: exiting now
33025 " | \
33026   $at_diff - "$at_stderr" || at_failed=:
33027 echo >>"$at_stdout"; $as_echo ".
33028 ./a
33029 ./b
33030 ./c
33031 " | \
33032   $at_diff - "$at_stdout" || at_failed=:
33033 at_fn_check_status 2 $at_status "$at_srcdir/remfiles02.at:32"
33034 $at_failed && at_fn_log_failure
33035 $at_traceon; }
33036
33037
33038   set +x
33039   $at_times_p && times >"$at_times_file"
33040 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33041 read at_status <"$at_status_file"
33042 #AT_STOP_145
33043 #AT_START_146
33044 at_fn_group_banner 146 'remfiles03.at:28' \
33045   "remove-files with symbolic links" "               " 24
33046 at_xfail=no
33047 (
33048   $as_echo "146. $at_setup_line: testing $at_desc ..."
33049   $at_traceon
33050
33051
33052
33053 { set +x
33054 $as_echo "$at_srcdir/remfiles03.at:31:
33055 mkdir a
33056 mkdir a/b
33057 ln -s b a/c || exit 77
33058 tar --remove-files -cf a.tar a
33059 genfile --stat a
33060 "
33061 at_fn_check_prepare_notrace 'an embedded newline' "remfiles03.at:31"
33062 ( $at_check_trace;
33063 mkdir a
33064 mkdir a/b
33065 ln -s b a/c || exit 77
33066 tar --remove-files -cf a.tar a
33067 genfile --stat a
33068
33069 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33070 at_status=$? at_failed=false
33071 $at_check_filter
33072 echo >>"$at_stderr"; $as_echo "genfile: stat(a) failed: No such file or directory
33073 " | \
33074   $at_diff - "$at_stderr" || at_failed=:
33075 at_fn_diff_devnull "$at_stdout" || at_failed=:
33076 at_fn_check_status 0 $at_status "$at_srcdir/remfiles03.at:31"
33077 $at_failed && at_fn_log_failure
33078 $at_traceon; }
33079
33080
33081   set +x
33082   $at_times_p && times >"$at_times_file"
33083 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33084 read at_status <"$at_status_file"
33085 #AT_STOP_146
33086 #AT_START_147
33087 at_fn_group_banner 147 'remfiles04a.at:25' \
33088   "remove-files with -C:rel in -c/non-incr. mode" "  " 24
33089 at_xfail=no
33090       test -f $XFAILFILE && at_xfail=yes
33091 (
33092   $as_echo "147. $at_setup_line: testing $at_desc ..."
33093   $at_traceon
33094
33095
33096
33097
33098
33099   { set +x
33100 $as_echo "$at_srcdir/remfiles04a.at:28:
33101 mkdir gnu
33102 (cd gnu
33103 TEST_TAR_FORMAT=gnu
33104 export TEST_TAR_FORMAT
33105 TAR_OPTIONS=\"-H gnu\"
33106 export TAR_OPTIONS
33107 rm -rf *
33108
33109
33110 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33111
33112 mkdir foo
33113 echo bar > bar
33114 echo foobar > foo/bar
33115 tar -cf foo.tar --remove-files -C foo bar
33116 echo A
33117 find . | sort
33118 )"
33119 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04a.at:28"
33120 ( $at_check_trace;
33121 mkdir gnu
33122 (cd gnu
33123 TEST_TAR_FORMAT=gnu
33124 export TEST_TAR_FORMAT
33125 TAR_OPTIONS="-H gnu"
33126 export TAR_OPTIONS
33127 rm -rf *
33128
33129
33130 test -z "`sort < /dev/null 2>&1`" || exit 77
33131
33132 mkdir foo
33133 echo bar > bar
33134 echo foobar > foo/bar
33135 tar -cf foo.tar --remove-files -C foo bar
33136 echo A
33137 find . | sort
33138 )
33139 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33140 at_status=$? at_failed=false
33141 $at_check_filter
33142 at_fn_diff_devnull "$at_stderr" || at_failed=:
33143 echo >>"$at_stdout"; $as_echo "A
33144 .
33145 ./bar
33146 ./foo
33147 ./foo.tar
33148 " | \
33149   $at_diff - "$at_stdout" || at_failed=:
33150 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04a.at:28"
33151 $at_failed && at_fn_log_failure
33152 $at_traceon; }
33153
33154
33155
33156
33157   set +x
33158   $at_times_p && times >"$at_times_file"
33159 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33160 read at_status <"$at_status_file"
33161 #AT_STOP_147
33162 #AT_START_148
33163 at_fn_group_banner 148 'remfiles04b.at:33' \
33164   "remove-files with -C:rel in -c/incr. mode" "      " 24
33165 at_xfail=no
33166       test -f $XFAILFILE && at_xfail=yes
33167 (
33168   $as_echo "148. $at_setup_line: testing $at_desc ..."
33169   $at_traceon
33170
33171
33172
33173
33174
33175   { set +x
33176 $as_echo "$at_srcdir/remfiles04b.at:36:
33177 mkdir gnu
33178 (cd gnu
33179 TEST_TAR_FORMAT=gnu
33180 export TEST_TAR_FORMAT
33181 TAR_OPTIONS=\"-H gnu\"
33182 export TAR_OPTIONS
33183 rm -rf *
33184
33185
33186 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33187
33188 mkdir foo
33189 echo bar > bar
33190 echo foobar > foo/bar
33191 tar -cf foo.tar --incremental --remove-files -C foo bar
33192 echo A
33193 find . | sort
33194 )"
33195 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04b.at:36"
33196 ( $at_check_trace;
33197 mkdir gnu
33198 (cd gnu
33199 TEST_TAR_FORMAT=gnu
33200 export TEST_TAR_FORMAT
33201 TAR_OPTIONS="-H gnu"
33202 export TAR_OPTIONS
33203 rm -rf *
33204
33205
33206 test -z "`sort < /dev/null 2>&1`" || exit 77
33207
33208 mkdir foo
33209 echo bar > bar
33210 echo foobar > foo/bar
33211 tar -cf foo.tar --incremental --remove-files -C foo bar
33212 echo A
33213 find . | sort
33214 )
33215 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33216 at_status=$? at_failed=false
33217 $at_check_filter
33218 at_fn_diff_devnull "$at_stderr" || at_failed=:
33219 echo >>"$at_stdout"; $as_echo "A
33220 .
33221 ./bar
33222 ./foo
33223 ./foo.tar
33224 " | \
33225   $at_diff - "$at_stdout" || at_failed=:
33226 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04b.at:36"
33227 $at_failed && at_fn_log_failure
33228 $at_traceon; }
33229
33230
33231
33232
33233   set +x
33234   $at_times_p && times >"$at_times_file"
33235 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33236 read at_status <"$at_status_file"
33237 #AT_STOP_148
33238 #AT_START_149
33239 at_fn_group_banner 149 'remfiles04c.at:33' \
33240   "remove-files with -C:rel in -r mode" "            " 24
33241 at_xfail=no
33242       test -f $XFAILFILE && at_xfail=yes
33243 (
33244   $as_echo "149. $at_setup_line: testing $at_desc ..."
33245   $at_traceon
33246
33247
33248
33249
33250
33251   { set +x
33252 $as_echo "$at_srcdir/remfiles04c.at:36:
33253 mkdir gnu
33254 (cd gnu
33255 TEST_TAR_FORMAT=gnu
33256 export TEST_TAR_FORMAT
33257 TAR_OPTIONS=\"-H gnu\"
33258 export TAR_OPTIONS
33259 rm -rf *
33260
33261
33262 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33263
33264 mkdir foo
33265 echo bar > bar
33266 echo foobar > foo/bar
33267 tar -cf foo.tar -C foo bar
33268 echo A
33269 find . | sort
33270 tar -rf foo.tar --remove-files -C foo bar
33271 echo B
33272 find . | sort
33273 )"
33274 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04c.at:36"
33275 ( $at_check_trace;
33276 mkdir gnu
33277 (cd gnu
33278 TEST_TAR_FORMAT=gnu
33279 export TEST_TAR_FORMAT
33280 TAR_OPTIONS="-H gnu"
33281 export TAR_OPTIONS
33282 rm -rf *
33283
33284
33285 test -z "`sort < /dev/null 2>&1`" || exit 77
33286
33287 mkdir foo
33288 echo bar > bar
33289 echo foobar > foo/bar
33290 tar -cf foo.tar -C foo bar
33291 echo A
33292 find . | sort
33293 tar -rf foo.tar --remove-files -C foo bar
33294 echo B
33295 find . | sort
33296 )
33297 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33298 at_status=$? at_failed=false
33299 $at_check_filter
33300 at_fn_diff_devnull "$at_stderr" || at_failed=:
33301 echo >>"$at_stdout"; $as_echo "A
33302 .
33303 ./bar
33304 ./foo
33305 ./foo.tar
33306 ./foo/bar
33307 B
33308 .
33309 ./bar
33310 ./foo
33311 ./foo.tar
33312 " | \
33313   $at_diff - "$at_stdout" || at_failed=:
33314 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04c.at:36"
33315 $at_failed && at_fn_log_failure
33316 $at_traceon; }
33317
33318
33319
33320
33321   set +x
33322   $at_times_p && times >"$at_times_file"
33323 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33324 read at_status <"$at_status_file"
33325 #AT_STOP_149
33326 #AT_START_150
33327 at_fn_group_banner 150 'remfiles05a.at:34' \
33328   "remove-files with -C:rel,rel in -c/non-incr. mode" "" 24
33329 at_xfail=no
33330       test -f $XFAILFILE && at_xfail=yes
33331 (
33332   $as_echo "150. $at_setup_line: testing $at_desc ..."
33333   $at_traceon
33334
33335
33336
33337
33338
33339   { set +x
33340 $as_echo "$at_srcdir/remfiles05a.at:37:
33341 mkdir gnu
33342 (cd gnu
33343 TEST_TAR_FORMAT=gnu
33344 export TEST_TAR_FORMAT
33345 TAR_OPTIONS=\"-H gnu\"
33346 export TAR_OPTIONS
33347 rm -rf *
33348
33349
33350 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33351
33352 mkdir foo
33353 mkdir bar
33354 echo file > file
33355 echo foo/file > foo/file
33356 echo bar/file > bar/file
33357 decho A
33358 tar -cvf foo.tar --remove-files -C foo file -C ../bar file
33359 decho B
33360 find . | sort
33361 )"
33362 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05a.at:37"
33363 ( $at_check_trace;
33364 mkdir gnu
33365 (cd gnu
33366 TEST_TAR_FORMAT=gnu
33367 export TEST_TAR_FORMAT
33368 TAR_OPTIONS="-H gnu"
33369 export TAR_OPTIONS
33370 rm -rf *
33371
33372
33373 test -z "`sort < /dev/null 2>&1`" || exit 77
33374
33375 mkdir foo
33376 mkdir bar
33377 echo file > file
33378 echo foo/file > foo/file
33379 echo bar/file > bar/file
33380 decho A
33381 tar -cvf foo.tar --remove-files -C foo file -C ../bar file
33382 decho B
33383 find . | sort
33384 )
33385 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33386 at_status=$? at_failed=false
33387 $at_check_filter
33388 echo >>"$at_stderr"; $as_echo "A
33389 B
33390 " | \
33391   $at_diff - "$at_stderr" || at_failed=:
33392 echo >>"$at_stdout"; $as_echo "A
33393 file
33394 file
33395 B
33396 .
33397 ./bar
33398 ./file
33399 ./foo
33400 ./foo.tar
33401 " | \
33402   $at_diff - "$at_stdout" || at_failed=:
33403 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05a.at:37"
33404 $at_failed && at_fn_log_failure
33405 $at_traceon; }
33406
33407
33408
33409
33410   set +x
33411   $at_times_p && times >"$at_times_file"
33412 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33413 read at_status <"$at_status_file"
33414 #AT_STOP_150
33415 #AT_START_151
33416 at_fn_group_banner 151 'remfiles05b.at:25' \
33417   "remove-files with -C:rel,rel in -c/incr. mode" "  " 24
33418 at_xfail=no
33419       test -f $XFAILFILE && at_xfail=yes
33420 (
33421   $as_echo "151. $at_setup_line: testing $at_desc ..."
33422   $at_traceon
33423
33424
33425
33426
33427
33428   { set +x
33429 $as_echo "$at_srcdir/remfiles05b.at:28:
33430 mkdir gnu
33431 (cd gnu
33432 TEST_TAR_FORMAT=gnu
33433 export TEST_TAR_FORMAT
33434 TAR_OPTIONS=\"-H gnu\"
33435 export TAR_OPTIONS
33436 rm -rf *
33437
33438
33439 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33440
33441 mkdir foo
33442 mkdir bar
33443 echo file > file
33444 echo foo/file > foo/file
33445 echo bar/file > bar/file
33446 decho A
33447 tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
33448 decho B
33449 find . | sort
33450 )"
33451 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05b.at:28"
33452 ( $at_check_trace;
33453 mkdir gnu
33454 (cd gnu
33455 TEST_TAR_FORMAT=gnu
33456 export TEST_TAR_FORMAT
33457 TAR_OPTIONS="-H gnu"
33458 export TAR_OPTIONS
33459 rm -rf *
33460
33461
33462 test -z "`sort < /dev/null 2>&1`" || exit 77
33463
33464 mkdir foo
33465 mkdir bar
33466 echo file > file
33467 echo foo/file > foo/file
33468 echo bar/file > bar/file
33469 decho A
33470 tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
33471 decho B
33472 find . | sort
33473 )
33474 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33475 at_status=$? at_failed=false
33476 $at_check_filter
33477 echo >>"$at_stderr"; $as_echo "A
33478 B
33479 " | \
33480   $at_diff - "$at_stderr" || at_failed=:
33481 echo >>"$at_stdout"; $as_echo "A
33482 file
33483 file
33484 B
33485 .
33486 ./bar
33487 ./file
33488 ./foo
33489 ./foo.tar
33490 " | \
33491   $at_diff - "$at_stdout" || at_failed=:
33492 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05b.at:28"
33493 $at_failed && at_fn_log_failure
33494 $at_traceon; }
33495
33496
33497
33498
33499   set +x
33500   $at_times_p && times >"$at_times_file"
33501 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33502 read at_status <"$at_status_file"
33503 #AT_STOP_151
33504 #AT_START_152
33505 at_fn_group_banner 152 'remfiles05c.at:25' \
33506   "remove-files with -C:rel,rel in -r mode" "        " 24
33507 at_xfail=no
33508       test -f $XFAILFILE && at_xfail=yes
33509 (
33510   $as_echo "152. $at_setup_line: testing $at_desc ..."
33511   $at_traceon
33512
33513
33514
33515
33516
33517   { set +x
33518 $as_echo "$at_srcdir/remfiles05c.at:28:
33519 mkdir gnu
33520 (cd gnu
33521 TEST_TAR_FORMAT=gnu
33522 export TEST_TAR_FORMAT
33523 TAR_OPTIONS=\"-H gnu\"
33524 export TAR_OPTIONS
33525 rm -rf *
33526
33527
33528 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33529
33530 mkdir foo
33531 mkdir bar
33532 echo file > file
33533 echo foo/file > foo/file
33534 echo bar/file > bar/file
33535 tar -cf foo.tar -C foo file -C ../bar file
33536 decho A
33537 find . | sort
33538 decho B
33539 tar -rvf foo.tar --remove-files -C foo file -C ../bar file
33540 decho C
33541 find . | sort
33542 )"
33543 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05c.at:28"
33544 ( $at_check_trace;
33545 mkdir gnu
33546 (cd gnu
33547 TEST_TAR_FORMAT=gnu
33548 export TEST_TAR_FORMAT
33549 TAR_OPTIONS="-H gnu"
33550 export TAR_OPTIONS
33551 rm -rf *
33552
33553
33554 test -z "`sort < /dev/null 2>&1`" || exit 77
33555
33556 mkdir foo
33557 mkdir bar
33558 echo file > file
33559 echo foo/file > foo/file
33560 echo bar/file > bar/file
33561 tar -cf foo.tar -C foo file -C ../bar file
33562 decho A
33563 find . | sort
33564 decho B
33565 tar -rvf foo.tar --remove-files -C foo file -C ../bar file
33566 decho C
33567 find . | sort
33568 )
33569 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33570 at_status=$? at_failed=false
33571 $at_check_filter
33572 echo >>"$at_stderr"; $as_echo "A
33573 B
33574 C
33575 " | \
33576   $at_diff - "$at_stderr" || at_failed=:
33577 echo >>"$at_stdout"; $as_echo "A
33578 .
33579 ./bar
33580 ./bar/file
33581 ./file
33582 ./foo
33583 ./foo.tar
33584 ./foo/file
33585 B
33586 file
33587 file
33588 C
33589 .
33590 ./bar
33591 ./file
33592 ./foo
33593 ./foo.tar
33594 " | \
33595   $at_diff - "$at_stdout" || at_failed=:
33596 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05c.at:28"
33597 $at_failed && at_fn_log_failure
33598 $at_traceon; }
33599
33600
33601
33602
33603   set +x
33604   $at_times_p && times >"$at_times_file"
33605 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33606 read at_status <"$at_status_file"
33607 #AT_STOP_152
33608 #AT_START_153
33609 at_fn_group_banner 153 'remfiles06a.at:25' \
33610   "remove-files with -C:rel,abs in -c/non-incr. mode" "" 24
33611 at_xfail=no
33612       test -f $XFAILFILE && at_xfail=yes
33613 (
33614   $as_echo "153. $at_setup_line: testing $at_desc ..."
33615   $at_traceon
33616
33617
33618
33619
33620
33621   { set +x
33622 $as_echo "$at_srcdir/remfiles06a.at:28:
33623 mkdir gnu
33624 (cd gnu
33625 TEST_TAR_FORMAT=gnu
33626 export TEST_TAR_FORMAT
33627 TAR_OPTIONS=\"-H gnu\"
33628 export TAR_OPTIONS
33629 rm -rf *
33630
33631
33632 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33633
33634 mkdir foo
33635 mkdir bar
33636 echo file > file
33637 echo foo/file > foo/file
33638 echo bar/file > bar/file
33639 DIR=\`pwd\`
33640 decho A
33641 tar -cvf foo.tar --remove-files -C foo file -C \$DIR/bar file
33642 decho B
33643 find . | sort
33644 )"
33645 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06a.at:28"
33646 ( $at_check_trace;
33647 mkdir gnu
33648 (cd gnu
33649 TEST_TAR_FORMAT=gnu
33650 export TEST_TAR_FORMAT
33651 TAR_OPTIONS="-H gnu"
33652 export TAR_OPTIONS
33653 rm -rf *
33654
33655
33656 test -z "`sort < /dev/null 2>&1`" || exit 77
33657
33658 mkdir foo
33659 mkdir bar
33660 echo file > file
33661 echo foo/file > foo/file
33662 echo bar/file > bar/file
33663 DIR=`pwd`
33664 decho A
33665 tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file
33666 decho B
33667 find . | sort
33668 )
33669 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33670 at_status=$? at_failed=false
33671 $at_check_filter
33672 echo >>"$at_stderr"; $as_echo "A
33673 B
33674 " | \
33675   $at_diff - "$at_stderr" || at_failed=:
33676 echo >>"$at_stdout"; $as_echo "A
33677 file
33678 file
33679 B
33680 .
33681 ./bar
33682 ./file
33683 ./foo
33684 ./foo.tar
33685 " | \
33686   $at_diff - "$at_stdout" || at_failed=:
33687 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06a.at:28"
33688 $at_failed && at_fn_log_failure
33689 $at_traceon; }
33690
33691
33692
33693
33694   set +x
33695   $at_times_p && times >"$at_times_file"
33696 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33697 read at_status <"$at_status_file"
33698 #AT_STOP_153
33699 #AT_START_154
33700 at_fn_group_banner 154 'remfiles06b.at:25' \
33701   "remove-files with -C:rel,abs in -c/incr. mode" "  " 24
33702 at_xfail=no
33703       test -f $XFAILFILE && at_xfail=yes
33704 (
33705   $as_echo "154. $at_setup_line: testing $at_desc ..."
33706   $at_traceon
33707
33708
33709
33710
33711
33712   { set +x
33713 $as_echo "$at_srcdir/remfiles06b.at:28:
33714 mkdir gnu
33715 (cd gnu
33716 TEST_TAR_FORMAT=gnu
33717 export TEST_TAR_FORMAT
33718 TAR_OPTIONS=\"-H gnu\"
33719 export TAR_OPTIONS
33720 rm -rf *
33721
33722
33723 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33724
33725 mkdir foo
33726 mkdir bar
33727 echo file > file
33728 echo foo/file > foo/file
33729 echo bar/file > bar/file
33730 DIR=\`pwd\`
33731 decho A
33732 tar -cvf foo.tar --incremental --remove-files -C foo file -C \$DIR/bar file
33733 decho B
33734 find . | sort
33735 )"
33736 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06b.at:28"
33737 ( $at_check_trace;
33738 mkdir gnu
33739 (cd gnu
33740 TEST_TAR_FORMAT=gnu
33741 export TEST_TAR_FORMAT
33742 TAR_OPTIONS="-H gnu"
33743 export TAR_OPTIONS
33744 rm -rf *
33745
33746
33747 test -z "`sort < /dev/null 2>&1`" || exit 77
33748
33749 mkdir foo
33750 mkdir bar
33751 echo file > file
33752 echo foo/file > foo/file
33753 echo bar/file > bar/file
33754 DIR=`pwd`
33755 decho A
33756 tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file
33757 decho B
33758 find . | sort
33759 )
33760 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33761 at_status=$? at_failed=false
33762 $at_check_filter
33763 echo >>"$at_stderr"; $as_echo "A
33764 B
33765 " | \
33766   $at_diff - "$at_stderr" || at_failed=:
33767 echo >>"$at_stdout"; $as_echo "A
33768 file
33769 file
33770 B
33771 .
33772 ./bar
33773 ./file
33774 ./foo
33775 ./foo.tar
33776 " | \
33777   $at_diff - "$at_stdout" || at_failed=:
33778 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06b.at:28"
33779 $at_failed && at_fn_log_failure
33780 $at_traceon; }
33781
33782
33783
33784
33785   set +x
33786   $at_times_p && times >"$at_times_file"
33787 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33788 read at_status <"$at_status_file"
33789 #AT_STOP_154
33790 #AT_START_155
33791 at_fn_group_banner 155 'remfiles06c.at:25' \
33792   "remove-files with -C:rel,abs in -r mode" "        " 24
33793 at_xfail=no
33794       test -f $XFAILFILE && at_xfail=yes
33795 (
33796   $as_echo "155. $at_setup_line: testing $at_desc ..."
33797   $at_traceon
33798
33799
33800
33801
33802
33803   { set +x
33804 $as_echo "$at_srcdir/remfiles06c.at:28:
33805 mkdir gnu
33806 (cd gnu
33807 TEST_TAR_FORMAT=gnu
33808 export TEST_TAR_FORMAT
33809 TAR_OPTIONS=\"-H gnu\"
33810 export TAR_OPTIONS
33811 rm -rf *
33812
33813
33814 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33815
33816 mkdir foo
33817 mkdir bar
33818 echo file > file
33819 echo foo/file > foo/file
33820 echo bar/file > bar/file
33821 DIR=\`pwd\`
33822 tar -cf foo.tar -C foo file -C \$DIR/bar file
33823 decho A
33824 find . | sort
33825 decho B
33826 tar -rvf foo.tar --remove-files -C foo file -C ../bar file
33827 decho C
33828 find . | sort
33829 )"
33830 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06c.at:28"
33831 ( $at_check_trace;
33832 mkdir gnu
33833 (cd gnu
33834 TEST_TAR_FORMAT=gnu
33835 export TEST_TAR_FORMAT
33836 TAR_OPTIONS="-H gnu"
33837 export TAR_OPTIONS
33838 rm -rf *
33839
33840
33841 test -z "`sort < /dev/null 2>&1`" || exit 77
33842
33843 mkdir foo
33844 mkdir bar
33845 echo file > file
33846 echo foo/file > foo/file
33847 echo bar/file > bar/file
33848 DIR=`pwd`
33849 tar -cf foo.tar -C foo file -C $DIR/bar file
33850 decho A
33851 find . | sort
33852 decho B
33853 tar -rvf foo.tar --remove-files -C foo file -C ../bar file
33854 decho C
33855 find . | sort
33856 )
33857 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33858 at_status=$? at_failed=false
33859 $at_check_filter
33860 echo >>"$at_stderr"; $as_echo "A
33861 B
33862 C
33863 " | \
33864   $at_diff - "$at_stderr" || at_failed=:
33865 echo >>"$at_stdout"; $as_echo "A
33866 .
33867 ./bar
33868 ./bar/file
33869 ./file
33870 ./foo
33871 ./foo.tar
33872 ./foo/file
33873 B
33874 file
33875 file
33876 C
33877 .
33878 ./bar
33879 ./file
33880 ./foo
33881 ./foo.tar
33882 " | \
33883   $at_diff - "$at_stdout" || at_failed=:
33884 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06c.at:28"
33885 $at_failed && at_fn_log_failure
33886 $at_traceon; }
33887
33888
33889
33890
33891   set +x
33892   $at_times_p && times >"$at_times_file"
33893 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33894 read at_status <"$at_status_file"
33895 #AT_STOP_155
33896 #AT_START_156
33897 at_fn_group_banner 156 'remfiles07a.at:25' \
33898   "remove-files with -C:rel,abs in -c/non-incr. mode" "" 24
33899 at_xfail=no
33900       test -f $XFAILFILE && at_xfail=yes
33901 (
33902   $as_echo "156. $at_setup_line: testing $at_desc ..."
33903   $at_traceon
33904
33905
33906
33907
33908
33909   { set +x
33910 $as_echo "$at_srcdir/remfiles07a.at:28:
33911 mkdir gnu
33912 (cd gnu
33913 TEST_TAR_FORMAT=gnu
33914 export TEST_TAR_FORMAT
33915 TAR_OPTIONS=\"-H gnu\"
33916 export TAR_OPTIONS
33917 rm -rf *
33918
33919
33920 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33921
33922 mkdir foo
33923 mkdir bar
33924 echo file > file
33925 echo foo/file > foo/file
33926 echo bar/file > bar/file
33927 DIR=\`pwd\`
33928 decho A
33929 tar -cvf foo.tar --remove-files -C foo file -C \$DIR/bar file
33930 decho B
33931 find . | sort
33932 )"
33933 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07a.at:28"
33934 ( $at_check_trace;
33935 mkdir gnu
33936 (cd gnu
33937 TEST_TAR_FORMAT=gnu
33938 export TEST_TAR_FORMAT
33939 TAR_OPTIONS="-H gnu"
33940 export TAR_OPTIONS
33941 rm -rf *
33942
33943
33944 test -z "`sort < /dev/null 2>&1`" || exit 77
33945
33946 mkdir foo
33947 mkdir bar
33948 echo file > file
33949 echo foo/file > foo/file
33950 echo bar/file > bar/file
33951 DIR=`pwd`
33952 decho A
33953 tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file
33954 decho B
33955 find . | sort
33956 )
33957 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33958 at_status=$? at_failed=false
33959 $at_check_filter
33960 echo >>"$at_stderr"; $as_echo "A
33961 B
33962 " | \
33963   $at_diff - "$at_stderr" || at_failed=:
33964 echo >>"$at_stdout"; $as_echo "A
33965 file
33966 file
33967 B
33968 .
33969 ./bar
33970 ./file
33971 ./foo
33972 ./foo.tar
33973 " | \
33974   $at_diff - "$at_stdout" || at_failed=:
33975 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07a.at:28"
33976 $at_failed && at_fn_log_failure
33977 $at_traceon; }
33978
33979
33980
33981
33982   set +x
33983   $at_times_p && times >"$at_times_file"
33984 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33985 read at_status <"$at_status_file"
33986 #AT_STOP_156
33987 #AT_START_157
33988 at_fn_group_banner 157 'remfiles07b.at:25' \
33989   "remove-files with -C:rel,abs in -c/incr. mode" "  " 24
33990 at_xfail=no
33991       test -f $XFAILFILE && at_xfail=yes
33992 (
33993   $as_echo "157. $at_setup_line: testing $at_desc ..."
33994   $at_traceon
33995
33996
33997
33998
33999
34000   { set +x
34001 $as_echo "$at_srcdir/remfiles07b.at:28:
34002 mkdir gnu
34003 (cd gnu
34004 TEST_TAR_FORMAT=gnu
34005 export TEST_TAR_FORMAT
34006 TAR_OPTIONS=\"-H gnu\"
34007 export TAR_OPTIONS
34008 rm -rf *
34009
34010
34011 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34012
34013 mkdir foo
34014 mkdir bar
34015 echo file > file
34016 echo foo/file > foo/file
34017 echo bar/file > bar/file
34018 DIR=\`pwd\`
34019 decho A
34020 tar -cvf foo.tar --incremental --remove-files -C foo file -C \$DIR/bar file
34021 decho B
34022 find . | sort
34023 )"
34024 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07b.at:28"
34025 ( $at_check_trace;
34026 mkdir gnu
34027 (cd gnu
34028 TEST_TAR_FORMAT=gnu
34029 export TEST_TAR_FORMAT
34030 TAR_OPTIONS="-H gnu"
34031 export TAR_OPTIONS
34032 rm -rf *
34033
34034
34035 test -z "`sort < /dev/null 2>&1`" || exit 77
34036
34037 mkdir foo
34038 mkdir bar
34039 echo file > file
34040 echo foo/file > foo/file
34041 echo bar/file > bar/file
34042 DIR=`pwd`
34043 decho A
34044 tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file
34045 decho B
34046 find . | sort
34047 )
34048 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34049 at_status=$? at_failed=false
34050 $at_check_filter
34051 echo >>"$at_stderr"; $as_echo "A
34052 B
34053 " | \
34054   $at_diff - "$at_stderr" || at_failed=:
34055 echo >>"$at_stdout"; $as_echo "A
34056 file
34057 file
34058 B
34059 .
34060 ./bar
34061 ./file
34062 ./foo
34063 ./foo.tar
34064 " | \
34065   $at_diff - "$at_stdout" || at_failed=:
34066 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07b.at:28"
34067 $at_failed && at_fn_log_failure
34068 $at_traceon; }
34069
34070
34071
34072
34073   set +x
34074   $at_times_p && times >"$at_times_file"
34075 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34076 read at_status <"$at_status_file"
34077 #AT_STOP_157
34078 #AT_START_158
34079 at_fn_group_banner 158 'remfiles07c.at:25' \
34080   "remove-files with -C:rel,abs in -r mode" "        " 24
34081 at_xfail=no
34082       test -f $XFAILFILE && at_xfail=yes
34083 (
34084   $as_echo "158. $at_setup_line: testing $at_desc ..."
34085   $at_traceon
34086
34087
34088
34089
34090
34091   { set +x
34092 $as_echo "$at_srcdir/remfiles07c.at:28:
34093 mkdir gnu
34094 (cd gnu
34095 TEST_TAR_FORMAT=gnu
34096 export TEST_TAR_FORMAT
34097 TAR_OPTIONS=\"-H gnu\"
34098 export TAR_OPTIONS
34099 rm -rf *
34100
34101
34102 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34103
34104 mkdir foo
34105 mkdir bar
34106 echo file > file
34107 echo foo/file > foo/file
34108 echo bar/file > bar/file
34109 DIR=\`pwd\`
34110 tar -cf foo.tar -C foo file -C \$DIR/bar file
34111 decho A
34112 find . | sort
34113 decho B
34114 tar -rvf foo.tar --remove-files -C foo file -C \$DIR/bar file
34115 decho C
34116 find . | sort
34117 )"
34118 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07c.at:28"
34119 ( $at_check_trace;
34120 mkdir gnu
34121 (cd gnu
34122 TEST_TAR_FORMAT=gnu
34123 export TEST_TAR_FORMAT
34124 TAR_OPTIONS="-H gnu"
34125 export TAR_OPTIONS
34126 rm -rf *
34127
34128
34129 test -z "`sort < /dev/null 2>&1`" || exit 77
34130
34131 mkdir foo
34132 mkdir bar
34133 echo file > file
34134 echo foo/file > foo/file
34135 echo bar/file > bar/file
34136 DIR=`pwd`
34137 tar -cf foo.tar -C foo file -C $DIR/bar file
34138 decho A
34139 find . | sort
34140 decho B
34141 tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file
34142 decho C
34143 find . | sort
34144 )
34145 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34146 at_status=$? at_failed=false
34147 $at_check_filter
34148 echo >>"$at_stderr"; $as_echo "A
34149 B
34150 C
34151 " | \
34152   $at_diff - "$at_stderr" || at_failed=:
34153 echo >>"$at_stdout"; $as_echo "A
34154 .
34155 ./bar
34156 ./bar/file
34157 ./file
34158 ./foo
34159 ./foo.tar
34160 ./foo/file
34161 B
34162 file
34163 file
34164 C
34165 .
34166 ./bar
34167 ./file
34168 ./foo
34169 ./foo.tar
34170 " | \
34171   $at_diff - "$at_stdout" || at_failed=:
34172 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07c.at:28"
34173 $at_failed && at_fn_log_failure
34174 $at_traceon; }
34175
34176
34177
34178
34179   set +x
34180   $at_times_p && times >"$at_times_file"
34181 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34182 read at_status <"$at_status_file"
34183 #AT_STOP_158
34184 #AT_START_159
34185 at_fn_group_banner 159 'remfiles08a.at:25' \
34186   "remove-files with -C:abs,rel in -c/non-incr. mode" "" 24
34187 at_xfail=no
34188       test -f $XFAILFILE && at_xfail=yes
34189 (
34190   $as_echo "159. $at_setup_line: testing $at_desc ..."
34191   $at_traceon
34192
34193
34194
34195
34196
34197   { set +x
34198 $as_echo "$at_srcdir/remfiles08a.at:28:
34199 mkdir gnu
34200 (cd gnu
34201 TEST_TAR_FORMAT=gnu
34202 export TEST_TAR_FORMAT
34203 TAR_OPTIONS=\"-H gnu\"
34204 export TAR_OPTIONS
34205 rm -rf *
34206
34207
34208 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34209
34210 mkdir foo
34211 mkdir bar
34212 echo file > file
34213 echo foo/file > foo/file
34214 echo bar/file > bar/file
34215 DIR=\`pwd\`
34216 decho A
34217 tar -cvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
34218 decho B
34219 find . | sort
34220 )"
34221 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08a.at:28"
34222 ( $at_check_trace;
34223 mkdir gnu
34224 (cd gnu
34225 TEST_TAR_FORMAT=gnu
34226 export TEST_TAR_FORMAT
34227 TAR_OPTIONS="-H gnu"
34228 export TAR_OPTIONS
34229 rm -rf *
34230
34231
34232 test -z "`sort < /dev/null 2>&1`" || exit 77
34233
34234 mkdir foo
34235 mkdir bar
34236 echo file > file
34237 echo foo/file > foo/file
34238 echo bar/file > bar/file
34239 DIR=`pwd`
34240 decho A
34241 tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
34242 decho B
34243 find . | sort
34244 )
34245 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34246 at_status=$? at_failed=false
34247 $at_check_filter
34248 echo >>"$at_stderr"; $as_echo "A
34249 B
34250 " | \
34251   $at_diff - "$at_stderr" || at_failed=:
34252 echo >>"$at_stdout"; $as_echo "A
34253 file
34254 file
34255 B
34256 .
34257 ./bar
34258 ./file
34259 ./foo
34260 ./foo.tar
34261 " | \
34262   $at_diff - "$at_stdout" || at_failed=:
34263 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08a.at:28"
34264 $at_failed && at_fn_log_failure
34265 $at_traceon; }
34266
34267
34268
34269
34270   set +x
34271   $at_times_p && times >"$at_times_file"
34272 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34273 read at_status <"$at_status_file"
34274 #AT_STOP_159
34275 #AT_START_160
34276 at_fn_group_banner 160 'remfiles08b.at:25' \
34277   "remove-files with -C:abs,rel in -c/incr. mode" "  " 24
34278 at_xfail=no
34279       test -f $XFAILFILE && at_xfail=yes
34280 (
34281   $as_echo "160. $at_setup_line: testing $at_desc ..."
34282   $at_traceon
34283
34284
34285
34286
34287
34288   { set +x
34289 $as_echo "$at_srcdir/remfiles08b.at:28:
34290 mkdir gnu
34291 (cd gnu
34292 TEST_TAR_FORMAT=gnu
34293 export TEST_TAR_FORMAT
34294 TAR_OPTIONS=\"-H gnu\"
34295 export TAR_OPTIONS
34296 rm -rf *
34297
34298
34299 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34300
34301 mkdir foo
34302 mkdir bar
34303 echo file > file
34304 echo foo/file > foo/file
34305 echo bar/file > bar/file
34306 DIR=\`pwd\`
34307 decho A
34308 tar -cvf foo.tar --incremental --remove-files -C \$DIR/foo file -C ../bar file
34309 decho B
34310 find . | sort
34311 )"
34312 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08b.at:28"
34313 ( $at_check_trace;
34314 mkdir gnu
34315 (cd gnu
34316 TEST_TAR_FORMAT=gnu
34317 export TEST_TAR_FORMAT
34318 TAR_OPTIONS="-H gnu"
34319 export TAR_OPTIONS
34320 rm -rf *
34321
34322
34323 test -z "`sort < /dev/null 2>&1`" || exit 77
34324
34325 mkdir foo
34326 mkdir bar
34327 echo file > file
34328 echo foo/file > foo/file
34329 echo bar/file > bar/file
34330 DIR=`pwd`
34331 decho A
34332 tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file
34333 decho B
34334 find . | sort
34335 )
34336 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34337 at_status=$? at_failed=false
34338 $at_check_filter
34339 echo >>"$at_stderr"; $as_echo "A
34340 B
34341 " | \
34342   $at_diff - "$at_stderr" || at_failed=:
34343 echo >>"$at_stdout"; $as_echo "A
34344 file
34345 file
34346 B
34347 .
34348 ./bar
34349 ./file
34350 ./foo
34351 ./foo.tar
34352 " | \
34353   $at_diff - "$at_stdout" || at_failed=:
34354 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08b.at:28"
34355 $at_failed && at_fn_log_failure
34356 $at_traceon; }
34357
34358
34359
34360
34361   set +x
34362   $at_times_p && times >"$at_times_file"
34363 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34364 read at_status <"$at_status_file"
34365 #AT_STOP_160
34366 #AT_START_161
34367 at_fn_group_banner 161 'remfiles08c.at:25' \
34368   "remove-files with -C:abs,rel in -r mode" "        " 24
34369 at_xfail=no
34370       test -f $XFAILFILE && at_xfail=yes
34371 (
34372   $as_echo "161. $at_setup_line: testing $at_desc ..."
34373   $at_traceon
34374
34375
34376
34377
34378
34379   { set +x
34380 $as_echo "$at_srcdir/remfiles08c.at:28:
34381 mkdir gnu
34382 (cd gnu
34383 TEST_TAR_FORMAT=gnu
34384 export TEST_TAR_FORMAT
34385 TAR_OPTIONS=\"-H gnu\"
34386 export TAR_OPTIONS
34387 rm -rf *
34388
34389
34390 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34391
34392 mkdir foo
34393 mkdir bar
34394 echo file > file
34395 echo foo/file > foo/file
34396 echo bar/file > bar/file
34397 DIR=\`pwd\`
34398 tar -cf foo.tar -C \$DIR/foo file -C ../bar file
34399 decho A
34400 find . | sort
34401 decho B
34402 tar -rvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
34403 decho C
34404 find . | sort
34405 )"
34406 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:28"
34407 ( $at_check_trace;
34408 mkdir gnu
34409 (cd gnu
34410 TEST_TAR_FORMAT=gnu
34411 export TEST_TAR_FORMAT
34412 TAR_OPTIONS="-H gnu"
34413 export TAR_OPTIONS
34414 rm -rf *
34415
34416
34417 test -z "`sort < /dev/null 2>&1`" || exit 77
34418
34419 mkdir foo
34420 mkdir bar
34421 echo file > file
34422 echo foo/file > foo/file
34423 echo bar/file > bar/file
34424 DIR=`pwd`
34425 tar -cf foo.tar -C $DIR/foo file -C ../bar file
34426 decho A
34427 find . | sort
34428 decho B
34429 tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
34430 decho C
34431 find . | sort
34432 )
34433 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34434 at_status=$? at_failed=false
34435 $at_check_filter
34436 echo >>"$at_stderr"; $as_echo "A
34437 B
34438 C
34439 " | \
34440   $at_diff - "$at_stderr" || at_failed=:
34441 echo >>"$at_stdout"; $as_echo "A
34442 .
34443 ./bar
34444 ./bar/file
34445 ./file
34446 ./foo
34447 ./foo.tar
34448 ./foo/file
34449 B
34450 file
34451 file
34452 C
34453 .
34454 ./bar
34455 ./file
34456 ./foo
34457 ./foo.tar
34458 " | \
34459   $at_diff - "$at_stdout" || at_failed=:
34460 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08c.at:28"
34461 $at_failed && at_fn_log_failure
34462 $at_traceon; }
34463
34464
34465
34466
34467   set +x
34468   $at_times_p && times >"$at_times_file"
34469 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34470 read at_status <"$at_status_file"
34471 #AT_STOP_161
34472 #AT_START_162
34473 at_fn_group_banner 162 'remfiles09a.at:25' \
34474   "remove-files on full directory in -c/non-incr. mode" "" 24
34475 at_xfail=no
34476       test -f $XFAILFILE && at_xfail=yes
34477 (
34478   $as_echo "162. $at_setup_line: testing $at_desc ..."
34479   $at_traceon
34480
34481
34482
34483
34484
34485   { set +x
34486 $as_echo "$at_srcdir/remfiles09a.at:28:
34487 mkdir gnu
34488 (cd gnu
34489 TEST_TAR_FORMAT=gnu
34490 export TEST_TAR_FORMAT
34491 TAR_OPTIONS=\"-H gnu\"
34492 export TAR_OPTIONS
34493 rm -rf *
34494
34495 mkdir foo
34496 echo foo/file > foo/file
34497 decho A
34498 tar -cvf foo.tar --remove-files foo
34499 decho B
34500 find .
34501 )"
34502 at_fn_check_prepare_notrace 'an embedded newline' "remfiles09a.at:28"
34503 ( $at_check_trace;
34504 mkdir gnu
34505 (cd gnu
34506 TEST_TAR_FORMAT=gnu
34507 export TEST_TAR_FORMAT
34508 TAR_OPTIONS="-H gnu"
34509 export TAR_OPTIONS
34510 rm -rf *
34511
34512 mkdir foo
34513 echo foo/file > foo/file
34514 decho A
34515 tar -cvf foo.tar --remove-files foo
34516 decho B
34517 find .
34518 )
34519 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34520 at_status=$? at_failed=false
34521 $at_check_filter
34522 echo >>"$at_stderr"; $as_echo "A
34523 B
34524 " | \
34525   $at_diff - "$at_stderr" || at_failed=:
34526 echo >>"$at_stdout"; $as_echo "A
34527 foo/
34528 foo/file
34529 B
34530 .
34531 ./foo.tar
34532 " | \
34533   $at_diff - "$at_stdout" || at_failed=:
34534 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09a.at:28"
34535 $at_failed && at_fn_log_failure
34536 $at_traceon; }
34537
34538
34539
34540
34541   set +x
34542   $at_times_p && times >"$at_times_file"
34543 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34544 read at_status <"$at_status_file"
34545 #AT_STOP_162
34546 #AT_START_163
34547 at_fn_group_banner 163 'remfiles09b.at:29' \
34548   "remove-files on full directory in -c/incr. mode" "" 24
34549 at_xfail=yes
34550       test -f $XFAILFILE && at_xfail=yes
34551 (
34552   $as_echo "163. $at_setup_line: testing $at_desc ..."
34553   $at_traceon
34554
34555
34556
34557  # we expect to fail in tar 1.27
34558
34559
34560
34561   { set +x
34562 $as_echo "$at_srcdir/remfiles09b.at:34:
34563 mkdir gnu
34564 (cd gnu
34565 TEST_TAR_FORMAT=gnu
34566 export TEST_TAR_FORMAT
34567 TAR_OPTIONS=\"-H gnu\"
34568 export TAR_OPTIONS
34569 rm -rf *
34570
34571
34572 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34573
34574 mkdir foo
34575 echo foo/file > foo/file
34576 decho A
34577 tar -cvf foo.tar --incremental --remove-files foo
34578 TARSTAT=\$?
34579 decho B
34580 find .
34581 )"
34582 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles09b.at:34"
34583 ( $at_check_trace;
34584 mkdir gnu
34585 (cd gnu
34586 TEST_TAR_FORMAT=gnu
34587 export TEST_TAR_FORMAT
34588 TAR_OPTIONS="-H gnu"
34589 export TAR_OPTIONS
34590 rm -rf *
34591
34592
34593 test -z "`sort < /dev/null 2>&1`" || exit 77
34594
34595 mkdir foo
34596 echo foo/file > foo/file
34597 decho A
34598 tar -cvf foo.tar --incremental --remove-files foo
34599 TARSTAT=$?
34600 decho B
34601 find .
34602 )
34603 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34604 at_status=$? at_failed=false
34605 $at_check_filter
34606 echo >>"$at_stderr"; $as_echo "A
34607 tar: foo: Directory is new
34608 B
34609 " | \
34610   $at_diff - "$at_stderr" || at_failed=:
34611 echo >>"$at_stdout"; $as_echo "A
34612 foo/
34613 foo/file
34614 B
34615 .
34616 ./foo
34617 ./foo.tar
34618 " | \
34619   $at_diff - "$at_stdout" || at_failed=:
34620 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09b.at:34"
34621 $at_failed && at_fn_log_failure
34622 $at_traceon; }
34623
34624
34625
34626
34627   set +x
34628   $at_times_p && times >"$at_times_file"
34629 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34630 read at_status <"$at_status_file"
34631 #AT_STOP_163
34632 #AT_START_164
34633 at_fn_group_banner 164 'remfiles09c.at:25' \
34634   "remove-files on full directory in -r mode" "      " 24
34635 at_xfail=no
34636       test -f $XFAILFILE && at_xfail=yes
34637 (
34638   $as_echo "164. $at_setup_line: testing $at_desc ..."
34639   $at_traceon
34640
34641
34642
34643
34644
34645   { set +x
34646 $as_echo "$at_srcdir/remfiles09c.at:28:
34647 mkdir gnu
34648 (cd gnu
34649 TEST_TAR_FORMAT=gnu
34650 export TEST_TAR_FORMAT
34651 TAR_OPTIONS=\"-H gnu\"
34652 export TAR_OPTIONS
34653 rm -rf *
34654
34655
34656 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34657
34658 mkdir foo
34659 echo foo/file > foo/file
34660 tar -cf foo.tar foo
34661 decho A
34662 find . | sort
34663 decho B
34664 tar -rvf foo.tar --remove-files foo
34665 decho C
34666 find . | sort
34667 )"
34668 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles09c.at:28"
34669 ( $at_check_trace;
34670 mkdir gnu
34671 (cd gnu
34672 TEST_TAR_FORMAT=gnu
34673 export TEST_TAR_FORMAT
34674 TAR_OPTIONS="-H gnu"
34675 export TAR_OPTIONS
34676 rm -rf *
34677
34678
34679 test -z "`sort < /dev/null 2>&1`" || exit 77
34680
34681 mkdir foo
34682 echo foo/file > foo/file
34683 tar -cf foo.tar foo
34684 decho A
34685 find . | sort
34686 decho B
34687 tar -rvf foo.tar --remove-files foo
34688 decho C
34689 find . | sort
34690 )
34691 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34692 at_status=$? at_failed=false
34693 $at_check_filter
34694 echo >>"$at_stderr"; $as_echo "A
34695 B
34696 C
34697 " | \
34698   $at_diff - "$at_stderr" || at_failed=:
34699 echo >>"$at_stdout"; $as_echo "A
34700 .
34701 ./foo
34702 ./foo.tar
34703 ./foo/file
34704 B
34705 foo/
34706 foo/file
34707 C
34708 .
34709 ./foo.tar
34710 " | \
34711   $at_diff - "$at_stdout" || at_failed=:
34712 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09c.at:28"
34713 $at_failed && at_fn_log_failure
34714 $at_traceon; }
34715
34716
34717
34718
34719   set +x
34720   $at_times_p && times >"$at_times_file"
34721 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34722 read at_status <"$at_status_file"
34723 #AT_STOP_164
34724 #AT_START_165
34725 at_fn_group_banner 165 'xattr01.at:25' \
34726   "xattrs: basic functionality" "                    " 25
34727 at_xfail=no
34728       test -f $XFAILFILE && at_xfail=yes
34729 (
34730   $as_echo "165. $at_setup_line: testing $at_desc ..."
34731   $at_traceon
34732
34733
34734
34735
34736
34737   { set +x
34738 $as_echo "$at_srcdir/xattr01.at:28:
34739 mkdir v7
34740 (cd v7
34741 TEST_TAR_FORMAT=v7
34742 export TEST_TAR_FORMAT
34743 TAR_OPTIONS=\"-H v7\"
34744 export TAR_OPTIONS
34745 rm -rf *
34746
34747
34748
34749   file=\$(TMPDIR=. mktemp fiXXXXXX)
34750
34751   setfattr -n user.test -v test \$file &> /dev/null
34752   if test \"\$?\" != 0; then
34753     exit 77
34754   fi
34755
34756
34757   getfattr \$file &> /dev/null
34758   if test \"\$?\" != 0; then
34759     exit 77
34760   fi
34761
34762
34763   file=\$(TMPDIR=. mktemp fiXXXXXX)
34764   setfattr -n user.test -v ahoj \$file
34765   # check whether tar fails to store xattrs
34766   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
34767   if test \"\$err\" != \"0\"; then
34768     exit 77
34769   fi
34770
34771 mkdir dir
34772 genfile --file dir/file
34773
34774 setfattr -n user.test -v OurDirValue dir
34775 setfattr -n user.test -v OurFileValue dir/file
34776
34777 tar --xattrs -cf archive.tar dir
34778
34779 rm -rf dir
34780 tar --xattrs -xf archive.tar
34781
34782 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
34783 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
34784 )"
34785 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
34786 ( $at_check_trace;
34787 mkdir v7
34788 (cd v7
34789 TEST_TAR_FORMAT=v7
34790 export TEST_TAR_FORMAT
34791 TAR_OPTIONS="-H v7"
34792 export TAR_OPTIONS
34793 rm -rf *
34794
34795
34796
34797   file=$(TMPDIR=. mktemp fiXXXXXX)
34798
34799   setfattr -n user.test -v test $file &> /dev/null
34800   if test "$?" != 0; then
34801     exit 77
34802   fi
34803
34804
34805   getfattr $file &> /dev/null
34806   if test "$?" != 0; then
34807     exit 77
34808   fi
34809
34810
34811   file=$(TMPDIR=. mktemp fiXXXXXX)
34812   setfattr -n user.test -v ahoj $file
34813   # check whether tar fails to store xattrs
34814   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
34815   if test "$err" != "0"; then
34816     exit 77
34817   fi
34818
34819 mkdir dir
34820 genfile --file dir/file
34821
34822 setfattr -n user.test -v OurDirValue dir
34823 setfattr -n user.test -v OurFileValue dir/file
34824
34825 tar --xattrs -cf archive.tar dir
34826
34827 rm -rf dir
34828 tar --xattrs -xf archive.tar
34829
34830 getfattr -h -d dir         | grep -v -e '^#' -e ^$
34831 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
34832 )
34833 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34834 at_status=$? at_failed=false
34835 $at_check_filter
34836 at_fn_diff_devnull "$at_stderr" || at_failed=:
34837 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
34838 user.test=\"OurFileValue\"
34839 " | \
34840   $at_diff - "$at_stdout" || at_failed=:
34841 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
34842 $at_failed && at_fn_log_failure
34843 $at_traceon; }
34844
34845               { set +x
34846 $as_echo "$at_srcdir/xattr01.at:28:
34847 mkdir oldgnu
34848 (cd oldgnu
34849 TEST_TAR_FORMAT=oldgnu
34850 export TEST_TAR_FORMAT
34851 TAR_OPTIONS=\"-H oldgnu\"
34852 export TAR_OPTIONS
34853 rm -rf *
34854
34855
34856
34857   file=\$(TMPDIR=. mktemp fiXXXXXX)
34858
34859   setfattr -n user.test -v test \$file &> /dev/null
34860   if test \"\$?\" != 0; then
34861     exit 77
34862   fi
34863
34864
34865   getfattr \$file &> /dev/null
34866   if test \"\$?\" != 0; then
34867     exit 77
34868   fi
34869
34870
34871   file=\$(TMPDIR=. mktemp fiXXXXXX)
34872   setfattr -n user.test -v ahoj \$file
34873   # check whether tar fails to store xattrs
34874   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
34875   if test \"\$err\" != \"0\"; then
34876     exit 77
34877   fi
34878
34879 mkdir dir
34880 genfile --file dir/file
34881
34882 setfattr -n user.test -v OurDirValue dir
34883 setfattr -n user.test -v OurFileValue dir/file
34884
34885 tar --xattrs -cf archive.tar dir
34886
34887 rm -rf dir
34888 tar --xattrs -xf archive.tar
34889
34890 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
34891 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
34892 )"
34893 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
34894 ( $at_check_trace;
34895 mkdir oldgnu
34896 (cd oldgnu
34897 TEST_TAR_FORMAT=oldgnu
34898 export TEST_TAR_FORMAT
34899 TAR_OPTIONS="-H oldgnu"
34900 export TAR_OPTIONS
34901 rm -rf *
34902
34903
34904
34905   file=$(TMPDIR=. mktemp fiXXXXXX)
34906
34907   setfattr -n user.test -v test $file &> /dev/null
34908   if test "$?" != 0; then
34909     exit 77
34910   fi
34911
34912
34913   getfattr $file &> /dev/null
34914   if test "$?" != 0; then
34915     exit 77
34916   fi
34917
34918
34919   file=$(TMPDIR=. mktemp fiXXXXXX)
34920   setfattr -n user.test -v ahoj $file
34921   # check whether tar fails to store xattrs
34922   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
34923   if test "$err" != "0"; then
34924     exit 77
34925   fi
34926
34927 mkdir dir
34928 genfile --file dir/file
34929
34930 setfattr -n user.test -v OurDirValue dir
34931 setfattr -n user.test -v OurFileValue dir/file
34932
34933 tar --xattrs -cf archive.tar dir
34934
34935 rm -rf dir
34936 tar --xattrs -xf archive.tar
34937
34938 getfattr -h -d dir         | grep -v -e '^#' -e ^$
34939 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
34940 )
34941 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34942 at_status=$? at_failed=false
34943 $at_check_filter
34944 at_fn_diff_devnull "$at_stderr" || at_failed=:
34945 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
34946 user.test=\"OurFileValue\"
34947 " | \
34948   $at_diff - "$at_stdout" || at_failed=:
34949 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
34950 $at_failed && at_fn_log_failure
34951 $at_traceon; }
34952
34953               { set +x
34954 $as_echo "$at_srcdir/xattr01.at:28:
34955 mkdir ustar
34956 (cd ustar
34957 TEST_TAR_FORMAT=ustar
34958 export TEST_TAR_FORMAT
34959 TAR_OPTIONS=\"-H ustar\"
34960 export TAR_OPTIONS
34961 rm -rf *
34962
34963
34964
34965   file=\$(TMPDIR=. mktemp fiXXXXXX)
34966
34967   setfattr -n user.test -v test \$file &> /dev/null
34968   if test \"\$?\" != 0; then
34969     exit 77
34970   fi
34971
34972
34973   getfattr \$file &> /dev/null
34974   if test \"\$?\" != 0; then
34975     exit 77
34976   fi
34977
34978
34979   file=\$(TMPDIR=. mktemp fiXXXXXX)
34980   setfattr -n user.test -v ahoj \$file
34981   # check whether tar fails to store xattrs
34982   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
34983   if test \"\$err\" != \"0\"; then
34984     exit 77
34985   fi
34986
34987 mkdir dir
34988 genfile --file dir/file
34989
34990 setfattr -n user.test -v OurDirValue dir
34991 setfattr -n user.test -v OurFileValue dir/file
34992
34993 tar --xattrs -cf archive.tar dir
34994
34995 rm -rf dir
34996 tar --xattrs -xf archive.tar
34997
34998 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
34999 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
35000 )"
35001 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
35002 ( $at_check_trace;
35003 mkdir ustar
35004 (cd ustar
35005 TEST_TAR_FORMAT=ustar
35006 export TEST_TAR_FORMAT
35007 TAR_OPTIONS="-H ustar"
35008 export TAR_OPTIONS
35009 rm -rf *
35010
35011
35012
35013   file=$(TMPDIR=. mktemp fiXXXXXX)
35014
35015   setfattr -n user.test -v test $file &> /dev/null
35016   if test "$?" != 0; then
35017     exit 77
35018   fi
35019
35020
35021   getfattr $file &> /dev/null
35022   if test "$?" != 0; then
35023     exit 77
35024   fi
35025
35026
35027   file=$(TMPDIR=. mktemp fiXXXXXX)
35028   setfattr -n user.test -v ahoj $file
35029   # check whether tar fails to store xattrs
35030   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35031   if test "$err" != "0"; then
35032     exit 77
35033   fi
35034
35035 mkdir dir
35036 genfile --file dir/file
35037
35038 setfattr -n user.test -v OurDirValue dir
35039 setfattr -n user.test -v OurFileValue dir/file
35040
35041 tar --xattrs -cf archive.tar dir
35042
35043 rm -rf dir
35044 tar --xattrs -xf archive.tar
35045
35046 getfattr -h -d dir         | grep -v -e '^#' -e ^$
35047 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
35048 )
35049 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35050 at_status=$? at_failed=false
35051 $at_check_filter
35052 at_fn_diff_devnull "$at_stderr" || at_failed=:
35053 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
35054 user.test=\"OurFileValue\"
35055 " | \
35056   $at_diff - "$at_stdout" || at_failed=:
35057 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
35058 $at_failed && at_fn_log_failure
35059 $at_traceon; }
35060
35061               { set +x
35062 $as_echo "$at_srcdir/xattr01.at:28:
35063 mkdir posix
35064 (cd posix
35065 TEST_TAR_FORMAT=posix
35066 export TEST_TAR_FORMAT
35067 TAR_OPTIONS=\"-H posix\"
35068 export TAR_OPTIONS
35069 rm -rf *
35070
35071
35072
35073   file=\$(TMPDIR=. mktemp fiXXXXXX)
35074
35075   setfattr -n user.test -v test \$file &> /dev/null
35076   if test \"\$?\" != 0; then
35077     exit 77
35078   fi
35079
35080
35081   getfattr \$file &> /dev/null
35082   if test \"\$?\" != 0; then
35083     exit 77
35084   fi
35085
35086
35087   file=\$(TMPDIR=. mktemp fiXXXXXX)
35088   setfattr -n user.test -v ahoj \$file
35089   # check whether tar fails to store xattrs
35090   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35091   if test \"\$err\" != \"0\"; then
35092     exit 77
35093   fi
35094
35095 mkdir dir
35096 genfile --file dir/file
35097
35098 setfattr -n user.test -v OurDirValue dir
35099 setfattr -n user.test -v OurFileValue dir/file
35100
35101 tar --xattrs -cf archive.tar dir
35102
35103 rm -rf dir
35104 tar --xattrs -xf archive.tar
35105
35106 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
35107 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
35108 )"
35109 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
35110 ( $at_check_trace;
35111 mkdir posix
35112 (cd posix
35113 TEST_TAR_FORMAT=posix
35114 export TEST_TAR_FORMAT
35115 TAR_OPTIONS="-H posix"
35116 export TAR_OPTIONS
35117 rm -rf *
35118
35119
35120
35121   file=$(TMPDIR=. mktemp fiXXXXXX)
35122
35123   setfattr -n user.test -v test $file &> /dev/null
35124   if test "$?" != 0; then
35125     exit 77
35126   fi
35127
35128
35129   getfattr $file &> /dev/null
35130   if test "$?" != 0; then
35131     exit 77
35132   fi
35133
35134
35135   file=$(TMPDIR=. mktemp fiXXXXXX)
35136   setfattr -n user.test -v ahoj $file
35137   # check whether tar fails to store xattrs
35138   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35139   if test "$err" != "0"; then
35140     exit 77
35141   fi
35142
35143 mkdir dir
35144 genfile --file dir/file
35145
35146 setfattr -n user.test -v OurDirValue dir
35147 setfattr -n user.test -v OurFileValue dir/file
35148
35149 tar --xattrs -cf archive.tar dir
35150
35151 rm -rf dir
35152 tar --xattrs -xf archive.tar
35153
35154 getfattr -h -d dir         | grep -v -e '^#' -e ^$
35155 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
35156 )
35157 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35158 at_status=$? at_failed=false
35159 $at_check_filter
35160 at_fn_diff_devnull "$at_stderr" || at_failed=:
35161 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
35162 user.test=\"OurFileValue\"
35163 " | \
35164   $at_diff - "$at_stdout" || at_failed=:
35165 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
35166 $at_failed && at_fn_log_failure
35167 $at_traceon; }
35168
35169               { set +x
35170 $as_echo "$at_srcdir/xattr01.at:28:
35171 mkdir gnu
35172 (cd gnu
35173 TEST_TAR_FORMAT=gnu
35174 export TEST_TAR_FORMAT
35175 TAR_OPTIONS=\"-H gnu\"
35176 export TAR_OPTIONS
35177 rm -rf *
35178
35179
35180
35181   file=\$(TMPDIR=. mktemp fiXXXXXX)
35182
35183   setfattr -n user.test -v test \$file &> /dev/null
35184   if test \"\$?\" != 0; then
35185     exit 77
35186   fi
35187
35188
35189   getfattr \$file &> /dev/null
35190   if test \"\$?\" != 0; then
35191     exit 77
35192   fi
35193
35194
35195   file=\$(TMPDIR=. mktemp fiXXXXXX)
35196   setfattr -n user.test -v ahoj \$file
35197   # check whether tar fails to store xattrs
35198   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35199   if test \"\$err\" != \"0\"; then
35200     exit 77
35201   fi
35202
35203 mkdir dir
35204 genfile --file dir/file
35205
35206 setfattr -n user.test -v OurDirValue dir
35207 setfattr -n user.test -v OurFileValue dir/file
35208
35209 tar --xattrs -cf archive.tar dir
35210
35211 rm -rf dir
35212 tar --xattrs -xf archive.tar
35213
35214 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
35215 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
35216 )"
35217 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
35218 ( $at_check_trace;
35219 mkdir gnu
35220 (cd gnu
35221 TEST_TAR_FORMAT=gnu
35222 export TEST_TAR_FORMAT
35223 TAR_OPTIONS="-H gnu"
35224 export TAR_OPTIONS
35225 rm -rf *
35226
35227
35228
35229   file=$(TMPDIR=. mktemp fiXXXXXX)
35230
35231   setfattr -n user.test -v test $file &> /dev/null
35232   if test "$?" != 0; then
35233     exit 77
35234   fi
35235
35236
35237   getfattr $file &> /dev/null
35238   if test "$?" != 0; then
35239     exit 77
35240   fi
35241
35242
35243   file=$(TMPDIR=. mktemp fiXXXXXX)
35244   setfattr -n user.test -v ahoj $file
35245   # check whether tar fails to store xattrs
35246   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35247   if test "$err" != "0"; then
35248     exit 77
35249   fi
35250
35251 mkdir dir
35252 genfile --file dir/file
35253
35254 setfattr -n user.test -v OurDirValue dir
35255 setfattr -n user.test -v OurFileValue dir/file
35256
35257 tar --xattrs -cf archive.tar dir
35258
35259 rm -rf dir
35260 tar --xattrs -xf archive.tar
35261
35262 getfattr -h -d dir         | grep -v -e '^#' -e ^$
35263 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
35264 )
35265 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35266 at_status=$? at_failed=false
35267 $at_check_filter
35268 at_fn_diff_devnull "$at_stderr" || at_failed=:
35269 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
35270 user.test=\"OurFileValue\"
35271 " | \
35272   $at_diff - "$at_stdout" || at_failed=:
35273 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
35274 $at_failed && at_fn_log_failure
35275 $at_traceon; }
35276
35277
35278
35279
35280   set +x
35281   $at_times_p && times >"$at_times_file"
35282 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35283 read at_status <"$at_status_file"
35284 #AT_STOP_165
35285 #AT_START_166
35286 at_fn_group_banner 166 'xattr02.at:25' \
35287   "xattrs: change directory with -C option" "        " 25
35288 at_xfail=no
35289       test -f $XFAILFILE && at_xfail=yes
35290 (
35291   $as_echo "166. $at_setup_line: testing $at_desc ..."
35292   $at_traceon
35293
35294
35295
35296
35297
35298   { set +x
35299 $as_echo "$at_srcdir/xattr02.at:28:
35300 mkdir v7
35301 (cd v7
35302 TEST_TAR_FORMAT=v7
35303 export TEST_TAR_FORMAT
35304 TAR_OPTIONS=\"-H v7\"
35305 export TAR_OPTIONS
35306 rm -rf *
35307
35308
35309
35310   file=\$(TMPDIR=. mktemp fiXXXXXX)
35311
35312   setfattr -n user.test -v test \$file &> /dev/null
35313   if test \"\$?\" != 0; then
35314     exit 77
35315   fi
35316
35317
35318   getfattr \$file &> /dev/null
35319   if test \"\$?\" != 0; then
35320     exit 77
35321   fi
35322
35323
35324   file=\$(TMPDIR=. mktemp fiXXXXXX)
35325   setfattr -n user.test -v ahoj \$file
35326   # check whether tar fails to store xattrs
35327   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35328   if test \"\$err\" != \"0\"; then
35329     exit 77
35330   fi
35331
35332
35333 mkdir dir
35334 mkdir dir/subdir
35335 mkdir dir/subdir/subsubdir
35336 genfile --file dir/file1
35337 genfile --file dir/subdir/file2
35338
35339 setfattr -n user.test -v OurFile1Value dir/file1
35340 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35341 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35342
35343 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35344
35345 rm -rf dir
35346
35347 tar --xattrs -xf archive.tar
35348
35349 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
35350 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
35351 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
35352 )"
35353 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
35354 ( $at_check_trace;
35355 mkdir v7
35356 (cd v7
35357 TEST_TAR_FORMAT=v7
35358 export TEST_TAR_FORMAT
35359 TAR_OPTIONS="-H v7"
35360 export TAR_OPTIONS
35361 rm -rf *
35362
35363
35364
35365   file=$(TMPDIR=. mktemp fiXXXXXX)
35366
35367   setfattr -n user.test -v test $file &> /dev/null
35368   if test "$?" != 0; then
35369     exit 77
35370   fi
35371
35372
35373   getfattr $file &> /dev/null
35374   if test "$?" != 0; then
35375     exit 77
35376   fi
35377
35378
35379   file=$(TMPDIR=. mktemp fiXXXXXX)
35380   setfattr -n user.test -v ahoj $file
35381   # check whether tar fails to store xattrs
35382   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35383   if test "$err" != "0"; then
35384     exit 77
35385   fi
35386
35387
35388 mkdir dir
35389 mkdir dir/subdir
35390 mkdir dir/subdir/subsubdir
35391 genfile --file dir/file1
35392 genfile --file dir/subdir/file2
35393
35394 setfattr -n user.test -v OurFile1Value dir/file1
35395 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35396 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35397
35398 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35399
35400 rm -rf dir
35401
35402 tar --xattrs -xf archive.tar
35403
35404 getfattr -h -d file1        | grep -v -e '^#' -e ^$
35405 getfattr -h -d file2        | grep -v -e '^#' -e ^$
35406 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
35407 )
35408 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35409 at_status=$? at_failed=false
35410 $at_check_filter
35411 at_fn_diff_devnull "$at_stderr" || at_failed=:
35412 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
35413 user.test=\"OurFile2Value\"
35414 user.test=\"OurDirValue\"
35415 " | \
35416   $at_diff - "$at_stdout" || at_failed=:
35417 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
35418 $at_failed && at_fn_log_failure
35419 $at_traceon; }
35420
35421               { set +x
35422 $as_echo "$at_srcdir/xattr02.at:28:
35423 mkdir oldgnu
35424 (cd oldgnu
35425 TEST_TAR_FORMAT=oldgnu
35426 export TEST_TAR_FORMAT
35427 TAR_OPTIONS=\"-H oldgnu\"
35428 export TAR_OPTIONS
35429 rm -rf *
35430
35431
35432
35433   file=\$(TMPDIR=. mktemp fiXXXXXX)
35434
35435   setfattr -n user.test -v test \$file &> /dev/null
35436   if test \"\$?\" != 0; then
35437     exit 77
35438   fi
35439
35440
35441   getfattr \$file &> /dev/null
35442   if test \"\$?\" != 0; then
35443     exit 77
35444   fi
35445
35446
35447   file=\$(TMPDIR=. mktemp fiXXXXXX)
35448   setfattr -n user.test -v ahoj \$file
35449   # check whether tar fails to store xattrs
35450   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35451   if test \"\$err\" != \"0\"; then
35452     exit 77
35453   fi
35454
35455
35456 mkdir dir
35457 mkdir dir/subdir
35458 mkdir dir/subdir/subsubdir
35459 genfile --file dir/file1
35460 genfile --file dir/subdir/file2
35461
35462 setfattr -n user.test -v OurFile1Value dir/file1
35463 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35464 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35465
35466 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35467
35468 rm -rf dir
35469
35470 tar --xattrs -xf archive.tar
35471
35472 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
35473 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
35474 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
35475 )"
35476 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
35477 ( $at_check_trace;
35478 mkdir oldgnu
35479 (cd oldgnu
35480 TEST_TAR_FORMAT=oldgnu
35481 export TEST_TAR_FORMAT
35482 TAR_OPTIONS="-H oldgnu"
35483 export TAR_OPTIONS
35484 rm -rf *
35485
35486
35487
35488   file=$(TMPDIR=. mktemp fiXXXXXX)
35489
35490   setfattr -n user.test -v test $file &> /dev/null
35491   if test "$?" != 0; then
35492     exit 77
35493   fi
35494
35495
35496   getfattr $file &> /dev/null
35497   if test "$?" != 0; then
35498     exit 77
35499   fi
35500
35501
35502   file=$(TMPDIR=. mktemp fiXXXXXX)
35503   setfattr -n user.test -v ahoj $file
35504   # check whether tar fails to store xattrs
35505   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35506   if test "$err" != "0"; then
35507     exit 77
35508   fi
35509
35510
35511 mkdir dir
35512 mkdir dir/subdir
35513 mkdir dir/subdir/subsubdir
35514 genfile --file dir/file1
35515 genfile --file dir/subdir/file2
35516
35517 setfattr -n user.test -v OurFile1Value dir/file1
35518 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35519 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35520
35521 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35522
35523 rm -rf dir
35524
35525 tar --xattrs -xf archive.tar
35526
35527 getfattr -h -d file1        | grep -v -e '^#' -e ^$
35528 getfattr -h -d file2        | grep -v -e '^#' -e ^$
35529 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
35530 )
35531 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35532 at_status=$? at_failed=false
35533 $at_check_filter
35534 at_fn_diff_devnull "$at_stderr" || at_failed=:
35535 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
35536 user.test=\"OurFile2Value\"
35537 user.test=\"OurDirValue\"
35538 " | \
35539   $at_diff - "$at_stdout" || at_failed=:
35540 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
35541 $at_failed && at_fn_log_failure
35542 $at_traceon; }
35543
35544               { set +x
35545 $as_echo "$at_srcdir/xattr02.at:28:
35546 mkdir ustar
35547 (cd ustar
35548 TEST_TAR_FORMAT=ustar
35549 export TEST_TAR_FORMAT
35550 TAR_OPTIONS=\"-H ustar\"
35551 export TAR_OPTIONS
35552 rm -rf *
35553
35554
35555
35556   file=\$(TMPDIR=. mktemp fiXXXXXX)
35557
35558   setfattr -n user.test -v test \$file &> /dev/null
35559   if test \"\$?\" != 0; then
35560     exit 77
35561   fi
35562
35563
35564   getfattr \$file &> /dev/null
35565   if test \"\$?\" != 0; then
35566     exit 77
35567   fi
35568
35569
35570   file=\$(TMPDIR=. mktemp fiXXXXXX)
35571   setfattr -n user.test -v ahoj \$file
35572   # check whether tar fails to store xattrs
35573   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35574   if test \"\$err\" != \"0\"; then
35575     exit 77
35576   fi
35577
35578
35579 mkdir dir
35580 mkdir dir/subdir
35581 mkdir dir/subdir/subsubdir
35582 genfile --file dir/file1
35583 genfile --file dir/subdir/file2
35584
35585 setfattr -n user.test -v OurFile1Value dir/file1
35586 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35587 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35588
35589 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35590
35591 rm -rf dir
35592
35593 tar --xattrs -xf archive.tar
35594
35595 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
35596 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
35597 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
35598 )"
35599 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
35600 ( $at_check_trace;
35601 mkdir ustar
35602 (cd ustar
35603 TEST_TAR_FORMAT=ustar
35604 export TEST_TAR_FORMAT
35605 TAR_OPTIONS="-H ustar"
35606 export TAR_OPTIONS
35607 rm -rf *
35608
35609
35610
35611   file=$(TMPDIR=. mktemp fiXXXXXX)
35612
35613   setfattr -n user.test -v test $file &> /dev/null
35614   if test "$?" != 0; then
35615     exit 77
35616   fi
35617
35618
35619   getfattr $file &> /dev/null
35620   if test "$?" != 0; then
35621     exit 77
35622   fi
35623
35624
35625   file=$(TMPDIR=. mktemp fiXXXXXX)
35626   setfattr -n user.test -v ahoj $file
35627   # check whether tar fails to store xattrs
35628   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35629   if test "$err" != "0"; then
35630     exit 77
35631   fi
35632
35633
35634 mkdir dir
35635 mkdir dir/subdir
35636 mkdir dir/subdir/subsubdir
35637 genfile --file dir/file1
35638 genfile --file dir/subdir/file2
35639
35640 setfattr -n user.test -v OurFile1Value dir/file1
35641 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35642 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35643
35644 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35645
35646 rm -rf dir
35647
35648 tar --xattrs -xf archive.tar
35649
35650 getfattr -h -d file1        | grep -v -e '^#' -e ^$
35651 getfattr -h -d file2        | grep -v -e '^#' -e ^$
35652 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
35653 )
35654 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35655 at_status=$? at_failed=false
35656 $at_check_filter
35657 at_fn_diff_devnull "$at_stderr" || at_failed=:
35658 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
35659 user.test=\"OurFile2Value\"
35660 user.test=\"OurDirValue\"
35661 " | \
35662   $at_diff - "$at_stdout" || at_failed=:
35663 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
35664 $at_failed && at_fn_log_failure
35665 $at_traceon; }
35666
35667               { set +x
35668 $as_echo "$at_srcdir/xattr02.at:28:
35669 mkdir posix
35670 (cd posix
35671 TEST_TAR_FORMAT=posix
35672 export TEST_TAR_FORMAT
35673 TAR_OPTIONS=\"-H posix\"
35674 export TAR_OPTIONS
35675 rm -rf *
35676
35677
35678
35679   file=\$(TMPDIR=. mktemp fiXXXXXX)
35680
35681   setfattr -n user.test -v test \$file &> /dev/null
35682   if test \"\$?\" != 0; then
35683     exit 77
35684   fi
35685
35686
35687   getfattr \$file &> /dev/null
35688   if test \"\$?\" != 0; then
35689     exit 77
35690   fi
35691
35692
35693   file=\$(TMPDIR=. mktemp fiXXXXXX)
35694   setfattr -n user.test -v ahoj \$file
35695   # check whether tar fails to store xattrs
35696   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35697   if test \"\$err\" != \"0\"; then
35698     exit 77
35699   fi
35700
35701
35702 mkdir dir
35703 mkdir dir/subdir
35704 mkdir dir/subdir/subsubdir
35705 genfile --file dir/file1
35706 genfile --file dir/subdir/file2
35707
35708 setfattr -n user.test -v OurFile1Value dir/file1
35709 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35710 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35711
35712 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35713
35714 rm -rf dir
35715
35716 tar --xattrs -xf archive.tar
35717
35718 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
35719 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
35720 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
35721 )"
35722 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
35723 ( $at_check_trace;
35724 mkdir posix
35725 (cd posix
35726 TEST_TAR_FORMAT=posix
35727 export TEST_TAR_FORMAT
35728 TAR_OPTIONS="-H posix"
35729 export TAR_OPTIONS
35730 rm -rf *
35731
35732
35733
35734   file=$(TMPDIR=. mktemp fiXXXXXX)
35735
35736   setfattr -n user.test -v test $file &> /dev/null
35737   if test "$?" != 0; then
35738     exit 77
35739   fi
35740
35741
35742   getfattr $file &> /dev/null
35743   if test "$?" != 0; then
35744     exit 77
35745   fi
35746
35747
35748   file=$(TMPDIR=. mktemp fiXXXXXX)
35749   setfattr -n user.test -v ahoj $file
35750   # check whether tar fails to store xattrs
35751   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35752   if test "$err" != "0"; then
35753     exit 77
35754   fi
35755
35756
35757 mkdir dir
35758 mkdir dir/subdir
35759 mkdir dir/subdir/subsubdir
35760 genfile --file dir/file1
35761 genfile --file dir/subdir/file2
35762
35763 setfattr -n user.test -v OurFile1Value dir/file1
35764 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35765 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35766
35767 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35768
35769 rm -rf dir
35770
35771 tar --xattrs -xf archive.tar
35772
35773 getfattr -h -d file1        | grep -v -e '^#' -e ^$
35774 getfattr -h -d file2        | grep -v -e '^#' -e ^$
35775 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
35776 )
35777 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35778 at_status=$? at_failed=false
35779 $at_check_filter
35780 at_fn_diff_devnull "$at_stderr" || at_failed=:
35781 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
35782 user.test=\"OurFile2Value\"
35783 user.test=\"OurDirValue\"
35784 " | \
35785   $at_diff - "$at_stdout" || at_failed=:
35786 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
35787 $at_failed && at_fn_log_failure
35788 $at_traceon; }
35789
35790               { set +x
35791 $as_echo "$at_srcdir/xattr02.at:28:
35792 mkdir gnu
35793 (cd gnu
35794 TEST_TAR_FORMAT=gnu
35795 export TEST_TAR_FORMAT
35796 TAR_OPTIONS=\"-H gnu\"
35797 export TAR_OPTIONS
35798 rm -rf *
35799
35800
35801
35802   file=\$(TMPDIR=. mktemp fiXXXXXX)
35803
35804   setfattr -n user.test -v test \$file &> /dev/null
35805   if test \"\$?\" != 0; then
35806     exit 77
35807   fi
35808
35809
35810   getfattr \$file &> /dev/null
35811   if test \"\$?\" != 0; then
35812     exit 77
35813   fi
35814
35815
35816   file=\$(TMPDIR=. mktemp fiXXXXXX)
35817   setfattr -n user.test -v ahoj \$file
35818   # check whether tar fails to store xattrs
35819   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35820   if test \"\$err\" != \"0\"; then
35821     exit 77
35822   fi
35823
35824
35825 mkdir dir
35826 mkdir dir/subdir
35827 mkdir dir/subdir/subsubdir
35828 genfile --file dir/file1
35829 genfile --file dir/subdir/file2
35830
35831 setfattr -n user.test -v OurFile1Value dir/file1
35832 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35833 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35834
35835 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35836
35837 rm -rf dir
35838
35839 tar --xattrs -xf archive.tar
35840
35841 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
35842 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
35843 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
35844 )"
35845 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
35846 ( $at_check_trace;
35847 mkdir gnu
35848 (cd gnu
35849 TEST_TAR_FORMAT=gnu
35850 export TEST_TAR_FORMAT
35851 TAR_OPTIONS="-H gnu"
35852 export TAR_OPTIONS
35853 rm -rf *
35854
35855
35856
35857   file=$(TMPDIR=. mktemp fiXXXXXX)
35858
35859   setfattr -n user.test -v test $file &> /dev/null
35860   if test "$?" != 0; then
35861     exit 77
35862   fi
35863
35864
35865   getfattr $file &> /dev/null
35866   if test "$?" != 0; then
35867     exit 77
35868   fi
35869
35870
35871   file=$(TMPDIR=. mktemp fiXXXXXX)
35872   setfattr -n user.test -v ahoj $file
35873   # check whether tar fails to store xattrs
35874   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35875   if test "$err" != "0"; then
35876     exit 77
35877   fi
35878
35879
35880 mkdir dir
35881 mkdir dir/subdir
35882 mkdir dir/subdir/subsubdir
35883 genfile --file dir/file1
35884 genfile --file dir/subdir/file2
35885
35886 setfattr -n user.test -v OurFile1Value dir/file1
35887 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35888 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35889
35890 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35891
35892 rm -rf dir
35893
35894 tar --xattrs -xf archive.tar
35895
35896 getfattr -h -d file1        | grep -v -e '^#' -e ^$
35897 getfattr -h -d file2        | grep -v -e '^#' -e ^$
35898 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
35899 )
35900 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35901 at_status=$? at_failed=false
35902 $at_check_filter
35903 at_fn_diff_devnull "$at_stderr" || at_failed=:
35904 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
35905 user.test=\"OurFile2Value\"
35906 user.test=\"OurDirValue\"
35907 " | \
35908   $at_diff - "$at_stdout" || at_failed=:
35909 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
35910 $at_failed && at_fn_log_failure
35911 $at_traceon; }
35912
35913
35914
35915
35916   set +x
35917   $at_times_p && times >"$at_times_file"
35918 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35919 read at_status <"$at_status_file"
35920 #AT_STOP_166
35921 #AT_START_167
35922 at_fn_group_banner 167 'xattr03.at:25' \
35923   "xattrs: trusted.* attributes" "                   " 25
35924 at_xfail=no
35925       test -f $XFAILFILE && at_xfail=yes
35926 (
35927   $as_echo "167. $at_setup_line: testing $at_desc ..."
35928   $at_traceon
35929
35930
35931
35932
35933
35934   { set +x
35935 $as_echo "$at_srcdir/xattr03.at:28:
35936 mkdir v7
35937 (cd v7
35938 TEST_TAR_FORMAT=v7
35939 export TEST_TAR_FORMAT
35940 TAR_OPTIONS=\"-H v7\"
35941 export TAR_OPTIONS
35942 rm -rf *
35943
35944
35945 echo \"test\" > \$\$
35946 chmod 0 \$\$
35947 cat \$\$ > /dev/null 2>&1
35948 result=\$?
35949 rm -f \$\$
35950 test \$result -eq 0 || exit 77
35951
35952
35953
35954   file=\$(TMPDIR=. mktemp fiXXXXXX)
35955
35956   setfattr -n user.test -v test \$file &> /dev/null
35957   if test \"\$?\" != 0; then
35958     exit 77
35959   fi
35960
35961
35962   getfattr \$file &> /dev/null
35963   if test \"\$?\" != 0; then
35964     exit 77
35965   fi
35966
35967
35968   file=\$(TMPDIR=. mktemp fiXXXXXX)
35969   setfattr -n user.test -v ahoj \$file
35970   # check whether tar fails to store xattrs
35971   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35972   if test \"\$err\" != \"0\"; then
35973     exit 77
35974   fi
35975
35976
35977 mkdir dir
35978 mkdir dir/subdir
35979 mkdir dir/subdir/subsubdir
35980 genfile --file dir/file1
35981 genfile --file dir/subdir/file2
35982
35983 setfattr -n trusted.test -v OurFile1Value dir/file1
35984 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
35985 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
35986
35987 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35988
35989 rm -rf dir
35990
35991 tar --xattrs --xattrs-include=trusted* -xf archive.tar
35992
35993 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
35994 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
35995 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
35996 )"
35997 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
35998 ( $at_check_trace;
35999 mkdir v7
36000 (cd v7
36001 TEST_TAR_FORMAT=v7
36002 export TEST_TAR_FORMAT
36003 TAR_OPTIONS="-H v7"
36004 export TAR_OPTIONS
36005 rm -rf *
36006
36007
36008 echo "test" > $$
36009 chmod 0 $$
36010 cat $$ > /dev/null 2>&1
36011 result=$?
36012 rm -f $$
36013 test $result -eq 0 || exit 77
36014
36015
36016
36017   file=$(TMPDIR=. mktemp fiXXXXXX)
36018
36019   setfattr -n user.test -v test $file &> /dev/null
36020   if test "$?" != 0; then
36021     exit 77
36022   fi
36023
36024
36025   getfattr $file &> /dev/null
36026   if test "$?" != 0; then
36027     exit 77
36028   fi
36029
36030
36031   file=$(TMPDIR=. mktemp fiXXXXXX)
36032   setfattr -n user.test -v ahoj $file
36033   # check whether tar fails to store xattrs
36034   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36035   if test "$err" != "0"; then
36036     exit 77
36037   fi
36038
36039
36040 mkdir dir
36041 mkdir dir/subdir
36042 mkdir dir/subdir/subsubdir
36043 genfile --file dir/file1
36044 genfile --file dir/subdir/file2
36045
36046 setfattr -n trusted.test -v OurFile1Value dir/file1
36047 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36048 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36049
36050 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36051
36052 rm -rf dir
36053
36054 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36055
36056 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36057 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36058 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36059 )
36060 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36061 at_status=$? at_failed=false
36062 $at_check_filter
36063 at_fn_diff_devnull "$at_stderr" || at_failed=:
36064 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36065 trusted.test=\"OurFile2Value\"
36066 trusted.test=\"OurDirValue\"
36067 " | \
36068   $at_diff - "$at_stdout" || at_failed=:
36069 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36070 $at_failed && at_fn_log_failure
36071 $at_traceon; }
36072
36073               { set +x
36074 $as_echo "$at_srcdir/xattr03.at:28:
36075 mkdir oldgnu
36076 (cd oldgnu
36077 TEST_TAR_FORMAT=oldgnu
36078 export TEST_TAR_FORMAT
36079 TAR_OPTIONS=\"-H oldgnu\"
36080 export TAR_OPTIONS
36081 rm -rf *
36082
36083
36084 echo \"test\" > \$\$
36085 chmod 0 \$\$
36086 cat \$\$ > /dev/null 2>&1
36087 result=\$?
36088 rm -f \$\$
36089 test \$result -eq 0 || exit 77
36090
36091
36092
36093   file=\$(TMPDIR=. mktemp fiXXXXXX)
36094
36095   setfattr -n user.test -v test \$file &> /dev/null
36096   if test \"\$?\" != 0; then
36097     exit 77
36098   fi
36099
36100
36101   getfattr \$file &> /dev/null
36102   if test \"\$?\" != 0; then
36103     exit 77
36104   fi
36105
36106
36107   file=\$(TMPDIR=. mktemp fiXXXXXX)
36108   setfattr -n user.test -v ahoj \$file
36109   # check whether tar fails to store xattrs
36110   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36111   if test \"\$err\" != \"0\"; then
36112     exit 77
36113   fi
36114
36115
36116 mkdir dir
36117 mkdir dir/subdir
36118 mkdir dir/subdir/subsubdir
36119 genfile --file dir/file1
36120 genfile --file dir/subdir/file2
36121
36122 setfattr -n trusted.test -v OurFile1Value dir/file1
36123 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36124 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36125
36126 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36127
36128 rm -rf dir
36129
36130 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36131
36132 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
36133 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
36134 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
36135 )"
36136 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
36137 ( $at_check_trace;
36138 mkdir oldgnu
36139 (cd oldgnu
36140 TEST_TAR_FORMAT=oldgnu
36141 export TEST_TAR_FORMAT
36142 TAR_OPTIONS="-H oldgnu"
36143 export TAR_OPTIONS
36144 rm -rf *
36145
36146
36147 echo "test" > $$
36148 chmod 0 $$
36149 cat $$ > /dev/null 2>&1
36150 result=$?
36151 rm -f $$
36152 test $result -eq 0 || exit 77
36153
36154
36155
36156   file=$(TMPDIR=. mktemp fiXXXXXX)
36157
36158   setfattr -n user.test -v test $file &> /dev/null
36159   if test "$?" != 0; then
36160     exit 77
36161   fi
36162
36163
36164   getfattr $file &> /dev/null
36165   if test "$?" != 0; then
36166     exit 77
36167   fi
36168
36169
36170   file=$(TMPDIR=. mktemp fiXXXXXX)
36171   setfattr -n user.test -v ahoj $file
36172   # check whether tar fails to store xattrs
36173   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36174   if test "$err" != "0"; then
36175     exit 77
36176   fi
36177
36178
36179 mkdir dir
36180 mkdir dir/subdir
36181 mkdir dir/subdir/subsubdir
36182 genfile --file dir/file1
36183 genfile --file dir/subdir/file2
36184
36185 setfattr -n trusted.test -v OurFile1Value dir/file1
36186 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36187 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36188
36189 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36190
36191 rm -rf dir
36192
36193 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36194
36195 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36196 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36197 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36198 )
36199 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36200 at_status=$? at_failed=false
36201 $at_check_filter
36202 at_fn_diff_devnull "$at_stderr" || at_failed=:
36203 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36204 trusted.test=\"OurFile2Value\"
36205 trusted.test=\"OurDirValue\"
36206 " | \
36207   $at_diff - "$at_stdout" || at_failed=:
36208 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36209 $at_failed && at_fn_log_failure
36210 $at_traceon; }
36211
36212               { set +x
36213 $as_echo "$at_srcdir/xattr03.at:28:
36214 mkdir ustar
36215 (cd ustar
36216 TEST_TAR_FORMAT=ustar
36217 export TEST_TAR_FORMAT
36218 TAR_OPTIONS=\"-H ustar\"
36219 export TAR_OPTIONS
36220 rm -rf *
36221
36222
36223 echo \"test\" > \$\$
36224 chmod 0 \$\$
36225 cat \$\$ > /dev/null 2>&1
36226 result=\$?
36227 rm -f \$\$
36228 test \$result -eq 0 || exit 77
36229
36230
36231
36232   file=\$(TMPDIR=. mktemp fiXXXXXX)
36233
36234   setfattr -n user.test -v test \$file &> /dev/null
36235   if test \"\$?\" != 0; then
36236     exit 77
36237   fi
36238
36239
36240   getfattr \$file &> /dev/null
36241   if test \"\$?\" != 0; then
36242     exit 77
36243   fi
36244
36245
36246   file=\$(TMPDIR=. mktemp fiXXXXXX)
36247   setfattr -n user.test -v ahoj \$file
36248   # check whether tar fails to store xattrs
36249   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36250   if test \"\$err\" != \"0\"; then
36251     exit 77
36252   fi
36253
36254
36255 mkdir dir
36256 mkdir dir/subdir
36257 mkdir dir/subdir/subsubdir
36258 genfile --file dir/file1
36259 genfile --file dir/subdir/file2
36260
36261 setfattr -n trusted.test -v OurFile1Value dir/file1
36262 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36263 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36264
36265 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36266
36267 rm -rf dir
36268
36269 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36270
36271 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
36272 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
36273 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
36274 )"
36275 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
36276 ( $at_check_trace;
36277 mkdir ustar
36278 (cd ustar
36279 TEST_TAR_FORMAT=ustar
36280 export TEST_TAR_FORMAT
36281 TAR_OPTIONS="-H ustar"
36282 export TAR_OPTIONS
36283 rm -rf *
36284
36285
36286 echo "test" > $$
36287 chmod 0 $$
36288 cat $$ > /dev/null 2>&1
36289 result=$?
36290 rm -f $$
36291 test $result -eq 0 || exit 77
36292
36293
36294
36295   file=$(TMPDIR=. mktemp fiXXXXXX)
36296
36297   setfattr -n user.test -v test $file &> /dev/null
36298   if test "$?" != 0; then
36299     exit 77
36300   fi
36301
36302
36303   getfattr $file &> /dev/null
36304   if test "$?" != 0; then
36305     exit 77
36306   fi
36307
36308
36309   file=$(TMPDIR=. mktemp fiXXXXXX)
36310   setfattr -n user.test -v ahoj $file
36311   # check whether tar fails to store xattrs
36312   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36313   if test "$err" != "0"; then
36314     exit 77
36315   fi
36316
36317
36318 mkdir dir
36319 mkdir dir/subdir
36320 mkdir dir/subdir/subsubdir
36321 genfile --file dir/file1
36322 genfile --file dir/subdir/file2
36323
36324 setfattr -n trusted.test -v OurFile1Value dir/file1
36325 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36326 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36327
36328 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36329
36330 rm -rf dir
36331
36332 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36333
36334 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36335 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36336 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36337 )
36338 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36339 at_status=$? at_failed=false
36340 $at_check_filter
36341 at_fn_diff_devnull "$at_stderr" || at_failed=:
36342 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36343 trusted.test=\"OurFile2Value\"
36344 trusted.test=\"OurDirValue\"
36345 " | \
36346   $at_diff - "$at_stdout" || at_failed=:
36347 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36348 $at_failed && at_fn_log_failure
36349 $at_traceon; }
36350
36351               { set +x
36352 $as_echo "$at_srcdir/xattr03.at:28:
36353 mkdir posix
36354 (cd posix
36355 TEST_TAR_FORMAT=posix
36356 export TEST_TAR_FORMAT
36357 TAR_OPTIONS=\"-H posix\"
36358 export TAR_OPTIONS
36359 rm -rf *
36360
36361
36362 echo \"test\" > \$\$
36363 chmod 0 \$\$
36364 cat \$\$ > /dev/null 2>&1
36365 result=\$?
36366 rm -f \$\$
36367 test \$result -eq 0 || exit 77
36368
36369
36370
36371   file=\$(TMPDIR=. mktemp fiXXXXXX)
36372
36373   setfattr -n user.test -v test \$file &> /dev/null
36374   if test \"\$?\" != 0; then
36375     exit 77
36376   fi
36377
36378
36379   getfattr \$file &> /dev/null
36380   if test \"\$?\" != 0; then
36381     exit 77
36382   fi
36383
36384
36385   file=\$(TMPDIR=. mktemp fiXXXXXX)
36386   setfattr -n user.test -v ahoj \$file
36387   # check whether tar fails to store xattrs
36388   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36389   if test \"\$err\" != \"0\"; then
36390     exit 77
36391   fi
36392
36393
36394 mkdir dir
36395 mkdir dir/subdir
36396 mkdir dir/subdir/subsubdir
36397 genfile --file dir/file1
36398 genfile --file dir/subdir/file2
36399
36400 setfattr -n trusted.test -v OurFile1Value dir/file1
36401 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36402 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36403
36404 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36405
36406 rm -rf dir
36407
36408 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36409
36410 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
36411 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
36412 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
36413 )"
36414 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
36415 ( $at_check_trace;
36416 mkdir posix
36417 (cd posix
36418 TEST_TAR_FORMAT=posix
36419 export TEST_TAR_FORMAT
36420 TAR_OPTIONS="-H posix"
36421 export TAR_OPTIONS
36422 rm -rf *
36423
36424
36425 echo "test" > $$
36426 chmod 0 $$
36427 cat $$ > /dev/null 2>&1
36428 result=$?
36429 rm -f $$
36430 test $result -eq 0 || exit 77
36431
36432
36433
36434   file=$(TMPDIR=. mktemp fiXXXXXX)
36435
36436   setfattr -n user.test -v test $file &> /dev/null
36437   if test "$?" != 0; then
36438     exit 77
36439   fi
36440
36441
36442   getfattr $file &> /dev/null
36443   if test "$?" != 0; then
36444     exit 77
36445   fi
36446
36447
36448   file=$(TMPDIR=. mktemp fiXXXXXX)
36449   setfattr -n user.test -v ahoj $file
36450   # check whether tar fails to store xattrs
36451   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36452   if test "$err" != "0"; then
36453     exit 77
36454   fi
36455
36456
36457 mkdir dir
36458 mkdir dir/subdir
36459 mkdir dir/subdir/subsubdir
36460 genfile --file dir/file1
36461 genfile --file dir/subdir/file2
36462
36463 setfattr -n trusted.test -v OurFile1Value dir/file1
36464 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36465 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36466
36467 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36468
36469 rm -rf dir
36470
36471 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36472
36473 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36474 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36475 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36476 )
36477 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36478 at_status=$? at_failed=false
36479 $at_check_filter
36480 at_fn_diff_devnull "$at_stderr" || at_failed=:
36481 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36482 trusted.test=\"OurFile2Value\"
36483 trusted.test=\"OurDirValue\"
36484 " | \
36485   $at_diff - "$at_stdout" || at_failed=:
36486 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36487 $at_failed && at_fn_log_failure
36488 $at_traceon; }
36489
36490               { set +x
36491 $as_echo "$at_srcdir/xattr03.at:28:
36492 mkdir gnu
36493 (cd gnu
36494 TEST_TAR_FORMAT=gnu
36495 export TEST_TAR_FORMAT
36496 TAR_OPTIONS=\"-H gnu\"
36497 export TAR_OPTIONS
36498 rm -rf *
36499
36500
36501 echo \"test\" > \$\$
36502 chmod 0 \$\$
36503 cat \$\$ > /dev/null 2>&1
36504 result=\$?
36505 rm -f \$\$
36506 test \$result -eq 0 || exit 77
36507
36508
36509
36510   file=\$(TMPDIR=. mktemp fiXXXXXX)
36511
36512   setfattr -n user.test -v test \$file &> /dev/null
36513   if test \"\$?\" != 0; then
36514     exit 77
36515   fi
36516
36517
36518   getfattr \$file &> /dev/null
36519   if test \"\$?\" != 0; then
36520     exit 77
36521   fi
36522
36523
36524   file=\$(TMPDIR=. mktemp fiXXXXXX)
36525   setfattr -n user.test -v ahoj \$file
36526   # check whether tar fails to store xattrs
36527   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36528   if test \"\$err\" != \"0\"; then
36529     exit 77
36530   fi
36531
36532
36533 mkdir dir
36534 mkdir dir/subdir
36535 mkdir dir/subdir/subsubdir
36536 genfile --file dir/file1
36537 genfile --file dir/subdir/file2
36538
36539 setfattr -n trusted.test -v OurFile1Value dir/file1
36540 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36541 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36542
36543 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36544
36545 rm -rf dir
36546
36547 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36548
36549 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
36550 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
36551 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
36552 )"
36553 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
36554 ( $at_check_trace;
36555 mkdir gnu
36556 (cd gnu
36557 TEST_TAR_FORMAT=gnu
36558 export TEST_TAR_FORMAT
36559 TAR_OPTIONS="-H gnu"
36560 export TAR_OPTIONS
36561 rm -rf *
36562
36563
36564 echo "test" > $$
36565 chmod 0 $$
36566 cat $$ > /dev/null 2>&1
36567 result=$?
36568 rm -f $$
36569 test $result -eq 0 || exit 77
36570
36571
36572
36573   file=$(TMPDIR=. mktemp fiXXXXXX)
36574
36575   setfattr -n user.test -v test $file &> /dev/null
36576   if test "$?" != 0; then
36577     exit 77
36578   fi
36579
36580
36581   getfattr $file &> /dev/null
36582   if test "$?" != 0; then
36583     exit 77
36584   fi
36585
36586
36587   file=$(TMPDIR=. mktemp fiXXXXXX)
36588   setfattr -n user.test -v ahoj $file
36589   # check whether tar fails to store xattrs
36590   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36591   if test "$err" != "0"; then
36592     exit 77
36593   fi
36594
36595
36596 mkdir dir
36597 mkdir dir/subdir
36598 mkdir dir/subdir/subsubdir
36599 genfile --file dir/file1
36600 genfile --file dir/subdir/file2
36601
36602 setfattr -n trusted.test -v OurFile1Value dir/file1
36603 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36604 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36605
36606 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36607
36608 rm -rf dir
36609
36610 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36611
36612 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36613 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36614 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36615 )
36616 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36617 at_status=$? at_failed=false
36618 $at_check_filter
36619 at_fn_diff_devnull "$at_stderr" || at_failed=:
36620 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36621 trusted.test=\"OurFile2Value\"
36622 trusted.test=\"OurDirValue\"
36623 " | \
36624   $at_diff - "$at_stdout" || at_failed=:
36625 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36626 $at_failed && at_fn_log_failure
36627 $at_traceon; }
36628
36629
36630
36631
36632   set +x
36633   $at_times_p && times >"$at_times_file"
36634 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36635 read at_status <"$at_status_file"
36636 #AT_STOP_167
36637 #AT_START_168
36638 at_fn_group_banner 168 'xattr04.at:26' \
36639   "xattrs: s/open/openat/ regression" "              " 25
36640 at_xfail=no
36641       test -f $XFAILFILE && at_xfail=yes
36642 (
36643   $as_echo "168. $at_setup_line: testing $at_desc ..."
36644   $at_traceon
36645
36646
36647
36648
36649
36650   { set +x
36651 $as_echo "$at_srcdir/xattr04.at:29:
36652 mkdir v7
36653 (cd v7
36654 TEST_TAR_FORMAT=v7
36655 export TEST_TAR_FORMAT
36656 TAR_OPTIONS=\"-H v7\"
36657 export TAR_OPTIONS
36658 rm -rf *
36659
36660
36661
36662   file=\$(TMPDIR=. mktemp fiXXXXXX)
36663
36664   setfattr -n user.test -v test \$file &> /dev/null
36665   if test \"\$?\" != 0; then
36666     exit 77
36667   fi
36668
36669
36670   getfattr \$file &> /dev/null
36671   if test \"\$?\" != 0; then
36672     exit 77
36673   fi
36674
36675
36676   file=\$(TMPDIR=. mktemp fiXXXXXX)
36677   setfattr -n user.test -v ahoj \$file
36678   # check whether tar fails to store xattrs
36679   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36680   if test \"\$err\" != \"0\"; then
36681     exit 77
36682   fi
36683
36684
36685 mkdir dir
36686 mkdir output
36687 genfile --file dir/file
36688
36689 setfattr -n user.test -v value dir/file
36690
36691 # archive whole directory including binary xattrs
36692 tar --xattrs -cf archive.tar -C dir .
36693
36694 tar --xattrs -xf archive.tar -C output
36695 ret=\$?
36696 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
36697 exit \$ret
36698 )"
36699 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
36700 ( $at_check_trace;
36701 mkdir v7
36702 (cd v7
36703 TEST_TAR_FORMAT=v7
36704 export TEST_TAR_FORMAT
36705 TAR_OPTIONS="-H v7"
36706 export TAR_OPTIONS
36707 rm -rf *
36708
36709
36710
36711   file=$(TMPDIR=. mktemp fiXXXXXX)
36712
36713   setfattr -n user.test -v test $file &> /dev/null
36714   if test "$?" != 0; then
36715     exit 77
36716   fi
36717
36718
36719   getfattr $file &> /dev/null
36720   if test "$?" != 0; then
36721     exit 77
36722   fi
36723
36724
36725   file=$(TMPDIR=. mktemp fiXXXXXX)
36726   setfattr -n user.test -v ahoj $file
36727   # check whether tar fails to store xattrs
36728   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36729   if test "$err" != "0"; then
36730     exit 77
36731   fi
36732
36733
36734 mkdir dir
36735 mkdir output
36736 genfile --file dir/file
36737
36738 setfattr -n user.test -v value dir/file
36739
36740 # archive whole directory including binary xattrs
36741 tar --xattrs -cf archive.tar -C dir .
36742
36743 tar --xattrs -xf archive.tar -C output
36744 ret=$?
36745 getfattr -h -d output/file | grep -v -e '^#' -e ^$
36746 exit $ret
36747 )
36748 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36749 at_status=$? at_failed=false
36750 $at_check_filter
36751 at_fn_diff_devnull "$at_stderr" || at_failed=:
36752 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
36753 " | \
36754   $at_diff - "$at_stdout" || at_failed=:
36755 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
36756 $at_failed && at_fn_log_failure
36757 $at_traceon; }
36758
36759               { set +x
36760 $as_echo "$at_srcdir/xattr04.at:29:
36761 mkdir oldgnu
36762 (cd oldgnu
36763 TEST_TAR_FORMAT=oldgnu
36764 export TEST_TAR_FORMAT
36765 TAR_OPTIONS=\"-H oldgnu\"
36766 export TAR_OPTIONS
36767 rm -rf *
36768
36769
36770
36771   file=\$(TMPDIR=. mktemp fiXXXXXX)
36772
36773   setfattr -n user.test -v test \$file &> /dev/null
36774   if test \"\$?\" != 0; then
36775     exit 77
36776   fi
36777
36778
36779   getfattr \$file &> /dev/null
36780   if test \"\$?\" != 0; then
36781     exit 77
36782   fi
36783
36784
36785   file=\$(TMPDIR=. mktemp fiXXXXXX)
36786   setfattr -n user.test -v ahoj \$file
36787   # check whether tar fails to store xattrs
36788   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36789   if test \"\$err\" != \"0\"; then
36790     exit 77
36791   fi
36792
36793
36794 mkdir dir
36795 mkdir output
36796 genfile --file dir/file
36797
36798 setfattr -n user.test -v value dir/file
36799
36800 # archive whole directory including binary xattrs
36801 tar --xattrs -cf archive.tar -C dir .
36802
36803 tar --xattrs -xf archive.tar -C output
36804 ret=\$?
36805 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
36806 exit \$ret
36807 )"
36808 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
36809 ( $at_check_trace;
36810 mkdir oldgnu
36811 (cd oldgnu
36812 TEST_TAR_FORMAT=oldgnu
36813 export TEST_TAR_FORMAT
36814 TAR_OPTIONS="-H oldgnu"
36815 export TAR_OPTIONS
36816 rm -rf *
36817
36818
36819
36820   file=$(TMPDIR=. mktemp fiXXXXXX)
36821
36822   setfattr -n user.test -v test $file &> /dev/null
36823   if test "$?" != 0; then
36824     exit 77
36825   fi
36826
36827
36828   getfattr $file &> /dev/null
36829   if test "$?" != 0; then
36830     exit 77
36831   fi
36832
36833
36834   file=$(TMPDIR=. mktemp fiXXXXXX)
36835   setfattr -n user.test -v ahoj $file
36836   # check whether tar fails to store xattrs
36837   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36838   if test "$err" != "0"; then
36839     exit 77
36840   fi
36841
36842
36843 mkdir dir
36844 mkdir output
36845 genfile --file dir/file
36846
36847 setfattr -n user.test -v value dir/file
36848
36849 # archive whole directory including binary xattrs
36850 tar --xattrs -cf archive.tar -C dir .
36851
36852 tar --xattrs -xf archive.tar -C output
36853 ret=$?
36854 getfattr -h -d output/file | grep -v -e '^#' -e ^$
36855 exit $ret
36856 )
36857 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36858 at_status=$? at_failed=false
36859 $at_check_filter
36860 at_fn_diff_devnull "$at_stderr" || at_failed=:
36861 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
36862 " | \
36863   $at_diff - "$at_stdout" || at_failed=:
36864 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
36865 $at_failed && at_fn_log_failure
36866 $at_traceon; }
36867
36868               { set +x
36869 $as_echo "$at_srcdir/xattr04.at:29:
36870 mkdir ustar
36871 (cd ustar
36872 TEST_TAR_FORMAT=ustar
36873 export TEST_TAR_FORMAT
36874 TAR_OPTIONS=\"-H ustar\"
36875 export TAR_OPTIONS
36876 rm -rf *
36877
36878
36879
36880   file=\$(TMPDIR=. mktemp fiXXXXXX)
36881
36882   setfattr -n user.test -v test \$file &> /dev/null
36883   if test \"\$?\" != 0; then
36884     exit 77
36885   fi
36886
36887
36888   getfattr \$file &> /dev/null
36889   if test \"\$?\" != 0; then
36890     exit 77
36891   fi
36892
36893
36894   file=\$(TMPDIR=. mktemp fiXXXXXX)
36895   setfattr -n user.test -v ahoj \$file
36896   # check whether tar fails to store xattrs
36897   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36898   if test \"\$err\" != \"0\"; then
36899     exit 77
36900   fi
36901
36902
36903 mkdir dir
36904 mkdir output
36905 genfile --file dir/file
36906
36907 setfattr -n user.test -v value dir/file
36908
36909 # archive whole directory including binary xattrs
36910 tar --xattrs -cf archive.tar -C dir .
36911
36912 tar --xattrs -xf archive.tar -C output
36913 ret=\$?
36914 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
36915 exit \$ret
36916 )"
36917 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
36918 ( $at_check_trace;
36919 mkdir ustar
36920 (cd ustar
36921 TEST_TAR_FORMAT=ustar
36922 export TEST_TAR_FORMAT
36923 TAR_OPTIONS="-H ustar"
36924 export TAR_OPTIONS
36925 rm -rf *
36926
36927
36928
36929   file=$(TMPDIR=. mktemp fiXXXXXX)
36930
36931   setfattr -n user.test -v test $file &> /dev/null
36932   if test "$?" != 0; then
36933     exit 77
36934   fi
36935
36936
36937   getfattr $file &> /dev/null
36938   if test "$?" != 0; then
36939     exit 77
36940   fi
36941
36942
36943   file=$(TMPDIR=. mktemp fiXXXXXX)
36944   setfattr -n user.test -v ahoj $file
36945   # check whether tar fails to store xattrs
36946   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36947   if test "$err" != "0"; then
36948     exit 77
36949   fi
36950
36951
36952 mkdir dir
36953 mkdir output
36954 genfile --file dir/file
36955
36956 setfattr -n user.test -v value dir/file
36957
36958 # archive whole directory including binary xattrs
36959 tar --xattrs -cf archive.tar -C dir .
36960
36961 tar --xattrs -xf archive.tar -C output
36962 ret=$?
36963 getfattr -h -d output/file | grep -v -e '^#' -e ^$
36964 exit $ret
36965 )
36966 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36967 at_status=$? at_failed=false
36968 $at_check_filter
36969 at_fn_diff_devnull "$at_stderr" || at_failed=:
36970 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
36971 " | \
36972   $at_diff - "$at_stdout" || at_failed=:
36973 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
36974 $at_failed && at_fn_log_failure
36975 $at_traceon; }
36976
36977               { set +x
36978 $as_echo "$at_srcdir/xattr04.at:29:
36979 mkdir posix
36980 (cd posix
36981 TEST_TAR_FORMAT=posix
36982 export TEST_TAR_FORMAT
36983 TAR_OPTIONS=\"-H posix\"
36984 export TAR_OPTIONS
36985 rm -rf *
36986
36987
36988
36989   file=\$(TMPDIR=. mktemp fiXXXXXX)
36990
36991   setfattr -n user.test -v test \$file &> /dev/null
36992   if test \"\$?\" != 0; then
36993     exit 77
36994   fi
36995
36996
36997   getfattr \$file &> /dev/null
36998   if test \"\$?\" != 0; then
36999     exit 77
37000   fi
37001
37002
37003   file=\$(TMPDIR=. mktemp fiXXXXXX)
37004   setfattr -n user.test -v ahoj \$file
37005   # check whether tar fails to store xattrs
37006   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37007   if test \"\$err\" != \"0\"; then
37008     exit 77
37009   fi
37010
37011
37012 mkdir dir
37013 mkdir output
37014 genfile --file dir/file
37015
37016 setfattr -n user.test -v value dir/file
37017
37018 # archive whole directory including binary xattrs
37019 tar --xattrs -cf archive.tar -C dir .
37020
37021 tar --xattrs -xf archive.tar -C output
37022 ret=\$?
37023 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
37024 exit \$ret
37025 )"
37026 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
37027 ( $at_check_trace;
37028 mkdir posix
37029 (cd posix
37030 TEST_TAR_FORMAT=posix
37031 export TEST_TAR_FORMAT
37032 TAR_OPTIONS="-H posix"
37033 export TAR_OPTIONS
37034 rm -rf *
37035
37036
37037
37038   file=$(TMPDIR=. mktemp fiXXXXXX)
37039
37040   setfattr -n user.test -v test $file &> /dev/null
37041   if test "$?" != 0; then
37042     exit 77
37043   fi
37044
37045
37046   getfattr $file &> /dev/null
37047   if test "$?" != 0; then
37048     exit 77
37049   fi
37050
37051
37052   file=$(TMPDIR=. mktemp fiXXXXXX)
37053   setfattr -n user.test -v ahoj $file
37054   # check whether tar fails to store xattrs
37055   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37056   if test "$err" != "0"; then
37057     exit 77
37058   fi
37059
37060
37061 mkdir dir
37062 mkdir output
37063 genfile --file dir/file
37064
37065 setfattr -n user.test -v value dir/file
37066
37067 # archive whole directory including binary xattrs
37068 tar --xattrs -cf archive.tar -C dir .
37069
37070 tar --xattrs -xf archive.tar -C output
37071 ret=$?
37072 getfattr -h -d output/file | grep -v -e '^#' -e ^$
37073 exit $ret
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 "user.test=\"value\"
37080 " | \
37081   $at_diff - "$at_stdout" || at_failed=:
37082 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
37083 $at_failed && at_fn_log_failure
37084 $at_traceon; }
37085
37086               { set +x
37087 $as_echo "$at_srcdir/xattr04.at:29:
37088 mkdir gnu
37089 (cd gnu
37090 TEST_TAR_FORMAT=gnu
37091 export TEST_TAR_FORMAT
37092 TAR_OPTIONS=\"-H gnu\"
37093 export TAR_OPTIONS
37094 rm -rf *
37095
37096
37097
37098   file=\$(TMPDIR=. mktemp fiXXXXXX)
37099
37100   setfattr -n user.test -v test \$file &> /dev/null
37101   if test \"\$?\" != 0; then
37102     exit 77
37103   fi
37104
37105
37106   getfattr \$file &> /dev/null
37107   if test \"\$?\" != 0; then
37108     exit 77
37109   fi
37110
37111
37112   file=\$(TMPDIR=. mktemp fiXXXXXX)
37113   setfattr -n user.test -v ahoj \$file
37114   # check whether tar fails to store xattrs
37115   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37116   if test \"\$err\" != \"0\"; then
37117     exit 77
37118   fi
37119
37120
37121 mkdir dir
37122 mkdir output
37123 genfile --file dir/file
37124
37125 setfattr -n user.test -v value dir/file
37126
37127 # archive whole directory including binary xattrs
37128 tar --xattrs -cf archive.tar -C dir .
37129
37130 tar --xattrs -xf archive.tar -C output
37131 ret=\$?
37132 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
37133 exit \$ret
37134 )"
37135 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
37136 ( $at_check_trace;
37137 mkdir gnu
37138 (cd gnu
37139 TEST_TAR_FORMAT=gnu
37140 export TEST_TAR_FORMAT
37141 TAR_OPTIONS="-H gnu"
37142 export TAR_OPTIONS
37143 rm -rf *
37144
37145
37146
37147   file=$(TMPDIR=. mktemp fiXXXXXX)
37148
37149   setfattr -n user.test -v test $file &> /dev/null
37150   if test "$?" != 0; then
37151     exit 77
37152   fi
37153
37154
37155   getfattr $file &> /dev/null
37156   if test "$?" != 0; then
37157     exit 77
37158   fi
37159
37160
37161   file=$(TMPDIR=. mktemp fiXXXXXX)
37162   setfattr -n user.test -v ahoj $file
37163   # check whether tar fails to store xattrs
37164   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37165   if test "$err" != "0"; then
37166     exit 77
37167   fi
37168
37169
37170 mkdir dir
37171 mkdir output
37172 genfile --file dir/file
37173
37174 setfattr -n user.test -v value dir/file
37175
37176 # archive whole directory including binary xattrs
37177 tar --xattrs -cf archive.tar -C dir .
37178
37179 tar --xattrs -xf archive.tar -C output
37180 ret=$?
37181 getfattr -h -d output/file | grep -v -e '^#' -e ^$
37182 exit $ret
37183 )
37184 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37185 at_status=$? at_failed=false
37186 $at_check_filter
37187 at_fn_diff_devnull "$at_stderr" || at_failed=:
37188 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
37189 " | \
37190   $at_diff - "$at_stdout" || at_failed=:
37191 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
37192 $at_failed && at_fn_log_failure
37193 $at_traceon; }
37194
37195
37196
37197
37198   set +x
37199   $at_times_p && times >"$at_times_file"
37200 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37201 read at_status <"$at_status_file"
37202 #AT_STOP_168
37203 #AT_START_169
37204 at_fn_group_banner 169 'xattr05.at:28' \
37205   "xattrs: keywords with '=' and '%'" "              " 25
37206 at_xfail=no
37207       test -f $XFAILFILE && at_xfail=yes
37208 (
37209   $as_echo "169. $at_setup_line: testing $at_desc ..."
37210   $at_traceon
37211
37212
37213
37214
37215
37216   { set +x
37217 $as_echo "$at_srcdir/xattr05.at:31:
37218 mkdir v7
37219 (cd v7
37220 TEST_TAR_FORMAT=v7
37221 export TEST_TAR_FORMAT
37222 TAR_OPTIONS=\"-H v7\"
37223 export TAR_OPTIONS
37224 rm -rf *
37225
37226
37227
37228   file=\$(TMPDIR=. mktemp fiXXXXXX)
37229
37230   setfattr -n user.test -v test \$file &> /dev/null
37231   if test \"\$?\" != 0; then
37232     exit 77
37233   fi
37234
37235
37236   getfattr \$file &> /dev/null
37237   if test \"\$?\" != 0; then
37238     exit 77
37239   fi
37240
37241
37242   file=\$(TMPDIR=. mktemp fiXXXXXX)
37243   setfattr -n user.test -v ahoj \$file
37244   # check whether tar fails to store xattrs
37245   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37246   if test \"\$err\" != \"0\"; then
37247     exit 77
37248   fi
37249
37250
37251 mkdir dir
37252 mkdir output
37253 genfile --file dir/file
37254
37255 setfattr -n user.=NAME%3D= -v value dir/file
37256 getfattr -d dir/file | grep -v '# ' > before
37257
37258 # archive whole directory including binary xattrs
37259 tar --xattrs -cf archive.tar -C dir .
37260
37261 tar --xattrs -xf archive.tar -C output
37262 getfattr -d output/file | grep -v '# ' > after
37263 diff before after
37264 )"
37265 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
37266 ( $at_check_trace;
37267 mkdir v7
37268 (cd v7
37269 TEST_TAR_FORMAT=v7
37270 export TEST_TAR_FORMAT
37271 TAR_OPTIONS="-H v7"
37272 export TAR_OPTIONS
37273 rm -rf *
37274
37275
37276
37277   file=$(TMPDIR=. mktemp fiXXXXXX)
37278
37279   setfattr -n user.test -v test $file &> /dev/null
37280   if test "$?" != 0; then
37281     exit 77
37282   fi
37283
37284
37285   getfattr $file &> /dev/null
37286   if test "$?" != 0; then
37287     exit 77
37288   fi
37289
37290
37291   file=$(TMPDIR=. mktemp fiXXXXXX)
37292   setfattr -n user.test -v ahoj $file
37293   # check whether tar fails to store xattrs
37294   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37295   if test "$err" != "0"; then
37296     exit 77
37297   fi
37298
37299
37300 mkdir dir
37301 mkdir output
37302 genfile --file dir/file
37303
37304 setfattr -n user.=NAME%3D= -v value dir/file
37305 getfattr -d dir/file | grep -v '# ' > before
37306
37307 # archive whole directory including binary xattrs
37308 tar --xattrs -cf archive.tar -C dir .
37309
37310 tar --xattrs -xf archive.tar -C output
37311 getfattr -d output/file | grep -v '# ' > after
37312 diff before after
37313 )
37314 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37315 at_status=$? at_failed=false
37316 $at_check_filter
37317 at_fn_diff_devnull "$at_stderr" || at_failed=:
37318 at_fn_diff_devnull "$at_stdout" || at_failed=:
37319 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
37320 $at_failed && at_fn_log_failure
37321 $at_traceon; }
37322
37323               { set +x
37324 $as_echo "$at_srcdir/xattr05.at:31:
37325 mkdir oldgnu
37326 (cd oldgnu
37327 TEST_TAR_FORMAT=oldgnu
37328 export TEST_TAR_FORMAT
37329 TAR_OPTIONS=\"-H oldgnu\"
37330 export TAR_OPTIONS
37331 rm -rf *
37332
37333
37334
37335   file=\$(TMPDIR=. mktemp fiXXXXXX)
37336
37337   setfattr -n user.test -v test \$file &> /dev/null
37338   if test \"\$?\" != 0; then
37339     exit 77
37340   fi
37341
37342
37343   getfattr \$file &> /dev/null
37344   if test \"\$?\" != 0; then
37345     exit 77
37346   fi
37347
37348
37349   file=\$(TMPDIR=. mktemp fiXXXXXX)
37350   setfattr -n user.test -v ahoj \$file
37351   # check whether tar fails to store xattrs
37352   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37353   if test \"\$err\" != \"0\"; then
37354     exit 77
37355   fi
37356
37357
37358 mkdir dir
37359 mkdir output
37360 genfile --file dir/file
37361
37362 setfattr -n user.=NAME%3D= -v value dir/file
37363 getfattr -d dir/file | grep -v '# ' > before
37364
37365 # archive whole directory including binary xattrs
37366 tar --xattrs -cf archive.tar -C dir .
37367
37368 tar --xattrs -xf archive.tar -C output
37369 getfattr -d output/file | grep -v '# ' > after
37370 diff before after
37371 )"
37372 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
37373 ( $at_check_trace;
37374 mkdir oldgnu
37375 (cd oldgnu
37376 TEST_TAR_FORMAT=oldgnu
37377 export TEST_TAR_FORMAT
37378 TAR_OPTIONS="-H oldgnu"
37379 export TAR_OPTIONS
37380 rm -rf *
37381
37382
37383
37384   file=$(TMPDIR=. mktemp fiXXXXXX)
37385
37386   setfattr -n user.test -v test $file &> /dev/null
37387   if test "$?" != 0; then
37388     exit 77
37389   fi
37390
37391
37392   getfattr $file &> /dev/null
37393   if test "$?" != 0; then
37394     exit 77
37395   fi
37396
37397
37398   file=$(TMPDIR=. mktemp fiXXXXXX)
37399   setfattr -n user.test -v ahoj $file
37400   # check whether tar fails to store xattrs
37401   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37402   if test "$err" != "0"; then
37403     exit 77
37404   fi
37405
37406
37407 mkdir dir
37408 mkdir output
37409 genfile --file dir/file
37410
37411 setfattr -n user.=NAME%3D= -v value dir/file
37412 getfattr -d dir/file | grep -v '# ' > before
37413
37414 # archive whole directory including binary xattrs
37415 tar --xattrs -cf archive.tar -C dir .
37416
37417 tar --xattrs -xf archive.tar -C output
37418 getfattr -d output/file | grep -v '# ' > after
37419 diff before after
37420 )
37421 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37422 at_status=$? at_failed=false
37423 $at_check_filter
37424 at_fn_diff_devnull "$at_stderr" || at_failed=:
37425 at_fn_diff_devnull "$at_stdout" || at_failed=:
37426 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
37427 $at_failed && at_fn_log_failure
37428 $at_traceon; }
37429
37430               { set +x
37431 $as_echo "$at_srcdir/xattr05.at:31:
37432 mkdir ustar
37433 (cd ustar
37434 TEST_TAR_FORMAT=ustar
37435 export TEST_TAR_FORMAT
37436 TAR_OPTIONS=\"-H ustar\"
37437 export TAR_OPTIONS
37438 rm -rf *
37439
37440
37441
37442   file=\$(TMPDIR=. mktemp fiXXXXXX)
37443
37444   setfattr -n user.test -v test \$file &> /dev/null
37445   if test \"\$?\" != 0; then
37446     exit 77
37447   fi
37448
37449
37450   getfattr \$file &> /dev/null
37451   if test \"\$?\" != 0; then
37452     exit 77
37453   fi
37454
37455
37456   file=\$(TMPDIR=. mktemp fiXXXXXX)
37457   setfattr -n user.test -v ahoj \$file
37458   # check whether tar fails to store xattrs
37459   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37460   if test \"\$err\" != \"0\"; then
37461     exit 77
37462   fi
37463
37464
37465 mkdir dir
37466 mkdir output
37467 genfile --file dir/file
37468
37469 setfattr -n user.=NAME%3D= -v value dir/file
37470 getfattr -d dir/file | grep -v '# ' > before
37471
37472 # archive whole directory including binary xattrs
37473 tar --xattrs -cf archive.tar -C dir .
37474
37475 tar --xattrs -xf archive.tar -C output
37476 getfattr -d output/file | grep -v '# ' > after
37477 diff before after
37478 )"
37479 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
37480 ( $at_check_trace;
37481 mkdir ustar
37482 (cd ustar
37483 TEST_TAR_FORMAT=ustar
37484 export TEST_TAR_FORMAT
37485 TAR_OPTIONS="-H ustar"
37486 export TAR_OPTIONS
37487 rm -rf *
37488
37489
37490
37491   file=$(TMPDIR=. mktemp fiXXXXXX)
37492
37493   setfattr -n user.test -v test $file &> /dev/null
37494   if test "$?" != 0; then
37495     exit 77
37496   fi
37497
37498
37499   getfattr $file &> /dev/null
37500   if test "$?" != 0; then
37501     exit 77
37502   fi
37503
37504
37505   file=$(TMPDIR=. mktemp fiXXXXXX)
37506   setfattr -n user.test -v ahoj $file
37507   # check whether tar fails to store xattrs
37508   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37509   if test "$err" != "0"; then
37510     exit 77
37511   fi
37512
37513
37514 mkdir dir
37515 mkdir output
37516 genfile --file dir/file
37517
37518 setfattr -n user.=NAME%3D= -v value dir/file
37519 getfattr -d dir/file | grep -v '# ' > before
37520
37521 # archive whole directory including binary xattrs
37522 tar --xattrs -cf archive.tar -C dir .
37523
37524 tar --xattrs -xf archive.tar -C output
37525 getfattr -d output/file | grep -v '# ' > after
37526 diff before after
37527 )
37528 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37529 at_status=$? at_failed=false
37530 $at_check_filter
37531 at_fn_diff_devnull "$at_stderr" || at_failed=:
37532 at_fn_diff_devnull "$at_stdout" || at_failed=:
37533 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
37534 $at_failed && at_fn_log_failure
37535 $at_traceon; }
37536
37537               { set +x
37538 $as_echo "$at_srcdir/xattr05.at:31:
37539 mkdir posix
37540 (cd posix
37541 TEST_TAR_FORMAT=posix
37542 export TEST_TAR_FORMAT
37543 TAR_OPTIONS=\"-H posix\"
37544 export TAR_OPTIONS
37545 rm -rf *
37546
37547
37548
37549   file=\$(TMPDIR=. mktemp fiXXXXXX)
37550
37551   setfattr -n user.test -v test \$file &> /dev/null
37552   if test \"\$?\" != 0; then
37553     exit 77
37554   fi
37555
37556
37557   getfattr \$file &> /dev/null
37558   if test \"\$?\" != 0; then
37559     exit 77
37560   fi
37561
37562
37563   file=\$(TMPDIR=. mktemp fiXXXXXX)
37564   setfattr -n user.test -v ahoj \$file
37565   # check whether tar fails to store xattrs
37566   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37567   if test \"\$err\" != \"0\"; then
37568     exit 77
37569   fi
37570
37571
37572 mkdir dir
37573 mkdir output
37574 genfile --file dir/file
37575
37576 setfattr -n user.=NAME%3D= -v value dir/file
37577 getfattr -d dir/file | grep -v '# ' > before
37578
37579 # archive whole directory including binary xattrs
37580 tar --xattrs -cf archive.tar -C dir .
37581
37582 tar --xattrs -xf archive.tar -C output
37583 getfattr -d output/file | grep -v '# ' > after
37584 diff before after
37585 )"
37586 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
37587 ( $at_check_trace;
37588 mkdir posix
37589 (cd posix
37590 TEST_TAR_FORMAT=posix
37591 export TEST_TAR_FORMAT
37592 TAR_OPTIONS="-H posix"
37593 export TAR_OPTIONS
37594 rm -rf *
37595
37596
37597
37598   file=$(TMPDIR=. mktemp fiXXXXXX)
37599
37600   setfattr -n user.test -v test $file &> /dev/null
37601   if test "$?" != 0; then
37602     exit 77
37603   fi
37604
37605
37606   getfattr $file &> /dev/null
37607   if test "$?" != 0; then
37608     exit 77
37609   fi
37610
37611
37612   file=$(TMPDIR=. mktemp fiXXXXXX)
37613   setfattr -n user.test -v ahoj $file
37614   # check whether tar fails to store xattrs
37615   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37616   if test "$err" != "0"; then
37617     exit 77
37618   fi
37619
37620
37621 mkdir dir
37622 mkdir output
37623 genfile --file dir/file
37624
37625 setfattr -n user.=NAME%3D= -v value dir/file
37626 getfattr -d dir/file | grep -v '# ' > before
37627
37628 # archive whole directory including binary xattrs
37629 tar --xattrs -cf archive.tar -C dir .
37630
37631 tar --xattrs -xf archive.tar -C output
37632 getfattr -d output/file | grep -v '# ' > after
37633 diff before after
37634 )
37635 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37636 at_status=$? at_failed=false
37637 $at_check_filter
37638 at_fn_diff_devnull "$at_stderr" || at_failed=:
37639 at_fn_diff_devnull "$at_stdout" || at_failed=:
37640 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
37641 $at_failed && at_fn_log_failure
37642 $at_traceon; }
37643
37644               { set +x
37645 $as_echo "$at_srcdir/xattr05.at:31:
37646 mkdir gnu
37647 (cd gnu
37648 TEST_TAR_FORMAT=gnu
37649 export TEST_TAR_FORMAT
37650 TAR_OPTIONS=\"-H gnu\"
37651 export TAR_OPTIONS
37652 rm -rf *
37653
37654
37655
37656   file=\$(TMPDIR=. mktemp fiXXXXXX)
37657
37658   setfattr -n user.test -v test \$file &> /dev/null
37659   if test \"\$?\" != 0; then
37660     exit 77
37661   fi
37662
37663
37664   getfattr \$file &> /dev/null
37665   if test \"\$?\" != 0; then
37666     exit 77
37667   fi
37668
37669
37670   file=\$(TMPDIR=. mktemp fiXXXXXX)
37671   setfattr -n user.test -v ahoj \$file
37672   # check whether tar fails to store xattrs
37673   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37674   if test \"\$err\" != \"0\"; then
37675     exit 77
37676   fi
37677
37678
37679 mkdir dir
37680 mkdir output
37681 genfile --file dir/file
37682
37683 setfattr -n user.=NAME%3D= -v value dir/file
37684 getfattr -d dir/file | grep -v '# ' > before
37685
37686 # archive whole directory including binary xattrs
37687 tar --xattrs -cf archive.tar -C dir .
37688
37689 tar --xattrs -xf archive.tar -C output
37690 getfattr -d output/file | grep -v '# ' > after
37691 diff before after
37692 )"
37693 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
37694 ( $at_check_trace;
37695 mkdir gnu
37696 (cd gnu
37697 TEST_TAR_FORMAT=gnu
37698 export TEST_TAR_FORMAT
37699 TAR_OPTIONS="-H gnu"
37700 export TAR_OPTIONS
37701 rm -rf *
37702
37703
37704
37705   file=$(TMPDIR=. mktemp fiXXXXXX)
37706
37707   setfattr -n user.test -v test $file &> /dev/null
37708   if test "$?" != 0; then
37709     exit 77
37710   fi
37711
37712
37713   getfattr $file &> /dev/null
37714   if test "$?" != 0; then
37715     exit 77
37716   fi
37717
37718
37719   file=$(TMPDIR=. mktemp fiXXXXXX)
37720   setfattr -n user.test -v ahoj $file
37721   # check whether tar fails to store xattrs
37722   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37723   if test "$err" != "0"; then
37724     exit 77
37725   fi
37726
37727
37728 mkdir dir
37729 mkdir output
37730 genfile --file dir/file
37731
37732 setfattr -n user.=NAME%3D= -v value dir/file
37733 getfattr -d dir/file | grep -v '# ' > before
37734
37735 # archive whole directory including binary xattrs
37736 tar --xattrs -cf archive.tar -C dir .
37737
37738 tar --xattrs -xf archive.tar -C output
37739 getfattr -d output/file | grep -v '# ' > after
37740 diff before after
37741 )
37742 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37743 at_status=$? at_failed=false
37744 $at_check_filter
37745 at_fn_diff_devnull "$at_stderr" || at_failed=:
37746 at_fn_diff_devnull "$at_stdout" || at_failed=:
37747 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
37748 $at_failed && at_fn_log_failure
37749 $at_traceon; }
37750
37751
37752
37753
37754   set +x
37755   $at_times_p && times >"$at_times_file"
37756 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37757 read at_status <"$at_status_file"
37758 #AT_STOP_169
37759 #AT_START_170
37760 at_fn_group_banner 170 'acls01.at:25' \
37761   "acls: basic functionality" "                      " 25
37762 at_xfail=no
37763       test -f $XFAILFILE && at_xfail=yes
37764 (
37765   $as_echo "170. $at_setup_line: testing $at_desc ..."
37766   $at_traceon
37767
37768
37769
37770
37771
37772   { set +x
37773 $as_echo "$at_srcdir/acls01.at:28:
37774 mkdir v7
37775 (cd v7
37776 TEST_TAR_FORMAT=v7
37777 export TEST_TAR_FORMAT
37778 TAR_OPTIONS=\"-H v7\"
37779 export TAR_OPTIONS
37780 rm -rf *
37781
37782
37783   file=\$(TMPDIR=. mktemp fiXXXXXX)
37784
37785   setfattr -n user.test -v test \$file &> /dev/null
37786   if test \"\$?\" != 0; then
37787     exit 77
37788   fi
37789
37790
37791   getfattr \$file &> /dev/null
37792   if test \"\$?\" != 0; then
37793     exit 77
37794   fi
37795
37796
37797
37798
37799   file=\$(TMPDIR=. mktemp fiXXXXXX)
37800
37801   setfacl -m u:\$UID:rwx \$file &> /dev/null
37802   if test \"\$?\" != 0; then
37803     exit 77
37804   fi
37805
37806
37807   getfacl \$file &> /dev/null
37808   if test \"\$?\" != 0; then
37809     exit 77
37810   fi
37811
37812   rm -rf \$file
37813
37814   file=\$(TMPDIR=. mktemp fiXXXXXX)
37815   setfacl -m u:\$UID:rwx \$file
37816   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37817   if test \"\$err\" != \"0\"; then
37818     exit 77
37819   fi
37820
37821
37822 mkdir dir
37823 genfile --file dir/file
37824
37825 MYNAME=\$( id -un )
37826
37827 setfacl -m u:\$MYNAME:--x dir/file
37828 setfacl -m u:\$MYNAME:--x dir
37829
37830 getfattr -h -m. -d dir dir/file > before
37831
37832 tar --acls -cf archive.tar dir
37833 rm -rf dir
37834
37835 tar --acls -xf archive.tar
37836
37837 getfattr -h -m. -d dir dir/file > after
37838
37839 diff before after
37840 test \"\$?\" = 0
37841 )"
37842 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
37843 ( $at_check_trace;
37844 mkdir v7
37845 (cd v7
37846 TEST_TAR_FORMAT=v7
37847 export TEST_TAR_FORMAT
37848 TAR_OPTIONS="-H v7"
37849 export TAR_OPTIONS
37850 rm -rf *
37851
37852
37853   file=$(TMPDIR=. mktemp fiXXXXXX)
37854
37855   setfattr -n user.test -v test $file &> /dev/null
37856   if test "$?" != 0; then
37857     exit 77
37858   fi
37859
37860
37861   getfattr $file &> /dev/null
37862   if test "$?" != 0; then
37863     exit 77
37864   fi
37865
37866
37867
37868
37869   file=$(TMPDIR=. mktemp fiXXXXXX)
37870
37871   setfacl -m u:$UID:rwx $file &> /dev/null
37872   if test "$?" != 0; then
37873     exit 77
37874   fi
37875
37876
37877   getfacl $file &> /dev/null
37878   if test "$?" != 0; then
37879     exit 77
37880   fi
37881
37882   rm -rf $file
37883
37884   file=$(TMPDIR=. mktemp fiXXXXXX)
37885   setfacl -m u:$UID:rwx $file
37886   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37887   if test "$err" != "0"; then
37888     exit 77
37889   fi
37890
37891
37892 mkdir dir
37893 genfile --file dir/file
37894
37895 MYNAME=$( id -un )
37896
37897 setfacl -m u:$MYNAME:--x dir/file
37898 setfacl -m u:$MYNAME:--x dir
37899
37900 getfattr -h -m. -d dir dir/file > before
37901
37902 tar --acls -cf archive.tar dir
37903 rm -rf dir
37904
37905 tar --acls -xf archive.tar
37906
37907 getfattr -h -m. -d dir dir/file > after
37908
37909 diff before after
37910 test "$?" = 0
37911 )
37912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37913 at_status=$? at_failed=false
37914 $at_check_filter
37915 at_fn_diff_devnull "$at_stderr" || at_failed=:
37916 at_fn_diff_devnull "$at_stdout" || at_failed=:
37917 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
37918 $at_failed && at_fn_log_failure
37919 $at_traceon; }
37920
37921               { set +x
37922 $as_echo "$at_srcdir/acls01.at:28:
37923 mkdir oldgnu
37924 (cd oldgnu
37925 TEST_TAR_FORMAT=oldgnu
37926 export TEST_TAR_FORMAT
37927 TAR_OPTIONS=\"-H oldgnu\"
37928 export TAR_OPTIONS
37929 rm -rf *
37930
37931
37932   file=\$(TMPDIR=. mktemp fiXXXXXX)
37933
37934   setfattr -n user.test -v test \$file &> /dev/null
37935   if test \"\$?\" != 0; then
37936     exit 77
37937   fi
37938
37939
37940   getfattr \$file &> /dev/null
37941   if test \"\$?\" != 0; then
37942     exit 77
37943   fi
37944
37945
37946
37947
37948   file=\$(TMPDIR=. mktemp fiXXXXXX)
37949
37950   setfacl -m u:\$UID:rwx \$file &> /dev/null
37951   if test \"\$?\" != 0; then
37952     exit 77
37953   fi
37954
37955
37956   getfacl \$file &> /dev/null
37957   if test \"\$?\" != 0; then
37958     exit 77
37959   fi
37960
37961   rm -rf \$file
37962
37963   file=\$(TMPDIR=. mktemp fiXXXXXX)
37964   setfacl -m u:\$UID:rwx \$file
37965   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37966   if test \"\$err\" != \"0\"; then
37967     exit 77
37968   fi
37969
37970
37971 mkdir dir
37972 genfile --file dir/file
37973
37974 MYNAME=\$( id -un )
37975
37976 setfacl -m u:\$MYNAME:--x dir/file
37977 setfacl -m u:\$MYNAME:--x dir
37978
37979 getfattr -h -m. -d dir dir/file > before
37980
37981 tar --acls -cf archive.tar dir
37982 rm -rf dir
37983
37984 tar --acls -xf archive.tar
37985
37986 getfattr -h -m. -d dir dir/file > after
37987
37988 diff before after
37989 test \"\$?\" = 0
37990 )"
37991 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
37992 ( $at_check_trace;
37993 mkdir oldgnu
37994 (cd oldgnu
37995 TEST_TAR_FORMAT=oldgnu
37996 export TEST_TAR_FORMAT
37997 TAR_OPTIONS="-H oldgnu"
37998 export TAR_OPTIONS
37999 rm -rf *
38000
38001
38002   file=$(TMPDIR=. mktemp fiXXXXXX)
38003
38004   setfattr -n user.test -v test $file &> /dev/null
38005   if test "$?" != 0; then
38006     exit 77
38007   fi
38008
38009
38010   getfattr $file &> /dev/null
38011   if test "$?" != 0; then
38012     exit 77
38013   fi
38014
38015
38016
38017
38018   file=$(TMPDIR=. mktemp fiXXXXXX)
38019
38020   setfacl -m u:$UID:rwx $file &> /dev/null
38021   if test "$?" != 0; then
38022     exit 77
38023   fi
38024
38025
38026   getfacl $file &> /dev/null
38027   if test "$?" != 0; then
38028     exit 77
38029   fi
38030
38031   rm -rf $file
38032
38033   file=$(TMPDIR=. mktemp fiXXXXXX)
38034   setfacl -m u:$UID:rwx $file
38035   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38036   if test "$err" != "0"; then
38037     exit 77
38038   fi
38039
38040
38041 mkdir dir
38042 genfile --file dir/file
38043
38044 MYNAME=$( id -un )
38045
38046 setfacl -m u:$MYNAME:--x dir/file
38047 setfacl -m u:$MYNAME:--x dir
38048
38049 getfattr -h -m. -d dir dir/file > before
38050
38051 tar --acls -cf archive.tar dir
38052 rm -rf dir
38053
38054 tar --acls -xf archive.tar
38055
38056 getfattr -h -m. -d dir dir/file > after
38057
38058 diff before after
38059 test "$?" = 0
38060 )
38061 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38062 at_status=$? at_failed=false
38063 $at_check_filter
38064 at_fn_diff_devnull "$at_stderr" || at_failed=:
38065 at_fn_diff_devnull "$at_stdout" || at_failed=:
38066 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
38067 $at_failed && at_fn_log_failure
38068 $at_traceon; }
38069
38070               { set +x
38071 $as_echo "$at_srcdir/acls01.at:28:
38072 mkdir ustar
38073 (cd ustar
38074 TEST_TAR_FORMAT=ustar
38075 export TEST_TAR_FORMAT
38076 TAR_OPTIONS=\"-H ustar\"
38077 export TAR_OPTIONS
38078 rm -rf *
38079
38080
38081   file=\$(TMPDIR=. mktemp fiXXXXXX)
38082
38083   setfattr -n user.test -v test \$file &> /dev/null
38084   if test \"\$?\" != 0; then
38085     exit 77
38086   fi
38087
38088
38089   getfattr \$file &> /dev/null
38090   if test \"\$?\" != 0; then
38091     exit 77
38092   fi
38093
38094
38095
38096
38097   file=\$(TMPDIR=. mktemp fiXXXXXX)
38098
38099   setfacl -m u:\$UID:rwx \$file &> /dev/null
38100   if test \"\$?\" != 0; then
38101     exit 77
38102   fi
38103
38104
38105   getfacl \$file &> /dev/null
38106   if test \"\$?\" != 0; then
38107     exit 77
38108   fi
38109
38110   rm -rf \$file
38111
38112   file=\$(TMPDIR=. mktemp fiXXXXXX)
38113   setfacl -m u:\$UID:rwx \$file
38114   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38115   if test \"\$err\" != \"0\"; then
38116     exit 77
38117   fi
38118
38119
38120 mkdir dir
38121 genfile --file dir/file
38122
38123 MYNAME=\$( id -un )
38124
38125 setfacl -m u:\$MYNAME:--x dir/file
38126 setfacl -m u:\$MYNAME:--x dir
38127
38128 getfattr -h -m. -d dir dir/file > before
38129
38130 tar --acls -cf archive.tar dir
38131 rm -rf dir
38132
38133 tar --acls -xf archive.tar
38134
38135 getfattr -h -m. -d dir dir/file > after
38136
38137 diff before after
38138 test \"\$?\" = 0
38139 )"
38140 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
38141 ( $at_check_trace;
38142 mkdir ustar
38143 (cd ustar
38144 TEST_TAR_FORMAT=ustar
38145 export TEST_TAR_FORMAT
38146 TAR_OPTIONS="-H ustar"
38147 export TAR_OPTIONS
38148 rm -rf *
38149
38150
38151   file=$(TMPDIR=. mktemp fiXXXXXX)
38152
38153   setfattr -n user.test -v test $file &> /dev/null
38154   if test "$?" != 0; then
38155     exit 77
38156   fi
38157
38158
38159   getfattr $file &> /dev/null
38160   if test "$?" != 0; then
38161     exit 77
38162   fi
38163
38164
38165
38166
38167   file=$(TMPDIR=. mktemp fiXXXXXX)
38168
38169   setfacl -m u:$UID:rwx $file &> /dev/null
38170   if test "$?" != 0; then
38171     exit 77
38172   fi
38173
38174
38175   getfacl $file &> /dev/null
38176   if test "$?" != 0; then
38177     exit 77
38178   fi
38179
38180   rm -rf $file
38181
38182   file=$(TMPDIR=. mktemp fiXXXXXX)
38183   setfacl -m u:$UID:rwx $file
38184   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38185   if test "$err" != "0"; then
38186     exit 77
38187   fi
38188
38189
38190 mkdir dir
38191 genfile --file dir/file
38192
38193 MYNAME=$( id -un )
38194
38195 setfacl -m u:$MYNAME:--x dir/file
38196 setfacl -m u:$MYNAME:--x dir
38197
38198 getfattr -h -m. -d dir dir/file > before
38199
38200 tar --acls -cf archive.tar dir
38201 rm -rf dir
38202
38203 tar --acls -xf archive.tar
38204
38205 getfattr -h -m. -d dir dir/file > after
38206
38207 diff before after
38208 test "$?" = 0
38209 )
38210 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38211 at_status=$? at_failed=false
38212 $at_check_filter
38213 at_fn_diff_devnull "$at_stderr" || at_failed=:
38214 at_fn_diff_devnull "$at_stdout" || at_failed=:
38215 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
38216 $at_failed && at_fn_log_failure
38217 $at_traceon; }
38218
38219               { set +x
38220 $as_echo "$at_srcdir/acls01.at:28:
38221 mkdir posix
38222 (cd posix
38223 TEST_TAR_FORMAT=posix
38224 export TEST_TAR_FORMAT
38225 TAR_OPTIONS=\"-H posix\"
38226 export TAR_OPTIONS
38227 rm -rf *
38228
38229
38230   file=\$(TMPDIR=. mktemp fiXXXXXX)
38231
38232   setfattr -n user.test -v test \$file &> /dev/null
38233   if test \"\$?\" != 0; then
38234     exit 77
38235   fi
38236
38237
38238   getfattr \$file &> /dev/null
38239   if test \"\$?\" != 0; then
38240     exit 77
38241   fi
38242
38243
38244
38245
38246   file=\$(TMPDIR=. mktemp fiXXXXXX)
38247
38248   setfacl -m u:\$UID:rwx \$file &> /dev/null
38249   if test \"\$?\" != 0; then
38250     exit 77
38251   fi
38252
38253
38254   getfacl \$file &> /dev/null
38255   if test \"\$?\" != 0; then
38256     exit 77
38257   fi
38258
38259   rm -rf \$file
38260
38261   file=\$(TMPDIR=. mktemp fiXXXXXX)
38262   setfacl -m u:\$UID:rwx \$file
38263   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38264   if test \"\$err\" != \"0\"; then
38265     exit 77
38266   fi
38267
38268
38269 mkdir dir
38270 genfile --file dir/file
38271
38272 MYNAME=\$( id -un )
38273
38274 setfacl -m u:\$MYNAME:--x dir/file
38275 setfacl -m u:\$MYNAME:--x dir
38276
38277 getfattr -h -m. -d dir dir/file > before
38278
38279 tar --acls -cf archive.tar dir
38280 rm -rf dir
38281
38282 tar --acls -xf archive.tar
38283
38284 getfattr -h -m. -d dir dir/file > after
38285
38286 diff before after
38287 test \"\$?\" = 0
38288 )"
38289 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
38290 ( $at_check_trace;
38291 mkdir posix
38292 (cd posix
38293 TEST_TAR_FORMAT=posix
38294 export TEST_TAR_FORMAT
38295 TAR_OPTIONS="-H posix"
38296 export TAR_OPTIONS
38297 rm -rf *
38298
38299
38300   file=$(TMPDIR=. mktemp fiXXXXXX)
38301
38302   setfattr -n user.test -v test $file &> /dev/null
38303   if test "$?" != 0; then
38304     exit 77
38305   fi
38306
38307
38308   getfattr $file &> /dev/null
38309   if test "$?" != 0; then
38310     exit 77
38311   fi
38312
38313
38314
38315
38316   file=$(TMPDIR=. mktemp fiXXXXXX)
38317
38318   setfacl -m u:$UID:rwx $file &> /dev/null
38319   if test "$?" != 0; then
38320     exit 77
38321   fi
38322
38323
38324   getfacl $file &> /dev/null
38325   if test "$?" != 0; then
38326     exit 77
38327   fi
38328
38329   rm -rf $file
38330
38331   file=$(TMPDIR=. mktemp fiXXXXXX)
38332   setfacl -m u:$UID:rwx $file
38333   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38334   if test "$err" != "0"; then
38335     exit 77
38336   fi
38337
38338
38339 mkdir dir
38340 genfile --file dir/file
38341
38342 MYNAME=$( id -un )
38343
38344 setfacl -m u:$MYNAME:--x dir/file
38345 setfacl -m u:$MYNAME:--x dir
38346
38347 getfattr -h -m. -d dir dir/file > before
38348
38349 tar --acls -cf archive.tar dir
38350 rm -rf dir
38351
38352 tar --acls -xf archive.tar
38353
38354 getfattr -h -m. -d dir dir/file > after
38355
38356 diff before after
38357 test "$?" = 0
38358 )
38359 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38360 at_status=$? at_failed=false
38361 $at_check_filter
38362 at_fn_diff_devnull "$at_stderr" || at_failed=:
38363 at_fn_diff_devnull "$at_stdout" || at_failed=:
38364 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
38365 $at_failed && at_fn_log_failure
38366 $at_traceon; }
38367
38368               { set +x
38369 $as_echo "$at_srcdir/acls01.at:28:
38370 mkdir gnu
38371 (cd gnu
38372 TEST_TAR_FORMAT=gnu
38373 export TEST_TAR_FORMAT
38374 TAR_OPTIONS=\"-H gnu\"
38375 export TAR_OPTIONS
38376 rm -rf *
38377
38378
38379   file=\$(TMPDIR=. mktemp fiXXXXXX)
38380
38381   setfattr -n user.test -v test \$file &> /dev/null
38382   if test \"\$?\" != 0; then
38383     exit 77
38384   fi
38385
38386
38387   getfattr \$file &> /dev/null
38388   if test \"\$?\" != 0; then
38389     exit 77
38390   fi
38391
38392
38393
38394
38395   file=\$(TMPDIR=. mktemp fiXXXXXX)
38396
38397   setfacl -m u:\$UID:rwx \$file &> /dev/null
38398   if test \"\$?\" != 0; then
38399     exit 77
38400   fi
38401
38402
38403   getfacl \$file &> /dev/null
38404   if test \"\$?\" != 0; then
38405     exit 77
38406   fi
38407
38408   rm -rf \$file
38409
38410   file=\$(TMPDIR=. mktemp fiXXXXXX)
38411   setfacl -m u:\$UID:rwx \$file
38412   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38413   if test \"\$err\" != \"0\"; then
38414     exit 77
38415   fi
38416
38417
38418 mkdir dir
38419 genfile --file dir/file
38420
38421 MYNAME=\$( id -un )
38422
38423 setfacl -m u:\$MYNAME:--x dir/file
38424 setfacl -m u:\$MYNAME:--x dir
38425
38426 getfattr -h -m. -d dir dir/file > before
38427
38428 tar --acls -cf archive.tar dir
38429 rm -rf dir
38430
38431 tar --acls -xf archive.tar
38432
38433 getfattr -h -m. -d dir dir/file > after
38434
38435 diff before after
38436 test \"\$?\" = 0
38437 )"
38438 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
38439 ( $at_check_trace;
38440 mkdir gnu
38441 (cd gnu
38442 TEST_TAR_FORMAT=gnu
38443 export TEST_TAR_FORMAT
38444 TAR_OPTIONS="-H gnu"
38445 export TAR_OPTIONS
38446 rm -rf *
38447
38448
38449   file=$(TMPDIR=. mktemp fiXXXXXX)
38450
38451   setfattr -n user.test -v test $file &> /dev/null
38452   if test "$?" != 0; then
38453     exit 77
38454   fi
38455
38456
38457   getfattr $file &> /dev/null
38458   if test "$?" != 0; then
38459     exit 77
38460   fi
38461
38462
38463
38464
38465   file=$(TMPDIR=. mktemp fiXXXXXX)
38466
38467   setfacl -m u:$UID:rwx $file &> /dev/null
38468   if test "$?" != 0; then
38469     exit 77
38470   fi
38471
38472
38473   getfacl $file &> /dev/null
38474   if test "$?" != 0; then
38475     exit 77
38476   fi
38477
38478   rm -rf $file
38479
38480   file=$(TMPDIR=. mktemp fiXXXXXX)
38481   setfacl -m u:$UID:rwx $file
38482   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38483   if test "$err" != "0"; then
38484     exit 77
38485   fi
38486
38487
38488 mkdir dir
38489 genfile --file dir/file
38490
38491 MYNAME=$( id -un )
38492
38493 setfacl -m u:$MYNAME:--x dir/file
38494 setfacl -m u:$MYNAME:--x dir
38495
38496 getfattr -h -m. -d dir dir/file > before
38497
38498 tar --acls -cf archive.tar dir
38499 rm -rf dir
38500
38501 tar --acls -xf archive.tar
38502
38503 getfattr -h -m. -d dir dir/file > after
38504
38505 diff before after
38506 test "$?" = 0
38507 )
38508 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38509 at_status=$? at_failed=false
38510 $at_check_filter
38511 at_fn_diff_devnull "$at_stderr" || at_failed=:
38512 at_fn_diff_devnull "$at_stdout" || at_failed=:
38513 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
38514 $at_failed && at_fn_log_failure
38515 $at_traceon; }
38516
38517
38518
38519
38520   set +x
38521   $at_times_p && times >"$at_times_file"
38522 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38523 read at_status <"$at_status_file"
38524 #AT_STOP_170
38525 #AT_START_171
38526 at_fn_group_banner 171 'acls02.at:25' \
38527   "acls: work with -C" "                             " 25
38528 at_xfail=no
38529       test -f $XFAILFILE && at_xfail=yes
38530 (
38531   $as_echo "171. $at_setup_line: testing $at_desc ..."
38532   $at_traceon
38533
38534
38535
38536
38537
38538   { set +x
38539 $as_echo "$at_srcdir/acls02.at:28:
38540 mkdir v7
38541 (cd v7
38542 TEST_TAR_FORMAT=v7
38543 export TEST_TAR_FORMAT
38544 TAR_OPTIONS=\"-H v7\"
38545 export TAR_OPTIONS
38546 rm -rf *
38547
38548
38549   file=\$(TMPDIR=. mktemp fiXXXXXX)
38550
38551   setfattr -n user.test -v test \$file &> /dev/null
38552   if test \"\$?\" != 0; then
38553     exit 77
38554   fi
38555
38556
38557   getfattr \$file &> /dev/null
38558   if test \"\$?\" != 0; then
38559     exit 77
38560   fi
38561
38562
38563
38564
38565   file=\$(TMPDIR=. mktemp fiXXXXXX)
38566
38567   setfacl -m u:\$UID:rwx \$file &> /dev/null
38568   if test \"\$?\" != 0; then
38569     exit 77
38570   fi
38571
38572
38573   getfacl \$file &> /dev/null
38574   if test \"\$?\" != 0; then
38575     exit 77
38576   fi
38577
38578   rm -rf \$file
38579
38580   file=\$(TMPDIR=. mktemp fiXXXXXX)
38581   setfacl -m u:\$UID:rwx \$file
38582   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38583   if test \"\$err\" != \"0\"; then
38584     exit 77
38585   fi
38586
38587
38588 mkdir dir
38589 mkdir dir/subdir
38590 genfile --file dir/subdir/file
38591
38592 MYNAME=\$( id -un )
38593
38594 setfacl -m u:\$MYNAME:--x dir/subdir
38595 setfacl -m u:\$MYNAME:--x dir/subdir/file
38596
38597 cd dir
38598 getfattr -h -m. -d subdir subdir/file > ../before
38599 cd ..
38600
38601 tar --acls -cf archive.tar -C dir subdir
38602 rm -rf dir
38603
38604 mkdir dir
38605 tar --acls -xf archive.tar -C dir
38606
38607 cd dir
38608 getfattr -h -m. -d subdir subdir/file > ../after
38609 cd ..
38610
38611 diff before after
38612 test \"\$?\" = 0
38613 )"
38614 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
38615 ( $at_check_trace;
38616 mkdir v7
38617 (cd v7
38618 TEST_TAR_FORMAT=v7
38619 export TEST_TAR_FORMAT
38620 TAR_OPTIONS="-H v7"
38621 export TAR_OPTIONS
38622 rm -rf *
38623
38624
38625   file=$(TMPDIR=. mktemp fiXXXXXX)
38626
38627   setfattr -n user.test -v test $file &> /dev/null
38628   if test "$?" != 0; then
38629     exit 77
38630   fi
38631
38632
38633   getfattr $file &> /dev/null
38634   if test "$?" != 0; then
38635     exit 77
38636   fi
38637
38638
38639
38640
38641   file=$(TMPDIR=. mktemp fiXXXXXX)
38642
38643   setfacl -m u:$UID:rwx $file &> /dev/null
38644   if test "$?" != 0; then
38645     exit 77
38646   fi
38647
38648
38649   getfacl $file &> /dev/null
38650   if test "$?" != 0; then
38651     exit 77
38652   fi
38653
38654   rm -rf $file
38655
38656   file=$(TMPDIR=. mktemp fiXXXXXX)
38657   setfacl -m u:$UID:rwx $file
38658   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38659   if test "$err" != "0"; then
38660     exit 77
38661   fi
38662
38663
38664 mkdir dir
38665 mkdir dir/subdir
38666 genfile --file dir/subdir/file
38667
38668 MYNAME=$( id -un )
38669
38670 setfacl -m u:$MYNAME:--x dir/subdir
38671 setfacl -m u:$MYNAME:--x dir/subdir/file
38672
38673 cd dir
38674 getfattr -h -m. -d subdir subdir/file > ../before
38675 cd ..
38676
38677 tar --acls -cf archive.tar -C dir subdir
38678 rm -rf dir
38679
38680 mkdir dir
38681 tar --acls -xf archive.tar -C dir
38682
38683 cd dir
38684 getfattr -h -m. -d subdir subdir/file > ../after
38685 cd ..
38686
38687 diff before after
38688 test "$?" = 0
38689 )
38690 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38691 at_status=$? at_failed=false
38692 $at_check_filter
38693 at_fn_diff_devnull "$at_stderr" || at_failed=:
38694 at_fn_diff_devnull "$at_stdout" || at_failed=:
38695 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
38696 $at_failed && at_fn_log_failure
38697 $at_traceon; }
38698
38699               { set +x
38700 $as_echo "$at_srcdir/acls02.at:28:
38701 mkdir oldgnu
38702 (cd oldgnu
38703 TEST_TAR_FORMAT=oldgnu
38704 export TEST_TAR_FORMAT
38705 TAR_OPTIONS=\"-H oldgnu\"
38706 export TAR_OPTIONS
38707 rm -rf *
38708
38709
38710   file=\$(TMPDIR=. mktemp fiXXXXXX)
38711
38712   setfattr -n user.test -v test \$file &> /dev/null
38713   if test \"\$?\" != 0; then
38714     exit 77
38715   fi
38716
38717
38718   getfattr \$file &> /dev/null
38719   if test \"\$?\" != 0; then
38720     exit 77
38721   fi
38722
38723
38724
38725
38726   file=\$(TMPDIR=. mktemp fiXXXXXX)
38727
38728   setfacl -m u:\$UID:rwx \$file &> /dev/null
38729   if test \"\$?\" != 0; then
38730     exit 77
38731   fi
38732
38733
38734   getfacl \$file &> /dev/null
38735   if test \"\$?\" != 0; then
38736     exit 77
38737   fi
38738
38739   rm -rf \$file
38740
38741   file=\$(TMPDIR=. mktemp fiXXXXXX)
38742   setfacl -m u:\$UID:rwx \$file
38743   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38744   if test \"\$err\" != \"0\"; then
38745     exit 77
38746   fi
38747
38748
38749 mkdir dir
38750 mkdir dir/subdir
38751 genfile --file dir/subdir/file
38752
38753 MYNAME=\$( id -un )
38754
38755 setfacl -m u:\$MYNAME:--x dir/subdir
38756 setfacl -m u:\$MYNAME:--x dir/subdir/file
38757
38758 cd dir
38759 getfattr -h -m. -d subdir subdir/file > ../before
38760 cd ..
38761
38762 tar --acls -cf archive.tar -C dir subdir
38763 rm -rf dir
38764
38765 mkdir dir
38766 tar --acls -xf archive.tar -C dir
38767
38768 cd dir
38769 getfattr -h -m. -d subdir subdir/file > ../after
38770 cd ..
38771
38772 diff before after
38773 test \"\$?\" = 0
38774 )"
38775 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
38776 ( $at_check_trace;
38777 mkdir oldgnu
38778 (cd oldgnu
38779 TEST_TAR_FORMAT=oldgnu
38780 export TEST_TAR_FORMAT
38781 TAR_OPTIONS="-H oldgnu"
38782 export TAR_OPTIONS
38783 rm -rf *
38784
38785
38786   file=$(TMPDIR=. mktemp fiXXXXXX)
38787
38788   setfattr -n user.test -v test $file &> /dev/null
38789   if test "$?" != 0; then
38790     exit 77
38791   fi
38792
38793
38794   getfattr $file &> /dev/null
38795   if test "$?" != 0; then
38796     exit 77
38797   fi
38798
38799
38800
38801
38802   file=$(TMPDIR=. mktemp fiXXXXXX)
38803
38804   setfacl -m u:$UID:rwx $file &> /dev/null
38805   if test "$?" != 0; then
38806     exit 77
38807   fi
38808
38809
38810   getfacl $file &> /dev/null
38811   if test "$?" != 0; then
38812     exit 77
38813   fi
38814
38815   rm -rf $file
38816
38817   file=$(TMPDIR=. mktemp fiXXXXXX)
38818   setfacl -m u:$UID:rwx $file
38819   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38820   if test "$err" != "0"; then
38821     exit 77
38822   fi
38823
38824
38825 mkdir dir
38826 mkdir dir/subdir
38827 genfile --file dir/subdir/file
38828
38829 MYNAME=$( id -un )
38830
38831 setfacl -m u:$MYNAME:--x dir/subdir
38832 setfacl -m u:$MYNAME:--x dir/subdir/file
38833
38834 cd dir
38835 getfattr -h -m. -d subdir subdir/file > ../before
38836 cd ..
38837
38838 tar --acls -cf archive.tar -C dir subdir
38839 rm -rf dir
38840
38841 mkdir dir
38842 tar --acls -xf archive.tar -C dir
38843
38844 cd dir
38845 getfattr -h -m. -d subdir subdir/file > ../after
38846 cd ..
38847
38848 diff before after
38849 test "$?" = 0
38850 )
38851 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38852 at_status=$? at_failed=false
38853 $at_check_filter
38854 at_fn_diff_devnull "$at_stderr" || at_failed=:
38855 at_fn_diff_devnull "$at_stdout" || at_failed=:
38856 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
38857 $at_failed && at_fn_log_failure
38858 $at_traceon; }
38859
38860               { set +x
38861 $as_echo "$at_srcdir/acls02.at:28:
38862 mkdir ustar
38863 (cd ustar
38864 TEST_TAR_FORMAT=ustar
38865 export TEST_TAR_FORMAT
38866 TAR_OPTIONS=\"-H ustar\"
38867 export TAR_OPTIONS
38868 rm -rf *
38869
38870
38871   file=\$(TMPDIR=. mktemp fiXXXXXX)
38872
38873   setfattr -n user.test -v test \$file &> /dev/null
38874   if test \"\$?\" != 0; then
38875     exit 77
38876   fi
38877
38878
38879   getfattr \$file &> /dev/null
38880   if test \"\$?\" != 0; then
38881     exit 77
38882   fi
38883
38884
38885
38886
38887   file=\$(TMPDIR=. mktemp fiXXXXXX)
38888
38889   setfacl -m u:\$UID:rwx \$file &> /dev/null
38890   if test \"\$?\" != 0; then
38891     exit 77
38892   fi
38893
38894
38895   getfacl \$file &> /dev/null
38896   if test \"\$?\" != 0; then
38897     exit 77
38898   fi
38899
38900   rm -rf \$file
38901
38902   file=\$(TMPDIR=. mktemp fiXXXXXX)
38903   setfacl -m u:\$UID:rwx \$file
38904   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38905   if test \"\$err\" != \"0\"; then
38906     exit 77
38907   fi
38908
38909
38910 mkdir dir
38911 mkdir dir/subdir
38912 genfile --file dir/subdir/file
38913
38914 MYNAME=\$( id -un )
38915
38916 setfacl -m u:\$MYNAME:--x dir/subdir
38917 setfacl -m u:\$MYNAME:--x dir/subdir/file
38918
38919 cd dir
38920 getfattr -h -m. -d subdir subdir/file > ../before
38921 cd ..
38922
38923 tar --acls -cf archive.tar -C dir subdir
38924 rm -rf dir
38925
38926 mkdir dir
38927 tar --acls -xf archive.tar -C dir
38928
38929 cd dir
38930 getfattr -h -m. -d subdir subdir/file > ../after
38931 cd ..
38932
38933 diff before after
38934 test \"\$?\" = 0
38935 )"
38936 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
38937 ( $at_check_trace;
38938 mkdir ustar
38939 (cd ustar
38940 TEST_TAR_FORMAT=ustar
38941 export TEST_TAR_FORMAT
38942 TAR_OPTIONS="-H ustar"
38943 export TAR_OPTIONS
38944 rm -rf *
38945
38946
38947   file=$(TMPDIR=. mktemp fiXXXXXX)
38948
38949   setfattr -n user.test -v test $file &> /dev/null
38950   if test "$?" != 0; then
38951     exit 77
38952   fi
38953
38954
38955   getfattr $file &> /dev/null
38956   if test "$?" != 0; then
38957     exit 77
38958   fi
38959
38960
38961
38962
38963   file=$(TMPDIR=. mktemp fiXXXXXX)
38964
38965   setfacl -m u:$UID:rwx $file &> /dev/null
38966   if test "$?" != 0; then
38967     exit 77
38968   fi
38969
38970
38971   getfacl $file &> /dev/null
38972   if test "$?" != 0; then
38973     exit 77
38974   fi
38975
38976   rm -rf $file
38977
38978   file=$(TMPDIR=. mktemp fiXXXXXX)
38979   setfacl -m u:$UID:rwx $file
38980   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38981   if test "$err" != "0"; then
38982     exit 77
38983   fi
38984
38985
38986 mkdir dir
38987 mkdir dir/subdir
38988 genfile --file dir/subdir/file
38989
38990 MYNAME=$( id -un )
38991
38992 setfacl -m u:$MYNAME:--x dir/subdir
38993 setfacl -m u:$MYNAME:--x dir/subdir/file
38994
38995 cd dir
38996 getfattr -h -m. -d subdir subdir/file > ../before
38997 cd ..
38998
38999 tar --acls -cf archive.tar -C dir subdir
39000 rm -rf dir
39001
39002 mkdir dir
39003 tar --acls -xf archive.tar -C dir
39004
39005 cd dir
39006 getfattr -h -m. -d subdir subdir/file > ../after
39007 cd ..
39008
39009 diff before after
39010 test "$?" = 0
39011 )
39012 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39013 at_status=$? at_failed=false
39014 $at_check_filter
39015 at_fn_diff_devnull "$at_stderr" || at_failed=:
39016 at_fn_diff_devnull "$at_stdout" || at_failed=:
39017 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
39018 $at_failed && at_fn_log_failure
39019 $at_traceon; }
39020
39021               { set +x
39022 $as_echo "$at_srcdir/acls02.at:28:
39023 mkdir posix
39024 (cd posix
39025 TEST_TAR_FORMAT=posix
39026 export TEST_TAR_FORMAT
39027 TAR_OPTIONS=\"-H posix\"
39028 export TAR_OPTIONS
39029 rm -rf *
39030
39031
39032   file=\$(TMPDIR=. mktemp fiXXXXXX)
39033
39034   setfattr -n user.test -v test \$file &> /dev/null
39035   if test \"\$?\" != 0; then
39036     exit 77
39037   fi
39038
39039
39040   getfattr \$file &> /dev/null
39041   if test \"\$?\" != 0; then
39042     exit 77
39043   fi
39044
39045
39046
39047
39048   file=\$(TMPDIR=. mktemp fiXXXXXX)
39049
39050   setfacl -m u:\$UID:rwx \$file &> /dev/null
39051   if test \"\$?\" != 0; then
39052     exit 77
39053   fi
39054
39055
39056   getfacl \$file &> /dev/null
39057   if test \"\$?\" != 0; then
39058     exit 77
39059   fi
39060
39061   rm -rf \$file
39062
39063   file=\$(TMPDIR=. mktemp fiXXXXXX)
39064   setfacl -m u:\$UID:rwx \$file
39065   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39066   if test \"\$err\" != \"0\"; then
39067     exit 77
39068   fi
39069
39070
39071 mkdir dir
39072 mkdir dir/subdir
39073 genfile --file dir/subdir/file
39074
39075 MYNAME=\$( id -un )
39076
39077 setfacl -m u:\$MYNAME:--x dir/subdir
39078 setfacl -m u:\$MYNAME:--x dir/subdir/file
39079
39080 cd dir
39081 getfattr -h -m. -d subdir subdir/file > ../before
39082 cd ..
39083
39084 tar --acls -cf archive.tar -C dir subdir
39085 rm -rf dir
39086
39087 mkdir dir
39088 tar --acls -xf archive.tar -C dir
39089
39090 cd dir
39091 getfattr -h -m. -d subdir subdir/file > ../after
39092 cd ..
39093
39094 diff before after
39095 test \"\$?\" = 0
39096 )"
39097 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
39098 ( $at_check_trace;
39099 mkdir posix
39100 (cd posix
39101 TEST_TAR_FORMAT=posix
39102 export TEST_TAR_FORMAT
39103 TAR_OPTIONS="-H posix"
39104 export TAR_OPTIONS
39105 rm -rf *
39106
39107
39108   file=$(TMPDIR=. mktemp fiXXXXXX)
39109
39110   setfattr -n user.test -v test $file &> /dev/null
39111   if test "$?" != 0; then
39112     exit 77
39113   fi
39114
39115
39116   getfattr $file &> /dev/null
39117   if test "$?" != 0; then
39118     exit 77
39119   fi
39120
39121
39122
39123
39124   file=$(TMPDIR=. mktemp fiXXXXXX)
39125
39126   setfacl -m u:$UID:rwx $file &> /dev/null
39127   if test "$?" != 0; then
39128     exit 77
39129   fi
39130
39131
39132   getfacl $file &> /dev/null
39133   if test "$?" != 0; then
39134     exit 77
39135   fi
39136
39137   rm -rf $file
39138
39139   file=$(TMPDIR=. mktemp fiXXXXXX)
39140   setfacl -m u:$UID:rwx $file
39141   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39142   if test "$err" != "0"; then
39143     exit 77
39144   fi
39145
39146
39147 mkdir dir
39148 mkdir dir/subdir
39149 genfile --file dir/subdir/file
39150
39151 MYNAME=$( id -un )
39152
39153 setfacl -m u:$MYNAME:--x dir/subdir
39154 setfacl -m u:$MYNAME:--x dir/subdir/file
39155
39156 cd dir
39157 getfattr -h -m. -d subdir subdir/file > ../before
39158 cd ..
39159
39160 tar --acls -cf archive.tar -C dir subdir
39161 rm -rf dir
39162
39163 mkdir dir
39164 tar --acls -xf archive.tar -C dir
39165
39166 cd dir
39167 getfattr -h -m. -d subdir subdir/file > ../after
39168 cd ..
39169
39170 diff before after
39171 test "$?" = 0
39172 )
39173 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39174 at_status=$? at_failed=false
39175 $at_check_filter
39176 at_fn_diff_devnull "$at_stderr" || at_failed=:
39177 at_fn_diff_devnull "$at_stdout" || at_failed=:
39178 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
39179 $at_failed && at_fn_log_failure
39180 $at_traceon; }
39181
39182               { set +x
39183 $as_echo "$at_srcdir/acls02.at:28:
39184 mkdir gnu
39185 (cd gnu
39186 TEST_TAR_FORMAT=gnu
39187 export TEST_TAR_FORMAT
39188 TAR_OPTIONS=\"-H gnu\"
39189 export TAR_OPTIONS
39190 rm -rf *
39191
39192
39193   file=\$(TMPDIR=. mktemp fiXXXXXX)
39194
39195   setfattr -n user.test -v test \$file &> /dev/null
39196   if test \"\$?\" != 0; then
39197     exit 77
39198   fi
39199
39200
39201   getfattr \$file &> /dev/null
39202   if test \"\$?\" != 0; then
39203     exit 77
39204   fi
39205
39206
39207
39208
39209   file=\$(TMPDIR=. mktemp fiXXXXXX)
39210
39211   setfacl -m u:\$UID:rwx \$file &> /dev/null
39212   if test \"\$?\" != 0; then
39213     exit 77
39214   fi
39215
39216
39217   getfacl \$file &> /dev/null
39218   if test \"\$?\" != 0; then
39219     exit 77
39220   fi
39221
39222   rm -rf \$file
39223
39224   file=\$(TMPDIR=. mktemp fiXXXXXX)
39225   setfacl -m u:\$UID:rwx \$file
39226   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39227   if test \"\$err\" != \"0\"; then
39228     exit 77
39229   fi
39230
39231
39232 mkdir dir
39233 mkdir dir/subdir
39234 genfile --file dir/subdir/file
39235
39236 MYNAME=\$( id -un )
39237
39238 setfacl -m u:\$MYNAME:--x dir/subdir
39239 setfacl -m u:\$MYNAME:--x dir/subdir/file
39240
39241 cd dir
39242 getfattr -h -m. -d subdir subdir/file > ../before
39243 cd ..
39244
39245 tar --acls -cf archive.tar -C dir subdir
39246 rm -rf dir
39247
39248 mkdir dir
39249 tar --acls -xf archive.tar -C dir
39250
39251 cd dir
39252 getfattr -h -m. -d subdir subdir/file > ../after
39253 cd ..
39254
39255 diff before after
39256 test \"\$?\" = 0
39257 )"
39258 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
39259 ( $at_check_trace;
39260 mkdir gnu
39261 (cd gnu
39262 TEST_TAR_FORMAT=gnu
39263 export TEST_TAR_FORMAT
39264 TAR_OPTIONS="-H gnu"
39265 export TAR_OPTIONS
39266 rm -rf *
39267
39268
39269   file=$(TMPDIR=. mktemp fiXXXXXX)
39270
39271   setfattr -n user.test -v test $file &> /dev/null
39272   if test "$?" != 0; then
39273     exit 77
39274   fi
39275
39276
39277   getfattr $file &> /dev/null
39278   if test "$?" != 0; then
39279     exit 77
39280   fi
39281
39282
39283
39284
39285   file=$(TMPDIR=. mktemp fiXXXXXX)
39286
39287   setfacl -m u:$UID:rwx $file &> /dev/null
39288   if test "$?" != 0; then
39289     exit 77
39290   fi
39291
39292
39293   getfacl $file &> /dev/null
39294   if test "$?" != 0; then
39295     exit 77
39296   fi
39297
39298   rm -rf $file
39299
39300   file=$(TMPDIR=. mktemp fiXXXXXX)
39301   setfacl -m u:$UID:rwx $file
39302   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39303   if test "$err" != "0"; then
39304     exit 77
39305   fi
39306
39307
39308 mkdir dir
39309 mkdir dir/subdir
39310 genfile --file dir/subdir/file
39311
39312 MYNAME=$( id -un )
39313
39314 setfacl -m u:$MYNAME:--x dir/subdir
39315 setfacl -m u:$MYNAME:--x dir/subdir/file
39316
39317 cd dir
39318 getfattr -h -m. -d subdir subdir/file > ../before
39319 cd ..
39320
39321 tar --acls -cf archive.tar -C dir subdir
39322 rm -rf dir
39323
39324 mkdir dir
39325 tar --acls -xf archive.tar -C dir
39326
39327 cd dir
39328 getfattr -h -m. -d subdir subdir/file > ../after
39329 cd ..
39330
39331 diff before after
39332 test "$?" = 0
39333 )
39334 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39335 at_status=$? at_failed=false
39336 $at_check_filter
39337 at_fn_diff_devnull "$at_stderr" || at_failed=:
39338 at_fn_diff_devnull "$at_stdout" || at_failed=:
39339 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
39340 $at_failed && at_fn_log_failure
39341 $at_traceon; }
39342
39343
39344
39345
39346   set +x
39347   $at_times_p && times >"$at_times_file"
39348 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39349 read at_status <"$at_status_file"
39350 #AT_STOP_171
39351 #AT_START_172
39352 at_fn_group_banner 172 'selnx01.at:25' \
39353   "selinux: basic store/restore" "                   " 25
39354 at_xfail=no
39355       test -f $XFAILFILE && at_xfail=yes
39356 (
39357   $as_echo "172. $at_setup_line: testing $at_desc ..."
39358   $at_traceon
39359
39360
39361
39362
39363
39364   { set +x
39365 $as_echo "$at_srcdir/selnx01.at:28:
39366 mkdir v7
39367 (cd v7
39368 TEST_TAR_FORMAT=v7
39369 export TEST_TAR_FORMAT
39370 TAR_OPTIONS=\"-H v7\"
39371 export TAR_OPTIONS
39372 rm -rf *
39373
39374
39375   file=\$(TMPDIR=. mktemp fiXXXXXX)
39376
39377   setfattr -n user.test -v test \$file &> /dev/null
39378   if test \"\$?\" != 0; then
39379     exit 77
39380   fi
39381
39382
39383   getfattr \$file &> /dev/null
39384   if test \"\$?\" != 0; then
39385     exit 77
39386   fi
39387
39388
39389
39390
39391   file=\$(TMPDIR=. mktemp fiXXXXXX)
39392
39393   restorecon \$file &> /dev/null
39394   if test \"\$?\" != 0; then
39395     exit 77
39396   fi
39397
39398
39399   chcon -h --user=unconfined_u \$file &> /dev/null
39400   if test \"\$?\" != 0; then
39401     exit 77
39402   fi
39403
39404   rm -rf \$file
39405
39406   file=\$(TMPDIR=. mktemp fiXXXXXX)
39407   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39408   if test \"\$err\" != \"0\"; then
39409     exit 77
39410   fi
39411
39412
39413 mkdir dir
39414 genfile --file dir/file
39415 ln -s file dir/link
39416
39417 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
39418
39419 restorecon -R dir
39420 chcon -h --user=system_u     dir
39421 chcon -h --user=unconfined_u dir/file
39422 chcon -h --user=system_u     dir/link
39423
39424 # archive whole directory including selinux contexts
39425 tar --selinux -cf archive.tar dir
39426
39427 # clear the directory
39428 rm -rf dir
39429
39430 # ================================================
39431 # check if selinux contexts are correctly restored
39432
39433 tar --selinux -xf archive.tar
39434
39435 # archive for later debugging
39436 cp archive.tar archive_origin.tar
39437
39438 # check if selinux contexts were restored
39439 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
39440     grep -v -e '^#' -e ^\$ | cut -d: -f1
39441
39442 # ===========================================================================
39443 # check if selinux contexts are not restored when --selinux option is missing
39444
39445 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
39446 rm -rf dir
39447 tar -xf archive.tar
39448 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
39449
39450 diff with_selinux without_selinux > diff_with_without
39451 if test \"\$?\" -eq \"0\"; then
39452     echo \"selinux contexts probably restored while --selinux is off\"
39453 fi
39454
39455 # =================================================================
39456 # check if selinux is not archived when --selinux option is missing
39457
39458 tar -cf archive.tar dir
39459
39460 # clear the directory
39461 rm -rf dir
39462
39463 # restore (with --selinux)
39464 tar --selinux -xf archive.tar dir
39465
39466 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
39467 diff start final > final_diff
39468 if test \"\$?\" -ne \"0\"; then
39469     echo \"bad result\"
39470 fi
39471
39472 )"
39473 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
39474 ( $at_check_trace;
39475 mkdir v7
39476 (cd v7
39477 TEST_TAR_FORMAT=v7
39478 export TEST_TAR_FORMAT
39479 TAR_OPTIONS="-H v7"
39480 export TAR_OPTIONS
39481 rm -rf *
39482
39483
39484   file=$(TMPDIR=. mktemp fiXXXXXX)
39485
39486   setfattr -n user.test -v test $file &> /dev/null
39487   if test "$?" != 0; then
39488     exit 77
39489   fi
39490
39491
39492   getfattr $file &> /dev/null
39493   if test "$?" != 0; then
39494     exit 77
39495   fi
39496
39497
39498
39499
39500   file=$(TMPDIR=. mktemp fiXXXXXX)
39501
39502   restorecon $file &> /dev/null
39503   if test "$?" != 0; then
39504     exit 77
39505   fi
39506
39507
39508   chcon -h --user=unconfined_u $file &> /dev/null
39509   if test "$?" != 0; then
39510     exit 77
39511   fi
39512
39513   rm -rf $file
39514
39515   file=$(TMPDIR=. mktemp fiXXXXXX)
39516   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39517   if test "$err" != "0"; then
39518     exit 77
39519   fi
39520
39521
39522 mkdir dir
39523 genfile --file dir/file
39524 ln -s file dir/link
39525
39526 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
39527
39528 restorecon -R dir
39529 chcon -h --user=system_u     dir
39530 chcon -h --user=unconfined_u dir/file
39531 chcon -h --user=system_u     dir/link
39532
39533 # archive whole directory including selinux contexts
39534 tar --selinux -cf archive.tar dir
39535
39536 # clear the directory
39537 rm -rf dir
39538
39539 # ================================================
39540 # check if selinux contexts are correctly restored
39541
39542 tar --selinux -xf archive.tar
39543
39544 # archive for later debugging
39545 cp archive.tar archive_origin.tar
39546
39547 # check if selinux contexts were restored
39548 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
39549     grep -v -e '^#' -e ^$ | cut -d: -f1
39550
39551 # ===========================================================================
39552 # check if selinux contexts are not restored when --selinux option is missing
39553
39554 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
39555 rm -rf dir
39556 tar -xf archive.tar
39557 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
39558
39559 diff with_selinux without_selinux > diff_with_without
39560 if test "$?" -eq "0"; then
39561     echo "selinux contexts probably restored while --selinux is off"
39562 fi
39563
39564 # =================================================================
39565 # check if selinux is not archived when --selinux option is missing
39566
39567 tar -cf archive.tar dir
39568
39569 # clear the directory
39570 rm -rf dir
39571
39572 # restore (with --selinux)
39573 tar --selinux -xf archive.tar dir
39574
39575 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
39576 diff start final > final_diff
39577 if test "$?" -ne "0"; then
39578     echo "bad result"
39579 fi
39580
39581 )
39582 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39583 at_status=$? at_failed=false
39584 $at_check_filter
39585 at_fn_diff_devnull "$at_stderr" || at_failed=:
39586 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
39587 security.selinux=\"unconfined_u
39588 security.selinux=\"system_u
39589 " | \
39590   $at_diff - "$at_stdout" || at_failed=:
39591 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
39592 $at_failed && at_fn_log_failure
39593 $at_traceon; }
39594
39595               { set +x
39596 $as_echo "$at_srcdir/selnx01.at:28:
39597 mkdir oldgnu
39598 (cd oldgnu
39599 TEST_TAR_FORMAT=oldgnu
39600 export TEST_TAR_FORMAT
39601 TAR_OPTIONS=\"-H oldgnu\"
39602 export TAR_OPTIONS
39603 rm -rf *
39604
39605
39606   file=\$(TMPDIR=. mktemp fiXXXXXX)
39607
39608   setfattr -n user.test -v test \$file &> /dev/null
39609   if test \"\$?\" != 0; then
39610     exit 77
39611   fi
39612
39613
39614   getfattr \$file &> /dev/null
39615   if test \"\$?\" != 0; then
39616     exit 77
39617   fi
39618
39619
39620
39621
39622   file=\$(TMPDIR=. mktemp fiXXXXXX)
39623
39624   restorecon \$file &> /dev/null
39625   if test \"\$?\" != 0; then
39626     exit 77
39627   fi
39628
39629
39630   chcon -h --user=unconfined_u \$file &> /dev/null
39631   if test \"\$?\" != 0; then
39632     exit 77
39633   fi
39634
39635   rm -rf \$file
39636
39637   file=\$(TMPDIR=. mktemp fiXXXXXX)
39638   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39639   if test \"\$err\" != \"0\"; then
39640     exit 77
39641   fi
39642
39643
39644 mkdir dir
39645 genfile --file dir/file
39646 ln -s file dir/link
39647
39648 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
39649
39650 restorecon -R dir
39651 chcon -h --user=system_u     dir
39652 chcon -h --user=unconfined_u dir/file
39653 chcon -h --user=system_u     dir/link
39654
39655 # archive whole directory including selinux contexts
39656 tar --selinux -cf archive.tar dir
39657
39658 # clear the directory
39659 rm -rf dir
39660
39661 # ================================================
39662 # check if selinux contexts are correctly restored
39663
39664 tar --selinux -xf archive.tar
39665
39666 # archive for later debugging
39667 cp archive.tar archive_origin.tar
39668
39669 # check if selinux contexts were restored
39670 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
39671     grep -v -e '^#' -e ^\$ | cut -d: -f1
39672
39673 # ===========================================================================
39674 # check if selinux contexts are not restored when --selinux option is missing
39675
39676 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
39677 rm -rf dir
39678 tar -xf archive.tar
39679 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
39680
39681 diff with_selinux without_selinux > diff_with_without
39682 if test \"\$?\" -eq \"0\"; then
39683     echo \"selinux contexts probably restored while --selinux is off\"
39684 fi
39685
39686 # =================================================================
39687 # check if selinux is not archived when --selinux option is missing
39688
39689 tar -cf archive.tar dir
39690
39691 # clear the directory
39692 rm -rf dir
39693
39694 # restore (with --selinux)
39695 tar --selinux -xf archive.tar dir
39696
39697 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
39698 diff start final > final_diff
39699 if test \"\$?\" -ne \"0\"; then
39700     echo \"bad result\"
39701 fi
39702
39703 )"
39704 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
39705 ( $at_check_trace;
39706 mkdir oldgnu
39707 (cd oldgnu
39708 TEST_TAR_FORMAT=oldgnu
39709 export TEST_TAR_FORMAT
39710 TAR_OPTIONS="-H oldgnu"
39711 export TAR_OPTIONS
39712 rm -rf *
39713
39714
39715   file=$(TMPDIR=. mktemp fiXXXXXX)
39716
39717   setfattr -n user.test -v test $file &> /dev/null
39718   if test "$?" != 0; then
39719     exit 77
39720   fi
39721
39722
39723   getfattr $file &> /dev/null
39724   if test "$?" != 0; then
39725     exit 77
39726   fi
39727
39728
39729
39730
39731   file=$(TMPDIR=. mktemp fiXXXXXX)
39732
39733   restorecon $file &> /dev/null
39734   if test "$?" != 0; then
39735     exit 77
39736   fi
39737
39738
39739   chcon -h --user=unconfined_u $file &> /dev/null
39740   if test "$?" != 0; then
39741     exit 77
39742   fi
39743
39744   rm -rf $file
39745
39746   file=$(TMPDIR=. mktemp fiXXXXXX)
39747   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39748   if test "$err" != "0"; then
39749     exit 77
39750   fi
39751
39752
39753 mkdir dir
39754 genfile --file dir/file
39755 ln -s file dir/link
39756
39757 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
39758
39759 restorecon -R dir
39760 chcon -h --user=system_u     dir
39761 chcon -h --user=unconfined_u dir/file
39762 chcon -h --user=system_u     dir/link
39763
39764 # archive whole directory including selinux contexts
39765 tar --selinux -cf archive.tar dir
39766
39767 # clear the directory
39768 rm -rf dir
39769
39770 # ================================================
39771 # check if selinux contexts are correctly restored
39772
39773 tar --selinux -xf archive.tar
39774
39775 # archive for later debugging
39776 cp archive.tar archive_origin.tar
39777
39778 # check if selinux contexts were restored
39779 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
39780     grep -v -e '^#' -e ^$ | cut -d: -f1
39781
39782 # ===========================================================================
39783 # check if selinux contexts are not restored when --selinux option is missing
39784
39785 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
39786 rm -rf dir
39787 tar -xf archive.tar
39788 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
39789
39790 diff with_selinux without_selinux > diff_with_without
39791 if test "$?" -eq "0"; then
39792     echo "selinux contexts probably restored while --selinux is off"
39793 fi
39794
39795 # =================================================================
39796 # check if selinux is not archived when --selinux option is missing
39797
39798 tar -cf archive.tar dir
39799
39800 # clear the directory
39801 rm -rf dir
39802
39803 # restore (with --selinux)
39804 tar --selinux -xf archive.tar dir
39805
39806 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
39807 diff start final > final_diff
39808 if test "$?" -ne "0"; then
39809     echo "bad result"
39810 fi
39811
39812 )
39813 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39814 at_status=$? at_failed=false
39815 $at_check_filter
39816 at_fn_diff_devnull "$at_stderr" || at_failed=:
39817 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
39818 security.selinux=\"unconfined_u
39819 security.selinux=\"system_u
39820 " | \
39821   $at_diff - "$at_stdout" || at_failed=:
39822 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
39823 $at_failed && at_fn_log_failure
39824 $at_traceon; }
39825
39826               { set +x
39827 $as_echo "$at_srcdir/selnx01.at:28:
39828 mkdir ustar
39829 (cd ustar
39830 TEST_TAR_FORMAT=ustar
39831 export TEST_TAR_FORMAT
39832 TAR_OPTIONS=\"-H ustar\"
39833 export TAR_OPTIONS
39834 rm -rf *
39835
39836
39837   file=\$(TMPDIR=. mktemp fiXXXXXX)
39838
39839   setfattr -n user.test -v test \$file &> /dev/null
39840   if test \"\$?\" != 0; then
39841     exit 77
39842   fi
39843
39844
39845   getfattr \$file &> /dev/null
39846   if test \"\$?\" != 0; then
39847     exit 77
39848   fi
39849
39850
39851
39852
39853   file=\$(TMPDIR=. mktemp fiXXXXXX)
39854
39855   restorecon \$file &> /dev/null
39856   if test \"\$?\" != 0; then
39857     exit 77
39858   fi
39859
39860
39861   chcon -h --user=unconfined_u \$file &> /dev/null
39862   if test \"\$?\" != 0; then
39863     exit 77
39864   fi
39865
39866   rm -rf \$file
39867
39868   file=\$(TMPDIR=. mktemp fiXXXXXX)
39869   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39870   if test \"\$err\" != \"0\"; then
39871     exit 77
39872   fi
39873
39874
39875 mkdir dir
39876 genfile --file dir/file
39877 ln -s file dir/link
39878
39879 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
39880
39881 restorecon -R dir
39882 chcon -h --user=system_u     dir
39883 chcon -h --user=unconfined_u dir/file
39884 chcon -h --user=system_u     dir/link
39885
39886 # archive whole directory including selinux contexts
39887 tar --selinux -cf archive.tar dir
39888
39889 # clear the directory
39890 rm -rf dir
39891
39892 # ================================================
39893 # check if selinux contexts are correctly restored
39894
39895 tar --selinux -xf archive.tar
39896
39897 # archive for later debugging
39898 cp archive.tar archive_origin.tar
39899
39900 # check if selinux contexts were restored
39901 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
39902     grep -v -e '^#' -e ^\$ | cut -d: -f1
39903
39904 # ===========================================================================
39905 # check if selinux contexts are not restored when --selinux option is missing
39906
39907 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
39908 rm -rf dir
39909 tar -xf archive.tar
39910 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
39911
39912 diff with_selinux without_selinux > diff_with_without
39913 if test \"\$?\" -eq \"0\"; then
39914     echo \"selinux contexts probably restored while --selinux is off\"
39915 fi
39916
39917 # =================================================================
39918 # check if selinux is not archived when --selinux option is missing
39919
39920 tar -cf archive.tar dir
39921
39922 # clear the directory
39923 rm -rf dir
39924
39925 # restore (with --selinux)
39926 tar --selinux -xf archive.tar dir
39927
39928 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
39929 diff start final > final_diff
39930 if test \"\$?\" -ne \"0\"; then
39931     echo \"bad result\"
39932 fi
39933
39934 )"
39935 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
39936 ( $at_check_trace;
39937 mkdir ustar
39938 (cd ustar
39939 TEST_TAR_FORMAT=ustar
39940 export TEST_TAR_FORMAT
39941 TAR_OPTIONS="-H ustar"
39942 export TAR_OPTIONS
39943 rm -rf *
39944
39945
39946   file=$(TMPDIR=. mktemp fiXXXXXX)
39947
39948   setfattr -n user.test -v test $file &> /dev/null
39949   if test "$?" != 0; then
39950     exit 77
39951   fi
39952
39953
39954   getfattr $file &> /dev/null
39955   if test "$?" != 0; then
39956     exit 77
39957   fi
39958
39959
39960
39961
39962   file=$(TMPDIR=. mktemp fiXXXXXX)
39963
39964   restorecon $file &> /dev/null
39965   if test "$?" != 0; then
39966     exit 77
39967   fi
39968
39969
39970   chcon -h --user=unconfined_u $file &> /dev/null
39971   if test "$?" != 0; then
39972     exit 77
39973   fi
39974
39975   rm -rf $file
39976
39977   file=$(TMPDIR=. mktemp fiXXXXXX)
39978   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39979   if test "$err" != "0"; then
39980     exit 77
39981   fi
39982
39983
39984 mkdir dir
39985 genfile --file dir/file
39986 ln -s file dir/link
39987
39988 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
39989
39990 restorecon -R dir
39991 chcon -h --user=system_u     dir
39992 chcon -h --user=unconfined_u dir/file
39993 chcon -h --user=system_u     dir/link
39994
39995 # archive whole directory including selinux contexts
39996 tar --selinux -cf archive.tar dir
39997
39998 # clear the directory
39999 rm -rf dir
40000
40001 # ================================================
40002 # check if selinux contexts are correctly restored
40003
40004 tar --selinux -xf archive.tar
40005
40006 # archive for later debugging
40007 cp archive.tar archive_origin.tar
40008
40009 # check if selinux contexts were restored
40010 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
40011     grep -v -e '^#' -e ^$ | cut -d: -f1
40012
40013 # ===========================================================================
40014 # check if selinux contexts are not restored when --selinux option is missing
40015
40016 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
40017 rm -rf dir
40018 tar -xf archive.tar
40019 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
40020
40021 diff with_selinux without_selinux > diff_with_without
40022 if test "$?" -eq "0"; then
40023     echo "selinux contexts probably restored while --selinux is off"
40024 fi
40025
40026 # =================================================================
40027 # check if selinux is not archived when --selinux option is missing
40028
40029 tar -cf archive.tar dir
40030
40031 # clear the directory
40032 rm -rf dir
40033
40034 # restore (with --selinux)
40035 tar --selinux -xf archive.tar dir
40036
40037 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
40038 diff start final > final_diff
40039 if test "$?" -ne "0"; then
40040     echo "bad result"
40041 fi
40042
40043 )
40044 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40045 at_status=$? at_failed=false
40046 $at_check_filter
40047 at_fn_diff_devnull "$at_stderr" || at_failed=:
40048 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
40049 security.selinux=\"unconfined_u
40050 security.selinux=\"system_u
40051 " | \
40052   $at_diff - "$at_stdout" || at_failed=:
40053 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
40054 $at_failed && at_fn_log_failure
40055 $at_traceon; }
40056
40057               { set +x
40058 $as_echo "$at_srcdir/selnx01.at:28:
40059 mkdir posix
40060 (cd posix
40061 TEST_TAR_FORMAT=posix
40062 export TEST_TAR_FORMAT
40063 TAR_OPTIONS=\"-H posix\"
40064 export TAR_OPTIONS
40065 rm -rf *
40066
40067
40068   file=\$(TMPDIR=. mktemp fiXXXXXX)
40069
40070   setfattr -n user.test -v test \$file &> /dev/null
40071   if test \"\$?\" != 0; then
40072     exit 77
40073   fi
40074
40075
40076   getfattr \$file &> /dev/null
40077   if test \"\$?\" != 0; then
40078     exit 77
40079   fi
40080
40081
40082
40083
40084   file=\$(TMPDIR=. mktemp fiXXXXXX)
40085
40086   restorecon \$file &> /dev/null
40087   if test \"\$?\" != 0; then
40088     exit 77
40089   fi
40090
40091
40092   chcon -h --user=unconfined_u \$file &> /dev/null
40093   if test \"\$?\" != 0; then
40094     exit 77
40095   fi
40096
40097   rm -rf \$file
40098
40099   file=\$(TMPDIR=. mktemp fiXXXXXX)
40100   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
40101   if test \"\$err\" != \"0\"; then
40102     exit 77
40103   fi
40104
40105
40106 mkdir dir
40107 genfile --file dir/file
40108 ln -s file dir/link
40109
40110 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
40111
40112 restorecon -R dir
40113 chcon -h --user=system_u     dir
40114 chcon -h --user=unconfined_u dir/file
40115 chcon -h --user=system_u     dir/link
40116
40117 # archive whole directory including selinux contexts
40118 tar --selinux -cf archive.tar dir
40119
40120 # clear the directory
40121 rm -rf dir
40122
40123 # ================================================
40124 # check if selinux contexts are correctly restored
40125
40126 tar --selinux -xf archive.tar
40127
40128 # archive for later debugging
40129 cp archive.tar archive_origin.tar
40130
40131 # check if selinux contexts were restored
40132 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
40133     grep -v -e '^#' -e ^\$ | cut -d: -f1
40134
40135 # ===========================================================================
40136 # check if selinux contexts are not restored when --selinux option is missing
40137
40138 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
40139 rm -rf dir
40140 tar -xf archive.tar
40141 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
40142
40143 diff with_selinux without_selinux > diff_with_without
40144 if test \"\$?\" -eq \"0\"; then
40145     echo \"selinux contexts probably restored while --selinux is off\"
40146 fi
40147
40148 # =================================================================
40149 # check if selinux is not archived when --selinux option is missing
40150
40151 tar -cf archive.tar dir
40152
40153 # clear the directory
40154 rm -rf dir
40155
40156 # restore (with --selinux)
40157 tar --selinux -xf archive.tar dir
40158
40159 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
40160 diff start final > final_diff
40161 if test \"\$?\" -ne \"0\"; then
40162     echo \"bad result\"
40163 fi
40164
40165 )"
40166 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
40167 ( $at_check_trace;
40168 mkdir posix
40169 (cd posix
40170 TEST_TAR_FORMAT=posix
40171 export TEST_TAR_FORMAT
40172 TAR_OPTIONS="-H posix"
40173 export TAR_OPTIONS
40174 rm -rf *
40175
40176
40177   file=$(TMPDIR=. mktemp fiXXXXXX)
40178
40179   setfattr -n user.test -v test $file &> /dev/null
40180   if test "$?" != 0; then
40181     exit 77
40182   fi
40183
40184
40185   getfattr $file &> /dev/null
40186   if test "$?" != 0; then
40187     exit 77
40188   fi
40189
40190
40191
40192
40193   file=$(TMPDIR=. mktemp fiXXXXXX)
40194
40195   restorecon $file &> /dev/null
40196   if test "$?" != 0; then
40197     exit 77
40198   fi
40199
40200
40201   chcon -h --user=unconfined_u $file &> /dev/null
40202   if test "$?" != 0; then
40203     exit 77
40204   fi
40205
40206   rm -rf $file
40207
40208   file=$(TMPDIR=. mktemp fiXXXXXX)
40209   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
40210   if test "$err" != "0"; then
40211     exit 77
40212   fi
40213
40214
40215 mkdir dir
40216 genfile --file dir/file
40217 ln -s file dir/link
40218
40219 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
40220
40221 restorecon -R dir
40222 chcon -h --user=system_u     dir
40223 chcon -h --user=unconfined_u dir/file
40224 chcon -h --user=system_u     dir/link
40225
40226 # archive whole directory including selinux contexts
40227 tar --selinux -cf archive.tar dir
40228
40229 # clear the directory
40230 rm -rf dir
40231
40232 # ================================================
40233 # check if selinux contexts are correctly restored
40234
40235 tar --selinux -xf archive.tar
40236
40237 # archive for later debugging
40238 cp archive.tar archive_origin.tar
40239
40240 # check if selinux contexts were restored
40241 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
40242     grep -v -e '^#' -e ^$ | cut -d: -f1
40243
40244 # ===========================================================================
40245 # check if selinux contexts are not restored when --selinux option is missing
40246
40247 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
40248 rm -rf dir
40249 tar -xf archive.tar
40250 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
40251
40252 diff with_selinux without_selinux > diff_with_without
40253 if test "$?" -eq "0"; then
40254     echo "selinux contexts probably restored while --selinux is off"
40255 fi
40256
40257 # =================================================================
40258 # check if selinux is not archived when --selinux option is missing
40259
40260 tar -cf archive.tar dir
40261
40262 # clear the directory
40263 rm -rf dir
40264
40265 # restore (with --selinux)
40266 tar --selinux -xf archive.tar dir
40267
40268 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
40269 diff start final > final_diff
40270 if test "$?" -ne "0"; then
40271     echo "bad result"
40272 fi
40273
40274 )
40275 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40276 at_status=$? at_failed=false
40277 $at_check_filter
40278 at_fn_diff_devnull "$at_stderr" || at_failed=:
40279 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
40280 security.selinux=\"unconfined_u
40281 security.selinux=\"system_u
40282 " | \
40283   $at_diff - "$at_stdout" || at_failed=:
40284 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
40285 $at_failed && at_fn_log_failure
40286 $at_traceon; }
40287
40288               { set +x
40289 $as_echo "$at_srcdir/selnx01.at:28:
40290 mkdir gnu
40291 (cd gnu
40292 TEST_TAR_FORMAT=gnu
40293 export TEST_TAR_FORMAT
40294 TAR_OPTIONS=\"-H gnu\"
40295 export TAR_OPTIONS
40296 rm -rf *
40297
40298
40299   file=\$(TMPDIR=. mktemp fiXXXXXX)
40300
40301   setfattr -n user.test -v test \$file &> /dev/null
40302   if test \"\$?\" != 0; then
40303     exit 77
40304   fi
40305
40306
40307   getfattr \$file &> /dev/null
40308   if test \"\$?\" != 0; then
40309     exit 77
40310   fi
40311
40312
40313
40314
40315   file=\$(TMPDIR=. mktemp fiXXXXXX)
40316
40317   restorecon \$file &> /dev/null
40318   if test \"\$?\" != 0; then
40319     exit 77
40320   fi
40321
40322
40323   chcon -h --user=unconfined_u \$file &> /dev/null
40324   if test \"\$?\" != 0; then
40325     exit 77
40326   fi
40327
40328   rm -rf \$file
40329
40330   file=\$(TMPDIR=. mktemp fiXXXXXX)
40331   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
40332   if test \"\$err\" != \"0\"; then
40333     exit 77
40334   fi
40335
40336
40337 mkdir dir
40338 genfile --file dir/file
40339 ln -s file dir/link
40340
40341 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
40342
40343 restorecon -R dir
40344 chcon -h --user=system_u     dir
40345 chcon -h --user=unconfined_u dir/file
40346 chcon -h --user=system_u     dir/link
40347
40348 # archive whole directory including selinux contexts
40349 tar --selinux -cf archive.tar dir
40350
40351 # clear the directory
40352 rm -rf dir
40353
40354 # ================================================
40355 # check if selinux contexts are correctly restored
40356
40357 tar --selinux -xf archive.tar
40358
40359 # archive for later debugging
40360 cp archive.tar archive_origin.tar
40361
40362 # check if selinux contexts were restored
40363 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
40364     grep -v -e '^#' -e ^\$ | cut -d: -f1
40365
40366 # ===========================================================================
40367 # check if selinux contexts are not restored when --selinux option is missing
40368
40369 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
40370 rm -rf dir
40371 tar -xf archive.tar
40372 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
40373
40374 diff with_selinux without_selinux > diff_with_without
40375 if test \"\$?\" -eq \"0\"; then
40376     echo \"selinux contexts probably restored while --selinux is off\"
40377 fi
40378
40379 # =================================================================
40380 # check if selinux is not archived when --selinux option is missing
40381
40382 tar -cf archive.tar dir
40383
40384 # clear the directory
40385 rm -rf dir
40386
40387 # restore (with --selinux)
40388 tar --selinux -xf archive.tar dir
40389
40390 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
40391 diff start final > final_diff
40392 if test \"\$?\" -ne \"0\"; then
40393     echo \"bad result\"
40394 fi
40395
40396 )"
40397 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
40398 ( $at_check_trace;
40399 mkdir gnu
40400 (cd gnu
40401 TEST_TAR_FORMAT=gnu
40402 export TEST_TAR_FORMAT
40403 TAR_OPTIONS="-H gnu"
40404 export TAR_OPTIONS
40405 rm -rf *
40406
40407
40408   file=$(TMPDIR=. mktemp fiXXXXXX)
40409
40410   setfattr -n user.test -v test $file &> /dev/null
40411   if test "$?" != 0; then
40412     exit 77
40413   fi
40414
40415
40416   getfattr $file &> /dev/null
40417   if test "$?" != 0; then
40418     exit 77
40419   fi
40420
40421
40422
40423
40424   file=$(TMPDIR=. mktemp fiXXXXXX)
40425
40426   restorecon $file &> /dev/null
40427   if test "$?" != 0; then
40428     exit 77
40429   fi
40430
40431
40432   chcon -h --user=unconfined_u $file &> /dev/null
40433   if test "$?" != 0; then
40434     exit 77
40435   fi
40436
40437   rm -rf $file
40438
40439   file=$(TMPDIR=. mktemp fiXXXXXX)
40440   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
40441   if test "$err" != "0"; then
40442     exit 77
40443   fi
40444
40445
40446 mkdir dir
40447 genfile --file dir/file
40448 ln -s file dir/link
40449
40450 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
40451
40452 restorecon -R dir
40453 chcon -h --user=system_u     dir
40454 chcon -h --user=unconfined_u dir/file
40455 chcon -h --user=system_u     dir/link
40456
40457 # archive whole directory including selinux contexts
40458 tar --selinux -cf archive.tar dir
40459
40460 # clear the directory
40461 rm -rf dir
40462
40463 # ================================================
40464 # check if selinux contexts are correctly restored
40465
40466 tar --selinux -xf archive.tar
40467
40468 # archive for later debugging
40469 cp archive.tar archive_origin.tar
40470
40471 # check if selinux contexts were restored
40472 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
40473     grep -v -e '^#' -e ^$ | cut -d: -f1
40474
40475 # ===========================================================================
40476 # check if selinux contexts are not restored when --selinux option is missing
40477
40478 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
40479 rm -rf dir
40480 tar -xf archive.tar
40481 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
40482
40483 diff with_selinux without_selinux > diff_with_without
40484 if test "$?" -eq "0"; then
40485     echo "selinux contexts probably restored while --selinux is off"
40486 fi
40487
40488 # =================================================================
40489 # check if selinux is not archived when --selinux option is missing
40490
40491 tar -cf archive.tar dir
40492
40493 # clear the directory
40494 rm -rf dir
40495
40496 # restore (with --selinux)
40497 tar --selinux -xf archive.tar dir
40498
40499 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
40500 diff start final > final_diff
40501 if test "$?" -ne "0"; then
40502     echo "bad result"
40503 fi
40504
40505 )
40506 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40507 at_status=$? at_failed=false
40508 $at_check_filter
40509 at_fn_diff_devnull "$at_stderr" || at_failed=:
40510 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
40511 security.selinux=\"unconfined_u
40512 security.selinux=\"system_u
40513 " | \
40514   $at_diff - "$at_stdout" || at_failed=:
40515 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
40516 $at_failed && at_fn_log_failure
40517 $at_traceon; }
40518
40519
40520
40521
40522   set +x
40523   $at_times_p && times >"$at_times_file"
40524 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
40525 read at_status <"$at_status_file"
40526 #AT_STOP_172
40527 #AT_START_173
40528 at_fn_group_banner 173 'selacl01.at:25' \
40529   "acls/selinux: special files & fifos" "            " 25
40530 at_xfail=no
40531       test -f $XFAILFILE && at_xfail=yes
40532 (
40533   $as_echo "173. $at_setup_line: testing $at_desc ..."
40534   $at_traceon
40535
40536
40537
40538
40539
40540   { set +x
40541 $as_echo "$at_srcdir/selacl01.at:28:
40542 mkdir v7
40543 (cd v7
40544 TEST_TAR_FORMAT=v7
40545 export TEST_TAR_FORMAT
40546 TAR_OPTIONS=\"-H v7\"
40547 export TAR_OPTIONS
40548 rm -rf *
40549
40550
40551 echo \"test\" > \$\$
40552 chmod 0 \$\$
40553 cat \$\$ > /dev/null 2>&1
40554 result=\$?
40555 rm -f \$\$
40556 test \$result -eq 0 || exit 77
40557
40558
40559   file=\$(TMPDIR=. mktemp fiXXXXXX)
40560
40561   setfattr -n user.test -v test \$file &> /dev/null
40562   if test \"\$?\" != 0; then
40563     exit 77
40564   fi
40565
40566
40567   getfattr \$file &> /dev/null
40568   if test \"\$?\" != 0; then
40569     exit 77
40570   fi
40571
40572
40573
40574
40575   file=\$(TMPDIR=. mktemp fiXXXXXX)
40576
40577   restorecon \$file &> /dev/null
40578   if test \"\$?\" != 0; then
40579     exit 77
40580   fi
40581
40582
40583   chcon -h --user=unconfined_u \$file &> /dev/null
40584   if test \"\$?\" != 0; then
40585     exit 77
40586   fi
40587
40588   rm -rf \$file
40589
40590   file=\$(TMPDIR=. mktemp fiXXXXXX)
40591   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
40592   if test \"\$err\" != \"0\"; then
40593     exit 77
40594   fi
40595
40596
40597
40598   file=\$(TMPDIR=. mktemp fiXXXXXX)
40599
40600   setfacl -m u:\$UID:rwx \$file &> /dev/null
40601   if test \"\$?\" != 0; then
40602     exit 77
40603   fi
40604
40605
40606   getfacl \$file &> /dev/null
40607   if test \"\$?\" != 0; then
40608     exit 77
40609   fi
40610
40611   rm -rf \$file
40612
40613   file=\$(TMPDIR=. mktemp fiXXXXXX)
40614   setfacl -m u:\$UID:rwx \$file
40615   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
40616   if test \"\$err\" != \"0\"; then
40617     exit 77
40618   fi
40619
40620
40621 mkdir dir
40622 mkfifo dir/fifo
40623 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
40624 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
40625 mknod dir/chartype c \$MAJOR \$MINOR
40626
40627 # setup attributes
40628 restorecon -R dir
40629 chcon -h --user=system_u dir/fifo
40630 chcon -h --user=system_u dir/chartype
40631 setfacl -m u:\$UID:--- dir/fifo
40632 setfacl -m u:\$UID:rwx dir/chartype
40633
40634 getfacl dir/fifo >> before
40635 getfattr -msecurity.selinux dir/chartype >> before
40636
40637 tar --xattrs --selinux --acls -cf archive.tar dir
40638
40639 mv dir olddir
40640
40641 tar --xattrs --selinux --acls -xf archive.tar
40642
40643 getfacl dir/fifo >> after
40644 getfattr -msecurity.selinux dir/chartype >> after
40645
40646 diff before after
40647 echo separator
40648 )"
40649 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
40650 ( $at_check_trace;
40651 mkdir v7
40652 (cd v7
40653 TEST_TAR_FORMAT=v7
40654 export TEST_TAR_FORMAT
40655 TAR_OPTIONS="-H v7"
40656 export TAR_OPTIONS
40657 rm -rf *
40658
40659
40660 echo "test" > $$
40661 chmod 0 $$
40662 cat $$ > /dev/null 2>&1
40663 result=$?
40664 rm -f $$
40665 test $result -eq 0 || exit 77
40666
40667
40668   file=$(TMPDIR=. mktemp fiXXXXXX)
40669
40670   setfattr -n user.test -v test $file &> /dev/null
40671   if test "$?" != 0; then
40672     exit 77
40673   fi
40674
40675
40676   getfattr $file &> /dev/null
40677   if test "$?" != 0; then
40678     exit 77
40679   fi
40680
40681
40682
40683
40684   file=$(TMPDIR=. mktemp fiXXXXXX)
40685
40686   restorecon $file &> /dev/null
40687   if test "$?" != 0; then
40688     exit 77
40689   fi
40690
40691
40692   chcon -h --user=unconfined_u $file &> /dev/null
40693   if test "$?" != 0; then
40694     exit 77
40695   fi
40696
40697   rm -rf $file
40698
40699   file=$(TMPDIR=. mktemp fiXXXXXX)
40700   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
40701   if test "$err" != "0"; then
40702     exit 77
40703   fi
40704
40705
40706
40707   file=$(TMPDIR=. mktemp fiXXXXXX)
40708
40709   setfacl -m u:$UID:rwx $file &> /dev/null
40710   if test "$?" != 0; then
40711     exit 77
40712   fi
40713
40714
40715   getfacl $file &> /dev/null
40716   if test "$?" != 0; then
40717     exit 77
40718   fi
40719
40720   rm -rf $file
40721
40722   file=$(TMPDIR=. mktemp fiXXXXXX)
40723   setfacl -m u:$UID:rwx $file
40724   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
40725   if test "$err" != "0"; then
40726     exit 77
40727   fi
40728
40729
40730 mkdir dir
40731 mkfifo dir/fifo
40732 MAJOR=$( stat /dev/urandom --printf="%t" )
40733 MINOR=$( stat /dev/urandom --printf="%T" )
40734 mknod dir/chartype c $MAJOR $MINOR
40735
40736 # setup attributes
40737 restorecon -R dir
40738 chcon -h --user=system_u dir/fifo
40739 chcon -h --user=system_u dir/chartype
40740 setfacl -m u:$UID:--- dir/fifo
40741 setfacl -m u:$UID:rwx dir/chartype
40742
40743 getfacl dir/fifo >> before
40744 getfattr -msecurity.selinux dir/chartype >> before
40745
40746 tar --xattrs --selinux --acls -cf archive.tar dir
40747
40748 mv dir olddir
40749
40750 tar --xattrs --selinux --acls -xf archive.tar
40751
40752 getfacl dir/fifo >> after
40753 getfattr -msecurity.selinux dir/chartype >> after
40754
40755 diff before after
40756 echo separator
40757 )
40758 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40759 at_status=$? at_failed=false
40760 $at_check_filter
40761 at_fn_diff_devnull "$at_stderr" || at_failed=:
40762 echo >>"$at_stdout"; $as_echo "separator
40763 " | \
40764   $at_diff - "$at_stdout" || at_failed=:
40765 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
40766 $at_failed && at_fn_log_failure
40767 $at_traceon; }
40768
40769               { set +x
40770 $as_echo "$at_srcdir/selacl01.at:28:
40771 mkdir oldgnu
40772 (cd oldgnu
40773 TEST_TAR_FORMAT=oldgnu
40774 export TEST_TAR_FORMAT
40775 TAR_OPTIONS=\"-H oldgnu\"
40776 export TAR_OPTIONS
40777 rm -rf *
40778
40779
40780 echo \"test\" > \$\$
40781 chmod 0 \$\$
40782 cat \$\$ > /dev/null 2>&1
40783 result=\$?
40784 rm -f \$\$
40785 test \$result -eq 0 || exit 77
40786
40787
40788   file=\$(TMPDIR=. mktemp fiXXXXXX)
40789
40790   setfattr -n user.test -v test \$file &> /dev/null
40791   if test \"\$?\" != 0; then
40792     exit 77
40793   fi
40794
40795
40796   getfattr \$file &> /dev/null
40797   if test \"\$?\" != 0; then
40798     exit 77
40799   fi
40800
40801
40802
40803
40804   file=\$(TMPDIR=. mktemp fiXXXXXX)
40805
40806   restorecon \$file &> /dev/null
40807   if test \"\$?\" != 0; then
40808     exit 77
40809   fi
40810
40811
40812   chcon -h --user=unconfined_u \$file &> /dev/null
40813   if test \"\$?\" != 0; then
40814     exit 77
40815   fi
40816
40817   rm -rf \$file
40818
40819   file=\$(TMPDIR=. mktemp fiXXXXXX)
40820   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
40821   if test \"\$err\" != \"0\"; then
40822     exit 77
40823   fi
40824
40825
40826
40827   file=\$(TMPDIR=. mktemp fiXXXXXX)
40828
40829   setfacl -m u:\$UID:rwx \$file &> /dev/null
40830   if test \"\$?\" != 0; then
40831     exit 77
40832   fi
40833
40834
40835   getfacl \$file &> /dev/null
40836   if test \"\$?\" != 0; then
40837     exit 77
40838   fi
40839
40840   rm -rf \$file
40841
40842   file=\$(TMPDIR=. mktemp fiXXXXXX)
40843   setfacl -m u:\$UID:rwx \$file
40844   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
40845   if test \"\$err\" != \"0\"; then
40846     exit 77
40847   fi
40848
40849
40850 mkdir dir
40851 mkfifo dir/fifo
40852 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
40853 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
40854 mknod dir/chartype c \$MAJOR \$MINOR
40855
40856 # setup attributes
40857 restorecon -R dir
40858 chcon -h --user=system_u dir/fifo
40859 chcon -h --user=system_u dir/chartype
40860 setfacl -m u:\$UID:--- dir/fifo
40861 setfacl -m u:\$UID:rwx dir/chartype
40862
40863 getfacl dir/fifo >> before
40864 getfattr -msecurity.selinux dir/chartype >> before
40865
40866 tar --xattrs --selinux --acls -cf archive.tar dir
40867
40868 mv dir olddir
40869
40870 tar --xattrs --selinux --acls -xf archive.tar
40871
40872 getfacl dir/fifo >> after
40873 getfattr -msecurity.selinux dir/chartype >> after
40874
40875 diff before after
40876 echo separator
40877 )"
40878 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
40879 ( $at_check_trace;
40880 mkdir oldgnu
40881 (cd oldgnu
40882 TEST_TAR_FORMAT=oldgnu
40883 export TEST_TAR_FORMAT
40884 TAR_OPTIONS="-H oldgnu"
40885 export TAR_OPTIONS
40886 rm -rf *
40887
40888
40889 echo "test" > $$
40890 chmod 0 $$
40891 cat $$ > /dev/null 2>&1
40892 result=$?
40893 rm -f $$
40894 test $result -eq 0 || exit 77
40895
40896
40897   file=$(TMPDIR=. mktemp fiXXXXXX)
40898
40899   setfattr -n user.test -v test $file &> /dev/null
40900   if test "$?" != 0; then
40901     exit 77
40902   fi
40903
40904
40905   getfattr $file &> /dev/null
40906   if test "$?" != 0; then
40907     exit 77
40908   fi
40909
40910
40911
40912
40913   file=$(TMPDIR=. mktemp fiXXXXXX)
40914
40915   restorecon $file &> /dev/null
40916   if test "$?" != 0; then
40917     exit 77
40918   fi
40919
40920
40921   chcon -h --user=unconfined_u $file &> /dev/null
40922   if test "$?" != 0; then
40923     exit 77
40924   fi
40925
40926   rm -rf $file
40927
40928   file=$(TMPDIR=. mktemp fiXXXXXX)
40929   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
40930   if test "$err" != "0"; then
40931     exit 77
40932   fi
40933
40934
40935
40936   file=$(TMPDIR=. mktemp fiXXXXXX)
40937
40938   setfacl -m u:$UID:rwx $file &> /dev/null
40939   if test "$?" != 0; then
40940     exit 77
40941   fi
40942
40943
40944   getfacl $file &> /dev/null
40945   if test "$?" != 0; then
40946     exit 77
40947   fi
40948
40949   rm -rf $file
40950
40951   file=$(TMPDIR=. mktemp fiXXXXXX)
40952   setfacl -m u:$UID:rwx $file
40953   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
40954   if test "$err" != "0"; then
40955     exit 77
40956   fi
40957
40958
40959 mkdir dir
40960 mkfifo dir/fifo
40961 MAJOR=$( stat /dev/urandom --printf="%t" )
40962 MINOR=$( stat /dev/urandom --printf="%T" )
40963 mknod dir/chartype c $MAJOR $MINOR
40964
40965 # setup attributes
40966 restorecon -R dir
40967 chcon -h --user=system_u dir/fifo
40968 chcon -h --user=system_u dir/chartype
40969 setfacl -m u:$UID:--- dir/fifo
40970 setfacl -m u:$UID:rwx dir/chartype
40971
40972 getfacl dir/fifo >> before
40973 getfattr -msecurity.selinux dir/chartype >> before
40974
40975 tar --xattrs --selinux --acls -cf archive.tar dir
40976
40977 mv dir olddir
40978
40979 tar --xattrs --selinux --acls -xf archive.tar
40980
40981 getfacl dir/fifo >> after
40982 getfattr -msecurity.selinux dir/chartype >> after
40983
40984 diff before after
40985 echo separator
40986 )
40987 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40988 at_status=$? at_failed=false
40989 $at_check_filter
40990 at_fn_diff_devnull "$at_stderr" || at_failed=:
40991 echo >>"$at_stdout"; $as_echo "separator
40992 " | \
40993   $at_diff - "$at_stdout" || at_failed=:
40994 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
40995 $at_failed && at_fn_log_failure
40996 $at_traceon; }
40997
40998               { set +x
40999 $as_echo "$at_srcdir/selacl01.at:28:
41000 mkdir ustar
41001 (cd ustar
41002 TEST_TAR_FORMAT=ustar
41003 export TEST_TAR_FORMAT
41004 TAR_OPTIONS=\"-H ustar\"
41005 export TAR_OPTIONS
41006 rm -rf *
41007
41008
41009 echo \"test\" > \$\$
41010 chmod 0 \$\$
41011 cat \$\$ > /dev/null 2>&1
41012 result=\$?
41013 rm -f \$\$
41014 test \$result -eq 0 || exit 77
41015
41016
41017   file=\$(TMPDIR=. mktemp fiXXXXXX)
41018
41019   setfattr -n user.test -v test \$file &> /dev/null
41020   if test \"\$?\" != 0; then
41021     exit 77
41022   fi
41023
41024
41025   getfattr \$file &> /dev/null
41026   if test \"\$?\" != 0; then
41027     exit 77
41028   fi
41029
41030
41031
41032
41033   file=\$(TMPDIR=. mktemp fiXXXXXX)
41034
41035   restorecon \$file &> /dev/null
41036   if test \"\$?\" != 0; then
41037     exit 77
41038   fi
41039
41040
41041   chcon -h --user=unconfined_u \$file &> /dev/null
41042   if test \"\$?\" != 0; then
41043     exit 77
41044   fi
41045
41046   rm -rf \$file
41047
41048   file=\$(TMPDIR=. mktemp fiXXXXXX)
41049   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41050   if test \"\$err\" != \"0\"; then
41051     exit 77
41052   fi
41053
41054
41055
41056   file=\$(TMPDIR=. mktemp fiXXXXXX)
41057
41058   setfacl -m u:\$UID:rwx \$file &> /dev/null
41059   if test \"\$?\" != 0; then
41060     exit 77
41061   fi
41062
41063
41064   getfacl \$file &> /dev/null
41065   if test \"\$?\" != 0; then
41066     exit 77
41067   fi
41068
41069   rm -rf \$file
41070
41071   file=\$(TMPDIR=. mktemp fiXXXXXX)
41072   setfacl -m u:\$UID:rwx \$file
41073   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41074   if test \"\$err\" != \"0\"; then
41075     exit 77
41076   fi
41077
41078
41079 mkdir dir
41080 mkfifo dir/fifo
41081 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
41082 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
41083 mknod dir/chartype c \$MAJOR \$MINOR
41084
41085 # setup attributes
41086 restorecon -R dir
41087 chcon -h --user=system_u dir/fifo
41088 chcon -h --user=system_u dir/chartype
41089 setfacl -m u:\$UID:--- dir/fifo
41090 setfacl -m u:\$UID:rwx dir/chartype
41091
41092 getfacl dir/fifo >> before
41093 getfattr -msecurity.selinux dir/chartype >> before
41094
41095 tar --xattrs --selinux --acls -cf archive.tar dir
41096
41097 mv dir olddir
41098
41099 tar --xattrs --selinux --acls -xf archive.tar
41100
41101 getfacl dir/fifo >> after
41102 getfattr -msecurity.selinux dir/chartype >> after
41103
41104 diff before after
41105 echo separator
41106 )"
41107 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
41108 ( $at_check_trace;
41109 mkdir ustar
41110 (cd ustar
41111 TEST_TAR_FORMAT=ustar
41112 export TEST_TAR_FORMAT
41113 TAR_OPTIONS="-H ustar"
41114 export TAR_OPTIONS
41115 rm -rf *
41116
41117
41118 echo "test" > $$
41119 chmod 0 $$
41120 cat $$ > /dev/null 2>&1
41121 result=$?
41122 rm -f $$
41123 test $result -eq 0 || exit 77
41124
41125
41126   file=$(TMPDIR=. mktemp fiXXXXXX)
41127
41128   setfattr -n user.test -v test $file &> /dev/null
41129   if test "$?" != 0; then
41130     exit 77
41131   fi
41132
41133
41134   getfattr $file &> /dev/null
41135   if test "$?" != 0; then
41136     exit 77
41137   fi
41138
41139
41140
41141
41142   file=$(TMPDIR=. mktemp fiXXXXXX)
41143
41144   restorecon $file &> /dev/null
41145   if test "$?" != 0; then
41146     exit 77
41147   fi
41148
41149
41150   chcon -h --user=unconfined_u $file &> /dev/null
41151   if test "$?" != 0; then
41152     exit 77
41153   fi
41154
41155   rm -rf $file
41156
41157   file=$(TMPDIR=. mktemp fiXXXXXX)
41158   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41159   if test "$err" != "0"; then
41160     exit 77
41161   fi
41162
41163
41164
41165   file=$(TMPDIR=. mktemp fiXXXXXX)
41166
41167   setfacl -m u:$UID:rwx $file &> /dev/null
41168   if test "$?" != 0; then
41169     exit 77
41170   fi
41171
41172
41173   getfacl $file &> /dev/null
41174   if test "$?" != 0; then
41175     exit 77
41176   fi
41177
41178   rm -rf $file
41179
41180   file=$(TMPDIR=. mktemp fiXXXXXX)
41181   setfacl -m u:$UID:rwx $file
41182   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41183   if test "$err" != "0"; then
41184     exit 77
41185   fi
41186
41187
41188 mkdir dir
41189 mkfifo dir/fifo
41190 MAJOR=$( stat /dev/urandom --printf="%t" )
41191 MINOR=$( stat /dev/urandom --printf="%T" )
41192 mknod dir/chartype c $MAJOR $MINOR
41193
41194 # setup attributes
41195 restorecon -R dir
41196 chcon -h --user=system_u dir/fifo
41197 chcon -h --user=system_u dir/chartype
41198 setfacl -m u:$UID:--- dir/fifo
41199 setfacl -m u:$UID:rwx dir/chartype
41200
41201 getfacl dir/fifo >> before
41202 getfattr -msecurity.selinux dir/chartype >> before
41203
41204 tar --xattrs --selinux --acls -cf archive.tar dir
41205
41206 mv dir olddir
41207
41208 tar --xattrs --selinux --acls -xf archive.tar
41209
41210 getfacl dir/fifo >> after
41211 getfattr -msecurity.selinux dir/chartype >> after
41212
41213 diff before after
41214 echo separator
41215 )
41216 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41217 at_status=$? at_failed=false
41218 $at_check_filter
41219 at_fn_diff_devnull "$at_stderr" || at_failed=:
41220 echo >>"$at_stdout"; $as_echo "separator
41221 " | \
41222   $at_diff - "$at_stdout" || at_failed=:
41223 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
41224 $at_failed && at_fn_log_failure
41225 $at_traceon; }
41226
41227               { set +x
41228 $as_echo "$at_srcdir/selacl01.at:28:
41229 mkdir posix
41230 (cd posix
41231 TEST_TAR_FORMAT=posix
41232 export TEST_TAR_FORMAT
41233 TAR_OPTIONS=\"-H posix\"
41234 export TAR_OPTIONS
41235 rm -rf *
41236
41237
41238 echo \"test\" > \$\$
41239 chmod 0 \$\$
41240 cat \$\$ > /dev/null 2>&1
41241 result=\$?
41242 rm -f \$\$
41243 test \$result -eq 0 || exit 77
41244
41245
41246   file=\$(TMPDIR=. mktemp fiXXXXXX)
41247
41248   setfattr -n user.test -v test \$file &> /dev/null
41249   if test \"\$?\" != 0; then
41250     exit 77
41251   fi
41252
41253
41254   getfattr \$file &> /dev/null
41255   if test \"\$?\" != 0; then
41256     exit 77
41257   fi
41258
41259
41260
41261
41262   file=\$(TMPDIR=. mktemp fiXXXXXX)
41263
41264   restorecon \$file &> /dev/null
41265   if test \"\$?\" != 0; then
41266     exit 77
41267   fi
41268
41269
41270   chcon -h --user=unconfined_u \$file &> /dev/null
41271   if test \"\$?\" != 0; then
41272     exit 77
41273   fi
41274
41275   rm -rf \$file
41276
41277   file=\$(TMPDIR=. mktemp fiXXXXXX)
41278   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41279   if test \"\$err\" != \"0\"; then
41280     exit 77
41281   fi
41282
41283
41284
41285   file=\$(TMPDIR=. mktemp fiXXXXXX)
41286
41287   setfacl -m u:\$UID:rwx \$file &> /dev/null
41288   if test \"\$?\" != 0; then
41289     exit 77
41290   fi
41291
41292
41293   getfacl \$file &> /dev/null
41294   if test \"\$?\" != 0; then
41295     exit 77
41296   fi
41297
41298   rm -rf \$file
41299
41300   file=\$(TMPDIR=. mktemp fiXXXXXX)
41301   setfacl -m u:\$UID:rwx \$file
41302   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41303   if test \"\$err\" != \"0\"; then
41304     exit 77
41305   fi
41306
41307
41308 mkdir dir
41309 mkfifo dir/fifo
41310 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
41311 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
41312 mknod dir/chartype c \$MAJOR \$MINOR
41313
41314 # setup attributes
41315 restorecon -R dir
41316 chcon -h --user=system_u dir/fifo
41317 chcon -h --user=system_u dir/chartype
41318 setfacl -m u:\$UID:--- dir/fifo
41319 setfacl -m u:\$UID:rwx dir/chartype
41320
41321 getfacl dir/fifo >> before
41322 getfattr -msecurity.selinux dir/chartype >> before
41323
41324 tar --xattrs --selinux --acls -cf archive.tar dir
41325
41326 mv dir olddir
41327
41328 tar --xattrs --selinux --acls -xf archive.tar
41329
41330 getfacl dir/fifo >> after
41331 getfattr -msecurity.selinux dir/chartype >> after
41332
41333 diff before after
41334 echo separator
41335 )"
41336 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
41337 ( $at_check_trace;
41338 mkdir posix
41339 (cd posix
41340 TEST_TAR_FORMAT=posix
41341 export TEST_TAR_FORMAT
41342 TAR_OPTIONS="-H posix"
41343 export TAR_OPTIONS
41344 rm -rf *
41345
41346
41347 echo "test" > $$
41348 chmod 0 $$
41349 cat $$ > /dev/null 2>&1
41350 result=$?
41351 rm -f $$
41352 test $result -eq 0 || exit 77
41353
41354
41355   file=$(TMPDIR=. mktemp fiXXXXXX)
41356
41357   setfattr -n user.test -v test $file &> /dev/null
41358   if test "$?" != 0; then
41359     exit 77
41360   fi
41361
41362
41363   getfattr $file &> /dev/null
41364   if test "$?" != 0; then
41365     exit 77
41366   fi
41367
41368
41369
41370
41371   file=$(TMPDIR=. mktemp fiXXXXXX)
41372
41373   restorecon $file &> /dev/null
41374   if test "$?" != 0; then
41375     exit 77
41376   fi
41377
41378
41379   chcon -h --user=unconfined_u $file &> /dev/null
41380   if test "$?" != 0; then
41381     exit 77
41382   fi
41383
41384   rm -rf $file
41385
41386   file=$(TMPDIR=. mktemp fiXXXXXX)
41387   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41388   if test "$err" != "0"; then
41389     exit 77
41390   fi
41391
41392
41393
41394   file=$(TMPDIR=. mktemp fiXXXXXX)
41395
41396   setfacl -m u:$UID:rwx $file &> /dev/null
41397   if test "$?" != 0; then
41398     exit 77
41399   fi
41400
41401
41402   getfacl $file &> /dev/null
41403   if test "$?" != 0; then
41404     exit 77
41405   fi
41406
41407   rm -rf $file
41408
41409   file=$(TMPDIR=. mktemp fiXXXXXX)
41410   setfacl -m u:$UID:rwx $file
41411   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41412   if test "$err" != "0"; then
41413     exit 77
41414   fi
41415
41416
41417 mkdir dir
41418 mkfifo dir/fifo
41419 MAJOR=$( stat /dev/urandom --printf="%t" )
41420 MINOR=$( stat /dev/urandom --printf="%T" )
41421 mknod dir/chartype c $MAJOR $MINOR
41422
41423 # setup attributes
41424 restorecon -R dir
41425 chcon -h --user=system_u dir/fifo
41426 chcon -h --user=system_u dir/chartype
41427 setfacl -m u:$UID:--- dir/fifo
41428 setfacl -m u:$UID:rwx dir/chartype
41429
41430 getfacl dir/fifo >> before
41431 getfattr -msecurity.selinux dir/chartype >> before
41432
41433 tar --xattrs --selinux --acls -cf archive.tar dir
41434
41435 mv dir olddir
41436
41437 tar --xattrs --selinux --acls -xf archive.tar
41438
41439 getfacl dir/fifo >> after
41440 getfattr -msecurity.selinux dir/chartype >> after
41441
41442 diff before after
41443 echo separator
41444 )
41445 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41446 at_status=$? at_failed=false
41447 $at_check_filter
41448 at_fn_diff_devnull "$at_stderr" || at_failed=:
41449 echo >>"$at_stdout"; $as_echo "separator
41450 " | \
41451   $at_diff - "$at_stdout" || at_failed=:
41452 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
41453 $at_failed && at_fn_log_failure
41454 $at_traceon; }
41455
41456               { set +x
41457 $as_echo "$at_srcdir/selacl01.at:28:
41458 mkdir gnu
41459 (cd gnu
41460 TEST_TAR_FORMAT=gnu
41461 export TEST_TAR_FORMAT
41462 TAR_OPTIONS=\"-H gnu\"
41463 export TAR_OPTIONS
41464 rm -rf *
41465
41466
41467 echo \"test\" > \$\$
41468 chmod 0 \$\$
41469 cat \$\$ > /dev/null 2>&1
41470 result=\$?
41471 rm -f \$\$
41472 test \$result -eq 0 || exit 77
41473
41474
41475   file=\$(TMPDIR=. mktemp fiXXXXXX)
41476
41477   setfattr -n user.test -v test \$file &> /dev/null
41478   if test \"\$?\" != 0; then
41479     exit 77
41480   fi
41481
41482
41483   getfattr \$file &> /dev/null
41484   if test \"\$?\" != 0; then
41485     exit 77
41486   fi
41487
41488
41489
41490
41491   file=\$(TMPDIR=. mktemp fiXXXXXX)
41492
41493   restorecon \$file &> /dev/null
41494   if test \"\$?\" != 0; then
41495     exit 77
41496   fi
41497
41498
41499   chcon -h --user=unconfined_u \$file &> /dev/null
41500   if test \"\$?\" != 0; then
41501     exit 77
41502   fi
41503
41504   rm -rf \$file
41505
41506   file=\$(TMPDIR=. mktemp fiXXXXXX)
41507   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41508   if test \"\$err\" != \"0\"; then
41509     exit 77
41510   fi
41511
41512
41513
41514   file=\$(TMPDIR=. mktemp fiXXXXXX)
41515
41516   setfacl -m u:\$UID:rwx \$file &> /dev/null
41517   if test \"\$?\" != 0; then
41518     exit 77
41519   fi
41520
41521
41522   getfacl \$file &> /dev/null
41523   if test \"\$?\" != 0; then
41524     exit 77
41525   fi
41526
41527   rm -rf \$file
41528
41529   file=\$(TMPDIR=. mktemp fiXXXXXX)
41530   setfacl -m u:\$UID:rwx \$file
41531   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41532   if test \"\$err\" != \"0\"; then
41533     exit 77
41534   fi
41535
41536
41537 mkdir dir
41538 mkfifo dir/fifo
41539 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
41540 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
41541 mknod dir/chartype c \$MAJOR \$MINOR
41542
41543 # setup attributes
41544 restorecon -R dir
41545 chcon -h --user=system_u dir/fifo
41546 chcon -h --user=system_u dir/chartype
41547 setfacl -m u:\$UID:--- dir/fifo
41548 setfacl -m u:\$UID:rwx dir/chartype
41549
41550 getfacl dir/fifo >> before
41551 getfattr -msecurity.selinux dir/chartype >> before
41552
41553 tar --xattrs --selinux --acls -cf archive.tar dir
41554
41555 mv dir olddir
41556
41557 tar --xattrs --selinux --acls -xf archive.tar
41558
41559 getfacl dir/fifo >> after
41560 getfattr -msecurity.selinux dir/chartype >> after
41561
41562 diff before after
41563 echo separator
41564 )"
41565 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
41566 ( $at_check_trace;
41567 mkdir gnu
41568 (cd gnu
41569 TEST_TAR_FORMAT=gnu
41570 export TEST_TAR_FORMAT
41571 TAR_OPTIONS="-H gnu"
41572 export TAR_OPTIONS
41573 rm -rf *
41574
41575
41576 echo "test" > $$
41577 chmod 0 $$
41578 cat $$ > /dev/null 2>&1
41579 result=$?
41580 rm -f $$
41581 test $result -eq 0 || exit 77
41582
41583
41584   file=$(TMPDIR=. mktemp fiXXXXXX)
41585
41586   setfattr -n user.test -v test $file &> /dev/null
41587   if test "$?" != 0; then
41588     exit 77
41589   fi
41590
41591
41592   getfattr $file &> /dev/null
41593   if test "$?" != 0; then
41594     exit 77
41595   fi
41596
41597
41598
41599
41600   file=$(TMPDIR=. mktemp fiXXXXXX)
41601
41602   restorecon $file &> /dev/null
41603   if test "$?" != 0; then
41604     exit 77
41605   fi
41606
41607
41608   chcon -h --user=unconfined_u $file &> /dev/null
41609   if test "$?" != 0; then
41610     exit 77
41611   fi
41612
41613   rm -rf $file
41614
41615   file=$(TMPDIR=. mktemp fiXXXXXX)
41616   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41617   if test "$err" != "0"; then
41618     exit 77
41619   fi
41620
41621
41622
41623   file=$(TMPDIR=. mktemp fiXXXXXX)
41624
41625   setfacl -m u:$UID:rwx $file &> /dev/null
41626   if test "$?" != 0; then
41627     exit 77
41628   fi
41629
41630
41631   getfacl $file &> /dev/null
41632   if test "$?" != 0; then
41633     exit 77
41634   fi
41635
41636   rm -rf $file
41637
41638   file=$(TMPDIR=. mktemp fiXXXXXX)
41639   setfacl -m u:$UID:rwx $file
41640   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41641   if test "$err" != "0"; then
41642     exit 77
41643   fi
41644
41645
41646 mkdir dir
41647 mkfifo dir/fifo
41648 MAJOR=$( stat /dev/urandom --printf="%t" )
41649 MINOR=$( stat /dev/urandom --printf="%T" )
41650 mknod dir/chartype c $MAJOR $MINOR
41651
41652 # setup attributes
41653 restorecon -R dir
41654 chcon -h --user=system_u dir/fifo
41655 chcon -h --user=system_u dir/chartype
41656 setfacl -m u:$UID:--- dir/fifo
41657 setfacl -m u:$UID:rwx dir/chartype
41658
41659 getfacl dir/fifo >> before
41660 getfattr -msecurity.selinux dir/chartype >> before
41661
41662 tar --xattrs --selinux --acls -cf archive.tar dir
41663
41664 mv dir olddir
41665
41666 tar --xattrs --selinux --acls -xf archive.tar
41667
41668 getfacl dir/fifo >> after
41669 getfattr -msecurity.selinux dir/chartype >> after
41670
41671 diff before after
41672 echo separator
41673 )
41674 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41675 at_status=$? at_failed=false
41676 $at_check_filter
41677 at_fn_diff_devnull "$at_stderr" || at_failed=:
41678 echo >>"$at_stdout"; $as_echo "separator
41679 " | \
41680   $at_diff - "$at_stdout" || at_failed=:
41681 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
41682 $at_failed && at_fn_log_failure
41683 $at_traceon; }
41684
41685
41686
41687
41688   set +x
41689   $at_times_p && times >"$at_times_file"
41690 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
41691 read at_status <"$at_status_file"
41692 #AT_STOP_173
41693 #AT_START_174
41694 at_fn_group_banner 174 'capabs_raw01.at:25' \
41695   "capabilities: binary store/restore" "             " 25
41696 at_xfail=no
41697       test -f $XFAILFILE && at_xfail=yes
41698 (
41699   $as_echo "174. $at_setup_line: testing $at_desc ..."
41700   $at_traceon
41701
41702
41703
41704
41705
41706   { set +x
41707 $as_echo "$at_srcdir/capabs_raw01.at:28:
41708 mkdir v7
41709 (cd v7
41710 TEST_TAR_FORMAT=v7
41711 export TEST_TAR_FORMAT
41712 TAR_OPTIONS=\"-H v7\"
41713 export TAR_OPTIONS
41714 rm -rf *
41715
41716
41717 echo \"test\" > \$\$
41718 chmod 0 \$\$
41719 cat \$\$ > /dev/null 2>&1
41720 result=\$?
41721 rm -f \$\$
41722 test \$result -eq 0 || exit 77
41723
41724
41725
41726   file=\$(TMPDIR=. mktemp fiXXXXXX)
41727
41728   setfattr -n user.test -v test \$file &> /dev/null
41729   if test \"\$?\" != 0; then
41730     exit 77
41731   fi
41732
41733
41734   getfattr \$file &> /dev/null
41735   if test \"\$?\" != 0; then
41736     exit 77
41737   fi
41738
41739
41740   file=\$(TMPDIR=. mktemp fiXXXXXX)
41741   setfattr -n user.test -v ahoj \$file
41742   # check whether tar fails to store xattrs
41743   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41744   if test \"\$err\" != \"0\"; then
41745     exit 77
41746   fi
41747
41748
41749   file=\$(TMPDIR=. mktemp fiXXXXXX)
41750
41751   setcap \"= cap_chown=ei\" \$file &> /dev/null
41752   if test \"\$?\" != 0; then
41753     exit 77
41754   fi
41755
41756
41757   getcap \$file &> /dev/null
41758   if test \"\$?\" != 0; then
41759     exit 77
41760   fi
41761
41762   rm -rf \$file
41763
41764
41765 mkdir dir
41766 genfile --file dir/file
41767
41768 setcap \"= cap_chown=ei\" dir/file
41769
41770 # archive whole directory including binary xattrs
41771 tar --xattrs -cf archive.tar dir
41772
41773 # clear the directory
41774 rm -rf dir
41775
41776 # restore _all_ xattrs (not just the user.* domain)
41777 tar --xattrs --xattrs-include='*' -xf archive.tar
41778
41779 getcap dir/file
41780 )"
41781 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
41782 ( $at_check_trace;
41783 mkdir v7
41784 (cd v7
41785 TEST_TAR_FORMAT=v7
41786 export TEST_TAR_FORMAT
41787 TAR_OPTIONS="-H v7"
41788 export TAR_OPTIONS
41789 rm -rf *
41790
41791
41792 echo "test" > $$
41793 chmod 0 $$
41794 cat $$ > /dev/null 2>&1
41795 result=$?
41796 rm -f $$
41797 test $result -eq 0 || exit 77
41798
41799
41800
41801   file=$(TMPDIR=. mktemp fiXXXXXX)
41802
41803   setfattr -n user.test -v test $file &> /dev/null
41804   if test "$?" != 0; then
41805     exit 77
41806   fi
41807
41808
41809   getfattr $file &> /dev/null
41810   if test "$?" != 0; then
41811     exit 77
41812   fi
41813
41814
41815   file=$(TMPDIR=. mktemp fiXXXXXX)
41816   setfattr -n user.test -v ahoj $file
41817   # check whether tar fails to store xattrs
41818   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41819   if test "$err" != "0"; then
41820     exit 77
41821   fi
41822
41823
41824   file=$(TMPDIR=. mktemp fiXXXXXX)
41825
41826   setcap "= cap_chown=ei" $file &> /dev/null
41827   if test "$?" != 0; then
41828     exit 77
41829   fi
41830
41831
41832   getcap $file &> /dev/null
41833   if test "$?" != 0; then
41834     exit 77
41835   fi
41836
41837   rm -rf $file
41838
41839
41840 mkdir dir
41841 genfile --file dir/file
41842
41843 setcap "= cap_chown=ei" dir/file
41844
41845 # archive whole directory including binary xattrs
41846 tar --xattrs -cf archive.tar dir
41847
41848 # clear the directory
41849 rm -rf dir
41850
41851 # restore _all_ xattrs (not just the user.* domain)
41852 tar --xattrs --xattrs-include='*' -xf archive.tar
41853
41854 getcap dir/file
41855 )
41856 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41857 at_status=$? at_failed=false
41858 $at_check_filter
41859 at_fn_diff_devnull "$at_stderr" || at_failed=:
41860 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
41861 " | \
41862   $at_diff - "$at_stdout" || at_failed=:
41863 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
41864 $at_failed && at_fn_log_failure
41865 $at_traceon; }
41866
41867               { set +x
41868 $as_echo "$at_srcdir/capabs_raw01.at:28:
41869 mkdir oldgnu
41870 (cd oldgnu
41871 TEST_TAR_FORMAT=oldgnu
41872 export TEST_TAR_FORMAT
41873 TAR_OPTIONS=\"-H oldgnu\"
41874 export TAR_OPTIONS
41875 rm -rf *
41876
41877
41878 echo \"test\" > \$\$
41879 chmod 0 \$\$
41880 cat \$\$ > /dev/null 2>&1
41881 result=\$?
41882 rm -f \$\$
41883 test \$result -eq 0 || exit 77
41884
41885
41886
41887   file=\$(TMPDIR=. mktemp fiXXXXXX)
41888
41889   setfattr -n user.test -v test \$file &> /dev/null
41890   if test \"\$?\" != 0; then
41891     exit 77
41892   fi
41893
41894
41895   getfattr \$file &> /dev/null
41896   if test \"\$?\" != 0; then
41897     exit 77
41898   fi
41899
41900
41901   file=\$(TMPDIR=. mktemp fiXXXXXX)
41902   setfattr -n user.test -v ahoj \$file
41903   # check whether tar fails to store xattrs
41904   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41905   if test \"\$err\" != \"0\"; then
41906     exit 77
41907   fi
41908
41909
41910   file=\$(TMPDIR=. mktemp fiXXXXXX)
41911
41912   setcap \"= cap_chown=ei\" \$file &> /dev/null
41913   if test \"\$?\" != 0; then
41914     exit 77
41915   fi
41916
41917
41918   getcap \$file &> /dev/null
41919   if test \"\$?\" != 0; then
41920     exit 77
41921   fi
41922
41923   rm -rf \$file
41924
41925
41926 mkdir dir
41927 genfile --file dir/file
41928
41929 setcap \"= cap_chown=ei\" dir/file
41930
41931 # archive whole directory including binary xattrs
41932 tar --xattrs -cf archive.tar dir
41933
41934 # clear the directory
41935 rm -rf dir
41936
41937 # restore _all_ xattrs (not just the user.* domain)
41938 tar --xattrs --xattrs-include='*' -xf archive.tar
41939
41940 getcap dir/file
41941 )"
41942 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
41943 ( $at_check_trace;
41944 mkdir oldgnu
41945 (cd oldgnu
41946 TEST_TAR_FORMAT=oldgnu
41947 export TEST_TAR_FORMAT
41948 TAR_OPTIONS="-H oldgnu"
41949 export TAR_OPTIONS
41950 rm -rf *
41951
41952
41953 echo "test" > $$
41954 chmod 0 $$
41955 cat $$ > /dev/null 2>&1
41956 result=$?
41957 rm -f $$
41958 test $result -eq 0 || exit 77
41959
41960
41961
41962   file=$(TMPDIR=. mktemp fiXXXXXX)
41963
41964   setfattr -n user.test -v test $file &> /dev/null
41965   if test "$?" != 0; then
41966     exit 77
41967   fi
41968
41969
41970   getfattr $file &> /dev/null
41971   if test "$?" != 0; then
41972     exit 77
41973   fi
41974
41975
41976   file=$(TMPDIR=. mktemp fiXXXXXX)
41977   setfattr -n user.test -v ahoj $file
41978   # check whether tar fails to store xattrs
41979   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41980   if test "$err" != "0"; then
41981     exit 77
41982   fi
41983
41984
41985   file=$(TMPDIR=. mktemp fiXXXXXX)
41986
41987   setcap "= cap_chown=ei" $file &> /dev/null
41988   if test "$?" != 0; then
41989     exit 77
41990   fi
41991
41992
41993   getcap $file &> /dev/null
41994   if test "$?" != 0; then
41995     exit 77
41996   fi
41997
41998   rm -rf $file
41999
42000
42001 mkdir dir
42002 genfile --file dir/file
42003
42004 setcap "= cap_chown=ei" dir/file
42005
42006 # archive whole directory including binary xattrs
42007 tar --xattrs -cf archive.tar dir
42008
42009 # clear the directory
42010 rm -rf dir
42011
42012 # restore _all_ xattrs (not just the user.* domain)
42013 tar --xattrs --xattrs-include='*' -xf archive.tar
42014
42015 getcap dir/file
42016 )
42017 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42018 at_status=$? at_failed=false
42019 $at_check_filter
42020 at_fn_diff_devnull "$at_stderr" || at_failed=:
42021 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
42022 " | \
42023   $at_diff - "$at_stdout" || at_failed=:
42024 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
42025 $at_failed && at_fn_log_failure
42026 $at_traceon; }
42027
42028               { set +x
42029 $as_echo "$at_srcdir/capabs_raw01.at:28:
42030 mkdir ustar
42031 (cd ustar
42032 TEST_TAR_FORMAT=ustar
42033 export TEST_TAR_FORMAT
42034 TAR_OPTIONS=\"-H ustar\"
42035 export TAR_OPTIONS
42036 rm -rf *
42037
42038
42039 echo \"test\" > \$\$
42040 chmod 0 \$\$
42041 cat \$\$ > /dev/null 2>&1
42042 result=\$?
42043 rm -f \$\$
42044 test \$result -eq 0 || exit 77
42045
42046
42047
42048   file=\$(TMPDIR=. mktemp fiXXXXXX)
42049
42050   setfattr -n user.test -v test \$file &> /dev/null
42051   if test \"\$?\" != 0; then
42052     exit 77
42053   fi
42054
42055
42056   getfattr \$file &> /dev/null
42057   if test \"\$?\" != 0; then
42058     exit 77
42059   fi
42060
42061
42062   file=\$(TMPDIR=. mktemp fiXXXXXX)
42063   setfattr -n user.test -v ahoj \$file
42064   # check whether tar fails to store xattrs
42065   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42066   if test \"\$err\" != \"0\"; then
42067     exit 77
42068   fi
42069
42070
42071   file=\$(TMPDIR=. mktemp fiXXXXXX)
42072
42073   setcap \"= cap_chown=ei\" \$file &> /dev/null
42074   if test \"\$?\" != 0; then
42075     exit 77
42076   fi
42077
42078
42079   getcap \$file &> /dev/null
42080   if test \"\$?\" != 0; then
42081     exit 77
42082   fi
42083
42084   rm -rf \$file
42085
42086
42087 mkdir dir
42088 genfile --file dir/file
42089
42090 setcap \"= cap_chown=ei\" dir/file
42091
42092 # archive whole directory including binary xattrs
42093 tar --xattrs -cf archive.tar dir
42094
42095 # clear the directory
42096 rm -rf dir
42097
42098 # restore _all_ xattrs (not just the user.* domain)
42099 tar --xattrs --xattrs-include='*' -xf archive.tar
42100
42101 getcap dir/file
42102 )"
42103 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
42104 ( $at_check_trace;
42105 mkdir ustar
42106 (cd ustar
42107 TEST_TAR_FORMAT=ustar
42108 export TEST_TAR_FORMAT
42109 TAR_OPTIONS="-H ustar"
42110 export TAR_OPTIONS
42111 rm -rf *
42112
42113
42114 echo "test" > $$
42115 chmod 0 $$
42116 cat $$ > /dev/null 2>&1
42117 result=$?
42118 rm -f $$
42119 test $result -eq 0 || exit 77
42120
42121
42122
42123   file=$(TMPDIR=. mktemp fiXXXXXX)
42124
42125   setfattr -n user.test -v test $file &> /dev/null
42126   if test "$?" != 0; then
42127     exit 77
42128   fi
42129
42130
42131   getfattr $file &> /dev/null
42132   if test "$?" != 0; then
42133     exit 77
42134   fi
42135
42136
42137   file=$(TMPDIR=. mktemp fiXXXXXX)
42138   setfattr -n user.test -v ahoj $file
42139   # check whether tar fails to store xattrs
42140   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42141   if test "$err" != "0"; then
42142     exit 77
42143   fi
42144
42145
42146   file=$(TMPDIR=. mktemp fiXXXXXX)
42147
42148   setcap "= cap_chown=ei" $file &> /dev/null
42149   if test "$?" != 0; then
42150     exit 77
42151   fi
42152
42153
42154   getcap $file &> /dev/null
42155   if test "$?" != 0; then
42156     exit 77
42157   fi
42158
42159   rm -rf $file
42160
42161
42162 mkdir dir
42163 genfile --file dir/file
42164
42165 setcap "= cap_chown=ei" dir/file
42166
42167 # archive whole directory including binary xattrs
42168 tar --xattrs -cf archive.tar dir
42169
42170 # clear the directory
42171 rm -rf dir
42172
42173 # restore _all_ xattrs (not just the user.* domain)
42174 tar --xattrs --xattrs-include='*' -xf archive.tar
42175
42176 getcap dir/file
42177 )
42178 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42179 at_status=$? at_failed=false
42180 $at_check_filter
42181 at_fn_diff_devnull "$at_stderr" || at_failed=:
42182 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
42183 " | \
42184   $at_diff - "$at_stdout" || at_failed=:
42185 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
42186 $at_failed && at_fn_log_failure
42187 $at_traceon; }
42188
42189               { set +x
42190 $as_echo "$at_srcdir/capabs_raw01.at:28:
42191 mkdir posix
42192 (cd posix
42193 TEST_TAR_FORMAT=posix
42194 export TEST_TAR_FORMAT
42195 TAR_OPTIONS=\"-H posix\"
42196 export TAR_OPTIONS
42197 rm -rf *
42198
42199
42200 echo \"test\" > \$\$
42201 chmod 0 \$\$
42202 cat \$\$ > /dev/null 2>&1
42203 result=\$?
42204 rm -f \$\$
42205 test \$result -eq 0 || exit 77
42206
42207
42208
42209   file=\$(TMPDIR=. mktemp fiXXXXXX)
42210
42211   setfattr -n user.test -v test \$file &> /dev/null
42212   if test \"\$?\" != 0; then
42213     exit 77
42214   fi
42215
42216
42217   getfattr \$file &> /dev/null
42218   if test \"\$?\" != 0; then
42219     exit 77
42220   fi
42221
42222
42223   file=\$(TMPDIR=. mktemp fiXXXXXX)
42224   setfattr -n user.test -v ahoj \$file
42225   # check whether tar fails to store xattrs
42226   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42227   if test \"\$err\" != \"0\"; then
42228     exit 77
42229   fi
42230
42231
42232   file=\$(TMPDIR=. mktemp fiXXXXXX)
42233
42234   setcap \"= cap_chown=ei\" \$file &> /dev/null
42235   if test \"\$?\" != 0; then
42236     exit 77
42237   fi
42238
42239
42240   getcap \$file &> /dev/null
42241   if test \"\$?\" != 0; then
42242     exit 77
42243   fi
42244
42245   rm -rf \$file
42246
42247
42248 mkdir dir
42249 genfile --file dir/file
42250
42251 setcap \"= cap_chown=ei\" dir/file
42252
42253 # archive whole directory including binary xattrs
42254 tar --xattrs -cf archive.tar dir
42255
42256 # clear the directory
42257 rm -rf dir
42258
42259 # restore _all_ xattrs (not just the user.* domain)
42260 tar --xattrs --xattrs-include='*' -xf archive.tar
42261
42262 getcap dir/file
42263 )"
42264 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
42265 ( $at_check_trace;
42266 mkdir posix
42267 (cd posix
42268 TEST_TAR_FORMAT=posix
42269 export TEST_TAR_FORMAT
42270 TAR_OPTIONS="-H posix"
42271 export TAR_OPTIONS
42272 rm -rf *
42273
42274
42275 echo "test" > $$
42276 chmod 0 $$
42277 cat $$ > /dev/null 2>&1
42278 result=$?
42279 rm -f $$
42280 test $result -eq 0 || exit 77
42281
42282
42283
42284   file=$(TMPDIR=. mktemp fiXXXXXX)
42285
42286   setfattr -n user.test -v test $file &> /dev/null
42287   if test "$?" != 0; then
42288     exit 77
42289   fi
42290
42291
42292   getfattr $file &> /dev/null
42293   if test "$?" != 0; then
42294     exit 77
42295   fi
42296
42297
42298   file=$(TMPDIR=. mktemp fiXXXXXX)
42299   setfattr -n user.test -v ahoj $file
42300   # check whether tar fails to store xattrs
42301   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42302   if test "$err" != "0"; then
42303     exit 77
42304   fi
42305
42306
42307   file=$(TMPDIR=. mktemp fiXXXXXX)
42308
42309   setcap "= cap_chown=ei" $file &> /dev/null
42310   if test "$?" != 0; then
42311     exit 77
42312   fi
42313
42314
42315   getcap $file &> /dev/null
42316   if test "$?" != 0; then
42317     exit 77
42318   fi
42319
42320   rm -rf $file
42321
42322
42323 mkdir dir
42324 genfile --file dir/file
42325
42326 setcap "= cap_chown=ei" dir/file
42327
42328 # archive whole directory including binary xattrs
42329 tar --xattrs -cf archive.tar dir
42330
42331 # clear the directory
42332 rm -rf dir
42333
42334 # restore _all_ xattrs (not just the user.* domain)
42335 tar --xattrs --xattrs-include='*' -xf archive.tar
42336
42337 getcap dir/file
42338 )
42339 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42340 at_status=$? at_failed=false
42341 $at_check_filter
42342 at_fn_diff_devnull "$at_stderr" || at_failed=:
42343 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
42344 " | \
42345   $at_diff - "$at_stdout" || at_failed=:
42346 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
42347 $at_failed && at_fn_log_failure
42348 $at_traceon; }
42349
42350               { set +x
42351 $as_echo "$at_srcdir/capabs_raw01.at:28:
42352 mkdir gnu
42353 (cd gnu
42354 TEST_TAR_FORMAT=gnu
42355 export TEST_TAR_FORMAT
42356 TAR_OPTIONS=\"-H gnu\"
42357 export TAR_OPTIONS
42358 rm -rf *
42359
42360
42361 echo \"test\" > \$\$
42362 chmod 0 \$\$
42363 cat \$\$ > /dev/null 2>&1
42364 result=\$?
42365 rm -f \$\$
42366 test \$result -eq 0 || exit 77
42367
42368
42369
42370   file=\$(TMPDIR=. mktemp fiXXXXXX)
42371
42372   setfattr -n user.test -v test \$file &> /dev/null
42373   if test \"\$?\" != 0; then
42374     exit 77
42375   fi
42376
42377
42378   getfattr \$file &> /dev/null
42379   if test \"\$?\" != 0; then
42380     exit 77
42381   fi
42382
42383
42384   file=\$(TMPDIR=. mktemp fiXXXXXX)
42385   setfattr -n user.test -v ahoj \$file
42386   # check whether tar fails to store xattrs
42387   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42388   if test \"\$err\" != \"0\"; then
42389     exit 77
42390   fi
42391
42392
42393   file=\$(TMPDIR=. mktemp fiXXXXXX)
42394
42395   setcap \"= cap_chown=ei\" \$file &> /dev/null
42396   if test \"\$?\" != 0; then
42397     exit 77
42398   fi
42399
42400
42401   getcap \$file &> /dev/null
42402   if test \"\$?\" != 0; then
42403     exit 77
42404   fi
42405
42406   rm -rf \$file
42407
42408
42409 mkdir dir
42410 genfile --file dir/file
42411
42412 setcap \"= cap_chown=ei\" dir/file
42413
42414 # archive whole directory including binary xattrs
42415 tar --xattrs -cf archive.tar dir
42416
42417 # clear the directory
42418 rm -rf dir
42419
42420 # restore _all_ xattrs (not just the user.* domain)
42421 tar --xattrs --xattrs-include='*' -xf archive.tar
42422
42423 getcap dir/file
42424 )"
42425 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
42426 ( $at_check_trace;
42427 mkdir gnu
42428 (cd gnu
42429 TEST_TAR_FORMAT=gnu
42430 export TEST_TAR_FORMAT
42431 TAR_OPTIONS="-H gnu"
42432 export TAR_OPTIONS
42433 rm -rf *
42434
42435
42436 echo "test" > $$
42437 chmod 0 $$
42438 cat $$ > /dev/null 2>&1
42439 result=$?
42440 rm -f $$
42441 test $result -eq 0 || exit 77
42442
42443
42444
42445   file=$(TMPDIR=. mktemp fiXXXXXX)
42446
42447   setfattr -n user.test -v test $file &> /dev/null
42448   if test "$?" != 0; then
42449     exit 77
42450   fi
42451
42452
42453   getfattr $file &> /dev/null
42454   if test "$?" != 0; then
42455     exit 77
42456   fi
42457
42458
42459   file=$(TMPDIR=. mktemp fiXXXXXX)
42460   setfattr -n user.test -v ahoj $file
42461   # check whether tar fails to store xattrs
42462   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42463   if test "$err" != "0"; then
42464     exit 77
42465   fi
42466
42467
42468   file=$(TMPDIR=. mktemp fiXXXXXX)
42469
42470   setcap "= cap_chown=ei" $file &> /dev/null
42471   if test "$?" != 0; then
42472     exit 77
42473   fi
42474
42475
42476   getcap $file &> /dev/null
42477   if test "$?" != 0; then
42478     exit 77
42479   fi
42480
42481   rm -rf $file
42482
42483
42484 mkdir dir
42485 genfile --file dir/file
42486
42487 setcap "= cap_chown=ei" dir/file
42488
42489 # archive whole directory including binary xattrs
42490 tar --xattrs -cf archive.tar dir
42491
42492 # clear the directory
42493 rm -rf dir
42494
42495 # restore _all_ xattrs (not just the user.* domain)
42496 tar --xattrs --xattrs-include='*' -xf archive.tar
42497
42498 getcap dir/file
42499 )
42500 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42501 at_status=$? at_failed=false
42502 $at_check_filter
42503 at_fn_diff_devnull "$at_stderr" || at_failed=:
42504 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
42505 " | \
42506   $at_diff - "$at_stdout" || at_failed=:
42507 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
42508 $at_failed && at_fn_log_failure
42509 $at_traceon; }
42510
42511
42512
42513
42514   set +x
42515   $at_times_p && times >"$at_times_file"
42516 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42517 read at_status <"$at_status_file"
42518 #AT_STOP_174
42519 #AT_START_175
42520 at_fn_group_banner 175 'gtarfail.at:21' \
42521   "gtarfail" "                                       " 26
42522 at_xfail=no
42523 (
42524   $as_echo "175. $at_setup_line: testing $at_desc ..."
42525   $at_traceon
42526
42527
42528
42529 unset TAR_OPTIONS
42530
42531 { set +x
42532 $as_echo "$at_srcdir/gtarfail.at:26:
42533
42534 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
42535 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
42536
42537
42538 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail.tar
42539 "
42540 at_fn_check_prepare_notrace 'an embedded newline' "gtarfail.at:26"
42541 ( $at_check_trace;
42542
42543 test -z "$STAR_TESTSCRIPTS" && exit 77
42544 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
42545
42546
42547 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
42548
42549 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42550 at_status=$? at_failed=false
42551 $at_check_filter
42552 at_fn_diff_devnull "$at_stderr" || at_failed=:
42553 echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone       518 2001-05-25 14:41 vedpowered.gif
42554 -rw-r--r-- jes/glone      6825 1997-04-29 00:19 cd.gif
42555 -rw-r--r-- jes/glone     33354 1999-06-22 12:17 DSCN0049c.JPG
42556 -rw-r--r-- jes/glone     86159 2001-06-05 18:16 Window1.jpg
42557 -rw-r--r-- jes/glone      1310 2001-05-25 13:05 vipower.gif
42558 -rw-rw-rw- jes/glone    148753 1998-09-15 13:08 billyboy.jpg
42559 " | \
42560   $at_diff - "$at_stdout" || at_failed=:
42561 at_fn_check_status 0 $at_status "$at_srcdir/gtarfail.at:26"
42562 $at_failed && at_fn_log_failure
42563 $at_traceon; }
42564
42565
42566   set +x
42567   $at_times_p && times >"$at_times_file"
42568 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42569 read at_status <"$at_status_file"
42570 #AT_STOP_175
42571 #AT_START_176
42572 at_fn_group_banner 176 'gtarfail2.at:21' \
42573   "gtarfail2" "                                      " 26
42574 at_xfail=no
42575 (
42576   $as_echo "176. $at_setup_line: testing $at_desc ..."
42577   $at_traceon
42578
42579
42580
42581 unset TAR_OPTIONS
42582
42583 { set +x
42584 $as_echo "$at_srcdir/gtarfail2.at:26:
42585
42586 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
42587 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
42588
42589 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail2.tar
42590 "
42591 at_fn_check_prepare_notrace 'an embedded newline' "gtarfail2.at:26"
42592 ( $at_check_trace;
42593
42594 test -z "$STAR_TESTSCRIPTS" && exit 77
42595 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
42596
42597 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
42598
42599 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42600 at_status=$? at_failed=false
42601 $at_check_filter
42602 at_fn_diff_devnull "$at_stderr" || at_failed=:
42603 echo >>"$at_stdout"; $as_echo "-rwxr-xr-x jes/glone       214 2001-09-21 14:08 .clean
42604 lrwxrwxrwx jes/cats          0 1998-05-07 12:39 RULES -> makefiles/RULES
42605 drwxr-sr-x jes/glone         0 2001-12-10 00:00 build/
42606 -rw-r--r-- jes/glone    312019 2001-12-10 00:00 build/smake-1.2.tar.gz
42607 drwxr-sr-x jes/glone         0 2001-11-09 18:20 build/psmake/
42608 -rwxr-xr-x jes/glone       259 2000-01-09 16:36 build/psmake/MAKE
42609 -rwxr-xr-x jes/glone      4820 2001-02-25 22:45 build/psmake/MAKE.sh
42610 -rw-r--r-- jes/glone       647 2001-02-25 23:50 build/psmake/Makefile
42611 lrwxrwxrwx jes/glone         0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c
42612 lrwxrwxrwx jes/glone         0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c
42613 " | \
42614   $at_diff - "$at_stdout" || at_failed=:
42615 at_fn_check_status 0 $at_status "$at_srcdir/gtarfail2.at:26"
42616 $at_failed && at_fn_log_failure
42617 $at_traceon; }
42618
42619
42620   set +x
42621   $at_times_p && times >"$at_times_file"
42622 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42623 read at_status <"$at_status_file"
42624 #AT_STOP_176
42625 #AT_START_177
42626 at_fn_group_banner 177 'multi-fail.at:21' \
42627   "multi-fail" "                                     " 26
42628 at_xfail=no
42629 (
42630   $as_echo "177. $at_setup_line: testing $at_desc ..."
42631   $at_traceon
42632
42633
42634
42635 unset TAR_OPTIONS
42636
42637 { set +x
42638 $as_echo "$at_srcdir/multi-fail.at:26:
42639
42640 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
42641 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
42642
42643
42644 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
42645 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
42646
42647
42648 tar --utc -tvM -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \\
42649                -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
42650 "
42651 at_fn_check_prepare_notrace 'an embedded newline' "multi-fail.at:26"
42652 ( $at_check_trace;
42653
42654 test -z "$STAR_TESTSCRIPTS" && exit 77
42655 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
42656
42657
42658 test -z "$STAR_TESTSCRIPTS" && exit 77
42659 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
42660
42661
42662 tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
42663                -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
42664
42665 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42666 at_status=$? at_failed=false
42667 $at_check_filter
42668 at_fn_diff_devnull "$at_stderr" || at_failed=:
42669 echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs          0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/
42670 -rw-r--r-- joerg/bs          1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull
42671 -rw-r--r-- joerg/bs       1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d
42672 -rw-r--r-- joerg/bs       1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d
42673 -rw-r--r-- joerg/bs       1540 2003-10-10 18:06 OBJ/i386-sunos5-gcc/cpiohdr.d
42674 -rw-r--r-- joerg/bs       2245 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xheader.d
42675 -rw-r--r-- joerg/bs       1254 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xattr.d
42676 -rw-r--r-- joerg/bs       1330 2003-10-10 18:06 OBJ/i386-sunos5-gcc/list.d
42677 -rw-r--r-- joerg/bs       1745 2003-10-10 18:06 OBJ/i386-sunos5-gcc/extract.d
42678 -rw-r--r-- joerg/bs       1518 2003-10-10 18:06 OBJ/i386-sunos5-gcc/create.d
42679 -rw-r--r-- joerg/bs       1235 2003-10-10 18:06 OBJ/i386-sunos5-gcc/append.d
42680 -rw-r--r-- joerg/bs       1368 2003-10-10 18:06 OBJ/i386-sunos5-gcc/diff.d
42681 -rw-r--r-- joerg/bs       1423 2003-10-10 18:06 OBJ/i386-sunos5-gcc/remove.d
42682 -rw-r--r-- joerg/bs       1493 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.d
42683 -rw-r--r-- joerg/bs       1572 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.d
42684 -rw-r--r-- joerg/bs       1453 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.d
42685 -rw-r--r-- joerg/bs       2257 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.d
42686 -rw-r--r-- joerg/bs        969 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.d
42687 -rw-r--r-- joerg/bs       1308 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.d
42688 -rw-r--r-- joerg/bs       1287 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.d
42689 -rw-r--r-- joerg/bs       1105 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.d
42690 -rw-r--r-- joerg/bs       1230 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.d
42691 -rw-r--r-- joerg/bs       1091 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.d
42692 -rw-r--r-- joerg/bs        961 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.d
42693 -rw-r--r-- joerg/bs       1113 2003-10-10 18:07 OBJ/i386-sunos5-gcc/props.d
42694 -rw-r--r-- joerg/bs       2146 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fetchdir.d
42695 -rw-r--r-- joerg/bs       1093 2003-10-10 18:07 OBJ/i386-sunos5-gcc/unicode.d
42696 -rw-r--r-- joerg/bs       1211 2003-10-10 18:07 OBJ/i386-sunos5-gcc/subst.d
42697 -rw-r--r-- joerg/bs       2076 2003-10-11 11:53 OBJ/i386-sunos5-gcc/volhdr.d
42698 -rw-r--r-- joerg/bs       1480 2003-10-10 18:07 OBJ/i386-sunos5-gcc/chdir.d
42699 -rw-r--r-- joerg/bs      42460 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star.o
42700 -rw-r--r-- joerg/bs      22564 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.o
42701 -rw-r--r-- joerg/bs       7880 2003-10-10 18:07 OBJ/i386-sunos5-gcc/cpiohdr.o
42702 -rw-r--r-- joerg/bs      14624 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xheader.o
42703 -rw-r--r-- joerg/bs        924 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xattr.o
42704 -rw-r--r-- joerg/bs       6120 2003-10-10 18:07 OBJ/i386-sunos5-gcc/list.o
42705 -rw-r--r-- joerg/bs      12764 2003-10-10 18:07 OBJ/i386-sunos5-gcc/extract.o
42706 -rw-r--r-- joerg/bs      14668 2003-10-10 18:07 OBJ/i386-sunos5-gcc/create.o
42707 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/append.o
42708 -rw-r--r-- joerg/bs       7636 2003-10-10 18:07 OBJ/i386-sunos5-gcc/diff.o
42709 -rw-r--r-- joerg/bs       3072 2003-10-10 18:07 OBJ/i386-sunos5-gcc/remove.o
42710 -rw-r--r-- joerg/bs       5612 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.o
42711 -rw-r--r-- joerg/bs       6220 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.o
42712 -rw-r--r-- joerg/bs       1092 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.o
42713 -rw-r--r-- joerg/bs      20996 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.o
42714 -rw-r--r-- joerg/bs       2060 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.o
42715 -rw-r--r-- joerg/bs       1664 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.o
42716 -rw-r--r-- joerg/bs      10564 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.o
42717 -rw-r--r-- joerg/bs       3864 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.o
42718 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o
42719 -rw-r--r-- joerg/bs        952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o
42720 -rw-r--r-- joerg/bs       2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o
42721 " | \
42722   $at_diff - "$at_stdout" || at_failed=:
42723 at_fn_check_status 0 $at_status "$at_srcdir/multi-fail.at:26"
42724 $at_failed && at_fn_log_failure
42725 $at_traceon; }
42726
42727
42728   set +x
42729   $at_times_p && times >"$at_times_file"
42730 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42731 read at_status <"$at_status_file"
42732 #AT_STOP_177
42733 #AT_START_178
42734 at_fn_group_banner 178 'ustar-big-2g.at:21' \
42735   "ustar-big-2g" "                                   " 26
42736 at_xfail=no
42737 (
42738   $as_echo "178. $at_setup_line: testing $at_desc ..."
42739   $at_traceon
42740
42741
42742
42743 unset TAR_OPTIONS
42744
42745 { set +x
42746 $as_echo "$at_srcdir/ustar-big-2g.at:26:
42747
42748 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
42749
42750
42751 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
42752 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
42753
42754
42755 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
42756 "
42757 at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-2g.at:26"
42758 ( $at_check_trace;
42759
42760 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
42761
42762
42763 test -z "$STAR_TESTSCRIPTS" && exit 77
42764 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
42765
42766
42767 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
42768
42769 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42770 at_status=$? at_failed=false
42771 $at_check_filter
42772 echo stderr:; tee stderr <"$at_stderr"
42773 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big
42774 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
42775 " | \
42776   $at_diff - "$at_stdout" || at_failed=:
42777 at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:26"
42778 $at_failed && at_fn_log_failure
42779 $at_traceon; }
42780
42781
42782
42783 cat >stderr.re <<'_ATEOF'
42784 tar: Record size = .*
42785 _ATEOF
42786
42787 awk '{print NR " " $0}' stderr > $$.1
42788 awk '{print NR " " $0}' stderr.re | join - $$.1 |
42789 while read NUM RE LINE
42790 do
42791   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
42792 done
42793
42794
42795   set +x
42796   $at_times_p && times >"$at_times_file"
42797 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42798 read at_status <"$at_status_file"
42799 #AT_STOP_178
42800 #AT_START_179
42801 at_fn_group_banner 179 'ustar-big-8g.at:21' \
42802   "ustar-big-8g" "                                   " 26
42803 at_xfail=no
42804 (
42805   $as_echo "179. $at_setup_line: testing $at_desc ..."
42806   $at_traceon
42807
42808
42809
42810 unset TAR_OPTIONS
42811
42812 { set +x
42813 $as_echo "$at_srcdir/ustar-big-8g.at:26:
42814
42815 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
42816
42817
42818 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
42819 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
42820
42821
42822 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
42823 "
42824 at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-8g.at:26"
42825 ( $at_check_trace;
42826
42827 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
42828
42829
42830 test -z "$STAR_TESTSCRIPTS" && exit 77
42831 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
42832
42833
42834 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
42835
42836 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42837 at_status=$? at_failed=false
42838 $at_check_filter
42839 echo stderr:; tee stderr <"$at_stderr"
42840 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1
42841 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
42842 " | \
42843   $at_diff - "$at_stdout" || at_failed=:
42844 at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:26"
42845 $at_failed && at_fn_log_failure
42846 $at_traceon; }
42847
42848
42849
42850 cat >stderr.re <<'_ATEOF'
42851 tar: Record size = .*
42852 _ATEOF
42853
42854 awk '{print NR " " $0}' stderr > $$.1
42855 awk '{print NR " " $0}' stderr.re | join - $$.1 |
42856 while read NUM RE LINE
42857 do
42858   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
42859 done
42860
42861
42862   set +x
42863   $at_times_p && times >"$at_times_file"
42864 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42865 read at_status <"$at_status_file"
42866 #AT_STOP_179
42867 #AT_START_180
42868 at_fn_group_banner 180 'pax-big-10g.at:21' \
42869   "pax-big-10g" "                                    " 26
42870 at_xfail=no
42871 (
42872   $as_echo "180. $at_setup_line: testing $at_desc ..."
42873   $at_traceon
42874
42875
42876
42877 unset TAR_OPTIONS
42878
42879 { set +x
42880 $as_echo "$at_srcdir/pax-big-10g.at:26:
42881
42882 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
42883
42884
42885 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
42886 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
42887
42888
42889 tar --utc -tvjf \$STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
42890 "
42891 at_fn_check_prepare_notrace 'an embedded newline' "pax-big-10g.at:26"
42892 ( $at_check_trace;
42893
42894 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
42895
42896
42897 test -z "$STAR_TESTSCRIPTS" && exit 77
42898 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
42899
42900
42901 tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
42902
42903 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42904 at_status=$? at_failed=false
42905 $at_check_filter
42906 echo stderr:; tee stderr <"$at_stderr"
42907 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g
42908 -rw-r--r-- jes/glone           0 2002-06-15 14:53 file
42909 " | \
42910   $at_diff - "$at_stdout" || at_failed=:
42911 at_fn_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:26"
42912 $at_failed && at_fn_log_failure
42913 $at_traceon; }
42914
42915
42916
42917 cat >stderr.re <<'_ATEOF'
42918 tar: Record size = .*
42919 _ATEOF
42920
42921 awk '{print NR " " $0}' stderr > $$.1
42922 awk '{print NR " " $0}' stderr.re | join - $$.1 |
42923 while read NUM RE LINE
42924 do
42925   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
42926 done
42927
42928
42929   set +x
42930   $at_times_p && times >"$at_times_file"
42931 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42932 read at_status <"$at_status_file"
42933 #AT_STOP_180