Import upstream version 1.28
[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:24;gzip;gzip;
614 22;recurse.at:21;recurse;recurse;
615 23;recurs02.at:30;recurse: toggle;recurse options recurse02;
616 24;shortrec.at:25;short records;shortrec;
617 25;iotty.at:26;terminal input;options iotty;
618 26;same-order01.at:26;working -C with --same-order;same-order same-order01;
619 27;same-order02.at:25;multiple -C options;same-order same-order02;
620 28;append.at:21;append;append append00;
621 29;append01.at:29;appending files with long names;append append01;
622 30;append02.at:54;append vs. create;append append02 append-gnu;
623 31;append03.at:21;append with name transformation;append append03;
624 32;append04.at:29;append with verify;append append04 verify append-verify;
625 33;xform-h.at:30;transforming hard links on create;transform xform xform-h;
626 34;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume;
627 35;exclude.at:23;exclude;exclude;
628 36;exclude01.at:19;exclude wildcards;exclude exclude01;
629 37;exclude02.at:19;exclude: anchoring;exclude exclude02;
630 38;exclude03.at:19;exclude: wildcards match slash;exclude exclude03;
631 39;exclude04.at:19;exclude: case insensitive;exclude exclude04;
632 40;exclude05.at:21;exclude: lots of excludes;exclude exclude05;
633 41;exclude06.at:26;exclude: long files in pax archives;exclude exclude06;
634 42;exclude07.at:19;exclude: --exclude-backups option;exclude exclude07;
635 43;exclude08.at:36;--exclude-tag option;exclude exclude-tag exclude08;
636 44;exclude09.at:37;--exclude-tag option and --listed-incremental;exclude exclude-tag listed incremental exclude09;
637 45;exclude10.at:38;--exclude-tag option in incremental pass;exclude exclude-tag listed incremental exclude10;
638 46;exclude11.at:36;--exclude-tag-under option;exclude exclude-tag exclude-tag-under exclude11;
639 47;exclude12.at:37;--exclude-tag-under and --listed-incremental;exclude exclude-tag exclude-tag-under listed incremental exclude12;
640 48;exclude13.at:39;--exclude-tag-under option in incremental pass;exclude exclude-tag exclude-tag-under listed incremental exclude13;
641 49;exclude14.at:36;--exclude-tag-all option;exclude exclude-tag exclude-tag-all exclude14;
642 50;exclude15.at:36;--exclude-tag-all and --listed-incremental;exclude exclude-tag exclude-tag-all listed incremental exclude15;
643 51;exclude16.at:38;--exclude-tag-all option in incremental pass;exclude exclude-tag exclude-tag-all listed incremental exclude16;
644 52;delete01.at:23;deleting a member after a big one;delete delete01;
645 53;delete02.at:23;deleting a member from stdin archive;delete delete02;
646 54;delete03.at:21;deleting members with long names;delete delete03;
647 55;delete04.at:23;deleting a large last member;delete delete04;
648 56;delete05.at:27;deleting non-existing member;delete delete05;
649 57;extrac01.at:23;extract over an existing directory;extract extract01;
650 58;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink;
651 59;extrac03.at:23;extraction loops;extract extract03;
652 60;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch;
653 61;extrac05.at:30;extracting selected members from pax;extract extract05;
654 62;extrac06.at:34;mode of extracted directories;extract extract06 directory mode;
655 63;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink;
656 64;extrac08.at:33;restoring mode on existing directory;extract extrac08;
657 65;extrac09.at:34;extracting even when . and .. are unreadable;extract extrac09;
658 66;extrac10.at:29;-C and delayed setting of metadata;extract extrac10;
659 67;extrac11.at:25;scarce file descriptors;extract extrac11;
660 68;extrac12.at:25;extract dot permissions;extract extrac12;
661 69;extrac13.at:26;extract over symlinks;extract extrac13;
662 70;extrac14.at:25;extract -C symlink;extract extrac14;
663 71;extrac15.at:25;extract parent mkdir failure;extract extrac15;
664 72;extrac16.at:26;extract empty directory with -C;extract extrac16;
665 73;extrac17.at:21;name matching/transformation ordering;extract extrac17;
666 74;extrac18.at:34;keep-old-files;extract extrac18 old-files keep-old-files;
667 75;extrac19.at:21;skip-old-files;extract extrac19 old-files skip-old-files;
668 76;backup01.at:33;extracting existing dir with --backup;extract backup backup01;
669 77;label01.at:21;single-volume label;label label01;
670 78;label02.at:21;multi-volume label;label label02 multi-label multivolume multiv;
671 79;label03.at:27;test-label option;label label03 test-label;
672 80;label04.at:27;label with non-create option;label label04;
673 81;label05.at:24;label with non-create option;label label05;
674 82;incremental.at:23;incremental;incremental listed incr00;
675 83;incr01.at:27;restore broken symlinks from incremental;incremental incr01;
676 84;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02;
677 85;listed01.at:26;--listed for individual files;listed incremental listed01;
678 86;listed02.at:28;working --listed;listed incremental listed02;
679 87;listed03.at:24;incremental dump when the parent directory is unreadable;listed incremental listed03;
680 88;listed04.at:26;--listed-incremental and --one-file-system;listed incremental listed04;
681 89;listed05.at:33;--listed-incremental and remounted directories;listed incremental listed05;
682 90;incr03.at:28;renamed files in incrementals;incremental incr03 rename;
683 91;incr04.at:29;proper icontents initialization;incremental incr04 icontents;
684 92;incr05.at:21;incremental dumps with -C;incremental incr05;
685 93;incr06.at:21;incremental dumps of nested directories;incremental incr06;
686 94;incr07.at:18;incremental restores with -C;incremental extract incr07;
687 95;incr08.at:38;filename normalization;incremental create incr08;
688 96;incr09.at:26;incremental with alternating -C;incremental create incr09;
689 97;filerem01.at:36;file removed as we read it (ca. 22 seconds);create incremental listed filechange filerem filerem01;
690 98;filerem02.at:26;toplevel file removed (ca. 24 seconds);create incremental listed filechange filerem filerem02;
691 99;rename01.at:24;renamed dirs in incrementals;incremental rename rename01;
692 100;rename02.at:24;move between hierarchies;incremental rename rename02;
693 101;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename;
694 102;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename;
695 103;rename05.at:24;renamed subdirectories;incremental rename05 rename;
696 104;chtype.at:27;changed file types in incrementals;incremental listed chtype;
697 105;ignfail.at:23;ignfail;ignfail;
698 106;link01.at:33;link count gt 2;hardlinks link01;
699 107;link02.at:32;preserve hard links with --remove-files;hardlinks link02;
700 108;link03.at:24;working -l with --remove-files;hardlinks link03;
701 109;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04;
702 110;longv7.at:24;long names in V7 archives;longname longv7;
703 111;long01.at:28;long file names divisible by block size;longname long512;
704 112;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01;
705 113;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02;
706 114;lustar03.at:21;ustar: splitting long names;longname ustar lustar03;
707 115;old.at:23;old archives;old;
708 116;time01.at:20;time: tricky time stamps;time time01;
709 117;multiv01.at:24;multivolume dumps from pipes;multivolume multiv multiv01;
710 118;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02;
711 119;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03;
712 120;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental listed multiv04;
713 121;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync;
714 122;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06;
715 123;multiv07.at:28;volumes split at an extended header;multivolume multiv multiv07 xsplit;
716 124;multiv08.at:25;multivolume header creation;multivolume multiv multiv08;
717 125;owner.at:21;--owner and --group;owner;
718 126;sparse01.at:21;sparse files;sparse sparse01;
719 127;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02;
720 128;sparse03.at:21;storing sparse files > 8G;sparse sparse03;
721 129;sparse04.at:21;storing long sparse file names;sparse sparse04;
722 130;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv;
723 131;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00;
724 132;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01;
725 133;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10;
726 134;update.at:28;update unchanged directories;update update00;
727 135;update01.at:29;update directories;update update01;
728 136;update02.at:26;update changed files;update update02;
729 137;verify.at:25;verify;verify;
730 138;volume.at:23;volume;volume volcheck;
731 139;volsize.at:29;volume header size;volume volsize;
732 140;comprec.at:21;compressed format recognition;comprec;
733 141;shortfile.at:26;short input files;shortfile shortfile0;
734 142;shortupd.at:31;updating short archives;shortfile shortfile1 shortupd;
735 143;truncate.at:29;truncate;truncate filechange;
736 144;grow.at:24;grow;grow filechange;
737 145;sigpipe.at:21;sigpipe handling;sigpipe;
738 146;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip;
739 147;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip;
740 148;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03;
741 149;remfiles04a.at:25;remove-files with -C:rel in -c/non-incr. mode;create remove-files remfiles04 remfiles04a;
742 150;remfiles04b.at:33;remove-files with -C:rel in -c/incr. mode;create incremental remove-files remfiles04 remfiles04b;
743 151;remfiles04c.at:33;remove-files with -C:rel in -r mode;create append remove-files remfiles04 remfiles04c;
744 152;remfiles05a.at:34;remove-files with -C:rel,rel in -c/non-incr. mode;create remove-files remfiles05 remfiles05a;
745 153;remfiles05b.at:25;remove-files with -C:rel,rel in -c/incr. mode;create incremental remove-files remfiles05 remfiles05b;
746 154;remfiles05c.at:25;remove-files with -C:rel,rel in -r mode;create append remove-files remfiles05 remfiles05c;
747 155;remfiles06a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles06 remfiles06a;
748 156;remfiles06b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles06 remfiles06b;
749 157;remfiles06c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles06 remfiles06c;
750 158;remfiles07a.at:25;remove-files with -C:abs,rel in -c/non-incr. mode;create remove-files remfiles07 remfiles07a;
751 159;remfiles07b.at:25;remove-files with -C:abs,rel in -c/incr. mode;create incremental remove-files remfiles07 remfiles07b;
752 160;remfiles07c.at:25;remove-files with -C:abs,rel in -r mode;create append remove-files remfiles07 remfiles07c;
753 161;remfiles08a.at:28;remove-files deleting two subdirs in -c/non-incr. mode;create remove-files remfiles08 remfiles08a;
754 162;remfiles08b.at:31;remove-files deleting two subdirs in -c/incr. mode;create incremental remove-files remfiles08 remfiles08b;
755 163;remfiles08c.at:28;remove-files deleting two subdirs in -r mode;create append remove-files remfiles08 remfiles08c;
756 164;remfiles09a.at:25;remove-files on full directory in -c/non-incr. mode;create remove-files remfiles09 remfiles09a;
757 165;remfiles09b.at:29;remove-files on full directory in -c/incr. mode;create incremental remove-files remfiles09 remfiles09b;
758 166;remfiles09c.at:25;remove-files on full directory in -r mode;create append remove-files remfiles09 remfiles09c;
759 167;remfiles10.at:20;remove-files;create remove-files remfiles10;
760 168;xattr01.at:25;xattrs: basic functionality;xattrs xattr01;
761 169;xattr02.at:25;xattrs: change directory with -C option;xattrs xattr02;
762 170;xattr03.at:25;xattrs: trusted.* attributes;xattrs xattr03;
763 171;xattr04.at:26;xattrs: s/open/openat/ regression;xattrs xattr04;
764 172;xattr05.at:28;xattrs: keywords with '=' and '%';xattrs xattr05;
765 173;acls01.at:25;acls: basic functionality;xattrs acls acls01;
766 174;acls02.at:25;acls: work with -C;xattrs acls acls02;
767 175;acls03.at:30;acls: default ACLs;xattrs acls acls03;
768 176;selnx01.at:25;selinux: basic store/restore;xattrs selinux selnx01;
769 177;selacl01.at:25;acls/selinux: special files & fifos;xattrs selinux acls selacls01;
770 178;capabs_raw01.at:25;capabilities: binary store/restore;xattrs capabilities capabs_raw01;
771 179;onetop01.at:21;tar --one-top-level;extract onetop onetop01;
772 180;onetop02.at:21;tar --one-top-level --show-transformed;extract onetop onetop02;
773 181;onetop03.at:21;tar --one-top-level --transform;extract onetop onetop02;
774 182;onetop04.at:21;tar --one-top-level --transform;extract onetop onetop02;
775 183;gtarfail.at:21;gtarfail;star gtarfail;
776 184;gtarfail2.at:21;gtarfail2;star gtarfail2;
777 185;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail;
778 186;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g;
779 187;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g;
780 188;pax-big-10g.at:21;pax-big-10g;star pax-big-10g;
781 "
782 # List of the all the test groups.
783 at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'`
784
785 # at_fn_validate_ranges NAME...
786 # -----------------------------
787 # Validate and normalize the test group number contained in each variable
788 # NAME. Leading zeroes are treated as decimal.
789 at_fn_validate_ranges ()
790 {
791   for at_grp
792   do
793     eval at_value=\$$at_grp
794     if test $at_value -lt 1 || test $at_value -gt 188; then
795       $as_echo "invalid test group: $at_value" >&2
796       exit 1
797     fi
798     case $at_value in
799       0*) # We want to treat leading 0 as decimal, like expr and test, but
800           # AS_VAR_ARITH treats it as octal if it uses $(( )).
801           # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
802           # expr fork, but it is not worth the effort to determine if the
803           # shell supports XSI when the user can just avoid leading 0.
804           eval $at_grp='`expr $at_value + 0`' ;;
805     esac
806   done
807 }
808
809 at_prev=
810 for at_option
811 do
812   # If the previous option needs an argument, assign it.
813   if test -n "$at_prev"; then
814     at_option=$at_prev=$at_option
815     at_prev=
816   fi
817
818   case $at_option in
819   *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;;
820   *)    at_optarg= ;;
821   esac
822
823   # Accept the important Cygnus configure options, so we can diagnose typos.
824
825   case $at_option in
826     --help | -h )
827         at_help_p=:
828         ;;
829
830     --list | -l )
831         at_list_p=:
832         ;;
833
834     --version | -V )
835         at_version_p=:
836         ;;
837
838     --clean | -c )
839         at_clean=:
840         ;;
841
842     --color )
843         at_color=always
844         ;;
845     --color=* )
846         case $at_optarg in
847         no | never | none) at_color=never ;;
848         auto | tty | if-tty) at_color=auto ;;
849         always | yes | force) at_color=always ;;
850         *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
851            as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;;
852         esac
853         ;;
854
855     --debug | -d )
856         at_debug_p=:
857         ;;
858
859     --errexit | -e )
860         at_debug_p=:
861         at_errexit_p=:
862         ;;
863
864     --verbose | -v )
865         at_verbose=; at_quiet=:
866         ;;
867
868     --trace | -x )
869         at_traceon='set -x'
870         at_trace_echo=echo
871         at_check_filter_trace=at_fn_filter_trace
872         ;;
873
874     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
875         at_fn_validate_ranges at_option
876         as_fn_append at_groups "$at_option$as_nl"
877         ;;
878
879     # Ranges
880     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
881         at_range_start=`echo $at_option |tr -d X-`
882         at_fn_validate_ranges at_range_start
883         at_range=`$as_echo "$at_groups_all" | \
884           sed -ne '/^'$at_range_start'$/,$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][0-9])
889         at_range_end=`echo $at_option |tr -d X-`
890         at_fn_validate_ranges at_range_end
891         at_range=`$as_echo "$at_groups_all" | \
892           sed -ne '1,/^'$at_range_end'$/p'`
893         as_fn_append at_groups "$at_range$as_nl"
894         ;;
895
896     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
897     [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
898     [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
899     [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
900     [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
901     [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
902         at_range_start=`expr $at_option : '\(.*\)-'`
903         at_range_end=`expr $at_option : '.*-\(.*\)'`
904         if test $at_range_start -gt $at_range_end; then
905           at_tmp=$at_range_end
906           at_range_end=$at_range_start
907           at_range_start=$at_tmp
908         fi
909         at_fn_validate_ranges at_range_start at_range_end
910         at_range=`$as_echo "$at_groups_all" | \
911           sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
912         as_fn_append at_groups "$at_range$as_nl"
913         ;;
914
915     # Directory selection.
916     --directory | -C )
917         at_prev=--directory
918         ;;
919     --directory=* )
920         at_change_dir=:
921         at_dir=$at_optarg
922         if test x- = "x$at_dir" ; then
923           at_dir=./-
924         fi
925         ;;
926
927     # Parallel execution.
928     --jobs | -j )
929         at_jobs=0
930         ;;
931     --jobs=* | -j[0-9]* )
932         if test -n "$at_optarg"; then
933           at_jobs=$at_optarg
934         else
935           at_jobs=`expr X$at_option : 'X-j\(.*\)'`
936         fi
937         case $at_jobs in *[!0-9]*)
938           at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'`
939           as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;;
940         esac
941         ;;
942
943     # Keywords.
944     --keywords | -k )
945         at_prev=--keywords
946         ;;
947     --keywords=* )
948         at_groups_selected=$at_help_all
949         at_save_IFS=$IFS
950         IFS=,
951         set X $at_optarg
952         shift
953         IFS=$at_save_IFS
954         for at_keyword
955         do
956           at_invert=
957           case $at_keyword in
958           '!'*)
959             at_invert="-v"
960             at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
961             ;;
962           esac
963           # It is on purpose that we match the test group titles too.
964           at_groups_selected=`$as_echo "$at_groups_selected" |
965               grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
966         done
967         # Smash the keywords.
968         at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//'`
969         as_fn_append at_groups "$at_groups_selected$as_nl"
970         ;;
971     --recheck)
972         at_recheck=:
973         ;;
974
975     *=*)
976         at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
977         # Reject names that are not valid shell variable names.
978         case $at_envvar in
979           '' | [0-9]* | *[!_$as_cr_alnum]* )
980             as_fn_error $? "invalid variable name: \`$at_envvar'" ;;
981         esac
982         at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
983         # Export now, but save eval for later and for debug scripts.
984         export $at_envvar
985         as_fn_append at_debug_args " $at_envvar='$at_value'"
986         ;;
987
988      *) $as_echo "$as_me: invalid option: $at_option" >&2
989         $as_echo "Try \`$0 --help' for more information." >&2
990         exit 1
991         ;;
992   esac
993 done
994
995 # Verify our last option didn't require an argument
996 if test -n "$at_prev"; then :
997   as_fn_error $? "\`$at_prev' requires an argument"
998 fi
999
1000 # The file containing the suite.
1001 at_suite_log=$at_dir/$as_me.log
1002
1003 # Selected test groups.
1004 if test -z "$at_groups$at_recheck"; then
1005   at_groups=$at_groups_all
1006 else
1007   if test -n "$at_recheck" && test -r "$at_suite_log"; then
1008     at_oldfails=`sed -n '
1009       /^Failed tests:$/,/^Skipped tests:$/{
1010         s/^[ ]*\([1-9][0-9]*\):.*/\1/p
1011       }
1012       /^Unexpected passes:$/,/^## Detailed failed tests/{
1013         s/^[ ]*\([1-9][0-9]*\):.*/\1/p
1014       }
1015       /^## Detailed failed tests/q
1016       ' "$at_suite_log"`
1017     as_fn_append at_groups "$at_oldfails$as_nl"
1018   fi
1019   # Sort the tests, removing duplicates.
1020   at_groups=`$as_echo "$at_groups" | sort -nu | sed '/^$/d'`
1021 fi
1022
1023 if test x"$at_color" = xalways \
1024    || { test x"$at_color" = xauto && test -t 1; }; then
1025   at_red=`printf '\033[0;31m'`
1026   at_grn=`printf '\033[0;32m'`
1027   at_lgn=`printf '\033[1;32m'`
1028   at_blu=`printf '\033[1;34m'`
1029   at_std=`printf '\033[m'`
1030 else
1031   at_red= at_grn= at_lgn= at_blu= at_std=
1032 fi
1033
1034 # Help message.
1035 if $at_help_p; then
1036   cat <<_ATEOF || at_write_fail=1
1037 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
1038
1039 Run all the tests, or the selected TESTS, given by numeric ranges, and
1040 save a detailed log file.  Upon failure, create debugging scripts.
1041
1042 Do not change environment variables directly.  Instead, set them via
1043 command line arguments.  Set \`AUTOTEST_PATH' to select the executables
1044 to exercise.  Each relative directory is expanded as build and source
1045 directories relative to the top level of this distribution.
1046 E.g., from within the build directory /tmp/foo-1.0, invoking this:
1047
1048   $ $0 AUTOTEST_PATH=bin
1049
1050 is equivalent to the following, assuming the source directory is /src/foo-1.0:
1051
1052   PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $0
1053 _ATEOF
1054 cat <<_ATEOF || at_write_fail=1
1055
1056 Operation modes:
1057   -h, --help     print the help message, then exit
1058   -V, --version  print version number, then exit
1059   -c, --clean    remove all the files this test suite might create and exit
1060   -l, --list     describes all the tests, or the selected TESTS
1061 _ATEOF
1062 cat <<_ATEOF || at_write_fail=1
1063
1064 Execution tuning:
1065   -C, --directory=DIR
1066                  change to directory DIR before starting
1067       --color[=never|auto|always]
1068                  enable colored test results on terminal, or always
1069   -j, --jobs[=N]
1070                  Allow N jobs at once; infinite jobs with no arg (default 1)
1071   -k, --keywords=KEYWORDS
1072                  select the tests matching all the comma-separated KEYWORDS
1073                  multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
1074       --recheck  select all tests that failed or passed unexpectedly last time
1075   -e, --errexit  abort as soon as a test fails; implies --debug
1076   -v, --verbose  force more detailed output
1077                  default for debugging scripts
1078   -d, --debug    inhibit clean up and top-level logging
1079                  default for debugging scripts
1080   -x, --trace    enable tests shell tracing
1081 _ATEOF
1082 cat <<_ATEOF || at_write_fail=1
1083
1084 Report bugs to <bug-tar@gnu.org>.
1085 General help using GNU software: <http://www.gnu.org/gethelp/>.
1086 _ATEOF
1087   exit $at_write_fail
1088 fi
1089
1090 # List of tests.
1091 if $at_list_p; then
1092   cat <<_ATEOF || at_write_fail=1
1093 GNU tar 1.28 test suite test groups:
1094
1095  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
1096       KEYWORDS
1097
1098 _ATEOF
1099   # Pass an empty line as separator between selected groups and help.
1100   $as_echo "$at_groups$as_nl$as_nl$at_help_all" |
1101     awk 'NF == 1 && FS != ";" {
1102            selected[$ 1] = 1
1103            next
1104          }
1105          /^$/ { FS = ";" }
1106          NF > 0 {
1107            if (selected[$ 1]) {
1108              printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
1109              if ($ 4) {
1110                lmax = 79
1111                indent = "     "
1112                line = indent
1113                len = length (line)
1114                n = split ($ 4, a, " ")
1115                for (i = 1; i <= n; i++) {
1116                  l = length (a[i]) + 1
1117                  if (i > 1 && len + l > lmax) {
1118                    print line
1119                    line = indent " " a[i]
1120                    len = length (line)
1121                  } else {
1122                    line = line " " a[i]
1123                    len += l
1124                  }
1125                }
1126                if (n)
1127                  print line
1128              }
1129            }
1130          }' || at_write_fail=1
1131   exit $at_write_fail
1132 fi
1133 if $at_version_p; then
1134   $as_echo "$as_me (GNU tar 1.28)" &&
1135   cat <<\_ATEOF || at_write_fail=1
1136
1137 Copyright (C) 2012 Free Software Foundation, Inc.
1138 This test suite is free software; the Free Software Foundation gives
1139 unlimited permission to copy, distribute and modify it.
1140 _ATEOF
1141   exit $at_write_fail
1142 fi
1143
1144 # Should we print banners?  Yes if more than one test is run.
1145 case $at_groups in #(
1146   *$as_nl* )
1147       at_print_banners=: ;; #(
1148   * ) at_print_banners=false ;;
1149 esac
1150 # Text for banner N, set to a single space once printed.
1151 # Banner 1. testsuite.at:191
1152 # Category starts at test group 5.
1153 at_banner_text_1="Option compatibility"
1154 # Banner 2. testsuite.at:199
1155 # Category starts at test group 11.
1156 at_banner_text_2="The -T option"
1157 # Banner 3. testsuite.at:209
1158 # Category starts at test group 19.
1159 at_banner_text_3="Various options"
1160 # Banner 4. testsuite.at:218
1161 # Category starts at test group 26.
1162 at_banner_text_4="The --same-order option"
1163 # Banner 5. testsuite.at:222
1164 # Category starts at test group 28.
1165 at_banner_text_5="Append"
1166 # Banner 6. testsuite.at:229
1167 # Category starts at test group 33.
1168 at_banner_text_6="Transforms"
1169 # Banner 7. testsuite.at:233
1170 # Category starts at test group 35.
1171 at_banner_text_7="Exclude"
1172 # Banner 8. testsuite.at:252
1173 # Category starts at test group 52.
1174 at_banner_text_8="Deletions"
1175 # Banner 9. testsuite.at:259
1176 # Category starts at test group 57.
1177 at_banner_text_9="Extracting"
1178 # Banner 10. testsuite.at:281
1179 # Category starts at test group 77.
1180 at_banner_text_10="Volume label operations"
1181 # Banner 11. testsuite.at:288
1182 # Category starts at test group 82.
1183 at_banner_text_11="Incremental archives"
1184 # Banner 12. testsuite.at:305
1185 # Category starts at test group 97.
1186 at_banner_text_12="Files removed while archiving"
1187 # Banner 13. testsuite.at:309
1188 # Category starts at test group 99.
1189 at_banner_text_13="Renames"
1190 # Banner 14. testsuite.at:317
1191 # Category starts at test group 105.
1192 at_banner_text_14="Ignore failing reads"
1193 # Banner 15. testsuite.at:320
1194 # Category starts at test group 106.
1195 at_banner_text_15="Link handling"
1196 # Banner 16. testsuite.at:326
1197 # Category starts at test group 110.
1198 at_banner_text_16="Specific archive formats"
1199 # Banner 17. testsuite.at:336
1200 # Category starts at test group 117.
1201 at_banner_text_17="Multivolume archives"
1202 # Banner 18. testsuite.at:346
1203 # Category starts at test group 125.
1204 at_banner_text_18="Owner and Groups"
1205 # Banner 19. testsuite.at:349
1206 # Category starts at test group 126.
1207 at_banner_text_19="Sparse files"
1208 # Banner 20. testsuite.at:359
1209 # Category starts at test group 134.
1210 at_banner_text_20="Updates"
1211 # Banner 21. testsuite.at:364
1212 # Category starts at test group 137.
1213 at_banner_text_21="Verifying the archive"
1214 # Banner 22. testsuite.at:367
1215 # Category starts at test group 138.
1216 at_banner_text_22="Volume operations"
1217 # Banner 23. testsuite.at:371
1218 # Category starts at test group 140.
1219 at_banner_text_23=""
1220 # Banner 24. testsuite.at:380
1221 # Category starts at test group 146.
1222 at_banner_text_24="Removing files after archiving"
1223 # Banner 25. testsuite.at:404
1224 # Category starts at test group 168.
1225 at_banner_text_25="Extended attributes"
1226 # Banner 26. testsuite.at:420
1227 # Category starts at test group 179.
1228 at_banner_text_26="One top level"
1229 # Banner 27. testsuite.at:426
1230 # Category starts at test group 183.
1231 at_banner_text_27="Star tests"
1232
1233 # Take any -C into account.
1234 if $at_change_dir ; then
1235   test x != "x$at_dir" && cd "$at_dir" \
1236     || as_fn_error $? "unable to change directory"
1237   at_dir=`pwd`
1238 fi
1239
1240 # Load the config files for any default variable assignments.
1241 for at_file in atconfig atlocal
1242 do
1243   test -r $at_file || continue
1244   . ./$at_file || as_fn_error $? "invalid content: $at_file"
1245 done
1246
1247 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
1248 : "${at_top_build_prefix=$at_top_builddir}"
1249
1250 # Perform any assignments requested during argument parsing.
1251 eval "$at_debug_args"
1252
1253 # atconfig delivers names relative to the directory the test suite is
1254 # in, but the groups themselves are run in testsuite-dir/group-dir.
1255 if test -n "$at_top_srcdir"; then
1256   builddir=../..
1257   for at_dir_var in srcdir top_srcdir top_build_prefix
1258   do
1259     eval at_val=\$at_$at_dir_var
1260     case $at_val in
1261       [\\/$]* | ?:[\\/]* ) at_prefix= ;;
1262       *) at_prefix=../../ ;;
1263     esac
1264     eval "$at_dir_var=\$at_prefix\$at_val"
1265   done
1266 fi
1267
1268 ## -------------------- ##
1269 ## Directory structure. ##
1270 ## -------------------- ##
1271
1272 # This is the set of directories and files used by this script
1273 # (non-literals are capitalized):
1274 #
1275 # TESTSUITE         - the testsuite
1276 # TESTSUITE.log     - summarizes the complete testsuite run
1277 # TESTSUITE.dir/    - created during a run, remains after -d or failed test
1278 # + at-groups/      - during a run: status of all groups in run
1279 # | + NNN/          - during a run: meta-data about test group NNN
1280 # | | + check-line  - location (source file and line) of current AT_CHECK
1281 # | | + status      - exit status of current AT_CHECK
1282 # | | + stdout      - stdout of current AT_CHECK
1283 # | | + stder1      - stderr, including trace
1284 # | | + stderr      - stderr, with trace filtered out
1285 # | | + test-source - portion of testsuite that defines group
1286 # | | + times       - timestamps for computing duration
1287 # | | + pass        - created if group passed
1288 # | | + xpass       - created if group xpassed
1289 # | | + fail        - created if group failed
1290 # | | + xfail       - created if group xfailed
1291 # | | + skip        - created if group skipped
1292 # + at-stop         - during a run: end the run if this file exists
1293 # + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
1294 # + 0..NNN/         - created for each group NNN, remains after -d or failed test
1295 # | + TESTSUITE.log - summarizes the group results
1296 # | + ...           - files created during the group
1297
1298 # The directory the whole suite works in.
1299 # Should be absolute to let the user `cd' at will.
1300 at_suite_dir=$at_dir/$as_me.dir
1301 # The file containing the suite ($at_dir might have changed since earlier).
1302 at_suite_log=$at_dir/$as_me.log
1303 # The directory containing helper files per test group.
1304 at_helper_dir=$at_suite_dir/at-groups
1305 # Stop file: if it exists, do not start new jobs.
1306 at_stop_file=$at_suite_dir/at-stop
1307 # The fifo used for the job dispatcher.
1308 at_job_fifo=$at_suite_dir/at-job-fifo
1309
1310 if $at_clean; then
1311   test -d "$at_suite_dir" &&
1312     find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1313   rm -f -r "$at_suite_dir" "$at_suite_log"
1314   exit $?
1315 fi
1316
1317 # Don't take risks: use only absolute directories in PATH.
1318 #
1319 # For stand-alone test suites (ie. atconfig was not found),
1320 # AUTOTEST_PATH is relative to `.'.
1321 #
1322 # For embedded test suites, AUTOTEST_PATH is relative to the top level
1323 # of the package.  Then expand it into build/src parts, since users
1324 # may create executables in both places.
1325 AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"`
1326 at_path=
1327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1328 for as_dir in $AUTOTEST_PATH $PATH
1329 do
1330   IFS=$as_save_IFS
1331   test -z "$as_dir" && as_dir=.
1332     test -n "$at_path" && as_fn_append at_path $PATH_SEPARATOR
1333 case $as_dir in
1334   [\\/]* | ?:[\\/]* )
1335     as_fn_append at_path "$as_dir"
1336     ;;
1337   * )
1338     if test -z "$at_top_build_prefix"; then
1339       # Stand-alone test suite.
1340       as_fn_append at_path "$as_dir"
1341     else
1342       # Embedded test suite.
1343       as_fn_append at_path "$at_top_build_prefix$as_dir$PATH_SEPARATOR"
1344       as_fn_append at_path "$at_top_srcdir/$as_dir"
1345     fi
1346     ;;
1347 esac
1348   done
1349 IFS=$as_save_IFS
1350
1351
1352 # Now build and simplify PATH.
1353 #
1354 # There might be directories that don't exist, but don't redirect
1355 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1356 at_new_path=
1357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1358 for as_dir in $at_path
1359 do
1360   IFS=$as_save_IFS
1361   test -z "$as_dir" && as_dir=.
1362     test -d "$as_dir" || continue
1363 case $as_dir in
1364   [\\/]* | ?:[\\/]* ) ;;
1365   * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
1366 esac
1367 case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
1368   *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
1369   $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
1370   *) as_fn_append at_new_path "$PATH_SEPARATOR$as_dir" ;;
1371 esac
1372   done
1373 IFS=$as_save_IFS
1374
1375 PATH=$at_new_path
1376 export PATH
1377
1378 # Setting up the FDs.
1379
1380
1381
1382 # 5 is the log file.  Not to be overwritten if `-d'.
1383 if $at_debug_p; then
1384   at_suite_log=/dev/null
1385 else
1386   : >"$at_suite_log"
1387 fi
1388 exec 5>>"$at_suite_log"
1389
1390 # Banners and logs.
1391 $as_echo "## ------------------------ ##
1392 ## GNU tar 1.28 test suite. ##
1393 ## ------------------------ ##"
1394 {
1395   $as_echo "## ------------------------ ##
1396 ## GNU tar 1.28 test suite. ##
1397 ## ------------------------ ##"
1398   echo
1399
1400   $as_echo "$as_me: command line was:"
1401   $as_echo "  \$ $0 $at_cli_args"
1402   echo
1403
1404   # If ChangeLog exists, list a few lines in case it might help determining
1405   # the exact version.
1406   if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
1407     $as_echo "## ---------- ##
1408 ## ChangeLog. ##
1409 ## ---------- ##"
1410     echo
1411     sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
1412     echo
1413   fi
1414
1415   {
1416 cat <<_ASUNAME
1417 ## --------- ##
1418 ## Platform. ##
1419 ## --------- ##
1420
1421 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1422 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1423 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1424 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1425 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1426
1427 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1428 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1429
1430 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1431 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1432 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1433 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1434 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1435 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1436 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1437
1438 _ASUNAME
1439
1440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1441 for as_dir in $PATH
1442 do
1443   IFS=$as_save_IFS
1444   test -z "$as_dir" && as_dir=.
1445     $as_echo "PATH: $as_dir"
1446   done
1447 IFS=$as_save_IFS
1448
1449 }
1450   echo
1451
1452   # Contents of the config files.
1453   for at_file in atconfig atlocal
1454   do
1455     test -r $at_file || continue
1456     $as_echo "$as_me: $at_file:"
1457     sed 's/^/| /' $at_file
1458     echo
1459   done
1460 } >&5
1461
1462
1463 ## ------------------------- ##
1464 ## Autotest shell functions. ##
1465 ## ------------------------- ##
1466
1467 # at_fn_banner NUMBER
1468 # -------------------
1469 # Output banner NUMBER, provided the testsuite is running multiple groups and
1470 # this particular banner has not yet been printed.
1471 at_fn_banner ()
1472 {
1473   $at_print_banners || return 0
1474   eval at_banner_text=\$at_banner_text_$1
1475   test "x$at_banner_text" = "x " && return 0
1476   eval "at_banner_text_$1=\" \""
1477   if test -z "$at_banner_text"; then
1478     $at_first || echo
1479   else
1480     $as_echo "$as_nl$at_banner_text$as_nl"
1481   fi
1482 } # at_fn_banner
1483
1484 # at_fn_check_prepare_notrace REASON LINE
1485 # ---------------------------------------
1486 # Perform AT_CHECK preparations for the command at LINE for an untraceable
1487 # command; REASON is the reason for disabling tracing.
1488 at_fn_check_prepare_notrace ()
1489 {
1490   $at_trace_echo "Not enabling shell tracing (command contains $1)"
1491   $as_echo "$2" >"$at_check_line_file"
1492   at_check_trace=: at_check_filter=:
1493   : >"$at_stdout"; : >"$at_stderr"
1494 }
1495
1496 # at_fn_check_prepare_trace LINE
1497 # ------------------------------
1498 # Perform AT_CHECK preparations for the command at LINE for a traceable
1499 # command.
1500 at_fn_check_prepare_trace ()
1501 {
1502   $as_echo "$1" >"$at_check_line_file"
1503   at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
1504   : >"$at_stdout"; : >"$at_stderr"
1505 }
1506
1507 # at_fn_check_prepare_dynamic COMMAND LINE
1508 # ----------------------------------------
1509 # Decide if COMMAND at LINE is traceable at runtime, and call the appropriate
1510 # preparation function.
1511 at_fn_check_prepare_dynamic ()
1512 {
1513   case $1 in
1514     *$as_nl*)
1515       at_fn_check_prepare_notrace 'an embedded newline' "$2" ;;
1516     *)
1517       at_fn_check_prepare_trace "$2" ;;
1518   esac
1519 }
1520
1521 # at_fn_filter_trace
1522 # ------------------
1523 # Remove the lines in the file "$at_stderr" generated by "set -x" and print
1524 # them to stderr.
1525 at_fn_filter_trace ()
1526 {
1527   mv "$at_stderr" "$at_stder1"
1528   grep '^ *+' "$at_stder1" >&2
1529   grep -v '^ *+' "$at_stder1" >"$at_stderr"
1530 }
1531
1532 # at_fn_log_failure FILE-LIST
1533 # ---------------------------
1534 # Copy the files in the list on stdout with a "> " prefix, and exit the shell
1535 # with a failure exit code.
1536 at_fn_log_failure ()
1537 {
1538   for file
1539     do $as_echo "$file:"; sed 's/^/> /' "$file"; done
1540   echo 1 > "$at_status_file"
1541   exit 1
1542 }
1543
1544 # at_fn_check_skip EXIT-CODE LINE
1545 # -------------------------------
1546 # Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
1547 # the test group subshell with that same exit code. Use LINE in any report
1548 # about test failure.
1549 at_fn_check_skip ()
1550 {
1551   case $1 in
1552     99) echo 99 > "$at_status_file"; at_failed=:
1553         $as_echo "$2: hard failure"; exit 99;;
1554     77) echo 77 > "$at_status_file"; exit 77;;
1555   esac
1556 }
1557
1558 # at_fn_check_status EXPECTED EXIT-CODE LINE
1559 # ------------------------------------------
1560 # Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
1561 # Otherwise, if it is 77 or 99, exit the test group subshell with that same
1562 # exit code; if it is anything else print an error message referring to LINE,
1563 # and fail the test.
1564 at_fn_check_status ()
1565 {
1566   case $2 in
1567     $1 ) ;;
1568     77) echo 77 > "$at_status_file"; exit 77;;
1569     99) echo 99 > "$at_status_file"; at_failed=:
1570         $as_echo "$3: hard failure"; exit 99;;
1571     *) $as_echo "$3: exit code was $2, expected $1"
1572       at_failed=:;;
1573   esac
1574 }
1575
1576 # at_fn_diff_devnull FILE
1577 # -----------------------
1578 # Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless diff
1579 # invocations.
1580 at_fn_diff_devnull ()
1581 {
1582   test -s "$1" || return 0
1583   $at_diff "$at_devnull" "$1"
1584 }
1585
1586 # at_fn_test NUMBER
1587 # -----------------
1588 # Parse out test NUMBER from the tail of this file.
1589 at_fn_test ()
1590 {
1591   eval at_sed=\$at_sed$1
1592   sed "$at_sed" "$at_myself" > "$at_test_source"
1593 }
1594
1595 # at_fn_create_debugging_script
1596 # -----------------------------
1597 # Create the debugging script $at_group_dir/run which will reproduce the
1598 # current test group.
1599 at_fn_create_debugging_script ()
1600 {
1601   {
1602     echo "#! /bin/sh" &&
1603     echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' &&
1604     $as_echo "cd '$at_dir'" &&
1605     $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" &&
1606     echo 'exit 1'
1607   } >"$at_group_dir/run" &&
1608   chmod +x "$at_group_dir/run"
1609 }
1610
1611 ## -------------------------------- ##
1612 ## End of autotest shell functions. ##
1613 ## -------------------------------- ##
1614 {
1615   $as_echo "## ---------------- ##
1616 ## Tested programs. ##
1617 ## ---------------- ##"
1618   echo
1619 } >&5
1620
1621 # Report what programs are being tested.
1622 for at_program in : $at_tested
1623 do
1624   test "$at_program" = : && continue
1625   case $at_program in
1626     [\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;
1627     * )
1628     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1629 for as_dir in $PATH
1630 do
1631   IFS=$as_save_IFS
1632   test -z "$as_dir" && as_dir=.
1633     test -f "$as_dir/$at_program" && break
1634   done
1635 IFS=$as_save_IFS
1636
1637     at_program_=$as_dir/$at_program ;;
1638   esac
1639   if test -f "$at_program_"; then
1640     {
1641       $as_echo "$at_srcdir/testsuite.at:180: $at_program_ --version"
1642       "$at_program_" --version </dev/null
1643       echo
1644     } >&5 2>&1
1645   else
1646     as_fn_error $? "cannot find $at_program" "$LINENO" 5
1647   fi
1648 done
1649
1650 {
1651   $as_echo "## ------------------ ##
1652 ## Running the tests. ##
1653 ## ------------------ ##"
1654 } >&5
1655
1656 at_start_date=`date`
1657 at_start_time=`date +%s 2>/dev/null`
1658 $as_echo "$as_me: starting at: $at_start_date" >&5
1659
1660 # Create the master directory if it doesn't already exist.
1661 as_dir="$at_suite_dir"; as_fn_mkdir_p ||
1662   as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5
1663
1664 # Can we diff with `/dev/null'?  DU 5.0 refuses.
1665 if diff /dev/null /dev/null >/dev/null 2>&1; then
1666   at_devnull=/dev/null
1667 else
1668   at_devnull=$at_suite_dir/devnull
1669   >"$at_devnull"
1670 fi
1671
1672 # Use `diff -u' when possible.
1673 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1674 then
1675   at_diff='diff -u'
1676 else
1677   at_diff=diff
1678 fi
1679
1680 # Get the last needed group.
1681 for at_group in : $at_groups; do :; done
1682
1683 # Extract the start and end lines of each test group at the tail
1684 # of this file
1685 awk '
1686 BEGIN { FS="\a" }
1687 /^#AT_START_/ {
1688   start = NR
1689 }
1690 /^#AT_STOP_/ {
1691   test = substr ($ 0, 10)
1692   print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
1693   if (test == "'"$at_group"'") exit
1694 }' "$at_myself" > "$at_suite_dir/at-source-lines" &&
1695 . "$at_suite_dir/at-source-lines" ||
1696   as_fn_error $? "cannot create test line number cache" "$LINENO" 5
1697 rm -f "$at_suite_dir/at-source-lines"
1698
1699 # Set number of jobs for `-j'; avoid more jobs than test groups.
1700 set X $at_groups; shift; at_max_jobs=$#
1701 if test $at_max_jobs -eq 0; then
1702   at_jobs=1
1703 fi
1704 if test $at_jobs -ne 1 &&
1705    { test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
1706   at_jobs=$at_max_jobs
1707 fi
1708
1709 # If parallel mode, don't output banners, don't split summary lines.
1710 if test $at_jobs -ne 1; then
1711   at_print_banners=false
1712   at_quiet=:
1713 fi
1714
1715 # Set up helper dirs.
1716 rm -rf "$at_helper_dir" &&
1717 mkdir "$at_helper_dir" &&
1718 cd "$at_helper_dir" &&
1719 { test -z "$at_groups" || mkdir $at_groups; } ||
1720 as_fn_error $? "testsuite directory setup failed" "$LINENO" 5
1721
1722 # Functions for running a test group.  We leave the actual
1723 # test group execution outside of a shell function in order
1724 # to avoid hitting zsh 4.x exit status bugs.
1725
1726 # at_fn_group_prepare
1727 # -------------------
1728 # Prepare for running a test group.
1729 at_fn_group_prepare ()
1730 {
1731   # The directory for additional per-group helper files.
1732   at_job_dir=$at_helper_dir/$at_group
1733   # The file containing the location of the last AT_CHECK.
1734   at_check_line_file=$at_job_dir/check-line
1735   # The file containing the exit status of the last command.
1736   at_status_file=$at_job_dir/status
1737   # The files containing the output of the tested commands.
1738   at_stdout=$at_job_dir/stdout
1739   at_stder1=$at_job_dir/stder1
1740   at_stderr=$at_job_dir/stderr
1741   # The file containing the code for a test group.
1742   at_test_source=$at_job_dir/test-source
1743   # The file containing dates.
1744   at_times_file=$at_job_dir/times
1745
1746   # Be sure to come back to the top test directory.
1747   cd "$at_suite_dir"
1748
1749   # Clearly separate the test groups when verbose.
1750   $at_first || $at_verbose echo
1751
1752   at_group_normalized=$at_group
1753
1754   eval 'while :; do
1755     case $at_group_normalized in #(
1756     '"$at_format"'*) break;;
1757     esac
1758     at_group_normalized=0$at_group_normalized
1759   done'
1760
1761
1762   # Create a fresh directory for the next test group, and enter.
1763   # If one already exists, the user may have invoked ./run from
1764   # within that directory; we remove the contents, but not the
1765   # directory itself, so that we aren't pulling the rug out from
1766   # under the shell's notion of the current directory.
1767   at_group_dir=$at_suite_dir/$at_group_normalized
1768   at_group_log=$at_group_dir/$as_me.log
1769   if test -d "$at_group_dir"; then
1770   find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \;
1771   rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??*
1772 fi ||
1773     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5
1774 $as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;}
1775   # Be tolerant if the above `rm' was not able to remove the directory.
1776   as_dir="$at_group_dir"; as_fn_mkdir_p
1777
1778   echo 0 > "$at_status_file"
1779
1780   # In verbose mode, append to the log file *and* show on
1781   # the standard output; in quiet mode only write to the log.
1782   if test -z "$at_verbose"; then
1783     at_tee_pipe='tee -a "$at_group_log"'
1784   else
1785     at_tee_pipe='cat >> "$at_group_log"'
1786   fi
1787 }
1788
1789 # at_fn_group_banner ORDINAL LINE DESC PAD [BANNER]
1790 # -------------------------------------------------
1791 # Declare the test group ORDINAL, located at LINE with group description DESC,
1792 # and residing under BANNER. Use PAD to align the status column.
1793 at_fn_group_banner ()
1794 {
1795   at_setup_line="$2"
1796   test -n "$5" && at_fn_banner $5
1797   at_desc="$3"
1798   case $1 in
1799     [0-9])      at_desc_line="  $1: ";;
1800     [0-9][0-9]) at_desc_line=" $1: " ;;
1801     *)          at_desc_line="$1: "  ;;
1802   esac
1803   as_fn_append at_desc_line "$3$4"
1804   $at_quiet $as_echo_n "$at_desc_line"
1805   echo "#                             -*- compilation -*-" >> "$at_group_log"
1806 }
1807
1808 # at_fn_group_postprocess
1809 # -----------------------
1810 # Perform cleanup after running a test group.
1811 at_fn_group_postprocess ()
1812 {
1813   # Be sure to come back to the suite directory, in particular
1814   # since below we might `rm' the group directory we are in currently.
1815   cd "$at_suite_dir"
1816
1817   if test ! -f "$at_check_line_file"; then
1818     sed "s/^ */$as_me: WARNING: /" <<_ATEOF
1819       A failure happened in a test group before any test could be
1820       run. This means that test suite is improperly designed.  Please
1821       report this failure to <bug-tar@gnu.org>.
1822 _ATEOF
1823     $as_echo "$at_setup_line" >"$at_check_line_file"
1824     at_status=99
1825   fi
1826   $at_verbose $as_echo_n "$at_group. $at_setup_line: "
1827   $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log"
1828   case $at_xfail:$at_status in
1829     yes:0)
1830         at_msg="UNEXPECTED PASS"
1831         at_res=xpass
1832         at_errexit=$at_errexit_p
1833         at_color=$at_red
1834         ;;
1835     no:0)
1836         at_msg="ok"
1837         at_res=pass
1838         at_errexit=false
1839         at_color=$at_grn
1840         ;;
1841     *:77)
1842         at_msg='skipped ('`cat "$at_check_line_file"`')'
1843         at_res=skip
1844         at_errexit=false
1845         at_color=$at_blu
1846         ;;
1847     no:* | *:99)
1848         at_msg='FAILED ('`cat "$at_check_line_file"`')'
1849         at_res=fail
1850         at_errexit=$at_errexit_p
1851         at_color=$at_red
1852         ;;
1853     yes:*)
1854         at_msg='expected failure ('`cat "$at_check_line_file"`')'
1855         at_res=xfail
1856         at_errexit=false
1857         at_color=$at_lgn
1858         ;;
1859   esac
1860   echo "$at_res" > "$at_job_dir/$at_res"
1861   # In parallel mode, output the summary line only afterwards.
1862   if test $at_jobs -ne 1 && test -n "$at_verbose"; then
1863     $as_echo "$at_desc_line $at_color$at_msg$at_std"
1864   else
1865     # Make sure there is a separator even with long titles.
1866     $as_echo " $at_color$at_msg$at_std"
1867   fi
1868   at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
1869   case $at_status in
1870     0|77)
1871       # $at_times_file is only available if the group succeeded.
1872       # We're not including the group log, so the success message
1873       # is written in the global log separately.  But we also
1874       # write to the group log in case they're using -d.
1875       if test -f "$at_times_file"; then
1876         at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
1877         rm -f "$at_times_file"
1878       fi
1879       $as_echo "$at_log_msg" >> "$at_group_log"
1880       $as_echo "$at_log_msg" >&5
1881
1882       # Cleanup the group directory, unless the user wants the files
1883       # or the success was unexpected.
1884       if $at_debug_p || test $at_res = xpass; then
1885         at_fn_create_debugging_script
1886         if test $at_res = xpass && $at_errexit; then
1887           echo stop > "$at_stop_file"
1888         fi
1889       else
1890         if test -d "$at_group_dir"; then
1891           find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1892           rm -fr "$at_group_dir"
1893         fi
1894         rm -f "$at_test_source"
1895       fi
1896       ;;
1897     *)
1898       # Upon failure, include the log into the testsuite's global
1899       # log.  The failure message is written in the group log.  It
1900       # is later included in the global log.
1901       $as_echo "$at_log_msg" >> "$at_group_log"
1902
1903       # Upon failure, keep the group directory for autopsy, and create
1904       # the debugging script.  With -e, do not start any further tests.
1905       at_fn_create_debugging_script
1906       if $at_errexit; then
1907         echo stop > "$at_stop_file"
1908       fi
1909       ;;
1910   esac
1911 }
1912
1913
1914 ## ------------ ##
1915 ## Driver loop. ##
1916 ## ------------ ##
1917
1918
1919 if (set -m && set +m && set +b) >/dev/null 2>&1; then
1920   set +b
1921   at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
1922 else
1923   at_job_control_on=: at_job_control_off=: at_job_group=
1924 fi
1925
1926 for at_signal in 1 2 15; do
1927   trap 'set +x; set +e
1928         $at_job_control_off
1929         at_signal='"$at_signal"'
1930         echo stop > "$at_stop_file"
1931         trap "" $at_signal
1932         at_pgids=
1933         for at_pgid in `jobs -p 2>/dev/null`; do
1934           at_pgids="$at_pgids $at_job_group$at_pgid"
1935         done
1936         test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
1937         wait
1938         if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
1939           echo >&2
1940         fi
1941         at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
1942         set x $at_signame
1943         test 0 -gt 2 && at_signame=$at_signal
1944         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: caught signal $at_signame, bailing out" >&5
1945 $as_echo "$as_me: WARNING: caught signal $at_signame, bailing out" >&2;}
1946         as_fn_arith 128 + $at_signal && exit_status=$as_val
1947         as_fn_exit $exit_status' $at_signal
1948 done
1949
1950 rm -f "$at_stop_file"
1951 at_first=:
1952
1953 if test $at_jobs -ne 1 &&
1954      rm -f "$at_job_fifo" &&
1955      test -n "$at_job_group" &&
1956      ( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
1957 then
1958   # FIFO job dispatcher.
1959
1960   trap 'at_pids=
1961         for at_pid in `jobs -p`; do
1962           at_pids="$at_pids $at_job_group$at_pid"
1963         done
1964         if test -n "$at_pids"; then
1965           at_sig=TSTP
1966           test "${TMOUT+set}" = set && at_sig=STOP
1967           kill -$at_sig $at_pids 2>/dev/null
1968         fi
1969         kill -STOP $$
1970         test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
1971
1972   echo
1973   # Turn jobs into a list of numbers, starting from 1.
1974   at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
1975
1976   set X $at_joblist
1977   shift
1978   for at_group in $at_groups; do
1979     $at_job_control_on 2>/dev/null
1980     (
1981       # Start one test group.
1982       $at_job_control_off
1983       if $at_first; then
1984         exec 7>"$at_job_fifo"
1985       else
1986         exec 6<&-
1987       fi
1988       trap 'set +x; set +e
1989             trap "" PIPE
1990             echo stop > "$at_stop_file"
1991             echo >&7
1992             as_fn_exit 141' PIPE
1993       at_fn_group_prepare
1994       if cd "$at_group_dir" &&
1995          at_fn_test $at_group &&
1996          . "$at_test_source"
1997       then :; else
1998         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
1999 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
2000         at_failed=:
2001       fi
2002       at_fn_group_postprocess
2003       echo >&7
2004     ) &
2005     $at_job_control_off
2006     if $at_first; then
2007       at_first=false
2008       exec 6<"$at_job_fifo" 7>"$at_job_fifo"
2009     fi
2010     shift # Consume one token.
2011     if test $# -gt 0; then :; else
2012       read at_token <&6 || break
2013       set x $*
2014     fi
2015     test -f "$at_stop_file" && break
2016   done
2017   exec 7>&-
2018   # Read back the remaining ($at_jobs - 1) tokens.
2019   set X $at_joblist
2020   shift
2021   if test $# -gt 0; then
2022     shift
2023     for at_job
2024     do
2025       read at_token
2026     done <&6
2027   fi
2028   exec 6<&-
2029   wait
2030 else
2031   # Run serially, avoid forks and other potential surprises.
2032   for at_group in $at_groups; do
2033     at_fn_group_prepare
2034     if cd "$at_group_dir" &&
2035        at_fn_test $at_group &&
2036        . "$at_test_source"; then :; else
2037       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
2038 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
2039       at_failed=:
2040     fi
2041     at_fn_group_postprocess
2042     test -f "$at_stop_file" && break
2043     at_first=false
2044   done
2045 fi
2046
2047 # Wrap up the test suite with summary statistics.
2048 cd "$at_helper_dir"
2049
2050 # Use ?..???? when the list must remain sorted, the faster * otherwise.
2051 at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
2052 at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
2053 at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
2054 at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
2055                  echo $f; done | sed '/?/d; s,/xpass,,'`
2056 at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
2057                 echo $f; done | sed '/?/d; s,/fail,,'`
2058
2059 set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
2060 shift; at_group_count=$#
2061 set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$*
2062 set X $at_xfail_list; shift; at_xfail_count=$#
2063 set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$*
2064 set X $at_skip_list; shift; at_skip_count=$#
2065
2066 as_fn_arith $at_group_count - $at_skip_count && at_run_count=$as_val
2067 as_fn_arith $at_xpass_count + $at_fail_count && at_unexpected_count=$as_val
2068 as_fn_arith $at_xfail_count + $at_fail_count && at_total_fail_count=$as_val
2069
2070 # Back to the top directory.
2071 cd "$at_dir"
2072 rm -rf "$at_helper_dir"
2073
2074 # Compute the duration of the suite.
2075 at_stop_date=`date`
2076 at_stop_time=`date +%s 2>/dev/null`
2077 $as_echo "$as_me: ending at: $at_stop_date" >&5
2078 case $at_start_time,$at_stop_time in
2079   [0-9]*,[0-9]*)
2080     as_fn_arith $at_stop_time - $at_start_time && at_duration_s=$as_val
2081     as_fn_arith $at_duration_s / 60 && at_duration_m=$as_val
2082     as_fn_arith $at_duration_m / 60 && at_duration_h=$as_val
2083     as_fn_arith $at_duration_s % 60 && at_duration_s=$as_val
2084     as_fn_arith $at_duration_m % 60 && at_duration_m=$as_val
2085     at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
2086     $as_echo "$as_me: test suite duration: $at_duration" >&5
2087     ;;
2088 esac
2089
2090 echo
2091 $as_echo "## ------------- ##
2092 ## Test results. ##
2093 ## ------------- ##"
2094 echo
2095 {
2096   echo
2097   $as_echo "## ------------- ##
2098 ## Test results. ##
2099 ## ------------- ##"
2100   echo
2101 } >&5
2102
2103 if test $at_run_count = 1; then
2104   at_result="1 test"
2105   at_were=was
2106 else
2107   at_result="$at_run_count tests"
2108   at_were=were
2109 fi
2110 if $at_errexit_p && test $at_unexpected_count != 0; then
2111   if test $at_xpass_count = 1; then
2112     at_result="$at_result $at_were run, one passed"
2113   else
2114     at_result="$at_result $at_were run, one failed"
2115   fi
2116   at_result="$at_result unexpectedly and inhibited subsequent tests."
2117   at_color=$at_red
2118 else
2119   # Don't you just love exponential explosion of the number of cases?
2120   at_color=$at_red
2121   case $at_xpass_count:$at_fail_count:$at_xfail_count in
2122     # So far, so good.
2123     0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
2124     0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
2125
2126     # Some unexpected failures
2127     0:*:0) at_result="$at_result $at_were run,
2128 $at_fail_count failed unexpectedly." ;;
2129
2130     # Some failures, both expected and unexpected
2131     0:*:1) at_result="$at_result $at_were run,
2132 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2133     0:*:*) at_result="$at_result $at_were run,
2134 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2135
2136     # No unexpected failures, but some xpasses
2137     *:0:*) at_result="$at_result $at_were run,
2138 $at_xpass_count passed unexpectedly." ;;
2139
2140     # No expected failures, but failures and xpasses
2141     *:1:0) at_result="$at_result $at_were run,
2142 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
2143     *:*:0) at_result="$at_result $at_were run,
2144 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
2145
2146     # All of them.
2147     *:*:1) at_result="$at_result $at_were run,
2148 $at_xpass_count passed unexpectedly,
2149 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
2150     *:*:*) at_result="$at_result $at_were run,
2151 $at_xpass_count passed unexpectedly,
2152 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
2153   esac
2154
2155   if test $at_skip_count = 0 && test $at_run_count -gt 1; then
2156     at_result="All $at_result"
2157   fi
2158 fi
2159
2160 # Now put skips in the mix.
2161 case $at_skip_count in
2162   0) ;;
2163   1) at_result="$at_result
2164 1 test was skipped." ;;
2165   *) at_result="$at_result
2166 $at_skip_count tests were skipped." ;;
2167 esac
2168
2169 if test $at_unexpected_count = 0; then
2170   echo "$at_color$at_result$at_std"
2171   echo "$at_result" >&5
2172 else
2173   echo "${at_color}ERROR: $at_result$at_std" >&2
2174   echo "ERROR: $at_result" >&5
2175   {
2176     echo
2177     $as_echo "## ------------------------ ##
2178 ## Summary of the failures. ##
2179 ## ------------------------ ##"
2180
2181     # Summary of failed and skipped tests.
2182     if test $at_fail_count != 0; then
2183       echo "Failed tests:"
2184       $SHELL "$at_myself" $at_fail_list --list
2185       echo
2186     fi
2187     if test $at_skip_count != 0; then
2188       echo "Skipped tests:"
2189       $SHELL "$at_myself" $at_skip_list --list
2190       echo
2191     fi
2192     if test $at_xpass_count != 0; then
2193       echo "Unexpected passes:"
2194       $SHELL "$at_myself" $at_xpass_list --list
2195       echo
2196     fi
2197     if test $at_fail_count != 0; then
2198       $as_echo "## ---------------------- ##
2199 ## Detailed failed tests. ##
2200 ## ---------------------- ##"
2201       echo
2202       for at_group in $at_fail_list
2203       do
2204         at_group_normalized=$at_group
2205
2206   eval 'while :; do
2207     case $at_group_normalized in #(
2208     '"$at_format"'*) break;;
2209     esac
2210     at_group_normalized=0$at_group_normalized
2211   done'
2212
2213         cat "$at_suite_dir/$at_group_normalized/$as_me.log"
2214         echo
2215       done
2216       echo
2217     fi
2218     if test -n "$at_top_srcdir"; then
2219       sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2220 ## ${at_top_build_prefix}config.log ##
2221 _ASBOX
2222       sed 's/^/| /' ${at_top_build_prefix}config.log
2223       echo
2224     fi
2225   } >&5
2226
2227   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2228 ## $as_me.log was created. ##
2229 _ASBOX
2230
2231   echo
2232   if $at_debug_p; then
2233     at_msg='per-test log files'
2234   else
2235     at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
2236   fi
2237   $as_echo "Please send $at_msg and all information you think might help:
2238
2239    To: <bug-tar@gnu.org>
2240    Subject: [GNU tar 1.28] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly}
2241
2242 You may investigate any problem if you feel able to do so, in which
2243 case the test suite provides a good starting point.  Its output may
2244 be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
2245 "
2246   exit 1
2247 fi
2248
2249 exit 0
2250
2251 ## ------------- ##
2252 ## Actual tests. ##
2253 ## ------------- ##
2254 #AT_START_1
2255 at_fn_group_banner 1 'version.at:19' \
2256   "tar version" "                                    "
2257 at_xfail=no
2258 (
2259   $as_echo "1. $at_setup_line: testing $at_desc ..."
2260   $at_traceon
2261
2262
2263 { set +x
2264 $as_echo "$at_srcdir/version.at:21: tar --version | sed 1q"
2265 at_fn_check_prepare_notrace 'a shell pipeline' "version.at:21"
2266 ( $at_check_trace; tar --version | sed 1q
2267 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2268 at_status=$? at_failed=false
2269 $at_check_filter
2270 at_fn_diff_devnull "$at_stderr" || at_failed=:
2271 echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.28
2272 " | \
2273   $at_diff - "$at_stdout" || at_failed=:
2274 at_fn_check_status 0 $at_status "$at_srcdir/version.at:21"
2275 if $at_failed; then :
2276   cat >$XFAILFILE <<'_EOT'
2277
2278 ==============================================================
2279 WARNING: Not using the proper version, *all* checks dubious...
2280 ==============================================================
2281 _EOT
2282
2283 else
2284   rm -f $XFAILFILE
2285 fi
2286 $at_failed && at_fn_log_failure
2287 $at_traceon; }
2288
2289
2290   set +x
2291   $at_times_p && times >"$at_times_file"
2292 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2293 read at_status <"$at_status_file"
2294 #AT_STOP_1
2295 #AT_START_2
2296 at_fn_group_banner 2 'pipe.at:29' \
2297   "decompressing from stdin" "                       "
2298 at_xfail=no
2299       test -f $XFAILFILE && at_xfail=yes
2300 (
2301   $as_echo "2. $at_setup_line: testing $at_desc ..."
2302   $at_traceon
2303
2304
2305
2306
2307
2308
2309   { set +x
2310 $as_echo "$at_srcdir/pipe.at:33:
2311 mkdir v7
2312 (cd v7
2313 TEST_TAR_FORMAT=v7
2314 export TEST_TAR_FORMAT
2315 TAR_OPTIONS=\"-H v7\"
2316 export TAR_OPTIONS
2317 rm -rf *
2318
2319
2320 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2321
2322
2323 mkdir directory
2324 genfile --length 10240 --pattern zeros --file directory/file1
2325 genfile --length 13 --file directory/file2
2326 tar cf archive directory
2327 mv directory orig
2328 cat archive | tar xfv - --warning=no-timestamp | sort
2329 echo \"separator\"
2330 cmp orig/file1 directory/file1
2331 echo \"separator\"
2332 cmp orig/file2 directory/file2)"
2333 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2334 ( $at_check_trace;
2335 mkdir v7
2336 (cd v7
2337 TEST_TAR_FORMAT=v7
2338 export TEST_TAR_FORMAT
2339 TAR_OPTIONS="-H v7"
2340 export TAR_OPTIONS
2341 rm -rf *
2342
2343
2344 test -z "`sort < /dev/null 2>&1`" || exit 77
2345
2346
2347 mkdir directory
2348 genfile --length 10240 --pattern zeros --file directory/file1
2349 genfile --length 13 --file directory/file2
2350 tar cf archive directory
2351 mv directory orig
2352 cat archive | tar xfv - --warning=no-timestamp | sort
2353 echo "separator"
2354 cmp orig/file1 directory/file1
2355 echo "separator"
2356 cmp orig/file2 directory/file2)
2357 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2358 at_status=$? at_failed=false
2359 $at_check_filter
2360 at_fn_diff_devnull "$at_stderr" || at_failed=:
2361 echo >>"$at_stdout"; $as_echo "directory/
2362 directory/file1
2363 directory/file2
2364 separator
2365 separator
2366 " | \
2367   $at_diff - "$at_stdout" || at_failed=:
2368 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2369 $at_failed && at_fn_log_failure
2370 $at_traceon; }
2371
2372               { set +x
2373 $as_echo "$at_srcdir/pipe.at:33:
2374 mkdir oldgnu
2375 (cd oldgnu
2376 TEST_TAR_FORMAT=oldgnu
2377 export TEST_TAR_FORMAT
2378 TAR_OPTIONS=\"-H oldgnu\"
2379 export TAR_OPTIONS
2380 rm -rf *
2381
2382
2383 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2384
2385
2386 mkdir directory
2387 genfile --length 10240 --pattern zeros --file directory/file1
2388 genfile --length 13 --file directory/file2
2389 tar cf archive directory
2390 mv directory orig
2391 cat archive | tar xfv - --warning=no-timestamp | sort
2392 echo \"separator\"
2393 cmp orig/file1 directory/file1
2394 echo \"separator\"
2395 cmp orig/file2 directory/file2)"
2396 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2397 ( $at_check_trace;
2398 mkdir oldgnu
2399 (cd oldgnu
2400 TEST_TAR_FORMAT=oldgnu
2401 export TEST_TAR_FORMAT
2402 TAR_OPTIONS="-H oldgnu"
2403 export TAR_OPTIONS
2404 rm -rf *
2405
2406
2407 test -z "`sort < /dev/null 2>&1`" || exit 77
2408
2409
2410 mkdir directory
2411 genfile --length 10240 --pattern zeros --file directory/file1
2412 genfile --length 13 --file directory/file2
2413 tar cf archive directory
2414 mv directory orig
2415 cat archive | tar xfv - --warning=no-timestamp | sort
2416 echo "separator"
2417 cmp orig/file1 directory/file1
2418 echo "separator"
2419 cmp orig/file2 directory/file2)
2420 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2421 at_status=$? at_failed=false
2422 $at_check_filter
2423 at_fn_diff_devnull "$at_stderr" || at_failed=:
2424 echo >>"$at_stdout"; $as_echo "directory/
2425 directory/file1
2426 directory/file2
2427 separator
2428 separator
2429 " | \
2430   $at_diff - "$at_stdout" || at_failed=:
2431 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2432 $at_failed && at_fn_log_failure
2433 $at_traceon; }
2434
2435               { set +x
2436 $as_echo "$at_srcdir/pipe.at:33:
2437 mkdir ustar
2438 (cd ustar
2439 TEST_TAR_FORMAT=ustar
2440 export TEST_TAR_FORMAT
2441 TAR_OPTIONS=\"-H ustar\"
2442 export TAR_OPTIONS
2443 rm -rf *
2444
2445
2446 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2447
2448
2449 mkdir directory
2450 genfile --length 10240 --pattern zeros --file directory/file1
2451 genfile --length 13 --file directory/file2
2452 tar cf archive directory
2453 mv directory orig
2454 cat archive | tar xfv - --warning=no-timestamp | sort
2455 echo \"separator\"
2456 cmp orig/file1 directory/file1
2457 echo \"separator\"
2458 cmp orig/file2 directory/file2)"
2459 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2460 ( $at_check_trace;
2461 mkdir ustar
2462 (cd ustar
2463 TEST_TAR_FORMAT=ustar
2464 export TEST_TAR_FORMAT
2465 TAR_OPTIONS="-H ustar"
2466 export TAR_OPTIONS
2467 rm -rf *
2468
2469
2470 test -z "`sort < /dev/null 2>&1`" || exit 77
2471
2472
2473 mkdir directory
2474 genfile --length 10240 --pattern zeros --file directory/file1
2475 genfile --length 13 --file directory/file2
2476 tar cf archive directory
2477 mv directory orig
2478 cat archive | tar xfv - --warning=no-timestamp | sort
2479 echo "separator"
2480 cmp orig/file1 directory/file1
2481 echo "separator"
2482 cmp orig/file2 directory/file2)
2483 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2484 at_status=$? at_failed=false
2485 $at_check_filter
2486 at_fn_diff_devnull "$at_stderr" || at_failed=:
2487 echo >>"$at_stdout"; $as_echo "directory/
2488 directory/file1
2489 directory/file2
2490 separator
2491 separator
2492 " | \
2493   $at_diff - "$at_stdout" || at_failed=:
2494 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2495 $at_failed && at_fn_log_failure
2496 $at_traceon; }
2497
2498               { set +x
2499 $as_echo "$at_srcdir/pipe.at:33:
2500 mkdir posix
2501 (cd posix
2502 TEST_TAR_FORMAT=posix
2503 export TEST_TAR_FORMAT
2504 TAR_OPTIONS=\"-H posix\"
2505 export TAR_OPTIONS
2506 rm -rf *
2507
2508
2509 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2510
2511
2512 mkdir directory
2513 genfile --length 10240 --pattern zeros --file directory/file1
2514 genfile --length 13 --file directory/file2
2515 tar cf archive directory
2516 mv directory orig
2517 cat archive | tar xfv - --warning=no-timestamp | sort
2518 echo \"separator\"
2519 cmp orig/file1 directory/file1
2520 echo \"separator\"
2521 cmp orig/file2 directory/file2)"
2522 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2523 ( $at_check_trace;
2524 mkdir posix
2525 (cd posix
2526 TEST_TAR_FORMAT=posix
2527 export TEST_TAR_FORMAT
2528 TAR_OPTIONS="-H posix"
2529 export TAR_OPTIONS
2530 rm -rf *
2531
2532
2533 test -z "`sort < /dev/null 2>&1`" || exit 77
2534
2535
2536 mkdir directory
2537 genfile --length 10240 --pattern zeros --file directory/file1
2538 genfile --length 13 --file directory/file2
2539 tar cf archive directory
2540 mv directory orig
2541 cat archive | tar xfv - --warning=no-timestamp | sort
2542 echo "separator"
2543 cmp orig/file1 directory/file1
2544 echo "separator"
2545 cmp orig/file2 directory/file2)
2546 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2547 at_status=$? at_failed=false
2548 $at_check_filter
2549 at_fn_diff_devnull "$at_stderr" || at_failed=:
2550 echo >>"$at_stdout"; $as_echo "directory/
2551 directory/file1
2552 directory/file2
2553 separator
2554 separator
2555 " | \
2556   $at_diff - "$at_stdout" || at_failed=:
2557 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2558 $at_failed && at_fn_log_failure
2559 $at_traceon; }
2560
2561               { set +x
2562 $as_echo "$at_srcdir/pipe.at:33:
2563 mkdir gnu
2564 (cd gnu
2565 TEST_TAR_FORMAT=gnu
2566 export TEST_TAR_FORMAT
2567 TAR_OPTIONS=\"-H gnu\"
2568 export TAR_OPTIONS
2569 rm -rf *
2570
2571
2572 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
2573
2574
2575 mkdir directory
2576 genfile --length 10240 --pattern zeros --file directory/file1
2577 genfile --length 13 --file directory/file2
2578 tar cf archive directory
2579 mv directory orig
2580 cat archive | tar xfv - --warning=no-timestamp | sort
2581 echo \"separator\"
2582 cmp orig/file1 directory/file1
2583 echo \"separator\"
2584 cmp orig/file2 directory/file2)"
2585 at_fn_check_prepare_notrace 'a `...` command substitution' "pipe.at:33"
2586 ( $at_check_trace;
2587 mkdir gnu
2588 (cd gnu
2589 TEST_TAR_FORMAT=gnu
2590 export TEST_TAR_FORMAT
2591 TAR_OPTIONS="-H gnu"
2592 export TAR_OPTIONS
2593 rm -rf *
2594
2595
2596 test -z "`sort < /dev/null 2>&1`" || exit 77
2597
2598
2599 mkdir directory
2600 genfile --length 10240 --pattern zeros --file directory/file1
2601 genfile --length 13 --file directory/file2
2602 tar cf archive directory
2603 mv directory orig
2604 cat archive | tar xfv - --warning=no-timestamp | sort
2605 echo "separator"
2606 cmp orig/file1 directory/file1
2607 echo "separator"
2608 cmp orig/file2 directory/file2)
2609 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2610 at_status=$? at_failed=false
2611 $at_check_filter
2612 at_fn_diff_devnull "$at_stderr" || at_failed=:
2613 echo >>"$at_stdout"; $as_echo "directory/
2614 directory/file1
2615 directory/file2
2616 separator
2617 separator
2618 " | \
2619   $at_diff - "$at_stdout" || at_failed=:
2620 at_fn_check_status 0 $at_status "$at_srcdir/pipe.at:33"
2621 $at_failed && at_fn_log_failure
2622 $at_traceon; }
2623
2624
2625
2626
2627   set +x
2628   $at_times_p && times >"$at_times_file"
2629 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2630 read at_status <"$at_status_file"
2631 #AT_STOP_2
2632 #AT_START_3
2633 at_fn_group_banner 3 'options.at:24' \
2634   "mixing options" "                                 "
2635 at_xfail=no
2636 (
2637   $as_echo "3. $at_setup_line: testing $at_desc ..."
2638   $at_traceon
2639
2640
2641
2642 { set +x
2643 $as_echo "$at_srcdir/options.at:27:
2644 echo > file1
2645 TAR_OPTIONS=--numeric-owner tar chof archive file1
2646 tar tf archive
2647 "
2648 at_fn_check_prepare_notrace 'an embedded newline' "options.at:27"
2649 ( $at_check_trace;
2650 echo > file1
2651 TAR_OPTIONS=--numeric-owner tar chof archive file1
2652 tar tf archive
2653
2654 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2655 at_status=$? at_failed=false
2656 $at_check_filter
2657 at_fn_diff_devnull "$at_stderr" || at_failed=:
2658 echo >>"$at_stdout"; $as_echo "file1
2659 " | \
2660   $at_diff - "$at_stdout" || at_failed=:
2661 at_fn_check_status 0 $at_status "$at_srcdir/options.at:27"
2662 $at_failed && at_fn_log_failure
2663 $at_traceon; }
2664
2665
2666   set +x
2667   $at_times_p && times >"$at_times_file"
2668 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2669 read at_status <"$at_status_file"
2670 #AT_STOP_3
2671 #AT_START_4
2672 at_fn_group_banner 4 'options02.at:26' \
2673   "interspersed options" "                           "
2674 at_xfail=no
2675 (
2676   $as_echo "4. $at_setup_line: testing $at_desc ..."
2677   $at_traceon
2678
2679
2680
2681 { set +x
2682 $as_echo "$at_srcdir/options02.at:29:
2683 echo > file1
2684 tar c file1 -f archive
2685 tar tf archive
2686 "
2687 at_fn_check_prepare_notrace 'an embedded newline' "options02.at:29"
2688 ( $at_check_trace;
2689 echo > file1
2690 tar c file1 -f archive
2691 tar tf archive
2692
2693 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2694 at_status=$? at_failed=false
2695 $at_check_filter
2696 at_fn_diff_devnull "$at_stderr" || at_failed=:
2697 echo >>"$at_stdout"; $as_echo "file1
2698 " | \
2699   $at_diff - "$at_stdout" || at_failed=:
2700 at_fn_check_status 0 $at_status "$at_srcdir/options02.at:29"
2701 $at_failed && at_fn_log_failure
2702 $at_traceon; }
2703
2704
2705   set +x
2706   $at_times_p && times >"$at_times_file"
2707 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2708 read at_status <"$at_status_file"
2709 #AT_STOP_4
2710 #AT_START_5
2711 at_fn_group_banner 5 'opcomp01.at:21' \
2712   "occurrence compatibility" "                       " 1
2713 at_xfail=no
2714 (
2715   $as_echo "5. $at_setup_line: testing $at_desc ..."
2716   $at_traceon
2717
2718
2719
2720 { set +x
2721 $as_echo "$at_srcdir/opcomp01.at:24:
2722 tar --occurrence=1 -cf test.tar .
2723 "
2724 at_fn_check_prepare_notrace 'an embedded newline' "opcomp01.at:24"
2725 ( $at_check_trace;
2726 tar --occurrence=1 -cf test.tar .
2727
2728 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2729 at_status=$? at_failed=false
2730 $at_check_filter
2731 echo >>"$at_stderr"; $as_echo "tar: '--occurrence' cannot be used with '-c'
2732 Try 'tar --help' or 'tar --usage' for more information.
2733 " | \
2734   $at_diff - "$at_stderr" || at_failed=:
2735 at_fn_diff_devnull "$at_stdout" || at_failed=:
2736 at_fn_check_status 2 $at_status "$at_srcdir/opcomp01.at:24"
2737 $at_failed && at_fn_log_failure
2738 $at_traceon; }
2739
2740
2741   set +x
2742   $at_times_p && times >"$at_times_file"
2743 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2744 read at_status <"$at_status_file"
2745 #AT_STOP_5
2746 #AT_START_6
2747 at_fn_group_banner 6 'opcomp02.at:21' \
2748   "occurrence compatibility" "                       " 1
2749 at_xfail=no
2750 (
2751   $as_echo "6. $at_setup_line: testing $at_desc ..."
2752   $at_traceon
2753
2754
2755
2756 { set +x
2757 $as_echo "$at_srcdir/opcomp02.at:24:
2758 tar --occurrence=1 -tf test.tar
2759 "
2760 at_fn_check_prepare_notrace 'an embedded newline' "opcomp02.at:24"
2761 ( $at_check_trace;
2762 tar --occurrence=1 -tf test.tar
2763
2764 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2765 at_status=$? at_failed=false
2766 $at_check_filter
2767 echo >>"$at_stderr"; $as_echo "tar: --occurrence is meaningless without a file list
2768 Try 'tar --help' or 'tar --usage' for more information.
2769 " | \
2770   $at_diff - "$at_stderr" || at_failed=:
2771 at_fn_diff_devnull "$at_stdout" || at_failed=:
2772 at_fn_check_status 2 $at_status "$at_srcdir/opcomp02.at:24"
2773 $at_failed && at_fn_log_failure
2774 $at_traceon; }
2775
2776
2777   set +x
2778   $at_times_p && times >"$at_times_file"
2779 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2780 read at_status <"$at_status_file"
2781 #AT_STOP_6
2782 #AT_START_7
2783 at_fn_group_banner 7 'opcomp03.at:21' \
2784   "--verify compatibility" "                         " 1
2785 at_xfail=no
2786 (
2787   $as_echo "7. $at_setup_line: testing $at_desc ..."
2788   $at_traceon
2789
2790
2791
2792 { set +x
2793 $as_echo "$at_srcdir/opcomp03.at:24:
2794 tar -tWf test.tar .
2795 "
2796 at_fn_check_prepare_notrace 'an embedded newline' "opcomp03.at:24"
2797 ( $at_check_trace;
2798 tar -tWf test.tar .
2799
2800 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2801 at_status=$? at_failed=false
2802 $at_check_filter
2803 echo >>"$at_stderr"; $as_echo "tar: '--verify' cannot be used with '-t'
2804 Try 'tar --help' or 'tar --usage' for more information.
2805 " | \
2806   $at_diff - "$at_stderr" || at_failed=:
2807 at_fn_diff_devnull "$at_stdout" || at_failed=:
2808 at_fn_check_status 2 $at_status "$at_srcdir/opcomp03.at:24"
2809 $at_failed && at_fn_log_failure
2810 $at_traceon; }
2811
2812
2813   set +x
2814   $at_times_p && times >"$at_times_file"
2815 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2816 read at_status <"$at_status_file"
2817 #AT_STOP_7
2818 #AT_START_8
2819 at_fn_group_banner 8 'opcomp04.at:21' \
2820   "compress option compatibility" "                  " 1
2821 at_xfail=no
2822 (
2823   $as_echo "8. $at_setup_line: testing $at_desc ..."
2824   $at_traceon
2825
2826
2827
2828 { set +x
2829 $as_echo "$at_srcdir/opcomp04.at:24:
2830
2831 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
2832
2833 genfile --file file
2834 tar czf test.tar file
2835 genfile --file newfile
2836 tar rzf test.tar newfile
2837 "
2838 at_fn_check_prepare_notrace 'an embedded newline' "opcomp04.at:24"
2839 ( $at_check_trace;
2840
2841 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
2842
2843 genfile --file file
2844 tar czf test.tar file
2845 genfile --file newfile
2846 tar rzf test.tar newfile
2847
2848 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2849 at_status=$? at_failed=false
2850 $at_check_filter
2851 echo >>"$at_stderr"; $as_echo "tar: Cannot update compressed archives
2852 Try 'tar --help' or 'tar --usage' for more information.
2853 " | \
2854   $at_diff - "$at_stderr" || at_failed=:
2855 at_fn_diff_devnull "$at_stdout" || at_failed=:
2856 at_fn_check_status 2 $at_status "$at_srcdir/opcomp04.at:24"
2857 $at_failed && at_fn_log_failure
2858 $at_traceon; }
2859
2860
2861   set +x
2862   $at_times_p && times >"$at_times_file"
2863 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2864 read at_status <"$at_status_file"
2865 #AT_STOP_8
2866 #AT_START_9
2867 at_fn_group_banner 9 'opcomp05.at:21' \
2868   "--pax-option compatibility" "                     " 1
2869 at_xfail=no
2870 (
2871   $as_echo "9. $at_setup_line: testing $at_desc ..."
2872   $at_traceon
2873
2874
2875
2876 { set +x
2877 $as_echo "$at_srcdir/opcomp05.at:24:
2878 tar -Hgnu -cf test.tar --pax-option user:=root .
2879 "
2880 at_fn_check_prepare_notrace 'an embedded newline' "opcomp05.at:24"
2881 ( $at_check_trace;
2882 tar -Hgnu -cf test.tar --pax-option user:=root .
2883
2884 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2885 at_status=$? at_failed=false
2886 $at_check_filter
2887 echo >>"$at_stderr"; $as_echo "tar: --pax-option can be used only on POSIX archives
2888 Try 'tar --help' or 'tar --usage' for more information.
2889 " | \
2890   $at_diff - "$at_stderr" || at_failed=:
2891 at_fn_diff_devnull "$at_stdout" || at_failed=:
2892 at_fn_check_status 2 $at_status "$at_srcdir/opcomp05.at:24"
2893 $at_failed && at_fn_log_failure
2894 $at_traceon; }
2895
2896
2897   set +x
2898   $at_times_p && times >"$at_times_file"
2899 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2900 read at_status <"$at_status_file"
2901 #AT_STOP_9
2902 #AT_START_10
2903 at_fn_group_banner 10 'opcomp06.at:21' \
2904   "--pax-option compatibility" "                     " 1
2905 at_xfail=no
2906 (
2907   $as_echo "10. $at_setup_line: testing $at_desc ..."
2908   $at_traceon
2909
2910
2911
2912 { set +x
2913 $as_echo "$at_srcdir/opcomp06.at:24:
2914
2915
2916   file=\$(TMPDIR=. mktemp fiXXXXXX)
2917
2918   setfacl -m u:\$UID:rwx \$file &> /dev/null
2919   if test \"\$?\" != 0; then
2920     exit 77
2921   fi
2922
2923
2924   getfacl \$file &> /dev/null
2925   if test \"\$?\" != 0; then
2926     exit 77
2927   fi
2928
2929   rm -rf \$file
2930
2931   file=\$(TMPDIR=. mktemp fiXXXXXX)
2932   setfacl -m u:\$UID:rwx \$file
2933   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
2934   if test \"\$err\" != \"0\"; then
2935     exit 77
2936   fi
2937
2938 genfile --file file
2939 tar -cf test.tar --acls -Hgnu file
2940 "
2941 at_fn_check_prepare_notrace 'a $(...) command substitution' "opcomp06.at:24"
2942 ( $at_check_trace;
2943
2944
2945   file=$(TMPDIR=. mktemp fiXXXXXX)
2946
2947   setfacl -m u:$UID:rwx $file &> /dev/null
2948   if test "$?" != 0; then
2949     exit 77
2950   fi
2951
2952
2953   getfacl $file &> /dev/null
2954   if test "$?" != 0; then
2955     exit 77
2956   fi
2957
2958   rm -rf $file
2959
2960   file=$(TMPDIR=. mktemp fiXXXXXX)
2961   setfacl -m u:$UID:rwx $file
2962   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
2963   if test "$err" != "0"; then
2964     exit 77
2965   fi
2966
2967 genfile --file file
2968 tar -cf test.tar --acls -Hgnu file
2969
2970 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
2971 at_status=$? at_failed=false
2972 $at_check_filter
2973 echo >>"$at_stderr"; $as_echo "tar: --acls can be used only on POSIX archives
2974 Try 'tar --help' or 'tar --usage' for more information.
2975 " | \
2976   $at_diff - "$at_stderr" || at_failed=:
2977 at_fn_diff_devnull "$at_stdout" || at_failed=:
2978 at_fn_check_status 2 $at_status "$at_srcdir/opcomp06.at:24"
2979 $at_failed && at_fn_log_failure
2980 $at_traceon; }
2981
2982
2983   set +x
2984   $at_times_p && times >"$at_times_file"
2985 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
2986 read at_status <"$at_status_file"
2987 #AT_STOP_10
2988 #AT_START_11
2989 at_fn_group_banner 11 'T-mult.at:21' \
2990   "multiple file lists" "                            " 2
2991 at_xfail=no
2992       test -f $XFAILFILE && at_xfail=yes
2993 (
2994   $as_echo "11. $at_setup_line: testing $at_desc ..."
2995   $at_traceon
2996
2997
2998
2999
3000
3001   { set +x
3002 $as_echo "$at_srcdir/T-mult.at:24:
3003 mkdir ustar
3004 (cd ustar
3005 TEST_TAR_FORMAT=ustar
3006 export TEST_TAR_FORMAT
3007 TAR_OPTIONS=\"-H ustar\"
3008 export TAR_OPTIONS
3009 rm -rf *
3010
3011 >file1
3012 >file2
3013 >file3
3014 >file4
3015 cat >F1 <<'_ATEOF'
3016 file1
3017 file2
3018 _ATEOF
3019
3020 cat >F2 <<'_ATEOF'
3021 file3
3022 file4
3023 _ATEOF
3024
3025 tar cf archive -T F1 -T F2
3026 tar tf archive
3027 )"
3028 at_fn_check_prepare_notrace 'an embedded newline' "T-mult.at:24"
3029 ( $at_check_trace;
3030 mkdir ustar
3031 (cd ustar
3032 TEST_TAR_FORMAT=ustar
3033 export TEST_TAR_FORMAT
3034 TAR_OPTIONS="-H ustar"
3035 export TAR_OPTIONS
3036 rm -rf *
3037
3038 >file1
3039 >file2
3040 >file3
3041 >file4
3042 cat >F1 <<'_ATEOF'
3043 file1
3044 file2
3045 _ATEOF
3046
3047 cat >F2 <<'_ATEOF'
3048 file3
3049 file4
3050 _ATEOF
3051
3052 tar cf archive -T F1 -T F2
3053 tar tf archive
3054 )
3055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3056 at_status=$? at_failed=false
3057 $at_check_filter
3058 at_fn_diff_devnull "$at_stderr" || at_failed=:
3059 echo >>"$at_stdout"; $as_echo "file1
3060 file2
3061 file3
3062 file4
3063 " | \
3064   $at_diff - "$at_stdout" || at_failed=:
3065 at_fn_check_status 0 $at_status "$at_srcdir/T-mult.at:24"
3066 $at_failed && at_fn_log_failure
3067 $at_traceon; }
3068
3069
3070
3071
3072   set +x
3073   $at_times_p && times >"$at_times_file"
3074 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3075 read at_status <"$at_status_file"
3076 #AT_STOP_11
3077 #AT_START_12
3078 at_fn_group_banner 12 'T-nest.at:21' \
3079   "nested file lists" "                              " 2
3080 at_xfail=no
3081       test -f $XFAILFILE && at_xfail=yes
3082 (
3083   $as_echo "12. $at_setup_line: testing $at_desc ..."
3084   $at_traceon
3085
3086
3087
3088
3089
3090   { set +x
3091 $as_echo "$at_srcdir/T-nest.at:24:
3092 mkdir ustar
3093 (cd ustar
3094 TEST_TAR_FORMAT=ustar
3095 export TEST_TAR_FORMAT
3096 TAR_OPTIONS=\"-H ustar\"
3097 export TAR_OPTIONS
3098 rm -rf *
3099
3100 >file1
3101 >file2
3102 >file3
3103 >file4
3104 cat >F1 <<'_ATEOF'
3105 file1
3106 -T F2
3107 file2
3108 _ATEOF
3109
3110 cat >F2 <<'_ATEOF'
3111 file3
3112 file4
3113 _ATEOF
3114
3115 tar cf archive -T F1
3116 tar tf archive
3117 )"
3118 at_fn_check_prepare_notrace 'an embedded newline' "T-nest.at:24"
3119 ( $at_check_trace;
3120 mkdir ustar
3121 (cd ustar
3122 TEST_TAR_FORMAT=ustar
3123 export TEST_TAR_FORMAT
3124 TAR_OPTIONS="-H ustar"
3125 export TAR_OPTIONS
3126 rm -rf *
3127
3128 >file1
3129 >file2
3130 >file3
3131 >file4
3132 cat >F1 <<'_ATEOF'
3133 file1
3134 -T F2
3135 file2
3136 _ATEOF
3137
3138 cat >F2 <<'_ATEOF'
3139 file3
3140 file4
3141 _ATEOF
3142
3143 tar cf archive -T F1
3144 tar tf archive
3145 )
3146 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3147 at_status=$? at_failed=false
3148 $at_check_filter
3149 at_fn_diff_devnull "$at_stderr" || at_failed=:
3150 echo >>"$at_stdout"; $as_echo "file1
3151 file3
3152 file4
3153 file2
3154 " | \
3155   $at_diff - "$at_stdout" || at_failed=:
3156 at_fn_check_status 0 $at_status "$at_srcdir/T-nest.at:24"
3157 $at_failed && at_fn_log_failure
3158 $at_traceon; }
3159
3160
3161
3162
3163   set +x
3164   $at_times_p && times >"$at_times_file"
3165 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3166 read at_status <"$at_status_file"
3167 #AT_STOP_12
3168 #AT_START_13
3169 at_fn_group_banner 13 'T-rec.at:21' \
3170   "recursive file lists" "                           " 2
3171 at_xfail=no
3172       test -f $XFAILFILE && at_xfail=yes
3173 (
3174   $as_echo "13. $at_setup_line: testing $at_desc ..."
3175   $at_traceon
3176
3177
3178
3179
3180
3181   { set +x
3182 $as_echo "$at_srcdir/T-rec.at:24:
3183 mkdir ustar
3184 (cd ustar
3185 TEST_TAR_FORMAT=ustar
3186 export TEST_TAR_FORMAT
3187 TAR_OPTIONS=\"-H ustar\"
3188 export TAR_OPTIONS
3189 rm -rf *
3190
3191 >file1
3192 >file2
3193 cat >F1 <<'_ATEOF'
3194 file1
3195 -T F2
3196 _ATEOF
3197
3198 cat >F2 <<'_ATEOF'
3199 file2
3200 -T F1
3201 _ATEOF
3202
3203 tar cf archive -T F1
3204 echo \$?
3205 tar tf archive
3206 )"
3207 at_fn_check_prepare_notrace 'an embedded newline' "T-rec.at:24"
3208 ( $at_check_trace;
3209 mkdir ustar
3210 (cd ustar
3211 TEST_TAR_FORMAT=ustar
3212 export TEST_TAR_FORMAT
3213 TAR_OPTIONS="-H ustar"
3214 export TAR_OPTIONS
3215 rm -rf *
3216
3217 >file1
3218 >file2
3219 cat >F1 <<'_ATEOF'
3220 file1
3221 -T F2
3222 _ATEOF
3223
3224 cat >F2 <<'_ATEOF'
3225 file2
3226 -T F1
3227 _ATEOF
3228
3229 tar cf archive -T F1
3230 echo $?
3231 tar tf archive
3232 )
3233 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3234 at_status=$? at_failed=false
3235 $at_check_filter
3236 echo >>"$at_stderr"; $as_echo "tar: F1: file list requested from F2 already read from command line
3237 tar: Exiting with failure status due to previous errors
3238 " | \
3239   $at_diff - "$at_stderr" || at_failed=:
3240 echo >>"$at_stdout"; $as_echo "2
3241 file1
3242 file2
3243 " | \
3244   $at_diff - "$at_stdout" || at_failed=:
3245 at_fn_check_status 0 $at_status "$at_srcdir/T-rec.at:24"
3246 $at_failed && at_fn_log_failure
3247 $at_traceon; }
3248
3249
3250
3251
3252   set +x
3253   $at_times_p && times >"$at_times_file"
3254 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3255 read at_status <"$at_status_file"
3256 #AT_STOP_13
3257 #AT_START_14
3258 at_fn_group_banner 14 'T-cd.at:21' \
3259   "-C in file lists" "                               " 2
3260 at_xfail=no
3261       test -f $XFAILFILE && at_xfail=yes
3262 (
3263   $as_echo "14. $at_setup_line: testing $at_desc ..."
3264   $at_traceon
3265
3266
3267
3268
3269
3270   { set +x
3271 $as_echo "$at_srcdir/T-cd.at:24:
3272 mkdir ustar
3273 (cd ustar
3274 TEST_TAR_FORMAT=ustar
3275 export TEST_TAR_FORMAT
3276 TAR_OPTIONS=\"-H ustar\"
3277 export TAR_OPTIONS
3278 rm -rf *
3279
3280
3281 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
3282
3283 >file1
3284 mkdir dir
3285 >dir/file2
3286 >dir/file3
3287 cat >F1 <<'_ATEOF'
3288 file1
3289 -C dir
3290 .
3291 _ATEOF
3292
3293 tar cf archive -T F1
3294 tar tf archive | sort
3295 )"
3296 at_fn_check_prepare_notrace 'a `...` command substitution' "T-cd.at:24"
3297 ( $at_check_trace;
3298 mkdir ustar
3299 (cd ustar
3300 TEST_TAR_FORMAT=ustar
3301 export TEST_TAR_FORMAT
3302 TAR_OPTIONS="-H ustar"
3303 export TAR_OPTIONS
3304 rm -rf *
3305
3306
3307 test -z "`sort < /dev/null 2>&1`" || exit 77
3308
3309 >file1
3310 mkdir dir
3311 >dir/file2
3312 >dir/file3
3313 cat >F1 <<'_ATEOF'
3314 file1
3315 -C dir
3316 .
3317 _ATEOF
3318
3319 tar cf archive -T F1
3320 tar tf archive | sort
3321 )
3322 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3323 at_status=$? at_failed=false
3324 $at_check_filter
3325 at_fn_diff_devnull "$at_stderr" || at_failed=:
3326 echo >>"$at_stdout"; $as_echo "./
3327 ./file2
3328 ./file3
3329 file1
3330 " | \
3331   $at_diff - "$at_stdout" || at_failed=:
3332 at_fn_check_status 0 $at_status "$at_srcdir/T-cd.at:24"
3333 $at_failed && at_fn_log_failure
3334 $at_traceon; }
3335
3336
3337
3338
3339   set +x
3340   $at_times_p && times >"$at_times_file"
3341 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3342 read at_status <"$at_status_file"
3343 #AT_STOP_14
3344 #AT_START_15
3345 at_fn_group_banner 15 'T-empty.at:26' \
3346   "empty entries" "                                  " 2
3347 at_xfail=no
3348       test -f $XFAILFILE && at_xfail=yes
3349 (
3350   $as_echo "15. $at_setup_line: testing $at_desc ..."
3351   $at_traceon
3352
3353
3354
3355 cat >file-list <<'_ATEOF'
3356 jeden
3357 dwa
3358
3359 trzy
3360 _ATEOF
3361
3362
3363
3364
3365   { set +x
3366 $as_echo "$at_srcdir/T-empty.at:36:
3367 mkdir ustar
3368 (cd ustar
3369 TEST_TAR_FORMAT=ustar
3370 export TEST_TAR_FORMAT
3371 TAR_OPTIONS=\"-H ustar\"
3372 export TAR_OPTIONS
3373 rm -rf *
3374
3375
3376 genfile --file jeden
3377 genfile --file dwa
3378 genfile --file trzy
3379
3380 tar cfvT archive ../file-list
3381 )"
3382 at_fn_check_prepare_notrace 'an embedded newline' "T-empty.at:36"
3383 ( $at_check_trace;
3384 mkdir ustar
3385 (cd ustar
3386 TEST_TAR_FORMAT=ustar
3387 export TEST_TAR_FORMAT
3388 TAR_OPTIONS="-H ustar"
3389 export TAR_OPTIONS
3390 rm -rf *
3391
3392
3393 genfile --file jeden
3394 genfile --file dwa
3395 genfile --file trzy
3396
3397 tar cfvT archive ../file-list
3398 )
3399 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3400 at_status=$? at_failed=false
3401 $at_check_filter
3402 at_fn_diff_devnull "$at_stderr" || at_failed=:
3403 echo >>"$at_stdout"; $as_echo "jeden
3404 dwa
3405 trzy
3406 " | \
3407   $at_diff - "$at_stdout" || at_failed=:
3408 at_fn_check_status 0 $at_status "$at_srcdir/T-empty.at:36"
3409 $at_failed && at_fn_log_failure
3410 $at_traceon; }
3411
3412
3413  # Testing one format is enough
3414
3415   set +x
3416   $at_times_p && times >"$at_times_file"
3417 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3418 read at_status <"$at_status_file"
3419 #AT_STOP_15
3420 #AT_START_16
3421 at_fn_group_banner 16 'T-null.at:21' \
3422   "0-separated file without -0" "                    " 2
3423 at_xfail=no
3424       test -f $XFAILFILE && at_xfail=yes
3425 (
3426   $as_echo "16. $at_setup_line: testing $at_desc ..."
3427   $at_traceon
3428
3429
3430
3431
3432
3433   { set +x
3434 $as_echo "$at_srcdir/T-null.at:24:
3435 mkdir ustar
3436 (cd ustar
3437 TEST_TAR_FORMAT=ustar
3438 export TEST_TAR_FORMAT
3439 TAR_OPTIONS=\"-H ustar\"
3440 export TAR_OPTIONS
3441 rm -rf *
3442
3443
3444 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
3445
3446
3447 echo jeden > temp
3448 echo dwa >> temp
3449 echo trzy >> temp
3450 cat temp | tr '\\n' '\\0' > file-list
3451
3452 genfile -f jeden
3453 genfile -f dwa
3454 genfile -f trzy
3455
3456 tar cfTv archive file-list
3457 )"
3458 at_fn_check_prepare_notrace 'a `...` command substitution' "T-null.at:24"
3459 ( $at_check_trace;
3460 mkdir ustar
3461 (cd ustar
3462 TEST_TAR_FORMAT=ustar
3463 export TEST_TAR_FORMAT
3464 TAR_OPTIONS="-H ustar"
3465 export TAR_OPTIONS
3466 rm -rf *
3467
3468
3469 test -z "`sort < /dev/null 2>&1`" || exit 77
3470
3471
3472 echo jeden > temp
3473 echo dwa >> temp
3474 echo trzy >> temp
3475 cat temp | tr '\n' '\0' > file-list
3476
3477 genfile -f jeden
3478 genfile -f dwa
3479 genfile -f trzy
3480
3481 tar cfTv archive file-list
3482 )
3483 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3484 at_status=$? at_failed=false
3485 $at_check_filter
3486 echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character
3487 " | \
3488   $at_diff - "$at_stderr" || at_failed=:
3489 echo >>"$at_stdout"; $as_echo "jeden
3490 dwa
3491 trzy
3492 " | \
3493   $at_diff - "$at_stdout" || at_failed=:
3494 at_fn_check_status 0 $at_status "$at_srcdir/T-null.at:24"
3495 $at_failed && at_fn_log_failure
3496 $at_traceon; }
3497
3498
3499  # Testing one format is enough
3500
3501   set +x
3502   $at_times_p && times >"$at_times_file"
3503 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3504 read at_status <"$at_status_file"
3505 #AT_STOP_16
3506 #AT_START_17
3507 at_fn_group_banner 17 'T-zfile.at:26' \
3508   "empty file" "                                     " 2
3509 at_xfail=no
3510       test -f $XFAILFILE && at_xfail=yes
3511 (
3512   $as_echo "17. $at_setup_line: testing $at_desc ..."
3513   $at_traceon
3514
3515
3516
3517
3518
3519   { set +x
3520 $as_echo "$at_srcdir/T-zfile.at:29:
3521 mkdir ustar
3522 (cd ustar
3523 TEST_TAR_FORMAT=ustar
3524 export TEST_TAR_FORMAT
3525 TAR_OPTIONS=\"-H ustar\"
3526 export TAR_OPTIONS
3527 rm -rf *
3528
3529 genfile --length=0 --file empty
3530 genfile --file a
3531 genfile --file b
3532 cat >valid <<'_ATEOF'
3533 a
3534 b
3535 _ATEOF
3536
3537
3538 tar cf archive -T empty -T valid
3539 tar tf archive
3540 echo \"==\"
3541 tar cf archive -T valid -T empty
3542 tar tf archive
3543 )"
3544 at_fn_check_prepare_notrace 'an embedded newline' "T-zfile.at:29"
3545 ( $at_check_trace;
3546 mkdir ustar
3547 (cd ustar
3548 TEST_TAR_FORMAT=ustar
3549 export TEST_TAR_FORMAT
3550 TAR_OPTIONS="-H ustar"
3551 export TAR_OPTIONS
3552 rm -rf *
3553
3554 genfile --length=0 --file empty
3555 genfile --file a
3556 genfile --file b
3557 cat >valid <<'_ATEOF'
3558 a
3559 b
3560 _ATEOF
3561
3562
3563 tar cf archive -T empty -T valid
3564 tar tf archive
3565 echo "=="
3566 tar cf archive -T valid -T empty
3567 tar tf archive
3568 )
3569 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3570 at_status=$? at_failed=false
3571 $at_check_filter
3572 at_fn_diff_devnull "$at_stderr" || at_failed=:
3573 echo >>"$at_stdout"; $as_echo "a
3574 b
3575 ==
3576 a
3577 b
3578 " | \
3579   $at_diff - "$at_stdout" || at_failed=:
3580 at_fn_check_status 0 $at_status "$at_srcdir/T-zfile.at:29"
3581 $at_failed && at_fn_log_failure
3582 $at_traceon; }
3583
3584
3585  # Testing one format is enough
3586
3587   set +x
3588   $at_times_p && times >"$at_times_file"
3589 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3590 read at_status <"$at_status_file"
3591 #AT_STOP_17
3592 #AT_START_18
3593 at_fn_group_banner 18 'T-nonl.at:27' \
3594   "entries with missing newlines" "                  " 2
3595 at_xfail=no
3596       test -f $XFAILFILE && at_xfail=yes
3597 (
3598   $as_echo "18. $at_setup_line: testing $at_desc ..."
3599   $at_traceon
3600
3601
3602
3603
3604
3605   { set +x
3606 $as_echo "$at_srcdir/T-nonl.at:30:
3607 mkdir ustar
3608 (cd ustar
3609 TEST_TAR_FORMAT=ustar
3610 export TEST_TAR_FORMAT
3611 TAR_OPTIONS=\"-H ustar\"
3612 export TAR_OPTIONS
3613 rm -rf *
3614
3615 genfile --length=0 --file empty
3616 \$as_echo_n c > 1.nonl
3617 echo d > 2.nonl
3618 \$as_echo_n e >> 2.nonl
3619 touch a b c d e
3620 cat >filelist <<'_ATEOF'
3621 a
3622 b
3623 _ATEOF
3624
3625
3626 tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
3627 tar tf archive
3628 echo ==
3629 tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
3630 tar tf archive
3631 )"
3632 at_fn_check_prepare_notrace 'an embedded newline' "T-nonl.at:30"
3633 ( $at_check_trace;
3634 mkdir ustar
3635 (cd ustar
3636 TEST_TAR_FORMAT=ustar
3637 export TEST_TAR_FORMAT
3638 TAR_OPTIONS="-H ustar"
3639 export TAR_OPTIONS
3640 rm -rf *
3641
3642 genfile --length=0 --file empty
3643 $as_echo_n c > 1.nonl
3644 echo d > 2.nonl
3645 $as_echo_n e >> 2.nonl
3646 touch a b c d e
3647 cat >filelist <<'_ATEOF'
3648 a
3649 b
3650 _ATEOF
3651
3652
3653 tar cf archive -T empty -T 1.nonl -T 2.nonl -T filelist
3654 tar tf archive
3655 echo ==
3656 tar cf archive -T 2.nonl -T empty -T filelist -T 1.nonl
3657 tar tf archive
3658 )
3659 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3660 at_status=$? at_failed=false
3661 $at_check_filter
3662 at_fn_diff_devnull "$at_stderr" || at_failed=:
3663 echo >>"$at_stdout"; $as_echo "c
3664 d
3665 e
3666 a
3667 b
3668 ==
3669 d
3670 e
3671 a
3672 b
3673 c
3674 " | \
3675   $at_diff - "$at_stdout" || at_failed=:
3676 at_fn_check_status 0 $at_status "$at_srcdir/T-nonl.at:30"
3677 $at_failed && at_fn_log_failure
3678 $at_traceon; }
3679
3680
3681
3682
3683   set +x
3684   $at_times_p && times >"$at_times_file"
3685 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3686 read at_status <"$at_status_file"
3687 #AT_STOP_18
3688 #AT_START_19
3689 at_fn_group_banner 19 'indexfile.at:26' \
3690   "tar --index-file=FILE --file=-" "                 " 3
3691 at_xfail=no
3692       test -f $XFAILFILE && at_xfail=yes
3693 (
3694   $as_echo "19. $at_setup_line: testing $at_desc ..."
3695   $at_traceon
3696
3697
3698
3699
3700
3701   { set +x
3702 $as_echo "$at_srcdir/indexfile.at:29:
3703 mkdir v7
3704 (cd v7
3705 TEST_TAR_FORMAT=v7
3706 export TEST_TAR_FORMAT
3707 TAR_OPTIONS=\"-H v7\"
3708 export TAR_OPTIONS
3709 rm -rf *
3710
3711
3712 mkdir directory
3713 genfile --file=directory/a --length=1035
3714
3715 echo \"Creating the archive\"
3716 tar -c -v -f - --index-file=idx directory > archive
3717
3718 echo \"Testing the archive\"
3719 tar -tf archive
3720 )"
3721 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3722 ( $at_check_trace;
3723 mkdir v7
3724 (cd v7
3725 TEST_TAR_FORMAT=v7
3726 export TEST_TAR_FORMAT
3727 TAR_OPTIONS="-H v7"
3728 export TAR_OPTIONS
3729 rm -rf *
3730
3731
3732 mkdir directory
3733 genfile --file=directory/a --length=1035
3734
3735 echo "Creating the archive"
3736 tar -c -v -f - --index-file=idx directory > archive
3737
3738 echo "Testing the archive"
3739 tar -tf archive
3740 )
3741 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3742 at_status=$? at_failed=false
3743 $at_check_filter
3744 at_fn_diff_devnull "$at_stderr" || at_failed=:
3745 echo >>"$at_stdout"; $as_echo "Creating the archive
3746 Testing the archive
3747 directory/
3748 directory/a
3749 " | \
3750   $at_diff - "$at_stdout" || at_failed=:
3751 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3752 $at_failed && at_fn_log_failure
3753 $at_traceon; }
3754
3755               { set +x
3756 $as_echo "$at_srcdir/indexfile.at:29:
3757 mkdir oldgnu
3758 (cd oldgnu
3759 TEST_TAR_FORMAT=oldgnu
3760 export TEST_TAR_FORMAT
3761 TAR_OPTIONS=\"-H oldgnu\"
3762 export TAR_OPTIONS
3763 rm -rf *
3764
3765
3766 mkdir directory
3767 genfile --file=directory/a --length=1035
3768
3769 echo \"Creating the archive\"
3770 tar -c -v -f - --index-file=idx directory > archive
3771
3772 echo \"Testing the archive\"
3773 tar -tf archive
3774 )"
3775 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3776 ( $at_check_trace;
3777 mkdir oldgnu
3778 (cd oldgnu
3779 TEST_TAR_FORMAT=oldgnu
3780 export TEST_TAR_FORMAT
3781 TAR_OPTIONS="-H oldgnu"
3782 export TAR_OPTIONS
3783 rm -rf *
3784
3785
3786 mkdir directory
3787 genfile --file=directory/a --length=1035
3788
3789 echo "Creating the archive"
3790 tar -c -v -f - --index-file=idx directory > archive
3791
3792 echo "Testing the archive"
3793 tar -tf archive
3794 )
3795 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3796 at_status=$? at_failed=false
3797 $at_check_filter
3798 at_fn_diff_devnull "$at_stderr" || at_failed=:
3799 echo >>"$at_stdout"; $as_echo "Creating the archive
3800 Testing the archive
3801 directory/
3802 directory/a
3803 " | \
3804   $at_diff - "$at_stdout" || at_failed=:
3805 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3806 $at_failed && at_fn_log_failure
3807 $at_traceon; }
3808
3809               { set +x
3810 $as_echo "$at_srcdir/indexfile.at:29:
3811 mkdir ustar
3812 (cd ustar
3813 TEST_TAR_FORMAT=ustar
3814 export TEST_TAR_FORMAT
3815 TAR_OPTIONS=\"-H ustar\"
3816 export TAR_OPTIONS
3817 rm -rf *
3818
3819
3820 mkdir directory
3821 genfile --file=directory/a --length=1035
3822
3823 echo \"Creating the archive\"
3824 tar -c -v -f - --index-file=idx directory > archive
3825
3826 echo \"Testing the archive\"
3827 tar -tf archive
3828 )"
3829 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3830 ( $at_check_trace;
3831 mkdir ustar
3832 (cd ustar
3833 TEST_TAR_FORMAT=ustar
3834 export TEST_TAR_FORMAT
3835 TAR_OPTIONS="-H ustar"
3836 export TAR_OPTIONS
3837 rm -rf *
3838
3839
3840 mkdir directory
3841 genfile --file=directory/a --length=1035
3842
3843 echo "Creating the archive"
3844 tar -c -v -f - --index-file=idx directory > archive
3845
3846 echo "Testing the archive"
3847 tar -tf archive
3848 )
3849 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3850 at_status=$? at_failed=false
3851 $at_check_filter
3852 at_fn_diff_devnull "$at_stderr" || at_failed=:
3853 echo >>"$at_stdout"; $as_echo "Creating the archive
3854 Testing the archive
3855 directory/
3856 directory/a
3857 " | \
3858   $at_diff - "$at_stdout" || at_failed=:
3859 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3860 $at_failed && at_fn_log_failure
3861 $at_traceon; }
3862
3863               { set +x
3864 $as_echo "$at_srcdir/indexfile.at:29:
3865 mkdir posix
3866 (cd posix
3867 TEST_TAR_FORMAT=posix
3868 export TEST_TAR_FORMAT
3869 TAR_OPTIONS=\"-H posix\"
3870 export TAR_OPTIONS
3871 rm -rf *
3872
3873
3874 mkdir directory
3875 genfile --file=directory/a --length=1035
3876
3877 echo \"Creating the archive\"
3878 tar -c -v -f - --index-file=idx directory > archive
3879
3880 echo \"Testing the archive\"
3881 tar -tf archive
3882 )"
3883 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3884 ( $at_check_trace;
3885 mkdir posix
3886 (cd posix
3887 TEST_TAR_FORMAT=posix
3888 export TEST_TAR_FORMAT
3889 TAR_OPTIONS="-H posix"
3890 export TAR_OPTIONS
3891 rm -rf *
3892
3893
3894 mkdir directory
3895 genfile --file=directory/a --length=1035
3896
3897 echo "Creating the archive"
3898 tar -c -v -f - --index-file=idx directory > archive
3899
3900 echo "Testing the archive"
3901 tar -tf archive
3902 )
3903 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3904 at_status=$? at_failed=false
3905 $at_check_filter
3906 at_fn_diff_devnull "$at_stderr" || at_failed=:
3907 echo >>"$at_stdout"; $as_echo "Creating the archive
3908 Testing the archive
3909 directory/
3910 directory/a
3911 " | \
3912   $at_diff - "$at_stdout" || at_failed=:
3913 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3914 $at_failed && at_fn_log_failure
3915 $at_traceon; }
3916
3917               { set +x
3918 $as_echo "$at_srcdir/indexfile.at:29:
3919 mkdir gnu
3920 (cd gnu
3921 TEST_TAR_FORMAT=gnu
3922 export TEST_TAR_FORMAT
3923 TAR_OPTIONS=\"-H gnu\"
3924 export TAR_OPTIONS
3925 rm -rf *
3926
3927
3928 mkdir directory
3929 genfile --file=directory/a --length=1035
3930
3931 echo \"Creating the archive\"
3932 tar -c -v -f - --index-file=idx directory > archive
3933
3934 echo \"Testing the archive\"
3935 tar -tf archive
3936 )"
3937 at_fn_check_prepare_notrace 'an embedded newline' "indexfile.at:29"
3938 ( $at_check_trace;
3939 mkdir gnu
3940 (cd gnu
3941 TEST_TAR_FORMAT=gnu
3942 export TEST_TAR_FORMAT
3943 TAR_OPTIONS="-H gnu"
3944 export TAR_OPTIONS
3945 rm -rf *
3946
3947
3948 mkdir directory
3949 genfile --file=directory/a --length=1035
3950
3951 echo "Creating the archive"
3952 tar -c -v -f - --index-file=idx directory > archive
3953
3954 echo "Testing the archive"
3955 tar -tf archive
3956 )
3957 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
3958 at_status=$? at_failed=false
3959 $at_check_filter
3960 at_fn_diff_devnull "$at_stderr" || at_failed=:
3961 echo >>"$at_stdout"; $as_echo "Creating the archive
3962 Testing the archive
3963 directory/
3964 directory/a
3965 " | \
3966   $at_diff - "$at_stdout" || at_failed=:
3967 at_fn_check_status 0 $at_status "$at_srcdir/indexfile.at:29"
3968 $at_failed && at_fn_log_failure
3969 $at_traceon; }
3970
3971
3972
3973
3974   set +x
3975   $at_times_p && times >"$at_times_file"
3976 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
3977 read at_status <"$at_status_file"
3978 #AT_STOP_19
3979 #AT_START_20
3980 at_fn_group_banner 20 'verbose.at:26' \
3981   "tar cvf -" "                                      " 3
3982 at_xfail=no
3983       test -f $XFAILFILE && at_xfail=yes
3984 (
3985   $as_echo "20. $at_setup_line: testing $at_desc ..."
3986   $at_traceon
3987
3988
3989
3990
3991
3992   { set +x
3993 $as_echo "$at_srcdir/verbose.at:29:
3994 mkdir v7
3995 (cd v7
3996 TEST_TAR_FORMAT=v7
3997 export TEST_TAR_FORMAT
3998 TAR_OPTIONS=\"-H v7\"
3999 export TAR_OPTIONS
4000 rm -rf *
4001
4002 genfile --file file --length 10240
4003 echo Creating the archive
4004 tar cvf - file > archive
4005 echo Testing the archive
4006 tar tf archive
4007 )"
4008 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4009 ( $at_check_trace;
4010 mkdir v7
4011 (cd v7
4012 TEST_TAR_FORMAT=v7
4013 export TEST_TAR_FORMAT
4014 TAR_OPTIONS="-H v7"
4015 export TAR_OPTIONS
4016 rm -rf *
4017
4018 genfile --file file --length 10240
4019 echo Creating the archive
4020 tar cvf - file > archive
4021 echo Testing the archive
4022 tar tf archive
4023 )
4024 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4025 at_status=$? at_failed=false
4026 $at_check_filter
4027 echo >>"$at_stderr"; $as_echo "file
4028 " | \
4029   $at_diff - "$at_stderr" || at_failed=:
4030 echo >>"$at_stdout"; $as_echo "Creating the archive
4031 Testing the archive
4032 file
4033 " | \
4034   $at_diff - "$at_stdout" || at_failed=:
4035 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4036 $at_failed && at_fn_log_failure
4037 $at_traceon; }
4038
4039               { set +x
4040 $as_echo "$at_srcdir/verbose.at:29:
4041 mkdir oldgnu
4042 (cd oldgnu
4043 TEST_TAR_FORMAT=oldgnu
4044 export TEST_TAR_FORMAT
4045 TAR_OPTIONS=\"-H oldgnu\"
4046 export TAR_OPTIONS
4047 rm -rf *
4048
4049 genfile --file file --length 10240
4050 echo Creating the archive
4051 tar cvf - file > archive
4052 echo Testing the archive
4053 tar tf archive
4054 )"
4055 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4056 ( $at_check_trace;
4057 mkdir oldgnu
4058 (cd oldgnu
4059 TEST_TAR_FORMAT=oldgnu
4060 export TEST_TAR_FORMAT
4061 TAR_OPTIONS="-H oldgnu"
4062 export TAR_OPTIONS
4063 rm -rf *
4064
4065 genfile --file file --length 10240
4066 echo Creating the archive
4067 tar cvf - file > archive
4068 echo Testing the archive
4069 tar tf archive
4070 )
4071 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4072 at_status=$? at_failed=false
4073 $at_check_filter
4074 echo >>"$at_stderr"; $as_echo "file
4075 " | \
4076   $at_diff - "$at_stderr" || at_failed=:
4077 echo >>"$at_stdout"; $as_echo "Creating the archive
4078 Testing the archive
4079 file
4080 " | \
4081   $at_diff - "$at_stdout" || at_failed=:
4082 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4083 $at_failed && at_fn_log_failure
4084 $at_traceon; }
4085
4086               { set +x
4087 $as_echo "$at_srcdir/verbose.at:29:
4088 mkdir ustar
4089 (cd ustar
4090 TEST_TAR_FORMAT=ustar
4091 export TEST_TAR_FORMAT
4092 TAR_OPTIONS=\"-H ustar\"
4093 export TAR_OPTIONS
4094 rm -rf *
4095
4096 genfile --file file --length 10240
4097 echo Creating the archive
4098 tar cvf - file > archive
4099 echo Testing the archive
4100 tar tf archive
4101 )"
4102 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4103 ( $at_check_trace;
4104 mkdir ustar
4105 (cd ustar
4106 TEST_TAR_FORMAT=ustar
4107 export TEST_TAR_FORMAT
4108 TAR_OPTIONS="-H ustar"
4109 export TAR_OPTIONS
4110 rm -rf *
4111
4112 genfile --file file --length 10240
4113 echo Creating the archive
4114 tar cvf - file > archive
4115 echo Testing the archive
4116 tar tf archive
4117 )
4118 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4119 at_status=$? at_failed=false
4120 $at_check_filter
4121 echo >>"$at_stderr"; $as_echo "file
4122 " | \
4123   $at_diff - "$at_stderr" || at_failed=:
4124 echo >>"$at_stdout"; $as_echo "Creating the archive
4125 Testing the archive
4126 file
4127 " | \
4128   $at_diff - "$at_stdout" || at_failed=:
4129 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4130 $at_failed && at_fn_log_failure
4131 $at_traceon; }
4132
4133               { set +x
4134 $as_echo "$at_srcdir/verbose.at:29:
4135 mkdir posix
4136 (cd posix
4137 TEST_TAR_FORMAT=posix
4138 export TEST_TAR_FORMAT
4139 TAR_OPTIONS=\"-H posix\"
4140 export TAR_OPTIONS
4141 rm -rf *
4142
4143 genfile --file file --length 10240
4144 echo Creating the archive
4145 tar cvf - file > archive
4146 echo Testing the archive
4147 tar tf archive
4148 )"
4149 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4150 ( $at_check_trace;
4151 mkdir posix
4152 (cd posix
4153 TEST_TAR_FORMAT=posix
4154 export TEST_TAR_FORMAT
4155 TAR_OPTIONS="-H posix"
4156 export TAR_OPTIONS
4157 rm -rf *
4158
4159 genfile --file file --length 10240
4160 echo Creating the archive
4161 tar cvf - file > archive
4162 echo Testing the archive
4163 tar tf archive
4164 )
4165 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4166 at_status=$? at_failed=false
4167 $at_check_filter
4168 echo >>"$at_stderr"; $as_echo "file
4169 " | \
4170   $at_diff - "$at_stderr" || at_failed=:
4171 echo >>"$at_stdout"; $as_echo "Creating the archive
4172 Testing the archive
4173 file
4174 " | \
4175   $at_diff - "$at_stdout" || at_failed=:
4176 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4177 $at_failed && at_fn_log_failure
4178 $at_traceon; }
4179
4180               { set +x
4181 $as_echo "$at_srcdir/verbose.at:29:
4182 mkdir gnu
4183 (cd gnu
4184 TEST_TAR_FORMAT=gnu
4185 export TEST_TAR_FORMAT
4186 TAR_OPTIONS=\"-H gnu\"
4187 export TAR_OPTIONS
4188 rm -rf *
4189
4190 genfile --file file --length 10240
4191 echo Creating the archive
4192 tar cvf - file > archive
4193 echo Testing the archive
4194 tar tf archive
4195 )"
4196 at_fn_check_prepare_notrace 'an embedded newline' "verbose.at:29"
4197 ( $at_check_trace;
4198 mkdir gnu
4199 (cd gnu
4200 TEST_TAR_FORMAT=gnu
4201 export TEST_TAR_FORMAT
4202 TAR_OPTIONS="-H gnu"
4203 export TAR_OPTIONS
4204 rm -rf *
4205
4206 genfile --file file --length 10240
4207 echo Creating the archive
4208 tar cvf - file > archive
4209 echo Testing the archive
4210 tar tf archive
4211 )
4212 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4213 at_status=$? at_failed=false
4214 $at_check_filter
4215 echo >>"$at_stderr"; $as_echo "file
4216 " | \
4217   $at_diff - "$at_stderr" || at_failed=:
4218 echo >>"$at_stdout"; $as_echo "Creating the archive
4219 Testing the archive
4220 file
4221 " | \
4222   $at_diff - "$at_stdout" || at_failed=:
4223 at_fn_check_status 0 $at_status "$at_srcdir/verbose.at:29"
4224 $at_failed && at_fn_log_failure
4225 $at_traceon; }
4226
4227
4228
4229
4230   set +x
4231   $at_times_p && times >"$at_times_file"
4232 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4233 read at_status <"$at_status_file"
4234 #AT_STOP_20
4235 #AT_START_21
4236 at_fn_group_banner 21 'gzip.at:24' \
4237   "gzip" "                                           " 3
4238 at_xfail=no
4239 (
4240   $as_echo "21. $at_setup_line: testing $at_desc ..."
4241   $at_traceon
4242
4243
4244
4245 unset TAR_OPTIONS
4246
4247 { set +x
4248 $as_echo "$at_srcdir/gzip.at:29:
4249
4250 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
4251
4252 tar xfvz /dev/null 2>err
4253 RC=\$?
4254 sed -n '/^tar:/p' err >&2
4255 exit \$RC
4256 "
4257 at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:29"
4258 ( $at_check_trace;
4259
4260 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
4261
4262 tar xfvz /dev/null 2>err
4263 RC=$?
4264 sed -n '/^tar:/p' err >&2
4265 exit $RC
4266
4267 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4268 at_status=$? at_failed=false
4269 $at_check_filter
4270 echo >>"$at_stderr"; $as_echo "tar: Child returned status 1
4271 tar: Error is not recoverable: exiting now
4272 " | \
4273   $at_diff - "$at_stderr" || at_failed=:
4274 at_fn_diff_devnull "$at_stdout" || at_failed=:
4275 at_fn_check_status 2 $at_status "$at_srcdir/gzip.at:29"
4276 $at_failed && at_fn_log_failure
4277 $at_traceon; }
4278
4279
4280   set +x
4281   $at_times_p && times >"$at_times_file"
4282 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4283 read at_status <"$at_status_file"
4284 #AT_STOP_21
4285 #AT_START_22
4286 at_fn_group_banner 22 'recurse.at:21' \
4287   "recurse" "                                        " 3
4288 at_xfail=no
4289       test -f $XFAILFILE && at_xfail=yes
4290 (
4291   $as_echo "22. $at_setup_line: testing $at_desc ..."
4292   $at_traceon
4293
4294
4295
4296
4297
4298   { set +x
4299 $as_echo "$at_srcdir/recurse.at:24:
4300 mkdir v7
4301 (cd v7
4302 TEST_TAR_FORMAT=v7
4303 export TEST_TAR_FORMAT
4304 TAR_OPTIONS=\"-H v7\"
4305 export TAR_OPTIONS
4306 rm -rf *
4307
4308 mkdir directory
4309 touch directory/file
4310 tar --create --file archive --no-recursion directory || exit 1
4311 tar tf archive
4312 )"
4313 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4314 ( $at_check_trace;
4315 mkdir v7
4316 (cd v7
4317 TEST_TAR_FORMAT=v7
4318 export TEST_TAR_FORMAT
4319 TAR_OPTIONS="-H v7"
4320 export TAR_OPTIONS
4321 rm -rf *
4322
4323 mkdir directory
4324 touch directory/file
4325 tar --create --file archive --no-recursion directory || exit 1
4326 tar tf archive
4327 )
4328 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4329 at_status=$? at_failed=false
4330 $at_check_filter
4331 at_fn_diff_devnull "$at_stderr" || at_failed=:
4332 echo >>"$at_stdout"; $as_echo "directory/
4333 " | \
4334   $at_diff - "$at_stdout" || at_failed=:
4335 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4336 $at_failed && at_fn_log_failure
4337 $at_traceon; }
4338
4339               { set +x
4340 $as_echo "$at_srcdir/recurse.at:24:
4341 mkdir oldgnu
4342 (cd oldgnu
4343 TEST_TAR_FORMAT=oldgnu
4344 export TEST_TAR_FORMAT
4345 TAR_OPTIONS=\"-H oldgnu\"
4346 export TAR_OPTIONS
4347 rm -rf *
4348
4349 mkdir directory
4350 touch directory/file
4351 tar --create --file archive --no-recursion directory || exit 1
4352 tar tf archive
4353 )"
4354 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4355 ( $at_check_trace;
4356 mkdir oldgnu
4357 (cd oldgnu
4358 TEST_TAR_FORMAT=oldgnu
4359 export TEST_TAR_FORMAT
4360 TAR_OPTIONS="-H oldgnu"
4361 export TAR_OPTIONS
4362 rm -rf *
4363
4364 mkdir directory
4365 touch directory/file
4366 tar --create --file archive --no-recursion directory || exit 1
4367 tar tf archive
4368 )
4369 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4370 at_status=$? at_failed=false
4371 $at_check_filter
4372 at_fn_diff_devnull "$at_stderr" || at_failed=:
4373 echo >>"$at_stdout"; $as_echo "directory/
4374 " | \
4375   $at_diff - "$at_stdout" || at_failed=:
4376 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4377 $at_failed && at_fn_log_failure
4378 $at_traceon; }
4379
4380               { set +x
4381 $as_echo "$at_srcdir/recurse.at:24:
4382 mkdir ustar
4383 (cd ustar
4384 TEST_TAR_FORMAT=ustar
4385 export TEST_TAR_FORMAT
4386 TAR_OPTIONS=\"-H ustar\"
4387 export TAR_OPTIONS
4388 rm -rf *
4389
4390 mkdir directory
4391 touch directory/file
4392 tar --create --file archive --no-recursion directory || exit 1
4393 tar tf archive
4394 )"
4395 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4396 ( $at_check_trace;
4397 mkdir ustar
4398 (cd ustar
4399 TEST_TAR_FORMAT=ustar
4400 export TEST_TAR_FORMAT
4401 TAR_OPTIONS="-H ustar"
4402 export TAR_OPTIONS
4403 rm -rf *
4404
4405 mkdir directory
4406 touch directory/file
4407 tar --create --file archive --no-recursion directory || exit 1
4408 tar tf archive
4409 )
4410 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4411 at_status=$? at_failed=false
4412 $at_check_filter
4413 at_fn_diff_devnull "$at_stderr" || at_failed=:
4414 echo >>"$at_stdout"; $as_echo "directory/
4415 " | \
4416   $at_diff - "$at_stdout" || at_failed=:
4417 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4418 $at_failed && at_fn_log_failure
4419 $at_traceon; }
4420
4421               { set +x
4422 $as_echo "$at_srcdir/recurse.at:24:
4423 mkdir posix
4424 (cd posix
4425 TEST_TAR_FORMAT=posix
4426 export TEST_TAR_FORMAT
4427 TAR_OPTIONS=\"-H posix\"
4428 export TAR_OPTIONS
4429 rm -rf *
4430
4431 mkdir directory
4432 touch directory/file
4433 tar --create --file archive --no-recursion directory || exit 1
4434 tar tf archive
4435 )"
4436 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4437 ( $at_check_trace;
4438 mkdir posix
4439 (cd posix
4440 TEST_TAR_FORMAT=posix
4441 export TEST_TAR_FORMAT
4442 TAR_OPTIONS="-H posix"
4443 export TAR_OPTIONS
4444 rm -rf *
4445
4446 mkdir directory
4447 touch directory/file
4448 tar --create --file archive --no-recursion directory || exit 1
4449 tar tf archive
4450 )
4451 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4452 at_status=$? at_failed=false
4453 $at_check_filter
4454 at_fn_diff_devnull "$at_stderr" || at_failed=:
4455 echo >>"$at_stdout"; $as_echo "directory/
4456 " | \
4457   $at_diff - "$at_stdout" || at_failed=:
4458 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4459 $at_failed && at_fn_log_failure
4460 $at_traceon; }
4461
4462               { set +x
4463 $as_echo "$at_srcdir/recurse.at:24:
4464 mkdir gnu
4465 (cd gnu
4466 TEST_TAR_FORMAT=gnu
4467 export TEST_TAR_FORMAT
4468 TAR_OPTIONS=\"-H gnu\"
4469 export TAR_OPTIONS
4470 rm -rf *
4471
4472 mkdir directory
4473 touch directory/file
4474 tar --create --file archive --no-recursion directory || exit 1
4475 tar tf archive
4476 )"
4477 at_fn_check_prepare_notrace 'an embedded newline' "recurse.at:24"
4478 ( $at_check_trace;
4479 mkdir gnu
4480 (cd gnu
4481 TEST_TAR_FORMAT=gnu
4482 export TEST_TAR_FORMAT
4483 TAR_OPTIONS="-H gnu"
4484 export TAR_OPTIONS
4485 rm -rf *
4486
4487 mkdir directory
4488 touch directory/file
4489 tar --create --file archive --no-recursion directory || exit 1
4490 tar tf archive
4491 )
4492 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4493 at_status=$? at_failed=false
4494 $at_check_filter
4495 at_fn_diff_devnull "$at_stderr" || at_failed=:
4496 echo >>"$at_stdout"; $as_echo "directory/
4497 " | \
4498   $at_diff - "$at_stdout" || at_failed=:
4499 at_fn_check_status 0 $at_status "$at_srcdir/recurse.at:24"
4500 $at_failed && at_fn_log_failure
4501 $at_traceon; }
4502
4503
4504
4505
4506   set +x
4507   $at_times_p && times >"$at_times_file"
4508 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4509 read at_status <"$at_status_file"
4510 #AT_STOP_22
4511 #AT_START_23
4512 at_fn_group_banner 23 'recurs02.at:30' \
4513   "recurse: toggle" "                                " 3
4514 at_xfail=no
4515       test -f $XFAILFILE && at_xfail=yes
4516 (
4517   $as_echo "23. $at_setup_line: testing $at_desc ..."
4518   $at_traceon
4519
4520
4521
4522
4523
4524   { set +x
4525 $as_echo "$at_srcdir/recurs02.at:33:
4526 mkdir v7
4527 (cd v7
4528 TEST_TAR_FORMAT=v7
4529 export TEST_TAR_FORMAT
4530 TAR_OPTIONS=\"-H v7\"
4531 export TAR_OPTIONS
4532 rm -rf *
4533
4534 mkdir directory1 directory2
4535 touch directory1/file directory2/file
4536 tar --create --file archive \\
4537     --no-recursion directory1 \\
4538     --recursion directory2 || exit 1
4539 tar tf archive
4540 )"
4541 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
4542 ( $at_check_trace;
4543 mkdir v7
4544 (cd v7
4545 TEST_TAR_FORMAT=v7
4546 export TEST_TAR_FORMAT
4547 TAR_OPTIONS="-H v7"
4548 export TAR_OPTIONS
4549 rm -rf *
4550
4551 mkdir directory1 directory2
4552 touch directory1/file directory2/file
4553 tar --create --file archive \
4554     --no-recursion directory1 \
4555     --recursion directory2 || exit 1
4556 tar tf archive
4557 )
4558 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4559 at_status=$? at_failed=false
4560 $at_check_filter
4561 at_fn_diff_devnull "$at_stderr" || at_failed=:
4562 echo >>"$at_stdout"; $as_echo "directory1/
4563 directory2/
4564 directory2/file
4565 " | \
4566   $at_diff - "$at_stdout" || at_failed=:
4567 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
4568 $at_failed && at_fn_log_failure
4569 $at_traceon; }
4570
4571               { set +x
4572 $as_echo "$at_srcdir/recurs02.at:33:
4573 mkdir oldgnu
4574 (cd oldgnu
4575 TEST_TAR_FORMAT=oldgnu
4576 export TEST_TAR_FORMAT
4577 TAR_OPTIONS=\"-H oldgnu\"
4578 export TAR_OPTIONS
4579 rm -rf *
4580
4581 mkdir directory1 directory2
4582 touch directory1/file directory2/file
4583 tar --create --file archive \\
4584     --no-recursion directory1 \\
4585     --recursion directory2 || exit 1
4586 tar tf archive
4587 )"
4588 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
4589 ( $at_check_trace;
4590 mkdir oldgnu
4591 (cd oldgnu
4592 TEST_TAR_FORMAT=oldgnu
4593 export TEST_TAR_FORMAT
4594 TAR_OPTIONS="-H oldgnu"
4595 export TAR_OPTIONS
4596 rm -rf *
4597
4598 mkdir directory1 directory2
4599 touch directory1/file directory2/file
4600 tar --create --file archive \
4601     --no-recursion directory1 \
4602     --recursion directory2 || exit 1
4603 tar tf archive
4604 )
4605 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4606 at_status=$? at_failed=false
4607 $at_check_filter
4608 at_fn_diff_devnull "$at_stderr" || at_failed=:
4609 echo >>"$at_stdout"; $as_echo "directory1/
4610 directory2/
4611 directory2/file
4612 " | \
4613   $at_diff - "$at_stdout" || at_failed=:
4614 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
4615 $at_failed && at_fn_log_failure
4616 $at_traceon; }
4617
4618               { set +x
4619 $as_echo "$at_srcdir/recurs02.at:33:
4620 mkdir ustar
4621 (cd ustar
4622 TEST_TAR_FORMAT=ustar
4623 export TEST_TAR_FORMAT
4624 TAR_OPTIONS=\"-H ustar\"
4625 export TAR_OPTIONS
4626 rm -rf *
4627
4628 mkdir directory1 directory2
4629 touch directory1/file directory2/file
4630 tar --create --file archive \\
4631     --no-recursion directory1 \\
4632     --recursion directory2 || exit 1
4633 tar tf archive
4634 )"
4635 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
4636 ( $at_check_trace;
4637 mkdir ustar
4638 (cd ustar
4639 TEST_TAR_FORMAT=ustar
4640 export TEST_TAR_FORMAT
4641 TAR_OPTIONS="-H ustar"
4642 export TAR_OPTIONS
4643 rm -rf *
4644
4645 mkdir directory1 directory2
4646 touch directory1/file directory2/file
4647 tar --create --file archive \
4648     --no-recursion directory1 \
4649     --recursion directory2 || exit 1
4650 tar tf archive
4651 )
4652 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4653 at_status=$? at_failed=false
4654 $at_check_filter
4655 at_fn_diff_devnull "$at_stderr" || at_failed=:
4656 echo >>"$at_stdout"; $as_echo "directory1/
4657 directory2/
4658 directory2/file
4659 " | \
4660   $at_diff - "$at_stdout" || at_failed=:
4661 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
4662 $at_failed && at_fn_log_failure
4663 $at_traceon; }
4664
4665               { set +x
4666 $as_echo "$at_srcdir/recurs02.at:33:
4667 mkdir posix
4668 (cd posix
4669 TEST_TAR_FORMAT=posix
4670 export TEST_TAR_FORMAT
4671 TAR_OPTIONS=\"-H posix\"
4672 export TAR_OPTIONS
4673 rm -rf *
4674
4675 mkdir directory1 directory2
4676 touch directory1/file directory2/file
4677 tar --create --file archive \\
4678     --no-recursion directory1 \\
4679     --recursion directory2 || exit 1
4680 tar tf archive
4681 )"
4682 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
4683 ( $at_check_trace;
4684 mkdir posix
4685 (cd posix
4686 TEST_TAR_FORMAT=posix
4687 export TEST_TAR_FORMAT
4688 TAR_OPTIONS="-H posix"
4689 export TAR_OPTIONS
4690 rm -rf *
4691
4692 mkdir directory1 directory2
4693 touch directory1/file directory2/file
4694 tar --create --file archive \
4695     --no-recursion directory1 \
4696     --recursion directory2 || exit 1
4697 tar tf archive
4698 )
4699 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4700 at_status=$? at_failed=false
4701 $at_check_filter
4702 at_fn_diff_devnull "$at_stderr" || at_failed=:
4703 echo >>"$at_stdout"; $as_echo "directory1/
4704 directory2/
4705 directory2/file
4706 " | \
4707   $at_diff - "$at_stdout" || at_failed=:
4708 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
4709 $at_failed && at_fn_log_failure
4710 $at_traceon; }
4711
4712               { set +x
4713 $as_echo "$at_srcdir/recurs02.at:33:
4714 mkdir gnu
4715 (cd gnu
4716 TEST_TAR_FORMAT=gnu
4717 export TEST_TAR_FORMAT
4718 TAR_OPTIONS=\"-H gnu\"
4719 export TAR_OPTIONS
4720 rm -rf *
4721
4722 mkdir directory1 directory2
4723 touch directory1/file directory2/file
4724 tar --create --file archive \\
4725     --no-recursion directory1 \\
4726     --recursion directory2 || exit 1
4727 tar tf archive
4728 )"
4729 at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33"
4730 ( $at_check_trace;
4731 mkdir gnu
4732 (cd gnu
4733 TEST_TAR_FORMAT=gnu
4734 export TEST_TAR_FORMAT
4735 TAR_OPTIONS="-H gnu"
4736 export TAR_OPTIONS
4737 rm -rf *
4738
4739 mkdir directory1 directory2
4740 touch directory1/file directory2/file
4741 tar --create --file archive \
4742     --no-recursion directory1 \
4743     --recursion directory2 || exit 1
4744 tar tf archive
4745 )
4746 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4747 at_status=$? at_failed=false
4748 $at_check_filter
4749 at_fn_diff_devnull "$at_stderr" || at_failed=:
4750 echo >>"$at_stdout"; $as_echo "directory1/
4751 directory2/
4752 directory2/file
4753 " | \
4754   $at_diff - "$at_stdout" || at_failed=:
4755 at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33"
4756 $at_failed && at_fn_log_failure
4757 $at_traceon; }
4758
4759
4760
4761
4762   set +x
4763   $at_times_p && times >"$at_times_file"
4764 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
4765 read at_status <"$at_status_file"
4766 #AT_STOP_23
4767 #AT_START_24
4768 at_fn_group_banner 24 'shortrec.at:25' \
4769   "short records" "                                  " 3
4770 at_xfail=no
4771       test -f $XFAILFILE && at_xfail=yes
4772 (
4773   $as_echo "24. $at_setup_line: testing $at_desc ..."
4774   $at_traceon
4775
4776
4777
4778
4779
4780   { set +x
4781 $as_echo "$at_srcdir/shortrec.at:28:
4782 mkdir v7
4783 (cd v7
4784 TEST_TAR_FORMAT=v7
4785 export TEST_TAR_FORMAT
4786 TAR_OPTIONS=\"-H v7\"
4787 export TAR_OPTIONS
4788 rm -rf *
4789
4790 mkdir directory
4791 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4792 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4793 tar -c -b 1 -f archive directory
4794 tar -t -f archive > /dev/null
4795 tar -t -f - < archive > /dev/null
4796
4797 rm -r directory
4798 )"
4799 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4800 ( $at_check_trace;
4801 mkdir v7
4802 (cd v7
4803 TEST_TAR_FORMAT=v7
4804 export TEST_TAR_FORMAT
4805 TAR_OPTIONS="-H v7"
4806 export TAR_OPTIONS
4807 rm -rf *
4808
4809 mkdir directory
4810 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4811 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4812 tar -c -b 1 -f archive directory
4813 tar -t -f archive > /dev/null
4814 tar -t -f - < archive > /dev/null
4815
4816 rm -r directory
4817 )
4818 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4819 at_status=$? at_failed=false
4820 $at_check_filter
4821 at_fn_diff_devnull "$at_stderr" || at_failed=:
4822 at_fn_diff_devnull "$at_stdout" || at_failed=:
4823 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4824 $at_failed && at_fn_log_failure
4825 $at_traceon; }
4826
4827               { set +x
4828 $as_echo "$at_srcdir/shortrec.at:28:
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 mkdir directory
4838 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4839 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4840 tar -c -b 1 -f archive directory
4841 tar -t -f archive > /dev/null
4842 tar -t -f - < archive > /dev/null
4843
4844 rm -r directory
4845 )"
4846 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4847 ( $at_check_trace;
4848 mkdir oldgnu
4849 (cd oldgnu
4850 TEST_TAR_FORMAT=oldgnu
4851 export TEST_TAR_FORMAT
4852 TAR_OPTIONS="-H oldgnu"
4853 export TAR_OPTIONS
4854 rm -rf *
4855
4856 mkdir directory
4857 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4858 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4859 tar -c -b 1 -f archive directory
4860 tar -t -f archive > /dev/null
4861 tar -t -f - < archive > /dev/null
4862
4863 rm -r directory
4864 )
4865 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4866 at_status=$? at_failed=false
4867 $at_check_filter
4868 at_fn_diff_devnull "$at_stderr" || at_failed=:
4869 at_fn_diff_devnull "$at_stdout" || at_failed=:
4870 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4871 $at_failed && at_fn_log_failure
4872 $at_traceon; }
4873
4874               { set +x
4875 $as_echo "$at_srcdir/shortrec.at:28:
4876 mkdir ustar
4877 (cd ustar
4878 TEST_TAR_FORMAT=ustar
4879 export TEST_TAR_FORMAT
4880 TAR_OPTIONS=\"-H ustar\"
4881 export TAR_OPTIONS
4882 rm -rf *
4883
4884 mkdir directory
4885 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4886 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4887 tar -c -b 1 -f archive directory
4888 tar -t -f archive > /dev/null
4889 tar -t -f - < archive > /dev/null
4890
4891 rm -r directory
4892 )"
4893 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4894 ( $at_check_trace;
4895 mkdir ustar
4896 (cd ustar
4897 TEST_TAR_FORMAT=ustar
4898 export TEST_TAR_FORMAT
4899 TAR_OPTIONS="-H ustar"
4900 export TAR_OPTIONS
4901 rm -rf *
4902
4903 mkdir directory
4904 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4905 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4906 tar -c -b 1 -f archive directory
4907 tar -t -f archive > /dev/null
4908 tar -t -f - < archive > /dev/null
4909
4910 rm -r directory
4911 )
4912 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4913 at_status=$? at_failed=false
4914 $at_check_filter
4915 at_fn_diff_devnull "$at_stderr" || at_failed=:
4916 at_fn_diff_devnull "$at_stdout" || at_failed=:
4917 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4918 $at_failed && at_fn_log_failure
4919 $at_traceon; }
4920
4921               { set +x
4922 $as_echo "$at_srcdir/shortrec.at:28:
4923 mkdir posix
4924 (cd posix
4925 TEST_TAR_FORMAT=posix
4926 export TEST_TAR_FORMAT
4927 TAR_OPTIONS=\"-H posix\"
4928 export TAR_OPTIONS
4929 rm -rf *
4930
4931 mkdir directory
4932 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4933 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4934 tar -c -b 1 -f archive directory
4935 tar -t -f archive > /dev/null
4936 tar -t -f - < archive > /dev/null
4937
4938 rm -r directory
4939 )"
4940 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4941 ( $at_check_trace;
4942 mkdir posix
4943 (cd posix
4944 TEST_TAR_FORMAT=posix
4945 export TEST_TAR_FORMAT
4946 TAR_OPTIONS="-H posix"
4947 export TAR_OPTIONS
4948 rm -rf *
4949
4950 mkdir directory
4951 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4952 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4953 tar -c -b 1 -f archive directory
4954 tar -t -f archive > /dev/null
4955 tar -t -f - < archive > /dev/null
4956
4957 rm -r directory
4958 )
4959 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
4960 at_status=$? at_failed=false
4961 $at_check_filter
4962 at_fn_diff_devnull "$at_stderr" || at_failed=:
4963 at_fn_diff_devnull "$at_stdout" || at_failed=:
4964 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
4965 $at_failed && at_fn_log_failure
4966 $at_traceon; }
4967
4968               { set +x
4969 $as_echo "$at_srcdir/shortrec.at:28:
4970 mkdir gnu
4971 (cd gnu
4972 TEST_TAR_FORMAT=gnu
4973 export TEST_TAR_FORMAT
4974 TAR_OPTIONS=\"-H gnu\"
4975 export TAR_OPTIONS
4976 rm -rf *
4977
4978 mkdir directory
4979 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4980 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
4981 tar -c -b 1 -f archive directory
4982 tar -t -f archive > /dev/null
4983 tar -t -f - < archive > /dev/null
4984
4985 rm -r directory
4986 )"
4987 at_fn_check_prepare_notrace 'an embedded newline' "shortrec.at:28"
4988 ( $at_check_trace;
4989 mkdir gnu
4990 (cd gnu
4991 TEST_TAR_FORMAT=gnu
4992 export TEST_TAR_FORMAT
4993 TAR_OPTIONS="-H gnu"
4994 export TAR_OPTIONS
4995 rm -rf *
4996
4997 mkdir directory
4998 (cd directory && touch a b c d e f g h i j k l m n o p q r)
4999 tar -c -b 1 -f - directory | tar -t -f - > /dev/null
5000 tar -c -b 1 -f archive directory
5001 tar -t -f archive > /dev/null
5002 tar -t -f - < archive > /dev/null
5003
5004 rm -r directory
5005 )
5006 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5007 at_status=$? at_failed=false
5008 $at_check_filter
5009 at_fn_diff_devnull "$at_stderr" || at_failed=:
5010 at_fn_diff_devnull "$at_stdout" || at_failed=:
5011 at_fn_check_status 0 $at_status "$at_srcdir/shortrec.at:28"
5012 $at_failed && at_fn_log_failure
5013 $at_traceon; }
5014
5015
5016
5017
5018   set +x
5019   $at_times_p && times >"$at_times_file"
5020 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5021 read at_status <"$at_status_file"
5022 #AT_STOP_24
5023 #AT_START_25
5024 at_fn_group_banner 25 'iotty.at:26' \
5025   "terminal input" "                                 " 3
5026 at_xfail=no
5027       test -f $XFAILFILE && at_xfail=yes
5028 (
5029   $as_echo "25. $at_setup_line: testing $at_desc ..."
5030   $at_traceon
5031
5032
5033
5034
5035
5036   { set +x
5037 $as_echo "$at_srcdir/iotty.at:29:
5038 mkdir posix
5039 (cd posix
5040 TEST_TAR_FORMAT=posix
5041 export TEST_TAR_FORMAT
5042 TAR_OPTIONS=\"-H posix\"
5043 export TAR_OPTIONS
5044 rm -rf *
5045
5046 test -x \$abs_builddir/ttyemu || exit 77
5047 TAPE=-
5048 export TAPE
5049 ttyemu -t5 -i/dev/null tar -x
5050 echo \$?
5051 ttyemu -t5 -i/dev/null tar -xz
5052 echo \$?
5053 ttyemu -t5 -i/dev/null tar -c .
5054 echo \$?
5055 )"
5056 at_fn_check_prepare_notrace 'an embedded newline' "iotty.at:29"
5057 ( $at_check_trace;
5058 mkdir posix
5059 (cd posix
5060 TEST_TAR_FORMAT=posix
5061 export TEST_TAR_FORMAT
5062 TAR_OPTIONS="-H posix"
5063 export TAR_OPTIONS
5064 rm -rf *
5065
5066 test -x $abs_builddir/ttyemu || exit 77
5067 TAPE=-
5068 export TAPE
5069 ttyemu -t5 -i/dev/null tar -x
5070 echo $?
5071 ttyemu -t5 -i/dev/null tar -xz
5072 echo $?
5073 ttyemu -t5 -i/dev/null tar -c .
5074 echo $?
5075 )
5076 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5077 at_status=$? at_failed=false
5078 $at_check_filter
5079 at_fn_diff_devnull "$at_stderr" || at_failed=:
5080 echo >>"$at_stdout"; $as_echo "tar: Refusing to read archive contents from terminal (missing -f option?)
5081 tar: Error is not recoverable: exiting now
5082 2
5083 tar: Refusing to read archive contents from terminal (missing -f option?)
5084 tar: Error is not recoverable: exiting now
5085 2
5086 tar: Refusing to write archive contents to terminal (missing -f option?)
5087 tar: Error is not recoverable: exiting now
5088 2
5089 " | \
5090   $at_diff - "$at_stdout" || at_failed=:
5091 at_fn_check_status 0 $at_status "$at_srcdir/iotty.at:29"
5092 $at_failed && at_fn_log_failure
5093 $at_traceon; }
5094
5095               { set +x
5096 $as_echo "$at_srcdir/iotty.at:29:
5097 mkdir gnu
5098 (cd gnu
5099 TEST_TAR_FORMAT=gnu
5100 export TEST_TAR_FORMAT
5101 TAR_OPTIONS=\"-H gnu\"
5102 export TAR_OPTIONS
5103 rm -rf *
5104
5105 test -x \$abs_builddir/ttyemu || exit 77
5106 TAPE=-
5107 export TAPE
5108 ttyemu -t5 -i/dev/null tar -x
5109 echo \$?
5110 ttyemu -t5 -i/dev/null tar -xz
5111 echo \$?
5112 ttyemu -t5 -i/dev/null tar -c .
5113 echo \$?
5114 )"
5115 at_fn_check_prepare_notrace 'an embedded newline' "iotty.at:29"
5116 ( $at_check_trace;
5117 mkdir gnu
5118 (cd gnu
5119 TEST_TAR_FORMAT=gnu
5120 export TEST_TAR_FORMAT
5121 TAR_OPTIONS="-H gnu"
5122 export TAR_OPTIONS
5123 rm -rf *
5124
5125 test -x $abs_builddir/ttyemu || exit 77
5126 TAPE=-
5127 export TAPE
5128 ttyemu -t5 -i/dev/null tar -x
5129 echo $?
5130 ttyemu -t5 -i/dev/null tar -xz
5131 echo $?
5132 ttyemu -t5 -i/dev/null tar -c .
5133 echo $?
5134 )
5135 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5136 at_status=$? at_failed=false
5137 $at_check_filter
5138 at_fn_diff_devnull "$at_stderr" || at_failed=:
5139 echo >>"$at_stdout"; $as_echo "tar: Refusing to read archive contents from terminal (missing -f option?)
5140 tar: Error is not recoverable: exiting now
5141 2
5142 tar: Refusing to read archive contents from terminal (missing -f option?)
5143 tar: Error is not recoverable: exiting now
5144 2
5145 tar: Refusing to write archive contents to terminal (missing -f option?)
5146 tar: Error is not recoverable: exiting now
5147 2
5148 " | \
5149   $at_diff - "$at_stdout" || at_failed=:
5150 at_fn_check_status 0 $at_status "$at_srcdir/iotty.at:29"
5151 $at_failed && at_fn_log_failure
5152 $at_traceon; }
5153
5154               { set +x
5155 $as_echo "$at_srcdir/iotty.at:29:
5156 mkdir oldgnu
5157 (cd oldgnu
5158 TEST_TAR_FORMAT=oldgnu
5159 export TEST_TAR_FORMAT
5160 TAR_OPTIONS=\"-H oldgnu\"
5161 export TAR_OPTIONS
5162 rm -rf *
5163
5164 test -x \$abs_builddir/ttyemu || exit 77
5165 TAPE=-
5166 export TAPE
5167 ttyemu -t5 -i/dev/null tar -x
5168 echo \$?
5169 ttyemu -t5 -i/dev/null tar -xz
5170 echo \$?
5171 ttyemu -t5 -i/dev/null tar -c .
5172 echo \$?
5173 )"
5174 at_fn_check_prepare_notrace 'an embedded newline' "iotty.at:29"
5175 ( $at_check_trace;
5176 mkdir oldgnu
5177 (cd oldgnu
5178 TEST_TAR_FORMAT=oldgnu
5179 export TEST_TAR_FORMAT
5180 TAR_OPTIONS="-H oldgnu"
5181 export TAR_OPTIONS
5182 rm -rf *
5183
5184 test -x $abs_builddir/ttyemu || exit 77
5185 TAPE=-
5186 export TAPE
5187 ttyemu -t5 -i/dev/null tar -x
5188 echo $?
5189 ttyemu -t5 -i/dev/null tar -xz
5190 echo $?
5191 ttyemu -t5 -i/dev/null tar -c .
5192 echo $?
5193 )
5194 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5195 at_status=$? at_failed=false
5196 $at_check_filter
5197 at_fn_diff_devnull "$at_stderr" || at_failed=:
5198 echo >>"$at_stdout"; $as_echo "tar: Refusing to read archive contents from terminal (missing -f option?)
5199 tar: Error is not recoverable: exiting now
5200 2
5201 tar: Refusing to read archive contents from terminal (missing -f option?)
5202 tar: Error is not recoverable: exiting now
5203 2
5204 tar: Refusing to write archive contents to terminal (missing -f option?)
5205 tar: Error is not recoverable: exiting now
5206 2
5207 " | \
5208   $at_diff - "$at_stdout" || at_failed=:
5209 at_fn_check_status 0 $at_status "$at_srcdir/iotty.at:29"
5210 $at_failed && at_fn_log_failure
5211 $at_traceon; }
5212
5213
5214
5215
5216   set +x
5217   $at_times_p && times >"$at_times_file"
5218 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5219 read at_status <"$at_status_file"
5220 #AT_STOP_25
5221 #AT_START_26
5222 at_fn_group_banner 26 'same-order01.at:26' \
5223   "working -C with --same-order" "                   " 4
5224 at_xfail=no
5225       test -f $XFAILFILE && at_xfail=yes
5226 (
5227   $as_echo "26. $at_setup_line: testing $at_desc ..."
5228   $at_traceon
5229
5230
5231
5232
5233
5234   { set +x
5235 $as_echo "$at_srcdir/same-order01.at:29:
5236 mkdir v7
5237 (cd v7
5238 TEST_TAR_FORMAT=v7
5239 export TEST_TAR_FORMAT
5240 TAR_OPTIONS=\"-H v7\"
5241 export TAR_OPTIONS
5242 rm -rf *
5243
5244
5245 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5246
5247
5248 genfile -l 1024 -f file1
5249 genfile -l 1024 -f file2
5250 tar cf archive file1 file2
5251
5252 mkdir directory
5253 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5254
5255 ls directory|sort
5256 )"
5257 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
5258 ( $at_check_trace;
5259 mkdir v7
5260 (cd v7
5261 TEST_TAR_FORMAT=v7
5262 export TEST_TAR_FORMAT
5263 TAR_OPTIONS="-H v7"
5264 export TAR_OPTIONS
5265 rm -rf *
5266
5267
5268 test -z "`sort < /dev/null 2>&1`" || exit 77
5269
5270
5271 genfile -l 1024 -f file1
5272 genfile -l 1024 -f file2
5273 tar cf archive file1 file2
5274
5275 mkdir directory
5276 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5277
5278 ls directory|sort
5279 )
5280 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5281 at_status=$? at_failed=false
5282 $at_check_filter
5283 at_fn_diff_devnull "$at_stderr" || at_failed=:
5284 echo >>"$at_stdout"; $as_echo "file1
5285 file2
5286 " | \
5287   $at_diff - "$at_stdout" || at_failed=:
5288 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
5289 $at_failed && at_fn_log_failure
5290 $at_traceon; }
5291
5292               { set +x
5293 $as_echo "$at_srcdir/same-order01.at:29:
5294 mkdir oldgnu
5295 (cd oldgnu
5296 TEST_TAR_FORMAT=oldgnu
5297 export TEST_TAR_FORMAT
5298 TAR_OPTIONS=\"-H oldgnu\"
5299 export TAR_OPTIONS
5300 rm -rf *
5301
5302
5303 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5304
5305
5306 genfile -l 1024 -f file1
5307 genfile -l 1024 -f file2
5308 tar cf archive file1 file2
5309
5310 mkdir directory
5311 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5312
5313 ls directory|sort
5314 )"
5315 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
5316 ( $at_check_trace;
5317 mkdir oldgnu
5318 (cd oldgnu
5319 TEST_TAR_FORMAT=oldgnu
5320 export TEST_TAR_FORMAT
5321 TAR_OPTIONS="-H oldgnu"
5322 export TAR_OPTIONS
5323 rm -rf *
5324
5325
5326 test -z "`sort < /dev/null 2>&1`" || exit 77
5327
5328
5329 genfile -l 1024 -f file1
5330 genfile -l 1024 -f file2
5331 tar cf archive file1 file2
5332
5333 mkdir directory
5334 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5335
5336 ls directory|sort
5337 )
5338 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5339 at_status=$? at_failed=false
5340 $at_check_filter
5341 at_fn_diff_devnull "$at_stderr" || at_failed=:
5342 echo >>"$at_stdout"; $as_echo "file1
5343 file2
5344 " | \
5345   $at_diff - "$at_stdout" || at_failed=:
5346 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
5347 $at_failed && at_fn_log_failure
5348 $at_traceon; }
5349
5350               { set +x
5351 $as_echo "$at_srcdir/same-order01.at:29:
5352 mkdir ustar
5353 (cd ustar
5354 TEST_TAR_FORMAT=ustar
5355 export TEST_TAR_FORMAT
5356 TAR_OPTIONS=\"-H ustar\"
5357 export TAR_OPTIONS
5358 rm -rf *
5359
5360
5361 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5362
5363
5364 genfile -l 1024 -f file1
5365 genfile -l 1024 -f file2
5366 tar cf archive file1 file2
5367
5368 mkdir directory
5369 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5370
5371 ls directory|sort
5372 )"
5373 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
5374 ( $at_check_trace;
5375 mkdir ustar
5376 (cd ustar
5377 TEST_TAR_FORMAT=ustar
5378 export TEST_TAR_FORMAT
5379 TAR_OPTIONS="-H ustar"
5380 export TAR_OPTIONS
5381 rm -rf *
5382
5383
5384 test -z "`sort < /dev/null 2>&1`" || exit 77
5385
5386
5387 genfile -l 1024 -f file1
5388 genfile -l 1024 -f file2
5389 tar cf archive file1 file2
5390
5391 mkdir directory
5392 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5393
5394 ls directory|sort
5395 )
5396 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5397 at_status=$? at_failed=false
5398 $at_check_filter
5399 at_fn_diff_devnull "$at_stderr" || at_failed=:
5400 echo >>"$at_stdout"; $as_echo "file1
5401 file2
5402 " | \
5403   $at_diff - "$at_stdout" || at_failed=:
5404 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
5405 $at_failed && at_fn_log_failure
5406 $at_traceon; }
5407
5408               { set +x
5409 $as_echo "$at_srcdir/same-order01.at:29:
5410 mkdir posix
5411 (cd posix
5412 TEST_TAR_FORMAT=posix
5413 export TEST_TAR_FORMAT
5414 TAR_OPTIONS=\"-H posix\"
5415 export TAR_OPTIONS
5416 rm -rf *
5417
5418
5419 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5420
5421
5422 genfile -l 1024 -f file1
5423 genfile -l 1024 -f file2
5424 tar cf archive file1 file2
5425
5426 mkdir directory
5427 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5428
5429 ls directory|sort
5430 )"
5431 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
5432 ( $at_check_trace;
5433 mkdir posix
5434 (cd posix
5435 TEST_TAR_FORMAT=posix
5436 export TEST_TAR_FORMAT
5437 TAR_OPTIONS="-H posix"
5438 export TAR_OPTIONS
5439 rm -rf *
5440
5441
5442 test -z "`sort < /dev/null 2>&1`" || exit 77
5443
5444
5445 genfile -l 1024 -f file1
5446 genfile -l 1024 -f file2
5447 tar cf archive file1 file2
5448
5449 mkdir directory
5450 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5451
5452 ls directory|sort
5453 )
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/same-order01.at:29"
5463 $at_failed && at_fn_log_failure
5464 $at_traceon; }
5465
5466               { set +x
5467 $as_echo "$at_srcdir/same-order01.at:29:
5468 mkdir gnu
5469 (cd gnu
5470 TEST_TAR_FORMAT=gnu
5471 export TEST_TAR_FORMAT
5472 TAR_OPTIONS=\"-H gnu\"
5473 export TAR_OPTIONS
5474 rm -rf *
5475
5476
5477 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
5478
5479
5480 genfile -l 1024 -f file1
5481 genfile -l 1024 -f file2
5482 tar cf archive file1 file2
5483
5484 mkdir directory
5485 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5486
5487 ls directory|sort
5488 )"
5489 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order01.at:29"
5490 ( $at_check_trace;
5491 mkdir gnu
5492 (cd gnu
5493 TEST_TAR_FORMAT=gnu
5494 export TEST_TAR_FORMAT
5495 TAR_OPTIONS="-H gnu"
5496 export TAR_OPTIONS
5497 rm -rf *
5498
5499
5500 test -z "`sort < /dev/null 2>&1`" || exit 77
5501
5502
5503 genfile -l 1024 -f file1
5504 genfile -l 1024 -f file2
5505 tar cf archive file1 file2
5506
5507 mkdir directory
5508 tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1
5509
5510 ls directory|sort
5511 )
5512 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5513 at_status=$? at_failed=false
5514 $at_check_filter
5515 at_fn_diff_devnull "$at_stderr" || at_failed=:
5516 echo >>"$at_stdout"; $as_echo "file1
5517 file2
5518 " | \
5519   $at_diff - "$at_stdout" || at_failed=:
5520 at_fn_check_status 0 $at_status "$at_srcdir/same-order01.at:29"
5521 $at_failed && at_fn_log_failure
5522 $at_traceon; }
5523
5524
5525
5526
5527   set +x
5528   $at_times_p && times >"$at_times_file"
5529 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5530 read at_status <"$at_status_file"
5531 #AT_STOP_26
5532 #AT_START_27
5533 at_fn_group_banner 27 'same-order02.at:25' \
5534   "multiple -C options" "                            " 4
5535 at_xfail=no
5536       test -f $XFAILFILE && at_xfail=yes
5537 (
5538   $as_echo "27. $at_setup_line: testing $at_desc ..."
5539   $at_traceon
5540
5541
5542
5543
5544
5545   { set +x
5546 $as_echo "$at_srcdir/same-order02.at:28:
5547 mkdir v7
5548 (cd v7
5549 TEST_TAR_FORMAT=v7
5550 export TEST_TAR_FORMAT
5551 TAR_OPTIONS=\"-H v7\"
5552 export TAR_OPTIONS
5553 rm -rf *
5554
5555 genfile -l 1024 -f file1
5556 genfile -l 1024 -f file2
5557 tar cf archive file1 file2
5558
5559 mkdir en
5560 mkdir to
5561
5562 HERE=\`pwd\`
5563 tar -xf archive --same-order --warning=no-timestamp \\
5564   -C \$HERE/en file1 \\
5565   -C \$HERE/to file2 || exit 1
5566
5567 ls en
5568 echo separator
5569 ls to
5570 )"
5571 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5572 ( $at_check_trace;
5573 mkdir v7
5574 (cd v7
5575 TEST_TAR_FORMAT=v7
5576 export TEST_TAR_FORMAT
5577 TAR_OPTIONS="-H v7"
5578 export TAR_OPTIONS
5579 rm -rf *
5580
5581 genfile -l 1024 -f file1
5582 genfile -l 1024 -f file2
5583 tar cf archive file1 file2
5584
5585 mkdir en
5586 mkdir to
5587
5588 HERE=`pwd`
5589 tar -xf archive --same-order --warning=no-timestamp \
5590   -C $HERE/en file1 \
5591   -C $HERE/to file2 || exit 1
5592
5593 ls en
5594 echo separator
5595 ls to
5596 )
5597 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5598 at_status=$? at_failed=false
5599 $at_check_filter
5600 at_fn_diff_devnull "$at_stderr" || at_failed=:
5601 echo >>"$at_stdout"; $as_echo "file1
5602 separator
5603 file2
5604 " | \
5605   $at_diff - "$at_stdout" || at_failed=:
5606 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5607 $at_failed && at_fn_log_failure
5608 $at_traceon; }
5609
5610               { set +x
5611 $as_echo "$at_srcdir/same-order02.at:28:
5612 mkdir oldgnu
5613 (cd oldgnu
5614 TEST_TAR_FORMAT=oldgnu
5615 export TEST_TAR_FORMAT
5616 TAR_OPTIONS=\"-H oldgnu\"
5617 export TAR_OPTIONS
5618 rm -rf *
5619
5620 genfile -l 1024 -f file1
5621 genfile -l 1024 -f file2
5622 tar cf archive file1 file2
5623
5624 mkdir en
5625 mkdir to
5626
5627 HERE=\`pwd\`
5628 tar -xf archive --same-order --warning=no-timestamp \\
5629   -C \$HERE/en file1 \\
5630   -C \$HERE/to file2 || exit 1
5631
5632 ls en
5633 echo separator
5634 ls to
5635 )"
5636 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5637 ( $at_check_trace;
5638 mkdir oldgnu
5639 (cd oldgnu
5640 TEST_TAR_FORMAT=oldgnu
5641 export TEST_TAR_FORMAT
5642 TAR_OPTIONS="-H oldgnu"
5643 export TAR_OPTIONS
5644 rm -rf *
5645
5646 genfile -l 1024 -f file1
5647 genfile -l 1024 -f file2
5648 tar cf archive file1 file2
5649
5650 mkdir en
5651 mkdir to
5652
5653 HERE=`pwd`
5654 tar -xf archive --same-order --warning=no-timestamp \
5655   -C $HERE/en file1 \
5656   -C $HERE/to file2 || exit 1
5657
5658 ls en
5659 echo separator
5660 ls to
5661 )
5662 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5663 at_status=$? at_failed=false
5664 $at_check_filter
5665 at_fn_diff_devnull "$at_stderr" || at_failed=:
5666 echo >>"$at_stdout"; $as_echo "file1
5667 separator
5668 file2
5669 " | \
5670   $at_diff - "$at_stdout" || at_failed=:
5671 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5672 $at_failed && at_fn_log_failure
5673 $at_traceon; }
5674
5675               { set +x
5676 $as_echo "$at_srcdir/same-order02.at:28:
5677 mkdir ustar
5678 (cd ustar
5679 TEST_TAR_FORMAT=ustar
5680 export TEST_TAR_FORMAT
5681 TAR_OPTIONS=\"-H ustar\"
5682 export TAR_OPTIONS
5683 rm -rf *
5684
5685 genfile -l 1024 -f file1
5686 genfile -l 1024 -f file2
5687 tar cf archive file1 file2
5688
5689 mkdir en
5690 mkdir to
5691
5692 HERE=\`pwd\`
5693 tar -xf archive --same-order --warning=no-timestamp \\
5694   -C \$HERE/en file1 \\
5695   -C \$HERE/to file2 || exit 1
5696
5697 ls en
5698 echo separator
5699 ls to
5700 )"
5701 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5702 ( $at_check_trace;
5703 mkdir ustar
5704 (cd ustar
5705 TEST_TAR_FORMAT=ustar
5706 export TEST_TAR_FORMAT
5707 TAR_OPTIONS="-H ustar"
5708 export TAR_OPTIONS
5709 rm -rf *
5710
5711 genfile -l 1024 -f file1
5712 genfile -l 1024 -f file2
5713 tar cf archive file1 file2
5714
5715 mkdir en
5716 mkdir to
5717
5718 HERE=`pwd`
5719 tar -xf archive --same-order --warning=no-timestamp \
5720   -C $HERE/en file1 \
5721   -C $HERE/to file2 || exit 1
5722
5723 ls en
5724 echo separator
5725 ls to
5726 )
5727 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5728 at_status=$? at_failed=false
5729 $at_check_filter
5730 at_fn_diff_devnull "$at_stderr" || at_failed=:
5731 echo >>"$at_stdout"; $as_echo "file1
5732 separator
5733 file2
5734 " | \
5735   $at_diff - "$at_stdout" || at_failed=:
5736 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5737 $at_failed && at_fn_log_failure
5738 $at_traceon; }
5739
5740               { set +x
5741 $as_echo "$at_srcdir/same-order02.at:28:
5742 mkdir posix
5743 (cd posix
5744 TEST_TAR_FORMAT=posix
5745 export TEST_TAR_FORMAT
5746 TAR_OPTIONS=\"-H posix\"
5747 export TAR_OPTIONS
5748 rm -rf *
5749
5750 genfile -l 1024 -f file1
5751 genfile -l 1024 -f file2
5752 tar cf archive file1 file2
5753
5754 mkdir en
5755 mkdir to
5756
5757 HERE=\`pwd\`
5758 tar -xf archive --same-order --warning=no-timestamp \\
5759   -C \$HERE/en file1 \\
5760   -C \$HERE/to file2 || exit 1
5761
5762 ls en
5763 echo separator
5764 ls to
5765 )"
5766 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5767 ( $at_check_trace;
5768 mkdir posix
5769 (cd posix
5770 TEST_TAR_FORMAT=posix
5771 export TEST_TAR_FORMAT
5772 TAR_OPTIONS="-H posix"
5773 export TAR_OPTIONS
5774 rm -rf *
5775
5776 genfile -l 1024 -f file1
5777 genfile -l 1024 -f file2
5778 tar cf archive file1 file2
5779
5780 mkdir en
5781 mkdir to
5782
5783 HERE=`pwd`
5784 tar -xf archive --same-order --warning=no-timestamp \
5785   -C $HERE/en file1 \
5786   -C $HERE/to file2 || exit 1
5787
5788 ls en
5789 echo separator
5790 ls to
5791 )
5792 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5793 at_status=$? at_failed=false
5794 $at_check_filter
5795 at_fn_diff_devnull "$at_stderr" || at_failed=:
5796 echo >>"$at_stdout"; $as_echo "file1
5797 separator
5798 file2
5799 " | \
5800   $at_diff - "$at_stdout" || at_failed=:
5801 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5802 $at_failed && at_fn_log_failure
5803 $at_traceon; }
5804
5805               { set +x
5806 $as_echo "$at_srcdir/same-order02.at:28:
5807 mkdir gnu
5808 (cd gnu
5809 TEST_TAR_FORMAT=gnu
5810 export TEST_TAR_FORMAT
5811 TAR_OPTIONS=\"-H gnu\"
5812 export TAR_OPTIONS
5813 rm -rf *
5814
5815 genfile -l 1024 -f file1
5816 genfile -l 1024 -f file2
5817 tar cf archive file1 file2
5818
5819 mkdir en
5820 mkdir to
5821
5822 HERE=\`pwd\`
5823 tar -xf archive --same-order --warning=no-timestamp \\
5824   -C \$HERE/en file1 \\
5825   -C \$HERE/to file2 || exit 1
5826
5827 ls en
5828 echo separator
5829 ls to
5830 )"
5831 at_fn_check_prepare_notrace 'a `...` command substitution' "same-order02.at:28"
5832 ( $at_check_trace;
5833 mkdir gnu
5834 (cd gnu
5835 TEST_TAR_FORMAT=gnu
5836 export TEST_TAR_FORMAT
5837 TAR_OPTIONS="-H gnu"
5838 export TAR_OPTIONS
5839 rm -rf *
5840
5841 genfile -l 1024 -f file1
5842 genfile -l 1024 -f file2
5843 tar cf archive file1 file2
5844
5845 mkdir en
5846 mkdir to
5847
5848 HERE=`pwd`
5849 tar -xf archive --same-order --warning=no-timestamp \
5850   -C $HERE/en file1 \
5851   -C $HERE/to file2 || exit 1
5852
5853 ls en
5854 echo separator
5855 ls to
5856 )
5857 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5858 at_status=$? at_failed=false
5859 $at_check_filter
5860 at_fn_diff_devnull "$at_stderr" || at_failed=:
5861 echo >>"$at_stdout"; $as_echo "file1
5862 separator
5863 file2
5864 " | \
5865   $at_diff - "$at_stdout" || at_failed=:
5866 at_fn_check_status 0 $at_status "$at_srcdir/same-order02.at:28"
5867 $at_failed && at_fn_log_failure
5868 $at_traceon; }
5869
5870
5871
5872
5873   set +x
5874   $at_times_p && times >"$at_times_file"
5875 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
5876 read at_status <"$at_status_file"
5877 #AT_STOP_27
5878 #AT_START_28
5879 at_fn_group_banner 28 'append.at:21' \
5880   "append" "                                         " 5
5881 at_xfail=no
5882       test -f $XFAILFILE && at_xfail=yes
5883 (
5884   $as_echo "28. $at_setup_line: testing $at_desc ..."
5885   $at_traceon
5886
5887
5888
5889
5890
5891   { set +x
5892 $as_echo "$at_srcdir/append.at:24:
5893 mkdir v7
5894 (cd v7
5895 TEST_TAR_FORMAT=v7
5896 export TEST_TAR_FORMAT
5897 TAR_OPTIONS=\"-H v7\"
5898 export TAR_OPTIONS
5899 rm -rf *
5900 touch file1
5901           touch file2
5902           tar cf archive file1
5903           tar rf archive file2
5904           tar tf archive)"
5905 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
5906 ( $at_check_trace;
5907 mkdir v7
5908 (cd v7
5909 TEST_TAR_FORMAT=v7
5910 export TEST_TAR_FORMAT
5911 TAR_OPTIONS="-H v7"
5912 export TAR_OPTIONS
5913 rm -rf *
5914 touch file1
5915           touch file2
5916           tar cf archive file1
5917           tar rf archive file2
5918           tar tf archive)
5919 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5920 at_status=$? at_failed=false
5921 $at_check_filter
5922 at_fn_diff_devnull "$at_stderr" || at_failed=:
5923 echo >>"$at_stdout"; $as_echo "file1
5924 file2
5925 " | \
5926   $at_diff - "$at_stdout" || at_failed=:
5927 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
5928 $at_failed && at_fn_log_failure
5929 $at_traceon; }
5930
5931               { set +x
5932 $as_echo "$at_srcdir/append.at:24:
5933 mkdir oldgnu
5934 (cd oldgnu
5935 TEST_TAR_FORMAT=oldgnu
5936 export TEST_TAR_FORMAT
5937 TAR_OPTIONS=\"-H oldgnu\"
5938 export TAR_OPTIONS
5939 rm -rf *
5940 touch file1
5941           touch file2
5942           tar cf archive file1
5943           tar rf archive file2
5944           tar tf archive)"
5945 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
5946 ( $at_check_trace;
5947 mkdir oldgnu
5948 (cd oldgnu
5949 TEST_TAR_FORMAT=oldgnu
5950 export TEST_TAR_FORMAT
5951 TAR_OPTIONS="-H oldgnu"
5952 export TAR_OPTIONS
5953 rm -rf *
5954 touch file1
5955           touch file2
5956           tar cf archive file1
5957           tar rf archive file2
5958           tar tf archive)
5959 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
5960 at_status=$? at_failed=false
5961 $at_check_filter
5962 at_fn_diff_devnull "$at_stderr" || at_failed=:
5963 echo >>"$at_stdout"; $as_echo "file1
5964 file2
5965 " | \
5966   $at_diff - "$at_stdout" || at_failed=:
5967 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
5968 $at_failed && at_fn_log_failure
5969 $at_traceon; }
5970
5971               { set +x
5972 $as_echo "$at_srcdir/append.at:24:
5973 mkdir ustar
5974 (cd ustar
5975 TEST_TAR_FORMAT=ustar
5976 export TEST_TAR_FORMAT
5977 TAR_OPTIONS=\"-H ustar\"
5978 export TAR_OPTIONS
5979 rm -rf *
5980 touch file1
5981           touch file2
5982           tar cf archive file1
5983           tar rf archive file2
5984           tar tf archive)"
5985 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
5986 ( $at_check_trace;
5987 mkdir ustar
5988 (cd ustar
5989 TEST_TAR_FORMAT=ustar
5990 export TEST_TAR_FORMAT
5991 TAR_OPTIONS="-H ustar"
5992 export TAR_OPTIONS
5993 rm -rf *
5994 touch file1
5995           touch file2
5996           tar cf archive file1
5997           tar rf archive file2
5998           tar tf archive)
5999 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6000 at_status=$? at_failed=false
6001 $at_check_filter
6002 at_fn_diff_devnull "$at_stderr" || at_failed=:
6003 echo >>"$at_stdout"; $as_echo "file1
6004 file2
6005 " | \
6006   $at_diff - "$at_stdout" || at_failed=:
6007 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
6008 $at_failed && at_fn_log_failure
6009 $at_traceon; }
6010
6011               { set +x
6012 $as_echo "$at_srcdir/append.at:24:
6013 mkdir posix
6014 (cd posix
6015 TEST_TAR_FORMAT=posix
6016 export TEST_TAR_FORMAT
6017 TAR_OPTIONS=\"-H posix\"
6018 export TAR_OPTIONS
6019 rm -rf *
6020 touch file1
6021           touch file2
6022           tar cf archive file1
6023           tar rf archive file2
6024           tar tf archive)"
6025 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
6026 ( $at_check_trace;
6027 mkdir posix
6028 (cd posix
6029 TEST_TAR_FORMAT=posix
6030 export TEST_TAR_FORMAT
6031 TAR_OPTIONS="-H posix"
6032 export TAR_OPTIONS
6033 rm -rf *
6034 touch file1
6035           touch file2
6036           tar cf archive file1
6037           tar rf archive file2
6038           tar tf archive)
6039 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6040 at_status=$? at_failed=false
6041 $at_check_filter
6042 at_fn_diff_devnull "$at_stderr" || at_failed=:
6043 echo >>"$at_stdout"; $as_echo "file1
6044 file2
6045 " | \
6046   $at_diff - "$at_stdout" || at_failed=:
6047 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
6048 $at_failed && at_fn_log_failure
6049 $at_traceon; }
6050
6051               { set +x
6052 $as_echo "$at_srcdir/append.at:24:
6053 mkdir gnu
6054 (cd gnu
6055 TEST_TAR_FORMAT=gnu
6056 export TEST_TAR_FORMAT
6057 TAR_OPTIONS=\"-H gnu\"
6058 export TAR_OPTIONS
6059 rm -rf *
6060 touch file1
6061           touch file2
6062           tar cf archive file1
6063           tar rf archive file2
6064           tar tf archive)"
6065 at_fn_check_prepare_notrace 'an embedded newline' "append.at:24"
6066 ( $at_check_trace;
6067 mkdir gnu
6068 (cd gnu
6069 TEST_TAR_FORMAT=gnu
6070 export TEST_TAR_FORMAT
6071 TAR_OPTIONS="-H gnu"
6072 export TAR_OPTIONS
6073 rm -rf *
6074 touch file1
6075           touch file2
6076           tar cf archive file1
6077           tar rf archive file2
6078           tar tf archive)
6079 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6080 at_status=$? at_failed=false
6081 $at_check_filter
6082 at_fn_diff_devnull "$at_stderr" || at_failed=:
6083 echo >>"$at_stdout"; $as_echo "file1
6084 file2
6085 " | \
6086   $at_diff - "$at_stdout" || at_failed=:
6087 at_fn_check_status 0 $at_status "$at_srcdir/append.at:24"
6088 $at_failed && at_fn_log_failure
6089 $at_traceon; }
6090
6091
6092
6093
6094   set +x
6095   $at_times_p && times >"$at_times_file"
6096 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6097 read at_status <"$at_status_file"
6098 #AT_STOP_28
6099 #AT_START_29
6100 at_fn_group_banner 29 'append01.at:29' \
6101   "appending files with long names" "                " 5
6102 at_xfail=no
6103       test -f $XFAILFILE && at_xfail=yes
6104 (
6105   $as_echo "29. $at_setup_line: testing $at_desc ..."
6106   $at_traceon
6107
6108
6109
6110
6111
6112
6113
6114   { set +x
6115 $as_echo "$at_srcdir/append01.at:34:
6116 mkdir oldgnu
6117 (cd oldgnu
6118 TEST_TAR_FORMAT=oldgnu
6119 export TEST_TAR_FORMAT
6120 TAR_OPTIONS=\"-H oldgnu\"
6121 export TAR_OPTIONS
6122 rm -rf *
6123
6124 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
6125 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
6126 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
6127 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
6128 tar tf archive
6129 )"
6130 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
6131 ( $at_check_trace;
6132 mkdir oldgnu
6133 (cd oldgnu
6134 TEST_TAR_FORMAT=oldgnu
6135 export TEST_TAR_FORMAT
6136 TAR_OPTIONS="-H oldgnu"
6137 export TAR_OPTIONS
6138 rm -rf *
6139
6140 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
6141 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
6142 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
6143 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
6144 tar tf archive
6145 )
6146 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6147 at_status=$? at_failed=false
6148 $at_check_filter
6149 at_fn_diff_devnull "$at_stderr" || at_failed=:
6150 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
6151 This_is_a_very_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
6152 " | \
6153   $at_diff - "$at_stdout" || at_failed=:
6154 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
6155 $at_failed && at_fn_log_failure
6156 $at_traceon; }
6157
6158               { set +x
6159 $as_echo "$at_srcdir/append01.at:34:
6160 mkdir ustar
6161 (cd ustar
6162 TEST_TAR_FORMAT=ustar
6163 export TEST_TAR_FORMAT
6164 TAR_OPTIONS=\"-H ustar\"
6165 export TAR_OPTIONS
6166 rm -rf *
6167
6168 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
6169 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
6170 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
6171 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
6172 tar tf archive
6173 )"
6174 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
6175 ( $at_check_trace;
6176 mkdir ustar
6177 (cd ustar
6178 TEST_TAR_FORMAT=ustar
6179 export TEST_TAR_FORMAT
6180 TAR_OPTIONS="-H ustar"
6181 export TAR_OPTIONS
6182 rm -rf *
6183
6184 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
6185 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
6186 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
6187 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
6188 tar tf archive
6189 )
6190 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6191 at_status=$? at_failed=false
6192 $at_check_filter
6193 at_fn_diff_devnull "$at_stderr" || at_failed=:
6194 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
6195 This_is_a_very_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
6196 " | \
6197   $at_diff - "$at_stdout" || at_failed=:
6198 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
6199 $at_failed && at_fn_log_failure
6200 $at_traceon; }
6201
6202               { set +x
6203 $as_echo "$at_srcdir/append01.at:34:
6204 mkdir posix
6205 (cd posix
6206 TEST_TAR_FORMAT=posix
6207 export TEST_TAR_FORMAT
6208 TAR_OPTIONS=\"-H posix\"
6209 export TAR_OPTIONS
6210 rm -rf *
6211
6212 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
6213 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
6214 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
6215 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
6216 tar tf archive
6217 )"
6218 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
6219 ( $at_check_trace;
6220 mkdir posix
6221 (cd posix
6222 TEST_TAR_FORMAT=posix
6223 export TEST_TAR_FORMAT
6224 TAR_OPTIONS="-H posix"
6225 export TAR_OPTIONS
6226 rm -rf *
6227
6228 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
6229 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
6230 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
6231 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
6232 tar tf archive
6233 )
6234 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6235 at_status=$? at_failed=false
6236 $at_check_filter
6237 at_fn_diff_devnull "$at_stderr" || at_failed=:
6238 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
6239 This_is_a_very_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
6240 " | \
6241   $at_diff - "$at_stdout" || at_failed=:
6242 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
6243 $at_failed && at_fn_log_failure
6244 $at_traceon; }
6245
6246               { set +x
6247 $as_echo "$at_srcdir/append01.at:34:
6248 mkdir gnu
6249 (cd gnu
6250 TEST_TAR_FORMAT=gnu
6251 export TEST_TAR_FORMAT
6252 TAR_OPTIONS=\"-H gnu\"
6253 export TAR_OPTIONS
6254 rm -rf *
6255
6256 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
6257 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
6258 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
6259 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
6260 tar tf archive
6261 )"
6262 at_fn_check_prepare_notrace 'an embedded newline' "append01.at:34"
6263 ( $at_check_trace;
6264 mkdir gnu
6265 (cd gnu
6266 TEST_TAR_FORMAT=gnu
6267 export TEST_TAR_FORMAT
6268 TAR_OPTIONS="-H gnu"
6269 export TAR_OPTIONS
6270 rm -rf *
6271
6272 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
6273 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
6274 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
6275 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
6276 tar tf archive
6277 )
6278 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6279 at_status=$? at_failed=false
6280 $at_check_filter
6281 at_fn_diff_devnull "$at_stderr" || at_failed=:
6282 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
6283 This_is_a_very_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
6284 " | \
6285   $at_diff - "$at_stdout" || at_failed=:
6286 at_fn_check_status 0 $at_status "$at_srcdir/append01.at:34"
6287 $at_failed && at_fn_log_failure
6288 $at_traceon; }
6289
6290
6291
6292
6293
6294   set +x
6295   $at_times_p && times >"$at_times_file"
6296 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6297 read at_status <"$at_status_file"
6298 #AT_STOP_29
6299 #AT_START_30
6300 at_fn_group_banner 30 'append02.at:54' \
6301   "append vs. create" "                              " 5
6302 at_xfail=no
6303       test -f $XFAILFILE && at_xfail=yes
6304 (
6305   $as_echo "30. $at_setup_line: testing $at_desc ..."
6306   $at_traceon
6307
6308
6309
6310
6311
6312   { set +x
6313 $as_echo "$at_srcdir/append02.at:57:
6314 mkdir v7
6315 (cd v7
6316 TEST_TAR_FORMAT=v7
6317 export TEST_TAR_FORMAT
6318 TAR_OPTIONS=\"-H v7\"
6319 export TAR_OPTIONS
6320 rm -rf *
6321
6322 genfile --file file1
6323 genfile --file file2
6324
6325 # Make sure file timestamps in the archive will not differ
6326 MTIME=\"--mtime=@0\"
6327
6328 # For PAX archives, we need to make sure extended header names are
6329 # reproducible and that their contents won't change with time
6330 if test \$TEST_TAR_FORMAT = posix; then
6331   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
6332 fi
6333
6334 echo Creating archive.1
6335 tar \$MTIME -cf archive.1 file1 file2
6336
6337 echo Creating archive.2
6338 tar \$MTIME -cf archive.2 -T /dev/null
6339 tar \$MTIME -rf archive.2 file1
6340 tar \$MTIME -rf archive.2 file2
6341
6342 echo Comparing archives
6343 cmp archive.1 archive.2
6344 )"
6345 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
6346 ( $at_check_trace;
6347 mkdir v7
6348 (cd v7
6349 TEST_TAR_FORMAT=v7
6350 export TEST_TAR_FORMAT
6351 TAR_OPTIONS="-H v7"
6352 export TAR_OPTIONS
6353 rm -rf *
6354
6355 genfile --file file1
6356 genfile --file file2
6357
6358 # Make sure file timestamps in the archive will not differ
6359 MTIME="--mtime=@0"
6360
6361 # For PAX archives, we need to make sure extended header names are
6362 # reproducible and that their contents won't change with time
6363 if test $TEST_TAR_FORMAT = posix; then
6364   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
6365 fi
6366
6367 echo Creating archive.1
6368 tar $MTIME -cf archive.1 file1 file2
6369
6370 echo Creating archive.2
6371 tar $MTIME -cf archive.2 -T /dev/null
6372 tar $MTIME -rf archive.2 file1
6373 tar $MTIME -rf archive.2 file2
6374
6375 echo Comparing archives
6376 cmp archive.1 archive.2
6377 )
6378 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6379 at_status=$? at_failed=false
6380 $at_check_filter
6381 at_fn_diff_devnull "$at_stderr" || at_failed=:
6382 echo >>"$at_stdout"; $as_echo "Creating archive.1
6383 Creating archive.2
6384 Comparing archives
6385 " | \
6386   $at_diff - "$at_stdout" || at_failed=:
6387 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6388 $at_failed && at_fn_log_failure
6389 $at_traceon; }
6390
6391               { set +x
6392 $as_echo "$at_srcdir/append02.at:57:
6393 mkdir oldgnu
6394 (cd oldgnu
6395 TEST_TAR_FORMAT=oldgnu
6396 export TEST_TAR_FORMAT
6397 TAR_OPTIONS=\"-H oldgnu\"
6398 export TAR_OPTIONS
6399 rm -rf *
6400
6401 genfile --file file1
6402 genfile --file file2
6403
6404 # Make sure file timestamps in the archive will not differ
6405 MTIME=\"--mtime=@0\"
6406
6407 # For PAX archives, we need to make sure extended header names are
6408 # reproducible and that their contents won't change with time
6409 if test \$TEST_TAR_FORMAT = posix; then
6410   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
6411 fi
6412
6413 echo Creating archive.1
6414 tar \$MTIME -cf archive.1 file1 file2
6415
6416 echo Creating archive.2
6417 tar \$MTIME -cf archive.2 -T /dev/null
6418 tar \$MTIME -rf archive.2 file1
6419 tar \$MTIME -rf archive.2 file2
6420
6421 echo Comparing archives
6422 cmp archive.1 archive.2
6423 )"
6424 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
6425 ( $at_check_trace;
6426 mkdir oldgnu
6427 (cd oldgnu
6428 TEST_TAR_FORMAT=oldgnu
6429 export TEST_TAR_FORMAT
6430 TAR_OPTIONS="-H oldgnu"
6431 export TAR_OPTIONS
6432 rm -rf *
6433
6434 genfile --file file1
6435 genfile --file file2
6436
6437 # Make sure file timestamps in the archive will not differ
6438 MTIME="--mtime=@0"
6439
6440 # For PAX archives, we need to make sure extended header names are
6441 # reproducible and that their contents won't change with time
6442 if test $TEST_TAR_FORMAT = posix; then
6443   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
6444 fi
6445
6446 echo Creating archive.1
6447 tar $MTIME -cf archive.1 file1 file2
6448
6449 echo Creating archive.2
6450 tar $MTIME -cf archive.2 -T /dev/null
6451 tar $MTIME -rf archive.2 file1
6452 tar $MTIME -rf archive.2 file2
6453
6454 echo Comparing archives
6455 cmp archive.1 archive.2
6456 )
6457 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6458 at_status=$? at_failed=false
6459 $at_check_filter
6460 at_fn_diff_devnull "$at_stderr" || at_failed=:
6461 echo >>"$at_stdout"; $as_echo "Creating archive.1
6462 Creating archive.2
6463 Comparing archives
6464 " | \
6465   $at_diff - "$at_stdout" || at_failed=:
6466 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6467 $at_failed && at_fn_log_failure
6468 $at_traceon; }
6469
6470               { set +x
6471 $as_echo "$at_srcdir/append02.at:57:
6472 mkdir ustar
6473 (cd ustar
6474 TEST_TAR_FORMAT=ustar
6475 export TEST_TAR_FORMAT
6476 TAR_OPTIONS=\"-H ustar\"
6477 export TAR_OPTIONS
6478 rm -rf *
6479
6480 genfile --file file1
6481 genfile --file file2
6482
6483 # Make sure file timestamps in the archive will not differ
6484 MTIME=\"--mtime=@0\"
6485
6486 # For PAX archives, we need to make sure extended header names are
6487 # reproducible and that their contents won't change with time
6488 if test \$TEST_TAR_FORMAT = posix; then
6489   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
6490 fi
6491
6492 echo Creating archive.1
6493 tar \$MTIME -cf archive.1 file1 file2
6494
6495 echo Creating archive.2
6496 tar \$MTIME -cf archive.2 -T /dev/null
6497 tar \$MTIME -rf archive.2 file1
6498 tar \$MTIME -rf archive.2 file2
6499
6500 echo Comparing archives
6501 cmp archive.1 archive.2
6502 )"
6503 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
6504 ( $at_check_trace;
6505 mkdir ustar
6506 (cd ustar
6507 TEST_TAR_FORMAT=ustar
6508 export TEST_TAR_FORMAT
6509 TAR_OPTIONS="-H ustar"
6510 export TAR_OPTIONS
6511 rm -rf *
6512
6513 genfile --file file1
6514 genfile --file file2
6515
6516 # Make sure file timestamps in the archive will not differ
6517 MTIME="--mtime=@0"
6518
6519 # For PAX archives, we need to make sure extended header names are
6520 # reproducible and that their contents won't change with time
6521 if test $TEST_TAR_FORMAT = posix; then
6522   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
6523 fi
6524
6525 echo Creating archive.1
6526 tar $MTIME -cf archive.1 file1 file2
6527
6528 echo Creating archive.2
6529 tar $MTIME -cf archive.2 -T /dev/null
6530 tar $MTIME -rf archive.2 file1
6531 tar $MTIME -rf archive.2 file2
6532
6533 echo Comparing archives
6534 cmp archive.1 archive.2
6535 )
6536 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6537 at_status=$? at_failed=false
6538 $at_check_filter
6539 at_fn_diff_devnull "$at_stderr" || at_failed=:
6540 echo >>"$at_stdout"; $as_echo "Creating archive.1
6541 Creating archive.2
6542 Comparing archives
6543 " | \
6544   $at_diff - "$at_stdout" || at_failed=:
6545 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6546 $at_failed && at_fn_log_failure
6547 $at_traceon; }
6548
6549               { set +x
6550 $as_echo "$at_srcdir/append02.at:57:
6551 mkdir posix
6552 (cd posix
6553 TEST_TAR_FORMAT=posix
6554 export TEST_TAR_FORMAT
6555 TAR_OPTIONS=\"-H posix\"
6556 export TAR_OPTIONS
6557 rm -rf *
6558
6559 genfile --file file1
6560 genfile --file file2
6561
6562 # Make sure file timestamps in the archive will not differ
6563 MTIME=\"--mtime=@0\"
6564
6565 # For PAX archives, we need to make sure extended header names are
6566 # reproducible and that their contents won't change with time
6567 if test \$TEST_TAR_FORMAT = posix; then
6568   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
6569 fi
6570
6571 echo Creating archive.1
6572 tar \$MTIME -cf archive.1 file1 file2
6573
6574 echo Creating archive.2
6575 tar \$MTIME -cf archive.2 -T /dev/null
6576 tar \$MTIME -rf archive.2 file1
6577 tar \$MTIME -rf archive.2 file2
6578
6579 echo Comparing archives
6580 cmp archive.1 archive.2
6581 )"
6582 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
6583 ( $at_check_trace;
6584 mkdir posix
6585 (cd posix
6586 TEST_TAR_FORMAT=posix
6587 export TEST_TAR_FORMAT
6588 TAR_OPTIONS="-H posix"
6589 export TAR_OPTIONS
6590 rm -rf *
6591
6592 genfile --file file1
6593 genfile --file file2
6594
6595 # Make sure file timestamps in the archive will not differ
6596 MTIME="--mtime=@0"
6597
6598 # For PAX archives, we need to make sure extended header names are
6599 # reproducible and that their contents won't change with time
6600 if test $TEST_TAR_FORMAT = posix; then
6601   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
6602 fi
6603
6604 echo Creating archive.1
6605 tar $MTIME -cf archive.1 file1 file2
6606
6607 echo Creating archive.2
6608 tar $MTIME -cf archive.2 -T /dev/null
6609 tar $MTIME -rf archive.2 file1
6610 tar $MTIME -rf archive.2 file2
6611
6612 echo Comparing archives
6613 cmp archive.1 archive.2
6614 )
6615 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6616 at_status=$? at_failed=false
6617 $at_check_filter
6618 at_fn_diff_devnull "$at_stderr" || at_failed=:
6619 echo >>"$at_stdout"; $as_echo "Creating archive.1
6620 Creating archive.2
6621 Comparing archives
6622 " | \
6623   $at_diff - "$at_stdout" || at_failed=:
6624 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6625 $at_failed && at_fn_log_failure
6626 $at_traceon; }
6627
6628               { set +x
6629 $as_echo "$at_srcdir/append02.at:57:
6630 mkdir gnu
6631 (cd gnu
6632 TEST_TAR_FORMAT=gnu
6633 export TEST_TAR_FORMAT
6634 TAR_OPTIONS=\"-H gnu\"
6635 export TAR_OPTIONS
6636 rm -rf *
6637
6638 genfile --file file1
6639 genfile --file file2
6640
6641 # Make sure file timestamps in the archive will not differ
6642 MTIME=\"--mtime=@0\"
6643
6644 # For PAX archives, we need to make sure extended header names are
6645 # reproducible and that their contents won't change with time
6646 if test \$TEST_TAR_FORMAT = posix; then
6647   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
6648 fi
6649
6650 echo Creating archive.1
6651 tar \$MTIME -cf archive.1 file1 file2
6652
6653 echo Creating archive.2
6654 tar \$MTIME -cf archive.2 -T /dev/null
6655 tar \$MTIME -rf archive.2 file1
6656 tar \$MTIME -rf archive.2 file2
6657
6658 echo Comparing archives
6659 cmp archive.1 archive.2
6660 )"
6661 at_fn_check_prepare_notrace 'an embedded newline' "append02.at:57"
6662 ( $at_check_trace;
6663 mkdir gnu
6664 (cd gnu
6665 TEST_TAR_FORMAT=gnu
6666 export TEST_TAR_FORMAT
6667 TAR_OPTIONS="-H gnu"
6668 export TAR_OPTIONS
6669 rm -rf *
6670
6671 genfile --file file1
6672 genfile --file file2
6673
6674 # Make sure file timestamps in the archive will not differ
6675 MTIME="--mtime=@0"
6676
6677 # For PAX archives, we need to make sure extended header names are
6678 # reproducible and that their contents won't change with time
6679 if test $TEST_TAR_FORMAT = posix; then
6680   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
6681 fi
6682
6683 echo Creating archive.1
6684 tar $MTIME -cf archive.1 file1 file2
6685
6686 echo Creating archive.2
6687 tar $MTIME -cf archive.2 -T /dev/null
6688 tar $MTIME -rf archive.2 file1
6689 tar $MTIME -rf archive.2 file2
6690
6691 echo Comparing archives
6692 cmp archive.1 archive.2
6693 )
6694 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6695 at_status=$? at_failed=false
6696 $at_check_filter
6697 at_fn_diff_devnull "$at_stderr" || at_failed=:
6698 echo >>"$at_stdout"; $as_echo "Creating archive.1
6699 Creating archive.2
6700 Comparing archives
6701 " | \
6702   $at_diff - "$at_stdout" || at_failed=:
6703 at_fn_check_status 0 $at_status "$at_srcdir/append02.at:57"
6704 $at_failed && at_fn_log_failure
6705 $at_traceon; }
6706
6707
6708
6709
6710   set +x
6711   $at_times_p && times >"$at_times_file"
6712 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
6713 read at_status <"$at_status_file"
6714 #AT_STOP_30
6715 #AT_START_31
6716 at_fn_group_banner 31 'append03.at:21' \
6717   "append with name transformation" "                " 5
6718 at_xfail=no
6719       test -f $XFAILFILE && at_xfail=yes
6720 (
6721   $as_echo "31. $at_setup_line: testing $at_desc ..."
6722   $at_traceon
6723
6724
6725
6726 # Description: Make sure filenames are transformed during append.
6727
6728
6729
6730   { set +x
6731 $as_echo "$at_srcdir/append03.at:26:
6732 mkdir v7
6733 (cd v7
6734 TEST_TAR_FORMAT=v7
6735 export TEST_TAR_FORMAT
6736 TAR_OPTIONS=\"-H v7\"
6737 export TAR_OPTIONS
6738 rm -rf *
6739
6740 genfile --file file.1
6741 genfile --file file.2
6742
6743 tar -c -f archive --transform 's/file/plik/' file.*
6744 echo Appending
6745 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6746 echo Testing
6747 tar tf archive
6748 )"
6749 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6750 ( $at_check_trace;
6751 mkdir v7
6752 (cd v7
6753 TEST_TAR_FORMAT=v7
6754 export TEST_TAR_FORMAT
6755 TAR_OPTIONS="-H v7"
6756 export TAR_OPTIONS
6757 rm -rf *
6758
6759 genfile --file file.1
6760 genfile --file file.2
6761
6762 tar -c -f archive --transform 's/file/plik/' file.*
6763 echo Appending
6764 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6765 echo Testing
6766 tar tf archive
6767 )
6768 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6769 at_status=$? at_failed=false
6770 $at_check_filter
6771 at_fn_diff_devnull "$at_stderr" || at_failed=:
6772 echo >>"$at_stdout"; $as_echo "Appending
6773 plik.1
6774 Testing
6775 plik.1
6776 plik.2
6777 plik.1
6778 " | \
6779   $at_diff - "$at_stdout" || at_failed=:
6780 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6781 $at_failed && at_fn_log_failure
6782 $at_traceon; }
6783
6784               { set +x
6785 $as_echo "$at_srcdir/append03.at:26:
6786 mkdir oldgnu
6787 (cd oldgnu
6788 TEST_TAR_FORMAT=oldgnu
6789 export TEST_TAR_FORMAT
6790 TAR_OPTIONS=\"-H oldgnu\"
6791 export TAR_OPTIONS
6792 rm -rf *
6793
6794 genfile --file file.1
6795 genfile --file file.2
6796
6797 tar -c -f archive --transform 's/file/plik/' file.*
6798 echo Appending
6799 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6800 echo Testing
6801 tar tf archive
6802 )"
6803 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6804 ( $at_check_trace;
6805 mkdir oldgnu
6806 (cd oldgnu
6807 TEST_TAR_FORMAT=oldgnu
6808 export TEST_TAR_FORMAT
6809 TAR_OPTIONS="-H oldgnu"
6810 export TAR_OPTIONS
6811 rm -rf *
6812
6813 genfile --file file.1
6814 genfile --file file.2
6815
6816 tar -c -f archive --transform 's/file/plik/' file.*
6817 echo Appending
6818 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6819 echo Testing
6820 tar tf archive
6821 )
6822 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6823 at_status=$? at_failed=false
6824 $at_check_filter
6825 at_fn_diff_devnull "$at_stderr" || at_failed=:
6826 echo >>"$at_stdout"; $as_echo "Appending
6827 plik.1
6828 Testing
6829 plik.1
6830 plik.2
6831 plik.1
6832 " | \
6833   $at_diff - "$at_stdout" || at_failed=:
6834 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6835 $at_failed && at_fn_log_failure
6836 $at_traceon; }
6837
6838               { set +x
6839 $as_echo "$at_srcdir/append03.at:26:
6840 mkdir ustar
6841 (cd ustar
6842 TEST_TAR_FORMAT=ustar
6843 export TEST_TAR_FORMAT
6844 TAR_OPTIONS=\"-H ustar\"
6845 export TAR_OPTIONS
6846 rm -rf *
6847
6848 genfile --file file.1
6849 genfile --file file.2
6850
6851 tar -c -f archive --transform 's/file/plik/' file.*
6852 echo Appending
6853 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6854 echo Testing
6855 tar tf archive
6856 )"
6857 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6858 ( $at_check_trace;
6859 mkdir ustar
6860 (cd ustar
6861 TEST_TAR_FORMAT=ustar
6862 export TEST_TAR_FORMAT
6863 TAR_OPTIONS="-H ustar"
6864 export TAR_OPTIONS
6865 rm -rf *
6866
6867 genfile --file file.1
6868 genfile --file file.2
6869
6870 tar -c -f archive --transform 's/file/plik/' file.*
6871 echo Appending
6872 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6873 echo Testing
6874 tar tf archive
6875 )
6876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6877 at_status=$? at_failed=false
6878 $at_check_filter
6879 at_fn_diff_devnull "$at_stderr" || at_failed=:
6880 echo >>"$at_stdout"; $as_echo "Appending
6881 plik.1
6882 Testing
6883 plik.1
6884 plik.2
6885 plik.1
6886 " | \
6887   $at_diff - "$at_stdout" || at_failed=:
6888 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6889 $at_failed && at_fn_log_failure
6890 $at_traceon; }
6891
6892               { set +x
6893 $as_echo "$at_srcdir/append03.at:26:
6894 mkdir posix
6895 (cd posix
6896 TEST_TAR_FORMAT=posix
6897 export TEST_TAR_FORMAT
6898 TAR_OPTIONS=\"-H posix\"
6899 export TAR_OPTIONS
6900 rm -rf *
6901
6902 genfile --file file.1
6903 genfile --file file.2
6904
6905 tar -c -f archive --transform 's/file/plik/' file.*
6906 echo Appending
6907 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6908 echo Testing
6909 tar tf archive
6910 )"
6911 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6912 ( $at_check_trace;
6913 mkdir posix
6914 (cd posix
6915 TEST_TAR_FORMAT=posix
6916 export TEST_TAR_FORMAT
6917 TAR_OPTIONS="-H posix"
6918 export TAR_OPTIONS
6919 rm -rf *
6920
6921 genfile --file file.1
6922 genfile --file file.2
6923
6924 tar -c -f archive --transform 's/file/plik/' file.*
6925 echo Appending
6926 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6927 echo Testing
6928 tar tf archive
6929 )
6930 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6931 at_status=$? at_failed=false
6932 $at_check_filter
6933 at_fn_diff_devnull "$at_stderr" || at_failed=:
6934 echo >>"$at_stdout"; $as_echo "Appending
6935 plik.1
6936 Testing
6937 plik.1
6938 plik.2
6939 plik.1
6940 " | \
6941   $at_diff - "$at_stdout" || at_failed=:
6942 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6943 $at_failed && at_fn_log_failure
6944 $at_traceon; }
6945
6946               { set +x
6947 $as_echo "$at_srcdir/append03.at:26:
6948 mkdir gnu
6949 (cd gnu
6950 TEST_TAR_FORMAT=gnu
6951 export TEST_TAR_FORMAT
6952 TAR_OPTIONS=\"-H gnu\"
6953 export TAR_OPTIONS
6954 rm -rf *
6955
6956 genfile --file file.1
6957 genfile --file file.2
6958
6959 tar -c -f archive --transform 's/file/plik/' file.*
6960 echo Appending
6961 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6962 echo Testing
6963 tar tf archive
6964 )"
6965 at_fn_check_prepare_notrace 'an embedded newline' "append03.at:26"
6966 ( $at_check_trace;
6967 mkdir gnu
6968 (cd gnu
6969 TEST_TAR_FORMAT=gnu
6970 export TEST_TAR_FORMAT
6971 TAR_OPTIONS="-H gnu"
6972 export TAR_OPTIONS
6973 rm -rf *
6974
6975 genfile --file file.1
6976 genfile --file file.2
6977
6978 tar -c -f archive --transform 's/file/plik/' file.*
6979 echo Appending
6980 tar -r -f archive --transform 's/file/plik/' -v --show-transformed-names file.1
6981 echo Testing
6982 tar tf archive
6983 )
6984 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
6985 at_status=$? at_failed=false
6986 $at_check_filter
6987 at_fn_diff_devnull "$at_stderr" || at_failed=:
6988 echo >>"$at_stdout"; $as_echo "Appending
6989 plik.1
6990 Testing
6991 plik.1
6992 plik.2
6993 plik.1
6994 " | \
6995   $at_diff - "$at_stdout" || at_failed=:
6996 at_fn_check_status 0 $at_status "$at_srcdir/append03.at:26"
6997 $at_failed && at_fn_log_failure
6998 $at_traceon; }
6999
7000
7001
7002
7003   set +x
7004   $at_times_p && times >"$at_times_file"
7005 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7006 read at_status <"$at_status_file"
7007 #AT_STOP_31
7008 #AT_START_32
7009 at_fn_group_banner 32 'append04.at:29' \
7010   "append with verify" "                             " 5
7011 at_xfail=no
7012       test -f $XFAILFILE && at_xfail=yes
7013 (
7014   $as_echo "32. $at_setup_line: testing $at_desc ..."
7015   $at_traceon
7016
7017
7018
7019
7020
7021   { set +x
7022 $as_echo "$at_srcdir/append04.at:32:
7023 mkdir v7
7024 (cd v7
7025 TEST_TAR_FORMAT=v7
7026 export TEST_TAR_FORMAT
7027 TAR_OPTIONS=\"-H v7\"
7028 export TAR_OPTIONS
7029 rm -rf *
7030
7031 # Create two empty files:
7032 touch file1 file2
7033
7034 # Create an archive:
7035 tar cpfW archive.tar file1 file2
7036
7037 # Verify created archive by listing its content:
7038 tar -tf archive.tar
7039 echo ==
7040 # Create another empty file:
7041 touch file3
7042
7043 # Append it to the already created archive:
7044 tar rpfW archive.tar file3
7045
7046 # Verify content of the new archive:
7047 tar -tf archive.tar
7048 )"
7049 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
7050 ( $at_check_trace;
7051 mkdir v7
7052 (cd v7
7053 TEST_TAR_FORMAT=v7
7054 export TEST_TAR_FORMAT
7055 TAR_OPTIONS="-H v7"
7056 export TAR_OPTIONS
7057 rm -rf *
7058
7059 # Create two empty files:
7060 touch file1 file2
7061
7062 # Create an archive:
7063 tar cpfW archive.tar file1 file2
7064
7065 # Verify created archive by listing its content:
7066 tar -tf archive.tar
7067 echo ==
7068 # Create another empty file:
7069 touch file3
7070
7071 # Append it to the already created archive:
7072 tar rpfW archive.tar file3
7073
7074 # Verify content of the new archive:
7075 tar -tf archive.tar
7076 )
7077 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7078 at_status=$? at_failed=false
7079 $at_check_filter
7080 at_fn_diff_devnull "$at_stderr" || at_failed=:
7081 echo >>"$at_stdout"; $as_echo "file1
7082 file2
7083 ==
7084 file1
7085 file2
7086 file3
7087 " | \
7088   $at_diff - "$at_stdout" || at_failed=:
7089 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
7090 $at_failed && at_fn_log_failure
7091 $at_traceon; }
7092
7093               { set +x
7094 $as_echo "$at_srcdir/append04.at:32:
7095 mkdir oldgnu
7096 (cd oldgnu
7097 TEST_TAR_FORMAT=oldgnu
7098 export TEST_TAR_FORMAT
7099 TAR_OPTIONS=\"-H oldgnu\"
7100 export TAR_OPTIONS
7101 rm -rf *
7102
7103 # Create two empty files:
7104 touch file1 file2
7105
7106 # Create an archive:
7107 tar cpfW archive.tar file1 file2
7108
7109 # Verify created archive by listing its content:
7110 tar -tf archive.tar
7111 echo ==
7112 # Create another empty file:
7113 touch file3
7114
7115 # Append it to the already created archive:
7116 tar rpfW archive.tar file3
7117
7118 # Verify content of the new archive:
7119 tar -tf archive.tar
7120 )"
7121 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
7122 ( $at_check_trace;
7123 mkdir oldgnu
7124 (cd oldgnu
7125 TEST_TAR_FORMAT=oldgnu
7126 export TEST_TAR_FORMAT
7127 TAR_OPTIONS="-H oldgnu"
7128 export TAR_OPTIONS
7129 rm -rf *
7130
7131 # Create two empty files:
7132 touch file1 file2
7133
7134 # Create an archive:
7135 tar cpfW archive.tar file1 file2
7136
7137 # Verify created archive by listing its content:
7138 tar -tf archive.tar
7139 echo ==
7140 # Create another empty file:
7141 touch file3
7142
7143 # Append it to the already created archive:
7144 tar rpfW archive.tar file3
7145
7146 # Verify content of the new archive:
7147 tar -tf archive.tar
7148 )
7149 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7150 at_status=$? at_failed=false
7151 $at_check_filter
7152 at_fn_diff_devnull "$at_stderr" || at_failed=:
7153 echo >>"$at_stdout"; $as_echo "file1
7154 file2
7155 ==
7156 file1
7157 file2
7158 file3
7159 " | \
7160   $at_diff - "$at_stdout" || at_failed=:
7161 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
7162 $at_failed && at_fn_log_failure
7163 $at_traceon; }
7164
7165               { set +x
7166 $as_echo "$at_srcdir/append04.at:32:
7167 mkdir ustar
7168 (cd ustar
7169 TEST_TAR_FORMAT=ustar
7170 export TEST_TAR_FORMAT
7171 TAR_OPTIONS=\"-H ustar\"
7172 export TAR_OPTIONS
7173 rm -rf *
7174
7175 # Create two empty files:
7176 touch file1 file2
7177
7178 # Create an archive:
7179 tar cpfW archive.tar file1 file2
7180
7181 # Verify created archive by listing its content:
7182 tar -tf archive.tar
7183 echo ==
7184 # Create another empty file:
7185 touch file3
7186
7187 # Append it to the already created archive:
7188 tar rpfW archive.tar file3
7189
7190 # Verify content of the new archive:
7191 tar -tf archive.tar
7192 )"
7193 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
7194 ( $at_check_trace;
7195 mkdir ustar
7196 (cd ustar
7197 TEST_TAR_FORMAT=ustar
7198 export TEST_TAR_FORMAT
7199 TAR_OPTIONS="-H ustar"
7200 export TAR_OPTIONS
7201 rm -rf *
7202
7203 # Create two empty files:
7204 touch file1 file2
7205
7206 # Create an archive:
7207 tar cpfW archive.tar file1 file2
7208
7209 # Verify created archive by listing its content:
7210 tar -tf archive.tar
7211 echo ==
7212 # Create another empty file:
7213 touch file3
7214
7215 # Append it to the already created archive:
7216 tar rpfW archive.tar file3
7217
7218 # Verify content of the new archive:
7219 tar -tf archive.tar
7220 )
7221 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7222 at_status=$? at_failed=false
7223 $at_check_filter
7224 at_fn_diff_devnull "$at_stderr" || at_failed=:
7225 echo >>"$at_stdout"; $as_echo "file1
7226 file2
7227 ==
7228 file1
7229 file2
7230 file3
7231 " | \
7232   $at_diff - "$at_stdout" || at_failed=:
7233 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
7234 $at_failed && at_fn_log_failure
7235 $at_traceon; }
7236
7237               { set +x
7238 $as_echo "$at_srcdir/append04.at:32:
7239 mkdir posix
7240 (cd posix
7241 TEST_TAR_FORMAT=posix
7242 export TEST_TAR_FORMAT
7243 TAR_OPTIONS=\"-H posix\"
7244 export TAR_OPTIONS
7245 rm -rf *
7246
7247 # Create two empty files:
7248 touch file1 file2
7249
7250 # Create an archive:
7251 tar cpfW archive.tar file1 file2
7252
7253 # Verify created archive by listing its content:
7254 tar -tf archive.tar
7255 echo ==
7256 # Create another empty file:
7257 touch file3
7258
7259 # Append it to the already created archive:
7260 tar rpfW archive.tar file3
7261
7262 # Verify content of the new archive:
7263 tar -tf archive.tar
7264 )"
7265 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
7266 ( $at_check_trace;
7267 mkdir posix
7268 (cd posix
7269 TEST_TAR_FORMAT=posix
7270 export TEST_TAR_FORMAT
7271 TAR_OPTIONS="-H posix"
7272 export TAR_OPTIONS
7273 rm -rf *
7274
7275 # Create two empty files:
7276 touch file1 file2
7277
7278 # Create an archive:
7279 tar cpfW archive.tar file1 file2
7280
7281 # Verify created archive by listing its content:
7282 tar -tf archive.tar
7283 echo ==
7284 # Create another empty file:
7285 touch file3
7286
7287 # Append it to the already created archive:
7288 tar rpfW archive.tar file3
7289
7290 # Verify content of the new archive:
7291 tar -tf archive.tar
7292 )
7293 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7294 at_status=$? at_failed=false
7295 $at_check_filter
7296 at_fn_diff_devnull "$at_stderr" || at_failed=:
7297 echo >>"$at_stdout"; $as_echo "file1
7298 file2
7299 ==
7300 file1
7301 file2
7302 file3
7303 " | \
7304   $at_diff - "$at_stdout" || at_failed=:
7305 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
7306 $at_failed && at_fn_log_failure
7307 $at_traceon; }
7308
7309               { set +x
7310 $as_echo "$at_srcdir/append04.at:32:
7311 mkdir gnu
7312 (cd gnu
7313 TEST_TAR_FORMAT=gnu
7314 export TEST_TAR_FORMAT
7315 TAR_OPTIONS=\"-H gnu\"
7316 export TAR_OPTIONS
7317 rm -rf *
7318
7319 # Create two empty files:
7320 touch file1 file2
7321
7322 # Create an archive:
7323 tar cpfW archive.tar file1 file2
7324
7325 # Verify created archive by listing its content:
7326 tar -tf archive.tar
7327 echo ==
7328 # Create another empty file:
7329 touch file3
7330
7331 # Append it to the already created archive:
7332 tar rpfW archive.tar file3
7333
7334 # Verify content of the new archive:
7335 tar -tf archive.tar
7336 )"
7337 at_fn_check_prepare_notrace 'an embedded newline' "append04.at:32"
7338 ( $at_check_trace;
7339 mkdir gnu
7340 (cd gnu
7341 TEST_TAR_FORMAT=gnu
7342 export TEST_TAR_FORMAT
7343 TAR_OPTIONS="-H gnu"
7344 export TAR_OPTIONS
7345 rm -rf *
7346
7347 # Create two empty files:
7348 touch file1 file2
7349
7350 # Create an archive:
7351 tar cpfW archive.tar file1 file2
7352
7353 # Verify created archive by listing its content:
7354 tar -tf archive.tar
7355 echo ==
7356 # Create another empty file:
7357 touch file3
7358
7359 # Append it to the already created archive:
7360 tar rpfW archive.tar file3
7361
7362 # Verify content of the new archive:
7363 tar -tf archive.tar
7364 )
7365 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7366 at_status=$? at_failed=false
7367 $at_check_filter
7368 at_fn_diff_devnull "$at_stderr" || at_failed=:
7369 echo >>"$at_stdout"; $as_echo "file1
7370 file2
7371 ==
7372 file1
7373 file2
7374 file3
7375 " | \
7376   $at_diff - "$at_stdout" || at_failed=:
7377 at_fn_check_status 0 $at_status "$at_srcdir/append04.at:32"
7378 $at_failed && at_fn_log_failure
7379 $at_traceon; }
7380
7381
7382
7383
7384   set +x
7385   $at_times_p && times >"$at_times_file"
7386 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7387 read at_status <"$at_status_file"
7388 #AT_STOP_32
7389 #AT_START_33
7390 at_fn_group_banner 33 'xform-h.at:30' \
7391   "transforming hard links on create" "              " 6
7392 at_xfail=no
7393       test -f $XFAILFILE && at_xfail=yes
7394 (
7395   $as_echo "33. $at_setup_line: testing $at_desc ..."
7396   $at_traceon
7397
7398
7399
7400
7401
7402
7403
7404   { set +x
7405 $as_echo "$at_srcdir/xform-h.at:39:
7406 mkdir v7
7407 (cd v7
7408 TEST_TAR_FORMAT=v7
7409 export TEST_TAR_FORMAT
7410 TAR_OPTIONS=\"-H v7\"
7411 export TAR_OPTIONS
7412 rm -rf *
7413
7414 mkdir basedir
7415 echo \"hello\" > basedir/test
7416 ln basedir/test basedir/test_link
7417
7418
7419 echo \"Default transform scope\"
7420 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7421 tar tvf archive | sed -n 's/.*test_link link to //p'
7422
7423
7424 echo \"Transforming hard links\"
7425 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7426 tar tvf archive | sed -n 's/.*test_link link to //p'
7427
7428
7429 echo \"Not transforming hard links\"
7430 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7431 tar tvf archive | sed -n 's/.*test_link link to //p'
7432
7433 )"
7434 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7435 ( $at_check_trace;
7436 mkdir v7
7437 (cd v7
7438 TEST_TAR_FORMAT=v7
7439 export TEST_TAR_FORMAT
7440 TAR_OPTIONS="-H v7"
7441 export TAR_OPTIONS
7442 rm -rf *
7443
7444 mkdir basedir
7445 echo "hello" > basedir/test
7446 ln basedir/test basedir/test_link
7447
7448
7449 echo "Default transform scope"
7450 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7451 tar tvf archive | sed -n 's/.*test_link link to //p'
7452
7453
7454 echo "Transforming hard links"
7455 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7456 tar tvf archive | sed -n 's/.*test_link link to //p'
7457
7458
7459 echo "Not transforming hard links"
7460 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7461 tar tvf archive | sed -n 's/.*test_link link to //p'
7462
7463 )
7464 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7465 at_status=$? at_failed=false
7466 $at_check_filter
7467 at_fn_diff_devnull "$at_stderr" || at_failed=:
7468 echo >>"$at_stdout"; $as_echo "Default transform scope
7469 test
7470 Transforming hard links
7471 test
7472 Not transforming hard links
7473 basedir/test
7474 " | \
7475   $at_diff - "$at_stdout" || at_failed=:
7476 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7477 $at_failed && at_fn_log_failure
7478 $at_traceon; }
7479
7480               { set +x
7481 $as_echo "$at_srcdir/xform-h.at:39:
7482 mkdir oldgnu
7483 (cd oldgnu
7484 TEST_TAR_FORMAT=oldgnu
7485 export TEST_TAR_FORMAT
7486 TAR_OPTIONS=\"-H oldgnu\"
7487 export TAR_OPTIONS
7488 rm -rf *
7489
7490 mkdir basedir
7491 echo \"hello\" > basedir/test
7492 ln basedir/test basedir/test_link
7493
7494
7495 echo \"Default transform scope\"
7496 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7497 tar tvf archive | sed -n 's/.*test_link link to //p'
7498
7499
7500 echo \"Transforming hard links\"
7501 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7502 tar tvf archive | sed -n 's/.*test_link link to //p'
7503
7504
7505 echo \"Not transforming hard links\"
7506 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7507 tar tvf archive | sed -n 's/.*test_link link to //p'
7508
7509 )"
7510 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7511 ( $at_check_trace;
7512 mkdir oldgnu
7513 (cd oldgnu
7514 TEST_TAR_FORMAT=oldgnu
7515 export TEST_TAR_FORMAT
7516 TAR_OPTIONS="-H oldgnu"
7517 export TAR_OPTIONS
7518 rm -rf *
7519
7520 mkdir basedir
7521 echo "hello" > basedir/test
7522 ln basedir/test basedir/test_link
7523
7524
7525 echo "Default transform scope"
7526 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7527 tar tvf archive | sed -n 's/.*test_link link to //p'
7528
7529
7530 echo "Transforming hard links"
7531 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7532 tar tvf archive | sed -n 's/.*test_link link to //p'
7533
7534
7535 echo "Not transforming hard links"
7536 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7537 tar tvf archive | sed -n 's/.*test_link link to //p'
7538
7539 )
7540 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7541 at_status=$? at_failed=false
7542 $at_check_filter
7543 at_fn_diff_devnull "$at_stderr" || at_failed=:
7544 echo >>"$at_stdout"; $as_echo "Default transform scope
7545 test
7546 Transforming hard links
7547 test
7548 Not transforming hard links
7549 basedir/test
7550 " | \
7551   $at_diff - "$at_stdout" || at_failed=:
7552 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7553 $at_failed && at_fn_log_failure
7554 $at_traceon; }
7555
7556               { set +x
7557 $as_echo "$at_srcdir/xform-h.at:39:
7558 mkdir ustar
7559 (cd ustar
7560 TEST_TAR_FORMAT=ustar
7561 export TEST_TAR_FORMAT
7562 TAR_OPTIONS=\"-H ustar\"
7563 export TAR_OPTIONS
7564 rm -rf *
7565
7566 mkdir basedir
7567 echo \"hello\" > basedir/test
7568 ln basedir/test basedir/test_link
7569
7570
7571 echo \"Default transform scope\"
7572 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7573 tar tvf archive | sed -n 's/.*test_link link to //p'
7574
7575
7576 echo \"Transforming hard links\"
7577 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7578 tar tvf archive | sed -n 's/.*test_link link to //p'
7579
7580
7581 echo \"Not transforming hard links\"
7582 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7583 tar tvf archive | sed -n 's/.*test_link link to //p'
7584
7585 )"
7586 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7587 ( $at_check_trace;
7588 mkdir ustar
7589 (cd ustar
7590 TEST_TAR_FORMAT=ustar
7591 export TEST_TAR_FORMAT
7592 TAR_OPTIONS="-H ustar"
7593 export TAR_OPTIONS
7594 rm -rf *
7595
7596 mkdir basedir
7597 echo "hello" > basedir/test
7598 ln basedir/test basedir/test_link
7599
7600
7601 echo "Default transform scope"
7602 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7603 tar tvf archive | sed -n 's/.*test_link link to //p'
7604
7605
7606 echo "Transforming hard links"
7607 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7608 tar tvf archive | sed -n 's/.*test_link link to //p'
7609
7610
7611 echo "Not transforming hard links"
7612 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7613 tar tvf archive | sed -n 's/.*test_link link to //p'
7614
7615 )
7616 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7617 at_status=$? at_failed=false
7618 $at_check_filter
7619 at_fn_diff_devnull "$at_stderr" || at_failed=:
7620 echo >>"$at_stdout"; $as_echo "Default transform scope
7621 test
7622 Transforming hard links
7623 test
7624 Not transforming hard links
7625 basedir/test
7626 " | \
7627   $at_diff - "$at_stdout" || at_failed=:
7628 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7629 $at_failed && at_fn_log_failure
7630 $at_traceon; }
7631
7632               { set +x
7633 $as_echo "$at_srcdir/xform-h.at:39:
7634 mkdir posix
7635 (cd posix
7636 TEST_TAR_FORMAT=posix
7637 export TEST_TAR_FORMAT
7638 TAR_OPTIONS=\"-H posix\"
7639 export TAR_OPTIONS
7640 rm -rf *
7641
7642 mkdir basedir
7643 echo \"hello\" > basedir/test
7644 ln basedir/test basedir/test_link
7645
7646
7647 echo \"Default transform scope\"
7648 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7649 tar tvf archive | sed -n 's/.*test_link link to //p'
7650
7651
7652 echo \"Transforming hard links\"
7653 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7654 tar tvf archive | sed -n 's/.*test_link link to //p'
7655
7656
7657 echo \"Not transforming hard links\"
7658 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7659 tar tvf archive | sed -n 's/.*test_link link to //p'
7660
7661 )"
7662 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7663 ( $at_check_trace;
7664 mkdir posix
7665 (cd posix
7666 TEST_TAR_FORMAT=posix
7667 export TEST_TAR_FORMAT
7668 TAR_OPTIONS="-H posix"
7669 export TAR_OPTIONS
7670 rm -rf *
7671
7672 mkdir basedir
7673 echo "hello" > basedir/test
7674 ln basedir/test basedir/test_link
7675
7676
7677 echo "Default transform scope"
7678 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7679 tar tvf archive | sed -n 's/.*test_link link to //p'
7680
7681
7682 echo "Transforming hard links"
7683 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7684 tar tvf archive | sed -n 's/.*test_link link to //p'
7685
7686
7687 echo "Not transforming hard links"
7688 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7689 tar tvf archive | sed -n 's/.*test_link link to //p'
7690
7691 )
7692 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7693 at_status=$? at_failed=false
7694 $at_check_filter
7695 at_fn_diff_devnull "$at_stderr" || at_failed=:
7696 echo >>"$at_stdout"; $as_echo "Default transform scope
7697 test
7698 Transforming hard links
7699 test
7700 Not transforming hard links
7701 basedir/test
7702 " | \
7703   $at_diff - "$at_stdout" || at_failed=:
7704 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7705 $at_failed && at_fn_log_failure
7706 $at_traceon; }
7707
7708               { set +x
7709 $as_echo "$at_srcdir/xform-h.at:39:
7710 mkdir gnu
7711 (cd gnu
7712 TEST_TAR_FORMAT=gnu
7713 export TEST_TAR_FORMAT
7714 TAR_OPTIONS=\"-H gnu\"
7715 export TAR_OPTIONS
7716 rm -rf *
7717
7718 mkdir basedir
7719 echo \"hello\" > basedir/test
7720 ln basedir/test basedir/test_link
7721
7722
7723 echo \"Default transform scope\"
7724 tar cf archive --transform=\"s,^basedir/,,\" basedir/test basedir/test_link
7725 tar tvf archive | sed -n 's/.*test_link link to //p'
7726
7727
7728 echo \"Transforming hard links\"
7729 tar cf archive --transform=\"s,^basedir/,,h\" basedir/test basedir/test_link
7730 tar tvf archive | sed -n 's/.*test_link link to //p'
7731
7732
7733 echo \"Not transforming hard links\"
7734 tar cf archive --transform=\"s,^basedir/,,H\" basedir/test basedir/test_link
7735 tar tvf archive | sed -n 's/.*test_link link to //p'
7736
7737 )"
7738 at_fn_check_prepare_notrace 'an embedded newline' "xform-h.at:39"
7739 ( $at_check_trace;
7740 mkdir gnu
7741 (cd gnu
7742 TEST_TAR_FORMAT=gnu
7743 export TEST_TAR_FORMAT
7744 TAR_OPTIONS="-H gnu"
7745 export TAR_OPTIONS
7746 rm -rf *
7747
7748 mkdir basedir
7749 echo "hello" > basedir/test
7750 ln basedir/test basedir/test_link
7751
7752
7753 echo "Default transform scope"
7754 tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link
7755 tar tvf archive | sed -n 's/.*test_link link to //p'
7756
7757
7758 echo "Transforming hard links"
7759 tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link
7760 tar tvf archive | sed -n 's/.*test_link link to //p'
7761
7762
7763 echo "Not transforming hard links"
7764 tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link
7765 tar tvf archive | sed -n 's/.*test_link link to //p'
7766
7767 )
7768 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7769 at_status=$? at_failed=false
7770 $at_check_filter
7771 at_fn_diff_devnull "$at_stderr" || at_failed=:
7772 echo >>"$at_stdout"; $as_echo "Default transform scope
7773 test
7774 Transforming hard links
7775 test
7776 Not transforming hard links
7777 basedir/test
7778 " | \
7779   $at_diff - "$at_stdout" || at_failed=:
7780 at_fn_check_status 0 $at_status "$at_srcdir/xform-h.at:39"
7781 $at_failed && at_fn_log_failure
7782 $at_traceon; }
7783
7784
7785
7786
7787
7788
7789   set +x
7790   $at_times_p && times >"$at_times_file"
7791 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7792 read at_status <"$at_status_file"
7793 #AT_STOP_33
7794 #AT_START_34
7795 at_fn_group_banner 34 'xform01.at:26' \
7796   "transformations and GNU volume labels" "          " 6
7797 at_xfail=no
7798       test -f $XFAILFILE && at_xfail=yes
7799 (
7800   $as_echo "34. $at_setup_line: testing $at_desc ..."
7801   $at_traceon
7802
7803
7804
7805
7806
7807   { set +x
7808 $as_echo "$at_srcdir/xform01.at:29:
7809 mkdir gnu
7810 (cd gnu
7811 TEST_TAR_FORMAT=gnu
7812 export TEST_TAR_FORMAT
7813 TAR_OPTIONS=\"-H gnu\"
7814 export TAR_OPTIONS
7815 rm -rf *
7816
7817 genfile --file file
7818 tar -cf archive.tar -V /label/ file
7819 tar tf archive.tar
7820 )"
7821 at_fn_check_prepare_notrace 'an embedded newline' "xform01.at:29"
7822 ( $at_check_trace;
7823 mkdir gnu
7824 (cd gnu
7825 TEST_TAR_FORMAT=gnu
7826 export TEST_TAR_FORMAT
7827 TAR_OPTIONS="-H gnu"
7828 export TAR_OPTIONS
7829 rm -rf *
7830
7831 genfile --file file
7832 tar -cf archive.tar -V /label/ file
7833 tar tf archive.tar
7834 )
7835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7836 at_status=$? at_failed=false
7837 $at_check_filter
7838 at_fn_diff_devnull "$at_stderr" || at_failed=:
7839 echo >>"$at_stdout"; $as_echo "/label/
7840 file
7841 " | \
7842   $at_diff - "$at_stdout" || at_failed=:
7843 at_fn_check_status 0 $at_status "$at_srcdir/xform01.at:29"
7844 $at_failed && at_fn_log_failure
7845 $at_traceon; }
7846
7847
7848
7849
7850   set +x
7851   $at_times_p && times >"$at_times_file"
7852 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
7853 read at_status <"$at_status_file"
7854 #AT_STOP_34
7855 #AT_START_35
7856 at_fn_group_banner 35 'exclude.at:23' \
7857   "exclude" "                                        " 7
7858 at_xfail=no
7859       test -f $XFAILFILE && at_xfail=yes
7860 (
7861   $as_echo "35. $at_setup_line: testing $at_desc ..."
7862   $at_traceon
7863
7864
7865
7866
7867
7868   { set +x
7869 $as_echo "$at_srcdir/exclude.at:26:
7870 mkdir ustar
7871 (cd ustar
7872 TEST_TAR_FORMAT=ustar
7873 export TEST_TAR_FORMAT
7874 TAR_OPTIONS=\"-H ustar\"
7875 export TAR_OPTIONS
7876 rm -rf *
7877
7878
7879 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
7880
7881
7882 mkdir dir
7883 echo blues > dir/blues
7884 echo jazz > dir/jazz
7885 mkdir dir/folk
7886 echo tagfile > dir/folk/tagfile
7887 echo sanjuan > dir/folk/sanjuan
7888 mkdir dir/rock
7889 echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG
7890 echo \"test\" > dir/rock/file
7891
7892 for option in exclude-caches exclude-caches-under exclude-caches-all
7893 do
7894   echo OPTION \$option
7895   tar -cf archive.tar --\$option -v dir 2>err | sort
7896   cat err
7897   echo ARCHIVE
7898   tar tf archive.tar | sort
7899 done
7900
7901 for option in exclude-tag exclude-tag-under exclude-tag-all
7902 do
7903   echo OPTION \$option
7904   tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort
7905   cat err
7906   echo ARCHIVE
7907   tar tf archive.tar | sort
7908 done
7909 )"
7910 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude.at:26"
7911 ( $at_check_trace;
7912 mkdir ustar
7913 (cd ustar
7914 TEST_TAR_FORMAT=ustar
7915 export TEST_TAR_FORMAT
7916 TAR_OPTIONS="-H ustar"
7917 export TAR_OPTIONS
7918 rm -rf *
7919
7920
7921 test -z "`sort < /dev/null 2>&1`" || exit 77
7922
7923
7924 mkdir dir
7925 echo blues > dir/blues
7926 echo jazz > dir/jazz
7927 mkdir dir/folk
7928 echo tagfile > dir/folk/tagfile
7929 echo sanjuan > dir/folk/sanjuan
7930 mkdir dir/rock
7931 echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
7932 echo "test" > dir/rock/file
7933
7934 for option in exclude-caches exclude-caches-under exclude-caches-all
7935 do
7936   echo OPTION $option
7937   tar -cf archive.tar --$option -v dir 2>err | sort
7938   cat err
7939   echo ARCHIVE
7940   tar tf archive.tar | sort
7941 done
7942
7943 for option in exclude-tag exclude-tag-under exclude-tag-all
7944 do
7945   echo OPTION $option
7946   tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
7947   cat err
7948   echo ARCHIVE
7949   tar tf archive.tar | sort
7950 done
7951 )
7952 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
7953 at_status=$? at_failed=false
7954 $at_check_filter
7955 at_fn_diff_devnull "$at_stderr" || at_failed=:
7956 echo >>"$at_stdout"; $as_echo "OPTION exclude-caches
7957 dir/
7958 dir/blues
7959 dir/folk/
7960 dir/folk/sanjuan
7961 dir/folk/tagfile
7962 dir/jazz
7963 dir/rock/
7964 dir/rock/CACHEDIR.TAG
7965 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
7966 ARCHIVE
7967 dir/
7968 dir/blues
7969 dir/folk/
7970 dir/folk/sanjuan
7971 dir/folk/tagfile
7972 dir/jazz
7973 dir/rock/
7974 dir/rock/CACHEDIR.TAG
7975 OPTION exclude-caches-under
7976 dir/
7977 dir/blues
7978 dir/folk/
7979 dir/folk/sanjuan
7980 dir/folk/tagfile
7981 dir/jazz
7982 dir/rock/
7983 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
7984 ARCHIVE
7985 dir/
7986 dir/blues
7987 dir/folk/
7988 dir/folk/sanjuan
7989 dir/folk/tagfile
7990 dir/jazz
7991 dir/rock/
7992 OPTION exclude-caches-all
7993 dir/
7994 dir/blues
7995 dir/folk/
7996 dir/folk/sanjuan
7997 dir/folk/tagfile
7998 dir/jazz
7999 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
8000 ARCHIVE
8001 dir/
8002 dir/blues
8003 dir/folk/
8004 dir/folk/sanjuan
8005 dir/folk/tagfile
8006 dir/jazz
8007 OPTION exclude-tag
8008 dir/
8009 dir/blues
8010 dir/folk/
8011 dir/folk/tagfile
8012 dir/jazz
8013 dir/rock/
8014 dir/rock/CACHEDIR.TAG
8015 dir/rock/file
8016 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
8017 ARCHIVE
8018 dir/
8019 dir/blues
8020 dir/folk/
8021 dir/folk/tagfile
8022 dir/jazz
8023 dir/rock/
8024 dir/rock/CACHEDIR.TAG
8025 dir/rock/file
8026 OPTION exclude-tag-under
8027 dir/
8028 dir/blues
8029 dir/folk/
8030 dir/jazz
8031 dir/rock/
8032 dir/rock/CACHEDIR.TAG
8033 dir/rock/file
8034 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
8035 ARCHIVE
8036 dir/
8037 dir/blues
8038 dir/folk/
8039 dir/jazz
8040 dir/rock/
8041 dir/rock/CACHEDIR.TAG
8042 dir/rock/file
8043 OPTION exclude-tag-all
8044 dir/
8045 dir/blues
8046 dir/jazz
8047 dir/rock/
8048 dir/rock/CACHEDIR.TAG
8049 dir/rock/file
8050 tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
8051 ARCHIVE
8052 dir/
8053 dir/blues
8054 dir/jazz
8055 dir/rock/
8056 dir/rock/CACHEDIR.TAG
8057 dir/rock/file
8058 " | \
8059   $at_diff - "$at_stdout" || at_failed=:
8060 at_fn_check_status 0 $at_status "$at_srcdir/exclude.at:26"
8061 $at_failed && at_fn_log_failure
8062 $at_traceon; }
8063
8064
8065
8066
8067   set +x
8068   $at_times_p && times >"$at_times_file"
8069 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8070 read at_status <"$at_status_file"
8071 #AT_STOP_35
8072 #AT_START_36
8073 at_fn_group_banner 36 'exclude01.at:19' \
8074   "exclude wildcards" "                              " 7
8075 at_xfail=no
8076       test -f $XFAILFILE && at_xfail=yes
8077 (
8078   $as_echo "36. $at_setup_line: testing $at_desc ..."
8079   $at_traceon
8080
8081
8082
8083
8084
8085   { set +x
8086 $as_echo "$at_srcdir/exclude01.at:22:
8087 mkdir v7
8088 (cd v7
8089 TEST_TAR_FORMAT=v7
8090 export TEST_TAR_FORMAT
8091 TAR_OPTIONS=\"-H v7\"
8092 export TAR_OPTIONS
8093 rm -rf *
8094
8095
8096 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8097
8098
8099 rm -rf testdir
8100 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8101 touch testdir/dir1/file1
8102 touch testdir/dir1/\\*
8103 touch testdir/dir2/file2
8104 touch testdir/dir2/\\*
8105 touch testdir/dir3/file3
8106 touch testdir/dir3/\\*
8107
8108 tar cf archive --exclude=testdir/dir1/\\* \\
8109                --no-wildcards \\
8110                --exclude=testdir/dir2/\\* \\
8111                --wildcards \\
8112                --exclude=testdir/dir3/\\* \\
8113                testdir
8114 tar tf archive | sort
8115
8116 echo \"NEXT\"
8117 tar cf archive testdir
8118 tar t \"testdir/dir1/*\" -f archive | sort
8119
8120 echo \"NEXT\"
8121 tar cf archive testdir/dir1
8122 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
8123
8124 echo \"NEXT\"
8125 tar cf archive testdir
8126 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
8127
8128 rm -rf testdir
8129 )"
8130 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
8131 ( $at_check_trace;
8132 mkdir v7
8133 (cd v7
8134 TEST_TAR_FORMAT=v7
8135 export TEST_TAR_FORMAT
8136 TAR_OPTIONS="-H v7"
8137 export TAR_OPTIONS
8138 rm -rf *
8139
8140
8141 test -z "`sort < /dev/null 2>&1`" || exit 77
8142
8143
8144 rm -rf testdir
8145 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8146 touch testdir/dir1/file1
8147 touch testdir/dir1/\*
8148 touch testdir/dir2/file2
8149 touch testdir/dir2/\*
8150 touch testdir/dir3/file3
8151 touch testdir/dir3/\*
8152
8153 tar cf archive --exclude=testdir/dir1/\* \
8154                --no-wildcards \
8155                --exclude=testdir/dir2/\* \
8156                --wildcards \
8157                --exclude=testdir/dir3/\* \
8158                testdir
8159 tar tf archive | sort
8160
8161 echo "NEXT"
8162 tar cf archive testdir
8163 tar t "testdir/dir1/*" -f archive | sort
8164
8165 echo "NEXT"
8166 tar cf archive testdir/dir1
8167 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
8168
8169 echo "NEXT"
8170 tar cf archive testdir
8171 tar t --wildcards "testdir/dir1/*" -f archive | sort
8172
8173 rm -rf testdir
8174 )
8175 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8176 at_status=$? at_failed=false
8177 $at_check_filter
8178 at_fn_diff_devnull "$at_stderr" || at_failed=:
8179 echo >>"$at_stdout"; $as_echo "testdir/
8180 testdir/dir1/
8181 testdir/dir2/
8182 testdir/dir2/file2
8183 testdir/dir3/
8184 NEXT
8185 testdir/dir1/*
8186 NEXT
8187 testdir/dir1/*
8188 NEXT
8189 testdir/dir1/*
8190 testdir/dir1/file1
8191 " | \
8192   $at_diff - "$at_stdout" || at_failed=:
8193 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
8194 $at_failed && at_fn_log_failure
8195 $at_traceon; }
8196
8197               { set +x
8198 $as_echo "$at_srcdir/exclude01.at:22:
8199 mkdir oldgnu
8200 (cd oldgnu
8201 TEST_TAR_FORMAT=oldgnu
8202 export TEST_TAR_FORMAT
8203 TAR_OPTIONS=\"-H oldgnu\"
8204 export TAR_OPTIONS
8205 rm -rf *
8206
8207
8208 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8209
8210
8211 rm -rf testdir
8212 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8213 touch testdir/dir1/file1
8214 touch testdir/dir1/\\*
8215 touch testdir/dir2/file2
8216 touch testdir/dir2/\\*
8217 touch testdir/dir3/file3
8218 touch testdir/dir3/\\*
8219
8220 tar cf archive --exclude=testdir/dir1/\\* \\
8221                --no-wildcards \\
8222                --exclude=testdir/dir2/\\* \\
8223                --wildcards \\
8224                --exclude=testdir/dir3/\\* \\
8225                testdir
8226 tar tf archive | sort
8227
8228 echo \"NEXT\"
8229 tar cf archive testdir
8230 tar t \"testdir/dir1/*\" -f archive | sort
8231
8232 echo \"NEXT\"
8233 tar cf archive testdir/dir1
8234 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
8235
8236 echo \"NEXT\"
8237 tar cf archive testdir
8238 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
8239
8240 rm -rf testdir
8241 )"
8242 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
8243 ( $at_check_trace;
8244 mkdir oldgnu
8245 (cd oldgnu
8246 TEST_TAR_FORMAT=oldgnu
8247 export TEST_TAR_FORMAT
8248 TAR_OPTIONS="-H oldgnu"
8249 export TAR_OPTIONS
8250 rm -rf *
8251
8252
8253 test -z "`sort < /dev/null 2>&1`" || exit 77
8254
8255
8256 rm -rf testdir
8257 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8258 touch testdir/dir1/file1
8259 touch testdir/dir1/\*
8260 touch testdir/dir2/file2
8261 touch testdir/dir2/\*
8262 touch testdir/dir3/file3
8263 touch testdir/dir3/\*
8264
8265 tar cf archive --exclude=testdir/dir1/\* \
8266                --no-wildcards \
8267                --exclude=testdir/dir2/\* \
8268                --wildcards \
8269                --exclude=testdir/dir3/\* \
8270                testdir
8271 tar tf archive | sort
8272
8273 echo "NEXT"
8274 tar cf archive testdir
8275 tar t "testdir/dir1/*" -f archive | sort
8276
8277 echo "NEXT"
8278 tar cf archive testdir/dir1
8279 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
8280
8281 echo "NEXT"
8282 tar cf archive testdir
8283 tar t --wildcards "testdir/dir1/*" -f archive | sort
8284
8285 rm -rf testdir
8286 )
8287 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8288 at_status=$? at_failed=false
8289 $at_check_filter
8290 at_fn_diff_devnull "$at_stderr" || at_failed=:
8291 echo >>"$at_stdout"; $as_echo "testdir/
8292 testdir/dir1/
8293 testdir/dir2/
8294 testdir/dir2/file2
8295 testdir/dir3/
8296 NEXT
8297 testdir/dir1/*
8298 NEXT
8299 testdir/dir1/*
8300 NEXT
8301 testdir/dir1/*
8302 testdir/dir1/file1
8303 " | \
8304   $at_diff - "$at_stdout" || at_failed=:
8305 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
8306 $at_failed && at_fn_log_failure
8307 $at_traceon; }
8308
8309               { set +x
8310 $as_echo "$at_srcdir/exclude01.at:22:
8311 mkdir ustar
8312 (cd ustar
8313 TEST_TAR_FORMAT=ustar
8314 export TEST_TAR_FORMAT
8315 TAR_OPTIONS=\"-H ustar\"
8316 export TAR_OPTIONS
8317 rm -rf *
8318
8319
8320 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8321
8322
8323 rm -rf testdir
8324 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8325 touch testdir/dir1/file1
8326 touch testdir/dir1/\\*
8327 touch testdir/dir2/file2
8328 touch testdir/dir2/\\*
8329 touch testdir/dir3/file3
8330 touch testdir/dir3/\\*
8331
8332 tar cf archive --exclude=testdir/dir1/\\* \\
8333                --no-wildcards \\
8334                --exclude=testdir/dir2/\\* \\
8335                --wildcards \\
8336                --exclude=testdir/dir3/\\* \\
8337                testdir
8338 tar tf archive | sort
8339
8340 echo \"NEXT\"
8341 tar cf archive testdir
8342 tar t \"testdir/dir1/*\" -f archive | sort
8343
8344 echo \"NEXT\"
8345 tar cf archive testdir/dir1
8346 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
8347
8348 echo \"NEXT\"
8349 tar cf archive testdir
8350 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
8351
8352 rm -rf testdir
8353 )"
8354 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
8355 ( $at_check_trace;
8356 mkdir ustar
8357 (cd ustar
8358 TEST_TAR_FORMAT=ustar
8359 export TEST_TAR_FORMAT
8360 TAR_OPTIONS="-H ustar"
8361 export TAR_OPTIONS
8362 rm -rf *
8363
8364
8365 test -z "`sort < /dev/null 2>&1`" || exit 77
8366
8367
8368 rm -rf testdir
8369 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8370 touch testdir/dir1/file1
8371 touch testdir/dir1/\*
8372 touch testdir/dir2/file2
8373 touch testdir/dir2/\*
8374 touch testdir/dir3/file3
8375 touch testdir/dir3/\*
8376
8377 tar cf archive --exclude=testdir/dir1/\* \
8378                --no-wildcards \
8379                --exclude=testdir/dir2/\* \
8380                --wildcards \
8381                --exclude=testdir/dir3/\* \
8382                testdir
8383 tar tf archive | sort
8384
8385 echo "NEXT"
8386 tar cf archive testdir
8387 tar t "testdir/dir1/*" -f archive | sort
8388
8389 echo "NEXT"
8390 tar cf archive testdir/dir1
8391 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
8392
8393 echo "NEXT"
8394 tar cf archive testdir
8395 tar t --wildcards "testdir/dir1/*" -f archive | sort
8396
8397 rm -rf testdir
8398 )
8399 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8400 at_status=$? at_failed=false
8401 $at_check_filter
8402 at_fn_diff_devnull "$at_stderr" || at_failed=:
8403 echo >>"$at_stdout"; $as_echo "testdir/
8404 testdir/dir1/
8405 testdir/dir2/
8406 testdir/dir2/file2
8407 testdir/dir3/
8408 NEXT
8409 testdir/dir1/*
8410 NEXT
8411 testdir/dir1/*
8412 NEXT
8413 testdir/dir1/*
8414 testdir/dir1/file1
8415 " | \
8416   $at_diff - "$at_stdout" || at_failed=:
8417 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
8418 $at_failed && at_fn_log_failure
8419 $at_traceon; }
8420
8421               { set +x
8422 $as_echo "$at_srcdir/exclude01.at:22:
8423 mkdir posix
8424 (cd posix
8425 TEST_TAR_FORMAT=posix
8426 export TEST_TAR_FORMAT
8427 TAR_OPTIONS=\"-H posix\"
8428 export TAR_OPTIONS
8429 rm -rf *
8430
8431
8432 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8433
8434
8435 rm -rf testdir
8436 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8437 touch testdir/dir1/file1
8438 touch testdir/dir1/\\*
8439 touch testdir/dir2/file2
8440 touch testdir/dir2/\\*
8441 touch testdir/dir3/file3
8442 touch testdir/dir3/\\*
8443
8444 tar cf archive --exclude=testdir/dir1/\\* \\
8445                --no-wildcards \\
8446                --exclude=testdir/dir2/\\* \\
8447                --wildcards \\
8448                --exclude=testdir/dir3/\\* \\
8449                testdir
8450 tar tf archive | sort
8451
8452 echo \"NEXT\"
8453 tar cf archive testdir
8454 tar t \"testdir/dir1/*\" -f archive | sort
8455
8456 echo \"NEXT\"
8457 tar cf archive testdir/dir1
8458 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
8459
8460 echo \"NEXT\"
8461 tar cf archive testdir
8462 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
8463
8464 rm -rf testdir
8465 )"
8466 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
8467 ( $at_check_trace;
8468 mkdir posix
8469 (cd posix
8470 TEST_TAR_FORMAT=posix
8471 export TEST_TAR_FORMAT
8472 TAR_OPTIONS="-H posix"
8473 export TAR_OPTIONS
8474 rm -rf *
8475
8476
8477 test -z "`sort < /dev/null 2>&1`" || exit 77
8478
8479
8480 rm -rf testdir
8481 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8482 touch testdir/dir1/file1
8483 touch testdir/dir1/\*
8484 touch testdir/dir2/file2
8485 touch testdir/dir2/\*
8486 touch testdir/dir3/file3
8487 touch testdir/dir3/\*
8488
8489 tar cf archive --exclude=testdir/dir1/\* \
8490                --no-wildcards \
8491                --exclude=testdir/dir2/\* \
8492                --wildcards \
8493                --exclude=testdir/dir3/\* \
8494                testdir
8495 tar tf archive | sort
8496
8497 echo "NEXT"
8498 tar cf archive testdir
8499 tar t "testdir/dir1/*" -f archive | sort
8500
8501 echo "NEXT"
8502 tar cf archive testdir/dir1
8503 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
8504
8505 echo "NEXT"
8506 tar cf archive testdir
8507 tar t --wildcards "testdir/dir1/*" -f archive | sort
8508
8509 rm -rf testdir
8510 )
8511 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8512 at_status=$? at_failed=false
8513 $at_check_filter
8514 at_fn_diff_devnull "$at_stderr" || at_failed=:
8515 echo >>"$at_stdout"; $as_echo "testdir/
8516 testdir/dir1/
8517 testdir/dir2/
8518 testdir/dir2/file2
8519 testdir/dir3/
8520 NEXT
8521 testdir/dir1/*
8522 NEXT
8523 testdir/dir1/*
8524 NEXT
8525 testdir/dir1/*
8526 testdir/dir1/file1
8527 " | \
8528   $at_diff - "$at_stdout" || at_failed=:
8529 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
8530 $at_failed && at_fn_log_failure
8531 $at_traceon; }
8532
8533               { set +x
8534 $as_echo "$at_srcdir/exclude01.at:22:
8535 mkdir gnu
8536 (cd gnu
8537 TEST_TAR_FORMAT=gnu
8538 export TEST_TAR_FORMAT
8539 TAR_OPTIONS=\"-H gnu\"
8540 export TAR_OPTIONS
8541 rm -rf *
8542
8543
8544 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8545
8546
8547 rm -rf testdir
8548 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8549 touch testdir/dir1/file1
8550 touch testdir/dir1/\\*
8551 touch testdir/dir2/file2
8552 touch testdir/dir2/\\*
8553 touch testdir/dir3/file3
8554 touch testdir/dir3/\\*
8555
8556 tar cf archive --exclude=testdir/dir1/\\* \\
8557                --no-wildcards \\
8558                --exclude=testdir/dir2/\\* \\
8559                --wildcards \\
8560                --exclude=testdir/dir3/\\* \\
8561                testdir
8562 tar tf archive | sort
8563
8564 echo \"NEXT\"
8565 tar cf archive testdir
8566 tar t \"testdir/dir1/*\" -f archive | sort
8567
8568 echo \"NEXT\"
8569 tar cf archive testdir/dir1
8570 tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort
8571
8572 echo \"NEXT\"
8573 tar cf archive testdir
8574 tar t --wildcards \"testdir/dir1/*\" -f archive | sort
8575
8576 rm -rf testdir
8577 )"
8578 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude01.at:22"
8579 ( $at_check_trace;
8580 mkdir gnu
8581 (cd gnu
8582 TEST_TAR_FORMAT=gnu
8583 export TEST_TAR_FORMAT
8584 TAR_OPTIONS="-H gnu"
8585 export TAR_OPTIONS
8586 rm -rf *
8587
8588
8589 test -z "`sort < /dev/null 2>&1`" || exit 77
8590
8591
8592 rm -rf testdir
8593 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
8594 touch testdir/dir1/file1
8595 touch testdir/dir1/\*
8596 touch testdir/dir2/file2
8597 touch testdir/dir2/\*
8598 touch testdir/dir3/file3
8599 touch testdir/dir3/\*
8600
8601 tar cf archive --exclude=testdir/dir1/\* \
8602                --no-wildcards \
8603                --exclude=testdir/dir2/\* \
8604                --wildcards \
8605                --exclude=testdir/dir3/\* \
8606                testdir
8607 tar tf archive | sort
8608
8609 echo "NEXT"
8610 tar cf archive testdir
8611 tar t "testdir/dir1/*" -f archive | sort
8612
8613 echo "NEXT"
8614 tar cf archive testdir/dir1
8615 tar t --no-wildcards "testdir/dir1/*" -f archive | sort
8616
8617 echo "NEXT"
8618 tar cf archive testdir
8619 tar t --wildcards "testdir/dir1/*" -f archive | sort
8620
8621 rm -rf testdir
8622 )
8623 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8624 at_status=$? at_failed=false
8625 $at_check_filter
8626 at_fn_diff_devnull "$at_stderr" || at_failed=:
8627 echo >>"$at_stdout"; $as_echo "testdir/
8628 testdir/dir1/
8629 testdir/dir2/
8630 testdir/dir2/file2
8631 testdir/dir3/
8632 NEXT
8633 testdir/dir1/*
8634 NEXT
8635 testdir/dir1/*
8636 NEXT
8637 testdir/dir1/*
8638 testdir/dir1/file1
8639 " | \
8640   $at_diff - "$at_stdout" || at_failed=:
8641 at_fn_check_status 0 $at_status "$at_srcdir/exclude01.at:22"
8642 $at_failed && at_fn_log_failure
8643 $at_traceon; }
8644
8645
8646
8647
8648   set +x
8649   $at_times_p && times >"$at_times_file"
8650 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
8651 read at_status <"$at_status_file"
8652 #AT_STOP_36
8653 #AT_START_37
8654 at_fn_group_banner 37 'exclude02.at:19' \
8655   "exclude: anchoring" "                             " 7
8656 at_xfail=no
8657       test -f $XFAILFILE && at_xfail=yes
8658 (
8659   $as_echo "37. $at_setup_line: testing $at_desc ..."
8660   $at_traceon
8661
8662
8663
8664
8665
8666   { set +x
8667 $as_echo "$at_srcdir/exclude02.at:22:
8668 mkdir v7
8669 (cd v7
8670 TEST_TAR_FORMAT=v7
8671 export TEST_TAR_FORMAT
8672 TAR_OPTIONS=\"-H v7\"
8673 export TAR_OPTIONS
8674 rm -rf *
8675
8676
8677 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8678
8679
8680 rm -rf testdir
8681 mkdir -p testdir
8682 touch file1.txt
8683 touch testdir/file1.txt
8684 touch testdir/file2
8685
8686 tar cf archive --exclude=\"file1.txt\" \\
8687                testdir
8688 tar tf archive | sort
8689
8690 echo \"SUB 1\"
8691 tar cf archive --no-anchored \\
8692                --exclude=\"file1.txt\" \\
8693                testdir
8694 tar tf archive | sort
8695
8696 echo \"SUB 2\"
8697 tar cf archive --anchored \\
8698                --exclude=\"file1.txt\" \\
8699                testdir
8700 tar tf archive | sort
8701
8702 echo \"SUB 3\"
8703 tar cf archive testdir file1.txt
8704 tar t \"file1.txt\" -f archive | sort
8705
8706 echo \"SUB 4\"
8707 tar t --no-anchored \"file1.txt\" -f archive | sort
8708
8709 echo \"SUB 5\"
8710 tar t --anchored \"file1.txt\" -f archive | sort
8711
8712 rm -rf testdir file1.txt
8713
8714 )"
8715 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
8716 ( $at_check_trace;
8717 mkdir v7
8718 (cd v7
8719 TEST_TAR_FORMAT=v7
8720 export TEST_TAR_FORMAT
8721 TAR_OPTIONS="-H v7"
8722 export TAR_OPTIONS
8723 rm -rf *
8724
8725
8726 test -z "`sort < /dev/null 2>&1`" || exit 77
8727
8728
8729 rm -rf testdir
8730 mkdir -p testdir
8731 touch file1.txt
8732 touch testdir/file1.txt
8733 touch testdir/file2
8734
8735 tar cf archive --exclude="file1.txt" \
8736                testdir
8737 tar tf archive | sort
8738
8739 echo "SUB 1"
8740 tar cf archive --no-anchored \
8741                --exclude="file1.txt" \
8742                testdir
8743 tar tf archive | sort
8744
8745 echo "SUB 2"
8746 tar cf archive --anchored \
8747                --exclude="file1.txt" \
8748                testdir
8749 tar tf archive | sort
8750
8751 echo "SUB 3"
8752 tar cf archive testdir file1.txt
8753 tar t "file1.txt" -f archive | sort
8754
8755 echo "SUB 4"
8756 tar t --no-anchored "file1.txt" -f archive | sort
8757
8758 echo "SUB 5"
8759 tar t --anchored "file1.txt" -f archive | sort
8760
8761 rm -rf testdir file1.txt
8762
8763 )
8764 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8765 at_status=$? at_failed=false
8766 $at_check_filter
8767 at_fn_diff_devnull "$at_stderr" || at_failed=:
8768 echo >>"$at_stdout"; $as_echo "testdir/
8769 testdir/file2
8770 SUB 1
8771 testdir/
8772 testdir/file2
8773 SUB 2
8774 testdir/
8775 testdir/file1.txt
8776 testdir/file2
8777 SUB 3
8778 file1.txt
8779 SUB 4
8780 file1.txt
8781 testdir/file1.txt
8782 SUB 5
8783 file1.txt
8784 " | \
8785   $at_diff - "$at_stdout" || at_failed=:
8786 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
8787 $at_failed && at_fn_log_failure
8788 $at_traceon; }
8789
8790               { set +x
8791 $as_echo "$at_srcdir/exclude02.at:22:
8792 mkdir oldgnu
8793 (cd oldgnu
8794 TEST_TAR_FORMAT=oldgnu
8795 export TEST_TAR_FORMAT
8796 TAR_OPTIONS=\"-H oldgnu\"
8797 export TAR_OPTIONS
8798 rm -rf *
8799
8800
8801 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8802
8803
8804 rm -rf testdir
8805 mkdir -p testdir
8806 touch file1.txt
8807 touch testdir/file1.txt
8808 touch testdir/file2
8809
8810 tar cf archive --exclude=\"file1.txt\" \\
8811                testdir
8812 tar tf archive | sort
8813
8814 echo \"SUB 1\"
8815 tar cf archive --no-anchored \\
8816                --exclude=\"file1.txt\" \\
8817                testdir
8818 tar tf archive | sort
8819
8820 echo \"SUB 2\"
8821 tar cf archive --anchored \\
8822                --exclude=\"file1.txt\" \\
8823                testdir
8824 tar tf archive | sort
8825
8826 echo \"SUB 3\"
8827 tar cf archive testdir file1.txt
8828 tar t \"file1.txt\" -f archive | sort
8829
8830 echo \"SUB 4\"
8831 tar t --no-anchored \"file1.txt\" -f archive | sort
8832
8833 echo \"SUB 5\"
8834 tar t --anchored \"file1.txt\" -f archive | sort
8835
8836 rm -rf testdir file1.txt
8837
8838 )"
8839 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
8840 ( $at_check_trace;
8841 mkdir oldgnu
8842 (cd oldgnu
8843 TEST_TAR_FORMAT=oldgnu
8844 export TEST_TAR_FORMAT
8845 TAR_OPTIONS="-H oldgnu"
8846 export TAR_OPTIONS
8847 rm -rf *
8848
8849
8850 test -z "`sort < /dev/null 2>&1`" || exit 77
8851
8852
8853 rm -rf testdir
8854 mkdir -p testdir
8855 touch file1.txt
8856 touch testdir/file1.txt
8857 touch testdir/file2
8858
8859 tar cf archive --exclude="file1.txt" \
8860                testdir
8861 tar tf archive | sort
8862
8863 echo "SUB 1"
8864 tar cf archive --no-anchored \
8865                --exclude="file1.txt" \
8866                testdir
8867 tar tf archive | sort
8868
8869 echo "SUB 2"
8870 tar cf archive --anchored \
8871                --exclude="file1.txt" \
8872                testdir
8873 tar tf archive | sort
8874
8875 echo "SUB 3"
8876 tar cf archive testdir file1.txt
8877 tar t "file1.txt" -f archive | sort
8878
8879 echo "SUB 4"
8880 tar t --no-anchored "file1.txt" -f archive | sort
8881
8882 echo "SUB 5"
8883 tar t --anchored "file1.txt" -f archive | sort
8884
8885 rm -rf testdir file1.txt
8886
8887 )
8888 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
8889 at_status=$? at_failed=false
8890 $at_check_filter
8891 at_fn_diff_devnull "$at_stderr" || at_failed=:
8892 echo >>"$at_stdout"; $as_echo "testdir/
8893 testdir/file2
8894 SUB 1
8895 testdir/
8896 testdir/file2
8897 SUB 2
8898 testdir/
8899 testdir/file1.txt
8900 testdir/file2
8901 SUB 3
8902 file1.txt
8903 SUB 4
8904 file1.txt
8905 testdir/file1.txt
8906 SUB 5
8907 file1.txt
8908 " | \
8909   $at_diff - "$at_stdout" || at_failed=:
8910 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
8911 $at_failed && at_fn_log_failure
8912 $at_traceon; }
8913
8914               { set +x
8915 $as_echo "$at_srcdir/exclude02.at:22:
8916 mkdir ustar
8917 (cd ustar
8918 TEST_TAR_FORMAT=ustar
8919 export TEST_TAR_FORMAT
8920 TAR_OPTIONS=\"-H ustar\"
8921 export TAR_OPTIONS
8922 rm -rf *
8923
8924
8925 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
8926
8927
8928 rm -rf testdir
8929 mkdir -p testdir
8930 touch file1.txt
8931 touch testdir/file1.txt
8932 touch testdir/file2
8933
8934 tar cf archive --exclude=\"file1.txt\" \\
8935                testdir
8936 tar tf archive | sort
8937
8938 echo \"SUB 1\"
8939 tar cf archive --no-anchored \\
8940                --exclude=\"file1.txt\" \\
8941                testdir
8942 tar tf archive | sort
8943
8944 echo \"SUB 2\"
8945 tar cf archive --anchored \\
8946                --exclude=\"file1.txt\" \\
8947                testdir
8948 tar tf archive | sort
8949
8950 echo \"SUB 3\"
8951 tar cf archive testdir file1.txt
8952 tar t \"file1.txt\" -f archive | sort
8953
8954 echo \"SUB 4\"
8955 tar t --no-anchored \"file1.txt\" -f archive | sort
8956
8957 echo \"SUB 5\"
8958 tar t --anchored \"file1.txt\" -f archive | sort
8959
8960 rm -rf testdir file1.txt
8961
8962 )"
8963 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
8964 ( $at_check_trace;
8965 mkdir ustar
8966 (cd ustar
8967 TEST_TAR_FORMAT=ustar
8968 export TEST_TAR_FORMAT
8969 TAR_OPTIONS="-H ustar"
8970 export TAR_OPTIONS
8971 rm -rf *
8972
8973
8974 test -z "`sort < /dev/null 2>&1`" || exit 77
8975
8976
8977 rm -rf testdir
8978 mkdir -p testdir
8979 touch file1.txt
8980 touch testdir/file1.txt
8981 touch testdir/file2
8982
8983 tar cf archive --exclude="file1.txt" \
8984                testdir
8985 tar tf archive | sort
8986
8987 echo "SUB 1"
8988 tar cf archive --no-anchored \
8989                --exclude="file1.txt" \
8990                testdir
8991 tar tf archive | sort
8992
8993 echo "SUB 2"
8994 tar cf archive --anchored \
8995                --exclude="file1.txt" \
8996                testdir
8997 tar tf archive | sort
8998
8999 echo "SUB 3"
9000 tar cf archive testdir file1.txt
9001 tar t "file1.txt" -f archive | sort
9002
9003 echo "SUB 4"
9004 tar t --no-anchored "file1.txt" -f archive | sort
9005
9006 echo "SUB 5"
9007 tar t --anchored "file1.txt" -f archive | sort
9008
9009 rm -rf testdir file1.txt
9010
9011 )
9012 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9013 at_status=$? at_failed=false
9014 $at_check_filter
9015 at_fn_diff_devnull "$at_stderr" || at_failed=:
9016 echo >>"$at_stdout"; $as_echo "testdir/
9017 testdir/file2
9018 SUB 1
9019 testdir/
9020 testdir/file2
9021 SUB 2
9022 testdir/
9023 testdir/file1.txt
9024 testdir/file2
9025 SUB 3
9026 file1.txt
9027 SUB 4
9028 file1.txt
9029 testdir/file1.txt
9030 SUB 5
9031 file1.txt
9032 " | \
9033   $at_diff - "$at_stdout" || at_failed=:
9034 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
9035 $at_failed && at_fn_log_failure
9036 $at_traceon; }
9037
9038               { set +x
9039 $as_echo "$at_srcdir/exclude02.at:22:
9040 mkdir posix
9041 (cd posix
9042 TEST_TAR_FORMAT=posix
9043 export TEST_TAR_FORMAT
9044 TAR_OPTIONS=\"-H posix\"
9045 export TAR_OPTIONS
9046 rm -rf *
9047
9048
9049 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9050
9051
9052 rm -rf testdir
9053 mkdir -p testdir
9054 touch file1.txt
9055 touch testdir/file1.txt
9056 touch testdir/file2
9057
9058 tar cf archive --exclude=\"file1.txt\" \\
9059                testdir
9060 tar tf archive | sort
9061
9062 echo \"SUB 1\"
9063 tar cf archive --no-anchored \\
9064                --exclude=\"file1.txt\" \\
9065                testdir
9066 tar tf archive | sort
9067
9068 echo \"SUB 2\"
9069 tar cf archive --anchored \\
9070                --exclude=\"file1.txt\" \\
9071                testdir
9072 tar tf archive | sort
9073
9074 echo \"SUB 3\"
9075 tar cf archive testdir file1.txt
9076 tar t \"file1.txt\" -f archive | sort
9077
9078 echo \"SUB 4\"
9079 tar t --no-anchored \"file1.txt\" -f archive | sort
9080
9081 echo \"SUB 5\"
9082 tar t --anchored \"file1.txt\" -f archive | sort
9083
9084 rm -rf testdir file1.txt
9085
9086 )"
9087 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
9088 ( $at_check_trace;
9089 mkdir posix
9090 (cd posix
9091 TEST_TAR_FORMAT=posix
9092 export TEST_TAR_FORMAT
9093 TAR_OPTIONS="-H posix"
9094 export TAR_OPTIONS
9095 rm -rf *
9096
9097
9098 test -z "`sort < /dev/null 2>&1`" || exit 77
9099
9100
9101 rm -rf testdir
9102 mkdir -p testdir
9103 touch file1.txt
9104 touch testdir/file1.txt
9105 touch testdir/file2
9106
9107 tar cf archive --exclude="file1.txt" \
9108                testdir
9109 tar tf archive | sort
9110
9111 echo "SUB 1"
9112 tar cf archive --no-anchored \
9113                --exclude="file1.txt" \
9114                testdir
9115 tar tf archive | sort
9116
9117 echo "SUB 2"
9118 tar cf archive --anchored \
9119                --exclude="file1.txt" \
9120                testdir
9121 tar tf archive | sort
9122
9123 echo "SUB 3"
9124 tar cf archive testdir file1.txt
9125 tar t "file1.txt" -f archive | sort
9126
9127 echo "SUB 4"
9128 tar t --no-anchored "file1.txt" -f archive | sort
9129
9130 echo "SUB 5"
9131 tar t --anchored "file1.txt" -f archive | sort
9132
9133 rm -rf testdir file1.txt
9134
9135 )
9136 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9137 at_status=$? at_failed=false
9138 $at_check_filter
9139 at_fn_diff_devnull "$at_stderr" || at_failed=:
9140 echo >>"$at_stdout"; $as_echo "testdir/
9141 testdir/file2
9142 SUB 1
9143 testdir/
9144 testdir/file2
9145 SUB 2
9146 testdir/
9147 testdir/file1.txt
9148 testdir/file2
9149 SUB 3
9150 file1.txt
9151 SUB 4
9152 file1.txt
9153 testdir/file1.txt
9154 SUB 5
9155 file1.txt
9156 " | \
9157   $at_diff - "$at_stdout" || at_failed=:
9158 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
9159 $at_failed && at_fn_log_failure
9160 $at_traceon; }
9161
9162               { set +x
9163 $as_echo "$at_srcdir/exclude02.at:22:
9164 mkdir gnu
9165 (cd gnu
9166 TEST_TAR_FORMAT=gnu
9167 export TEST_TAR_FORMAT
9168 TAR_OPTIONS=\"-H gnu\"
9169 export TAR_OPTIONS
9170 rm -rf *
9171
9172
9173 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9174
9175
9176 rm -rf testdir
9177 mkdir -p testdir
9178 touch file1.txt
9179 touch testdir/file1.txt
9180 touch testdir/file2
9181
9182 tar cf archive --exclude=\"file1.txt\" \\
9183                testdir
9184 tar tf archive | sort
9185
9186 echo \"SUB 1\"
9187 tar cf archive --no-anchored \\
9188                --exclude=\"file1.txt\" \\
9189                testdir
9190 tar tf archive | sort
9191
9192 echo \"SUB 2\"
9193 tar cf archive --anchored \\
9194                --exclude=\"file1.txt\" \\
9195                testdir
9196 tar tf archive | sort
9197
9198 echo \"SUB 3\"
9199 tar cf archive testdir file1.txt
9200 tar t \"file1.txt\" -f archive | sort
9201
9202 echo \"SUB 4\"
9203 tar t --no-anchored \"file1.txt\" -f archive | sort
9204
9205 echo \"SUB 5\"
9206 tar t --anchored \"file1.txt\" -f archive | sort
9207
9208 rm -rf testdir file1.txt
9209
9210 )"
9211 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude02.at:22"
9212 ( $at_check_trace;
9213 mkdir gnu
9214 (cd gnu
9215 TEST_TAR_FORMAT=gnu
9216 export TEST_TAR_FORMAT
9217 TAR_OPTIONS="-H gnu"
9218 export TAR_OPTIONS
9219 rm -rf *
9220
9221
9222 test -z "`sort < /dev/null 2>&1`" || exit 77
9223
9224
9225 rm -rf testdir
9226 mkdir -p testdir
9227 touch file1.txt
9228 touch testdir/file1.txt
9229 touch testdir/file2
9230
9231 tar cf archive --exclude="file1.txt" \
9232                testdir
9233 tar tf archive | sort
9234
9235 echo "SUB 1"
9236 tar cf archive --no-anchored \
9237                --exclude="file1.txt" \
9238                testdir
9239 tar tf archive | sort
9240
9241 echo "SUB 2"
9242 tar cf archive --anchored \
9243                --exclude="file1.txt" \
9244                testdir
9245 tar tf archive | sort
9246
9247 echo "SUB 3"
9248 tar cf archive testdir file1.txt
9249 tar t "file1.txt" -f archive | sort
9250
9251 echo "SUB 4"
9252 tar t --no-anchored "file1.txt" -f archive | sort
9253
9254 echo "SUB 5"
9255 tar t --anchored "file1.txt" -f archive | sort
9256
9257 rm -rf testdir file1.txt
9258
9259 )
9260 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9261 at_status=$? at_failed=false
9262 $at_check_filter
9263 at_fn_diff_devnull "$at_stderr" || at_failed=:
9264 echo >>"$at_stdout"; $as_echo "testdir/
9265 testdir/file2
9266 SUB 1
9267 testdir/
9268 testdir/file2
9269 SUB 2
9270 testdir/
9271 testdir/file1.txt
9272 testdir/file2
9273 SUB 3
9274 file1.txt
9275 SUB 4
9276 file1.txt
9277 testdir/file1.txt
9278 SUB 5
9279 file1.txt
9280 " | \
9281   $at_diff - "$at_stdout" || at_failed=:
9282 at_fn_check_status 0 $at_status "$at_srcdir/exclude02.at:22"
9283 $at_failed && at_fn_log_failure
9284 $at_traceon; }
9285
9286
9287
9288
9289   set +x
9290   $at_times_p && times >"$at_times_file"
9291 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9292 read at_status <"$at_status_file"
9293 #AT_STOP_37
9294 #AT_START_38
9295 at_fn_group_banner 38 'exclude03.at:19' \
9296   "exclude: wildcards match slash" "                 " 7
9297 at_xfail=no
9298       test -f $XFAILFILE && at_xfail=yes
9299 (
9300   $as_echo "38. $at_setup_line: testing $at_desc ..."
9301   $at_traceon
9302
9303
9304
9305
9306
9307   { set +x
9308 $as_echo "$at_srcdir/exclude03.at:22:
9309 mkdir v7
9310 (cd v7
9311 TEST_TAR_FORMAT=v7
9312 export TEST_TAR_FORMAT
9313 TAR_OPTIONS=\"-H v7\"
9314 export TAR_OPTIONS
9315 rm -rf *
9316
9317
9318 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9319
9320
9321 rm -rf testdir
9322 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9323 touch testdir/\\*f\\*1
9324 touch testdir/dir1/file1
9325 touch testdir/dir1/\\*
9326 touch testdir/dir2/file2
9327 touch testdir/dir2/\\*
9328 touch testdir/dir3/file3
9329 touch testdir/dir3/\\*
9330
9331 tar cf archive --exclude='testdir*f*1' \\
9332                --no-wildcards-match-slash \\
9333                --exclude='testdir*f*2' \\
9334                --wildcards-match-slash \\
9335                --exclude='testdir*f*3' \\
9336                testdir
9337 tar tf archive | sort
9338
9339 echo \"NEXT\"
9340 tar cf archive testdir
9341 tar t --wildcards 'testdir/*f*1' -f archive | sort
9342
9343 echo \"NEXT\"
9344 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9345
9346 echo \"NEXT\"
9347 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9348
9349 rm -rf testdir
9350
9351 )"
9352 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9353 ( $at_check_trace;
9354 mkdir v7
9355 (cd v7
9356 TEST_TAR_FORMAT=v7
9357 export TEST_TAR_FORMAT
9358 TAR_OPTIONS="-H v7"
9359 export TAR_OPTIONS
9360 rm -rf *
9361
9362
9363 test -z "`sort < /dev/null 2>&1`" || exit 77
9364
9365
9366 rm -rf testdir
9367 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9368 touch testdir/\*f\*1
9369 touch testdir/dir1/file1
9370 touch testdir/dir1/\*
9371 touch testdir/dir2/file2
9372 touch testdir/dir2/\*
9373 touch testdir/dir3/file3
9374 touch testdir/dir3/\*
9375
9376 tar cf archive --exclude='testdir*f*1' \
9377                --no-wildcards-match-slash \
9378                --exclude='testdir*f*2' \
9379                --wildcards-match-slash \
9380                --exclude='testdir*f*3' \
9381                testdir
9382 tar tf archive | sort
9383
9384 echo "NEXT"
9385 tar cf archive testdir
9386 tar t --wildcards 'testdir/*f*1' -f archive | sort
9387
9388 echo "NEXT"
9389 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9390
9391 echo "NEXT"
9392 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9393
9394 rm -rf testdir
9395
9396 )
9397 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9398 at_status=$? at_failed=false
9399 $at_check_filter
9400 at_fn_diff_devnull "$at_stderr" || at_failed=:
9401 echo >>"$at_stdout"; $as_echo "testdir/
9402 testdir/dir1/
9403 testdir/dir1/*
9404 testdir/dir2/
9405 testdir/dir2/*
9406 testdir/dir2/file2
9407 testdir/dir3/
9408 testdir/dir3/*
9409 NEXT
9410 testdir/*f*1
9411 testdir/dir1/file1
9412 NEXT
9413 testdir/*f*1
9414 NEXT
9415 testdir/*f*1
9416 testdir/dir1/file1
9417 " | \
9418   $at_diff - "$at_stdout" || at_failed=:
9419 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9420 $at_failed && at_fn_log_failure
9421 $at_traceon; }
9422
9423               { set +x
9424 $as_echo "$at_srcdir/exclude03.at:22:
9425 mkdir oldgnu
9426 (cd oldgnu
9427 TEST_TAR_FORMAT=oldgnu
9428 export TEST_TAR_FORMAT
9429 TAR_OPTIONS=\"-H oldgnu\"
9430 export TAR_OPTIONS
9431 rm -rf *
9432
9433
9434 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9435
9436
9437 rm -rf testdir
9438 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9439 touch testdir/\\*f\\*1
9440 touch testdir/dir1/file1
9441 touch testdir/dir1/\\*
9442 touch testdir/dir2/file2
9443 touch testdir/dir2/\\*
9444 touch testdir/dir3/file3
9445 touch testdir/dir3/\\*
9446
9447 tar cf archive --exclude='testdir*f*1' \\
9448                --no-wildcards-match-slash \\
9449                --exclude='testdir*f*2' \\
9450                --wildcards-match-slash \\
9451                --exclude='testdir*f*3' \\
9452                testdir
9453 tar tf archive | sort
9454
9455 echo \"NEXT\"
9456 tar cf archive testdir
9457 tar t --wildcards 'testdir/*f*1' -f archive | sort
9458
9459 echo \"NEXT\"
9460 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9461
9462 echo \"NEXT\"
9463 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9464
9465 rm -rf testdir
9466
9467 )"
9468 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9469 ( $at_check_trace;
9470 mkdir oldgnu
9471 (cd oldgnu
9472 TEST_TAR_FORMAT=oldgnu
9473 export TEST_TAR_FORMAT
9474 TAR_OPTIONS="-H oldgnu"
9475 export TAR_OPTIONS
9476 rm -rf *
9477
9478
9479 test -z "`sort < /dev/null 2>&1`" || exit 77
9480
9481
9482 rm -rf testdir
9483 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9484 touch testdir/\*f\*1
9485 touch testdir/dir1/file1
9486 touch testdir/dir1/\*
9487 touch testdir/dir2/file2
9488 touch testdir/dir2/\*
9489 touch testdir/dir3/file3
9490 touch testdir/dir3/\*
9491
9492 tar cf archive --exclude='testdir*f*1' \
9493                --no-wildcards-match-slash \
9494                --exclude='testdir*f*2' \
9495                --wildcards-match-slash \
9496                --exclude='testdir*f*3' \
9497                testdir
9498 tar tf archive | sort
9499
9500 echo "NEXT"
9501 tar cf archive testdir
9502 tar t --wildcards 'testdir/*f*1' -f archive | sort
9503
9504 echo "NEXT"
9505 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9506
9507 echo "NEXT"
9508 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9509
9510 rm -rf testdir
9511
9512 )
9513 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9514 at_status=$? at_failed=false
9515 $at_check_filter
9516 at_fn_diff_devnull "$at_stderr" || at_failed=:
9517 echo >>"$at_stdout"; $as_echo "testdir/
9518 testdir/dir1/
9519 testdir/dir1/*
9520 testdir/dir2/
9521 testdir/dir2/*
9522 testdir/dir2/file2
9523 testdir/dir3/
9524 testdir/dir3/*
9525 NEXT
9526 testdir/*f*1
9527 testdir/dir1/file1
9528 NEXT
9529 testdir/*f*1
9530 NEXT
9531 testdir/*f*1
9532 testdir/dir1/file1
9533 " | \
9534   $at_diff - "$at_stdout" || at_failed=:
9535 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9536 $at_failed && at_fn_log_failure
9537 $at_traceon; }
9538
9539               { set +x
9540 $as_echo "$at_srcdir/exclude03.at:22:
9541 mkdir ustar
9542 (cd ustar
9543 TEST_TAR_FORMAT=ustar
9544 export TEST_TAR_FORMAT
9545 TAR_OPTIONS=\"-H ustar\"
9546 export TAR_OPTIONS
9547 rm -rf *
9548
9549
9550 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9551
9552
9553 rm -rf testdir
9554 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9555 touch testdir/\\*f\\*1
9556 touch testdir/dir1/file1
9557 touch testdir/dir1/\\*
9558 touch testdir/dir2/file2
9559 touch testdir/dir2/\\*
9560 touch testdir/dir3/file3
9561 touch testdir/dir3/\\*
9562
9563 tar cf archive --exclude='testdir*f*1' \\
9564                --no-wildcards-match-slash \\
9565                --exclude='testdir*f*2' \\
9566                --wildcards-match-slash \\
9567                --exclude='testdir*f*3' \\
9568                testdir
9569 tar tf archive | sort
9570
9571 echo \"NEXT\"
9572 tar cf archive testdir
9573 tar t --wildcards 'testdir/*f*1' -f archive | sort
9574
9575 echo \"NEXT\"
9576 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9577
9578 echo \"NEXT\"
9579 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9580
9581 rm -rf testdir
9582
9583 )"
9584 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9585 ( $at_check_trace;
9586 mkdir ustar
9587 (cd ustar
9588 TEST_TAR_FORMAT=ustar
9589 export TEST_TAR_FORMAT
9590 TAR_OPTIONS="-H ustar"
9591 export TAR_OPTIONS
9592 rm -rf *
9593
9594
9595 test -z "`sort < /dev/null 2>&1`" || exit 77
9596
9597
9598 rm -rf testdir
9599 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9600 touch testdir/\*f\*1
9601 touch testdir/dir1/file1
9602 touch testdir/dir1/\*
9603 touch testdir/dir2/file2
9604 touch testdir/dir2/\*
9605 touch testdir/dir3/file3
9606 touch testdir/dir3/\*
9607
9608 tar cf archive --exclude='testdir*f*1' \
9609                --no-wildcards-match-slash \
9610                --exclude='testdir*f*2' \
9611                --wildcards-match-slash \
9612                --exclude='testdir*f*3' \
9613                testdir
9614 tar tf archive | sort
9615
9616 echo "NEXT"
9617 tar cf archive testdir
9618 tar t --wildcards 'testdir/*f*1' -f archive | sort
9619
9620 echo "NEXT"
9621 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9622
9623 echo "NEXT"
9624 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9625
9626 rm -rf testdir
9627
9628 )
9629 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9630 at_status=$? at_failed=false
9631 $at_check_filter
9632 at_fn_diff_devnull "$at_stderr" || at_failed=:
9633 echo >>"$at_stdout"; $as_echo "testdir/
9634 testdir/dir1/
9635 testdir/dir1/*
9636 testdir/dir2/
9637 testdir/dir2/*
9638 testdir/dir2/file2
9639 testdir/dir3/
9640 testdir/dir3/*
9641 NEXT
9642 testdir/*f*1
9643 testdir/dir1/file1
9644 NEXT
9645 testdir/*f*1
9646 NEXT
9647 testdir/*f*1
9648 testdir/dir1/file1
9649 " | \
9650   $at_diff - "$at_stdout" || at_failed=:
9651 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9652 $at_failed && at_fn_log_failure
9653 $at_traceon; }
9654
9655               { set +x
9656 $as_echo "$at_srcdir/exclude03.at:22:
9657 mkdir posix
9658 (cd posix
9659 TEST_TAR_FORMAT=posix
9660 export TEST_TAR_FORMAT
9661 TAR_OPTIONS=\"-H posix\"
9662 export TAR_OPTIONS
9663 rm -rf *
9664
9665
9666 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9667
9668
9669 rm -rf testdir
9670 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9671 touch testdir/\\*f\\*1
9672 touch testdir/dir1/file1
9673 touch testdir/dir1/\\*
9674 touch testdir/dir2/file2
9675 touch testdir/dir2/\\*
9676 touch testdir/dir3/file3
9677 touch testdir/dir3/\\*
9678
9679 tar cf archive --exclude='testdir*f*1' \\
9680                --no-wildcards-match-slash \\
9681                --exclude='testdir*f*2' \\
9682                --wildcards-match-slash \\
9683                --exclude='testdir*f*3' \\
9684                testdir
9685 tar tf archive | sort
9686
9687 echo \"NEXT\"
9688 tar cf archive testdir
9689 tar t --wildcards 'testdir/*f*1' -f archive | sort
9690
9691 echo \"NEXT\"
9692 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9693
9694 echo \"NEXT\"
9695 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9696
9697 rm -rf testdir
9698
9699 )"
9700 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9701 ( $at_check_trace;
9702 mkdir posix
9703 (cd posix
9704 TEST_TAR_FORMAT=posix
9705 export TEST_TAR_FORMAT
9706 TAR_OPTIONS="-H posix"
9707 export TAR_OPTIONS
9708 rm -rf *
9709
9710
9711 test -z "`sort < /dev/null 2>&1`" || exit 77
9712
9713
9714 rm -rf testdir
9715 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9716 touch testdir/\*f\*1
9717 touch testdir/dir1/file1
9718 touch testdir/dir1/\*
9719 touch testdir/dir2/file2
9720 touch testdir/dir2/\*
9721 touch testdir/dir3/file3
9722 touch testdir/dir3/\*
9723
9724 tar cf archive --exclude='testdir*f*1' \
9725                --no-wildcards-match-slash \
9726                --exclude='testdir*f*2' \
9727                --wildcards-match-slash \
9728                --exclude='testdir*f*3' \
9729                testdir
9730 tar tf archive | sort
9731
9732 echo "NEXT"
9733 tar cf archive testdir
9734 tar t --wildcards 'testdir/*f*1' -f archive | sort
9735
9736 echo "NEXT"
9737 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9738
9739 echo "NEXT"
9740 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9741
9742 rm -rf testdir
9743
9744 )
9745 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9746 at_status=$? at_failed=false
9747 $at_check_filter
9748 at_fn_diff_devnull "$at_stderr" || at_failed=:
9749 echo >>"$at_stdout"; $as_echo "testdir/
9750 testdir/dir1/
9751 testdir/dir1/*
9752 testdir/dir2/
9753 testdir/dir2/*
9754 testdir/dir2/file2
9755 testdir/dir3/
9756 testdir/dir3/*
9757 NEXT
9758 testdir/*f*1
9759 testdir/dir1/file1
9760 NEXT
9761 testdir/*f*1
9762 NEXT
9763 testdir/*f*1
9764 testdir/dir1/file1
9765 " | \
9766   $at_diff - "$at_stdout" || at_failed=:
9767 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9768 $at_failed && at_fn_log_failure
9769 $at_traceon; }
9770
9771               { set +x
9772 $as_echo "$at_srcdir/exclude03.at:22:
9773 mkdir gnu
9774 (cd gnu
9775 TEST_TAR_FORMAT=gnu
9776 export TEST_TAR_FORMAT
9777 TAR_OPTIONS=\"-H gnu\"
9778 export TAR_OPTIONS
9779 rm -rf *
9780
9781
9782 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9783
9784
9785 rm -rf testdir
9786 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9787 touch testdir/\\*f\\*1
9788 touch testdir/dir1/file1
9789 touch testdir/dir1/\\*
9790 touch testdir/dir2/file2
9791 touch testdir/dir2/\\*
9792 touch testdir/dir3/file3
9793 touch testdir/dir3/\\*
9794
9795 tar cf archive --exclude='testdir*f*1' \\
9796                --no-wildcards-match-slash \\
9797                --exclude='testdir*f*2' \\
9798                --wildcards-match-slash \\
9799                --exclude='testdir*f*3' \\
9800                testdir
9801 tar tf archive | sort
9802
9803 echo \"NEXT\"
9804 tar cf archive testdir
9805 tar t --wildcards 'testdir/*f*1' -f archive | sort
9806
9807 echo \"NEXT\"
9808 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9809
9810 echo \"NEXT\"
9811 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9812
9813 rm -rf testdir
9814
9815 )"
9816 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude03.at:22"
9817 ( $at_check_trace;
9818 mkdir gnu
9819 (cd gnu
9820 TEST_TAR_FORMAT=gnu
9821 export TEST_TAR_FORMAT
9822 TAR_OPTIONS="-H gnu"
9823 export TAR_OPTIONS
9824 rm -rf *
9825
9826
9827 test -z "`sort < /dev/null 2>&1`" || exit 77
9828
9829
9830 rm -rf testdir
9831 mkdir -p testdir/dir1 testdir/dir2 testdir/dir3
9832 touch testdir/\*f\*1
9833 touch testdir/dir1/file1
9834 touch testdir/dir1/\*
9835 touch testdir/dir2/file2
9836 touch testdir/dir2/\*
9837 touch testdir/dir3/file3
9838 touch testdir/dir3/\*
9839
9840 tar cf archive --exclude='testdir*f*1' \
9841                --no-wildcards-match-slash \
9842                --exclude='testdir*f*2' \
9843                --wildcards-match-slash \
9844                --exclude='testdir*f*3' \
9845                testdir
9846 tar tf archive | sort
9847
9848 echo "NEXT"
9849 tar cf archive testdir
9850 tar t --wildcards 'testdir/*f*1' -f archive | sort
9851
9852 echo "NEXT"
9853 tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort
9854
9855 echo "NEXT"
9856 tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort
9857
9858 rm -rf testdir
9859
9860 )
9861 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
9862 at_status=$? at_failed=false
9863 $at_check_filter
9864 at_fn_diff_devnull "$at_stderr" || at_failed=:
9865 echo >>"$at_stdout"; $as_echo "testdir/
9866 testdir/dir1/
9867 testdir/dir1/*
9868 testdir/dir2/
9869 testdir/dir2/*
9870 testdir/dir2/file2
9871 testdir/dir3/
9872 testdir/dir3/*
9873 NEXT
9874 testdir/*f*1
9875 testdir/dir1/file1
9876 NEXT
9877 testdir/*f*1
9878 NEXT
9879 testdir/*f*1
9880 testdir/dir1/file1
9881 " | \
9882   $at_diff - "$at_stdout" || at_failed=:
9883 at_fn_check_status 0 $at_status "$at_srcdir/exclude03.at:22"
9884 $at_failed && at_fn_log_failure
9885 $at_traceon; }
9886
9887
9888
9889
9890   set +x
9891   $at_times_p && times >"$at_times_file"
9892 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
9893 read at_status <"$at_status_file"
9894 #AT_STOP_38
9895 #AT_START_39
9896 at_fn_group_banner 39 'exclude04.at:19' \
9897   "exclude: case insensitive" "                      " 7
9898 at_xfail=no
9899       test -f $XFAILFILE && at_xfail=yes
9900 (
9901   $as_echo "39. $at_setup_line: testing $at_desc ..."
9902   $at_traceon
9903
9904
9905
9906
9907
9908   { set +x
9909 $as_echo "$at_srcdir/exclude04.at:22:
9910 mkdir v7
9911 (cd v7
9912 TEST_TAR_FORMAT=v7
9913 export TEST_TAR_FORMAT
9914 TAR_OPTIONS=\"-H v7\"
9915 export TAR_OPTIONS
9916 rm -rf *
9917
9918
9919 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
9920
9921
9922 rm -rf testdir
9923 mkdir -p testdir/dir
9924 touch testdir/file1
9925 touch testdir/file2
9926 touch testdir/file3
9927 touch testdir/file4
9928 touch testdir/dir/File1
9929 touch testdir/dir/File2
9930 touch testdir/dir/File3
9931 touch testdir/dir/File4
9932
9933 tar cf archive --exclude=FILE2 \\
9934                --exclude=file1 \\
9935                --ignore-case \\
9936                --exclude=file3 \\
9937                --no-ignore-case \\
9938                --exclude=FILE2 \\
9939                --exclude=file4 \\
9940                testdir
9941 tar tf archive | sort
9942
9943 echo \"SUB 1\"
9944 tar cf archive testdir
9945 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9946
9947 echo \"SUB 2\"
9948 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9949
9950 echo \"SUB 3\"
9951 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
9952
9953 rm -rf testdir
9954
9955 )"
9956 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
9957 ( $at_check_trace;
9958 mkdir v7
9959 (cd v7
9960 TEST_TAR_FORMAT=v7
9961 export TEST_TAR_FORMAT
9962 TAR_OPTIONS="-H v7"
9963 export TAR_OPTIONS
9964 rm -rf *
9965
9966
9967 test -z "`sort < /dev/null 2>&1`" || exit 77
9968
9969
9970 rm -rf testdir
9971 mkdir -p testdir/dir
9972 touch testdir/file1
9973 touch testdir/file2
9974 touch testdir/file3
9975 touch testdir/file4
9976 touch testdir/dir/File1
9977 touch testdir/dir/File2
9978 touch testdir/dir/File3
9979 touch testdir/dir/File4
9980
9981 tar cf archive --exclude=FILE2 \
9982                --exclude=file1 \
9983                --ignore-case \
9984                --exclude=file3 \
9985                --no-ignore-case \
9986                --exclude=FILE2 \
9987                --exclude=file4 \
9988                testdir
9989 tar tf archive | sort
9990
9991 echo "SUB 1"
9992 tar cf archive testdir
9993 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
9994
9995 echo "SUB 2"
9996 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
9997
9998 echo "SUB 3"
9999 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10000
10001 rm -rf testdir
10002
10003 )
10004 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10005 at_status=$? at_failed=false
10006 $at_check_filter
10007 at_fn_diff_devnull "$at_stderr" || at_failed=:
10008 echo >>"$at_stdout"; $as_echo "testdir/
10009 testdir/dir/
10010 testdir/dir/File1
10011 testdir/dir/File2
10012 testdir/dir/File4
10013 testdir/file2
10014 SUB 1
10015 testdir/dir/File2
10016 SUB 2
10017 testdir/dir/File2
10018 testdir/file2
10019 SUB 3
10020 testdir/dir/File2
10021 " | \
10022   $at_diff - "$at_stdout" || at_failed=:
10023 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
10024 $at_failed && at_fn_log_failure
10025 $at_traceon; }
10026
10027               { set +x
10028 $as_echo "$at_srcdir/exclude04.at:22:
10029 mkdir oldgnu
10030 (cd oldgnu
10031 TEST_TAR_FORMAT=oldgnu
10032 export TEST_TAR_FORMAT
10033 TAR_OPTIONS=\"-H oldgnu\"
10034 export TAR_OPTIONS
10035 rm -rf *
10036
10037
10038 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10039
10040
10041 rm -rf testdir
10042 mkdir -p testdir/dir
10043 touch testdir/file1
10044 touch testdir/file2
10045 touch testdir/file3
10046 touch testdir/file4
10047 touch testdir/dir/File1
10048 touch testdir/dir/File2
10049 touch testdir/dir/File3
10050 touch testdir/dir/File4
10051
10052 tar cf archive --exclude=FILE2 \\
10053                --exclude=file1 \\
10054                --ignore-case \\
10055                --exclude=file3 \\
10056                --no-ignore-case \\
10057                --exclude=FILE2 \\
10058                --exclude=file4 \\
10059                testdir
10060 tar tf archive | sort
10061
10062 echo \"SUB 1\"
10063 tar cf archive testdir
10064 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10065
10066 echo \"SUB 2\"
10067 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10068
10069 echo \"SUB 3\"
10070 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10071
10072 rm -rf testdir
10073
10074 )"
10075 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
10076 ( $at_check_trace;
10077 mkdir oldgnu
10078 (cd oldgnu
10079 TEST_TAR_FORMAT=oldgnu
10080 export TEST_TAR_FORMAT
10081 TAR_OPTIONS="-H oldgnu"
10082 export TAR_OPTIONS
10083 rm -rf *
10084
10085
10086 test -z "`sort < /dev/null 2>&1`" || exit 77
10087
10088
10089 rm -rf testdir
10090 mkdir -p testdir/dir
10091 touch testdir/file1
10092 touch testdir/file2
10093 touch testdir/file3
10094 touch testdir/file4
10095 touch testdir/dir/File1
10096 touch testdir/dir/File2
10097 touch testdir/dir/File3
10098 touch testdir/dir/File4
10099
10100 tar cf archive --exclude=FILE2 \
10101                --exclude=file1 \
10102                --ignore-case \
10103                --exclude=file3 \
10104                --no-ignore-case \
10105                --exclude=FILE2 \
10106                --exclude=file4 \
10107                testdir
10108 tar tf archive | sort
10109
10110 echo "SUB 1"
10111 tar cf archive testdir
10112 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10113
10114 echo "SUB 2"
10115 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10116
10117 echo "SUB 3"
10118 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10119
10120 rm -rf testdir
10121
10122 )
10123 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10124 at_status=$? at_failed=false
10125 $at_check_filter
10126 at_fn_diff_devnull "$at_stderr" || at_failed=:
10127 echo >>"$at_stdout"; $as_echo "testdir/
10128 testdir/dir/
10129 testdir/dir/File1
10130 testdir/dir/File2
10131 testdir/dir/File4
10132 testdir/file2
10133 SUB 1
10134 testdir/dir/File2
10135 SUB 2
10136 testdir/dir/File2
10137 testdir/file2
10138 SUB 3
10139 testdir/dir/File2
10140 " | \
10141   $at_diff - "$at_stdout" || at_failed=:
10142 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
10143 $at_failed && at_fn_log_failure
10144 $at_traceon; }
10145
10146               { set +x
10147 $as_echo "$at_srcdir/exclude04.at:22:
10148 mkdir ustar
10149 (cd ustar
10150 TEST_TAR_FORMAT=ustar
10151 export TEST_TAR_FORMAT
10152 TAR_OPTIONS=\"-H ustar\"
10153 export TAR_OPTIONS
10154 rm -rf *
10155
10156
10157 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10158
10159
10160 rm -rf testdir
10161 mkdir -p testdir/dir
10162 touch testdir/file1
10163 touch testdir/file2
10164 touch testdir/file3
10165 touch testdir/file4
10166 touch testdir/dir/File1
10167 touch testdir/dir/File2
10168 touch testdir/dir/File3
10169 touch testdir/dir/File4
10170
10171 tar cf archive --exclude=FILE2 \\
10172                --exclude=file1 \\
10173                --ignore-case \\
10174                --exclude=file3 \\
10175                --no-ignore-case \\
10176                --exclude=FILE2 \\
10177                --exclude=file4 \\
10178                testdir
10179 tar tf archive | sort
10180
10181 echo \"SUB 1\"
10182 tar cf archive testdir
10183 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10184
10185 echo \"SUB 2\"
10186 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10187
10188 echo \"SUB 3\"
10189 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10190
10191 rm -rf testdir
10192
10193 )"
10194 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
10195 ( $at_check_trace;
10196 mkdir ustar
10197 (cd ustar
10198 TEST_TAR_FORMAT=ustar
10199 export TEST_TAR_FORMAT
10200 TAR_OPTIONS="-H ustar"
10201 export TAR_OPTIONS
10202 rm -rf *
10203
10204
10205 test -z "`sort < /dev/null 2>&1`" || exit 77
10206
10207
10208 rm -rf testdir
10209 mkdir -p testdir/dir
10210 touch testdir/file1
10211 touch testdir/file2
10212 touch testdir/file3
10213 touch testdir/file4
10214 touch testdir/dir/File1
10215 touch testdir/dir/File2
10216 touch testdir/dir/File3
10217 touch testdir/dir/File4
10218
10219 tar cf archive --exclude=FILE2 \
10220                --exclude=file1 \
10221                --ignore-case \
10222                --exclude=file3 \
10223                --no-ignore-case \
10224                --exclude=FILE2 \
10225                --exclude=file4 \
10226                testdir
10227 tar tf archive | sort
10228
10229 echo "SUB 1"
10230 tar cf archive testdir
10231 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10232
10233 echo "SUB 2"
10234 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10235
10236 echo "SUB 3"
10237 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10238
10239 rm -rf testdir
10240
10241 )
10242 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10243 at_status=$? at_failed=false
10244 $at_check_filter
10245 at_fn_diff_devnull "$at_stderr" || at_failed=:
10246 echo >>"$at_stdout"; $as_echo "testdir/
10247 testdir/dir/
10248 testdir/dir/File1
10249 testdir/dir/File2
10250 testdir/dir/File4
10251 testdir/file2
10252 SUB 1
10253 testdir/dir/File2
10254 SUB 2
10255 testdir/dir/File2
10256 testdir/file2
10257 SUB 3
10258 testdir/dir/File2
10259 " | \
10260   $at_diff - "$at_stdout" || at_failed=:
10261 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
10262 $at_failed && at_fn_log_failure
10263 $at_traceon; }
10264
10265               { set +x
10266 $as_echo "$at_srcdir/exclude04.at:22:
10267 mkdir posix
10268 (cd posix
10269 TEST_TAR_FORMAT=posix
10270 export TEST_TAR_FORMAT
10271 TAR_OPTIONS=\"-H posix\"
10272 export TAR_OPTIONS
10273 rm -rf *
10274
10275
10276 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10277
10278
10279 rm -rf testdir
10280 mkdir -p testdir/dir
10281 touch testdir/file1
10282 touch testdir/file2
10283 touch testdir/file3
10284 touch testdir/file4
10285 touch testdir/dir/File1
10286 touch testdir/dir/File2
10287 touch testdir/dir/File3
10288 touch testdir/dir/File4
10289
10290 tar cf archive --exclude=FILE2 \\
10291                --exclude=file1 \\
10292                --ignore-case \\
10293                --exclude=file3 \\
10294                --no-ignore-case \\
10295                --exclude=FILE2 \\
10296                --exclude=file4 \\
10297                testdir
10298 tar tf archive | sort
10299
10300 echo \"SUB 1\"
10301 tar cf archive testdir
10302 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10303
10304 echo \"SUB 2\"
10305 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10306
10307 echo \"SUB 3\"
10308 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10309
10310 rm -rf testdir
10311
10312 )"
10313 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
10314 ( $at_check_trace;
10315 mkdir posix
10316 (cd posix
10317 TEST_TAR_FORMAT=posix
10318 export TEST_TAR_FORMAT
10319 TAR_OPTIONS="-H posix"
10320 export TAR_OPTIONS
10321 rm -rf *
10322
10323
10324 test -z "`sort < /dev/null 2>&1`" || exit 77
10325
10326
10327 rm -rf testdir
10328 mkdir -p testdir/dir
10329 touch testdir/file1
10330 touch testdir/file2
10331 touch testdir/file3
10332 touch testdir/file4
10333 touch testdir/dir/File1
10334 touch testdir/dir/File2
10335 touch testdir/dir/File3
10336 touch testdir/dir/File4
10337
10338 tar cf archive --exclude=FILE2 \
10339                --exclude=file1 \
10340                --ignore-case \
10341                --exclude=file3 \
10342                --no-ignore-case \
10343                --exclude=FILE2 \
10344                --exclude=file4 \
10345                testdir
10346 tar tf archive | sort
10347
10348 echo "SUB 1"
10349 tar cf archive testdir
10350 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10351
10352 echo "SUB 2"
10353 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10354
10355 echo "SUB 3"
10356 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10357
10358 rm -rf testdir
10359
10360 )
10361 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10362 at_status=$? at_failed=false
10363 $at_check_filter
10364 at_fn_diff_devnull "$at_stderr" || at_failed=:
10365 echo >>"$at_stdout"; $as_echo "testdir/
10366 testdir/dir/
10367 testdir/dir/File1
10368 testdir/dir/File2
10369 testdir/dir/File4
10370 testdir/file2
10371 SUB 1
10372 testdir/dir/File2
10373 SUB 2
10374 testdir/dir/File2
10375 testdir/file2
10376 SUB 3
10377 testdir/dir/File2
10378 " | \
10379   $at_diff - "$at_stdout" || at_failed=:
10380 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
10381 $at_failed && at_fn_log_failure
10382 $at_traceon; }
10383
10384               { set +x
10385 $as_echo "$at_srcdir/exclude04.at:22:
10386 mkdir gnu
10387 (cd gnu
10388 TEST_TAR_FORMAT=gnu
10389 export TEST_TAR_FORMAT
10390 TAR_OPTIONS=\"-H gnu\"
10391 export TAR_OPTIONS
10392 rm -rf *
10393
10394
10395 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10396
10397
10398 rm -rf testdir
10399 mkdir -p testdir/dir
10400 touch testdir/file1
10401 touch testdir/file2
10402 touch testdir/file3
10403 touch testdir/file4
10404 touch testdir/dir/File1
10405 touch testdir/dir/File2
10406 touch testdir/dir/File3
10407 touch testdir/dir/File4
10408
10409 tar cf archive --exclude=FILE2 \\
10410                --exclude=file1 \\
10411                --ignore-case \\
10412                --exclude=file3 \\
10413                --no-ignore-case \\
10414                --exclude=FILE2 \\
10415                --exclude=file4 \\
10416                testdir
10417 tar tf archive | sort
10418
10419 echo \"SUB 1\"
10420 tar cf archive testdir
10421 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10422
10423 echo \"SUB 2\"
10424 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10425
10426 echo \"SUB 3\"
10427 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10428
10429 rm -rf testdir
10430
10431 )"
10432 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude04.at:22"
10433 ( $at_check_trace;
10434 mkdir gnu
10435 (cd gnu
10436 TEST_TAR_FORMAT=gnu
10437 export TEST_TAR_FORMAT
10438 TAR_OPTIONS="-H gnu"
10439 export TAR_OPTIONS
10440 rm -rf *
10441
10442
10443 test -z "`sort < /dev/null 2>&1`" || exit 77
10444
10445
10446 rm -rf testdir
10447 mkdir -p testdir/dir
10448 touch testdir/file1
10449 touch testdir/file2
10450 touch testdir/file3
10451 touch testdir/file4
10452 touch testdir/dir/File1
10453 touch testdir/dir/File2
10454 touch testdir/dir/File3
10455 touch testdir/dir/File4
10456
10457 tar cf archive --exclude=FILE2 \
10458                --exclude=file1 \
10459                --ignore-case \
10460                --exclude=file3 \
10461                --no-ignore-case \
10462                --exclude=FILE2 \
10463                --exclude=file4 \
10464                testdir
10465 tar tf archive | sort
10466
10467 echo "SUB 1"
10468 tar cf archive testdir
10469 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
10470
10471 echo "SUB 2"
10472 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
10473
10474 echo "SUB 3"
10475 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
10476
10477 rm -rf testdir
10478
10479 )
10480 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10481 at_status=$? at_failed=false
10482 $at_check_filter
10483 at_fn_diff_devnull "$at_stderr" || at_failed=:
10484 echo >>"$at_stdout"; $as_echo "testdir/
10485 testdir/dir/
10486 testdir/dir/File1
10487 testdir/dir/File2
10488 testdir/dir/File4
10489 testdir/file2
10490 SUB 1
10491 testdir/dir/File2
10492 SUB 2
10493 testdir/dir/File2
10494 testdir/file2
10495 SUB 3
10496 testdir/dir/File2
10497 " | \
10498   $at_diff - "$at_stdout" || at_failed=:
10499 at_fn_check_status 0 $at_status "$at_srcdir/exclude04.at:22"
10500 $at_failed && at_fn_log_failure
10501 $at_traceon; }
10502
10503
10504
10505
10506   set +x
10507   $at_times_p && times >"$at_times_file"
10508 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10509 read at_status <"$at_status_file"
10510 #AT_STOP_39
10511 #AT_START_40
10512 at_fn_group_banner 40 'exclude05.at:21' \
10513   "exclude: lots of excludes" "                      " 7
10514 at_xfail=no
10515       test -f $XFAILFILE && at_xfail=yes
10516 (
10517   $as_echo "40. $at_setup_line: testing $at_desc ..."
10518   $at_traceon
10519
10520
10521
10522
10523
10524   { set +x
10525 $as_echo "$at_srcdir/exclude05.at:24:
10526 mkdir v7
10527 (cd v7
10528 TEST_TAR_FORMAT=v7
10529 export TEST_TAR_FORMAT
10530 TAR_OPTIONS=\"-H v7\"
10531 export TAR_OPTIONS
10532 rm -rf *
10533
10534
10535 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10536
10537
10538 rm -rf testdir exclfile
10539 mkdir -p testdir
10540 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10541  while read name
10542  do
10543    genfile --file \$name
10544  done
10545
10546 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10547
10548 tar cf archive --anchored --exclude-from=exclfile \\
10549                testdir
10550 tar tf archive | sort
10551
10552 echo \"NEXT\"
10553 tar cf archive --exclude-from=exclfile \\
10554                testdir
10555 tar tf archive | sort
10556
10557 rm -rf testdir exclfile
10558
10559 )"
10560 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10561 ( $at_check_trace;
10562 mkdir v7
10563 (cd v7
10564 TEST_TAR_FORMAT=v7
10565 export TEST_TAR_FORMAT
10566 TAR_OPTIONS="-H v7"
10567 export TAR_OPTIONS
10568 rm -rf *
10569
10570
10571 test -z "`sort < /dev/null 2>&1`" || exit 77
10572
10573
10574 rm -rf testdir exclfile
10575 mkdir -p testdir
10576 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10577  while read name
10578  do
10579    genfile --file $name
10580  done
10581
10582 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10583
10584 tar cf archive --anchored --exclude-from=exclfile \
10585                testdir
10586 tar tf archive | sort
10587
10588 echo "NEXT"
10589 tar cf archive --exclude-from=exclfile \
10590                testdir
10591 tar tf archive | sort
10592
10593 rm -rf testdir exclfile
10594
10595 )
10596 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10597 at_status=$? at_failed=false
10598 $at_check_filter
10599 at_fn_diff_devnull "$at_stderr" || at_failed=:
10600 echo >>"$at_stdout"; $as_echo "testdir/
10601 testdir/file10
10602 testdir/file11
10603 testdir/file9
10604 NEXT
10605 testdir/
10606 testdir/file10
10607 testdir/file11
10608 testdir/file9
10609 " | \
10610   $at_diff - "$at_stdout" || at_failed=:
10611 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10612 $at_failed && at_fn_log_failure
10613 $at_traceon; }
10614
10615               { set +x
10616 $as_echo "$at_srcdir/exclude05.at:24:
10617 mkdir oldgnu
10618 (cd oldgnu
10619 TEST_TAR_FORMAT=oldgnu
10620 export TEST_TAR_FORMAT
10621 TAR_OPTIONS=\"-H oldgnu\"
10622 export TAR_OPTIONS
10623 rm -rf *
10624
10625
10626 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10627
10628
10629 rm -rf testdir exclfile
10630 mkdir -p testdir
10631 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10632  while read name
10633  do
10634    genfile --file \$name
10635  done
10636
10637 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10638
10639 tar cf archive --anchored --exclude-from=exclfile \\
10640                testdir
10641 tar tf archive | sort
10642
10643 echo \"NEXT\"
10644 tar cf archive --exclude-from=exclfile \\
10645                testdir
10646 tar tf archive | sort
10647
10648 rm -rf testdir exclfile
10649
10650 )"
10651 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10652 ( $at_check_trace;
10653 mkdir oldgnu
10654 (cd oldgnu
10655 TEST_TAR_FORMAT=oldgnu
10656 export TEST_TAR_FORMAT
10657 TAR_OPTIONS="-H oldgnu"
10658 export TAR_OPTIONS
10659 rm -rf *
10660
10661
10662 test -z "`sort < /dev/null 2>&1`" || exit 77
10663
10664
10665 rm -rf testdir exclfile
10666 mkdir -p testdir
10667 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10668  while read name
10669  do
10670    genfile --file $name
10671  done
10672
10673 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10674
10675 tar cf archive --anchored --exclude-from=exclfile \
10676                testdir
10677 tar tf archive | sort
10678
10679 echo "NEXT"
10680 tar cf archive --exclude-from=exclfile \
10681                testdir
10682 tar tf archive | sort
10683
10684 rm -rf testdir exclfile
10685
10686 )
10687 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10688 at_status=$? at_failed=false
10689 $at_check_filter
10690 at_fn_diff_devnull "$at_stderr" || at_failed=:
10691 echo >>"$at_stdout"; $as_echo "testdir/
10692 testdir/file10
10693 testdir/file11
10694 testdir/file9
10695 NEXT
10696 testdir/
10697 testdir/file10
10698 testdir/file11
10699 testdir/file9
10700 " | \
10701   $at_diff - "$at_stdout" || at_failed=:
10702 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10703 $at_failed && at_fn_log_failure
10704 $at_traceon; }
10705
10706               { set +x
10707 $as_echo "$at_srcdir/exclude05.at:24:
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
10717 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10718
10719
10720 rm -rf testdir exclfile
10721 mkdir -p testdir
10722 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10723  while read name
10724  do
10725    genfile --file \$name
10726  done
10727
10728 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10729
10730 tar cf archive --anchored --exclude-from=exclfile \\
10731                testdir
10732 tar tf archive | sort
10733
10734 echo \"NEXT\"
10735 tar cf archive --exclude-from=exclfile \\
10736                testdir
10737 tar tf archive | sort
10738
10739 rm -rf testdir exclfile
10740
10741 )"
10742 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10743 ( $at_check_trace;
10744 mkdir ustar
10745 (cd ustar
10746 TEST_TAR_FORMAT=ustar
10747 export TEST_TAR_FORMAT
10748 TAR_OPTIONS="-H ustar"
10749 export TAR_OPTIONS
10750 rm -rf *
10751
10752
10753 test -z "`sort < /dev/null 2>&1`" || exit 77
10754
10755
10756 rm -rf testdir exclfile
10757 mkdir -p testdir
10758 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10759  while read name
10760  do
10761    genfile --file $name
10762  done
10763
10764 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10765
10766 tar cf archive --anchored --exclude-from=exclfile \
10767                testdir
10768 tar tf archive | sort
10769
10770 echo "NEXT"
10771 tar cf archive --exclude-from=exclfile \
10772                testdir
10773 tar tf archive | sort
10774
10775 rm -rf testdir exclfile
10776
10777 )
10778 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10779 at_status=$? at_failed=false
10780 $at_check_filter
10781 at_fn_diff_devnull "$at_stderr" || at_failed=:
10782 echo >>"$at_stdout"; $as_echo "testdir/
10783 testdir/file10
10784 testdir/file11
10785 testdir/file9
10786 NEXT
10787 testdir/
10788 testdir/file10
10789 testdir/file11
10790 testdir/file9
10791 " | \
10792   $at_diff - "$at_stdout" || at_failed=:
10793 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10794 $at_failed && at_fn_log_failure
10795 $at_traceon; }
10796
10797               { set +x
10798 $as_echo "$at_srcdir/exclude05.at:24:
10799 mkdir posix
10800 (cd posix
10801 TEST_TAR_FORMAT=posix
10802 export TEST_TAR_FORMAT
10803 TAR_OPTIONS=\"-H posix\"
10804 export TAR_OPTIONS
10805 rm -rf *
10806
10807
10808 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10809
10810
10811 rm -rf testdir exclfile
10812 mkdir -p testdir
10813 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10814  while read name
10815  do
10816    genfile --file \$name
10817  done
10818
10819 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10820
10821 tar cf archive --anchored --exclude-from=exclfile \\
10822                testdir
10823 tar tf archive | sort
10824
10825 echo \"NEXT\"
10826 tar cf archive --exclude-from=exclfile \\
10827                testdir
10828 tar tf archive | sort
10829
10830 rm -rf testdir exclfile
10831
10832 )"
10833 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10834 ( $at_check_trace;
10835 mkdir posix
10836 (cd posix
10837 TEST_TAR_FORMAT=posix
10838 export TEST_TAR_FORMAT
10839 TAR_OPTIONS="-H posix"
10840 export TAR_OPTIONS
10841 rm -rf *
10842
10843
10844 test -z "`sort < /dev/null 2>&1`" || exit 77
10845
10846
10847 rm -rf testdir exclfile
10848 mkdir -p testdir
10849 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10850  while read name
10851  do
10852    genfile --file $name
10853  done
10854
10855 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10856
10857 tar cf archive --anchored --exclude-from=exclfile \
10858                testdir
10859 tar tf archive | sort
10860
10861 echo "NEXT"
10862 tar cf archive --exclude-from=exclfile \
10863                testdir
10864 tar tf archive | sort
10865
10866 rm -rf testdir exclfile
10867
10868 )
10869 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10870 at_status=$? at_failed=false
10871 $at_check_filter
10872 at_fn_diff_devnull "$at_stderr" || at_failed=:
10873 echo >>"$at_stdout"; $as_echo "testdir/
10874 testdir/file10
10875 testdir/file11
10876 testdir/file9
10877 NEXT
10878 testdir/
10879 testdir/file10
10880 testdir/file11
10881 testdir/file9
10882 " | \
10883   $at_diff - "$at_stdout" || at_failed=:
10884 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10885 $at_failed && at_fn_log_failure
10886 $at_traceon; }
10887
10888               { set +x
10889 $as_echo "$at_srcdir/exclude05.at:24:
10890 mkdir gnu
10891 (cd gnu
10892 TEST_TAR_FORMAT=gnu
10893 export TEST_TAR_FORMAT
10894 TAR_OPTIONS=\"-H gnu\"
10895 export TAR_OPTIONS
10896 rm -rf *
10897
10898
10899 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
10900
10901
10902 rm -rf testdir exclfile
10903 mkdir -p testdir
10904 awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\
10905  while read name
10906  do
10907    genfile --file \$name
10908  done
10909
10910 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile
10911
10912 tar cf archive --anchored --exclude-from=exclfile \\
10913                testdir
10914 tar tf archive | sort
10915
10916 echo \"NEXT\"
10917 tar cf archive --exclude-from=exclfile \\
10918                testdir
10919 tar tf archive | sort
10920
10921 rm -rf testdir exclfile
10922
10923 )"
10924 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude05.at:24"
10925 ( $at_check_trace;
10926 mkdir gnu
10927 (cd gnu
10928 TEST_TAR_FORMAT=gnu
10929 export TEST_TAR_FORMAT
10930 TAR_OPTIONS="-H gnu"
10931 export TAR_OPTIONS
10932 rm -rf *
10933
10934
10935 test -z "`sort < /dev/null 2>&1`" || exit 77
10936
10937
10938 rm -rf testdir exclfile
10939 mkdir -p testdir
10940 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
10941  while read name
10942  do
10943    genfile --file $name
10944  done
10945
10946 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
10947
10948 tar cf archive --anchored --exclude-from=exclfile \
10949                testdir
10950 tar tf archive | sort
10951
10952 echo "NEXT"
10953 tar cf archive --exclude-from=exclfile \
10954                testdir
10955 tar tf archive | sort
10956
10957 rm -rf testdir exclfile
10958
10959 )
10960 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
10961 at_status=$? at_failed=false
10962 $at_check_filter
10963 at_fn_diff_devnull "$at_stderr" || at_failed=:
10964 echo >>"$at_stdout"; $as_echo "testdir/
10965 testdir/file10
10966 testdir/file11
10967 testdir/file9
10968 NEXT
10969 testdir/
10970 testdir/file10
10971 testdir/file11
10972 testdir/file9
10973 " | \
10974   $at_diff - "$at_stdout" || at_failed=:
10975 at_fn_check_status 0 $at_status "$at_srcdir/exclude05.at:24"
10976 $at_failed && at_fn_log_failure
10977 $at_traceon; }
10978
10979
10980
10981
10982   set +x
10983   $at_times_p && times >"$at_times_file"
10984 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
10985 read at_status <"$at_status_file"
10986 #AT_STOP_40
10987 #AT_START_41
10988 at_fn_group_banner 41 'exclude06.at:26' \
10989   "exclude: long files in pax archives" "            " 7
10990 at_xfail=no
10991       test -f $XFAILFILE && at_xfail=yes
10992 (
10993   $as_echo "41. $at_setup_line: testing $at_desc ..."
10994   $at_traceon
10995
10996
10997
10998
10999
11000
11001
11002   { set +x
11003 $as_echo "$at_srcdir/exclude06.at:31:
11004 mkdir pax
11005 (cd pax
11006 TEST_TAR_FORMAT=pax
11007 export TEST_TAR_FORMAT
11008 TAR_OPTIONS=\"-H pax\"
11009 export TAR_OPTIONS
11010 rm -rf *
11011
11012
11013 install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null  || exit 77
11014 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
11015 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
11016
11017 tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
11018 mkdir out
11019 tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
11020 find out -type f
11021 )"
11022 at_fn_check_prepare_notrace 'an embedded newline' "exclude06.at:31"
11023 ( $at_check_trace;
11024 mkdir pax
11025 (cd pax
11026 TEST_TAR_FORMAT=pax
11027 export TEST_TAR_FORMAT
11028 TAR_OPTIONS="-H pax"
11029 export TAR_OPTIONS
11030 rm -rf *
11031
11032
11033 install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null  || exit 77
11034 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt
11035 genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c
11036
11037 tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen
11038 mkdir out
11039 tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
11040 find out -type f
11041 )
11042 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11043 at_status=$? at_failed=false
11044 $at_check_filter
11045 at_fn_diff_devnull "$at_stderr" || at_failed=:
11046 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
11047 " | \
11048   $at_diff - "$at_stdout" || at_failed=:
11049 at_fn_check_status 0 $at_status "$at_srcdir/exclude06.at:31"
11050 $at_failed && at_fn_log_failure
11051 $at_traceon; }
11052
11053
11054
11055
11056
11057   set +x
11058   $at_times_p && times >"$at_times_file"
11059 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11060 read at_status <"$at_status_file"
11061 #AT_STOP_41
11062 #AT_START_42
11063 at_fn_group_banner 42 'exclude07.at:19' \
11064   "exclude: --exclude-backups option" "              " 7
11065 at_xfail=no
11066       test -f $XFAILFILE && at_xfail=yes
11067 (
11068   $as_echo "42. $at_setup_line: testing $at_desc ..."
11069   $at_traceon
11070
11071
11072
11073
11074
11075   { set +x
11076 $as_echo "$at_srcdir/exclude07.at:22:
11077 mkdir v7
11078 (cd v7
11079 TEST_TAR_FORMAT=v7
11080 export TEST_TAR_FORMAT
11081 TAR_OPTIONS=\"-H v7\"
11082 export TAR_OPTIONS
11083 rm -rf *
11084
11085 mkdir dir
11086 genfile --file dir/file
11087 genfile --file dir/file~
11088 genfile --file \"dir/.#file\"
11089 genfile --file \"dir/#file#\"
11090
11091 tar -v -c -f archive --exclude-backups dir
11092 )"
11093 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
11094 ( $at_check_trace;
11095 mkdir v7
11096 (cd v7
11097 TEST_TAR_FORMAT=v7
11098 export TEST_TAR_FORMAT
11099 TAR_OPTIONS="-H v7"
11100 export TAR_OPTIONS
11101 rm -rf *
11102
11103 mkdir dir
11104 genfile --file dir/file
11105 genfile --file dir/file~
11106 genfile --file "dir/.#file"
11107 genfile --file "dir/#file#"
11108
11109 tar -v -c -f archive --exclude-backups dir
11110 )
11111 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11112 at_status=$? at_failed=false
11113 $at_check_filter
11114 at_fn_diff_devnull "$at_stderr" || at_failed=:
11115 echo >>"$at_stdout"; $as_echo "dir/
11116 dir/file
11117 " | \
11118   $at_diff - "$at_stdout" || at_failed=:
11119 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
11120 $at_failed && at_fn_log_failure
11121 $at_traceon; }
11122
11123               { set +x
11124 $as_echo "$at_srcdir/exclude07.at:22:
11125 mkdir oldgnu
11126 (cd oldgnu
11127 TEST_TAR_FORMAT=oldgnu
11128 export TEST_TAR_FORMAT
11129 TAR_OPTIONS=\"-H oldgnu\"
11130 export TAR_OPTIONS
11131 rm -rf *
11132
11133 mkdir dir
11134 genfile --file dir/file
11135 genfile --file dir/file~
11136 genfile --file \"dir/.#file\"
11137 genfile --file \"dir/#file#\"
11138
11139 tar -v -c -f archive --exclude-backups dir
11140 )"
11141 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
11142 ( $at_check_trace;
11143 mkdir oldgnu
11144 (cd oldgnu
11145 TEST_TAR_FORMAT=oldgnu
11146 export TEST_TAR_FORMAT
11147 TAR_OPTIONS="-H oldgnu"
11148 export TAR_OPTIONS
11149 rm -rf *
11150
11151 mkdir dir
11152 genfile --file dir/file
11153 genfile --file dir/file~
11154 genfile --file "dir/.#file"
11155 genfile --file "dir/#file#"
11156
11157 tar -v -c -f archive --exclude-backups dir
11158 )
11159 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11160 at_status=$? at_failed=false
11161 $at_check_filter
11162 at_fn_diff_devnull "$at_stderr" || at_failed=:
11163 echo >>"$at_stdout"; $as_echo "dir/
11164 dir/file
11165 " | \
11166   $at_diff - "$at_stdout" || at_failed=:
11167 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
11168 $at_failed && at_fn_log_failure
11169 $at_traceon; }
11170
11171               { set +x
11172 $as_echo "$at_srcdir/exclude07.at:22:
11173 mkdir ustar
11174 (cd ustar
11175 TEST_TAR_FORMAT=ustar
11176 export TEST_TAR_FORMAT
11177 TAR_OPTIONS=\"-H ustar\"
11178 export TAR_OPTIONS
11179 rm -rf *
11180
11181 mkdir dir
11182 genfile --file dir/file
11183 genfile --file dir/file~
11184 genfile --file \"dir/.#file\"
11185 genfile --file \"dir/#file#\"
11186
11187 tar -v -c -f archive --exclude-backups dir
11188 )"
11189 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
11190 ( $at_check_trace;
11191 mkdir ustar
11192 (cd ustar
11193 TEST_TAR_FORMAT=ustar
11194 export TEST_TAR_FORMAT
11195 TAR_OPTIONS="-H ustar"
11196 export TAR_OPTIONS
11197 rm -rf *
11198
11199 mkdir dir
11200 genfile --file dir/file
11201 genfile --file dir/file~
11202 genfile --file "dir/.#file"
11203 genfile --file "dir/#file#"
11204
11205 tar -v -c -f archive --exclude-backups dir
11206 )
11207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11208 at_status=$? at_failed=false
11209 $at_check_filter
11210 at_fn_diff_devnull "$at_stderr" || at_failed=:
11211 echo >>"$at_stdout"; $as_echo "dir/
11212 dir/file
11213 " | \
11214   $at_diff - "$at_stdout" || at_failed=:
11215 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
11216 $at_failed && at_fn_log_failure
11217 $at_traceon; }
11218
11219               { set +x
11220 $as_echo "$at_srcdir/exclude07.at:22:
11221 mkdir posix
11222 (cd posix
11223 TEST_TAR_FORMAT=posix
11224 export TEST_TAR_FORMAT
11225 TAR_OPTIONS=\"-H posix\"
11226 export TAR_OPTIONS
11227 rm -rf *
11228
11229 mkdir dir
11230 genfile --file dir/file
11231 genfile --file dir/file~
11232 genfile --file \"dir/.#file\"
11233 genfile --file \"dir/#file#\"
11234
11235 tar -v -c -f archive --exclude-backups dir
11236 )"
11237 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
11238 ( $at_check_trace;
11239 mkdir posix
11240 (cd posix
11241 TEST_TAR_FORMAT=posix
11242 export TEST_TAR_FORMAT
11243 TAR_OPTIONS="-H posix"
11244 export TAR_OPTIONS
11245 rm -rf *
11246
11247 mkdir dir
11248 genfile --file dir/file
11249 genfile --file dir/file~
11250 genfile --file "dir/.#file"
11251 genfile --file "dir/#file#"
11252
11253 tar -v -c -f archive --exclude-backups dir
11254 )
11255 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11256 at_status=$? at_failed=false
11257 $at_check_filter
11258 at_fn_diff_devnull "$at_stderr" || at_failed=:
11259 echo >>"$at_stdout"; $as_echo "dir/
11260 dir/file
11261 " | \
11262   $at_diff - "$at_stdout" || at_failed=:
11263 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
11264 $at_failed && at_fn_log_failure
11265 $at_traceon; }
11266
11267               { set +x
11268 $as_echo "$at_srcdir/exclude07.at:22:
11269 mkdir gnu
11270 (cd gnu
11271 TEST_TAR_FORMAT=gnu
11272 export TEST_TAR_FORMAT
11273 TAR_OPTIONS=\"-H gnu\"
11274 export TAR_OPTIONS
11275 rm -rf *
11276
11277 mkdir dir
11278 genfile --file dir/file
11279 genfile --file dir/file~
11280 genfile --file \"dir/.#file\"
11281 genfile --file \"dir/#file#\"
11282
11283 tar -v -c -f archive --exclude-backups dir
11284 )"
11285 at_fn_check_prepare_notrace 'an embedded newline' "exclude07.at:22"
11286 ( $at_check_trace;
11287 mkdir gnu
11288 (cd gnu
11289 TEST_TAR_FORMAT=gnu
11290 export TEST_TAR_FORMAT
11291 TAR_OPTIONS="-H gnu"
11292 export TAR_OPTIONS
11293 rm -rf *
11294
11295 mkdir dir
11296 genfile --file dir/file
11297 genfile --file dir/file~
11298 genfile --file "dir/.#file"
11299 genfile --file "dir/#file#"
11300
11301 tar -v -c -f archive --exclude-backups dir
11302 )
11303 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11304 at_status=$? at_failed=false
11305 $at_check_filter
11306 at_fn_diff_devnull "$at_stderr" || at_failed=:
11307 echo >>"$at_stdout"; $as_echo "dir/
11308 dir/file
11309 " | \
11310   $at_diff - "$at_stdout" || at_failed=:
11311 at_fn_check_status 0 $at_status "$at_srcdir/exclude07.at:22"
11312 $at_failed && at_fn_log_failure
11313 $at_traceon; }
11314
11315
11316
11317
11318   set +x
11319   $at_times_p && times >"$at_times_file"
11320 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11321 read at_status <"$at_status_file"
11322 #AT_STOP_42
11323 #AT_START_43
11324 at_fn_group_banner 43 'exclude08.at:36' \
11325   "--exclude-tag option" "                           " 7
11326 at_xfail=no
11327       test -f $XFAILFILE && at_xfail=yes
11328 (
11329   $as_echo "43. $at_setup_line: testing $at_desc ..."
11330   $at_traceon
11331
11332
11333
11334
11335
11336   { set +x
11337 $as_echo "$at_srcdir/exclude08.at:39:
11338 mkdir v7
11339 (cd v7
11340 TEST_TAR_FORMAT=v7
11341 export TEST_TAR_FORMAT
11342 TAR_OPTIONS=\"-H v7\"
11343 export TAR_OPTIONS
11344 rm -rf *
11345
11346
11347 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11348
11349 mkexcltest etest
11350 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11351 )"
11352 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
11353 ( $at_check_trace;
11354 mkdir v7
11355 (cd v7
11356 TEST_TAR_FORMAT=v7
11357 export TEST_TAR_FORMAT
11358 TAR_OPTIONS="-H v7"
11359 export TAR_OPTIONS
11360 rm -rf *
11361
11362
11363 test -z "`sort < /dev/null 2>&1`" || exit 77
11364
11365 mkexcltest etest
11366 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11367 )
11368 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11369 at_status=$? at_failed=false
11370 $at_check_filter
11371 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11372 " | \
11373   $at_diff - "$at_stderr" || at_failed=:
11374 echo >>"$at_stdout"; $as_echo "etest/
11375 etest/subdir/
11376 etest/subdir/excludeme
11377 etest/top-level-file
11378 " | \
11379   $at_diff - "$at_stdout" || at_failed=:
11380 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
11381 $at_failed && at_fn_log_failure
11382 $at_traceon; }
11383
11384               { set +x
11385 $as_echo "$at_srcdir/exclude08.at:39:
11386 mkdir oldgnu
11387 (cd oldgnu
11388 TEST_TAR_FORMAT=oldgnu
11389 export TEST_TAR_FORMAT
11390 TAR_OPTIONS=\"-H oldgnu\"
11391 export TAR_OPTIONS
11392 rm -rf *
11393
11394
11395 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11396
11397 mkexcltest etest
11398 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11399 )"
11400 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
11401 ( $at_check_trace;
11402 mkdir oldgnu
11403 (cd oldgnu
11404 TEST_TAR_FORMAT=oldgnu
11405 export TEST_TAR_FORMAT
11406 TAR_OPTIONS="-H oldgnu"
11407 export TAR_OPTIONS
11408 rm -rf *
11409
11410
11411 test -z "`sort < /dev/null 2>&1`" || exit 77
11412
11413 mkexcltest etest
11414 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11415 )
11416 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11417 at_status=$? at_failed=false
11418 $at_check_filter
11419 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11420 " | \
11421   $at_diff - "$at_stderr" || at_failed=:
11422 echo >>"$at_stdout"; $as_echo "etest/
11423 etest/subdir/
11424 etest/subdir/excludeme
11425 etest/top-level-file
11426 " | \
11427   $at_diff - "$at_stdout" || at_failed=:
11428 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
11429 $at_failed && at_fn_log_failure
11430 $at_traceon; }
11431
11432               { set +x
11433 $as_echo "$at_srcdir/exclude08.at:39:
11434 mkdir ustar
11435 (cd ustar
11436 TEST_TAR_FORMAT=ustar
11437 export TEST_TAR_FORMAT
11438 TAR_OPTIONS=\"-H ustar\"
11439 export TAR_OPTIONS
11440 rm -rf *
11441
11442
11443 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11444
11445 mkexcltest etest
11446 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11447 )"
11448 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
11449 ( $at_check_trace;
11450 mkdir ustar
11451 (cd ustar
11452 TEST_TAR_FORMAT=ustar
11453 export TEST_TAR_FORMAT
11454 TAR_OPTIONS="-H ustar"
11455 export TAR_OPTIONS
11456 rm -rf *
11457
11458
11459 test -z "`sort < /dev/null 2>&1`" || exit 77
11460
11461 mkexcltest etest
11462 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11463 )
11464 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11465 at_status=$? at_failed=false
11466 $at_check_filter
11467 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11468 " | \
11469   $at_diff - "$at_stderr" || at_failed=:
11470 echo >>"$at_stdout"; $as_echo "etest/
11471 etest/subdir/
11472 etest/subdir/excludeme
11473 etest/top-level-file
11474 " | \
11475   $at_diff - "$at_stdout" || at_failed=:
11476 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
11477 $at_failed && at_fn_log_failure
11478 $at_traceon; }
11479
11480               { set +x
11481 $as_echo "$at_srcdir/exclude08.at:39:
11482 mkdir posix
11483 (cd posix
11484 TEST_TAR_FORMAT=posix
11485 export TEST_TAR_FORMAT
11486 TAR_OPTIONS=\"-H posix\"
11487 export TAR_OPTIONS
11488 rm -rf *
11489
11490
11491 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11492
11493 mkexcltest etest
11494 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11495 )"
11496 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
11497 ( $at_check_trace;
11498 mkdir posix
11499 (cd posix
11500 TEST_TAR_FORMAT=posix
11501 export TEST_TAR_FORMAT
11502 TAR_OPTIONS="-H posix"
11503 export TAR_OPTIONS
11504 rm -rf *
11505
11506
11507 test -z "`sort < /dev/null 2>&1`" || exit 77
11508
11509 mkexcltest etest
11510 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11511 )
11512 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11513 at_status=$? at_failed=false
11514 $at_check_filter
11515 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11516 " | \
11517   $at_diff - "$at_stderr" || at_failed=:
11518 echo >>"$at_stdout"; $as_echo "etest/
11519 etest/subdir/
11520 etest/subdir/excludeme
11521 etest/top-level-file
11522 " | \
11523   $at_diff - "$at_stdout" || at_failed=:
11524 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
11525 $at_failed && at_fn_log_failure
11526 $at_traceon; }
11527
11528               { set +x
11529 $as_echo "$at_srcdir/exclude08.at:39:
11530 mkdir gnu
11531 (cd gnu
11532 TEST_TAR_FORMAT=gnu
11533 export TEST_TAR_FORMAT
11534 TAR_OPTIONS=\"-H gnu\"
11535 export TAR_OPTIONS
11536 rm -rf *
11537
11538
11539 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11540
11541 mkexcltest etest
11542 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11543 )"
11544 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude08.at:39"
11545 ( $at_check_trace;
11546 mkdir gnu
11547 (cd gnu
11548 TEST_TAR_FORMAT=gnu
11549 export TEST_TAR_FORMAT
11550 TAR_OPTIONS="-H gnu"
11551 export TAR_OPTIONS
11552 rm -rf *
11553
11554
11555 test -z "`sort < /dev/null 2>&1`" || exit 77
11556
11557 mkexcltest etest
11558 tar -c -f etest.tar --exclude-tag=excludeme -v etest | sort
11559 )
11560 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11561 at_status=$? at_failed=false
11562 $at_check_filter
11563 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11564 " | \
11565   $at_diff - "$at_stderr" || at_failed=:
11566 echo >>"$at_stdout"; $as_echo "etest/
11567 etest/subdir/
11568 etest/subdir/excludeme
11569 etest/top-level-file
11570 " | \
11571   $at_diff - "$at_stdout" || at_failed=:
11572 at_fn_check_status 0 $at_status "$at_srcdir/exclude08.at:39"
11573 $at_failed && at_fn_log_failure
11574 $at_traceon; }
11575
11576
11577
11578
11579   set +x
11580   $at_times_p && times >"$at_times_file"
11581 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11582 read at_status <"$at_status_file"
11583 #AT_STOP_43
11584 #AT_START_44
11585 at_fn_group_banner 44 'exclude09.at:37' \
11586   "--exclude-tag option and --listed-incremental" "  " 7
11587 at_xfail=no
11588       test -f $XFAILFILE && at_xfail=yes
11589 (
11590   $as_echo "44. $at_setup_line: testing $at_desc ..."
11591   $at_traceon
11592
11593
11594
11595
11596
11597   { set +x
11598 $as_echo "$at_srcdir/exclude09.at:40:
11599 mkdir gnu
11600 (cd gnu
11601 TEST_TAR_FORMAT=gnu
11602 export TEST_TAR_FORMAT
11603 TAR_OPTIONS=\"-H gnu\"
11604 export TAR_OPTIONS
11605 rm -rf *
11606
11607
11608 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11609
11610 mkexcltest etest
11611 tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
11612 )"
11613 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude09.at:40"
11614 ( $at_check_trace;
11615 mkdir gnu
11616 (cd gnu
11617 TEST_TAR_FORMAT=gnu
11618 export TEST_TAR_FORMAT
11619 TAR_OPTIONS="-H gnu"
11620 export TAR_OPTIONS
11621 rm -rf *
11622
11623
11624 test -z "`sort < /dev/null 2>&1`" || exit 77
11625
11626 mkexcltest etest
11627 tar -c -f etest.tar --exclude-tag=excludeme --listed=snar -v etest | sort
11628 )
11629 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11630 at_status=$? at_failed=false
11631 $at_check_filter
11632 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
11633 tar: etest/subdir: Directory is new
11634 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
11635 " | \
11636   $at_diff - "$at_stderr" || at_failed=:
11637 echo >>"$at_stdout"; $as_echo "etest/
11638 etest/subdir/
11639 etest/subdir/excludeme
11640 etest/top-level-file
11641 " | \
11642   $at_diff - "$at_stdout" || at_failed=:
11643 at_fn_check_status 0 $at_status "$at_srcdir/exclude09.at:40"
11644 $at_failed && at_fn_log_failure
11645 $at_traceon; }
11646
11647
11648
11649
11650   set +x
11651   $at_times_p && times >"$at_times_file"
11652 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11653 read at_status <"$at_status_file"
11654 #AT_STOP_44
11655 #AT_START_45
11656 at_fn_group_banner 45 'exclude10.at:38' \
11657   "--exclude-tag option in incremental pass" "       " 7
11658 at_xfail=no
11659       test -f $XFAILFILE && at_xfail=yes
11660 (
11661   $as_echo "45. $at_setup_line: testing $at_desc ..."
11662   $at_traceon
11663
11664
11665
11666
11667
11668   { set +x
11669 $as_echo "$at_srcdir/exclude10.at:41:
11670 mkdir gnu
11671 (cd gnu
11672 TEST_TAR_FORMAT=gnu
11673 export TEST_TAR_FORMAT
11674 TAR_OPTIONS=\"-H gnu\"
11675 export TAR_OPTIONS
11676 rm -rf *
11677
11678
11679 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11680
11681 mkexcltest etest
11682 rm etest/subdir/excludeme
11683 decho \"# Level 0\"
11684 tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
11685 touch etest/subdir/excludeme
11686 touch etest/subdir/otherfile
11687
11688 decho \"# Level 1\"
11689 cp snar-0 snar-1
11690 tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
11691 )"
11692 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude10.at:41"
11693 ( $at_check_trace;
11694 mkdir gnu
11695 (cd gnu
11696 TEST_TAR_FORMAT=gnu
11697 export TEST_TAR_FORMAT
11698 TAR_OPTIONS="-H gnu"
11699 export TAR_OPTIONS
11700 rm -rf *
11701
11702
11703 test -z "`sort < /dev/null 2>&1`" || exit 77
11704
11705 mkexcltest etest
11706 rm etest/subdir/excludeme
11707 decho "# Level 0"
11708 tar -c -f etest-0.tar --exclude-tag=excludeme --listed=snar-0 -v etest | sort
11709 touch etest/subdir/excludeme
11710 touch etest/subdir/otherfile
11711
11712 decho "# Level 1"
11713 cp snar-0 snar-1
11714 tar -c -f etest-1.tar --exclude-tag=excludeme --listed=snar-1 -v etest | sort
11715 )
11716 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11717 at_status=$? at_failed=false
11718 $at_check_filter
11719 echo >>"$at_stderr"; $as_echo "# Level 0
11720 tar: etest: Directory is new
11721 tar: etest/subdir: Directory is new
11722 # Level 1
11723 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
11724 " | \
11725   $at_diff - "$at_stderr" || at_failed=:
11726 echo >>"$at_stdout"; $as_echo "# Level 0
11727 etest/
11728 etest/subdir/
11729 etest/subdir/subdir-file
11730 etest/top-level-file
11731 # Level 1
11732 etest/
11733 etest/subdir/
11734 etest/subdir/excludeme
11735 " | \
11736   $at_diff - "$at_stdout" || at_failed=:
11737 at_fn_check_status 0 $at_status "$at_srcdir/exclude10.at:41"
11738 $at_failed && at_fn_log_failure
11739 $at_traceon; }
11740
11741
11742
11743
11744   set +x
11745   $at_times_p && times >"$at_times_file"
11746 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
11747 read at_status <"$at_status_file"
11748 #AT_STOP_45
11749 #AT_START_46
11750 at_fn_group_banner 46 'exclude11.at:36' \
11751   "--exclude-tag-under option" "                     " 7
11752 at_xfail=no
11753       test -f $XFAILFILE && at_xfail=yes
11754 (
11755   $as_echo "46. $at_setup_line: testing $at_desc ..."
11756   $at_traceon
11757
11758
11759
11760
11761
11762   { set +x
11763 $as_echo "$at_srcdir/exclude11.at:39:
11764 mkdir v7
11765 (cd v7
11766 TEST_TAR_FORMAT=v7
11767 export TEST_TAR_FORMAT
11768 TAR_OPTIONS=\"-H v7\"
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-under=excludeme -v etest | sort
11777 )"
11778 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11779 ( $at_check_trace;
11780 mkdir v7
11781 (cd v7
11782 TEST_TAR_FORMAT=v7
11783 export TEST_TAR_FORMAT
11784 TAR_OPTIONS="-H v7"
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-under=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; contents not dumped
11798 " | \
11799   $at_diff - "$at_stderr" || at_failed=:
11800 echo >>"$at_stdout"; $as_echo "etest/
11801 etest/subdir/
11802 etest/top-level-file
11803 " | \
11804   $at_diff - "$at_stdout" || at_failed=:
11805 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11806 $at_failed && at_fn_log_failure
11807 $at_traceon; }
11808
11809               { set +x
11810 $as_echo "$at_srcdir/exclude11.at:39:
11811 mkdir oldgnu
11812 (cd oldgnu
11813 TEST_TAR_FORMAT=oldgnu
11814 export TEST_TAR_FORMAT
11815 TAR_OPTIONS=\"-H oldgnu\"
11816 export TAR_OPTIONS
11817 rm -rf *
11818
11819
11820 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11821
11822 mkexcltest etest
11823 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11824 )"
11825 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11826 ( $at_check_trace;
11827 mkdir oldgnu
11828 (cd oldgnu
11829 TEST_TAR_FORMAT=oldgnu
11830 export TEST_TAR_FORMAT
11831 TAR_OPTIONS="-H oldgnu"
11832 export TAR_OPTIONS
11833 rm -rf *
11834
11835
11836 test -z "`sort < /dev/null 2>&1`" || exit 77
11837
11838 mkexcltest etest
11839 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11840 )
11841 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11842 at_status=$? at_failed=false
11843 $at_check_filter
11844 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11845 " | \
11846   $at_diff - "$at_stderr" || at_failed=:
11847 echo >>"$at_stdout"; $as_echo "etest/
11848 etest/subdir/
11849 etest/top-level-file
11850 " | \
11851   $at_diff - "$at_stdout" || at_failed=:
11852 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11853 $at_failed && at_fn_log_failure
11854 $at_traceon; }
11855
11856               { set +x
11857 $as_echo "$at_srcdir/exclude11.at:39:
11858 mkdir ustar
11859 (cd ustar
11860 TEST_TAR_FORMAT=ustar
11861 export TEST_TAR_FORMAT
11862 TAR_OPTIONS=\"-H ustar\"
11863 export TAR_OPTIONS
11864 rm -rf *
11865
11866
11867 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11868
11869 mkexcltest etest
11870 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11871 )"
11872 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11873 ( $at_check_trace;
11874 mkdir ustar
11875 (cd ustar
11876 TEST_TAR_FORMAT=ustar
11877 export TEST_TAR_FORMAT
11878 TAR_OPTIONS="-H ustar"
11879 export TAR_OPTIONS
11880 rm -rf *
11881
11882
11883 test -z "`sort < /dev/null 2>&1`" || exit 77
11884
11885 mkexcltest etest
11886 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11887 )
11888 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11889 at_status=$? at_failed=false
11890 $at_check_filter
11891 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11892 " | \
11893   $at_diff - "$at_stderr" || at_failed=:
11894 echo >>"$at_stdout"; $as_echo "etest/
11895 etest/subdir/
11896 etest/top-level-file
11897 " | \
11898   $at_diff - "$at_stdout" || at_failed=:
11899 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11900 $at_failed && at_fn_log_failure
11901 $at_traceon; }
11902
11903               { set +x
11904 $as_echo "$at_srcdir/exclude11.at:39:
11905 mkdir posix
11906 (cd posix
11907 TEST_TAR_FORMAT=posix
11908 export TEST_TAR_FORMAT
11909 TAR_OPTIONS=\"-H posix\"
11910 export TAR_OPTIONS
11911 rm -rf *
11912
11913
11914 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11915
11916 mkexcltest etest
11917 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11918 )"
11919 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11920 ( $at_check_trace;
11921 mkdir posix
11922 (cd posix
11923 TEST_TAR_FORMAT=posix
11924 export TEST_TAR_FORMAT
11925 TAR_OPTIONS="-H posix"
11926 export TAR_OPTIONS
11927 rm -rf *
11928
11929
11930 test -z "`sort < /dev/null 2>&1`" || exit 77
11931
11932 mkexcltest etest
11933 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11934 )
11935 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11936 at_status=$? at_failed=false
11937 $at_check_filter
11938 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11939 " | \
11940   $at_diff - "$at_stderr" || at_failed=:
11941 echo >>"$at_stdout"; $as_echo "etest/
11942 etest/subdir/
11943 etest/top-level-file
11944 " | \
11945   $at_diff - "$at_stdout" || at_failed=:
11946 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11947 $at_failed && at_fn_log_failure
11948 $at_traceon; }
11949
11950               { set +x
11951 $as_echo "$at_srcdir/exclude11.at:39:
11952 mkdir gnu
11953 (cd gnu
11954 TEST_TAR_FORMAT=gnu
11955 export TEST_TAR_FORMAT
11956 TAR_OPTIONS=\"-H gnu\"
11957 export TAR_OPTIONS
11958 rm -rf *
11959
11960
11961 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
11962
11963 mkexcltest etest
11964 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11965 )"
11966 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude11.at:39"
11967 ( $at_check_trace;
11968 mkdir gnu
11969 (cd gnu
11970 TEST_TAR_FORMAT=gnu
11971 export TEST_TAR_FORMAT
11972 TAR_OPTIONS="-H gnu"
11973 export TAR_OPTIONS
11974 rm -rf *
11975
11976
11977 test -z "`sort < /dev/null 2>&1`" || exit 77
11978
11979 mkexcltest etest
11980 tar -c -f etest.tar --exclude-tag-under=excludeme -v etest | sort
11981 )
11982 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
11983 at_status=$? at_failed=false
11984 $at_check_filter
11985 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; contents not dumped
11986 " | \
11987   $at_diff - "$at_stderr" || at_failed=:
11988 echo >>"$at_stdout"; $as_echo "etest/
11989 etest/subdir/
11990 etest/top-level-file
11991 " | \
11992   $at_diff - "$at_stdout" || at_failed=:
11993 at_fn_check_status 0 $at_status "$at_srcdir/exclude11.at:39"
11994 $at_failed && at_fn_log_failure
11995 $at_traceon; }
11996
11997
11998
11999
12000   set +x
12001   $at_times_p && times >"$at_times_file"
12002 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12003 read at_status <"$at_status_file"
12004 #AT_STOP_46
12005 #AT_START_47
12006 at_fn_group_banner 47 'exclude12.at:37' \
12007   "--exclude-tag-under and --listed-incremental" "   " 7
12008 at_xfail=no
12009       test -f $XFAILFILE && at_xfail=yes
12010 (
12011   $as_echo "47. $at_setup_line: testing $at_desc ..."
12012   $at_traceon
12013
12014
12015
12016
12017
12018   { set +x
12019 $as_echo "$at_srcdir/exclude12.at:40:
12020 mkdir gnu
12021 (cd gnu
12022 TEST_TAR_FORMAT=gnu
12023 export TEST_TAR_FORMAT
12024 TAR_OPTIONS=\"-H gnu\"
12025 export TAR_OPTIONS
12026 rm -rf *
12027
12028
12029 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12030
12031 mkexcltest etest
12032 tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
12033 )"
12034 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude12.at:40"
12035 ( $at_check_trace;
12036 mkdir gnu
12037 (cd gnu
12038 TEST_TAR_FORMAT=gnu
12039 export TEST_TAR_FORMAT
12040 TAR_OPTIONS="-H gnu"
12041 export TAR_OPTIONS
12042 rm -rf *
12043
12044
12045 test -z "`sort < /dev/null 2>&1`" || exit 77
12046
12047 mkexcltest etest
12048 tar -c -f etest.tar --exclude-tag-under=excludeme --listed=snar -v etest | sort
12049 )
12050 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12051 at_status=$? at_failed=false
12052 $at_check_filter
12053 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
12054 tar: etest/subdir: Directory is new
12055 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
12056 " | \
12057   $at_diff - "$at_stderr" || at_failed=:
12058 echo >>"$at_stdout"; $as_echo "etest/
12059 etest/subdir/
12060 etest/top-level-file
12061 " | \
12062   $at_diff - "$at_stdout" || at_failed=:
12063 at_fn_check_status 0 $at_status "$at_srcdir/exclude12.at:40"
12064 $at_failed && at_fn_log_failure
12065 $at_traceon; }
12066
12067
12068
12069
12070   set +x
12071   $at_times_p && times >"$at_times_file"
12072 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12073 read at_status <"$at_status_file"
12074 #AT_STOP_47
12075 #AT_START_48
12076 at_fn_group_banner 48 'exclude13.at:39' \
12077   "--exclude-tag-under option in incremental pass" " " 7
12078 at_xfail=no
12079       test -f $XFAILFILE && at_xfail=yes
12080 (
12081   $as_echo "48. $at_setup_line: testing $at_desc ..."
12082   $at_traceon
12083
12084
12085
12086
12087
12088   { set +x
12089 $as_echo "$at_srcdir/exclude13.at:42:
12090 mkdir gnu
12091 (cd gnu
12092 TEST_TAR_FORMAT=gnu
12093 export TEST_TAR_FORMAT
12094 TAR_OPTIONS=\"-H gnu\"
12095 export TAR_OPTIONS
12096 rm -rf *
12097
12098
12099 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12100
12101 mkexcltest etest
12102 rm etest/subdir/excludeme
12103 decho \"# Level 0\"
12104 tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
12105 touch etest/subdir/excludeme
12106 touch etest/subdir/otherfile
12107
12108 decho \"# Level 1\"
12109 cp snar-0 snar-1
12110 tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
12111 )"
12112 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude13.at:42"
12113 ( $at_check_trace;
12114 mkdir gnu
12115 (cd gnu
12116 TEST_TAR_FORMAT=gnu
12117 export TEST_TAR_FORMAT
12118 TAR_OPTIONS="-H gnu"
12119 export TAR_OPTIONS
12120 rm -rf *
12121
12122
12123 test -z "`sort < /dev/null 2>&1`" || exit 77
12124
12125 mkexcltest etest
12126 rm etest/subdir/excludeme
12127 decho "# Level 0"
12128 tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
12129 touch etest/subdir/excludeme
12130 touch etest/subdir/otherfile
12131
12132 decho "# Level 1"
12133 cp snar-0 snar-1
12134 tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
12135 )
12136 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12137 at_status=$? at_failed=false
12138 $at_check_filter
12139 echo >>"$at_stderr"; $as_echo "# Level 0
12140 tar: etest: Directory is new
12141 tar: etest/subdir: Directory is new
12142 # Level 1
12143 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
12144 " | \
12145   $at_diff - "$at_stderr" || at_failed=:
12146 echo >>"$at_stdout"; $as_echo "# Level 0
12147 etest/
12148 etest/subdir/
12149 etest/subdir/subdir-file
12150 etest/top-level-file
12151 # Level 1
12152 etest/
12153 etest/subdir/
12154 " | \
12155   $at_diff - "$at_stdout" || at_failed=:
12156 at_fn_check_status 0 $at_status "$at_srcdir/exclude13.at:42"
12157 $at_failed && at_fn_log_failure
12158 $at_traceon; }
12159
12160
12161
12162
12163   set +x
12164   $at_times_p && times >"$at_times_file"
12165 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12166 read at_status <"$at_status_file"
12167 #AT_STOP_48
12168 #AT_START_49
12169 at_fn_group_banner 49 'exclude14.at:36' \
12170   "--exclude-tag-all option" "                       " 7
12171 at_xfail=no
12172       test -f $XFAILFILE && at_xfail=yes
12173 (
12174   $as_echo "49. $at_setup_line: testing $at_desc ..."
12175   $at_traceon
12176
12177
12178
12179
12180
12181   { set +x
12182 $as_echo "$at_srcdir/exclude14.at:39:
12183 mkdir v7
12184 (cd v7
12185 TEST_TAR_FORMAT=v7
12186 export TEST_TAR_FORMAT
12187 TAR_OPTIONS=\"-H v7\"
12188 export TAR_OPTIONS
12189 rm -rf *
12190
12191
12192 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12193
12194 mkexcltest etest
12195 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12196 )"
12197 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
12198 ( $at_check_trace;
12199 mkdir v7
12200 (cd v7
12201 TEST_TAR_FORMAT=v7
12202 export TEST_TAR_FORMAT
12203 TAR_OPTIONS="-H v7"
12204 export TAR_OPTIONS
12205 rm -rf *
12206
12207
12208 test -z "`sort < /dev/null 2>&1`" || exit 77
12209
12210 mkexcltest etest
12211 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12212 )
12213 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12214 at_status=$? at_failed=false
12215 $at_check_filter
12216 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
12217 " | \
12218   $at_diff - "$at_stderr" || at_failed=:
12219 echo >>"$at_stdout"; $as_echo "etest/
12220 etest/top-level-file
12221 " | \
12222   $at_diff - "$at_stdout" || at_failed=:
12223 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
12224 $at_failed && at_fn_log_failure
12225 $at_traceon; }
12226
12227               { set +x
12228 $as_echo "$at_srcdir/exclude14.at:39:
12229 mkdir oldgnu
12230 (cd oldgnu
12231 TEST_TAR_FORMAT=oldgnu
12232 export TEST_TAR_FORMAT
12233 TAR_OPTIONS=\"-H oldgnu\"
12234 export TAR_OPTIONS
12235 rm -rf *
12236
12237
12238 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12239
12240 mkexcltest etest
12241 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12242 )"
12243 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
12244 ( $at_check_trace;
12245 mkdir oldgnu
12246 (cd oldgnu
12247 TEST_TAR_FORMAT=oldgnu
12248 export TEST_TAR_FORMAT
12249 TAR_OPTIONS="-H oldgnu"
12250 export TAR_OPTIONS
12251 rm -rf *
12252
12253
12254 test -z "`sort < /dev/null 2>&1`" || exit 77
12255
12256 mkexcltest etest
12257 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12258 )
12259 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12260 at_status=$? at_failed=false
12261 $at_check_filter
12262 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
12263 " | \
12264   $at_diff - "$at_stderr" || at_failed=:
12265 echo >>"$at_stdout"; $as_echo "etest/
12266 etest/top-level-file
12267 " | \
12268   $at_diff - "$at_stdout" || at_failed=:
12269 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
12270 $at_failed && at_fn_log_failure
12271 $at_traceon; }
12272
12273               { set +x
12274 $as_echo "$at_srcdir/exclude14.at:39:
12275 mkdir ustar
12276 (cd ustar
12277 TEST_TAR_FORMAT=ustar
12278 export TEST_TAR_FORMAT
12279 TAR_OPTIONS=\"-H ustar\"
12280 export TAR_OPTIONS
12281 rm -rf *
12282
12283
12284 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12285
12286 mkexcltest etest
12287 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12288 )"
12289 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
12290 ( $at_check_trace;
12291 mkdir ustar
12292 (cd ustar
12293 TEST_TAR_FORMAT=ustar
12294 export TEST_TAR_FORMAT
12295 TAR_OPTIONS="-H ustar"
12296 export TAR_OPTIONS
12297 rm -rf *
12298
12299
12300 test -z "`sort < /dev/null 2>&1`" || exit 77
12301
12302 mkexcltest etest
12303 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12304 )
12305 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12306 at_status=$? at_failed=false
12307 $at_check_filter
12308 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
12309 " | \
12310   $at_diff - "$at_stderr" || at_failed=:
12311 echo >>"$at_stdout"; $as_echo "etest/
12312 etest/top-level-file
12313 " | \
12314   $at_diff - "$at_stdout" || at_failed=:
12315 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
12316 $at_failed && at_fn_log_failure
12317 $at_traceon; }
12318
12319               { set +x
12320 $as_echo "$at_srcdir/exclude14.at:39:
12321 mkdir posix
12322 (cd posix
12323 TEST_TAR_FORMAT=posix
12324 export TEST_TAR_FORMAT
12325 TAR_OPTIONS=\"-H posix\"
12326 export TAR_OPTIONS
12327 rm -rf *
12328
12329
12330 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12331
12332 mkexcltest etest
12333 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12334 )"
12335 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
12336 ( $at_check_trace;
12337 mkdir posix
12338 (cd posix
12339 TEST_TAR_FORMAT=posix
12340 export TEST_TAR_FORMAT
12341 TAR_OPTIONS="-H posix"
12342 export TAR_OPTIONS
12343 rm -rf *
12344
12345
12346 test -z "`sort < /dev/null 2>&1`" || exit 77
12347
12348 mkexcltest etest
12349 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12350 )
12351 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12352 at_status=$? at_failed=false
12353 $at_check_filter
12354 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
12355 " | \
12356   $at_diff - "$at_stderr" || at_failed=:
12357 echo >>"$at_stdout"; $as_echo "etest/
12358 etest/top-level-file
12359 " | \
12360   $at_diff - "$at_stdout" || at_failed=:
12361 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
12362 $at_failed && at_fn_log_failure
12363 $at_traceon; }
12364
12365               { set +x
12366 $as_echo "$at_srcdir/exclude14.at:39:
12367 mkdir gnu
12368 (cd gnu
12369 TEST_TAR_FORMAT=gnu
12370 export TEST_TAR_FORMAT
12371 TAR_OPTIONS=\"-H gnu\"
12372 export TAR_OPTIONS
12373 rm -rf *
12374
12375
12376 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12377
12378 mkexcltest etest
12379 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12380 )"
12381 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude14.at:39"
12382 ( $at_check_trace;
12383 mkdir gnu
12384 (cd gnu
12385 TEST_TAR_FORMAT=gnu
12386 export TEST_TAR_FORMAT
12387 TAR_OPTIONS="-H gnu"
12388 export TAR_OPTIONS
12389 rm -rf *
12390
12391
12392 test -z "`sort < /dev/null 2>&1`" || exit 77
12393
12394 mkexcltest etest
12395 tar -c -f etest.tar --exclude-tag-all=excludeme -v etest | sort
12396 )
12397 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12398 at_status=$? at_failed=false
12399 $at_check_filter
12400 echo >>"$at_stderr"; $as_echo "tar: etest/subdir/: contains a cache directory tag excludeme; directory not dumped
12401 " | \
12402   $at_diff - "$at_stderr" || at_failed=:
12403 echo >>"$at_stdout"; $as_echo "etest/
12404 etest/top-level-file
12405 " | \
12406   $at_diff - "$at_stdout" || at_failed=:
12407 at_fn_check_status 0 $at_status "$at_srcdir/exclude14.at:39"
12408 $at_failed && at_fn_log_failure
12409 $at_traceon; }
12410
12411
12412
12413
12414   set +x
12415   $at_times_p && times >"$at_times_file"
12416 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12417 read at_status <"$at_status_file"
12418 #AT_STOP_49
12419 #AT_START_50
12420 at_fn_group_banner 50 'exclude15.at:36' \
12421   "--exclude-tag-all and --listed-incremental" "     " 7
12422 at_xfail=no
12423       test -f $XFAILFILE && at_xfail=yes
12424 (
12425   $as_echo "50. $at_setup_line: testing $at_desc ..."
12426   $at_traceon
12427
12428
12429
12430
12431
12432   { set +x
12433 $as_echo "$at_srcdir/exclude15.at:39:
12434 mkdir gnu
12435 (cd gnu
12436 TEST_TAR_FORMAT=gnu
12437 export TEST_TAR_FORMAT
12438 TAR_OPTIONS=\"-H gnu\"
12439 export TAR_OPTIONS
12440 rm -rf *
12441
12442
12443 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12444
12445 mkexcltest etest
12446 tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
12447 )"
12448 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude15.at:39"
12449 ( $at_check_trace;
12450 mkdir gnu
12451 (cd gnu
12452 TEST_TAR_FORMAT=gnu
12453 export TEST_TAR_FORMAT
12454 TAR_OPTIONS="-H gnu"
12455 export TAR_OPTIONS
12456 rm -rf *
12457
12458
12459 test -z "`sort < /dev/null 2>&1`" || exit 77
12460
12461 mkexcltest etest
12462 tar -c -f etest.tar --exclude-tag-all=excludeme --listed=snar -v etest | sort
12463 )
12464 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12465 at_status=$? at_failed=false
12466 $at_check_filter
12467 echo >>"$at_stderr"; $as_echo "tar: etest: Directory is new
12468 tar: etest/subdir: Directory is new
12469 tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
12470 " | \
12471   $at_diff - "$at_stderr" || at_failed=:
12472 echo >>"$at_stdout"; $as_echo "etest/
12473 etest/top-level-file
12474 " | \
12475   $at_diff - "$at_stdout" || at_failed=:
12476 at_fn_check_status 0 $at_status "$at_srcdir/exclude15.at:39"
12477 $at_failed && at_fn_log_failure
12478 $at_traceon; }
12479
12480
12481
12482
12483   set +x
12484   $at_times_p && times >"$at_times_file"
12485 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12486 read at_status <"$at_status_file"
12487 #AT_STOP_50
12488 #AT_START_51
12489 at_fn_group_banner 51 'exclude16.at:38' \
12490   "--exclude-tag-all option in incremental pass" "   " 7
12491 at_xfail=no
12492       test -f $XFAILFILE && at_xfail=yes
12493 (
12494   $as_echo "51. $at_setup_line: testing $at_desc ..."
12495   $at_traceon
12496
12497
12498
12499
12500
12501   { set +x
12502 $as_echo "$at_srcdir/exclude16.at:41:
12503 mkdir gnu
12504 (cd gnu
12505 TEST_TAR_FORMAT=gnu
12506 export TEST_TAR_FORMAT
12507 TAR_OPTIONS=\"-H gnu\"
12508 export TAR_OPTIONS
12509 rm -rf *
12510
12511
12512 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
12513
12514 mkexcltest etest
12515 rm etest/subdir/excludeme
12516 decho \"# Level 0\"
12517 tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
12518 touch etest/subdir/excludeme
12519 touch etest/subdir/otherfile
12520
12521 decho \"# Level 1\"
12522 cp snar-0 snar-1
12523 tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
12524 )"
12525 at_fn_check_prepare_notrace 'a `...` command substitution' "exclude16.at:41"
12526 ( $at_check_trace;
12527 mkdir gnu
12528 (cd gnu
12529 TEST_TAR_FORMAT=gnu
12530 export TEST_TAR_FORMAT
12531 TAR_OPTIONS="-H gnu"
12532 export TAR_OPTIONS
12533 rm -rf *
12534
12535
12536 test -z "`sort < /dev/null 2>&1`" || exit 77
12537
12538 mkexcltest etest
12539 rm etest/subdir/excludeme
12540 decho "# Level 0"
12541 tar -c -f etest-0.tar --exclude-tag-all=excludeme --listed=snar-0 -v etest | sort
12542 touch etest/subdir/excludeme
12543 touch etest/subdir/otherfile
12544
12545 decho "# Level 1"
12546 cp snar-0 snar-1
12547 tar -c -f etest-1.tar --exclude-tag-all=excludeme --listed=snar-1 -v etest | sort
12548 )
12549 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12550 at_status=$? at_failed=false
12551 $at_check_filter
12552 echo >>"$at_stderr"; $as_echo "# Level 0
12553 tar: etest: Directory is new
12554 tar: etest/subdir: Directory is new
12555 # Level 1
12556 tar: etest/subdir: contains a cache directory tag excludeme; directory not dumped
12557 " | \
12558   $at_diff - "$at_stderr" || at_failed=:
12559 echo >>"$at_stdout"; $as_echo "# Level 0
12560 etest/
12561 etest/subdir/
12562 etest/subdir/subdir-file
12563 etest/top-level-file
12564 # Level 1
12565 etest/
12566 " | \
12567   $at_diff - "$at_stdout" || at_failed=:
12568 at_fn_check_status 0 $at_status "$at_srcdir/exclude16.at:41"
12569 $at_failed && at_fn_log_failure
12570 $at_traceon; }
12571
12572
12573
12574
12575   set +x
12576   $at_times_p && times >"$at_times_file"
12577 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12578 read at_status <"$at_status_file"
12579 #AT_STOP_51
12580 #AT_START_52
12581 at_fn_group_banner 52 'delete01.at:23' \
12582   "deleting a member after a big one" "              " 8
12583 at_xfail=no
12584       test -f $XFAILFILE && at_xfail=yes
12585 (
12586   $as_echo "52. $at_setup_line: testing $at_desc ..."
12587   $at_traceon
12588
12589
12590
12591
12592
12593   { set +x
12594 $as_echo "$at_srcdir/delete01.at:26:
12595 mkdir v7
12596 (cd v7
12597 TEST_TAR_FORMAT=v7
12598 export TEST_TAR_FORMAT
12599 TAR_OPTIONS=\"-H v7\"
12600 export TAR_OPTIONS
12601 rm -rf *
12602
12603 genfile -l 50000 --file file1
12604 genfile -l 1024 --file file2
12605 tar cf archive file1 file2
12606 tar f archive --delete file2
12607 tar tf archive)"
12608 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12609 ( $at_check_trace;
12610 mkdir v7
12611 (cd v7
12612 TEST_TAR_FORMAT=v7
12613 export TEST_TAR_FORMAT
12614 TAR_OPTIONS="-H v7"
12615 export TAR_OPTIONS
12616 rm -rf *
12617
12618 genfile -l 50000 --file file1
12619 genfile -l 1024 --file file2
12620 tar cf archive file1 file2
12621 tar f archive --delete file2
12622 tar tf archive)
12623 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12624 at_status=$? at_failed=false
12625 $at_check_filter
12626 at_fn_diff_devnull "$at_stderr" || at_failed=:
12627 echo >>"$at_stdout"; $as_echo "file1
12628 " | \
12629   $at_diff - "$at_stdout" || at_failed=:
12630 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12631 $at_failed && at_fn_log_failure
12632 $at_traceon; }
12633
12634               { set +x
12635 $as_echo "$at_srcdir/delete01.at:26:
12636 mkdir oldgnu
12637 (cd oldgnu
12638 TEST_TAR_FORMAT=oldgnu
12639 export TEST_TAR_FORMAT
12640 TAR_OPTIONS=\"-H oldgnu\"
12641 export TAR_OPTIONS
12642 rm -rf *
12643
12644 genfile -l 50000 --file file1
12645 genfile -l 1024 --file file2
12646 tar cf archive file1 file2
12647 tar f archive --delete file2
12648 tar tf archive)"
12649 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12650 ( $at_check_trace;
12651 mkdir oldgnu
12652 (cd oldgnu
12653 TEST_TAR_FORMAT=oldgnu
12654 export TEST_TAR_FORMAT
12655 TAR_OPTIONS="-H oldgnu"
12656 export TAR_OPTIONS
12657 rm -rf *
12658
12659 genfile -l 50000 --file file1
12660 genfile -l 1024 --file file2
12661 tar cf archive file1 file2
12662 tar f archive --delete file2
12663 tar tf archive)
12664 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12665 at_status=$? at_failed=false
12666 $at_check_filter
12667 at_fn_diff_devnull "$at_stderr" || at_failed=:
12668 echo >>"$at_stdout"; $as_echo "file1
12669 " | \
12670   $at_diff - "$at_stdout" || at_failed=:
12671 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12672 $at_failed && at_fn_log_failure
12673 $at_traceon; }
12674
12675               { set +x
12676 $as_echo "$at_srcdir/delete01.at:26:
12677 mkdir ustar
12678 (cd ustar
12679 TEST_TAR_FORMAT=ustar
12680 export TEST_TAR_FORMAT
12681 TAR_OPTIONS=\"-H ustar\"
12682 export TAR_OPTIONS
12683 rm -rf *
12684
12685 genfile -l 50000 --file file1
12686 genfile -l 1024 --file file2
12687 tar cf archive file1 file2
12688 tar f archive --delete file2
12689 tar tf archive)"
12690 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12691 ( $at_check_trace;
12692 mkdir ustar
12693 (cd ustar
12694 TEST_TAR_FORMAT=ustar
12695 export TEST_TAR_FORMAT
12696 TAR_OPTIONS="-H ustar"
12697 export TAR_OPTIONS
12698 rm -rf *
12699
12700 genfile -l 50000 --file file1
12701 genfile -l 1024 --file file2
12702 tar cf archive file1 file2
12703 tar f archive --delete file2
12704 tar tf archive)
12705 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12706 at_status=$? at_failed=false
12707 $at_check_filter
12708 at_fn_diff_devnull "$at_stderr" || at_failed=:
12709 echo >>"$at_stdout"; $as_echo "file1
12710 " | \
12711   $at_diff - "$at_stdout" || at_failed=:
12712 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12713 $at_failed && at_fn_log_failure
12714 $at_traceon; }
12715
12716               { set +x
12717 $as_echo "$at_srcdir/delete01.at:26:
12718 mkdir posix
12719 (cd posix
12720 TEST_TAR_FORMAT=posix
12721 export TEST_TAR_FORMAT
12722 TAR_OPTIONS=\"-H posix\"
12723 export TAR_OPTIONS
12724 rm -rf *
12725
12726 genfile -l 50000 --file file1
12727 genfile -l 1024 --file file2
12728 tar cf archive file1 file2
12729 tar f archive --delete file2
12730 tar tf archive)"
12731 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12732 ( $at_check_trace;
12733 mkdir posix
12734 (cd posix
12735 TEST_TAR_FORMAT=posix
12736 export TEST_TAR_FORMAT
12737 TAR_OPTIONS="-H posix"
12738 export TAR_OPTIONS
12739 rm -rf *
12740
12741 genfile -l 50000 --file file1
12742 genfile -l 1024 --file file2
12743 tar cf archive file1 file2
12744 tar f archive --delete file2
12745 tar tf archive)
12746 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12747 at_status=$? at_failed=false
12748 $at_check_filter
12749 at_fn_diff_devnull "$at_stderr" || at_failed=:
12750 echo >>"$at_stdout"; $as_echo "file1
12751 " | \
12752   $at_diff - "$at_stdout" || at_failed=:
12753 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12754 $at_failed && at_fn_log_failure
12755 $at_traceon; }
12756
12757               { set +x
12758 $as_echo "$at_srcdir/delete01.at:26:
12759 mkdir gnu
12760 (cd gnu
12761 TEST_TAR_FORMAT=gnu
12762 export TEST_TAR_FORMAT
12763 TAR_OPTIONS=\"-H gnu\"
12764 export TAR_OPTIONS
12765 rm -rf *
12766
12767 genfile -l 50000 --file file1
12768 genfile -l 1024 --file file2
12769 tar cf archive file1 file2
12770 tar f archive --delete file2
12771 tar tf archive)"
12772 at_fn_check_prepare_notrace 'an embedded newline' "delete01.at:26"
12773 ( $at_check_trace;
12774 mkdir gnu
12775 (cd gnu
12776 TEST_TAR_FORMAT=gnu
12777 export TEST_TAR_FORMAT
12778 TAR_OPTIONS="-H gnu"
12779 export TAR_OPTIONS
12780 rm -rf *
12781
12782 genfile -l 50000 --file file1
12783 genfile -l 1024 --file file2
12784 tar cf archive file1 file2
12785 tar f archive --delete file2
12786 tar tf archive)
12787 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12788 at_status=$? at_failed=false
12789 $at_check_filter
12790 at_fn_diff_devnull "$at_stderr" || at_failed=:
12791 echo >>"$at_stdout"; $as_echo "file1
12792 " | \
12793   $at_diff - "$at_stdout" || at_failed=:
12794 at_fn_check_status 0 $at_status "$at_srcdir/delete01.at:26"
12795 $at_failed && at_fn_log_failure
12796 $at_traceon; }
12797
12798
12799
12800
12801   set +x
12802   $at_times_p && times >"$at_times_file"
12803 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
12804 read at_status <"$at_status_file"
12805 #AT_STOP_52
12806 #AT_START_53
12807 at_fn_group_banner 53 'delete02.at:23' \
12808   "deleting a member from stdin archive" "           " 8
12809 at_xfail=no
12810       test -f $XFAILFILE && at_xfail=yes
12811 (
12812   $as_echo "53. $at_setup_line: testing $at_desc ..."
12813   $at_traceon
12814
12815
12816
12817
12818
12819   { set +x
12820 $as_echo "$at_srcdir/delete02.at:26:
12821 mkdir v7
12822 (cd v7
12823 TEST_TAR_FORMAT=v7
12824 export TEST_TAR_FORMAT
12825 TAR_OPTIONS=\"-H v7\"
12826 export TAR_OPTIONS
12827 rm -rf *
12828
12829 genfile -l 3073 -p zeros --file 1
12830 cp 1 2
12831 cp 2 3
12832 tar cf archive 1 2 3
12833 tar tf archive
12834 cat archive | tar f - --delete 2 > archive2
12835 echo separator
12836 tar tf archive2)"
12837 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12838 ( $at_check_trace;
12839 mkdir v7
12840 (cd v7
12841 TEST_TAR_FORMAT=v7
12842 export TEST_TAR_FORMAT
12843 TAR_OPTIONS="-H v7"
12844 export TAR_OPTIONS
12845 rm -rf *
12846
12847 genfile -l 3073 -p zeros --file 1
12848 cp 1 2
12849 cp 2 3
12850 tar cf archive 1 2 3
12851 tar tf archive
12852 cat archive | tar f - --delete 2 > archive2
12853 echo separator
12854 tar tf archive2)
12855 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12856 at_status=$? at_failed=false
12857 $at_check_filter
12858 at_fn_diff_devnull "$at_stderr" || at_failed=:
12859 echo >>"$at_stdout"; $as_echo "1
12860 2
12861 3
12862 separator
12863 1
12864 3
12865 " | \
12866   $at_diff - "$at_stdout" || at_failed=:
12867 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
12868 $at_failed && at_fn_log_failure
12869 $at_traceon; }
12870
12871               { set +x
12872 $as_echo "$at_srcdir/delete02.at:26:
12873 mkdir oldgnu
12874 (cd oldgnu
12875 TEST_TAR_FORMAT=oldgnu
12876 export TEST_TAR_FORMAT
12877 TAR_OPTIONS=\"-H oldgnu\"
12878 export TAR_OPTIONS
12879 rm -rf *
12880
12881 genfile -l 3073 -p zeros --file 1
12882 cp 1 2
12883 cp 2 3
12884 tar cf archive 1 2 3
12885 tar tf archive
12886 cat archive | tar f - --delete 2 > archive2
12887 echo separator
12888 tar tf archive2)"
12889 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12890 ( $at_check_trace;
12891 mkdir oldgnu
12892 (cd oldgnu
12893 TEST_TAR_FORMAT=oldgnu
12894 export TEST_TAR_FORMAT
12895 TAR_OPTIONS="-H oldgnu"
12896 export TAR_OPTIONS
12897 rm -rf *
12898
12899 genfile -l 3073 -p zeros --file 1
12900 cp 1 2
12901 cp 2 3
12902 tar cf archive 1 2 3
12903 tar tf archive
12904 cat archive | tar f - --delete 2 > archive2
12905 echo separator
12906 tar tf archive2)
12907 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12908 at_status=$? at_failed=false
12909 $at_check_filter
12910 at_fn_diff_devnull "$at_stderr" || at_failed=:
12911 echo >>"$at_stdout"; $as_echo "1
12912 2
12913 3
12914 separator
12915 1
12916 3
12917 " | \
12918   $at_diff - "$at_stdout" || at_failed=:
12919 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
12920 $at_failed && at_fn_log_failure
12921 $at_traceon; }
12922
12923               { set +x
12924 $as_echo "$at_srcdir/delete02.at:26:
12925 mkdir ustar
12926 (cd ustar
12927 TEST_TAR_FORMAT=ustar
12928 export TEST_TAR_FORMAT
12929 TAR_OPTIONS=\"-H ustar\"
12930 export TAR_OPTIONS
12931 rm -rf *
12932
12933 genfile -l 3073 -p zeros --file 1
12934 cp 1 2
12935 cp 2 3
12936 tar cf archive 1 2 3
12937 tar tf archive
12938 cat archive | tar f - --delete 2 > archive2
12939 echo separator
12940 tar tf archive2)"
12941 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12942 ( $at_check_trace;
12943 mkdir ustar
12944 (cd ustar
12945 TEST_TAR_FORMAT=ustar
12946 export TEST_TAR_FORMAT
12947 TAR_OPTIONS="-H ustar"
12948 export TAR_OPTIONS
12949 rm -rf *
12950
12951 genfile -l 3073 -p zeros --file 1
12952 cp 1 2
12953 cp 2 3
12954 tar cf archive 1 2 3
12955 tar tf archive
12956 cat archive | tar f - --delete 2 > archive2
12957 echo separator
12958 tar tf archive2)
12959 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
12960 at_status=$? at_failed=false
12961 $at_check_filter
12962 at_fn_diff_devnull "$at_stderr" || at_failed=:
12963 echo >>"$at_stdout"; $as_echo "1
12964 2
12965 3
12966 separator
12967 1
12968 3
12969 " | \
12970   $at_diff - "$at_stdout" || at_failed=:
12971 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
12972 $at_failed && at_fn_log_failure
12973 $at_traceon; }
12974
12975               { set +x
12976 $as_echo "$at_srcdir/delete02.at:26:
12977 mkdir posix
12978 (cd posix
12979 TEST_TAR_FORMAT=posix
12980 export TEST_TAR_FORMAT
12981 TAR_OPTIONS=\"-H posix\"
12982 export TAR_OPTIONS
12983 rm -rf *
12984
12985 genfile -l 3073 -p zeros --file 1
12986 cp 1 2
12987 cp 2 3
12988 tar cf archive 1 2 3
12989 tar tf archive
12990 cat archive | tar f - --delete 2 > archive2
12991 echo separator
12992 tar tf archive2)"
12993 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
12994 ( $at_check_trace;
12995 mkdir posix
12996 (cd posix
12997 TEST_TAR_FORMAT=posix
12998 export TEST_TAR_FORMAT
12999 TAR_OPTIONS="-H posix"
13000 export TAR_OPTIONS
13001 rm -rf *
13002
13003 genfile -l 3073 -p zeros --file 1
13004 cp 1 2
13005 cp 2 3
13006 tar cf archive 1 2 3
13007 tar tf archive
13008 cat archive | tar f - --delete 2 > archive2
13009 echo separator
13010 tar tf archive2)
13011 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13012 at_status=$? at_failed=false
13013 $at_check_filter
13014 at_fn_diff_devnull "$at_stderr" || at_failed=:
13015 echo >>"$at_stdout"; $as_echo "1
13016 2
13017 3
13018 separator
13019 1
13020 3
13021 " | \
13022   $at_diff - "$at_stdout" || at_failed=:
13023 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
13024 $at_failed && at_fn_log_failure
13025 $at_traceon; }
13026
13027               { set +x
13028 $as_echo "$at_srcdir/delete02.at:26:
13029 mkdir gnu
13030 (cd gnu
13031 TEST_TAR_FORMAT=gnu
13032 export TEST_TAR_FORMAT
13033 TAR_OPTIONS=\"-H gnu\"
13034 export TAR_OPTIONS
13035 rm -rf *
13036
13037 genfile -l 3073 -p zeros --file 1
13038 cp 1 2
13039 cp 2 3
13040 tar cf archive 1 2 3
13041 tar tf archive
13042 cat archive | tar f - --delete 2 > archive2
13043 echo separator
13044 tar tf archive2)"
13045 at_fn_check_prepare_notrace 'an embedded newline' "delete02.at:26"
13046 ( $at_check_trace;
13047 mkdir gnu
13048 (cd gnu
13049 TEST_TAR_FORMAT=gnu
13050 export TEST_TAR_FORMAT
13051 TAR_OPTIONS="-H gnu"
13052 export TAR_OPTIONS
13053 rm -rf *
13054
13055 genfile -l 3073 -p zeros --file 1
13056 cp 1 2
13057 cp 2 3
13058 tar cf archive 1 2 3
13059 tar tf archive
13060 cat archive | tar f - --delete 2 > archive2
13061 echo separator
13062 tar tf archive2)
13063 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13064 at_status=$? at_failed=false
13065 $at_check_filter
13066 at_fn_diff_devnull "$at_stderr" || at_failed=:
13067 echo >>"$at_stdout"; $as_echo "1
13068 2
13069 3
13070 separator
13071 1
13072 3
13073 " | \
13074   $at_diff - "$at_stdout" || at_failed=:
13075 at_fn_check_status 0 $at_status "$at_srcdir/delete02.at:26"
13076 $at_failed && at_fn_log_failure
13077 $at_traceon; }
13078
13079
13080
13081
13082   set +x
13083   $at_times_p && times >"$at_times_file"
13084 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13085 read at_status <"$at_status_file"
13086 #AT_STOP_53
13087 #AT_START_54
13088 at_fn_group_banner 54 'delete03.at:21' \
13089   "deleting members with long names" "               " 8
13090 at_xfail=no
13091       test -f $XFAILFILE && at_xfail=yes
13092 (
13093   $as_echo "54. $at_setup_line: testing $at_desc ..."
13094   $at_traceon
13095
13096
13097
13098
13099
13100
13101
13102   { set +x
13103 $as_echo "$at_srcdir/delete03.at:26:
13104 mkdir gnu
13105 (cd gnu
13106 TEST_TAR_FORMAT=gnu
13107 export TEST_TAR_FORMAT
13108 TAR_OPTIONS=\"-H gnu\"
13109 export TAR_OPTIONS
13110 rm -rf *
13111
13112
13113 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
13114 rm -f \$prefix*
13115 for i in 1 2 3 4 5 6 7 8 9
13116 do touch \$prefix\$i
13117 done
13118 tar -cf archive ./\$prefix* &&
13119  tar --delete -f archive ./\${prefix}5 &&
13120  tar -tf archive
13121 )"
13122 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
13123 ( $at_check_trace;
13124 mkdir gnu
13125 (cd gnu
13126 TEST_TAR_FORMAT=gnu
13127 export TEST_TAR_FORMAT
13128 TAR_OPTIONS="-H gnu"
13129 export TAR_OPTIONS
13130 rm -rf *
13131
13132
13133 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
13134 rm -f $prefix*
13135 for i in 1 2 3 4 5 6 7 8 9
13136 do touch $prefix$i
13137 done
13138 tar -cf archive ./$prefix* &&
13139  tar --delete -f archive ./${prefix}5 &&
13140  tar -tf archive
13141 )
13142 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13143 at_status=$? at_failed=false
13144 $at_check_filter
13145 at_fn_diff_devnull "$at_stderr" || at_failed=:
13146 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
13147 ./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
13148 ./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
13149 ./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
13150 ./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
13151 ./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
13152 ./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
13153 ./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
13154 " | \
13155   $at_diff - "$at_stdout" || at_failed=:
13156 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
13157 $at_failed && at_fn_log_failure
13158 $at_traceon; }
13159
13160               { set +x
13161 $as_echo "$at_srcdir/delete03.at:26:
13162 mkdir oldgnu
13163 (cd oldgnu
13164 TEST_TAR_FORMAT=oldgnu
13165 export TEST_TAR_FORMAT
13166 TAR_OPTIONS=\"-H oldgnu\"
13167 export TAR_OPTIONS
13168 rm -rf *
13169
13170
13171 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
13172 rm -f \$prefix*
13173 for i in 1 2 3 4 5 6 7 8 9
13174 do touch \$prefix\$i
13175 done
13176 tar -cf archive ./\$prefix* &&
13177  tar --delete -f archive ./\${prefix}5 &&
13178  tar -tf archive
13179 )"
13180 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
13181 ( $at_check_trace;
13182 mkdir oldgnu
13183 (cd oldgnu
13184 TEST_TAR_FORMAT=oldgnu
13185 export TEST_TAR_FORMAT
13186 TAR_OPTIONS="-H oldgnu"
13187 export TAR_OPTIONS
13188 rm -rf *
13189
13190
13191 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
13192 rm -f $prefix*
13193 for i in 1 2 3 4 5 6 7 8 9
13194 do touch $prefix$i
13195 done
13196 tar -cf archive ./$prefix* &&
13197  tar --delete -f archive ./${prefix}5 &&
13198  tar -tf archive
13199 )
13200 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13201 at_status=$? at_failed=false
13202 $at_check_filter
13203 at_fn_diff_devnull "$at_stderr" || at_failed=:
13204 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
13205 ./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
13206 ./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
13207 ./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
13208 ./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
13209 ./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
13210 ./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
13211 ./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
13212 " | \
13213   $at_diff - "$at_stdout" || at_failed=:
13214 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
13215 $at_failed && at_fn_log_failure
13216 $at_traceon; }
13217
13218               { set +x
13219 $as_echo "$at_srcdir/delete03.at:26:
13220 mkdir posix
13221 (cd posix
13222 TEST_TAR_FORMAT=posix
13223 export TEST_TAR_FORMAT
13224 TAR_OPTIONS=\"-H posix\"
13225 export TAR_OPTIONS
13226 rm -rf *
13227
13228
13229 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
13230 rm -f \$prefix*
13231 for i in 1 2 3 4 5 6 7 8 9
13232 do touch \$prefix\$i
13233 done
13234 tar -cf archive ./\$prefix* &&
13235  tar --delete -f archive ./\${prefix}5 &&
13236  tar -tf archive
13237 )"
13238 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "delete03.at:26"
13239 ( $at_check_trace;
13240 mkdir posix
13241 (cd posix
13242 TEST_TAR_FORMAT=posix
13243 export TEST_TAR_FORMAT
13244 TAR_OPTIONS="-H posix"
13245 export TAR_OPTIONS
13246 rm -rf *
13247
13248
13249 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
13250 rm -f $prefix*
13251 for i in 1 2 3 4 5 6 7 8 9
13252 do touch $prefix$i
13253 done
13254 tar -cf archive ./$prefix* &&
13255  tar --delete -f archive ./${prefix}5 &&
13256  tar -tf archive
13257 )
13258 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13259 at_status=$? at_failed=false
13260 $at_check_filter
13261 at_fn_diff_devnull "$at_stderr" || at_failed=:
13262 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
13263 ./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
13264 ./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
13265 ./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
13266 ./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
13267 ./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
13268 ./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
13269 ./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
13270 " | \
13271   $at_diff - "$at_stdout" || at_failed=:
13272 at_fn_check_status 0 $at_status "$at_srcdir/delete03.at:26"
13273 $at_failed && at_fn_log_failure
13274 $at_traceon; }
13275
13276
13277
13278
13279
13280   set +x
13281   $at_times_p && times >"$at_times_file"
13282 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13283 read at_status <"$at_status_file"
13284 #AT_STOP_54
13285 #AT_START_55
13286 at_fn_group_banner 55 'delete04.at:23' \
13287   "deleting a large last member" "                   " 8
13288 at_xfail=no
13289       test -f $XFAILFILE && at_xfail=yes
13290 (
13291   $as_echo "55. $at_setup_line: testing $at_desc ..."
13292   $at_traceon
13293
13294
13295
13296
13297
13298   { set +x
13299 $as_echo "$at_srcdir/delete04.at:26:
13300 mkdir v7
13301 (cd v7
13302 TEST_TAR_FORMAT=v7
13303 export TEST_TAR_FORMAT
13304 TAR_OPTIONS=\"-H v7\"
13305 export TAR_OPTIONS
13306 rm -rf *
13307
13308 genfile -l      3 -f file1
13309 genfile -l      5 -f file2
13310 genfile -l      3 -f file3
13311 genfile -l      6 -f file4
13312 genfile -l     24 -f file5
13313 genfile -l     13 -f file6
13314 genfile -l   1385 -f file7
13315 genfile -l     30 -f file8
13316 genfile -l     10 -f file9
13317 genfile -l 256000 -f file10
13318 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13319 tar f archive --delete file10
13320 tar tf archive
13321 )"
13322 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
13323 ( $at_check_trace;
13324 mkdir v7
13325 (cd v7
13326 TEST_TAR_FORMAT=v7
13327 export TEST_TAR_FORMAT
13328 TAR_OPTIONS="-H v7"
13329 export TAR_OPTIONS
13330 rm -rf *
13331
13332 genfile -l      3 -f file1
13333 genfile -l      5 -f file2
13334 genfile -l      3 -f file3
13335 genfile -l      6 -f file4
13336 genfile -l     24 -f file5
13337 genfile -l     13 -f file6
13338 genfile -l   1385 -f file7
13339 genfile -l     30 -f file8
13340 genfile -l     10 -f file9
13341 genfile -l 256000 -f file10
13342 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13343 tar f archive --delete file10
13344 tar tf archive
13345 )
13346 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13347 at_status=$? at_failed=false
13348 $at_check_filter
13349 at_fn_diff_devnull "$at_stderr" || at_failed=:
13350 echo >>"$at_stdout"; $as_echo "file1
13351 file2
13352 file3
13353 file4
13354 file5
13355 file6
13356 file7
13357 file8
13358 file9
13359 " | \
13360   $at_diff - "$at_stdout" || at_failed=:
13361 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
13362 $at_failed && at_fn_log_failure
13363 $at_traceon; }
13364
13365               { set +x
13366 $as_echo "$at_srcdir/delete04.at:26:
13367 mkdir oldgnu
13368 (cd oldgnu
13369 TEST_TAR_FORMAT=oldgnu
13370 export TEST_TAR_FORMAT
13371 TAR_OPTIONS=\"-H oldgnu\"
13372 export TAR_OPTIONS
13373 rm -rf *
13374
13375 genfile -l      3 -f file1
13376 genfile -l      5 -f file2
13377 genfile -l      3 -f file3
13378 genfile -l      6 -f file4
13379 genfile -l     24 -f file5
13380 genfile -l     13 -f file6
13381 genfile -l   1385 -f file7
13382 genfile -l     30 -f file8
13383 genfile -l     10 -f file9
13384 genfile -l 256000 -f file10
13385 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13386 tar f archive --delete file10
13387 tar tf archive
13388 )"
13389 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
13390 ( $at_check_trace;
13391 mkdir oldgnu
13392 (cd oldgnu
13393 TEST_TAR_FORMAT=oldgnu
13394 export TEST_TAR_FORMAT
13395 TAR_OPTIONS="-H oldgnu"
13396 export TAR_OPTIONS
13397 rm -rf *
13398
13399 genfile -l      3 -f file1
13400 genfile -l      5 -f file2
13401 genfile -l      3 -f file3
13402 genfile -l      6 -f file4
13403 genfile -l     24 -f file5
13404 genfile -l     13 -f file6
13405 genfile -l   1385 -f file7
13406 genfile -l     30 -f file8
13407 genfile -l     10 -f file9
13408 genfile -l 256000 -f file10
13409 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13410 tar f archive --delete file10
13411 tar tf archive
13412 )
13413 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13414 at_status=$? at_failed=false
13415 $at_check_filter
13416 at_fn_diff_devnull "$at_stderr" || at_failed=:
13417 echo >>"$at_stdout"; $as_echo "file1
13418 file2
13419 file3
13420 file4
13421 file5
13422 file6
13423 file7
13424 file8
13425 file9
13426 " | \
13427   $at_diff - "$at_stdout" || at_failed=:
13428 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
13429 $at_failed && at_fn_log_failure
13430 $at_traceon; }
13431
13432               { set +x
13433 $as_echo "$at_srcdir/delete04.at:26:
13434 mkdir ustar
13435 (cd ustar
13436 TEST_TAR_FORMAT=ustar
13437 export TEST_TAR_FORMAT
13438 TAR_OPTIONS=\"-H ustar\"
13439 export TAR_OPTIONS
13440 rm -rf *
13441
13442 genfile -l      3 -f file1
13443 genfile -l      5 -f file2
13444 genfile -l      3 -f file3
13445 genfile -l      6 -f file4
13446 genfile -l     24 -f file5
13447 genfile -l     13 -f file6
13448 genfile -l   1385 -f file7
13449 genfile -l     30 -f file8
13450 genfile -l     10 -f file9
13451 genfile -l 256000 -f file10
13452 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13453 tar f archive --delete file10
13454 tar tf archive
13455 )"
13456 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
13457 ( $at_check_trace;
13458 mkdir ustar
13459 (cd ustar
13460 TEST_TAR_FORMAT=ustar
13461 export TEST_TAR_FORMAT
13462 TAR_OPTIONS="-H ustar"
13463 export TAR_OPTIONS
13464 rm -rf *
13465
13466 genfile -l      3 -f file1
13467 genfile -l      5 -f file2
13468 genfile -l      3 -f file3
13469 genfile -l      6 -f file4
13470 genfile -l     24 -f file5
13471 genfile -l     13 -f file6
13472 genfile -l   1385 -f file7
13473 genfile -l     30 -f file8
13474 genfile -l     10 -f file9
13475 genfile -l 256000 -f file10
13476 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13477 tar f archive --delete file10
13478 tar tf archive
13479 )
13480 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13481 at_status=$? at_failed=false
13482 $at_check_filter
13483 at_fn_diff_devnull "$at_stderr" || at_failed=:
13484 echo >>"$at_stdout"; $as_echo "file1
13485 file2
13486 file3
13487 file4
13488 file5
13489 file6
13490 file7
13491 file8
13492 file9
13493 " | \
13494   $at_diff - "$at_stdout" || at_failed=:
13495 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
13496 $at_failed && at_fn_log_failure
13497 $at_traceon; }
13498
13499               { set +x
13500 $as_echo "$at_srcdir/delete04.at:26:
13501 mkdir posix
13502 (cd posix
13503 TEST_TAR_FORMAT=posix
13504 export TEST_TAR_FORMAT
13505 TAR_OPTIONS=\"-H posix\"
13506 export TAR_OPTIONS
13507 rm -rf *
13508
13509 genfile -l      3 -f file1
13510 genfile -l      5 -f file2
13511 genfile -l      3 -f file3
13512 genfile -l      6 -f file4
13513 genfile -l     24 -f file5
13514 genfile -l     13 -f file6
13515 genfile -l   1385 -f file7
13516 genfile -l     30 -f file8
13517 genfile -l     10 -f file9
13518 genfile -l 256000 -f file10
13519 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13520 tar f archive --delete file10
13521 tar tf archive
13522 )"
13523 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
13524 ( $at_check_trace;
13525 mkdir posix
13526 (cd posix
13527 TEST_TAR_FORMAT=posix
13528 export TEST_TAR_FORMAT
13529 TAR_OPTIONS="-H posix"
13530 export TAR_OPTIONS
13531 rm -rf *
13532
13533 genfile -l      3 -f file1
13534 genfile -l      5 -f file2
13535 genfile -l      3 -f file3
13536 genfile -l      6 -f file4
13537 genfile -l     24 -f file5
13538 genfile -l     13 -f file6
13539 genfile -l   1385 -f file7
13540 genfile -l     30 -f file8
13541 genfile -l     10 -f file9
13542 genfile -l 256000 -f file10
13543 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13544 tar f archive --delete file10
13545 tar tf archive
13546 )
13547 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13548 at_status=$? at_failed=false
13549 $at_check_filter
13550 at_fn_diff_devnull "$at_stderr" || at_failed=:
13551 echo >>"$at_stdout"; $as_echo "file1
13552 file2
13553 file3
13554 file4
13555 file5
13556 file6
13557 file7
13558 file8
13559 file9
13560 " | \
13561   $at_diff - "$at_stdout" || at_failed=:
13562 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
13563 $at_failed && at_fn_log_failure
13564 $at_traceon; }
13565
13566               { set +x
13567 $as_echo "$at_srcdir/delete04.at:26:
13568 mkdir gnu
13569 (cd gnu
13570 TEST_TAR_FORMAT=gnu
13571 export TEST_TAR_FORMAT
13572 TAR_OPTIONS=\"-H gnu\"
13573 export TAR_OPTIONS
13574 rm -rf *
13575
13576 genfile -l      3 -f file1
13577 genfile -l      5 -f file2
13578 genfile -l      3 -f file3
13579 genfile -l      6 -f file4
13580 genfile -l     24 -f file5
13581 genfile -l     13 -f file6
13582 genfile -l   1385 -f file7
13583 genfile -l     30 -f file8
13584 genfile -l     10 -f file9
13585 genfile -l 256000 -f file10
13586 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13587 tar f archive --delete file10
13588 tar tf archive
13589 )"
13590 at_fn_check_prepare_notrace 'an embedded newline' "delete04.at:26"
13591 ( $at_check_trace;
13592 mkdir gnu
13593 (cd gnu
13594 TEST_TAR_FORMAT=gnu
13595 export TEST_TAR_FORMAT
13596 TAR_OPTIONS="-H gnu"
13597 export TAR_OPTIONS
13598 rm -rf *
13599
13600 genfile -l      3 -f file1
13601 genfile -l      5 -f file2
13602 genfile -l      3 -f file3
13603 genfile -l      6 -f file4
13604 genfile -l     24 -f file5
13605 genfile -l     13 -f file6
13606 genfile -l   1385 -f file7
13607 genfile -l     30 -f file8
13608 genfile -l     10 -f file9
13609 genfile -l 256000 -f file10
13610 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
13611 tar f archive --delete file10
13612 tar tf archive
13613 )
13614 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13615 at_status=$? at_failed=false
13616 $at_check_filter
13617 at_fn_diff_devnull "$at_stderr" || at_failed=:
13618 echo >>"$at_stdout"; $as_echo "file1
13619 file2
13620 file3
13621 file4
13622 file5
13623 file6
13624 file7
13625 file8
13626 file9
13627 " | \
13628   $at_diff - "$at_stdout" || at_failed=:
13629 at_fn_check_status 0 $at_status "$at_srcdir/delete04.at:26"
13630 $at_failed && at_fn_log_failure
13631 $at_traceon; }
13632
13633
13634
13635
13636   set +x
13637   $at_times_p && times >"$at_times_file"
13638 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13639 read at_status <"$at_status_file"
13640 #AT_STOP_55
13641 #AT_START_56
13642 at_fn_group_banner 56 'delete05.at:27' \
13643   "deleting non-existing member" "                   " 8
13644 at_xfail=no
13645       test -f $XFAILFILE && at_xfail=yes
13646 (
13647   $as_echo "56. $at_setup_line: testing $at_desc ..."
13648   $at_traceon
13649
13650
13651
13652
13653
13654   { set +x
13655 $as_echo "$at_srcdir/delete05.at:30:
13656 mkdir v7
13657 (cd v7
13658 TEST_TAR_FORMAT=v7
13659 export TEST_TAR_FORMAT
13660 TAR_OPTIONS=\"-H v7\"
13661 export TAR_OPTIONS
13662 rm -rf *
13663
13664 genfile -l 1024 -f en
13665 genfile -l 1024 -f to
13666
13667 tar cf archive en to
13668 # Make sure we don't use bogus blocking factor.
13669 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13670 tar --file archive --blocking-factor=20 --delete tre
13671 tar tf archive
13672 )"
13673 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13674 ( $at_check_trace;
13675 mkdir v7
13676 (cd v7
13677 TEST_TAR_FORMAT=v7
13678 export TEST_TAR_FORMAT
13679 TAR_OPTIONS="-H v7"
13680 export TAR_OPTIONS
13681 rm -rf *
13682
13683 genfile -l 1024 -f en
13684 genfile -l 1024 -f to
13685
13686 tar cf archive en to
13687 # Make sure we don't use bogus blocking factor.
13688 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13689 tar --file archive --blocking-factor=20 --delete tre
13690 tar tf archive
13691 )
13692 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13693 at_status=$? at_failed=false
13694 $at_check_filter
13695 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13696 tar: Exiting with failure status due to previous errors
13697 " | \
13698   $at_diff - "$at_stderr" || at_failed=:
13699 echo >>"$at_stdout"; $as_echo "en
13700 to
13701 " | \
13702   $at_diff - "$at_stdout" || at_failed=:
13703 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13704 $at_failed && at_fn_log_failure
13705 $at_traceon; }
13706
13707               { set +x
13708 $as_echo "$at_srcdir/delete05.at:30:
13709 mkdir oldgnu
13710 (cd oldgnu
13711 TEST_TAR_FORMAT=oldgnu
13712 export TEST_TAR_FORMAT
13713 TAR_OPTIONS=\"-H oldgnu\"
13714 export TAR_OPTIONS
13715 rm -rf *
13716
13717 genfile -l 1024 -f en
13718 genfile -l 1024 -f to
13719
13720 tar cf archive en to
13721 # Make sure we don't use bogus blocking factor.
13722 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13723 tar --file archive --blocking-factor=20 --delete tre
13724 tar tf archive
13725 )"
13726 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13727 ( $at_check_trace;
13728 mkdir oldgnu
13729 (cd oldgnu
13730 TEST_TAR_FORMAT=oldgnu
13731 export TEST_TAR_FORMAT
13732 TAR_OPTIONS="-H oldgnu"
13733 export TAR_OPTIONS
13734 rm -rf *
13735
13736 genfile -l 1024 -f en
13737 genfile -l 1024 -f to
13738
13739 tar cf archive en to
13740 # Make sure we don't use bogus blocking factor.
13741 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13742 tar --file archive --blocking-factor=20 --delete tre
13743 tar tf archive
13744 )
13745 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13746 at_status=$? at_failed=false
13747 $at_check_filter
13748 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13749 tar: Exiting with failure status due to previous errors
13750 " | \
13751   $at_diff - "$at_stderr" || at_failed=:
13752 echo >>"$at_stdout"; $as_echo "en
13753 to
13754 " | \
13755   $at_diff - "$at_stdout" || at_failed=:
13756 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13757 $at_failed && at_fn_log_failure
13758 $at_traceon; }
13759
13760               { set +x
13761 $as_echo "$at_srcdir/delete05.at:30:
13762 mkdir ustar
13763 (cd ustar
13764 TEST_TAR_FORMAT=ustar
13765 export TEST_TAR_FORMAT
13766 TAR_OPTIONS=\"-H ustar\"
13767 export TAR_OPTIONS
13768 rm -rf *
13769
13770 genfile -l 1024 -f en
13771 genfile -l 1024 -f to
13772
13773 tar cf archive en to
13774 # Make sure we don't use bogus blocking factor.
13775 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13776 tar --file archive --blocking-factor=20 --delete tre
13777 tar tf archive
13778 )"
13779 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13780 ( $at_check_trace;
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 genfile -l 1024 -f en
13790 genfile -l 1024 -f to
13791
13792 tar cf archive en to
13793 # Make sure we don't use bogus blocking factor.
13794 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13795 tar --file archive --blocking-factor=20 --delete tre
13796 tar tf archive
13797 )
13798 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13799 at_status=$? at_failed=false
13800 $at_check_filter
13801 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13802 tar: Exiting with failure status due to previous errors
13803 " | \
13804   $at_diff - "$at_stderr" || at_failed=:
13805 echo >>"$at_stdout"; $as_echo "en
13806 to
13807 " | \
13808   $at_diff - "$at_stdout" || at_failed=:
13809 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13810 $at_failed && at_fn_log_failure
13811 $at_traceon; }
13812
13813               { set +x
13814 $as_echo "$at_srcdir/delete05.at:30:
13815 mkdir posix
13816 (cd posix
13817 TEST_TAR_FORMAT=posix
13818 export TEST_TAR_FORMAT
13819 TAR_OPTIONS=\"-H posix\"
13820 export TAR_OPTIONS
13821 rm -rf *
13822
13823 genfile -l 1024 -f en
13824 genfile -l 1024 -f to
13825
13826 tar cf archive en to
13827 # Make sure we don't use bogus blocking factor.
13828 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13829 tar --file archive --blocking-factor=20 --delete tre
13830 tar tf archive
13831 )"
13832 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13833 ( $at_check_trace;
13834 mkdir posix
13835 (cd posix
13836 TEST_TAR_FORMAT=posix
13837 export TEST_TAR_FORMAT
13838 TAR_OPTIONS="-H posix"
13839 export TAR_OPTIONS
13840 rm -rf *
13841
13842 genfile -l 1024 -f en
13843 genfile -l 1024 -f to
13844
13845 tar cf archive en to
13846 # Make sure we don't use bogus blocking factor.
13847 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13848 tar --file archive --blocking-factor=20 --delete tre
13849 tar tf archive
13850 )
13851 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13852 at_status=$? at_failed=false
13853 $at_check_filter
13854 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13855 tar: Exiting with failure status due to previous errors
13856 " | \
13857   $at_diff - "$at_stderr" || at_failed=:
13858 echo >>"$at_stdout"; $as_echo "en
13859 to
13860 " | \
13861   $at_diff - "$at_stdout" || at_failed=:
13862 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13863 $at_failed && at_fn_log_failure
13864 $at_traceon; }
13865
13866               { set +x
13867 $as_echo "$at_srcdir/delete05.at:30:
13868 mkdir gnu
13869 (cd gnu
13870 TEST_TAR_FORMAT=gnu
13871 export TEST_TAR_FORMAT
13872 TAR_OPTIONS=\"-H gnu\"
13873 export TAR_OPTIONS
13874 rm -rf *
13875
13876 genfile -l 1024 -f en
13877 genfile -l 1024 -f to
13878
13879 tar cf archive en to
13880 # Make sure we don't use bogus blocking factor.
13881 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13882 tar --file archive --blocking-factor=20 --delete tre
13883 tar tf archive
13884 )"
13885 at_fn_check_prepare_notrace 'an embedded newline' "delete05.at:30"
13886 ( $at_check_trace;
13887 mkdir gnu
13888 (cd gnu
13889 TEST_TAR_FORMAT=gnu
13890 export TEST_TAR_FORMAT
13891 TAR_OPTIONS="-H gnu"
13892 export TAR_OPTIONS
13893 rm -rf *
13894
13895 genfile -l 1024 -f en
13896 genfile -l 1024 -f to
13897
13898 tar cf archive en to
13899 # Make sure we don't use bogus blocking factor.
13900 # GNU tar up to and including 1.14.91 produced an empty archive this way:
13901 tar --file archive --blocking-factor=20 --delete tre
13902 tar tf archive
13903 )
13904 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13905 at_status=$? at_failed=false
13906 $at_check_filter
13907 echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive
13908 tar: Exiting with failure status due to previous errors
13909 " | \
13910   $at_diff - "$at_stderr" || at_failed=:
13911 echo >>"$at_stdout"; $as_echo "en
13912 to
13913 " | \
13914   $at_diff - "$at_stdout" || at_failed=:
13915 at_fn_check_status 0 $at_status "$at_srcdir/delete05.at:30"
13916 $at_failed && at_fn_log_failure
13917 $at_traceon; }
13918
13919
13920
13921
13922   set +x
13923   $at_times_p && times >"$at_times_file"
13924 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
13925 read at_status <"$at_status_file"
13926 #AT_STOP_56
13927 #AT_START_57
13928 at_fn_group_banner 57 'extrac01.at:23' \
13929   "extract over an existing directory" "             " 9
13930 at_xfail=no
13931       test -f $XFAILFILE && at_xfail=yes
13932 (
13933   $as_echo "57. $at_setup_line: testing $at_desc ..."
13934   $at_traceon
13935
13936
13937
13938
13939
13940   { set +x
13941 $as_echo "$at_srcdir/extrac01.at:26:
13942 mkdir v7
13943 (cd v7
13944 TEST_TAR_FORMAT=v7
13945 export TEST_TAR_FORMAT
13946 TAR_OPTIONS=\"-H v7\"
13947 export TAR_OPTIONS
13948 rm -rf *
13949
13950 mkdir directory
13951 touch directory/file
13952 tar cf archive directory || exit 1
13953 tar xf archive --warning=no-timestamp || exit 1
13954 )"
13955 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
13956 ( $at_check_trace;
13957 mkdir v7
13958 (cd v7
13959 TEST_TAR_FORMAT=v7
13960 export TEST_TAR_FORMAT
13961 TAR_OPTIONS="-H v7"
13962 export TAR_OPTIONS
13963 rm -rf *
13964
13965 mkdir directory
13966 touch directory/file
13967 tar cf archive directory || exit 1
13968 tar xf archive --warning=no-timestamp || exit 1
13969 )
13970 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
13971 at_status=$? at_failed=false
13972 $at_check_filter
13973 at_fn_diff_devnull "$at_stderr" || at_failed=:
13974 at_fn_diff_devnull "$at_stdout" || at_failed=:
13975 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
13976 $at_failed && at_fn_log_failure
13977 $at_traceon; }
13978
13979               { set +x
13980 $as_echo "$at_srcdir/extrac01.at:26:
13981 mkdir oldgnu
13982 (cd oldgnu
13983 TEST_TAR_FORMAT=oldgnu
13984 export TEST_TAR_FORMAT
13985 TAR_OPTIONS=\"-H oldgnu\"
13986 export TAR_OPTIONS
13987 rm -rf *
13988
13989 mkdir directory
13990 touch directory/file
13991 tar cf archive directory || exit 1
13992 tar xf archive --warning=no-timestamp || exit 1
13993 )"
13994 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
13995 ( $at_check_trace;
13996 mkdir oldgnu
13997 (cd oldgnu
13998 TEST_TAR_FORMAT=oldgnu
13999 export TEST_TAR_FORMAT
14000 TAR_OPTIONS="-H oldgnu"
14001 export TAR_OPTIONS
14002 rm -rf *
14003
14004 mkdir directory
14005 touch directory/file
14006 tar cf archive directory || exit 1
14007 tar xf archive --warning=no-timestamp || exit 1
14008 )
14009 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14010 at_status=$? at_failed=false
14011 $at_check_filter
14012 at_fn_diff_devnull "$at_stderr" || at_failed=:
14013 at_fn_diff_devnull "$at_stdout" || at_failed=:
14014 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
14015 $at_failed && at_fn_log_failure
14016 $at_traceon; }
14017
14018               { set +x
14019 $as_echo "$at_srcdir/extrac01.at:26:
14020 mkdir ustar
14021 (cd ustar
14022 TEST_TAR_FORMAT=ustar
14023 export TEST_TAR_FORMAT
14024 TAR_OPTIONS=\"-H ustar\"
14025 export TAR_OPTIONS
14026 rm -rf *
14027
14028 mkdir directory
14029 touch directory/file
14030 tar cf archive directory || exit 1
14031 tar xf archive --warning=no-timestamp || exit 1
14032 )"
14033 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
14034 ( $at_check_trace;
14035 mkdir ustar
14036 (cd ustar
14037 TEST_TAR_FORMAT=ustar
14038 export TEST_TAR_FORMAT
14039 TAR_OPTIONS="-H ustar"
14040 export TAR_OPTIONS
14041 rm -rf *
14042
14043 mkdir directory
14044 touch directory/file
14045 tar cf archive directory || exit 1
14046 tar xf archive --warning=no-timestamp || exit 1
14047 )
14048 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14049 at_status=$? at_failed=false
14050 $at_check_filter
14051 at_fn_diff_devnull "$at_stderr" || at_failed=:
14052 at_fn_diff_devnull "$at_stdout" || at_failed=:
14053 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
14054 $at_failed && at_fn_log_failure
14055 $at_traceon; }
14056
14057               { set +x
14058 $as_echo "$at_srcdir/extrac01.at:26:
14059 mkdir posix
14060 (cd posix
14061 TEST_TAR_FORMAT=posix
14062 export TEST_TAR_FORMAT
14063 TAR_OPTIONS=\"-H posix\"
14064 export TAR_OPTIONS
14065 rm -rf *
14066
14067 mkdir directory
14068 touch directory/file
14069 tar cf archive directory || exit 1
14070 tar xf archive --warning=no-timestamp || exit 1
14071 )"
14072 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
14073 ( $at_check_trace;
14074 mkdir posix
14075 (cd posix
14076 TEST_TAR_FORMAT=posix
14077 export TEST_TAR_FORMAT
14078 TAR_OPTIONS="-H posix"
14079 export TAR_OPTIONS
14080 rm -rf *
14081
14082 mkdir directory
14083 touch directory/file
14084 tar cf archive directory || exit 1
14085 tar xf archive --warning=no-timestamp || exit 1
14086 )
14087 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14088 at_status=$? at_failed=false
14089 $at_check_filter
14090 at_fn_diff_devnull "$at_stderr" || at_failed=:
14091 at_fn_diff_devnull "$at_stdout" || at_failed=:
14092 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
14093 $at_failed && at_fn_log_failure
14094 $at_traceon; }
14095
14096               { set +x
14097 $as_echo "$at_srcdir/extrac01.at:26:
14098 mkdir gnu
14099 (cd gnu
14100 TEST_TAR_FORMAT=gnu
14101 export TEST_TAR_FORMAT
14102 TAR_OPTIONS=\"-H gnu\"
14103 export TAR_OPTIONS
14104 rm -rf *
14105
14106 mkdir directory
14107 touch directory/file
14108 tar cf archive directory || exit 1
14109 tar xf archive --warning=no-timestamp || exit 1
14110 )"
14111 at_fn_check_prepare_notrace 'an embedded newline' "extrac01.at:26"
14112 ( $at_check_trace;
14113 mkdir gnu
14114 (cd gnu
14115 TEST_TAR_FORMAT=gnu
14116 export TEST_TAR_FORMAT
14117 TAR_OPTIONS="-H gnu"
14118 export TAR_OPTIONS
14119 rm -rf *
14120
14121 mkdir directory
14122 touch directory/file
14123 tar cf archive directory || exit 1
14124 tar xf archive --warning=no-timestamp || exit 1
14125 )
14126 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14127 at_status=$? at_failed=false
14128 $at_check_filter
14129 at_fn_diff_devnull "$at_stderr" || at_failed=:
14130 at_fn_diff_devnull "$at_stdout" || at_failed=:
14131 at_fn_check_status 0 $at_status "$at_srcdir/extrac01.at:26"
14132 $at_failed && at_fn_log_failure
14133 $at_traceon; }
14134
14135
14136
14137
14138   set +x
14139   $at_times_p && times >"$at_times_file"
14140 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14141 read at_status <"$at_status_file"
14142 #AT_STOP_57
14143 #AT_START_58
14144 at_fn_group_banner 58 'extrac02.at:23' \
14145   "extracting symlinks over an existing file" "      " 9
14146 at_xfail=no
14147       test -f $XFAILFILE && at_xfail=yes
14148 (
14149   $as_echo "58. $at_setup_line: testing $at_desc ..."
14150   $at_traceon
14151
14152
14153
14154 # FIXME: Skip if symlinks are not supported on the system
14155
14156
14157
14158   { set +x
14159 $as_echo "$at_srcdir/extrac02.at:28:
14160 mkdir v7
14161 (cd v7
14162 TEST_TAR_FORMAT=v7
14163 export TEST_TAR_FORMAT
14164 TAR_OPTIONS=\"-H v7\"
14165 export TAR_OPTIONS
14166 rm -rf *
14167
14168 touch file
14169 ln -s file link 2> /dev/null || ln file link
14170 tar cf archive link
14171 rm link
14172 touch link
14173 tar xf archive
14174 )"
14175 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
14176 ( $at_check_trace;
14177 mkdir v7
14178 (cd v7
14179 TEST_TAR_FORMAT=v7
14180 export TEST_TAR_FORMAT
14181 TAR_OPTIONS="-H v7"
14182 export TAR_OPTIONS
14183 rm -rf *
14184
14185 touch file
14186 ln -s file link 2> /dev/null || ln file link
14187 tar cf archive link
14188 rm link
14189 touch link
14190 tar xf archive
14191 )
14192 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14193 at_status=$? at_failed=false
14194 $at_check_filter
14195 at_fn_diff_devnull "$at_stderr" || at_failed=:
14196 at_fn_diff_devnull "$at_stdout" || at_failed=:
14197 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
14198 $at_failed && at_fn_log_failure
14199 $at_traceon; }
14200
14201               { set +x
14202 $as_echo "$at_srcdir/extrac02.at:28:
14203 mkdir oldgnu
14204 (cd oldgnu
14205 TEST_TAR_FORMAT=oldgnu
14206 export TEST_TAR_FORMAT
14207 TAR_OPTIONS=\"-H oldgnu\"
14208 export TAR_OPTIONS
14209 rm -rf *
14210
14211 touch file
14212 ln -s file link 2> /dev/null || ln file link
14213 tar cf archive link
14214 rm link
14215 touch link
14216 tar xf archive
14217 )"
14218 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
14219 ( $at_check_trace;
14220 mkdir oldgnu
14221 (cd oldgnu
14222 TEST_TAR_FORMAT=oldgnu
14223 export TEST_TAR_FORMAT
14224 TAR_OPTIONS="-H oldgnu"
14225 export TAR_OPTIONS
14226 rm -rf *
14227
14228 touch file
14229 ln -s file link 2> /dev/null || ln file link
14230 tar cf archive link
14231 rm link
14232 touch link
14233 tar xf archive
14234 )
14235 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14236 at_status=$? at_failed=false
14237 $at_check_filter
14238 at_fn_diff_devnull "$at_stderr" || at_failed=:
14239 at_fn_diff_devnull "$at_stdout" || at_failed=:
14240 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
14241 $at_failed && at_fn_log_failure
14242 $at_traceon; }
14243
14244               { set +x
14245 $as_echo "$at_srcdir/extrac02.at:28:
14246 mkdir ustar
14247 (cd ustar
14248 TEST_TAR_FORMAT=ustar
14249 export TEST_TAR_FORMAT
14250 TAR_OPTIONS=\"-H ustar\"
14251 export TAR_OPTIONS
14252 rm -rf *
14253
14254 touch file
14255 ln -s file link 2> /dev/null || ln file link
14256 tar cf archive link
14257 rm link
14258 touch link
14259 tar xf archive
14260 )"
14261 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
14262 ( $at_check_trace;
14263 mkdir ustar
14264 (cd ustar
14265 TEST_TAR_FORMAT=ustar
14266 export TEST_TAR_FORMAT
14267 TAR_OPTIONS="-H ustar"
14268 export TAR_OPTIONS
14269 rm -rf *
14270
14271 touch file
14272 ln -s file link 2> /dev/null || ln file link
14273 tar cf archive link
14274 rm link
14275 touch link
14276 tar xf archive
14277 )
14278 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14279 at_status=$? at_failed=false
14280 $at_check_filter
14281 at_fn_diff_devnull "$at_stderr" || at_failed=:
14282 at_fn_diff_devnull "$at_stdout" || at_failed=:
14283 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
14284 $at_failed && at_fn_log_failure
14285 $at_traceon; }
14286
14287               { set +x
14288 $as_echo "$at_srcdir/extrac02.at:28:
14289 mkdir posix
14290 (cd posix
14291 TEST_TAR_FORMAT=posix
14292 export TEST_TAR_FORMAT
14293 TAR_OPTIONS=\"-H posix\"
14294 export TAR_OPTIONS
14295 rm -rf *
14296
14297 touch file
14298 ln -s file link 2> /dev/null || ln file link
14299 tar cf archive link
14300 rm link
14301 touch link
14302 tar xf archive
14303 )"
14304 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
14305 ( $at_check_trace;
14306 mkdir posix
14307 (cd posix
14308 TEST_TAR_FORMAT=posix
14309 export TEST_TAR_FORMAT
14310 TAR_OPTIONS="-H posix"
14311 export TAR_OPTIONS
14312 rm -rf *
14313
14314 touch file
14315 ln -s file link 2> /dev/null || ln file link
14316 tar cf archive link
14317 rm link
14318 touch link
14319 tar xf archive
14320 )
14321 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14322 at_status=$? at_failed=false
14323 $at_check_filter
14324 at_fn_diff_devnull "$at_stderr" || at_failed=:
14325 at_fn_diff_devnull "$at_stdout" || at_failed=:
14326 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
14327 $at_failed && at_fn_log_failure
14328 $at_traceon; }
14329
14330               { set +x
14331 $as_echo "$at_srcdir/extrac02.at:28:
14332 mkdir gnu
14333 (cd gnu
14334 TEST_TAR_FORMAT=gnu
14335 export TEST_TAR_FORMAT
14336 TAR_OPTIONS=\"-H gnu\"
14337 export TAR_OPTIONS
14338 rm -rf *
14339
14340 touch file
14341 ln -s file link 2> /dev/null || ln file link
14342 tar cf archive link
14343 rm link
14344 touch link
14345 tar xf archive
14346 )"
14347 at_fn_check_prepare_notrace 'an embedded newline' "extrac02.at:28"
14348 ( $at_check_trace;
14349 mkdir gnu
14350 (cd gnu
14351 TEST_TAR_FORMAT=gnu
14352 export TEST_TAR_FORMAT
14353 TAR_OPTIONS="-H gnu"
14354 export TAR_OPTIONS
14355 rm -rf *
14356
14357 touch file
14358 ln -s file link 2> /dev/null || ln file link
14359 tar cf archive link
14360 rm link
14361 touch link
14362 tar xf archive
14363 )
14364 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14365 at_status=$? at_failed=false
14366 $at_check_filter
14367 at_fn_diff_devnull "$at_stderr" || at_failed=:
14368 at_fn_diff_devnull "$at_stdout" || at_failed=:
14369 at_fn_check_status 0 $at_status "$at_srcdir/extrac02.at:28"
14370 $at_failed && at_fn_log_failure
14371 $at_traceon; }
14372
14373
14374
14375
14376   set +x
14377   $at_times_p && times >"$at_times_file"
14378 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14379 read at_status <"$at_status_file"
14380 #AT_STOP_58
14381 #AT_START_59
14382 at_fn_group_banner 59 'extrac03.at:23' \
14383   "extraction loops" "                               " 9
14384 at_xfail=no
14385       test -f $XFAILFILE && at_xfail=yes
14386 (
14387   $as_echo "59. $at_setup_line: testing $at_desc ..."
14388   $at_traceon
14389
14390
14391
14392
14393
14394   { set +x
14395 $as_echo "$at_srcdir/extrac03.at:26:
14396 mkdir v7
14397 (cd v7
14398 TEST_TAR_FORMAT=v7
14399 export TEST_TAR_FORMAT
14400 TAR_OPTIONS=\"-H v7\"
14401 export TAR_OPTIONS
14402 rm -rf *
14403
14404 mkdir directory
14405 tar -cPvf archive directory/../directory
14406 echo separator
14407 tar -xPvf archive --warning=no-timestamp)"
14408 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
14409 ( $at_check_trace;
14410 mkdir v7
14411 (cd v7
14412 TEST_TAR_FORMAT=v7
14413 export TEST_TAR_FORMAT
14414 TAR_OPTIONS="-H v7"
14415 export TAR_OPTIONS
14416 rm -rf *
14417
14418 mkdir directory
14419 tar -cPvf archive directory/../directory
14420 echo separator
14421 tar -xPvf archive --warning=no-timestamp)
14422 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14423 at_status=$? at_failed=false
14424 $at_check_filter
14425 at_fn_diff_devnull "$at_stderr" || at_failed=:
14426 echo >>"$at_stdout"; $as_echo "directory/../directory/
14427 separator
14428 directory/../directory/
14429 " | \
14430   $at_diff - "$at_stdout" || at_failed=:
14431 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14432 $at_failed && at_fn_log_failure
14433 $at_traceon; }
14434
14435               { set +x
14436 $as_echo "$at_srcdir/extrac03.at:26:
14437 mkdir oldgnu
14438 (cd oldgnu
14439 TEST_TAR_FORMAT=oldgnu
14440 export TEST_TAR_FORMAT
14441 TAR_OPTIONS=\"-H oldgnu\"
14442 export TAR_OPTIONS
14443 rm -rf *
14444
14445 mkdir directory
14446 tar -cPvf archive directory/../directory
14447 echo separator
14448 tar -xPvf archive --warning=no-timestamp)"
14449 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
14450 ( $at_check_trace;
14451 mkdir oldgnu
14452 (cd oldgnu
14453 TEST_TAR_FORMAT=oldgnu
14454 export TEST_TAR_FORMAT
14455 TAR_OPTIONS="-H oldgnu"
14456 export TAR_OPTIONS
14457 rm -rf *
14458
14459 mkdir directory
14460 tar -cPvf archive directory/../directory
14461 echo separator
14462 tar -xPvf archive --warning=no-timestamp)
14463 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14464 at_status=$? at_failed=false
14465 $at_check_filter
14466 at_fn_diff_devnull "$at_stderr" || at_failed=:
14467 echo >>"$at_stdout"; $as_echo "directory/../directory/
14468 separator
14469 directory/../directory/
14470 " | \
14471   $at_diff - "$at_stdout" || at_failed=:
14472 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14473 $at_failed && at_fn_log_failure
14474 $at_traceon; }
14475
14476               { set +x
14477 $as_echo "$at_srcdir/extrac03.at:26:
14478 mkdir ustar
14479 (cd ustar
14480 TEST_TAR_FORMAT=ustar
14481 export TEST_TAR_FORMAT
14482 TAR_OPTIONS=\"-H ustar\"
14483 export TAR_OPTIONS
14484 rm -rf *
14485
14486 mkdir directory
14487 tar -cPvf archive directory/../directory
14488 echo separator
14489 tar -xPvf archive --warning=no-timestamp)"
14490 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
14491 ( $at_check_trace;
14492 mkdir ustar
14493 (cd ustar
14494 TEST_TAR_FORMAT=ustar
14495 export TEST_TAR_FORMAT
14496 TAR_OPTIONS="-H ustar"
14497 export TAR_OPTIONS
14498 rm -rf *
14499
14500 mkdir directory
14501 tar -cPvf archive directory/../directory
14502 echo separator
14503 tar -xPvf archive --warning=no-timestamp)
14504 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14505 at_status=$? at_failed=false
14506 $at_check_filter
14507 at_fn_diff_devnull "$at_stderr" || at_failed=:
14508 echo >>"$at_stdout"; $as_echo "directory/../directory/
14509 separator
14510 directory/../directory/
14511 " | \
14512   $at_diff - "$at_stdout" || at_failed=:
14513 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14514 $at_failed && at_fn_log_failure
14515 $at_traceon; }
14516
14517               { set +x
14518 $as_echo "$at_srcdir/extrac03.at:26:
14519 mkdir posix
14520 (cd posix
14521 TEST_TAR_FORMAT=posix
14522 export TEST_TAR_FORMAT
14523 TAR_OPTIONS=\"-H posix\"
14524 export TAR_OPTIONS
14525 rm -rf *
14526
14527 mkdir directory
14528 tar -cPvf archive directory/../directory
14529 echo separator
14530 tar -xPvf archive --warning=no-timestamp)"
14531 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
14532 ( $at_check_trace;
14533 mkdir posix
14534 (cd posix
14535 TEST_TAR_FORMAT=posix
14536 export TEST_TAR_FORMAT
14537 TAR_OPTIONS="-H posix"
14538 export TAR_OPTIONS
14539 rm -rf *
14540
14541 mkdir directory
14542 tar -cPvf archive directory/../directory
14543 echo separator
14544 tar -xPvf archive --warning=no-timestamp)
14545 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14546 at_status=$? at_failed=false
14547 $at_check_filter
14548 at_fn_diff_devnull "$at_stderr" || at_failed=:
14549 echo >>"$at_stdout"; $as_echo "directory/../directory/
14550 separator
14551 directory/../directory/
14552 " | \
14553   $at_diff - "$at_stdout" || at_failed=:
14554 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14555 $at_failed && at_fn_log_failure
14556 $at_traceon; }
14557
14558               { set +x
14559 $as_echo "$at_srcdir/extrac03.at:26:
14560 mkdir gnu
14561 (cd gnu
14562 TEST_TAR_FORMAT=gnu
14563 export TEST_TAR_FORMAT
14564 TAR_OPTIONS=\"-H gnu\"
14565 export TAR_OPTIONS
14566 rm -rf *
14567
14568 mkdir directory
14569 tar -cPvf archive directory/../directory
14570 echo separator
14571 tar -xPvf archive --warning=no-timestamp)"
14572 at_fn_check_prepare_notrace 'an embedded newline' "extrac03.at:26"
14573 ( $at_check_trace;
14574 mkdir gnu
14575 (cd gnu
14576 TEST_TAR_FORMAT=gnu
14577 export TEST_TAR_FORMAT
14578 TAR_OPTIONS="-H gnu"
14579 export TAR_OPTIONS
14580 rm -rf *
14581
14582 mkdir directory
14583 tar -cPvf archive directory/../directory
14584 echo separator
14585 tar -xPvf archive --warning=no-timestamp)
14586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14587 at_status=$? at_failed=false
14588 $at_check_filter
14589 at_fn_diff_devnull "$at_stderr" || at_failed=:
14590 echo >>"$at_stdout"; $as_echo "directory/../directory/
14591 separator
14592 directory/../directory/
14593 " | \
14594   $at_diff - "$at_stdout" || at_failed=:
14595 at_fn_check_status 0 $at_status "$at_srcdir/extrac03.at:26"
14596 $at_failed && at_fn_log_failure
14597 $at_traceon; }
14598
14599
14600
14601
14602   set +x
14603   $at_times_p && times >"$at_times_file"
14604 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14605 read at_status <"$at_status_file"
14606 #AT_STOP_59
14607 #AT_START_60
14608 at_fn_group_banner 60 'extrac04.at:23' \
14609   "extract + fnmatch" "                              " 9
14610 at_xfail=no
14611       test -f $XFAILFILE && at_xfail=yes
14612 (
14613   $as_echo "60. $at_setup_line: testing $at_desc ..."
14614   $at_traceon
14615
14616
14617
14618
14619
14620   { set +x
14621 $as_echo "$at_srcdir/extrac04.at:26:
14622 mkdir v7
14623 (cd v7
14624 TEST_TAR_FORMAT=v7
14625 export TEST_TAR_FORMAT
14626 TAR_OPTIONS=\"-H v7\"
14627 export TAR_OPTIONS
14628 rm -rf *
14629
14630
14631 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14632
14633 touch file1
14634 mkdir directory
14635 mkdir directory/subdirectory
14636 touch directory/file1
14637 touch directory/file2
14638 touch directory/subdirectory/file1
14639 touch directory/subdirectory/file2
14640 tar -cf archive ./file1 directory
14641 tar -tf archive \\
14642   --exclude='./*1' \\
14643   --exclude='d*/*1' \\
14644   --exclude='d*/s*/*2' | sort
14645 )"
14646 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14647 ( $at_check_trace;
14648 mkdir v7
14649 (cd v7
14650 TEST_TAR_FORMAT=v7
14651 export TEST_TAR_FORMAT
14652 TAR_OPTIONS="-H v7"
14653 export TAR_OPTIONS
14654 rm -rf *
14655
14656
14657 test -z "`sort < /dev/null 2>&1`" || exit 77
14658
14659 touch file1
14660 mkdir directory
14661 mkdir directory/subdirectory
14662 touch directory/file1
14663 touch directory/file2
14664 touch directory/subdirectory/file1
14665 touch directory/subdirectory/file2
14666 tar -cf archive ./file1 directory
14667 tar -tf archive \
14668   --exclude='./*1' \
14669   --exclude='d*/*1' \
14670   --exclude='d*/s*/*2' | sort
14671 )
14672 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14673 at_status=$? at_failed=false
14674 $at_check_filter
14675 at_fn_diff_devnull "$at_stderr" || at_failed=:
14676 echo >>"$at_stdout"; $as_echo "directory/
14677 directory/file2
14678 directory/subdirectory/
14679 " | \
14680   $at_diff - "$at_stdout" || at_failed=:
14681 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14682 $at_failed && at_fn_log_failure
14683 $at_traceon; }
14684
14685               { set +x
14686 $as_echo "$at_srcdir/extrac04.at:26:
14687 mkdir oldgnu
14688 (cd oldgnu
14689 TEST_TAR_FORMAT=oldgnu
14690 export TEST_TAR_FORMAT
14691 TAR_OPTIONS=\"-H oldgnu\"
14692 export TAR_OPTIONS
14693 rm -rf *
14694
14695
14696 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14697
14698 touch file1
14699 mkdir directory
14700 mkdir directory/subdirectory
14701 touch directory/file1
14702 touch directory/file2
14703 touch directory/subdirectory/file1
14704 touch directory/subdirectory/file2
14705 tar -cf archive ./file1 directory
14706 tar -tf archive \\
14707   --exclude='./*1' \\
14708   --exclude='d*/*1' \\
14709   --exclude='d*/s*/*2' | sort
14710 )"
14711 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14712 ( $at_check_trace;
14713 mkdir oldgnu
14714 (cd oldgnu
14715 TEST_TAR_FORMAT=oldgnu
14716 export TEST_TAR_FORMAT
14717 TAR_OPTIONS="-H oldgnu"
14718 export TAR_OPTIONS
14719 rm -rf *
14720
14721
14722 test -z "`sort < /dev/null 2>&1`" || exit 77
14723
14724 touch file1
14725 mkdir directory
14726 mkdir directory/subdirectory
14727 touch directory/file1
14728 touch directory/file2
14729 touch directory/subdirectory/file1
14730 touch directory/subdirectory/file2
14731 tar -cf archive ./file1 directory
14732 tar -tf archive \
14733   --exclude='./*1' \
14734   --exclude='d*/*1' \
14735   --exclude='d*/s*/*2' | sort
14736 )
14737 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14738 at_status=$? at_failed=false
14739 $at_check_filter
14740 at_fn_diff_devnull "$at_stderr" || at_failed=:
14741 echo >>"$at_stdout"; $as_echo "directory/
14742 directory/file2
14743 directory/subdirectory/
14744 " | \
14745   $at_diff - "$at_stdout" || at_failed=:
14746 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14747 $at_failed && at_fn_log_failure
14748 $at_traceon; }
14749
14750               { set +x
14751 $as_echo "$at_srcdir/extrac04.at:26:
14752 mkdir ustar
14753 (cd ustar
14754 TEST_TAR_FORMAT=ustar
14755 export TEST_TAR_FORMAT
14756 TAR_OPTIONS=\"-H ustar\"
14757 export TAR_OPTIONS
14758 rm -rf *
14759
14760
14761 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14762
14763 touch file1
14764 mkdir directory
14765 mkdir directory/subdirectory
14766 touch directory/file1
14767 touch directory/file2
14768 touch directory/subdirectory/file1
14769 touch directory/subdirectory/file2
14770 tar -cf archive ./file1 directory
14771 tar -tf archive \\
14772   --exclude='./*1' \\
14773   --exclude='d*/*1' \\
14774   --exclude='d*/s*/*2' | sort
14775 )"
14776 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14777 ( $at_check_trace;
14778 mkdir ustar
14779 (cd ustar
14780 TEST_TAR_FORMAT=ustar
14781 export TEST_TAR_FORMAT
14782 TAR_OPTIONS="-H ustar"
14783 export TAR_OPTIONS
14784 rm -rf *
14785
14786
14787 test -z "`sort < /dev/null 2>&1`" || exit 77
14788
14789 touch file1
14790 mkdir directory
14791 mkdir directory/subdirectory
14792 touch directory/file1
14793 touch directory/file2
14794 touch directory/subdirectory/file1
14795 touch directory/subdirectory/file2
14796 tar -cf archive ./file1 directory
14797 tar -tf archive \
14798   --exclude='./*1' \
14799   --exclude='d*/*1' \
14800   --exclude='d*/s*/*2' | sort
14801 )
14802 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14803 at_status=$? at_failed=false
14804 $at_check_filter
14805 at_fn_diff_devnull "$at_stderr" || at_failed=:
14806 echo >>"$at_stdout"; $as_echo "directory/
14807 directory/file2
14808 directory/subdirectory/
14809 " | \
14810   $at_diff - "$at_stdout" || at_failed=:
14811 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14812 $at_failed && at_fn_log_failure
14813 $at_traceon; }
14814
14815               { set +x
14816 $as_echo "$at_srcdir/extrac04.at:26:
14817 mkdir posix
14818 (cd posix
14819 TEST_TAR_FORMAT=posix
14820 export TEST_TAR_FORMAT
14821 TAR_OPTIONS=\"-H posix\"
14822 export TAR_OPTIONS
14823 rm -rf *
14824
14825
14826 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14827
14828 touch file1
14829 mkdir directory
14830 mkdir directory/subdirectory
14831 touch directory/file1
14832 touch directory/file2
14833 touch directory/subdirectory/file1
14834 touch directory/subdirectory/file2
14835 tar -cf archive ./file1 directory
14836 tar -tf archive \\
14837   --exclude='./*1' \\
14838   --exclude='d*/*1' \\
14839   --exclude='d*/s*/*2' | sort
14840 )"
14841 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14842 ( $at_check_trace;
14843 mkdir posix
14844 (cd posix
14845 TEST_TAR_FORMAT=posix
14846 export TEST_TAR_FORMAT
14847 TAR_OPTIONS="-H posix"
14848 export TAR_OPTIONS
14849 rm -rf *
14850
14851
14852 test -z "`sort < /dev/null 2>&1`" || exit 77
14853
14854 touch file1
14855 mkdir directory
14856 mkdir directory/subdirectory
14857 touch directory/file1
14858 touch directory/file2
14859 touch directory/subdirectory/file1
14860 touch directory/subdirectory/file2
14861 tar -cf archive ./file1 directory
14862 tar -tf archive \
14863   --exclude='./*1' \
14864   --exclude='d*/*1' \
14865   --exclude='d*/s*/*2' | sort
14866 )
14867 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14868 at_status=$? at_failed=false
14869 $at_check_filter
14870 at_fn_diff_devnull "$at_stderr" || at_failed=:
14871 echo >>"$at_stdout"; $as_echo "directory/
14872 directory/file2
14873 directory/subdirectory/
14874 " | \
14875   $at_diff - "$at_stdout" || at_failed=:
14876 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14877 $at_failed && at_fn_log_failure
14878 $at_traceon; }
14879
14880               { set +x
14881 $as_echo "$at_srcdir/extrac04.at:26:
14882 mkdir gnu
14883 (cd gnu
14884 TEST_TAR_FORMAT=gnu
14885 export TEST_TAR_FORMAT
14886 TAR_OPTIONS=\"-H gnu\"
14887 export TAR_OPTIONS
14888 rm -rf *
14889
14890
14891 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
14892
14893 touch file1
14894 mkdir directory
14895 mkdir directory/subdirectory
14896 touch directory/file1
14897 touch directory/file2
14898 touch directory/subdirectory/file1
14899 touch directory/subdirectory/file2
14900 tar -cf archive ./file1 directory
14901 tar -tf archive \\
14902   --exclude='./*1' \\
14903   --exclude='d*/*1' \\
14904   --exclude='d*/s*/*2' | sort
14905 )"
14906 at_fn_check_prepare_notrace 'a `...` command substitution' "extrac04.at:26"
14907 ( $at_check_trace;
14908 mkdir gnu
14909 (cd gnu
14910 TEST_TAR_FORMAT=gnu
14911 export TEST_TAR_FORMAT
14912 TAR_OPTIONS="-H gnu"
14913 export TAR_OPTIONS
14914 rm -rf *
14915
14916
14917 test -z "`sort < /dev/null 2>&1`" || exit 77
14918
14919 touch file1
14920 mkdir directory
14921 mkdir directory/subdirectory
14922 touch directory/file1
14923 touch directory/file2
14924 touch directory/subdirectory/file1
14925 touch directory/subdirectory/file2
14926 tar -cf archive ./file1 directory
14927 tar -tf archive \
14928   --exclude='./*1' \
14929   --exclude='d*/*1' \
14930   --exclude='d*/s*/*2' | sort
14931 )
14932 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
14933 at_status=$? at_failed=false
14934 $at_check_filter
14935 at_fn_diff_devnull "$at_stderr" || at_failed=:
14936 echo >>"$at_stdout"; $as_echo "directory/
14937 directory/file2
14938 directory/subdirectory/
14939 " | \
14940   $at_diff - "$at_stdout" || at_failed=:
14941 at_fn_check_status 0 $at_status "$at_srcdir/extrac04.at:26"
14942 $at_failed && at_fn_log_failure
14943 $at_traceon; }
14944
14945
14946
14947
14948   set +x
14949   $at_times_p && times >"$at_times_file"
14950 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
14951 read at_status <"$at_status_file"
14952 #AT_STOP_60
14953 #AT_START_61
14954 at_fn_group_banner 61 'extrac05.at:30' \
14955   "extracting selected members from pax" "           " 9
14956 at_xfail=no
14957       test -f $XFAILFILE && at_xfail=yes
14958 (
14959   $as_echo "61. $at_setup_line: testing $at_desc ..."
14960   $at_traceon
14961
14962
14963
14964 cat >list <<'_ATEOF'
14965 jeden
14966 cztery
14967 _ATEOF
14968
14969
14970
14971
14972   { set +x
14973 $as_echo "$at_srcdir/extrac05.at:38:
14974 mkdir posix
14975 (cd posix
14976 TEST_TAR_FORMAT=posix
14977 export TEST_TAR_FORMAT
14978 TAR_OPTIONS=\"-H posix\"
14979 export TAR_OPTIONS
14980 rm -rf *
14981
14982 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
14983 genfile --length 118 --file jeden
14984 genfile --length 223 --file dwa
14985 genfile --length 517 --file trzy
14986 genfile --length 110 --file cztery
14987
14988 tar cf archive jeden dwa trzy cztery || exit 1
14989
14990 mkdir dir
14991 cd dir
14992
14993 tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
14994
14995 cd ..
14996 )"
14997 at_fn_check_prepare_notrace 'an embedded newline' "extrac05.at:38"
14998 ( $at_check_trace;
14999 mkdir posix
15000 (cd posix
15001 TEST_TAR_FORMAT=posix
15002 export TEST_TAR_FORMAT
15003 TAR_OPTIONS="-H posix"
15004 export TAR_OPTIONS
15005 rm -rf *
15006
15007 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77
15008 genfile --length 118 --file jeden
15009 genfile --length 223 --file dwa
15010 genfile --length 517 --file trzy
15011 genfile --length 110 --file cztery
15012
15013 tar cf archive jeden dwa trzy cztery || exit 1
15014
15015 mkdir dir
15016 cd dir
15017
15018 tar xvfT ../archive ../../list --warning=no-timestamp || exit 1
15019
15020 cd ..
15021 )
15022 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15023 at_status=$? at_failed=false
15024 $at_check_filter
15025 at_fn_diff_devnull "$at_stderr" || at_failed=:
15026 echo >>"$at_stdout"; $as_echo "jeden
15027 cztery
15028 " | \
15029   $at_diff - "$at_stdout" || at_failed=:
15030 at_fn_check_status 0 $at_status "$at_srcdir/extrac05.at:38"
15031 $at_failed && at_fn_log_failure
15032 $at_traceon; }
15033
15034
15035
15036
15037   set +x
15038   $at_times_p && times >"$at_times_file"
15039 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15040 read at_status <"$at_status_file"
15041 #AT_STOP_61
15042 #AT_START_62
15043 at_fn_group_banner 62 'extrac06.at:34' \
15044   "mode of extracted directories" "                  " 9
15045 at_xfail=no
15046       test -f $XFAILFILE && at_xfail=yes
15047 (
15048   $as_echo "62. $at_setup_line: testing $at_desc ..."
15049   $at_traceon
15050
15051
15052
15053
15054
15055   { set +x
15056 $as_echo "$at_srcdir/extrac06.at:37:
15057 mkdir v7
15058 (cd v7
15059 TEST_TAR_FORMAT=v7
15060 export TEST_TAR_FORMAT
15061 TAR_OPTIONS=\"-H v7\"
15062 export TAR_OPTIONS
15063 rm -rf *
15064
15065
15066 # Force umask
15067 umask 022
15068
15069 # Make sure user's umask is honored, even if we are superuser
15070 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
15071
15072 # Create a directory
15073 mkdir directory
15074 chmod 777 directory
15075 genfile --stat=mode:777 directory
15076
15077 # Archive it
15078 tar cf arc directory
15079
15080 # Change its permissions ...
15081 chmod 755 directory
15082 genfile --stat=mode:777 directory
15083
15084 # ... and attempt to restore it twice
15085 tar xf arc directory --warning=no-timestamp
15086 genfile --stat=mode:777 directory
15087
15088 tar xf arc directory --warning=no-timestamp
15089 genfile --stat=mode:777 directory
15090
15091 # After both restores, the directory mode should be 755
15092 )"
15093 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
15094 ( $at_check_trace;
15095 mkdir v7
15096 (cd v7
15097 TEST_TAR_FORMAT=v7
15098 export TEST_TAR_FORMAT
15099 TAR_OPTIONS="-H v7"
15100 export TAR_OPTIONS
15101 rm -rf *
15102
15103
15104 # Force umask
15105 umask 022
15106
15107 # Make sure user's umask is honored, even if we are superuser
15108 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
15109
15110 # Create a directory
15111 mkdir directory
15112 chmod 777 directory
15113 genfile --stat=mode:777 directory
15114
15115 # Archive it
15116 tar cf arc directory
15117
15118 # Change its permissions ...
15119 chmod 755 directory
15120 genfile --stat=mode:777 directory
15121
15122 # ... and attempt to restore it twice
15123 tar xf arc directory --warning=no-timestamp
15124 genfile --stat=mode:777 directory
15125
15126 tar xf arc directory --warning=no-timestamp
15127 genfile --stat=mode:777 directory
15128
15129 # After both restores, the directory mode should be 755
15130 )
15131 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15132 at_status=$? at_failed=false
15133 $at_check_filter
15134 at_fn_diff_devnull "$at_stderr" || at_failed=:
15135 echo >>"$at_stdout"; $as_echo "777
15136 755
15137 755
15138 755
15139 " | \
15140   $at_diff - "$at_stdout" || at_failed=:
15141 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
15142 $at_failed && at_fn_log_failure
15143 $at_traceon; }
15144
15145               { set +x
15146 $as_echo "$at_srcdir/extrac06.at:37:
15147 mkdir oldgnu
15148 (cd oldgnu
15149 TEST_TAR_FORMAT=oldgnu
15150 export TEST_TAR_FORMAT
15151 TAR_OPTIONS=\"-H oldgnu\"
15152 export TAR_OPTIONS
15153 rm -rf *
15154
15155
15156 # Force umask
15157 umask 022
15158
15159 # Make sure user's umask is honored, even if we are superuser
15160 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
15161
15162 # Create a directory
15163 mkdir directory
15164 chmod 777 directory
15165 genfile --stat=mode:777 directory
15166
15167 # Archive it
15168 tar cf arc directory
15169
15170 # Change its permissions ...
15171 chmod 755 directory
15172 genfile --stat=mode:777 directory
15173
15174 # ... and attempt to restore it twice
15175 tar xf arc directory --warning=no-timestamp
15176 genfile --stat=mode:777 directory
15177
15178 tar xf arc directory --warning=no-timestamp
15179 genfile --stat=mode:777 directory
15180
15181 # After both restores, the directory mode should be 755
15182 )"
15183 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
15184 ( $at_check_trace;
15185 mkdir oldgnu
15186 (cd oldgnu
15187 TEST_TAR_FORMAT=oldgnu
15188 export TEST_TAR_FORMAT
15189 TAR_OPTIONS="-H oldgnu"
15190 export TAR_OPTIONS
15191 rm -rf *
15192
15193
15194 # Force umask
15195 umask 022
15196
15197 # Make sure user's umask is honored, even if we are superuser
15198 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
15199
15200 # Create a directory
15201 mkdir directory
15202 chmod 777 directory
15203 genfile --stat=mode:777 directory
15204
15205 # Archive it
15206 tar cf arc directory
15207
15208 # Change its permissions ...
15209 chmod 755 directory
15210 genfile --stat=mode:777 directory
15211
15212 # ... and attempt to restore it twice
15213 tar xf arc directory --warning=no-timestamp
15214 genfile --stat=mode:777 directory
15215
15216 tar xf arc directory --warning=no-timestamp
15217 genfile --stat=mode:777 directory
15218
15219 # After both restores, the directory mode should be 755
15220 )
15221 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15222 at_status=$? at_failed=false
15223 $at_check_filter
15224 at_fn_diff_devnull "$at_stderr" || at_failed=:
15225 echo >>"$at_stdout"; $as_echo "777
15226 755
15227 755
15228 755
15229 " | \
15230   $at_diff - "$at_stdout" || at_failed=:
15231 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
15232 $at_failed && at_fn_log_failure
15233 $at_traceon; }
15234
15235               { set +x
15236 $as_echo "$at_srcdir/extrac06.at:37:
15237 mkdir ustar
15238 (cd ustar
15239 TEST_TAR_FORMAT=ustar
15240 export TEST_TAR_FORMAT
15241 TAR_OPTIONS=\"-H ustar\"
15242 export TAR_OPTIONS
15243 rm -rf *
15244
15245
15246 # Force umask
15247 umask 022
15248
15249 # Make sure user's umask is honored, even if we are superuser
15250 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
15251
15252 # Create a directory
15253 mkdir directory
15254 chmod 777 directory
15255 genfile --stat=mode:777 directory
15256
15257 # Archive it
15258 tar cf arc directory
15259
15260 # Change its permissions ...
15261 chmod 755 directory
15262 genfile --stat=mode:777 directory
15263
15264 # ... and attempt to restore it twice
15265 tar xf arc directory --warning=no-timestamp
15266 genfile --stat=mode:777 directory
15267
15268 tar xf arc directory --warning=no-timestamp
15269 genfile --stat=mode:777 directory
15270
15271 # After both restores, the directory mode should be 755
15272 )"
15273 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
15274 ( $at_check_trace;
15275 mkdir ustar
15276 (cd ustar
15277 TEST_TAR_FORMAT=ustar
15278 export TEST_TAR_FORMAT
15279 TAR_OPTIONS="-H ustar"
15280 export TAR_OPTIONS
15281 rm -rf *
15282
15283
15284 # Force umask
15285 umask 022
15286
15287 # Make sure user's umask is honored, even if we are superuser
15288 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
15289
15290 # Create a directory
15291 mkdir directory
15292 chmod 777 directory
15293 genfile --stat=mode:777 directory
15294
15295 # Archive it
15296 tar cf arc directory
15297
15298 # Change its permissions ...
15299 chmod 755 directory
15300 genfile --stat=mode:777 directory
15301
15302 # ... and attempt to restore it twice
15303 tar xf arc directory --warning=no-timestamp
15304 genfile --stat=mode:777 directory
15305
15306 tar xf arc directory --warning=no-timestamp
15307 genfile --stat=mode:777 directory
15308
15309 # After both restores, the directory mode should be 755
15310 )
15311 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15312 at_status=$? at_failed=false
15313 $at_check_filter
15314 at_fn_diff_devnull "$at_stderr" || at_failed=:
15315 echo >>"$at_stdout"; $as_echo "777
15316 755
15317 755
15318 755
15319 " | \
15320   $at_diff - "$at_stdout" || at_failed=:
15321 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
15322 $at_failed && at_fn_log_failure
15323 $at_traceon; }
15324
15325               { set +x
15326 $as_echo "$at_srcdir/extrac06.at:37:
15327 mkdir posix
15328 (cd posix
15329 TEST_TAR_FORMAT=posix
15330 export TEST_TAR_FORMAT
15331 TAR_OPTIONS=\"-H posix\"
15332 export TAR_OPTIONS
15333 rm -rf *
15334
15335
15336 # Force umask
15337 umask 022
15338
15339 # Make sure user's umask is honored, even if we are superuser
15340 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
15341
15342 # Create a directory
15343 mkdir directory
15344 chmod 777 directory
15345 genfile --stat=mode:777 directory
15346
15347 # Archive it
15348 tar cf arc directory
15349
15350 # Change its permissions ...
15351 chmod 755 directory
15352 genfile --stat=mode:777 directory
15353
15354 # ... and attempt to restore it twice
15355 tar xf arc directory --warning=no-timestamp
15356 genfile --stat=mode:777 directory
15357
15358 tar xf arc directory --warning=no-timestamp
15359 genfile --stat=mode:777 directory
15360
15361 # After both restores, the directory mode should be 755
15362 )"
15363 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
15364 ( $at_check_trace;
15365 mkdir posix
15366 (cd posix
15367 TEST_TAR_FORMAT=posix
15368 export TEST_TAR_FORMAT
15369 TAR_OPTIONS="-H posix"
15370 export TAR_OPTIONS
15371 rm -rf *
15372
15373
15374 # Force umask
15375 umask 022
15376
15377 # Make sure user's umask is honored, even if we are superuser
15378 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
15379
15380 # Create a directory
15381 mkdir directory
15382 chmod 777 directory
15383 genfile --stat=mode:777 directory
15384
15385 # Archive it
15386 tar cf arc directory
15387
15388 # Change its permissions ...
15389 chmod 755 directory
15390 genfile --stat=mode:777 directory
15391
15392 # ... and attempt to restore it twice
15393 tar xf arc directory --warning=no-timestamp
15394 genfile --stat=mode:777 directory
15395
15396 tar xf arc directory --warning=no-timestamp
15397 genfile --stat=mode:777 directory
15398
15399 # After both restores, the directory mode should be 755
15400 )
15401 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15402 at_status=$? at_failed=false
15403 $at_check_filter
15404 at_fn_diff_devnull "$at_stderr" || at_failed=:
15405 echo >>"$at_stdout"; $as_echo "777
15406 755
15407 755
15408 755
15409 " | \
15410   $at_diff - "$at_stdout" || at_failed=:
15411 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
15412 $at_failed && at_fn_log_failure
15413 $at_traceon; }
15414
15415               { set +x
15416 $as_echo "$at_srcdir/extrac06.at:37:
15417 mkdir gnu
15418 (cd gnu
15419 TEST_TAR_FORMAT=gnu
15420 export TEST_TAR_FORMAT
15421 TAR_OPTIONS=\"-H gnu\"
15422 export TAR_OPTIONS
15423 rm -rf *
15424
15425
15426 # Force umask
15427 umask 022
15428
15429 # Make sure user's umask is honored, even if we are superuser
15430 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
15431
15432 # Create a directory
15433 mkdir directory
15434 chmod 777 directory
15435 genfile --stat=mode:777 directory
15436
15437 # Archive it
15438 tar cf arc directory
15439
15440 # Change its permissions ...
15441 chmod 755 directory
15442 genfile --stat=mode:777 directory
15443
15444 # ... and attempt to restore it twice
15445 tar xf arc directory --warning=no-timestamp
15446 genfile --stat=mode:777 directory
15447
15448 tar xf arc directory --warning=no-timestamp
15449 genfile --stat=mode:777 directory
15450
15451 # After both restores, the directory mode should be 755
15452 )"
15453 at_fn_check_prepare_notrace 'an embedded newline' "extrac06.at:37"
15454 ( $at_check_trace;
15455 mkdir gnu
15456 (cd gnu
15457 TEST_TAR_FORMAT=gnu
15458 export TEST_TAR_FORMAT
15459 TAR_OPTIONS="-H gnu"
15460 export TAR_OPTIONS
15461 rm -rf *
15462
15463
15464 # Force umask
15465 umask 022
15466
15467 # Make sure user's umask is honored, even if we are superuser
15468 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
15469
15470 # Create a directory
15471 mkdir directory
15472 chmod 777 directory
15473 genfile --stat=mode:777 directory
15474
15475 # Archive it
15476 tar cf arc directory
15477
15478 # Change its permissions ...
15479 chmod 755 directory
15480 genfile --stat=mode:777 directory
15481
15482 # ... and attempt to restore it twice
15483 tar xf arc directory --warning=no-timestamp
15484 genfile --stat=mode:777 directory
15485
15486 tar xf arc directory --warning=no-timestamp
15487 genfile --stat=mode:777 directory
15488
15489 # After both restores, the directory mode should be 755
15490 )
15491 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15492 at_status=$? at_failed=false
15493 $at_check_filter
15494 at_fn_diff_devnull "$at_stderr" || at_failed=:
15495 echo >>"$at_stdout"; $as_echo "777
15496 755
15497 755
15498 755
15499 " | \
15500   $at_diff - "$at_stdout" || at_failed=:
15501 at_fn_check_status 0 $at_status "$at_srcdir/extrac06.at:37"
15502 $at_failed && at_fn_log_failure
15503 $at_traceon; }
15504
15505
15506
15507
15508   set +x
15509   $at_times_p && times >"$at_times_file"
15510 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15511 read at_status <"$at_status_file"
15512 #AT_STOP_62
15513 #AT_START_63
15514 at_fn_group_banner 63 'extrac07.at:27' \
15515   "extracting symlinks to a read-only dir" "         " 9
15516 at_xfail=no
15517       test -f $XFAILFILE && at_xfail=yes
15518 (
15519   $as_echo "63. $at_setup_line: testing $at_desc ..."
15520   $at_traceon
15521
15522
15523
15524
15525
15526   { set +x
15527 $as_echo "$at_srcdir/extrac07.at:30:
15528 mkdir ustar
15529 (cd ustar
15530 TEST_TAR_FORMAT=ustar
15531 export TEST_TAR_FORMAT
15532 TAR_OPTIONS=\"-H ustar\"
15533 export TAR_OPTIONS
15534 rm -rf *
15535
15536
15537 echo \"test\" > \$\$
15538 chmod 0 \$\$
15539 cat \$\$ > /dev/null 2>&1
15540 result=\$?
15541 rm -f \$\$
15542 test \$result -eq 0 && exit 77
15543
15544
15545 echo Prepare the directory
15546 mkdir dir
15547 genfile -f foo
15548 cd dir
15549 ln -s ../foo .
15550 cd ..
15551 chmod a-w dir
15552
15553 echo Create the archive
15554 tar cf archive dir || exit 1
15555
15556 chmod +w dir
15557
15558 echo Extract
15559 mkdir out
15560 tar -C out -xvf archive
15561 )"
15562 at_fn_check_prepare_notrace 'an embedded newline' "extrac07.at:30"
15563 ( $at_check_trace;
15564 mkdir ustar
15565 (cd ustar
15566 TEST_TAR_FORMAT=ustar
15567 export TEST_TAR_FORMAT
15568 TAR_OPTIONS="-H ustar"
15569 export TAR_OPTIONS
15570 rm -rf *
15571
15572
15573 echo "test" > $$
15574 chmod 0 $$
15575 cat $$ > /dev/null 2>&1
15576 result=$?
15577 rm -f $$
15578 test $result -eq 0 && exit 77
15579
15580
15581 echo Prepare the directory
15582 mkdir dir
15583 genfile -f foo
15584 cd dir
15585 ln -s ../foo .
15586 cd ..
15587 chmod a-w dir
15588
15589 echo Create the archive
15590 tar cf archive dir || exit 1
15591
15592 chmod +w dir
15593
15594 echo Extract
15595 mkdir out
15596 tar -C out -xvf archive
15597 )
15598 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15599 at_status=$? at_failed=false
15600 $at_check_filter
15601 at_fn_diff_devnull "$at_stderr" || at_failed=:
15602 echo >>"$at_stdout"; $as_echo "Prepare the directory
15603 Create the archive
15604 Extract
15605 dir/
15606 dir/foo
15607 " | \
15608   $at_diff - "$at_stdout" || at_failed=:
15609 at_fn_check_status 0 $at_status "$at_srcdir/extrac07.at:30"
15610 $at_failed && at_fn_log_failure
15611 $at_traceon; }
15612
15613
15614  # Testing one format is enough
15615
15616   set +x
15617   $at_times_p && times >"$at_times_file"
15618 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15619 read at_status <"$at_status_file"
15620 #AT_STOP_63
15621 #AT_START_64
15622 at_fn_group_banner 64 'extrac08.at:33' \
15623   "restoring mode on existing directory" "           " 9
15624 at_xfail=no
15625       test -f $XFAILFILE && at_xfail=yes
15626 (
15627   $as_echo "64. $at_setup_line: testing $at_desc ..."
15628   $at_traceon
15629
15630
15631
15632
15633
15634   { set +x
15635 $as_echo "$at_srcdir/extrac08.at:36:
15636 mkdir v7
15637 (cd v7
15638 TEST_TAR_FORMAT=v7
15639 export TEST_TAR_FORMAT
15640 TAR_OPTIONS=\"-H v7\"
15641 export TAR_OPTIONS
15642 rm -rf *
15643
15644 umask 000
15645 mkdir dir
15646 chmod 755 dir
15647 echo bla > dir/file
15648 tar cf test.tar dir
15649 chmod 700 dir
15650 tar xfv test.tar --warning=no-timestamp
15651 genfile --stat=mode.777 dir
15652 )"
15653 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15654 ( $at_check_trace;
15655 mkdir v7
15656 (cd v7
15657 TEST_TAR_FORMAT=v7
15658 export TEST_TAR_FORMAT
15659 TAR_OPTIONS="-H v7"
15660 export TAR_OPTIONS
15661 rm -rf *
15662
15663 umask 000
15664 mkdir dir
15665 chmod 755 dir
15666 echo bla > dir/file
15667 tar cf test.tar dir
15668 chmod 700 dir
15669 tar xfv test.tar --warning=no-timestamp
15670 genfile --stat=mode.777 dir
15671 )
15672 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15673 at_status=$? at_failed=false
15674 $at_check_filter
15675 at_fn_diff_devnull "$at_stderr" || at_failed=:
15676 echo >>"$at_stdout"; $as_echo "dir/
15677 dir/file
15678 755
15679 " | \
15680   $at_diff - "$at_stdout" || at_failed=:
15681 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15682 $at_failed && at_fn_log_failure
15683 $at_traceon; }
15684
15685               { set +x
15686 $as_echo "$at_srcdir/extrac08.at:36:
15687 mkdir oldgnu
15688 (cd oldgnu
15689 TEST_TAR_FORMAT=oldgnu
15690 export TEST_TAR_FORMAT
15691 TAR_OPTIONS=\"-H oldgnu\"
15692 export TAR_OPTIONS
15693 rm -rf *
15694
15695 umask 000
15696 mkdir dir
15697 chmod 755 dir
15698 echo bla > dir/file
15699 tar cf test.tar dir
15700 chmod 700 dir
15701 tar xfv test.tar --warning=no-timestamp
15702 genfile --stat=mode.777 dir
15703 )"
15704 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15705 ( $at_check_trace;
15706 mkdir oldgnu
15707 (cd oldgnu
15708 TEST_TAR_FORMAT=oldgnu
15709 export TEST_TAR_FORMAT
15710 TAR_OPTIONS="-H oldgnu"
15711 export TAR_OPTIONS
15712 rm -rf *
15713
15714 umask 000
15715 mkdir dir
15716 chmod 755 dir
15717 echo bla > dir/file
15718 tar cf test.tar dir
15719 chmod 700 dir
15720 tar xfv test.tar --warning=no-timestamp
15721 genfile --stat=mode.777 dir
15722 )
15723 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15724 at_status=$? at_failed=false
15725 $at_check_filter
15726 at_fn_diff_devnull "$at_stderr" || at_failed=:
15727 echo >>"$at_stdout"; $as_echo "dir/
15728 dir/file
15729 755
15730 " | \
15731   $at_diff - "$at_stdout" || at_failed=:
15732 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15733 $at_failed && at_fn_log_failure
15734 $at_traceon; }
15735
15736               { set +x
15737 $as_echo "$at_srcdir/extrac08.at:36:
15738 mkdir ustar
15739 (cd ustar
15740 TEST_TAR_FORMAT=ustar
15741 export TEST_TAR_FORMAT
15742 TAR_OPTIONS=\"-H ustar\"
15743 export TAR_OPTIONS
15744 rm -rf *
15745
15746 umask 000
15747 mkdir dir
15748 chmod 755 dir
15749 echo bla > dir/file
15750 tar cf test.tar dir
15751 chmod 700 dir
15752 tar xfv test.tar --warning=no-timestamp
15753 genfile --stat=mode.777 dir
15754 )"
15755 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15756 ( $at_check_trace;
15757 mkdir ustar
15758 (cd ustar
15759 TEST_TAR_FORMAT=ustar
15760 export TEST_TAR_FORMAT
15761 TAR_OPTIONS="-H ustar"
15762 export TAR_OPTIONS
15763 rm -rf *
15764
15765 umask 000
15766 mkdir dir
15767 chmod 755 dir
15768 echo bla > dir/file
15769 tar cf test.tar dir
15770 chmod 700 dir
15771 tar xfv test.tar --warning=no-timestamp
15772 genfile --stat=mode.777 dir
15773 )
15774 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15775 at_status=$? at_failed=false
15776 $at_check_filter
15777 at_fn_diff_devnull "$at_stderr" || at_failed=:
15778 echo >>"$at_stdout"; $as_echo "dir/
15779 dir/file
15780 755
15781 " | \
15782   $at_diff - "$at_stdout" || at_failed=:
15783 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15784 $at_failed && at_fn_log_failure
15785 $at_traceon; }
15786
15787               { set +x
15788 $as_echo "$at_srcdir/extrac08.at:36:
15789 mkdir posix
15790 (cd posix
15791 TEST_TAR_FORMAT=posix
15792 export TEST_TAR_FORMAT
15793 TAR_OPTIONS=\"-H posix\"
15794 export TAR_OPTIONS
15795 rm -rf *
15796
15797 umask 000
15798 mkdir dir
15799 chmod 755 dir
15800 echo bla > dir/file
15801 tar cf test.tar dir
15802 chmod 700 dir
15803 tar xfv test.tar --warning=no-timestamp
15804 genfile --stat=mode.777 dir
15805 )"
15806 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15807 ( $at_check_trace;
15808 mkdir posix
15809 (cd posix
15810 TEST_TAR_FORMAT=posix
15811 export TEST_TAR_FORMAT
15812 TAR_OPTIONS="-H posix"
15813 export TAR_OPTIONS
15814 rm -rf *
15815
15816 umask 000
15817 mkdir dir
15818 chmod 755 dir
15819 echo bla > dir/file
15820 tar cf test.tar dir
15821 chmod 700 dir
15822 tar xfv test.tar --warning=no-timestamp
15823 genfile --stat=mode.777 dir
15824 )
15825 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15826 at_status=$? at_failed=false
15827 $at_check_filter
15828 at_fn_diff_devnull "$at_stderr" || at_failed=:
15829 echo >>"$at_stdout"; $as_echo "dir/
15830 dir/file
15831 755
15832 " | \
15833   $at_diff - "$at_stdout" || at_failed=:
15834 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15835 $at_failed && at_fn_log_failure
15836 $at_traceon; }
15837
15838               { set +x
15839 $as_echo "$at_srcdir/extrac08.at:36:
15840 mkdir gnu
15841 (cd gnu
15842 TEST_TAR_FORMAT=gnu
15843 export TEST_TAR_FORMAT
15844 TAR_OPTIONS=\"-H gnu\"
15845 export TAR_OPTIONS
15846 rm -rf *
15847
15848 umask 000
15849 mkdir dir
15850 chmod 755 dir
15851 echo bla > dir/file
15852 tar cf test.tar dir
15853 chmod 700 dir
15854 tar xfv test.tar --warning=no-timestamp
15855 genfile --stat=mode.777 dir
15856 )"
15857 at_fn_check_prepare_notrace 'an embedded newline' "extrac08.at:36"
15858 ( $at_check_trace;
15859 mkdir gnu
15860 (cd gnu
15861 TEST_TAR_FORMAT=gnu
15862 export TEST_TAR_FORMAT
15863 TAR_OPTIONS="-H gnu"
15864 export TAR_OPTIONS
15865 rm -rf *
15866
15867 umask 000
15868 mkdir dir
15869 chmod 755 dir
15870 echo bla > dir/file
15871 tar cf test.tar dir
15872 chmod 700 dir
15873 tar xfv test.tar --warning=no-timestamp
15874 genfile --stat=mode.777 dir
15875 )
15876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15877 at_status=$? at_failed=false
15878 $at_check_filter
15879 at_fn_diff_devnull "$at_stderr" || at_failed=:
15880 echo >>"$at_stdout"; $as_echo "dir/
15881 dir/file
15882 755
15883 " | \
15884   $at_diff - "$at_stdout" || at_failed=:
15885 at_fn_check_status 0 $at_status "$at_srcdir/extrac08.at:36"
15886 $at_failed && at_fn_log_failure
15887 $at_traceon; }
15888
15889
15890
15891
15892   set +x
15893   $at_times_p && times >"$at_times_file"
15894 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15895 read at_status <"$at_status_file"
15896 #AT_STOP_64
15897 #AT_START_65
15898 at_fn_group_banner 65 'extrac09.at:34' \
15899   "extracting even when . and .. are unreadable" "   " 9
15900 at_xfail=no
15901       test -f $XFAILFILE && at_xfail=yes
15902 (
15903   $as_echo "65. $at_setup_line: testing $at_desc ..."
15904   $at_traceon
15905
15906
15907
15908
15909
15910   { set +x
15911 $as_echo "$at_srcdir/extrac09.at:37:
15912 mkdir gnu
15913 (cd gnu
15914 TEST_TAR_FORMAT=gnu
15915 export TEST_TAR_FORMAT
15916 TAR_OPTIONS=\"-H gnu\"
15917 export TAR_OPTIONS
15918 rm -rf *
15919
15920
15921 echo \"test\" > \$\$
15922 chmod 0 \$\$
15923 cat \$\$ > /dev/null 2>&1
15924 result=\$?
15925 rm -f \$\$
15926 test \$result -eq 0 && exit 77
15927
15928
15929 mkdir dir
15930 mkdir dir/sub
15931 mkdir dir/sub/extract
15932 genfile --file dir/sub/f
15933 cd dir/sub
15934
15935 tar -cf archive.tar f
15936
15937 chmod a-r . ..
15938 tar -xvf archive.tar -C extract f
15939 status=\$?
15940 chmod a+r . ..
15941 cmp f extract/f || status=\$?
15942 exit \$status
15943 )"
15944 at_fn_check_prepare_notrace 'an embedded newline' "extrac09.at:37"
15945 ( $at_check_trace;
15946 mkdir gnu
15947 (cd gnu
15948 TEST_TAR_FORMAT=gnu
15949 export TEST_TAR_FORMAT
15950 TAR_OPTIONS="-H gnu"
15951 export TAR_OPTIONS
15952 rm -rf *
15953
15954
15955 echo "test" > $$
15956 chmod 0 $$
15957 cat $$ > /dev/null 2>&1
15958 result=$?
15959 rm -f $$
15960 test $result -eq 0 && exit 77
15961
15962
15963 mkdir dir
15964 mkdir dir/sub
15965 mkdir dir/sub/extract
15966 genfile --file dir/sub/f
15967 cd dir/sub
15968
15969 tar -cf archive.tar f
15970
15971 chmod a-r . ..
15972 tar -xvf archive.tar -C extract f
15973 status=$?
15974 chmod a+r . ..
15975 cmp f extract/f || status=$?
15976 exit $status
15977 )
15978 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
15979 at_status=$? at_failed=false
15980 $at_check_filter
15981 at_fn_diff_devnull "$at_stderr" || at_failed=:
15982 echo >>"$at_stdout"; $as_echo "f
15983 " | \
15984   $at_diff - "$at_stdout" || at_failed=:
15985 at_fn_check_status 0 $at_status "$at_srcdir/extrac09.at:37"
15986 $at_failed && at_fn_log_failure
15987 $at_traceon; }
15988
15989
15990
15991
15992   set +x
15993   $at_times_p && times >"$at_times_file"
15994 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
15995 read at_status <"$at_status_file"
15996 #AT_STOP_65
15997 #AT_START_66
15998 at_fn_group_banner 66 'extrac10.at:29' \
15999   "-C and delayed setting of metadata" "             " 9
16000 at_xfail=no
16001       test -f $XFAILFILE && at_xfail=yes
16002 (
16003   $as_echo "66. $at_setup_line: testing $at_desc ..."
16004   $at_traceon
16005
16006
16007
16008
16009
16010   { set +x
16011 $as_echo "$at_srcdir/extrac10.at:32:
16012 mkdir gnu
16013 (cd gnu
16014 TEST_TAR_FORMAT=gnu
16015 export TEST_TAR_FORMAT
16016 TAR_OPTIONS=\"-H gnu\"
16017 export TAR_OPTIONS
16018 rm -rf *
16019
16020 mkdir d x x/y
16021 echo foo >d/d1
16022 echo bar >e
16023
16024 tar -cf archive.tar d e &&
16025 tar -xf archive.tar -C x d -C y e &&
16026 diff -r d x/d &&
16027 diff e x/y/e
16028 )"
16029 at_fn_check_prepare_notrace 'an embedded newline' "extrac10.at:32"
16030 ( $at_check_trace;
16031 mkdir gnu
16032 (cd gnu
16033 TEST_TAR_FORMAT=gnu
16034 export TEST_TAR_FORMAT
16035 TAR_OPTIONS="-H gnu"
16036 export TAR_OPTIONS
16037 rm -rf *
16038
16039 mkdir d x x/y
16040 echo foo >d/d1
16041 echo bar >e
16042
16043 tar -cf archive.tar d e &&
16044 tar -xf archive.tar -C x d -C y e &&
16045 diff -r d x/d &&
16046 diff e x/y/e
16047 )
16048 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16049 at_status=$? at_failed=false
16050 $at_check_filter
16051 at_fn_diff_devnull "$at_stderr" || at_failed=:
16052 at_fn_diff_devnull "$at_stdout" || at_failed=:
16053 at_fn_check_status 0 $at_status "$at_srcdir/extrac10.at:32"
16054 $at_failed && at_fn_log_failure
16055 $at_traceon; }
16056
16057
16058
16059
16060   set +x
16061   $at_times_p && times >"$at_times_file"
16062 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16063 read at_status <"$at_status_file"
16064 #AT_STOP_66
16065 #AT_START_67
16066 at_fn_group_banner 67 'extrac11.at:25' \
16067   "scarce file descriptors" "                        " 9
16068 at_xfail=no
16069       test -f $XFAILFILE && at_xfail=yes
16070 (
16071   $as_echo "67. $at_setup_line: testing $at_desc ..."
16072   $at_traceon
16073
16074
16075
16076
16077
16078   { set +x
16079 $as_echo "$at_srcdir/extrac11.at:28:
16080 mkdir gnu
16081 (cd gnu
16082 TEST_TAR_FORMAT=gnu
16083 export TEST_TAR_FORMAT
16084 TAR_OPTIONS=\"-H gnu\"
16085 export TAR_OPTIONS
16086 rm -rf *
16087
16088 exec </dev/null
16089 dirs='a
16090       a/b
16091       a/b/c
16092       a/b/c/d
16093       a/b/c/d/e
16094       a/b/c/d/e/f
16095       a/b/c/d/e/f/g
16096       a/b/c/d/e/f/g/h
16097       a/b/c/d/e/f/g/h/i
16098       a/b/c/d/e/f/g/h/i/j
16099       a/b/c/d/e/f/g/h/i/j/k
16100 '
16101 files=
16102 mkdir \$dirs dest1 dest2 dest3 || exit
16103 for dir in \$dirs; do
16104   for file in X Y Z; do
16105     echo \$file >\$dir/\$file || exit
16106     files=\"\$files \$file\"
16107   done
16108 done
16109
16110 # Check that \"ulimit\" itself works.  Close file descriptors before
16111 # invoking ulimit, to work around a bug (or a \"feature\") in some shells,
16112 # where they squirrel away dups of file descriptors into FD 10 and up
16113 # before closing the originals.
16114 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
16115    ulimit -n 100 &&
16116    tar -cf archive1.tar a &&
16117    tar -xf archive1.tar -C dest1 a
16118   ) &&
16119   diff -r a dest1/a
16120 ) >/dev/null 2>&1 ||
16121    exit 77
16122
16123 # Another test that \"ulimit\" itself works:
16124 # tar should fail when completely starved of file descriptors.
16125 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
16126    ulimit -n 4 &&
16127    tar -cf archive2.tar a &&
16128    tar -xf archive2.tar -C dest2 a
16129   ) &&
16130   diff -r a dest2/a
16131 ) >/dev/null 2>&1 &&
16132    exit 77
16133
16134 # Tar should work when there are few, but enough, file descriptors.
16135 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
16136    ulimit -n 10 &&
16137    tar -cf archive3.tar a &&
16138    tar -xf archive3.tar -C dest3 a
16139   ) &&
16140   diff -r a dest3/a >/dev/null 2>&1
16141 ) || { diff -r a dest3/a; exit 1; }
16142 )"
16143 at_fn_check_prepare_notrace 'an embedded newline' "extrac11.at:28"
16144 ( $at_check_trace;
16145 mkdir gnu
16146 (cd gnu
16147 TEST_TAR_FORMAT=gnu
16148 export TEST_TAR_FORMAT
16149 TAR_OPTIONS="-H gnu"
16150 export TAR_OPTIONS
16151 rm -rf *
16152
16153 exec </dev/null
16154 dirs='a
16155       a/b
16156       a/b/c
16157       a/b/c/d
16158       a/b/c/d/e
16159       a/b/c/d/e/f
16160       a/b/c/d/e/f/g
16161       a/b/c/d/e/f/g/h
16162       a/b/c/d/e/f/g/h/i
16163       a/b/c/d/e/f/g/h/i/j
16164       a/b/c/d/e/f/g/h/i/j/k
16165 '
16166 files=
16167 mkdir $dirs dest1 dest2 dest3 || exit
16168 for dir in $dirs; do
16169   for file in X Y Z; do
16170     echo $file >$dir/$file || exit
16171     files="$files $file"
16172   done
16173 done
16174
16175 # Check that "ulimit" itself works.  Close file descriptors before
16176 # invoking ulimit, to work around a bug (or a "feature") in some shells,
16177 # where they squirrel away dups of file descriptors into FD 10 and up
16178 # before closing the originals.
16179 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
16180    ulimit -n 100 &&
16181    tar -cf archive1.tar a &&
16182    tar -xf archive1.tar -C dest1 a
16183   ) &&
16184   diff -r a dest1/a
16185 ) >/dev/null 2>&1 ||
16186    exit 77
16187
16188 # Another test that "ulimit" itself works:
16189 # tar should fail when completely starved of file descriptors.
16190 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
16191    ulimit -n 4 &&
16192    tar -cf archive2.tar a &&
16193    tar -xf archive2.tar -C dest2 a
16194   ) &&
16195   diff -r a dest2/a
16196 ) >/dev/null 2>&1 &&
16197    exit 77
16198
16199 # Tar should work when there are few, but enough, file descriptors.
16200 ( (exec 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- &&
16201    ulimit -n 10 &&
16202    tar -cf archive3.tar a &&
16203    tar -xf archive3.tar -C dest3 a
16204   ) &&
16205   diff -r a dest3/a >/dev/null 2>&1
16206 ) || { diff -r a dest3/a; exit 1; }
16207 )
16208 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16209 at_status=$? at_failed=false
16210 $at_check_filter
16211 at_fn_diff_devnull "$at_stderr" || at_failed=:
16212 at_fn_diff_devnull "$at_stdout" || at_failed=:
16213 at_fn_check_status 0 $at_status "$at_srcdir/extrac11.at:28"
16214 $at_failed && at_fn_log_failure
16215 $at_traceon; }
16216
16217
16218
16219
16220   set +x
16221   $at_times_p && times >"$at_times_file"
16222 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16223 read at_status <"$at_status_file"
16224 #AT_STOP_67
16225 #AT_START_68
16226 at_fn_group_banner 68 'extrac12.at:25' \
16227   "extract dot permissions" "                        " 9
16228 at_xfail=no
16229       test -f $XFAILFILE && at_xfail=yes
16230 (
16231   $as_echo "68. $at_setup_line: testing $at_desc ..."
16232   $at_traceon
16233
16234
16235
16236
16237
16238   { set +x
16239 $as_echo "$at_srcdir/extrac12.at:28:
16240 mkdir gnu
16241 (cd gnu
16242 TEST_TAR_FORMAT=gnu
16243 export TEST_TAR_FORMAT
16244 TAR_OPTIONS=\"-H gnu\"
16245 export TAR_OPTIONS
16246 rm -rf *
16247
16248 mkdir src dst
16249 echo file1 >src/file1
16250 echo file2 >src/file2
16251 chmod a-w src
16252
16253 tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
16254 tar -xf archive.tar -C dst &&
16255 cmp src/file1 dst/file1 &&
16256 cmp src/file2 dst/file2
16257 )"
16258 at_fn_check_prepare_notrace 'an embedded newline' "extrac12.at:28"
16259 ( $at_check_trace;
16260 mkdir gnu
16261 (cd gnu
16262 TEST_TAR_FORMAT=gnu
16263 export TEST_TAR_FORMAT
16264 TAR_OPTIONS="-H gnu"
16265 export TAR_OPTIONS
16266 rm -rf *
16267
16268 mkdir src dst
16269 echo file1 >src/file1
16270 echo file2 >src/file2
16271 chmod a-w src
16272
16273 tar --no-recursion -cf archive.tar -C src . ./file1 file2 &&
16274 tar -xf archive.tar -C dst &&
16275 cmp src/file1 dst/file1 &&
16276 cmp src/file2 dst/file2
16277 )
16278 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16279 at_status=$? at_failed=false
16280 $at_check_filter
16281 at_fn_diff_devnull "$at_stderr" || at_failed=:
16282 at_fn_diff_devnull "$at_stdout" || at_failed=:
16283 at_fn_check_status 0 $at_status "$at_srcdir/extrac12.at:28"
16284 $at_failed && at_fn_log_failure
16285 $at_traceon; }
16286
16287
16288
16289
16290   set +x
16291   $at_times_p && times >"$at_times_file"
16292 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16293 read at_status <"$at_status_file"
16294 #AT_STOP_68
16295 #AT_START_69
16296 at_fn_group_banner 69 'extrac13.at:26' \
16297   "extract over symlinks" "                          " 9
16298 at_xfail=no
16299       test -f $XFAILFILE && at_xfail=yes
16300 (
16301   $as_echo "69. $at_setup_line: testing $at_desc ..."
16302   $at_traceon
16303
16304
16305
16306
16307
16308   { set +x
16309 $as_echo "$at_srcdir/extrac13.at:29:
16310 mkdir gnu
16311 (cd gnu
16312 TEST_TAR_FORMAT=gnu
16313 export TEST_TAR_FORMAT
16314 TAR_OPTIONS=\"-H gnu\"
16315 export TAR_OPTIONS
16316 rm -rf *
16317
16318 mkdir src dst1 dst2 dst3
16319 echo file1 >src/file1
16320 ln -s target1 dst1/file1
16321 echo target1 >dst1/target1
16322 echo target1 >target1
16323
16324 tar -cf archive.tar -C src . &&
16325 tar -xf archive.tar -C dst1 --warning=no-timestamp &&
16326 diff src/file1 dst1/file1 &&
16327 diff target1 dst1/target1
16328
16329 ln -s target1 dst2/file1
16330 echo target1 >dst2/target1
16331 tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
16332 diff src/file1 dst2/file1 &&
16333 diff target1 dst2/target1
16334
16335 ln -s target1 dst3/file1
16336 echo target1 >dst3/target1
16337 tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
16338 diff src/file1 dst3/file1 &&
16339 diff src/file1 dst3/target1
16340 )"
16341 at_fn_check_prepare_notrace 'an embedded newline' "extrac13.at:29"
16342 ( $at_check_trace;
16343 mkdir gnu
16344 (cd gnu
16345 TEST_TAR_FORMAT=gnu
16346 export TEST_TAR_FORMAT
16347 TAR_OPTIONS="-H gnu"
16348 export TAR_OPTIONS
16349 rm -rf *
16350
16351 mkdir src dst1 dst2 dst3
16352 echo file1 >src/file1
16353 ln -s target1 dst1/file1
16354 echo target1 >dst1/target1
16355 echo target1 >target1
16356
16357 tar -cf archive.tar -C src . &&
16358 tar -xf archive.tar -C dst1 --warning=no-timestamp &&
16359 diff src/file1 dst1/file1 &&
16360 diff target1 dst1/target1
16361
16362 ln -s target1 dst2/file1
16363 echo target1 >dst2/target1
16364 tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
16365 diff src/file1 dst2/file1 &&
16366 diff target1 dst2/target1
16367
16368 ln -s target1 dst3/file1
16369 echo target1 >dst3/target1
16370 tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
16371 diff src/file1 dst3/file1 &&
16372 diff src/file1 dst3/target1
16373 )
16374 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16375 at_status=$? at_failed=false
16376 $at_check_filter
16377 at_fn_diff_devnull "$at_stderr" || at_failed=:
16378 at_fn_diff_devnull "$at_stdout" || at_failed=:
16379 at_fn_check_status 0 $at_status "$at_srcdir/extrac13.at:29"
16380 $at_failed && at_fn_log_failure
16381 $at_traceon; }
16382
16383
16384
16385
16386   set +x
16387   $at_times_p && times >"$at_times_file"
16388 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16389 read at_status <"$at_status_file"
16390 #AT_STOP_69
16391 #AT_START_70
16392 at_fn_group_banner 70 'extrac14.at:25' \
16393   "extract -C symlink" "                             " 9
16394 at_xfail=no
16395       test -f $XFAILFILE && at_xfail=yes
16396 (
16397   $as_echo "70. $at_setup_line: testing $at_desc ..."
16398   $at_traceon
16399
16400
16401
16402
16403
16404   { set +x
16405 $as_echo "$at_srcdir/extrac14.at:28:
16406 mkdir gnu
16407 (cd gnu
16408 TEST_TAR_FORMAT=gnu
16409 export TEST_TAR_FORMAT
16410 TAR_OPTIONS=\"-H gnu\"
16411 export TAR_OPTIONS
16412 rm -rf *
16413
16414 mkdir dest
16415 ln -s dest symlink
16416 echo foo >foo
16417 tar -cf archive.tar foo &&
16418 tar -xf archive.tar -C symlink --warning=no-timestamp &&
16419 cmp foo dest/foo
16420 )"
16421 at_fn_check_prepare_notrace 'an embedded newline' "extrac14.at:28"
16422 ( $at_check_trace;
16423 mkdir gnu
16424 (cd gnu
16425 TEST_TAR_FORMAT=gnu
16426 export TEST_TAR_FORMAT
16427 TAR_OPTIONS="-H gnu"
16428 export TAR_OPTIONS
16429 rm -rf *
16430
16431 mkdir dest
16432 ln -s dest symlink
16433 echo foo >foo
16434 tar -cf archive.tar foo &&
16435 tar -xf archive.tar -C symlink --warning=no-timestamp &&
16436 cmp foo dest/foo
16437 )
16438 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16439 at_status=$? at_failed=false
16440 $at_check_filter
16441 at_fn_diff_devnull "$at_stderr" || at_failed=:
16442 at_fn_diff_devnull "$at_stdout" || at_failed=:
16443 at_fn_check_status 0 $at_status "$at_srcdir/extrac14.at:28"
16444 $at_failed && at_fn_log_failure
16445 $at_traceon; }
16446
16447
16448
16449
16450   set +x
16451   $at_times_p && times >"$at_times_file"
16452 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16453 read at_status <"$at_status_file"
16454 #AT_STOP_70
16455 #AT_START_71
16456 at_fn_group_banner 71 'extrac15.at:25' \
16457   "extract parent mkdir failure" "                   " 9
16458 at_xfail=no
16459       test -f $XFAILFILE && at_xfail=yes
16460 (
16461   $as_echo "71. $at_setup_line: testing $at_desc ..."
16462   $at_traceon
16463
16464
16465
16466
16467
16468   { set +x
16469 $as_echo "$at_srcdir/extrac15.at:28:
16470 mkdir gnu
16471 (cd gnu
16472 TEST_TAR_FORMAT=gnu
16473 export TEST_TAR_FORMAT
16474 TAR_OPTIONS=\"-H gnu\"
16475 export TAR_OPTIONS
16476 rm -rf *
16477
16478
16479 echo \"test\" > \$\$
16480 chmod 0 \$\$
16481 cat \$\$ > /dev/null 2>&1
16482 result=\$?
16483 rm -f \$\$
16484 test \$result -eq 0 && exit 77
16485
16486
16487 mkdir src src/a src/a/b dest dest/a
16488 touch src/a/b/c
16489 chmod a-w dest/a
16490
16491 tar -cf archive.tar -C src a/b/c &&
16492 if tar -xf archive.tar -C dest a/b/c
16493 then (exit 1)
16494 else (exit 0)
16495 fi
16496 )"
16497 at_fn_check_prepare_notrace 'an embedded newline' "extrac15.at:28"
16498 ( $at_check_trace;
16499 mkdir gnu
16500 (cd gnu
16501 TEST_TAR_FORMAT=gnu
16502 export TEST_TAR_FORMAT
16503 TAR_OPTIONS="-H gnu"
16504 export TAR_OPTIONS
16505 rm -rf *
16506
16507
16508 echo "test" > $$
16509 chmod 0 $$
16510 cat $$ > /dev/null 2>&1
16511 result=$?
16512 rm -f $$
16513 test $result -eq 0 && exit 77
16514
16515
16516 mkdir src src/a src/a/b dest dest/a
16517 touch src/a/b/c
16518 chmod a-w dest/a
16519
16520 tar -cf archive.tar -C src a/b/c &&
16521 if tar -xf archive.tar -C dest a/b/c
16522 then (exit 1)
16523 else (exit 0)
16524 fi
16525 )
16526 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16527 at_status=$? at_failed=false
16528 $at_check_filter
16529 echo >>"$at_stderr"; $as_echo "tar: a/b: Cannot mkdir: Permission denied
16530 tar: a/b/c: Cannot open: No such file or directory
16531 tar: Exiting with failure status due to previous errors
16532 " | \
16533   $at_diff - "$at_stderr" || at_failed=:
16534 at_fn_diff_devnull "$at_stdout" || at_failed=:
16535 at_fn_check_status 0 $at_status "$at_srcdir/extrac15.at:28"
16536 $at_failed && at_fn_log_failure
16537 $at_traceon; }
16538
16539
16540
16541
16542   set +x
16543   $at_times_p && times >"$at_times_file"
16544 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16545 read at_status <"$at_status_file"
16546 #AT_STOP_71
16547 #AT_START_72
16548 at_fn_group_banner 72 'extrac16.at:26' \
16549   "extract empty directory with -C" "                " 9
16550 at_xfail=no
16551       test -f $XFAILFILE && at_xfail=yes
16552 (
16553   $as_echo "72. $at_setup_line: testing $at_desc ..."
16554   $at_traceon
16555
16556
16557
16558
16559
16560   { set +x
16561 $as_echo "$at_srcdir/extrac16.at:29:
16562 mkdir gnu
16563 (cd gnu
16564 TEST_TAR_FORMAT=gnu
16565 export TEST_TAR_FORMAT
16566 TAR_OPTIONS=\"-H gnu\"
16567 export TAR_OPTIONS
16568 rm -rf *
16569
16570 mkdir src src/a src/a/b dest
16571 touch src/a/c
16572
16573 tar -cf archive.tar -C src a &&
16574 tar -xf archive.tar -C dest
16575 )"
16576 at_fn_check_prepare_notrace 'an embedded newline' "extrac16.at:29"
16577 ( $at_check_trace;
16578 mkdir gnu
16579 (cd gnu
16580 TEST_TAR_FORMAT=gnu
16581 export TEST_TAR_FORMAT
16582 TAR_OPTIONS="-H gnu"
16583 export TAR_OPTIONS
16584 rm -rf *
16585
16586 mkdir src src/a src/a/b dest
16587 touch src/a/c
16588
16589 tar -cf archive.tar -C src a &&
16590 tar -xf archive.tar -C dest
16591 )
16592 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16593 at_status=$? at_failed=false
16594 $at_check_filter
16595 at_fn_diff_devnull "$at_stderr" || at_failed=:
16596 at_fn_diff_devnull "$at_stdout" || at_failed=:
16597 at_fn_check_status 0 $at_status "$at_srcdir/extrac16.at:29"
16598 $at_failed && at_fn_log_failure
16599 $at_traceon; }
16600
16601
16602
16603
16604   set +x
16605   $at_times_p && times >"$at_times_file"
16606 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16607 read at_status <"$at_status_file"
16608 #AT_STOP_72
16609 #AT_START_73
16610 at_fn_group_banner 73 'extrac17.at:21' \
16611   "name matching/transformation ordering" "          " 9
16612 at_xfail=no
16613       test -f $XFAILFILE && at_xfail=yes
16614 (
16615   $as_echo "73. $at_setup_line: testing $at_desc ..."
16616   $at_traceon
16617
16618
16619
16620 # Description: Tar 1.24 changed the ordering of name matching and
16621 # name transformation so that the former saw already transformed
16622 # file names (see commit 9c194c99 and exclude06.at).  This reverted
16623 # ordering made it impossible to match file names in certain cases.
16624 # In particular, the testcase below would not extract anything.
16625 #
16626 # Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
16627 # References: <x6r5fd9jye@gzp>, <20101026175126.29028@Pirx.gnu.org.ua>
16628 #             http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
16629
16630
16631
16632   { set +x
16633 $as_echo "$at_srcdir/extrac17.at:34:
16634 mkdir v7
16635 (cd v7
16636 TEST_TAR_FORMAT=v7
16637 export TEST_TAR_FORMAT
16638 TAR_OPTIONS=\"-H v7\"
16639 export TAR_OPTIONS
16640 rm -rf *
16641
16642 mkdir dir dir/subdir1 dir/subdir2 out
16643 genfile --file dir/subdir1/file1
16644 genfile --file dir/subdir2/file2
16645
16646 tar cf dir.tar dir
16647
16648 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16649   dir/subdir1/
16650 )"
16651 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16652 ( $at_check_trace;
16653 mkdir v7
16654 (cd v7
16655 TEST_TAR_FORMAT=v7
16656 export TEST_TAR_FORMAT
16657 TAR_OPTIONS="-H v7"
16658 export TAR_OPTIONS
16659 rm -rf *
16660
16661 mkdir dir dir/subdir1 dir/subdir2 out
16662 genfile --file dir/subdir1/file1
16663 genfile --file dir/subdir2/file2
16664
16665 tar cf dir.tar dir
16666
16667 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16668   dir/subdir1/
16669 )
16670 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16671 at_status=$? at_failed=false
16672 $at_check_filter
16673 at_fn_diff_devnull "$at_stderr" || at_failed=:
16674 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16675 " | \
16676   $at_diff - "$at_stdout" || at_failed=:
16677 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16678 $at_failed && at_fn_log_failure
16679 $at_traceon; }
16680
16681               { set +x
16682 $as_echo "$at_srcdir/extrac17.at:34:
16683 mkdir oldgnu
16684 (cd oldgnu
16685 TEST_TAR_FORMAT=oldgnu
16686 export TEST_TAR_FORMAT
16687 TAR_OPTIONS=\"-H oldgnu\"
16688 export TAR_OPTIONS
16689 rm -rf *
16690
16691 mkdir dir dir/subdir1 dir/subdir2 out
16692 genfile --file dir/subdir1/file1
16693 genfile --file dir/subdir2/file2
16694
16695 tar cf dir.tar dir
16696
16697 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16698   dir/subdir1/
16699 )"
16700 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16701 ( $at_check_trace;
16702 mkdir oldgnu
16703 (cd oldgnu
16704 TEST_TAR_FORMAT=oldgnu
16705 export TEST_TAR_FORMAT
16706 TAR_OPTIONS="-H oldgnu"
16707 export TAR_OPTIONS
16708 rm -rf *
16709
16710 mkdir dir dir/subdir1 dir/subdir2 out
16711 genfile --file dir/subdir1/file1
16712 genfile --file dir/subdir2/file2
16713
16714 tar cf dir.tar dir
16715
16716 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16717   dir/subdir1/
16718 )
16719 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16720 at_status=$? at_failed=false
16721 $at_check_filter
16722 at_fn_diff_devnull "$at_stderr" || at_failed=:
16723 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16724 " | \
16725   $at_diff - "$at_stdout" || at_failed=:
16726 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16727 $at_failed && at_fn_log_failure
16728 $at_traceon; }
16729
16730               { set +x
16731 $as_echo "$at_srcdir/extrac17.at:34:
16732 mkdir ustar
16733 (cd ustar
16734 TEST_TAR_FORMAT=ustar
16735 export TEST_TAR_FORMAT
16736 TAR_OPTIONS=\"-H ustar\"
16737 export TAR_OPTIONS
16738 rm -rf *
16739
16740 mkdir dir dir/subdir1 dir/subdir2 out
16741 genfile --file dir/subdir1/file1
16742 genfile --file dir/subdir2/file2
16743
16744 tar cf dir.tar dir
16745
16746 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16747   dir/subdir1/
16748 )"
16749 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16750 ( $at_check_trace;
16751 mkdir ustar
16752 (cd ustar
16753 TEST_TAR_FORMAT=ustar
16754 export TEST_TAR_FORMAT
16755 TAR_OPTIONS="-H ustar"
16756 export TAR_OPTIONS
16757 rm -rf *
16758
16759 mkdir dir dir/subdir1 dir/subdir2 out
16760 genfile --file dir/subdir1/file1
16761 genfile --file dir/subdir2/file2
16762
16763 tar cf dir.tar dir
16764
16765 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16766   dir/subdir1/
16767 )
16768 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16769 at_status=$? at_failed=false
16770 $at_check_filter
16771 at_fn_diff_devnull "$at_stderr" || at_failed=:
16772 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16773 " | \
16774   $at_diff - "$at_stdout" || at_failed=:
16775 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16776 $at_failed && at_fn_log_failure
16777 $at_traceon; }
16778
16779               { set +x
16780 $as_echo "$at_srcdir/extrac17.at:34:
16781 mkdir posix
16782 (cd posix
16783 TEST_TAR_FORMAT=posix
16784 export TEST_TAR_FORMAT
16785 TAR_OPTIONS=\"-H posix\"
16786 export TAR_OPTIONS
16787 rm -rf *
16788
16789 mkdir dir dir/subdir1 dir/subdir2 out
16790 genfile --file dir/subdir1/file1
16791 genfile --file dir/subdir2/file2
16792
16793 tar cf dir.tar dir
16794
16795 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16796   dir/subdir1/
16797 )"
16798 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16799 ( $at_check_trace;
16800 mkdir posix
16801 (cd posix
16802 TEST_TAR_FORMAT=posix
16803 export TEST_TAR_FORMAT
16804 TAR_OPTIONS="-H posix"
16805 export TAR_OPTIONS
16806 rm -rf *
16807
16808 mkdir dir dir/subdir1 dir/subdir2 out
16809 genfile --file dir/subdir1/file1
16810 genfile --file dir/subdir2/file2
16811
16812 tar cf dir.tar dir
16813
16814 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16815   dir/subdir1/
16816 )
16817 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16818 at_status=$? at_failed=false
16819 $at_check_filter
16820 at_fn_diff_devnull "$at_stderr" || at_failed=:
16821 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16822 " | \
16823   $at_diff - "$at_stdout" || at_failed=:
16824 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16825 $at_failed && at_fn_log_failure
16826 $at_traceon; }
16827
16828               { set +x
16829 $as_echo "$at_srcdir/extrac17.at:34:
16830 mkdir gnu
16831 (cd gnu
16832 TEST_TAR_FORMAT=gnu
16833 export TEST_TAR_FORMAT
16834 TAR_OPTIONS=\"-H gnu\"
16835 export TAR_OPTIONS
16836 rm -rf *
16837
16838 mkdir dir dir/subdir1 dir/subdir2 out
16839 genfile --file dir/subdir1/file1
16840 genfile --file dir/subdir2/file2
16841
16842 tar cf dir.tar dir
16843
16844 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \\
16845   dir/subdir1/
16846 )"
16847 at_fn_check_prepare_notrace 'an embedded newline' "extrac17.at:34"
16848 ( $at_check_trace;
16849 mkdir gnu
16850 (cd gnu
16851 TEST_TAR_FORMAT=gnu
16852 export TEST_TAR_FORMAT
16853 TAR_OPTIONS="-H gnu"
16854 export TAR_OPTIONS
16855 rm -rf *
16856
16857 mkdir dir dir/subdir1 dir/subdir2 out
16858 genfile --file dir/subdir1/file1
16859 genfile --file dir/subdir2/file2
16860
16861 tar cf dir.tar dir
16862
16863 tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
16864   dir/subdir1/
16865 )
16866 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16867 at_status=$? at_failed=false
16868 $at_check_filter
16869 at_fn_diff_devnull "$at_stderr" || at_failed=:
16870 echo >>"$at_stdout"; $as_echo "dir/subdir1/file1
16871 " | \
16872   $at_diff - "$at_stdout" || at_failed=:
16873 at_fn_check_status 0 $at_status "$at_srcdir/extrac17.at:34"
16874 $at_failed && at_fn_log_failure
16875 $at_traceon; }
16876
16877
16878
16879
16880   set +x
16881   $at_times_p && times >"$at_times_file"
16882 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
16883 read at_status <"$at_status_file"
16884 #AT_STOP_73
16885 #AT_START_74
16886 at_fn_group_banner 74 'extrac18.at:34' \
16887   "keep-old-files" "                                 " 9
16888 at_xfail=no
16889       test -f $XFAILFILE && at_xfail=yes
16890 (
16891   $as_echo "74. $at_setup_line: testing $at_desc ..."
16892   $at_traceon
16893
16894
16895
16896
16897
16898   { set +x
16899 $as_echo "$at_srcdir/extrac18.at:37:
16900 mkdir v7
16901 (cd v7
16902 TEST_TAR_FORMAT=v7
16903 export TEST_TAR_FORMAT
16904 TAR_OPTIONS=\"-H v7\"
16905 export TAR_OPTIONS
16906 rm -rf *
16907
16908 mkdir dir
16909 cd dir
16910 echo 'Old file a' > a
16911 echo 'Old file b' > b
16912
16913 tar cf ../archive .
16914
16915 rm b
16916 echo 'File a' > a
16917
16918 tar -x -k -f ../archive
16919 echo status=\$?
16920
16921 cat a
16922 )"
16923 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
16924 ( $at_check_trace;
16925 mkdir v7
16926 (cd v7
16927 TEST_TAR_FORMAT=v7
16928 export TEST_TAR_FORMAT
16929 TAR_OPTIONS="-H v7"
16930 export TAR_OPTIONS
16931 rm -rf *
16932
16933 mkdir dir
16934 cd dir
16935 echo 'Old file a' > a
16936 echo 'Old file b' > b
16937
16938 tar cf ../archive .
16939
16940 rm b
16941 echo 'File a' > a
16942
16943 tar -x -k -f ../archive
16944 echo status=$?
16945
16946 cat a
16947 )
16948 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
16949 at_status=$? at_failed=false
16950 $at_check_filter
16951 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
16952 tar: Exiting with failure status due to previous errors
16953 " | \
16954   $at_diff - "$at_stderr" || at_failed=:
16955 echo >>"$at_stdout"; $as_echo "status=2
16956 File a
16957 " | \
16958   $at_diff - "$at_stdout" || at_failed=:
16959 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
16960 $at_failed && at_fn_log_failure
16961 $at_traceon; }
16962
16963               { set +x
16964 $as_echo "$at_srcdir/extrac18.at:37:
16965 mkdir oldgnu
16966 (cd oldgnu
16967 TEST_TAR_FORMAT=oldgnu
16968 export TEST_TAR_FORMAT
16969 TAR_OPTIONS=\"-H oldgnu\"
16970 export TAR_OPTIONS
16971 rm -rf *
16972
16973 mkdir dir
16974 cd dir
16975 echo 'Old file a' > a
16976 echo 'Old file b' > b
16977
16978 tar cf ../archive .
16979
16980 rm b
16981 echo 'File a' > a
16982
16983 tar -x -k -f ../archive
16984 echo status=\$?
16985
16986 cat a
16987 )"
16988 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
16989 ( $at_check_trace;
16990 mkdir oldgnu
16991 (cd oldgnu
16992 TEST_TAR_FORMAT=oldgnu
16993 export TEST_TAR_FORMAT
16994 TAR_OPTIONS="-H oldgnu"
16995 export TAR_OPTIONS
16996 rm -rf *
16997
16998 mkdir dir
16999 cd dir
17000 echo 'Old file a' > a
17001 echo 'Old file b' > b
17002
17003 tar cf ../archive .
17004
17005 rm b
17006 echo 'File a' > a
17007
17008 tar -x -k -f ../archive
17009 echo status=$?
17010
17011 cat a
17012 )
17013 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17014 at_status=$? at_failed=false
17015 $at_check_filter
17016 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
17017 tar: Exiting with failure status due to previous errors
17018 " | \
17019   $at_diff - "$at_stderr" || at_failed=:
17020 echo >>"$at_stdout"; $as_echo "status=2
17021 File a
17022 " | \
17023   $at_diff - "$at_stdout" || at_failed=:
17024 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
17025 $at_failed && at_fn_log_failure
17026 $at_traceon; }
17027
17028               { set +x
17029 $as_echo "$at_srcdir/extrac18.at:37:
17030 mkdir ustar
17031 (cd ustar
17032 TEST_TAR_FORMAT=ustar
17033 export TEST_TAR_FORMAT
17034 TAR_OPTIONS=\"-H ustar\"
17035 export TAR_OPTIONS
17036 rm -rf *
17037
17038 mkdir dir
17039 cd dir
17040 echo 'Old file a' > a
17041 echo 'Old file b' > b
17042
17043 tar cf ../archive .
17044
17045 rm b
17046 echo 'File a' > a
17047
17048 tar -x -k -f ../archive
17049 echo status=\$?
17050
17051 cat a
17052 )"
17053 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
17054 ( $at_check_trace;
17055 mkdir ustar
17056 (cd ustar
17057 TEST_TAR_FORMAT=ustar
17058 export TEST_TAR_FORMAT
17059 TAR_OPTIONS="-H ustar"
17060 export TAR_OPTIONS
17061 rm -rf *
17062
17063 mkdir dir
17064 cd dir
17065 echo 'Old file a' > a
17066 echo 'Old file b' > b
17067
17068 tar cf ../archive .
17069
17070 rm b
17071 echo 'File a' > a
17072
17073 tar -x -k -f ../archive
17074 echo status=$?
17075
17076 cat a
17077 )
17078 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17079 at_status=$? at_failed=false
17080 $at_check_filter
17081 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
17082 tar: Exiting with failure status due to previous errors
17083 " | \
17084   $at_diff - "$at_stderr" || at_failed=:
17085 echo >>"$at_stdout"; $as_echo "status=2
17086 File a
17087 " | \
17088   $at_diff - "$at_stdout" || at_failed=:
17089 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
17090 $at_failed && at_fn_log_failure
17091 $at_traceon; }
17092
17093               { set +x
17094 $as_echo "$at_srcdir/extrac18.at:37:
17095 mkdir posix
17096 (cd posix
17097 TEST_TAR_FORMAT=posix
17098 export TEST_TAR_FORMAT
17099 TAR_OPTIONS=\"-H posix\"
17100 export TAR_OPTIONS
17101 rm -rf *
17102
17103 mkdir dir
17104 cd dir
17105 echo 'Old file a' > a
17106 echo 'Old file b' > b
17107
17108 tar cf ../archive .
17109
17110 rm b
17111 echo 'File a' > a
17112
17113 tar -x -k -f ../archive
17114 echo status=\$?
17115
17116 cat a
17117 )"
17118 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
17119 ( $at_check_trace;
17120 mkdir posix
17121 (cd posix
17122 TEST_TAR_FORMAT=posix
17123 export TEST_TAR_FORMAT
17124 TAR_OPTIONS="-H posix"
17125 export TAR_OPTIONS
17126 rm -rf *
17127
17128 mkdir dir
17129 cd dir
17130 echo 'Old file a' > a
17131 echo 'Old file b' > b
17132
17133 tar cf ../archive .
17134
17135 rm b
17136 echo 'File a' > a
17137
17138 tar -x -k -f ../archive
17139 echo status=$?
17140
17141 cat a
17142 )
17143 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17144 at_status=$? at_failed=false
17145 $at_check_filter
17146 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
17147 tar: Exiting with failure status due to previous errors
17148 " | \
17149   $at_diff - "$at_stderr" || at_failed=:
17150 echo >>"$at_stdout"; $as_echo "status=2
17151 File a
17152 " | \
17153   $at_diff - "$at_stdout" || at_failed=:
17154 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
17155 $at_failed && at_fn_log_failure
17156 $at_traceon; }
17157
17158               { set +x
17159 $as_echo "$at_srcdir/extrac18.at:37:
17160 mkdir gnu
17161 (cd gnu
17162 TEST_TAR_FORMAT=gnu
17163 export TEST_TAR_FORMAT
17164 TAR_OPTIONS=\"-H gnu\"
17165 export TAR_OPTIONS
17166 rm -rf *
17167
17168 mkdir dir
17169 cd dir
17170 echo 'Old file a' > a
17171 echo 'Old file b' > b
17172
17173 tar cf ../archive .
17174
17175 rm b
17176 echo 'File a' > a
17177
17178 tar -x -k -f ../archive
17179 echo status=\$?
17180
17181 cat a
17182 )"
17183 at_fn_check_prepare_notrace 'an embedded newline' "extrac18.at:37"
17184 ( $at_check_trace;
17185 mkdir gnu
17186 (cd gnu
17187 TEST_TAR_FORMAT=gnu
17188 export TEST_TAR_FORMAT
17189 TAR_OPTIONS="-H gnu"
17190 export TAR_OPTIONS
17191 rm -rf *
17192
17193 mkdir dir
17194 cd dir
17195 echo 'Old file a' > a
17196 echo 'Old file b' > b
17197
17198 tar cf ../archive .
17199
17200 rm b
17201 echo 'File a' > a
17202
17203 tar -x -k -f ../archive
17204 echo status=$?
17205
17206 cat a
17207 )
17208 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17209 at_status=$? at_failed=false
17210 $at_check_filter
17211 echo >>"$at_stderr"; $as_echo "tar: ./a: Cannot open: File exists
17212 tar: Exiting with failure status due to previous errors
17213 " | \
17214   $at_diff - "$at_stderr" || at_failed=:
17215 echo >>"$at_stdout"; $as_echo "status=2
17216 File a
17217 " | \
17218   $at_diff - "$at_stdout" || at_failed=:
17219 at_fn_check_status 0 $at_status "$at_srcdir/extrac18.at:37"
17220 $at_failed && at_fn_log_failure
17221 $at_traceon; }
17222
17223
17224
17225
17226   set +x
17227   $at_times_p && times >"$at_times_file"
17228 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17229 read at_status <"$at_status_file"
17230 #AT_STOP_74
17231 #AT_START_75
17232 at_fn_group_banner 75 'extrac19.at:21' \
17233   "skip-old-files" "                                 " 9
17234 at_xfail=no
17235       test -f $XFAILFILE && at_xfail=yes
17236 (
17237   $as_echo "75. $at_setup_line: testing $at_desc ..."
17238   $at_traceon
17239
17240
17241
17242
17243
17244   { set +x
17245 $as_echo "$at_srcdir/extrac19.at:24:
17246 mkdir v7
17247 (cd v7
17248 TEST_TAR_FORMAT=v7
17249 export TEST_TAR_FORMAT
17250 TAR_OPTIONS=\"-H v7\"
17251 export TAR_OPTIONS
17252 rm -rf *
17253
17254 mkdir dir
17255 cd dir
17256 echo 'Old file a' > a
17257 echo 'Old file b' > b
17258
17259 tar cf ../archive .
17260
17261 rm b
17262 echo 'File a' > a
17263
17264 tar -x --skip-old-files -f ../archive
17265 echo status=\$?
17266
17267 cat a
17268 )"
17269 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
17270 ( $at_check_trace;
17271 mkdir v7
17272 (cd v7
17273 TEST_TAR_FORMAT=v7
17274 export TEST_TAR_FORMAT
17275 TAR_OPTIONS="-H v7"
17276 export TAR_OPTIONS
17277 rm -rf *
17278
17279 mkdir dir
17280 cd dir
17281 echo 'Old file a' > a
17282 echo 'Old file b' > b
17283
17284 tar cf ../archive .
17285
17286 rm b
17287 echo 'File a' > a
17288
17289 tar -x --skip-old-files -f ../archive
17290 echo status=$?
17291
17292 cat a
17293 )
17294 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17295 at_status=$? at_failed=false
17296 $at_check_filter
17297 at_fn_diff_devnull "$at_stderr" || at_failed=:
17298 echo >>"$at_stdout"; $as_echo "status=0
17299 File a
17300 " | \
17301   $at_diff - "$at_stdout" || at_failed=:
17302 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
17303 $at_failed && at_fn_log_failure
17304 $at_traceon; }
17305
17306               { set +x
17307 $as_echo "$at_srcdir/extrac19.at:24:
17308 mkdir oldgnu
17309 (cd oldgnu
17310 TEST_TAR_FORMAT=oldgnu
17311 export TEST_TAR_FORMAT
17312 TAR_OPTIONS=\"-H oldgnu\"
17313 export TAR_OPTIONS
17314 rm -rf *
17315
17316 mkdir dir
17317 cd dir
17318 echo 'Old file a' > a
17319 echo 'Old file b' > b
17320
17321 tar cf ../archive .
17322
17323 rm b
17324 echo 'File a' > a
17325
17326 tar -x --skip-old-files -f ../archive
17327 echo status=\$?
17328
17329 cat a
17330 )"
17331 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
17332 ( $at_check_trace;
17333 mkdir oldgnu
17334 (cd oldgnu
17335 TEST_TAR_FORMAT=oldgnu
17336 export TEST_TAR_FORMAT
17337 TAR_OPTIONS="-H oldgnu"
17338 export TAR_OPTIONS
17339 rm -rf *
17340
17341 mkdir dir
17342 cd dir
17343 echo 'Old file a' > a
17344 echo 'Old file b' > b
17345
17346 tar cf ../archive .
17347
17348 rm b
17349 echo 'File a' > a
17350
17351 tar -x --skip-old-files -f ../archive
17352 echo status=$?
17353
17354 cat a
17355 )
17356 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17357 at_status=$? at_failed=false
17358 $at_check_filter
17359 at_fn_diff_devnull "$at_stderr" || at_failed=:
17360 echo >>"$at_stdout"; $as_echo "status=0
17361 File a
17362 " | \
17363   $at_diff - "$at_stdout" || at_failed=:
17364 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
17365 $at_failed && at_fn_log_failure
17366 $at_traceon; }
17367
17368               { set +x
17369 $as_echo "$at_srcdir/extrac19.at:24:
17370 mkdir ustar
17371 (cd ustar
17372 TEST_TAR_FORMAT=ustar
17373 export TEST_TAR_FORMAT
17374 TAR_OPTIONS=\"-H ustar\"
17375 export TAR_OPTIONS
17376 rm -rf *
17377
17378 mkdir dir
17379 cd dir
17380 echo 'Old file a' > a
17381 echo 'Old file b' > b
17382
17383 tar cf ../archive .
17384
17385 rm b
17386 echo 'File a' > a
17387
17388 tar -x --skip-old-files -f ../archive
17389 echo status=\$?
17390
17391 cat a
17392 )"
17393 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
17394 ( $at_check_trace;
17395 mkdir ustar
17396 (cd ustar
17397 TEST_TAR_FORMAT=ustar
17398 export TEST_TAR_FORMAT
17399 TAR_OPTIONS="-H ustar"
17400 export TAR_OPTIONS
17401 rm -rf *
17402
17403 mkdir dir
17404 cd dir
17405 echo 'Old file a' > a
17406 echo 'Old file b' > b
17407
17408 tar cf ../archive .
17409
17410 rm b
17411 echo 'File a' > a
17412
17413 tar -x --skip-old-files -f ../archive
17414 echo status=$?
17415
17416 cat a
17417 )
17418 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17419 at_status=$? at_failed=false
17420 $at_check_filter
17421 at_fn_diff_devnull "$at_stderr" || at_failed=:
17422 echo >>"$at_stdout"; $as_echo "status=0
17423 File a
17424 " | \
17425   $at_diff - "$at_stdout" || at_failed=:
17426 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
17427 $at_failed && at_fn_log_failure
17428 $at_traceon; }
17429
17430               { set +x
17431 $as_echo "$at_srcdir/extrac19.at:24:
17432 mkdir posix
17433 (cd posix
17434 TEST_TAR_FORMAT=posix
17435 export TEST_TAR_FORMAT
17436 TAR_OPTIONS=\"-H posix\"
17437 export TAR_OPTIONS
17438 rm -rf *
17439
17440 mkdir dir
17441 cd dir
17442 echo 'Old file a' > a
17443 echo 'Old file b' > b
17444
17445 tar cf ../archive .
17446
17447 rm b
17448 echo 'File a' > a
17449
17450 tar -x --skip-old-files -f ../archive
17451 echo status=\$?
17452
17453 cat a
17454 )"
17455 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
17456 ( $at_check_trace;
17457 mkdir posix
17458 (cd posix
17459 TEST_TAR_FORMAT=posix
17460 export TEST_TAR_FORMAT
17461 TAR_OPTIONS="-H posix"
17462 export TAR_OPTIONS
17463 rm -rf *
17464
17465 mkdir dir
17466 cd dir
17467 echo 'Old file a' > a
17468 echo 'Old file b' > b
17469
17470 tar cf ../archive .
17471
17472 rm b
17473 echo 'File a' > a
17474
17475 tar -x --skip-old-files -f ../archive
17476 echo status=$?
17477
17478 cat a
17479 )
17480 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17481 at_status=$? at_failed=false
17482 $at_check_filter
17483 at_fn_diff_devnull "$at_stderr" || at_failed=:
17484 echo >>"$at_stdout"; $as_echo "status=0
17485 File a
17486 " | \
17487   $at_diff - "$at_stdout" || at_failed=:
17488 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
17489 $at_failed && at_fn_log_failure
17490 $at_traceon; }
17491
17492               { set +x
17493 $as_echo "$at_srcdir/extrac19.at:24:
17494 mkdir gnu
17495 (cd gnu
17496 TEST_TAR_FORMAT=gnu
17497 export TEST_TAR_FORMAT
17498 TAR_OPTIONS=\"-H gnu\"
17499 export TAR_OPTIONS
17500 rm -rf *
17501
17502 mkdir dir
17503 cd dir
17504 echo 'Old file a' > a
17505 echo 'Old file b' > b
17506
17507 tar cf ../archive .
17508
17509 rm b
17510 echo 'File a' > a
17511
17512 tar -x --skip-old-files -f ../archive
17513 echo status=\$?
17514
17515 cat a
17516 )"
17517 at_fn_check_prepare_notrace 'an embedded newline' "extrac19.at:24"
17518 ( $at_check_trace;
17519 mkdir gnu
17520 (cd gnu
17521 TEST_TAR_FORMAT=gnu
17522 export TEST_TAR_FORMAT
17523 TAR_OPTIONS="-H gnu"
17524 export TAR_OPTIONS
17525 rm -rf *
17526
17527 mkdir dir
17528 cd dir
17529 echo 'Old file a' > a
17530 echo 'Old file b' > b
17531
17532 tar cf ../archive .
17533
17534 rm b
17535 echo 'File a' > a
17536
17537 tar -x --skip-old-files -f ../archive
17538 echo status=$?
17539
17540 cat a
17541 )
17542 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17543 at_status=$? at_failed=false
17544 $at_check_filter
17545 at_fn_diff_devnull "$at_stderr" || at_failed=:
17546 echo >>"$at_stdout"; $as_echo "status=0
17547 File a
17548 " | \
17549   $at_diff - "$at_stdout" || at_failed=:
17550 at_fn_check_status 0 $at_status "$at_srcdir/extrac19.at:24"
17551 $at_failed && at_fn_log_failure
17552 $at_traceon; }
17553
17554
17555
17556
17557   set +x
17558   $at_times_p && times >"$at_times_file"
17559 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17560 read at_status <"$at_status_file"
17561 #AT_STOP_75
17562 #AT_START_76
17563 at_fn_group_banner 76 'backup01.at:33' \
17564   "extracting existing dir with --backup" "          " 9
17565 at_xfail=no
17566       test -f $XFAILFILE && at_xfail=yes
17567 (
17568   $as_echo "76. $at_setup_line: testing $at_desc ..."
17569   $at_traceon
17570
17571
17572
17573
17574
17575   { set +x
17576 $as_echo "$at_srcdir/backup01.at:36:
17577 mkdir v7
17578 (cd v7
17579 TEST_TAR_FORMAT=v7
17580 export TEST_TAR_FORMAT
17581 TAR_OPTIONS=\"-H v7\"
17582 export TAR_OPTIONS
17583 rm -rf *
17584
17585 unset VERSION_CONTROL
17586 mkdir dir1 dir2
17587 echo bla > dir1/file1
17588 tar cf test.tar dir1 dir2
17589 tar xfv test.tar --backup --warning=no-timestamp
17590 )"
17591 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17592 ( $at_check_trace;
17593 mkdir v7
17594 (cd v7
17595 TEST_TAR_FORMAT=v7
17596 export TEST_TAR_FORMAT
17597 TAR_OPTIONS="-H v7"
17598 export TAR_OPTIONS
17599 rm -rf *
17600
17601 unset VERSION_CONTROL
17602 mkdir dir1 dir2
17603 echo bla > dir1/file1
17604 tar cf test.tar dir1 dir2
17605 tar xfv test.tar --backup --warning=no-timestamp
17606 )
17607 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17608 at_status=$? at_failed=false
17609 $at_check_filter
17610 at_fn_diff_devnull "$at_stderr" || at_failed=:
17611 echo >>"$at_stdout"; $as_echo "dir1/
17612 dir1/file1
17613 Renaming 'dir1/file1' to 'dir1/file1~'
17614 dir2/
17615 " | \
17616   $at_diff - "$at_stdout" || at_failed=:
17617 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17618 $at_failed && at_fn_log_failure
17619 $at_traceon; }
17620
17621               { set +x
17622 $as_echo "$at_srcdir/backup01.at:36:
17623 mkdir oldgnu
17624 (cd oldgnu
17625 TEST_TAR_FORMAT=oldgnu
17626 export TEST_TAR_FORMAT
17627 TAR_OPTIONS=\"-H oldgnu\"
17628 export TAR_OPTIONS
17629 rm -rf *
17630
17631 unset VERSION_CONTROL
17632 mkdir dir1 dir2
17633 echo bla > dir1/file1
17634 tar cf test.tar dir1 dir2
17635 tar xfv test.tar --backup --warning=no-timestamp
17636 )"
17637 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17638 ( $at_check_trace;
17639 mkdir oldgnu
17640 (cd oldgnu
17641 TEST_TAR_FORMAT=oldgnu
17642 export TEST_TAR_FORMAT
17643 TAR_OPTIONS="-H oldgnu"
17644 export TAR_OPTIONS
17645 rm -rf *
17646
17647 unset VERSION_CONTROL
17648 mkdir dir1 dir2
17649 echo bla > dir1/file1
17650 tar cf test.tar dir1 dir2
17651 tar xfv test.tar --backup --warning=no-timestamp
17652 )
17653 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17654 at_status=$? at_failed=false
17655 $at_check_filter
17656 at_fn_diff_devnull "$at_stderr" || at_failed=:
17657 echo >>"$at_stdout"; $as_echo "dir1/
17658 dir1/file1
17659 Renaming 'dir1/file1' to 'dir1/file1~'
17660 dir2/
17661 " | \
17662   $at_diff - "$at_stdout" || at_failed=:
17663 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17664 $at_failed && at_fn_log_failure
17665 $at_traceon; }
17666
17667               { set +x
17668 $as_echo "$at_srcdir/backup01.at:36:
17669 mkdir ustar
17670 (cd ustar
17671 TEST_TAR_FORMAT=ustar
17672 export TEST_TAR_FORMAT
17673 TAR_OPTIONS=\"-H ustar\"
17674 export TAR_OPTIONS
17675 rm -rf *
17676
17677 unset VERSION_CONTROL
17678 mkdir dir1 dir2
17679 echo bla > dir1/file1
17680 tar cf test.tar dir1 dir2
17681 tar xfv test.tar --backup --warning=no-timestamp
17682 )"
17683 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17684 ( $at_check_trace;
17685 mkdir ustar
17686 (cd ustar
17687 TEST_TAR_FORMAT=ustar
17688 export TEST_TAR_FORMAT
17689 TAR_OPTIONS="-H ustar"
17690 export TAR_OPTIONS
17691 rm -rf *
17692
17693 unset VERSION_CONTROL
17694 mkdir dir1 dir2
17695 echo bla > dir1/file1
17696 tar cf test.tar dir1 dir2
17697 tar xfv test.tar --backup --warning=no-timestamp
17698 )
17699 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17700 at_status=$? at_failed=false
17701 $at_check_filter
17702 at_fn_diff_devnull "$at_stderr" || at_failed=:
17703 echo >>"$at_stdout"; $as_echo "dir1/
17704 dir1/file1
17705 Renaming 'dir1/file1' to 'dir1/file1~'
17706 dir2/
17707 " | \
17708   $at_diff - "$at_stdout" || at_failed=:
17709 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17710 $at_failed && at_fn_log_failure
17711 $at_traceon; }
17712
17713               { set +x
17714 $as_echo "$at_srcdir/backup01.at:36:
17715 mkdir posix
17716 (cd posix
17717 TEST_TAR_FORMAT=posix
17718 export TEST_TAR_FORMAT
17719 TAR_OPTIONS=\"-H posix\"
17720 export TAR_OPTIONS
17721 rm -rf *
17722
17723 unset VERSION_CONTROL
17724 mkdir dir1 dir2
17725 echo bla > dir1/file1
17726 tar cf test.tar dir1 dir2
17727 tar xfv test.tar --backup --warning=no-timestamp
17728 )"
17729 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17730 ( $at_check_trace;
17731 mkdir posix
17732 (cd posix
17733 TEST_TAR_FORMAT=posix
17734 export TEST_TAR_FORMAT
17735 TAR_OPTIONS="-H posix"
17736 export TAR_OPTIONS
17737 rm -rf *
17738
17739 unset VERSION_CONTROL
17740 mkdir dir1 dir2
17741 echo bla > dir1/file1
17742 tar cf test.tar dir1 dir2
17743 tar xfv test.tar --backup --warning=no-timestamp
17744 )
17745 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17746 at_status=$? at_failed=false
17747 $at_check_filter
17748 at_fn_diff_devnull "$at_stderr" || at_failed=:
17749 echo >>"$at_stdout"; $as_echo "dir1/
17750 dir1/file1
17751 Renaming 'dir1/file1' to 'dir1/file1~'
17752 dir2/
17753 " | \
17754   $at_diff - "$at_stdout" || at_failed=:
17755 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17756 $at_failed && at_fn_log_failure
17757 $at_traceon; }
17758
17759               { set +x
17760 $as_echo "$at_srcdir/backup01.at:36:
17761 mkdir gnu
17762 (cd gnu
17763 TEST_TAR_FORMAT=gnu
17764 export TEST_TAR_FORMAT
17765 TAR_OPTIONS=\"-H gnu\"
17766 export TAR_OPTIONS
17767 rm -rf *
17768
17769 unset VERSION_CONTROL
17770 mkdir dir1 dir2
17771 echo bla > dir1/file1
17772 tar cf test.tar dir1 dir2
17773 tar xfv test.tar --backup --warning=no-timestamp
17774 )"
17775 at_fn_check_prepare_notrace 'an embedded newline' "backup01.at:36"
17776 ( $at_check_trace;
17777 mkdir gnu
17778 (cd gnu
17779 TEST_TAR_FORMAT=gnu
17780 export TEST_TAR_FORMAT
17781 TAR_OPTIONS="-H gnu"
17782 export TAR_OPTIONS
17783 rm -rf *
17784
17785 unset VERSION_CONTROL
17786 mkdir dir1 dir2
17787 echo bla > dir1/file1
17788 tar cf test.tar dir1 dir2
17789 tar xfv test.tar --backup --warning=no-timestamp
17790 )
17791 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17792 at_status=$? at_failed=false
17793 $at_check_filter
17794 at_fn_diff_devnull "$at_stderr" || at_failed=:
17795 echo >>"$at_stdout"; $as_echo "dir1/
17796 dir1/file1
17797 Renaming 'dir1/file1' to 'dir1/file1~'
17798 dir2/
17799 " | \
17800   $at_diff - "$at_stdout" || at_failed=:
17801 at_fn_check_status 0 $at_status "$at_srcdir/backup01.at:36"
17802 $at_failed && at_fn_log_failure
17803 $at_traceon; }
17804
17805
17806
17807
17808   set +x
17809   $at_times_p && times >"$at_times_file"
17810 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17811 read at_status <"$at_status_file"
17812 #AT_STOP_76
17813 #AT_START_77
17814 at_fn_group_banner 77 'label01.at:21' \
17815   "single-volume label" "                            " 10
17816 at_xfail=no
17817       test -f $XFAILFILE && at_xfail=yes
17818 (
17819   $as_echo "77. $at_setup_line: testing $at_desc ..."
17820   $at_traceon
17821
17822
17823
17824
17825
17826   { set +x
17827 $as_echo "$at_srcdir/label01.at:24:
17828 mkdir gnu
17829 (cd gnu
17830 TEST_TAR_FORMAT=gnu
17831 export TEST_TAR_FORMAT
17832 TAR_OPTIONS=\"-H gnu\"
17833 export TAR_OPTIONS
17834 rm -rf *
17835
17836 genfile --file foo
17837 genfile --file bar
17838 tar -cf archive --label=Test foo bar
17839 tar tf archive
17840 )"
17841 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
17842 ( $at_check_trace;
17843 mkdir gnu
17844 (cd gnu
17845 TEST_TAR_FORMAT=gnu
17846 export TEST_TAR_FORMAT
17847 TAR_OPTIONS="-H gnu"
17848 export TAR_OPTIONS
17849 rm -rf *
17850
17851 genfile --file foo
17852 genfile --file bar
17853 tar -cf archive --label=Test foo bar
17854 tar tf archive
17855 )
17856 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17857 at_status=$? at_failed=false
17858 $at_check_filter
17859 at_fn_diff_devnull "$at_stderr" || at_failed=:
17860 echo >>"$at_stdout"; $as_echo "Test
17861 foo
17862 bar
17863 " | \
17864   $at_diff - "$at_stdout" || at_failed=:
17865 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
17866 $at_failed && at_fn_log_failure
17867 $at_traceon; }
17868
17869               { set +x
17870 $as_echo "$at_srcdir/label01.at:24:
17871 mkdir oldgnu
17872 (cd oldgnu
17873 TEST_TAR_FORMAT=oldgnu
17874 export TEST_TAR_FORMAT
17875 TAR_OPTIONS=\"-H oldgnu\"
17876 export TAR_OPTIONS
17877 rm -rf *
17878
17879 genfile --file foo
17880 genfile --file bar
17881 tar -cf archive --label=Test foo bar
17882 tar tf archive
17883 )"
17884 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
17885 ( $at_check_trace;
17886 mkdir oldgnu
17887 (cd oldgnu
17888 TEST_TAR_FORMAT=oldgnu
17889 export TEST_TAR_FORMAT
17890 TAR_OPTIONS="-H oldgnu"
17891 export TAR_OPTIONS
17892 rm -rf *
17893
17894 genfile --file foo
17895 genfile --file bar
17896 tar -cf archive --label=Test foo bar
17897 tar tf archive
17898 )
17899 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17900 at_status=$? at_failed=false
17901 $at_check_filter
17902 at_fn_diff_devnull "$at_stderr" || at_failed=:
17903 echo >>"$at_stdout"; $as_echo "Test
17904 foo
17905 bar
17906 " | \
17907   $at_diff - "$at_stdout" || at_failed=:
17908 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
17909 $at_failed && at_fn_log_failure
17910 $at_traceon; }
17911
17912               { set +x
17913 $as_echo "$at_srcdir/label01.at:24:
17914 mkdir posix
17915 (cd posix
17916 TEST_TAR_FORMAT=posix
17917 export TEST_TAR_FORMAT
17918 TAR_OPTIONS=\"-H posix\"
17919 export TAR_OPTIONS
17920 rm -rf *
17921
17922 genfile --file foo
17923 genfile --file bar
17924 tar -cf archive --label=Test foo bar
17925 tar tf archive
17926 )"
17927 at_fn_check_prepare_notrace 'an embedded newline' "label01.at:24"
17928 ( $at_check_trace;
17929 mkdir posix
17930 (cd posix
17931 TEST_TAR_FORMAT=posix
17932 export TEST_TAR_FORMAT
17933 TAR_OPTIONS="-H posix"
17934 export TAR_OPTIONS
17935 rm -rf *
17936
17937 genfile --file foo
17938 genfile --file bar
17939 tar -cf archive --label=Test foo bar
17940 tar tf archive
17941 )
17942 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
17943 at_status=$? at_failed=false
17944 $at_check_filter
17945 at_fn_diff_devnull "$at_stderr" || at_failed=:
17946 echo >>"$at_stdout"; $as_echo "Test
17947 foo
17948 bar
17949 " | \
17950   $at_diff - "$at_stdout" || at_failed=:
17951 at_fn_check_status 0 $at_status "$at_srcdir/label01.at:24"
17952 $at_failed && at_fn_log_failure
17953 $at_traceon; }
17954
17955
17956
17957
17958   set +x
17959   $at_times_p && times >"$at_times_file"
17960 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
17961 read at_status <"$at_status_file"
17962 #AT_STOP_77
17963 #AT_START_78
17964 at_fn_group_banner 78 'label02.at:21' \
17965   "multi-volume label" "                             " 10
17966 at_xfail=no
17967       test -f $XFAILFILE && at_xfail=yes
17968 (
17969   $as_echo "78. $at_setup_line: testing $at_desc ..."
17970   $at_traceon
17971
17972
17973
17974
17975
17976   { set +x
17977 $as_echo "$at_srcdir/label02.at:24:
17978 mkdir gnu
17979 (cd gnu
17980 TEST_TAR_FORMAT=gnu
17981 export TEST_TAR_FORMAT
17982 TAR_OPTIONS=\"-H gnu\"
17983 export TAR_OPTIONS
17984 rm -rf *
17985
17986 exec <&-
17987 genfile --length 0 --file foo
17988 genfile --length 12288 --file bar
17989 genfile --length 12288 --file baz
17990 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
17991 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
17992 )"
17993 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
17994 ( $at_check_trace;
17995 mkdir gnu
17996 (cd gnu
17997 TEST_TAR_FORMAT=gnu
17998 export TEST_TAR_FORMAT
17999 TAR_OPTIONS="-H gnu"
18000 export TAR_OPTIONS
18001 rm -rf *
18002
18003 exec <&-
18004 genfile --length 0 --file foo
18005 genfile --length 12288 --file bar
18006 genfile --length 12288 --file baz
18007 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
18008 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
18009 )
18010 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18011 at_status=$? at_failed=false
18012 $at_check_filter
18013 at_fn_diff_devnull "$at_stderr" || at_failed=:
18014 echo >>"$at_stdout"; $as_echo "Test Volume 1
18015 foo
18016 bar
18017 baz
18018 " | \
18019   $at_diff - "$at_stdout" || at_failed=:
18020 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
18021 $at_failed && at_fn_log_failure
18022 $at_traceon; }
18023
18024               { set +x
18025 $as_echo "$at_srcdir/label02.at:24:
18026 mkdir oldgnu
18027 (cd oldgnu
18028 TEST_TAR_FORMAT=oldgnu
18029 export TEST_TAR_FORMAT
18030 TAR_OPTIONS=\"-H oldgnu\"
18031 export TAR_OPTIONS
18032 rm -rf *
18033
18034 exec <&-
18035 genfile --length 0 --file foo
18036 genfile --length 12288 --file bar
18037 genfile --length 12288 --file baz
18038 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
18039 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
18040 )"
18041 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
18042 ( $at_check_trace;
18043 mkdir oldgnu
18044 (cd oldgnu
18045 TEST_TAR_FORMAT=oldgnu
18046 export TEST_TAR_FORMAT
18047 TAR_OPTIONS="-H oldgnu"
18048 export TAR_OPTIONS
18049 rm -rf *
18050
18051 exec <&-
18052 genfile --length 0 --file foo
18053 genfile --length 12288 --file bar
18054 genfile --length 12288 --file baz
18055 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
18056 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
18057 )
18058 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18059 at_status=$? at_failed=false
18060 $at_check_filter
18061 at_fn_diff_devnull "$at_stderr" || at_failed=:
18062 echo >>"$at_stdout"; $as_echo "Test Volume 1
18063 foo
18064 bar
18065 baz
18066 " | \
18067   $at_diff - "$at_stdout" || at_failed=:
18068 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
18069 $at_failed && at_fn_log_failure
18070 $at_traceon; }
18071
18072               { set +x
18073 $as_echo "$at_srcdir/label02.at:24:
18074 mkdir posix
18075 (cd posix
18076 TEST_TAR_FORMAT=posix
18077 export TEST_TAR_FORMAT
18078 TAR_OPTIONS=\"-H posix\"
18079 export TAR_OPTIONS
18080 rm -rf *
18081
18082 exec <&-
18083 genfile --length 0 --file foo
18084 genfile --length 12288 --file bar
18085 genfile --length 12288 --file baz
18086 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
18087 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
18088 )"
18089 at_fn_check_prepare_notrace 'an embedded newline' "label02.at:24"
18090 ( $at_check_trace;
18091 mkdir posix
18092 (cd posix
18093 TEST_TAR_FORMAT=posix
18094 export TEST_TAR_FORMAT
18095 TAR_OPTIONS="-H posix"
18096 export TAR_OPTIONS
18097 rm -rf *
18098
18099 exec <&-
18100 genfile --length 0 --file foo
18101 genfile --length 12288 --file bar
18102 genfile --length 12288 --file baz
18103 tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz
18104 tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar
18105 )
18106 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18107 at_status=$? at_failed=false
18108 $at_check_filter
18109 at_fn_diff_devnull "$at_stderr" || at_failed=:
18110 echo >>"$at_stdout"; $as_echo "Test Volume 1
18111 foo
18112 bar
18113 baz
18114 " | \
18115   $at_diff - "$at_stdout" || at_failed=:
18116 at_fn_check_status 0 $at_status "$at_srcdir/label02.at:24"
18117 $at_failed && at_fn_log_failure
18118 $at_traceon; }
18119
18120
18121
18122
18123   set +x
18124   $at_times_p && times >"$at_times_file"
18125 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18126 read at_status <"$at_status_file"
18127 #AT_STOP_78
18128 #AT_START_79
18129 at_fn_group_banner 79 'label03.at:27' \
18130   "test-label option" "                              " 10
18131 at_xfail=no
18132       test -f $XFAILFILE && at_xfail=yes
18133 (
18134   $as_echo "79. $at_setup_line: testing $at_desc ..."
18135   $at_traceon
18136
18137
18138
18139
18140
18141   { set +x
18142 $as_echo "$at_srcdir/label03.at:30:
18143 mkdir gnu
18144 (cd gnu
18145 TEST_TAR_FORMAT=gnu
18146 export TEST_TAR_FORMAT
18147 TAR_OPTIONS=\"-H gnu\"
18148 export TAR_OPTIONS
18149 rm -rf *
18150
18151 exec <&-
18152 genfile --file file
18153 tar -c --label='iamalabel' --file iamanarchive file
18154 tar -c --file unlabeled.tar file
18155 decho \"# Display label\"
18156 tar --test-label --file=iamanarchive; echo \$?
18157 decho \"# Display label: unlabeled\"
18158 tar --test-label --file=unlabeled.tar; echo \$?
18159 decho \"# Test label: success\"
18160 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
18161 decho \"# Test label: failure\"
18162 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
18163 decho \"# Test label: unlabeled\"
18164 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
18165 decho \"# Test label, verbose: success\"
18166 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
18167 decho \"# Test label, verbose: failure\"
18168 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
18169 decho \"# Test label: multiple arguments\"
18170 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
18171 decho \"# Test label: wildcards\"
18172 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
18173 )"
18174 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
18175 ( $at_check_trace;
18176 mkdir gnu
18177 (cd gnu
18178 TEST_TAR_FORMAT=gnu
18179 export TEST_TAR_FORMAT
18180 TAR_OPTIONS="-H gnu"
18181 export TAR_OPTIONS
18182 rm -rf *
18183
18184 exec <&-
18185 genfile --file file
18186 tar -c --label='iamalabel' --file iamanarchive file
18187 tar -c --file unlabeled.tar file
18188 decho "# Display label"
18189 tar --test-label --file=iamanarchive; echo $?
18190 decho "# Display label: unlabeled"
18191 tar --test-label --file=unlabeled.tar; echo $?
18192 decho "# Test label: success"
18193 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
18194 decho "# Test label: failure"
18195 tar --test-label --file=iamanarchive 'amalabel'; echo $?
18196 decho "# Test label: unlabeled"
18197 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
18198 decho "# Test label, verbose: success"
18199 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
18200 decho "# Test label, verbose: failure"
18201 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
18202 decho "# Test label: multiple arguments"
18203 tar --test-label --file=iamanarchive a iamalabel b; echo $?
18204 decho "# Test label: wildcards"
18205 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
18206 )
18207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18208 at_status=$? at_failed=false
18209 $at_check_filter
18210 echo >>"$at_stderr"; $as_echo "# Display label
18211 # Display label: unlabeled
18212 # Test label: success
18213 # Test label: failure
18214 # Test label: unlabeled
18215 # Test label, verbose: success
18216 # Test label, verbose: failure
18217 tar: Archive label mismatch
18218 # Test label: multiple arguments
18219 # Test label: wildcards
18220 " | \
18221   $at_diff - "$at_stderr" || at_failed=:
18222 echo >>"$at_stdout"; $as_echo "# Display label
18223 iamalabel
18224 0
18225 # Display label: unlabeled
18226 0
18227 # Test label: success
18228 0
18229 # Test label: failure
18230 1
18231 # Test label: unlabeled
18232 1
18233 # Test label, verbose: success
18234 iamalabel
18235 0
18236 # Test label, verbose: failure
18237 iamalabel
18238 1
18239 # Test label: multiple arguments
18240 0
18241 # Test label: wildcards
18242 0
18243 " | \
18244   $at_diff - "$at_stdout" || at_failed=:
18245 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
18246 $at_failed && at_fn_log_failure
18247 $at_traceon; }
18248
18249               { set +x
18250 $as_echo "$at_srcdir/label03.at:30:
18251 mkdir oldgnu
18252 (cd oldgnu
18253 TEST_TAR_FORMAT=oldgnu
18254 export TEST_TAR_FORMAT
18255 TAR_OPTIONS=\"-H oldgnu\"
18256 export TAR_OPTIONS
18257 rm -rf *
18258
18259 exec <&-
18260 genfile --file file
18261 tar -c --label='iamalabel' --file iamanarchive file
18262 tar -c --file unlabeled.tar file
18263 decho \"# Display label\"
18264 tar --test-label --file=iamanarchive; echo \$?
18265 decho \"# Display label: unlabeled\"
18266 tar --test-label --file=unlabeled.tar; echo \$?
18267 decho \"# Test label: success\"
18268 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
18269 decho \"# Test label: failure\"
18270 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
18271 decho \"# Test label: unlabeled\"
18272 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
18273 decho \"# Test label, verbose: success\"
18274 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
18275 decho \"# Test label, verbose: failure\"
18276 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
18277 decho \"# Test label: multiple arguments\"
18278 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
18279 decho \"# Test label: wildcards\"
18280 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
18281 )"
18282 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
18283 ( $at_check_trace;
18284 mkdir oldgnu
18285 (cd oldgnu
18286 TEST_TAR_FORMAT=oldgnu
18287 export TEST_TAR_FORMAT
18288 TAR_OPTIONS="-H oldgnu"
18289 export TAR_OPTIONS
18290 rm -rf *
18291
18292 exec <&-
18293 genfile --file file
18294 tar -c --label='iamalabel' --file iamanarchive file
18295 tar -c --file unlabeled.tar file
18296 decho "# Display label"
18297 tar --test-label --file=iamanarchive; echo $?
18298 decho "# Display label: unlabeled"
18299 tar --test-label --file=unlabeled.tar; echo $?
18300 decho "# Test label: success"
18301 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
18302 decho "# Test label: failure"
18303 tar --test-label --file=iamanarchive 'amalabel'; echo $?
18304 decho "# Test label: unlabeled"
18305 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
18306 decho "# Test label, verbose: success"
18307 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
18308 decho "# Test label, verbose: failure"
18309 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
18310 decho "# Test label: multiple arguments"
18311 tar --test-label --file=iamanarchive a iamalabel b; echo $?
18312 decho "# Test label: wildcards"
18313 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
18314 )
18315 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18316 at_status=$? at_failed=false
18317 $at_check_filter
18318 echo >>"$at_stderr"; $as_echo "# Display label
18319 # Display label: unlabeled
18320 # Test label: success
18321 # Test label: failure
18322 # Test label: unlabeled
18323 # Test label, verbose: success
18324 # Test label, verbose: failure
18325 tar: Archive label mismatch
18326 # Test label: multiple arguments
18327 # Test label: wildcards
18328 " | \
18329   $at_diff - "$at_stderr" || at_failed=:
18330 echo >>"$at_stdout"; $as_echo "# Display label
18331 iamalabel
18332 0
18333 # Display label: unlabeled
18334 0
18335 # Test label: success
18336 0
18337 # Test label: failure
18338 1
18339 # Test label: unlabeled
18340 1
18341 # Test label, verbose: success
18342 iamalabel
18343 0
18344 # Test label, verbose: failure
18345 iamalabel
18346 1
18347 # Test label: multiple arguments
18348 0
18349 # Test label: wildcards
18350 0
18351 " | \
18352   $at_diff - "$at_stdout" || at_failed=:
18353 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
18354 $at_failed && at_fn_log_failure
18355 $at_traceon; }
18356
18357               { set +x
18358 $as_echo "$at_srcdir/label03.at:30:
18359 mkdir posix
18360 (cd posix
18361 TEST_TAR_FORMAT=posix
18362 export TEST_TAR_FORMAT
18363 TAR_OPTIONS=\"-H posix\"
18364 export TAR_OPTIONS
18365 rm -rf *
18366
18367 exec <&-
18368 genfile --file file
18369 tar -c --label='iamalabel' --file iamanarchive file
18370 tar -c --file unlabeled.tar file
18371 decho \"# Display label\"
18372 tar --test-label --file=iamanarchive; echo \$?
18373 decho \"# Display label: unlabeled\"
18374 tar --test-label --file=unlabeled.tar; echo \$?
18375 decho \"# Test label: success\"
18376 tar --test-label --file=iamanarchive 'iamalabel'; echo \$?
18377 decho \"# Test label: failure\"
18378 tar --test-label --file=iamanarchive 'amalabel'; echo \$?
18379 decho \"# Test label: unlabeled\"
18380 tar --test-label --file=unlabeled.tar 'amalabel'; echo \$?
18381 decho \"# Test label, verbose: success\"
18382 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$?
18383 decho \"# Test label, verbose: failure\"
18384 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$?
18385 decho \"# Test label: multiple arguments\"
18386 tar --test-label --file=iamanarchive a iamalabel b; echo \$?
18387 decho \"# Test label: wildcards\"
18388 tar --test-label --file=iamanarchive --wildcards '*label'; echo \$?
18389 )"
18390 at_fn_check_prepare_notrace 'an embedded newline' "label03.at:30"
18391 ( $at_check_trace;
18392 mkdir posix
18393 (cd posix
18394 TEST_TAR_FORMAT=posix
18395 export TEST_TAR_FORMAT
18396 TAR_OPTIONS="-H posix"
18397 export TAR_OPTIONS
18398 rm -rf *
18399
18400 exec <&-
18401 genfile --file file
18402 tar -c --label='iamalabel' --file iamanarchive file
18403 tar -c --file unlabeled.tar file
18404 decho "# Display label"
18405 tar --test-label --file=iamanarchive; echo $?
18406 decho "# Display label: unlabeled"
18407 tar --test-label --file=unlabeled.tar; echo $?
18408 decho "# Test label: success"
18409 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
18410 decho "# Test label: failure"
18411 tar --test-label --file=iamanarchive 'amalabel'; echo $?
18412 decho "# Test label: unlabeled"
18413 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
18414 decho "# Test label, verbose: success"
18415 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
18416 decho "# Test label, verbose: failure"
18417 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
18418 decho "# Test label: multiple arguments"
18419 tar --test-label --file=iamanarchive a iamalabel b; echo $?
18420 decho "# Test label: wildcards"
18421 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
18422 )
18423 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18424 at_status=$? at_failed=false
18425 $at_check_filter
18426 echo >>"$at_stderr"; $as_echo "# Display label
18427 # Display label: unlabeled
18428 # Test label: success
18429 # Test label: failure
18430 # Test label: unlabeled
18431 # Test label, verbose: success
18432 # Test label, verbose: failure
18433 tar: Archive label mismatch
18434 # Test label: multiple arguments
18435 # Test label: wildcards
18436 " | \
18437   $at_diff - "$at_stderr" || at_failed=:
18438 echo >>"$at_stdout"; $as_echo "# Display label
18439 iamalabel
18440 0
18441 # Display label: unlabeled
18442 0
18443 # Test label: success
18444 0
18445 # Test label: failure
18446 1
18447 # Test label: unlabeled
18448 1
18449 # Test label, verbose: success
18450 iamalabel
18451 0
18452 # Test label, verbose: failure
18453 iamalabel
18454 1
18455 # Test label: multiple arguments
18456 0
18457 # Test label: wildcards
18458 0
18459 " | \
18460   $at_diff - "$at_stdout" || at_failed=:
18461 at_fn_check_status 0 $at_status "$at_srcdir/label03.at:30"
18462 $at_failed && at_fn_log_failure
18463 $at_traceon; }
18464
18465
18466
18467
18468   set +x
18469   $at_times_p && times >"$at_times_file"
18470 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18471 read at_status <"$at_status_file"
18472 #AT_STOP_79
18473 #AT_START_80
18474 at_fn_group_banner 80 'label04.at:27' \
18475   "label with non-create option" "                   " 10
18476 at_xfail=no
18477       test -f $XFAILFILE && at_xfail=yes
18478 (
18479   $as_echo "80. $at_setup_line: testing $at_desc ..."
18480   $at_traceon
18481
18482
18483
18484
18485
18486   { set +x
18487 $as_echo "$at_srcdir/label04.at:30:
18488 mkdir gnu
18489 (cd gnu
18490 TEST_TAR_FORMAT=gnu
18491 export TEST_TAR_FORMAT
18492 TAR_OPTIONS=\"-H gnu\"
18493 export TAR_OPTIONS
18494 rm -rf *
18495
18496 exec <&-
18497 genfile --file file
18498 decho \"# Create volume\"
18499 tar -c -f archive --label='New volume' file
18500 decho \"# Update: wrong label\"
18501 tar -rf archive --label='My volume' file; echo \$?
18502 decho \"# Update: right label\"
18503 tar -rf archive --label='New volume' file
18504 )"
18505 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
18506 ( $at_check_trace;
18507 mkdir gnu
18508 (cd gnu
18509 TEST_TAR_FORMAT=gnu
18510 export TEST_TAR_FORMAT
18511 TAR_OPTIONS="-H gnu"
18512 export TAR_OPTIONS
18513 rm -rf *
18514
18515 exec <&-
18516 genfile --file file
18517 decho "# Create volume"
18518 tar -c -f archive --label='New volume' file
18519 decho "# Update: wrong label"
18520 tar -rf archive --label='My volume' file; echo $?
18521 decho "# Update: right label"
18522 tar -rf archive --label='New volume' file
18523 )
18524 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18525 at_status=$? at_failed=false
18526 $at_check_filter
18527 echo >>"$at_stderr"; $as_echo "# Create volume
18528 # Update: wrong label
18529 tar: Volume 'New volume' does not match 'My volume'
18530 tar: Error is not recoverable: exiting now
18531 # Update: right label
18532 " | \
18533   $at_diff - "$at_stderr" || at_failed=:
18534 echo >>"$at_stdout"; $as_echo "# Create volume
18535 # Update: wrong label
18536 2
18537 # Update: right label
18538 " | \
18539   $at_diff - "$at_stdout" || at_failed=:
18540 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
18541 $at_failed && at_fn_log_failure
18542 $at_traceon; }
18543
18544               { set +x
18545 $as_echo "$at_srcdir/label04.at:30:
18546 mkdir oldgnu
18547 (cd oldgnu
18548 TEST_TAR_FORMAT=oldgnu
18549 export TEST_TAR_FORMAT
18550 TAR_OPTIONS=\"-H oldgnu\"
18551 export TAR_OPTIONS
18552 rm -rf *
18553
18554 exec <&-
18555 genfile --file file
18556 decho \"# Create volume\"
18557 tar -c -f archive --label='New volume' file
18558 decho \"# Update: wrong label\"
18559 tar -rf archive --label='My volume' file; echo \$?
18560 decho \"# Update: right label\"
18561 tar -rf archive --label='New volume' file
18562 )"
18563 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
18564 ( $at_check_trace;
18565 mkdir oldgnu
18566 (cd oldgnu
18567 TEST_TAR_FORMAT=oldgnu
18568 export TEST_TAR_FORMAT
18569 TAR_OPTIONS="-H oldgnu"
18570 export TAR_OPTIONS
18571 rm -rf *
18572
18573 exec <&-
18574 genfile --file file
18575 decho "# Create volume"
18576 tar -c -f archive --label='New volume' file
18577 decho "# Update: wrong label"
18578 tar -rf archive --label='My volume' file; echo $?
18579 decho "# Update: right label"
18580 tar -rf archive --label='New volume' file
18581 )
18582 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18583 at_status=$? at_failed=false
18584 $at_check_filter
18585 echo >>"$at_stderr"; $as_echo "# Create volume
18586 # Update: wrong label
18587 tar: Volume 'New volume' does not match 'My volume'
18588 tar: Error is not recoverable: exiting now
18589 # Update: right label
18590 " | \
18591   $at_diff - "$at_stderr" || at_failed=:
18592 echo >>"$at_stdout"; $as_echo "# Create volume
18593 # Update: wrong label
18594 2
18595 # Update: right label
18596 " | \
18597   $at_diff - "$at_stdout" || at_failed=:
18598 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
18599 $at_failed && at_fn_log_failure
18600 $at_traceon; }
18601
18602               { set +x
18603 $as_echo "$at_srcdir/label04.at:30:
18604 mkdir posix
18605 (cd posix
18606 TEST_TAR_FORMAT=posix
18607 export TEST_TAR_FORMAT
18608 TAR_OPTIONS=\"-H posix\"
18609 export TAR_OPTIONS
18610 rm -rf *
18611
18612 exec <&-
18613 genfile --file file
18614 decho \"# Create volume\"
18615 tar -c -f archive --label='New volume' file
18616 decho \"# Update: wrong label\"
18617 tar -rf archive --label='My volume' file; echo \$?
18618 decho \"# Update: right label\"
18619 tar -rf archive --label='New volume' file
18620 )"
18621 at_fn_check_prepare_notrace 'an embedded newline' "label04.at:30"
18622 ( $at_check_trace;
18623 mkdir posix
18624 (cd posix
18625 TEST_TAR_FORMAT=posix
18626 export TEST_TAR_FORMAT
18627 TAR_OPTIONS="-H posix"
18628 export TAR_OPTIONS
18629 rm -rf *
18630
18631 exec <&-
18632 genfile --file file
18633 decho "# Create volume"
18634 tar -c -f archive --label='New volume' file
18635 decho "# Update: wrong label"
18636 tar -rf archive --label='My volume' file; echo $?
18637 decho "# Update: right label"
18638 tar -rf archive --label='New volume' file
18639 )
18640 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18641 at_status=$? at_failed=false
18642 $at_check_filter
18643 echo >>"$at_stderr"; $as_echo "# Create volume
18644 # Update: wrong label
18645 tar: Volume 'New volume' does not match 'My volume'
18646 tar: Error is not recoverable: exiting now
18647 # Update: right label
18648 " | \
18649   $at_diff - "$at_stderr" || at_failed=:
18650 echo >>"$at_stdout"; $as_echo "# Create volume
18651 # Update: wrong label
18652 2
18653 # Update: right label
18654 " | \
18655   $at_diff - "$at_stdout" || at_failed=:
18656 at_fn_check_status 0 $at_status "$at_srcdir/label04.at:30"
18657 $at_failed && at_fn_log_failure
18658 $at_traceon; }
18659
18660
18661
18662
18663   set +x
18664   $at_times_p && times >"$at_times_file"
18665 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18666 read at_status <"$at_status_file"
18667 #AT_STOP_80
18668 #AT_START_81
18669 at_fn_group_banner 81 'label05.at:24' \
18670   "label with non-create option" "                   " 10
18671 at_xfail=no
18672       test -f $XFAILFILE && at_xfail=yes
18673 (
18674   $as_echo "81. $at_setup_line: testing $at_desc ..."
18675   $at_traceon
18676
18677
18678
18679
18680
18681   { set +x
18682 $as_echo "$at_srcdir/label05.at:27:
18683 mkdir gnu
18684 (cd gnu
18685 TEST_TAR_FORMAT=gnu
18686 export TEST_TAR_FORMAT
18687 TAR_OPTIONS=\"-H gnu\"
18688 export TAR_OPTIONS
18689 rm -rf *
18690
18691 exec <&-
18692 genfile --file file
18693 decho \"# Create volume\"
18694 tar -c -f archive file
18695 decho \"# Update: wrong label\"
18696 tar -rf archive --label='My volume' file; echo \$?
18697 decho \"# Update: right label\"
18698 tar -rf archive file
18699 )"
18700 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
18701 ( $at_check_trace;
18702 mkdir gnu
18703 (cd gnu
18704 TEST_TAR_FORMAT=gnu
18705 export TEST_TAR_FORMAT
18706 TAR_OPTIONS="-H gnu"
18707 export TAR_OPTIONS
18708 rm -rf *
18709
18710 exec <&-
18711 genfile --file file
18712 decho "# Create volume"
18713 tar -c -f archive file
18714 decho "# Update: wrong label"
18715 tar -rf archive --label='My volume' file; echo $?
18716 decho "# Update: right label"
18717 tar -rf archive file
18718 )
18719 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18720 at_status=$? at_failed=false
18721 $at_check_filter
18722 echo >>"$at_stderr"; $as_echo "# Create volume
18723 # Update: wrong label
18724 tar: Archive not labeled to match 'My volume'
18725 tar: Error is not recoverable: exiting now
18726 # Update: right label
18727 " | \
18728   $at_diff - "$at_stderr" || at_failed=:
18729 echo >>"$at_stdout"; $as_echo "# Create volume
18730 # Update: wrong label
18731 2
18732 # Update: right label
18733 " | \
18734   $at_diff - "$at_stdout" || at_failed=:
18735 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
18736 $at_failed && at_fn_log_failure
18737 $at_traceon; }
18738
18739               { set +x
18740 $as_echo "$at_srcdir/label05.at:27:
18741 mkdir oldgnu
18742 (cd oldgnu
18743 TEST_TAR_FORMAT=oldgnu
18744 export TEST_TAR_FORMAT
18745 TAR_OPTIONS=\"-H oldgnu\"
18746 export TAR_OPTIONS
18747 rm -rf *
18748
18749 exec <&-
18750 genfile --file file
18751 decho \"# Create volume\"
18752 tar -c -f archive file
18753 decho \"# Update: wrong label\"
18754 tar -rf archive --label='My volume' file; echo \$?
18755 decho \"# Update: right label\"
18756 tar -rf archive file
18757 )"
18758 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
18759 ( $at_check_trace;
18760 mkdir oldgnu
18761 (cd oldgnu
18762 TEST_TAR_FORMAT=oldgnu
18763 export TEST_TAR_FORMAT
18764 TAR_OPTIONS="-H oldgnu"
18765 export TAR_OPTIONS
18766 rm -rf *
18767
18768 exec <&-
18769 genfile --file file
18770 decho "# Create volume"
18771 tar -c -f archive file
18772 decho "# Update: wrong label"
18773 tar -rf archive --label='My volume' file; echo $?
18774 decho "# Update: right label"
18775 tar -rf archive file
18776 )
18777 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18778 at_status=$? at_failed=false
18779 $at_check_filter
18780 echo >>"$at_stderr"; $as_echo "# Create volume
18781 # Update: wrong label
18782 tar: Archive not labeled to match 'My volume'
18783 tar: Error is not recoverable: exiting now
18784 # Update: right label
18785 " | \
18786   $at_diff - "$at_stderr" || at_failed=:
18787 echo >>"$at_stdout"; $as_echo "# Create volume
18788 # Update: wrong label
18789 2
18790 # Update: right label
18791 " | \
18792   $at_diff - "$at_stdout" || at_failed=:
18793 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
18794 $at_failed && at_fn_log_failure
18795 $at_traceon; }
18796
18797               { set +x
18798 $as_echo "$at_srcdir/label05.at:27:
18799 mkdir posix
18800 (cd posix
18801 TEST_TAR_FORMAT=posix
18802 export TEST_TAR_FORMAT
18803 TAR_OPTIONS=\"-H posix\"
18804 export TAR_OPTIONS
18805 rm -rf *
18806
18807 exec <&-
18808 genfile --file file
18809 decho \"# Create volume\"
18810 tar -c -f archive file
18811 decho \"# Update: wrong label\"
18812 tar -rf archive --label='My volume' file; echo \$?
18813 decho \"# Update: right label\"
18814 tar -rf archive file
18815 )"
18816 at_fn_check_prepare_notrace 'an embedded newline' "label05.at:27"
18817 ( $at_check_trace;
18818 mkdir posix
18819 (cd posix
18820 TEST_TAR_FORMAT=posix
18821 export TEST_TAR_FORMAT
18822 TAR_OPTIONS="-H posix"
18823 export TAR_OPTIONS
18824 rm -rf *
18825
18826 exec <&-
18827 genfile --file file
18828 decho "# Create volume"
18829 tar -c -f archive file
18830 decho "# Update: wrong label"
18831 tar -rf archive --label='My volume' file; echo $?
18832 decho "# Update: right label"
18833 tar -rf archive file
18834 )
18835 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18836 at_status=$? at_failed=false
18837 $at_check_filter
18838 echo >>"$at_stderr"; $as_echo "# Create volume
18839 # Update: wrong label
18840 tar: Archive not labeled to match 'My volume'
18841 tar: Error is not recoverable: exiting now
18842 # Update: right label
18843 " | \
18844   $at_diff - "$at_stderr" || at_failed=:
18845 echo >>"$at_stdout"; $as_echo "# Create volume
18846 # Update: wrong label
18847 2
18848 # Update: right label
18849 " | \
18850   $at_diff - "$at_stdout" || at_failed=:
18851 at_fn_check_status 0 $at_status "$at_srcdir/label05.at:27"
18852 $at_failed && at_fn_log_failure
18853 $at_traceon; }
18854
18855
18856
18857
18858   set +x
18859   $at_times_p && times >"$at_times_file"
18860 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
18861 read at_status <"$at_status_file"
18862 #AT_STOP_81
18863 #AT_START_82
18864 at_fn_group_banner 82 'incremental.at:23' \
18865   "incremental" "                                    " 11
18866 at_xfail=no
18867       test -f $XFAILFILE && at_xfail=yes
18868 (
18869   $as_echo "82. $at_setup_line: testing $at_desc ..."
18870   $at_traceon
18871
18872
18873
18874
18875
18876   { set +x
18877 $as_echo "$at_srcdir/incremental.at:26:
18878 mkdir gnu
18879 (cd gnu
18880 TEST_TAR_FORMAT=gnu
18881 export TEST_TAR_FORMAT
18882 TAR_OPTIONS=\"-H gnu\"
18883 export TAR_OPTIONS
18884 rm -rf *
18885
18886 mkdir structure
18887 echo x >structure/file
18888
18889 # On Nextstep (and perhaps other 4.3BSD systems),
18890 # a newly created file's ctime isn't updated
18891 # until the next sync or stat operation on the file.
18892 ls -l structure/file >/dev/null
18893
18894 # If the time of an initial backup and the creation time of a file contained
18895 # in that backup are the same, the file will be backed up again when an
18896 # incremental backup is done, because the incremental backup backs up
18897 # files created \"on or after\" the initial backup time.  Without the sleep
18898 # command, behaviour of tar becomes variable, depending whether the system
18899 # clock ticked over to the next second between creating the file and
18900 # backing it up.
18901 sleep 1
18902
18903 tar cf archive --listed=list structure
18904 tar cfv archive --listed=list structure
18905 echo separator
18906 # ReiserFS often offsets the timestamps of newly created files
18907 # 1 second to the past.  Try to compensate for it, until a better
18908 # solution is found.
18909 sleep 2
18910 echo y >structure/file
18911 tar cfv archive --listed=list structure
18912 )"
18913 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
18914 ( $at_check_trace;
18915 mkdir gnu
18916 (cd gnu
18917 TEST_TAR_FORMAT=gnu
18918 export TEST_TAR_FORMAT
18919 TAR_OPTIONS="-H gnu"
18920 export TAR_OPTIONS
18921 rm -rf *
18922
18923 mkdir structure
18924 echo x >structure/file
18925
18926 # On Nextstep (and perhaps other 4.3BSD systems),
18927 # a newly created file's ctime isn't updated
18928 # until the next sync or stat operation on the file.
18929 ls -l structure/file >/dev/null
18930
18931 # If the time of an initial backup and the creation time of a file contained
18932 # in that backup are the same, the file will be backed up again when an
18933 # incremental backup is done, because the incremental backup backs up
18934 # files created "on or after" the initial backup time.  Without the sleep
18935 # command, behaviour of tar becomes variable, depending whether the system
18936 # clock ticked over to the next second between creating the file and
18937 # backing it up.
18938 sleep 1
18939
18940 tar cf archive --listed=list structure
18941 tar cfv archive --listed=list structure
18942 echo separator
18943 # ReiserFS often offsets the timestamps of newly created files
18944 # 1 second to the past.  Try to compensate for it, until a better
18945 # solution is found.
18946 sleep 2
18947 echo y >structure/file
18948 tar cfv archive --listed=list structure
18949 )
18950 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
18951 at_status=$? at_failed=false
18952 $at_check_filter
18953 at_fn_diff_devnull "$at_stderr" || at_failed=:
18954 echo >>"$at_stdout"; $as_echo "structure/
18955 separator
18956 structure/
18957 structure/file
18958 " | \
18959   $at_diff - "$at_stdout" || at_failed=:
18960 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
18961 $at_failed && at_fn_log_failure
18962 $at_traceon; }
18963
18964               { set +x
18965 $as_echo "$at_srcdir/incremental.at:26:
18966 mkdir oldgnu
18967 (cd oldgnu
18968 TEST_TAR_FORMAT=oldgnu
18969 export TEST_TAR_FORMAT
18970 TAR_OPTIONS=\"-H oldgnu\"
18971 export TAR_OPTIONS
18972 rm -rf *
18973
18974 mkdir structure
18975 echo x >structure/file
18976
18977 # On Nextstep (and perhaps other 4.3BSD systems),
18978 # a newly created file's ctime isn't updated
18979 # until the next sync or stat operation on the file.
18980 ls -l structure/file >/dev/null
18981
18982 # If the time of an initial backup and the creation time of a file contained
18983 # in that backup are the same, the file will be backed up again when an
18984 # incremental backup is done, because the incremental backup backs up
18985 # files created \"on or after\" the initial backup time.  Without the sleep
18986 # command, behaviour of tar becomes variable, depending whether the system
18987 # clock ticked over to the next second between creating the file and
18988 # backing it up.
18989 sleep 1
18990
18991 tar cf archive --listed=list structure
18992 tar cfv archive --listed=list structure
18993 echo separator
18994 # ReiserFS often offsets the timestamps of newly created files
18995 # 1 second to the past.  Try to compensate for it, until a better
18996 # solution is found.
18997 sleep 2
18998 echo y >structure/file
18999 tar cfv archive --listed=list structure
19000 )"
19001 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
19002 ( $at_check_trace;
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 mkdir structure
19012 echo x >structure/file
19013
19014 # On Nextstep (and perhaps other 4.3BSD systems),
19015 # a newly created file's ctime isn't updated
19016 # until the next sync or stat operation on the file.
19017 ls -l structure/file >/dev/null
19018
19019 # If the time of an initial backup and the creation time of a file contained
19020 # in that backup are the same, the file will be backed up again when an
19021 # incremental backup is done, because the incremental backup backs up
19022 # files created "on or after" the initial backup time.  Without the sleep
19023 # command, behaviour of tar becomes variable, depending whether the system
19024 # clock ticked over to the next second between creating the file and
19025 # backing it up.
19026 sleep 1
19027
19028 tar cf archive --listed=list structure
19029 tar cfv archive --listed=list structure
19030 echo separator
19031 # ReiserFS often offsets the timestamps of newly created files
19032 # 1 second to the past.  Try to compensate for it, until a better
19033 # solution is found.
19034 sleep 2
19035 echo y >structure/file
19036 tar cfv archive --listed=list structure
19037 )
19038 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19039 at_status=$? at_failed=false
19040 $at_check_filter
19041 at_fn_diff_devnull "$at_stderr" || at_failed=:
19042 echo >>"$at_stdout"; $as_echo "structure/
19043 separator
19044 structure/
19045 structure/file
19046 " | \
19047   $at_diff - "$at_stdout" || at_failed=:
19048 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
19049 $at_failed && at_fn_log_failure
19050 $at_traceon; }
19051
19052               { set +x
19053 $as_echo "$at_srcdir/incremental.at:26:
19054 mkdir posix
19055 (cd posix
19056 TEST_TAR_FORMAT=posix
19057 export TEST_TAR_FORMAT
19058 TAR_OPTIONS=\"-H posix\"
19059 export TAR_OPTIONS
19060 rm -rf *
19061
19062 mkdir structure
19063 echo x >structure/file
19064
19065 # On Nextstep (and perhaps other 4.3BSD systems),
19066 # a newly created file's ctime isn't updated
19067 # until the next sync or stat operation on the file.
19068 ls -l structure/file >/dev/null
19069
19070 # If the time of an initial backup and the creation time of a file contained
19071 # in that backup are the same, the file will be backed up again when an
19072 # incremental backup is done, because the incremental backup backs up
19073 # files created \"on or after\" the initial backup time.  Without the sleep
19074 # command, behaviour of tar becomes variable, depending whether the system
19075 # clock ticked over to the next second between creating the file and
19076 # backing it up.
19077 sleep 1
19078
19079 tar cf archive --listed=list structure
19080 tar cfv archive --listed=list structure
19081 echo separator
19082 # ReiserFS often offsets the timestamps of newly created files
19083 # 1 second to the past.  Try to compensate for it, until a better
19084 # solution is found.
19085 sleep 2
19086 echo y >structure/file
19087 tar cfv archive --listed=list structure
19088 )"
19089 at_fn_check_prepare_notrace 'an embedded newline' "incremental.at:26"
19090 ( $at_check_trace;
19091 mkdir posix
19092 (cd posix
19093 TEST_TAR_FORMAT=posix
19094 export TEST_TAR_FORMAT
19095 TAR_OPTIONS="-H posix"
19096 export TAR_OPTIONS
19097 rm -rf *
19098
19099 mkdir structure
19100 echo x >structure/file
19101
19102 # On Nextstep (and perhaps other 4.3BSD systems),
19103 # a newly created file's ctime isn't updated
19104 # until the next sync or stat operation on the file.
19105 ls -l structure/file >/dev/null
19106
19107 # If the time of an initial backup and the creation time of a file contained
19108 # in that backup are the same, the file will be backed up again when an
19109 # incremental backup is done, because the incremental backup backs up
19110 # files created "on or after" the initial backup time.  Without the sleep
19111 # command, behaviour of tar becomes variable, depending whether the system
19112 # clock ticked over to the next second between creating the file and
19113 # backing it up.
19114 sleep 1
19115
19116 tar cf archive --listed=list structure
19117 tar cfv archive --listed=list structure
19118 echo separator
19119 # ReiserFS often offsets the timestamps of newly created files
19120 # 1 second to the past.  Try to compensate for it, until a better
19121 # solution is found.
19122 sleep 2
19123 echo y >structure/file
19124 tar cfv archive --listed=list structure
19125 )
19126 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19127 at_status=$? at_failed=false
19128 $at_check_filter
19129 at_fn_diff_devnull "$at_stderr" || at_failed=:
19130 echo >>"$at_stdout"; $as_echo "structure/
19131 separator
19132 structure/
19133 structure/file
19134 " | \
19135   $at_diff - "$at_stdout" || at_failed=:
19136 at_fn_check_status 0 $at_status "$at_srcdir/incremental.at:26"
19137 $at_failed && at_fn_log_failure
19138 $at_traceon; }
19139
19140
19141
19142
19143   set +x
19144   $at_times_p && times >"$at_times_file"
19145 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19146 read at_status <"$at_status_file"
19147 #AT_STOP_82
19148 #AT_START_83
19149 at_fn_group_banner 83 'incr01.at:27' \
19150   "restore broken symlinks from incremental" "       " 11
19151 at_xfail=no
19152       test -f $XFAILFILE && at_xfail=yes
19153 (
19154   $as_echo "83. $at_setup_line: testing $at_desc ..."
19155   $at_traceon
19156
19157
19158
19159
19160
19161   { set +x
19162 $as_echo "$at_srcdir/incr01.at:30:
19163 mkdir gnu
19164 (cd gnu
19165 TEST_TAR_FORMAT=gnu
19166 export TEST_TAR_FORMAT
19167 TAR_OPTIONS=\"-H gnu\"
19168 export TAR_OPTIONS
19169 rm -rf *
19170
19171 mkdir directory
19172 \$as_ln_s foo directory/bar
19173
19174 tar -cf archive.0 -g db directory
19175 rm directory/bar
19176 tar -cf archive.1 -g db directory
19177
19178 mv directory orig
19179
19180 tar xvfg archive.0 /dev/null --warning=no-timestamp
19181 echo separator
19182 tar xvfg archive.1 /dev/null --warning=no-timestamp
19183 )"
19184 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
19185 ( $at_check_trace;
19186 mkdir gnu
19187 (cd gnu
19188 TEST_TAR_FORMAT=gnu
19189 export TEST_TAR_FORMAT
19190 TAR_OPTIONS="-H gnu"
19191 export TAR_OPTIONS
19192 rm -rf *
19193
19194 mkdir directory
19195 $as_ln_s foo directory/bar
19196
19197 tar -cf archive.0 -g db directory
19198 rm directory/bar
19199 tar -cf archive.1 -g db directory
19200
19201 mv directory orig
19202
19203 tar xvfg archive.0 /dev/null --warning=no-timestamp
19204 echo separator
19205 tar xvfg archive.1 /dev/null --warning=no-timestamp
19206 )
19207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19208 at_status=$? at_failed=false
19209 $at_check_filter
19210 at_fn_diff_devnull "$at_stderr" || at_failed=:
19211 echo >>"$at_stdout"; $as_echo "directory/
19212 directory/bar
19213 separator
19214 directory/
19215 tar: Deleting 'directory/bar'
19216 " | \
19217   $at_diff - "$at_stdout" || at_failed=:
19218 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
19219 $at_failed && at_fn_log_failure
19220 $at_traceon; }
19221
19222               { set +x
19223 $as_echo "$at_srcdir/incr01.at:30:
19224 mkdir oldgnu
19225 (cd oldgnu
19226 TEST_TAR_FORMAT=oldgnu
19227 export TEST_TAR_FORMAT
19228 TAR_OPTIONS=\"-H oldgnu\"
19229 export TAR_OPTIONS
19230 rm -rf *
19231
19232 mkdir directory
19233 \$as_ln_s foo directory/bar
19234
19235 tar -cf archive.0 -g db directory
19236 rm directory/bar
19237 tar -cf archive.1 -g db directory
19238
19239 mv directory orig
19240
19241 tar xvfg archive.0 /dev/null --warning=no-timestamp
19242 echo separator
19243 tar xvfg archive.1 /dev/null --warning=no-timestamp
19244 )"
19245 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
19246 ( $at_check_trace;
19247 mkdir oldgnu
19248 (cd oldgnu
19249 TEST_TAR_FORMAT=oldgnu
19250 export TEST_TAR_FORMAT
19251 TAR_OPTIONS="-H oldgnu"
19252 export TAR_OPTIONS
19253 rm -rf *
19254
19255 mkdir directory
19256 $as_ln_s foo directory/bar
19257
19258 tar -cf archive.0 -g db directory
19259 rm directory/bar
19260 tar -cf archive.1 -g db directory
19261
19262 mv directory orig
19263
19264 tar xvfg archive.0 /dev/null --warning=no-timestamp
19265 echo separator
19266 tar xvfg archive.1 /dev/null --warning=no-timestamp
19267 )
19268 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19269 at_status=$? at_failed=false
19270 $at_check_filter
19271 at_fn_diff_devnull "$at_stderr" || at_failed=:
19272 echo >>"$at_stdout"; $as_echo "directory/
19273 directory/bar
19274 separator
19275 directory/
19276 tar: Deleting 'directory/bar'
19277 " | \
19278   $at_diff - "$at_stdout" || at_failed=:
19279 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
19280 $at_failed && at_fn_log_failure
19281 $at_traceon; }
19282
19283               { set +x
19284 $as_echo "$at_srcdir/incr01.at:30:
19285 mkdir posix
19286 (cd posix
19287 TEST_TAR_FORMAT=posix
19288 export TEST_TAR_FORMAT
19289 TAR_OPTIONS=\"-H posix\"
19290 export TAR_OPTIONS
19291 rm -rf *
19292
19293 mkdir directory
19294 \$as_ln_s foo directory/bar
19295
19296 tar -cf archive.0 -g db directory
19297 rm directory/bar
19298 tar -cf archive.1 -g db directory
19299
19300 mv directory orig
19301
19302 tar xvfg archive.0 /dev/null --warning=no-timestamp
19303 echo separator
19304 tar xvfg archive.1 /dev/null --warning=no-timestamp
19305 )"
19306 at_fn_check_prepare_notrace 'an embedded newline' "incr01.at:30"
19307 ( $at_check_trace;
19308 mkdir posix
19309 (cd posix
19310 TEST_TAR_FORMAT=posix
19311 export TEST_TAR_FORMAT
19312 TAR_OPTIONS="-H posix"
19313 export TAR_OPTIONS
19314 rm -rf *
19315
19316 mkdir directory
19317 $as_ln_s foo directory/bar
19318
19319 tar -cf archive.0 -g db directory
19320 rm directory/bar
19321 tar -cf archive.1 -g db directory
19322
19323 mv directory orig
19324
19325 tar xvfg archive.0 /dev/null --warning=no-timestamp
19326 echo separator
19327 tar xvfg archive.1 /dev/null --warning=no-timestamp
19328 )
19329 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19330 at_status=$? at_failed=false
19331 $at_check_filter
19332 at_fn_diff_devnull "$at_stderr" || at_failed=:
19333 echo >>"$at_stdout"; $as_echo "directory/
19334 directory/bar
19335 separator
19336 directory/
19337 tar: Deleting 'directory/bar'
19338 " | \
19339   $at_diff - "$at_stdout" || at_failed=:
19340 at_fn_check_status 0 $at_status "$at_srcdir/incr01.at:30"
19341 $at_failed && at_fn_log_failure
19342 $at_traceon; }
19343
19344
19345
19346
19347   set +x
19348   $at_times_p && times >"$at_times_file"
19349 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19350 read at_status <"$at_status_file"
19351 #AT_STOP_83
19352 #AT_START_84
19353 at_fn_group_banner 84 'incr02.at:32' \
19354   "restoring timestamps from incremental" "          " 11
19355 at_xfail=no
19356       test -f $XFAILFILE && at_xfail=yes
19357 (
19358   $as_echo "84. $at_setup_line: testing $at_desc ..."
19359   $at_traceon
19360
19361
19362
19363
19364
19365   { set +x
19366 $as_echo "$at_srcdir/incr02.at:35:
19367 mkdir gnu
19368 (cd gnu
19369 TEST_TAR_FORMAT=gnu
19370 export TEST_TAR_FORMAT
19371 TAR_OPTIONS=\"-H gnu\"
19372 export TAR_OPTIONS
19373 rm -rf *
19374
19375 # Create directory structure
19376 mkdir dir
19377 mkdir dir/subdir1
19378 mkdir dir/subdir2
19379 genfile --length 10 --file dir/subdir1/file
19380
19381 # Save mtime for later comparison
19382 genfile --stat=mtime dir/subdir1 > ts
19383
19384 # Create an archive. Using incremental mode makes sure the
19385 # archive will have a directory-first member ordering,
19386 # i.e.:
19387 # dir/
19388 # dir/subdir1/
19389 # dir/subdir2/
19390 # dir/subdir1/foofile
19391 #
19392 # When restoring from this directory structure, 'dir/subdir2/' used to
19393 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19394 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19395 # latter clobbered the directory timestamp.
19396
19397 tar -cf archive -g db dir
19398
19399 # Move away the directory
19400 mv dir orig
19401
19402 # Wait enough time for timestamps to differ in case of failure.
19403 sleep 5
19404
19405 # Restore the directory
19406 tar -xf archive dir
19407
19408 # Check the timestamp
19409 genfile --stat=mtime dir/subdir1 | diff ts -
19410 )"
19411 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
19412 ( $at_check_trace;
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 # Create directory structure
19422 mkdir dir
19423 mkdir dir/subdir1
19424 mkdir dir/subdir2
19425 genfile --length 10 --file dir/subdir1/file
19426
19427 # Save mtime for later comparison
19428 genfile --stat=mtime dir/subdir1 > ts
19429
19430 # Create an archive. Using incremental mode makes sure the
19431 # archive will have a directory-first member ordering,
19432 # i.e.:
19433 # dir/
19434 # dir/subdir1/
19435 # dir/subdir2/
19436 # dir/subdir1/foofile
19437 #
19438 # When restoring from this directory structure, 'dir/subdir2/' used to
19439 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19440 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19441 # latter clobbered the directory timestamp.
19442
19443 tar -cf archive -g db dir
19444
19445 # Move away the directory
19446 mv dir orig
19447
19448 # Wait enough time for timestamps to differ in case of failure.
19449 sleep 5
19450
19451 # Restore the directory
19452 tar -xf archive dir
19453
19454 # Check the timestamp
19455 genfile --stat=mtime dir/subdir1 | diff ts -
19456 )
19457 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19458 at_status=$? at_failed=false
19459 $at_check_filter
19460 at_fn_diff_devnull "$at_stderr" || at_failed=:
19461 at_fn_diff_devnull "$at_stdout" || at_failed=:
19462 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
19463 $at_failed && at_fn_log_failure
19464 $at_traceon; }
19465
19466               { set +x
19467 $as_echo "$at_srcdir/incr02.at:35:
19468 mkdir oldgnu
19469 (cd oldgnu
19470 TEST_TAR_FORMAT=oldgnu
19471 export TEST_TAR_FORMAT
19472 TAR_OPTIONS=\"-H oldgnu\"
19473 export TAR_OPTIONS
19474 rm -rf *
19475
19476 # Create directory structure
19477 mkdir dir
19478 mkdir dir/subdir1
19479 mkdir dir/subdir2
19480 genfile --length 10 --file dir/subdir1/file
19481
19482 # Save mtime for later comparison
19483 genfile --stat=mtime dir/subdir1 > ts
19484
19485 # Create an archive. Using incremental mode makes sure the
19486 # archive will have a directory-first member ordering,
19487 # i.e.:
19488 # dir/
19489 # dir/subdir1/
19490 # dir/subdir2/
19491 # dir/subdir1/foofile
19492 #
19493 # When restoring from this directory structure, 'dir/subdir2/' used to
19494 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19495 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19496 # latter clobbered the directory timestamp.
19497
19498 tar -cf archive -g db dir
19499
19500 # Move away the directory
19501 mv dir orig
19502
19503 # Wait enough time for timestamps to differ in case of failure.
19504 sleep 5
19505
19506 # Restore the directory
19507 tar -xf archive dir
19508
19509 # Check the timestamp
19510 genfile --stat=mtime dir/subdir1 | diff ts -
19511 )"
19512 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
19513 ( $at_check_trace;
19514 mkdir oldgnu
19515 (cd oldgnu
19516 TEST_TAR_FORMAT=oldgnu
19517 export TEST_TAR_FORMAT
19518 TAR_OPTIONS="-H oldgnu"
19519 export TAR_OPTIONS
19520 rm -rf *
19521
19522 # Create directory structure
19523 mkdir dir
19524 mkdir dir/subdir1
19525 mkdir dir/subdir2
19526 genfile --length 10 --file dir/subdir1/file
19527
19528 # Save mtime for later comparison
19529 genfile --stat=mtime dir/subdir1 > ts
19530
19531 # Create an archive. Using incremental mode makes sure the
19532 # archive will have a directory-first member ordering,
19533 # i.e.:
19534 # dir/
19535 # dir/subdir1/
19536 # dir/subdir2/
19537 # dir/subdir1/foofile
19538 #
19539 # When restoring from this directory structure, 'dir/subdir2/' used to
19540 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19541 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19542 # latter clobbered the directory timestamp.
19543
19544 tar -cf archive -g db dir
19545
19546 # Move away the directory
19547 mv dir orig
19548
19549 # Wait enough time for timestamps to differ in case of failure.
19550 sleep 5
19551
19552 # Restore the directory
19553 tar -xf archive dir
19554
19555 # Check the timestamp
19556 genfile --stat=mtime dir/subdir1 | diff ts -
19557 )
19558 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19559 at_status=$? at_failed=false
19560 $at_check_filter
19561 at_fn_diff_devnull "$at_stderr" || at_failed=:
19562 at_fn_diff_devnull "$at_stdout" || at_failed=:
19563 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
19564 $at_failed && at_fn_log_failure
19565 $at_traceon; }
19566
19567               { set +x
19568 $as_echo "$at_srcdir/incr02.at:35:
19569 mkdir posix
19570 (cd posix
19571 TEST_TAR_FORMAT=posix
19572 export TEST_TAR_FORMAT
19573 TAR_OPTIONS=\"-H posix\"
19574 export TAR_OPTIONS
19575 rm -rf *
19576
19577 # Create directory structure
19578 mkdir dir
19579 mkdir dir/subdir1
19580 mkdir dir/subdir2
19581 genfile --length 10 --file dir/subdir1/file
19582
19583 # Save mtime for later comparison
19584 genfile --stat=mtime dir/subdir1 > ts
19585
19586 # Create an archive. Using incremental mode makes sure the
19587 # archive will have a directory-first member ordering,
19588 # i.e.:
19589 # dir/
19590 # dir/subdir1/
19591 # dir/subdir2/
19592 # dir/subdir1/foofile
19593 #
19594 # When restoring from this directory structure, 'dir/subdir2/' used to
19595 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19596 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19597 # latter clobbered the directory timestamp.
19598
19599 tar -cf archive -g db dir
19600
19601 # Move away the directory
19602 mv dir orig
19603
19604 # Wait enough time for timestamps to differ in case of failure.
19605 sleep 5
19606
19607 # Restore the directory
19608 tar -xf archive dir
19609
19610 # Check the timestamp
19611 genfile --stat=mtime dir/subdir1 | diff ts -
19612 )"
19613 at_fn_check_prepare_notrace 'an embedded newline' "incr02.at:35"
19614 ( $at_check_trace;
19615 mkdir posix
19616 (cd posix
19617 TEST_TAR_FORMAT=posix
19618 export TEST_TAR_FORMAT
19619 TAR_OPTIONS="-H posix"
19620 export TAR_OPTIONS
19621 rm -rf *
19622
19623 # Create directory structure
19624 mkdir dir
19625 mkdir dir/subdir1
19626 mkdir dir/subdir2
19627 genfile --length 10 --file dir/subdir1/file
19628
19629 # Save mtime for later comparison
19630 genfile --stat=mtime dir/subdir1 > ts
19631
19632 # Create an archive. Using incremental mode makes sure the
19633 # archive will have a directory-first member ordering,
19634 # i.e.:
19635 # dir/
19636 # dir/subdir1/
19637 # dir/subdir2/
19638 # dir/subdir1/foofile
19639 #
19640 # When restoring from this directory structure, 'dir/subdir2/' used to
19641 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
19642 # 'subdir1' prior to restoring 'dir/subdir1/foofile'. Then, restoring the
19643 # latter clobbered the directory timestamp.
19644
19645 tar -cf archive -g db dir
19646
19647 # Move away the directory
19648 mv dir orig
19649
19650 # Wait enough time for timestamps to differ in case of failure.
19651 sleep 5
19652
19653 # Restore the directory
19654 tar -xf archive dir
19655
19656 # Check the timestamp
19657 genfile --stat=mtime dir/subdir1 | diff ts -
19658 )
19659 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19660 at_status=$? at_failed=false
19661 $at_check_filter
19662 at_fn_diff_devnull "$at_stderr" || at_failed=:
19663 at_fn_diff_devnull "$at_stdout" || at_failed=:
19664 at_fn_check_status 0 $at_status "$at_srcdir/incr02.at:35"
19665 $at_failed && at_fn_log_failure
19666 $at_traceon; }
19667
19668
19669
19670
19671   set +x
19672   $at_times_p && times >"$at_times_file"
19673 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19674 read at_status <"$at_status_file"
19675 #AT_STOP_84
19676 #AT_START_85
19677 at_fn_group_banner 85 'listed01.at:26' \
19678   "--listed for individual files" "                  " 11
19679 at_xfail=no
19680       test -f $XFAILFILE && at_xfail=yes
19681 (
19682   $as_echo "85. $at_setup_line: testing $at_desc ..."
19683   $at_traceon
19684
19685
19686
19687
19688
19689   { set +x
19690 $as_echo "$at_srcdir/listed01.at:29:
19691 mkdir gnu
19692 (cd gnu
19693 TEST_TAR_FORMAT=gnu
19694 export TEST_TAR_FORMAT
19695 TAR_OPTIONS=\"-H gnu\"
19696 export TAR_OPTIONS
19697 rm -rf *
19698
19699 mkdir directory
19700 genfile --length 10240 --pattern zeros --file directory/file1
19701 # Let the things settle
19702 sleep 1
19703
19704 tar --create \\
19705     --file=archive.1 \\
19706     --listed-incremental=listing \\
19707     directory/file*
19708
19709 tar tf archive.1 || exit 1
19710
19711 sleep 2
19712
19713 genfile --length 10240 --pattern zeros --file directory/file2
19714
19715 echo \"separator\"
19716 cp listing listing.old
19717 tar --create \\
19718     --file=archive.2 \\
19719     --listed-incremental=listing \\
19720     directory/file* || exit 1
19721
19722 tar tf archive.2 || exit 1
19723 )"
19724 at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:29"
19725 ( $at_check_trace;
19726 mkdir gnu
19727 (cd gnu
19728 TEST_TAR_FORMAT=gnu
19729 export TEST_TAR_FORMAT
19730 TAR_OPTIONS="-H gnu"
19731 export TAR_OPTIONS
19732 rm -rf *
19733
19734 mkdir directory
19735 genfile --length 10240 --pattern zeros --file directory/file1
19736 # Let the things settle
19737 sleep 1
19738
19739 tar --create \
19740     --file=archive.1 \
19741     --listed-incremental=listing \
19742     directory/file*
19743
19744 tar tf archive.1 || exit 1
19745
19746 sleep 2
19747
19748 genfile --length 10240 --pattern zeros --file directory/file2
19749
19750 echo "separator"
19751 cp listing listing.old
19752 tar --create \
19753     --file=archive.2 \
19754     --listed-incremental=listing \
19755     directory/file* || exit 1
19756
19757 tar tf archive.2 || exit 1
19758 )
19759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19760 at_status=$? at_failed=false
19761 $at_check_filter
19762 at_fn_diff_devnull "$at_stderr" || at_failed=:
19763 echo >>"$at_stdout"; $as_echo "directory/file1
19764 separator
19765 directory/file2
19766 " | \
19767   $at_diff - "$at_stdout" || at_failed=:
19768 at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:29"
19769 $at_failed && at_fn_log_failure
19770 $at_traceon; }
19771
19772               { set +x
19773 $as_echo "$at_srcdir/listed01.at:29:
19774 mkdir oldgnu
19775 (cd oldgnu
19776 TEST_TAR_FORMAT=oldgnu
19777 export TEST_TAR_FORMAT
19778 TAR_OPTIONS=\"-H oldgnu\"
19779 export TAR_OPTIONS
19780 rm -rf *
19781
19782 mkdir directory
19783 genfile --length 10240 --pattern zeros --file directory/file1
19784 # Let the things settle
19785 sleep 1
19786
19787 tar --create \\
19788     --file=archive.1 \\
19789     --listed-incremental=listing \\
19790     directory/file*
19791
19792 tar tf archive.1 || exit 1
19793
19794 sleep 2
19795
19796 genfile --length 10240 --pattern zeros --file directory/file2
19797
19798 echo \"separator\"
19799 cp listing listing.old
19800 tar --create \\
19801     --file=archive.2 \\
19802     --listed-incremental=listing \\
19803     directory/file* || exit 1
19804
19805 tar tf archive.2 || exit 1
19806 )"
19807 at_fn_check_prepare_notrace 'an embedded newline' "listed01.at:29"
19808 ( $at_check_trace;
19809 mkdir oldgnu
19810 (cd oldgnu
19811 TEST_TAR_FORMAT=oldgnu
19812 export TEST_TAR_FORMAT
19813 TAR_OPTIONS="-H oldgnu"
19814 export TAR_OPTIONS
19815 rm -rf *
19816
19817 mkdir directory
19818 genfile --length 10240 --pattern zeros --file directory/file1
19819 # Let the things settle
19820 sleep 1
19821
19822 tar --create \
19823     --file=archive.1 \
19824     --listed-incremental=listing \
19825     directory/file*
19826
19827 tar tf archive.1 || exit 1
19828
19829 sleep 2
19830
19831 genfile --length 10240 --pattern zeros --file directory/file2
19832
19833 echo "separator"
19834 cp listing listing.old
19835 tar --create \
19836     --file=archive.2 \
19837     --listed-incremental=listing \
19838     directory/file* || exit 1
19839
19840 tar tf archive.2 || exit 1
19841 )
19842 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
19843 at_status=$? at_failed=false
19844 $at_check_filter
19845 at_fn_diff_devnull "$at_stderr" || at_failed=:
19846 echo >>"$at_stdout"; $as_echo "directory/file1
19847 separator
19848 directory/file2
19849 " | \
19850   $at_diff - "$at_stdout" || at_failed=:
19851 at_fn_check_status 0 $at_status "$at_srcdir/listed01.at:29"
19852 $at_failed && at_fn_log_failure
19853 $at_traceon; }
19854
19855
19856
19857
19858   set +x
19859   $at_times_p && times >"$at_times_file"
19860 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
19861 read at_status <"$at_status_file"
19862 #AT_STOP_85
19863 #AT_START_86
19864 at_fn_group_banner 86 'listed02.at:28' \
19865   "working --listed" "                               " 11
19866 at_xfail=no
19867       test -f $XFAILFILE && at_xfail=yes
19868 (
19869   $as_echo "86. $at_setup_line: testing $at_desc ..."
19870   $at_traceon
19871
19872
19873
19874
19875
19876   { set +x
19877 $as_echo "$at_srcdir/listed02.at:31:
19878 mkdir gnu
19879 (cd gnu
19880 TEST_TAR_FORMAT=gnu
19881 export TEST_TAR_FORMAT
19882 TAR_OPTIONS=\"-H gnu\"
19883 export TAR_OPTIONS
19884 rm -rf *
19885
19886
19887 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
19888
19889 echo Create directories
19890
19891 mkdir tart
19892 sleep 1
19893 mkdir tart/c0
19894 sleep 1
19895 mkdir tart/c1
19896 sleep 1
19897
19898 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
19899 do
19900   echo File \$file > \$file
19901   sleep 1
19902 done
19903
19904 sleep 1
19905 echo Creating main archive
19906 echo >&2 \"Creating main archive\"
19907 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
19908
19909 # The above prints two lines to stderr announcing the new directories c0 and c1.
19910 # Ensure that they appear in this script's stderr in sorted order.
19911 sort err 1>&2; rm -f err
19912
19913 sleep 1
19914 echo Modifying filesystem
19915 rm tart/a1
19916
19917 mv tart/b1 tart/b2
19918 mv tart/c1 tart/c2
19919 touch tart/c2/ca3
19920
19921 echo Directory contents
19922 find tart -print | sort 2>/dev/null
19923
19924 sleep 1
19925 echo Creating incremental archive
19926 echo >&2 \"Creating incremental archive\"
19927 cp -p tart.incr1 tart.incr2
19928 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
19929
19930 sleep 1
19931
19932 rm -rf tart/*
19933 echo Extracting main archive
19934 echo >&2 \"Extracting main archive\"
19935 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
19936 echo Extracting incremental archive
19937 # This command should produce three messages about deletion
19938 # of the existing files, that may appear in any order. Piping
19939 # to sort makes sure we don't depend on any particular ordering.
19940 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
19941
19942 echo Final files:
19943 find tart -print | sort 2>/dev/null
19944 )"
19945 at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:31"
19946 ( $at_check_trace;
19947 mkdir gnu
19948 (cd gnu
19949 TEST_TAR_FORMAT=gnu
19950 export TEST_TAR_FORMAT
19951 TAR_OPTIONS="-H gnu"
19952 export TAR_OPTIONS
19953 rm -rf *
19954
19955
19956 test -z "`sort < /dev/null 2>&1`" || exit 77
19957
19958 echo Create directories
19959
19960 mkdir tart
19961 sleep 1
19962 mkdir tart/c0
19963 sleep 1
19964 mkdir tart/c1
19965 sleep 1
19966
19967 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
19968 do
19969   echo File $file > $file
19970   sleep 1
19971 done
19972
19973 sleep 1
19974 echo Creating main archive
19975 echo >&2 "Creating main archive"
19976 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
19977
19978 # The above prints two lines to stderr announcing the new directories c0 and c1.
19979 # Ensure that they appear in this script's stderr in sorted order.
19980 sort err 1>&2; rm -f err
19981
19982 sleep 1
19983 echo Modifying filesystem
19984 rm tart/a1
19985
19986 mv tart/b1 tart/b2
19987 mv tart/c1 tart/c2
19988 touch tart/c2/ca3
19989
19990 echo Directory contents
19991 find tart -print | sort 2>/dev/null
19992
19993 sleep 1
19994 echo Creating incremental archive
19995 echo >&2 "Creating incremental archive"
19996 cp -p tart.incr1 tart.incr2
19997 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
19998
19999 sleep 1
20000
20001 rm -rf tart/*
20002 echo Extracting main archive
20003 echo >&2 "Extracting main archive"
20004 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
20005 echo Extracting incremental archive
20006 # This command should produce three messages about deletion
20007 # of the existing files, that may appear in any order. Piping
20008 # to sort makes sure we don't depend on any particular ordering.
20009 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
20010
20011 echo Final files:
20012 find tart -print | sort 2>/dev/null
20013 )
20014 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20015 at_status=$? at_failed=false
20016 $at_check_filter
20017 echo >>"$at_stderr"; $as_echo "Creating main archive
20018 tar: tart/c0: Directory is new
20019 tar: tart/c1: Directory is new
20020 tar: tart: Directory is new
20021 Creating incremental archive
20022 tar: tart/c2: Directory has been renamed from 'tart/c1'
20023 Extracting main archive
20024 " | \
20025   $at_diff - "$at_stderr" || at_failed=:
20026 echo >>"$at_stdout"; $as_echo "Create directories
20027 Creating main archive
20028 tart/
20029 tart/c0/
20030 tart/c1/
20031 tart/a1
20032 tart/b1
20033 tart/c0/cq1
20034 tart/c0/cq2
20035 tart/c1/ca1
20036 tart/c1/ca2
20037 Modifying filesystem
20038 Directory contents
20039 tart
20040 tart/b2
20041 tart/c0
20042 tart/c0/cq1
20043 tart/c0/cq2
20044 tart/c2
20045 tart/c2/ca1
20046 tart/c2/ca2
20047 tart/c2/ca3
20048 Creating incremental archive
20049 tart/
20050 tart/c0/
20051 tart/c2/
20052 tart/b2
20053 tart/c2/ca3
20054 Extracting main archive
20055 tart/
20056 tart/c0/
20057 tart/c1/
20058 tart/a1
20059 tart/b1
20060 tart/c0/cq1
20061 tart/c0/cq2
20062 tart/c1/ca1
20063 tart/c1/ca2
20064 Extracting incremental archive
20065 tar: Deleting 'tart/a1'
20066 tar: Deleting 'tart/b1'
20067 tart/
20068 tart/b2
20069 tart/c0/
20070 tart/c2/
20071 tart/c2/ca3
20072 Final files:
20073 tart
20074 tart/b2
20075 tart/c0
20076 tart/c0/cq1
20077 tart/c0/cq2
20078 tart/c2
20079 tart/c2/ca1
20080 tart/c2/ca2
20081 tart/c2/ca3
20082 " | \
20083   $at_diff - "$at_stdout" || at_failed=:
20084 at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:31"
20085 $at_failed && at_fn_log_failure
20086 $at_traceon; }
20087
20088               { set +x
20089 $as_echo "$at_srcdir/listed02.at:31:
20090 mkdir oldgnu
20091 (cd oldgnu
20092 TEST_TAR_FORMAT=oldgnu
20093 export TEST_TAR_FORMAT
20094 TAR_OPTIONS=\"-H oldgnu\"
20095 export TAR_OPTIONS
20096 rm -rf *
20097
20098
20099 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
20100
20101 echo Create directories
20102
20103 mkdir tart
20104 sleep 1
20105 mkdir tart/c0
20106 sleep 1
20107 mkdir tart/c1
20108 sleep 1
20109
20110 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
20111 do
20112   echo File \$file > \$file
20113   sleep 1
20114 done
20115
20116 sleep 1
20117 echo Creating main archive
20118 echo >&2 \"Creating main archive\"
20119 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
20120
20121 # The above prints two lines to stderr announcing the new directories c0 and c1.
20122 # Ensure that they appear in this script's stderr in sorted order.
20123 sort err 1>&2; rm -f err
20124
20125 sleep 1
20126 echo Modifying filesystem
20127 rm tart/a1
20128
20129 mv tart/b1 tart/b2
20130 mv tart/c1 tart/c2
20131 touch tart/c2/ca3
20132
20133 echo Directory contents
20134 find tart -print | sort 2>/dev/null
20135
20136 sleep 1
20137 echo Creating incremental archive
20138 echo >&2 \"Creating incremental archive\"
20139 cp -p tart.incr1 tart.incr2
20140 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
20141
20142 sleep 1
20143
20144 rm -rf tart/*
20145 echo Extracting main archive
20146 echo >&2 \"Extracting main archive\"
20147 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
20148 echo Extracting incremental archive
20149 # This command should produce three messages about deletion
20150 # of the existing files, that may appear in any order. Piping
20151 # to sort makes sure we don't depend on any particular ordering.
20152 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
20153
20154 echo Final files:
20155 find tart -print | sort 2>/dev/null
20156 )"
20157 at_fn_check_prepare_notrace 'a `...` command substitution' "listed02.at:31"
20158 ( $at_check_trace;
20159 mkdir oldgnu
20160 (cd oldgnu
20161 TEST_TAR_FORMAT=oldgnu
20162 export TEST_TAR_FORMAT
20163 TAR_OPTIONS="-H oldgnu"
20164 export TAR_OPTIONS
20165 rm -rf *
20166
20167
20168 test -z "`sort < /dev/null 2>&1`" || exit 77
20169
20170 echo Create directories
20171
20172 mkdir tart
20173 sleep 1
20174 mkdir tart/c0
20175 sleep 1
20176 mkdir tart/c1
20177 sleep 1
20178
20179 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
20180 do
20181   echo File $file > $file
20182   sleep 1
20183 done
20184
20185 sleep 1
20186 echo Creating main archive
20187 echo >&2 "Creating main archive"
20188 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
20189
20190 # The above prints two lines to stderr announcing the new directories c0 and c1.
20191 # Ensure that they appear in this script's stderr in sorted order.
20192 sort err 1>&2; rm -f err
20193
20194 sleep 1
20195 echo Modifying filesystem
20196 rm tart/a1
20197
20198 mv tart/b1 tart/b2
20199 mv tart/c1 tart/c2
20200 touch tart/c2/ca3
20201
20202 echo Directory contents
20203 find tart -print | sort 2>/dev/null
20204
20205 sleep 1
20206 echo Creating incremental archive
20207 echo >&2 "Creating incremental archive"
20208 cp -p tart.incr1 tart.incr2
20209 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
20210
20211 sleep 1
20212
20213 rm -rf tart/*
20214 echo Extracting main archive
20215 echo >&2 "Extracting main archive"
20216 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
20217 echo Extracting incremental archive
20218 # This command should produce three messages about deletion
20219 # of the existing files, that may appear in any order. Piping
20220 # to sort makes sure we don't depend on any particular ordering.
20221 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
20222
20223 echo Final files:
20224 find tart -print | sort 2>/dev/null
20225 )
20226 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20227 at_status=$? at_failed=false
20228 $at_check_filter
20229 echo >>"$at_stderr"; $as_echo "Creating main archive
20230 tar: tart/c0: Directory is new
20231 tar: tart/c1: Directory is new
20232 tar: tart: Directory is new
20233 Creating incremental archive
20234 tar: tart/c2: Directory has been renamed from 'tart/c1'
20235 Extracting main archive
20236 " | \
20237   $at_diff - "$at_stderr" || at_failed=:
20238 echo >>"$at_stdout"; $as_echo "Create directories
20239 Creating main archive
20240 tart/
20241 tart/c0/
20242 tart/c1/
20243 tart/a1
20244 tart/b1
20245 tart/c0/cq1
20246 tart/c0/cq2
20247 tart/c1/ca1
20248 tart/c1/ca2
20249 Modifying filesystem
20250 Directory contents
20251 tart
20252 tart/b2
20253 tart/c0
20254 tart/c0/cq1
20255 tart/c0/cq2
20256 tart/c2
20257 tart/c2/ca1
20258 tart/c2/ca2
20259 tart/c2/ca3
20260 Creating incremental archive
20261 tart/
20262 tart/c0/
20263 tart/c2/
20264 tart/b2
20265 tart/c2/ca3
20266 Extracting main archive
20267 tart/
20268 tart/c0/
20269 tart/c1/
20270 tart/a1
20271 tart/b1
20272 tart/c0/cq1
20273 tart/c0/cq2
20274 tart/c1/ca1
20275 tart/c1/ca2
20276 Extracting incremental archive
20277 tar: Deleting 'tart/a1'
20278 tar: Deleting 'tart/b1'
20279 tart/
20280 tart/b2
20281 tart/c0/
20282 tart/c2/
20283 tart/c2/ca3
20284 Final files:
20285 tart
20286 tart/b2
20287 tart/c0
20288 tart/c0/cq1
20289 tart/c0/cq2
20290 tart/c2
20291 tart/c2/ca1
20292 tart/c2/ca2
20293 tart/c2/ca3
20294 " | \
20295   $at_diff - "$at_stdout" || at_failed=:
20296 at_fn_check_status 0 $at_status "$at_srcdir/listed02.at:31"
20297 $at_failed && at_fn_log_failure
20298 $at_traceon; }
20299
20300
20301
20302
20303   set +x
20304   $at_times_p && times >"$at_times_file"
20305 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20306 read at_status <"$at_status_file"
20307 #AT_STOP_86
20308 #AT_START_87
20309 at_fn_group_banner 87 'listed03.at:24' \
20310   "incremental dump when the parent directory is unreadable" "" 11
20311 at_xfail=no
20312       test -f $XFAILFILE && at_xfail=yes
20313 (
20314   $as_echo "87. $at_setup_line: testing $at_desc ..."
20315   $at_traceon
20316
20317
20318
20319
20320
20321   { set +x
20322 $as_echo "$at_srcdir/listed03.at:27:
20323 mkdir gnu
20324 (cd gnu
20325 TEST_TAR_FORMAT=gnu
20326 export TEST_TAR_FORMAT
20327 TAR_OPTIONS=\"-H gnu\"
20328 export TAR_OPTIONS
20329 rm -rf *
20330
20331
20332 echo \"test\" > \$\$
20333 chmod 0 \$\$
20334 cat \$\$ > /dev/null 2>&1
20335 result=\$?
20336 rm -f \$\$
20337 test \$result -eq 0 && exit 77
20338
20339
20340 mkdir dir
20341 mkdir dir/sub
20342 mkdir dir/sub/a
20343 genfile --file dir/sub/a/file
20344 cd dir/sub
20345
20346 chmod a-r ..
20347 tar -c -f archive.tar --listed-incremental=db.1 -v a
20348 status=\$?
20349 chmod a+r ..
20350 exit \$status
20351 )"
20352 at_fn_check_prepare_notrace 'an embedded newline' "listed03.at:27"
20353 ( $at_check_trace;
20354 mkdir gnu
20355 (cd gnu
20356 TEST_TAR_FORMAT=gnu
20357 export TEST_TAR_FORMAT
20358 TAR_OPTIONS="-H gnu"
20359 export TAR_OPTIONS
20360 rm -rf *
20361
20362
20363 echo "test" > $$
20364 chmod 0 $$
20365 cat $$ > /dev/null 2>&1
20366 result=$?
20367 rm -f $$
20368 test $result -eq 0 && exit 77
20369
20370
20371 mkdir dir
20372 mkdir dir/sub
20373 mkdir dir/sub/a
20374 genfile --file dir/sub/a/file
20375 cd dir/sub
20376
20377 chmod a-r ..
20378 tar -c -f archive.tar --listed-incremental=db.1 -v a
20379 status=$?
20380 chmod a+r ..
20381 exit $status
20382 )
20383 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20384 at_status=$? at_failed=false
20385 $at_check_filter
20386 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
20387 " | \
20388   $at_diff - "$at_stderr" || at_failed=:
20389 echo >>"$at_stdout"; $as_echo "a/
20390 a/file
20391 " | \
20392   $at_diff - "$at_stdout" || at_failed=:
20393 at_fn_check_status 0 $at_status "$at_srcdir/listed03.at:27"
20394 $at_failed && at_fn_log_failure
20395 $at_traceon; }
20396
20397
20398
20399
20400   set +x
20401   $at_times_p && times >"$at_times_file"
20402 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20403 read at_status <"$at_status_file"
20404 #AT_STOP_87
20405 #AT_START_88
20406 at_fn_group_banner 88 'listed04.at:26' \
20407   "--listed-incremental and --one-file-system" "     " 11
20408 at_xfail=no
20409       test -f $XFAILFILE && at_xfail=yes
20410 (
20411   $as_echo "88. $at_setup_line: testing $at_desc ..."
20412   $at_traceon
20413
20414
20415
20416
20417
20418   { set +x
20419 $as_echo "$at_srcdir/listed04.at:29:
20420 mkdir gnu
20421 (cd gnu
20422 TEST_TAR_FORMAT=gnu
20423 export TEST_TAR_FORMAT
20424 TAR_OPTIONS=\"-H gnu\"
20425 export TAR_OPTIONS
20426 rm -rf *
20427
20428
20429 mkdir dir
20430 echo a >dir/a
20431 echo b >dir/b
20432
20433 tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
20434 tar -tf archive.tar || exit
20435 )"
20436 at_fn_check_prepare_notrace 'an embedded newline' "listed04.at:29"
20437 ( $at_check_trace;
20438 mkdir gnu
20439 (cd gnu
20440 TEST_TAR_FORMAT=gnu
20441 export TEST_TAR_FORMAT
20442 TAR_OPTIONS="-H gnu"
20443 export TAR_OPTIONS
20444 rm -rf *
20445
20446
20447 mkdir dir
20448 echo a >dir/a
20449 echo b >dir/b
20450
20451 tar --one-file-system -cvf archive.tar -g archive.incr dir || exit
20452 tar -tf archive.tar || exit
20453 )
20454 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20455 at_status=$? at_failed=false
20456 $at_check_filter
20457 echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
20458 " | \
20459   $at_diff - "$at_stderr" || at_failed=:
20460 echo >>"$at_stdout"; $as_echo "dir/
20461 dir/a
20462 dir/b
20463 dir/
20464 dir/a
20465 dir/b
20466 " | \
20467   $at_diff - "$at_stdout" || at_failed=:
20468 at_fn_check_status 0 $at_status "$at_srcdir/listed04.at:29"
20469 $at_failed && at_fn_log_failure
20470 $at_traceon; }
20471
20472
20473
20474
20475   set +x
20476   $at_times_p && times >"$at_times_file"
20477 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20478 read at_status <"$at_status_file"
20479 #AT_STOP_88
20480 #AT_START_89
20481 at_fn_group_banner 89 'listed05.at:33' \
20482   "--listed-incremental and remounted directories" " " 11
20483 at_xfail=no
20484       test -f $XFAILFILE && at_xfail=yes
20485 (
20486   $as_echo "89. $at_setup_line: testing $at_desc ..."
20487   $at_traceon
20488
20489
20490
20491
20492
20493   { set +x
20494 $as_echo "$at_srcdir/listed05.at:36:
20495 mkdir gnu
20496 (cd gnu
20497 TEST_TAR_FORMAT=gnu
20498 export TEST_TAR_FORMAT
20499 TAR_OPTIONS=\"-H gnu\"
20500 export TAR_OPTIONS
20501 rm -rf *
20502
20503
20504 echo \"test\" > \$\$
20505 chmod 0 \$\$
20506 cat \$\$ > /dev/null 2>&1
20507 result=\$?
20508 rm -f \$\$
20509 test \$result -eq 0 || exit 77
20510
20511 options=\"-C tartest --create --one-file-system --verbose\"
20512 rm -rf archive-01.snar archive-01.tar tartest subdir
20513
20514 # Create initial structure
20515 mkdir tartest
20516 echo \"hi\" > tartest/top-level-file
20517 mkdir tartest/subdir
20518 echo \"hi\" > tartest/subdir/subdir-file
20519
20520 echo \"# Level 0\"
20521 tar \$options --file archive-0.tar --listed-incremental=archive-0.snar .
20522
20523 echo \"# Remount\"
20524 mv tartest/subdir .
20525 mkdir tartest/subdir
20526 mount -t ramfs none tartest/subdir || exit 77
20527 tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
20528
20529 echo \"# Level 1\"
20530 cp archive-0.snar archive-1.snar
20531 tar \$options --file archive-1.tar --listed-incremental=archive-1.snar .
20532
20533 umount tartest/subdir
20534 )"
20535 at_fn_check_prepare_notrace 'an embedded newline' "listed05.at:36"
20536 ( $at_check_trace;
20537 mkdir gnu
20538 (cd gnu
20539 TEST_TAR_FORMAT=gnu
20540 export TEST_TAR_FORMAT
20541 TAR_OPTIONS="-H gnu"
20542 export TAR_OPTIONS
20543 rm -rf *
20544
20545
20546 echo "test" > $$
20547 chmod 0 $$
20548 cat $$ > /dev/null 2>&1
20549 result=$?
20550 rm -f $$
20551 test $result -eq 0 || exit 77
20552
20553 options="-C tartest --create --one-file-system --verbose"
20554 rm -rf archive-01.snar archive-01.tar tartest subdir
20555
20556 # Create initial structure
20557 mkdir tartest
20558 echo "hi" > tartest/top-level-file
20559 mkdir tartest/subdir
20560 echo "hi" > tartest/subdir/subdir-file
20561
20562 echo "# Level 0"
20563 tar $options --file archive-0.tar --listed-incremental=archive-0.snar .
20564
20565 echo "# Remount"
20566 mv tartest/subdir .
20567 mkdir tartest/subdir
20568 mount -t ramfs none tartest/subdir || exit 77
20569 tar -C subdir -c -f - . | tar -C tartest/subdir -x -f -
20570
20571 echo "# Level 1"
20572 cp archive-0.snar archive-1.snar
20573 tar $options --file archive-1.tar --listed-incremental=archive-1.snar .
20574
20575 umount tartest/subdir
20576 )
20577 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20578 at_status=$? at_failed=false
20579 $at_check_filter
20580 echo >>"$at_stderr"; $as_echo "tar: .: Directory is new
20581 tar: ./subdir: Directory is new
20582 tar: ./subdir: directory is on a different filesystem; not dumped
20583 " | \
20584   $at_diff - "$at_stderr" || at_failed=:
20585 echo >>"$at_stdout"; $as_echo "# Level 0
20586 ./
20587 ./subdir/
20588 ./top-level-file
20589 ./subdir/subdir-file
20590 # Remount
20591 # Level 1
20592 ./
20593 ./subdir/
20594 " | \
20595   $at_diff - "$at_stdout" || at_failed=:
20596 at_fn_check_status 0 $at_status "$at_srcdir/listed05.at:36"
20597 $at_failed && at_fn_log_failure
20598 $at_traceon; }
20599
20600
20601
20602
20603   set +x
20604   $at_times_p && times >"$at_times_file"
20605 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20606 read at_status <"$at_status_file"
20607 #AT_STOP_89
20608 #AT_START_90
20609 at_fn_group_banner 90 'incr03.at:28' \
20610   "renamed files in incrementals" "                  " 11
20611 at_xfail=no
20612       test -f $XFAILFILE && at_xfail=yes
20613 (
20614   $as_echo "90. $at_setup_line: testing $at_desc ..."
20615   $at_traceon
20616
20617
20618
20619
20620
20621   { set +x
20622 $as_echo "$at_srcdir/incr03.at:31:
20623 mkdir gnu
20624 (cd gnu
20625 TEST_TAR_FORMAT=gnu
20626 export TEST_TAR_FORMAT
20627 TAR_OPTIONS=\"-H gnu\"
20628 export TAR_OPTIONS
20629 rm -rf *
20630
20631
20632 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
20633
20634 mkdir directory
20635 genfile --file=directory/x
20636 genfile --file=directory/y
20637
20638 sleep 1
20639
20640 tar -cf archive.1 -g db directory
20641
20642 mv directory/x directory/z
20643 cp db db.old
20644 tar -cf archive.2 -g db directory
20645
20646 mv directory orig
20647
20648 echo Listing of archive.1
20649 tar -tf archive.1 | sort
20650 echo Listing of archive.2
20651 tar -tf archive.2 | sort
20652
20653 echo Directory after first restore
20654 tar -xf archive.1 -g db --warning=no-timestamp
20655 find directory | sort
20656
20657 echo Directory after second restore
20658 tar -xf archive.2 -g db --warning=no-timestamp
20659 find directory | sort
20660 )"
20661 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
20662 ( $at_check_trace;
20663 mkdir gnu
20664 (cd gnu
20665 TEST_TAR_FORMAT=gnu
20666 export TEST_TAR_FORMAT
20667 TAR_OPTIONS="-H gnu"
20668 export TAR_OPTIONS
20669 rm -rf *
20670
20671
20672 test -z "`sort < /dev/null 2>&1`" || exit 77
20673
20674 mkdir directory
20675 genfile --file=directory/x
20676 genfile --file=directory/y
20677
20678 sleep 1
20679
20680 tar -cf archive.1 -g db directory
20681
20682 mv directory/x directory/z
20683 cp db db.old
20684 tar -cf archive.2 -g db directory
20685
20686 mv directory orig
20687
20688 echo Listing of archive.1
20689 tar -tf archive.1 | sort
20690 echo Listing of archive.2
20691 tar -tf archive.2 | sort
20692
20693 echo Directory after first restore
20694 tar -xf archive.1 -g db --warning=no-timestamp
20695 find directory | sort
20696
20697 echo Directory after second restore
20698 tar -xf archive.2 -g db --warning=no-timestamp
20699 find directory | sort
20700 )
20701 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20702 at_status=$? at_failed=false
20703 $at_check_filter
20704 at_fn_diff_devnull "$at_stderr" || at_failed=:
20705 echo >>"$at_stdout"; $as_echo "Listing of archive.1
20706 directory/
20707 directory/x
20708 directory/y
20709 Listing of archive.2
20710 directory/
20711 directory/z
20712 Directory after first restore
20713 directory
20714 directory/x
20715 directory/y
20716 Directory after second restore
20717 directory
20718 directory/y
20719 directory/z
20720 " | \
20721   $at_diff - "$at_stdout" || at_failed=:
20722 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
20723 $at_failed && at_fn_log_failure
20724 $at_traceon; }
20725
20726               { set +x
20727 $as_echo "$at_srcdir/incr03.at:31:
20728 mkdir oldgnu
20729 (cd oldgnu
20730 TEST_TAR_FORMAT=oldgnu
20731 export TEST_TAR_FORMAT
20732 TAR_OPTIONS=\"-H oldgnu\"
20733 export TAR_OPTIONS
20734 rm -rf *
20735
20736
20737 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
20738
20739 mkdir directory
20740 genfile --file=directory/x
20741 genfile --file=directory/y
20742
20743 sleep 1
20744
20745 tar -cf archive.1 -g db directory
20746
20747 mv directory/x directory/z
20748 cp db db.old
20749 tar -cf archive.2 -g db directory
20750
20751 mv directory orig
20752
20753 echo Listing of archive.1
20754 tar -tf archive.1 | sort
20755 echo Listing of archive.2
20756 tar -tf archive.2 | sort
20757
20758 echo Directory after first restore
20759 tar -xf archive.1 -g db --warning=no-timestamp
20760 find directory | sort
20761
20762 echo Directory after second restore
20763 tar -xf archive.2 -g db --warning=no-timestamp
20764 find directory | sort
20765 )"
20766 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
20767 ( $at_check_trace;
20768 mkdir oldgnu
20769 (cd oldgnu
20770 TEST_TAR_FORMAT=oldgnu
20771 export TEST_TAR_FORMAT
20772 TAR_OPTIONS="-H oldgnu"
20773 export TAR_OPTIONS
20774 rm -rf *
20775
20776
20777 test -z "`sort < /dev/null 2>&1`" || exit 77
20778
20779 mkdir directory
20780 genfile --file=directory/x
20781 genfile --file=directory/y
20782
20783 sleep 1
20784
20785 tar -cf archive.1 -g db directory
20786
20787 mv directory/x directory/z
20788 cp db db.old
20789 tar -cf archive.2 -g db directory
20790
20791 mv directory orig
20792
20793 echo Listing of archive.1
20794 tar -tf archive.1 | sort
20795 echo Listing of archive.2
20796 tar -tf archive.2 | sort
20797
20798 echo Directory after first restore
20799 tar -xf archive.1 -g db --warning=no-timestamp
20800 find directory | sort
20801
20802 echo Directory after second restore
20803 tar -xf archive.2 -g db --warning=no-timestamp
20804 find directory | sort
20805 )
20806 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20807 at_status=$? at_failed=false
20808 $at_check_filter
20809 at_fn_diff_devnull "$at_stderr" || at_failed=:
20810 echo >>"$at_stdout"; $as_echo "Listing of archive.1
20811 directory/
20812 directory/x
20813 directory/y
20814 Listing of archive.2
20815 directory/
20816 directory/z
20817 Directory after first restore
20818 directory
20819 directory/x
20820 directory/y
20821 Directory after second restore
20822 directory
20823 directory/y
20824 directory/z
20825 " | \
20826   $at_diff - "$at_stdout" || at_failed=:
20827 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
20828 $at_failed && at_fn_log_failure
20829 $at_traceon; }
20830
20831               { set +x
20832 $as_echo "$at_srcdir/incr03.at:31:
20833 mkdir posix
20834 (cd posix
20835 TEST_TAR_FORMAT=posix
20836 export TEST_TAR_FORMAT
20837 TAR_OPTIONS=\"-H posix\"
20838 export TAR_OPTIONS
20839 rm -rf *
20840
20841
20842 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
20843
20844 mkdir directory
20845 genfile --file=directory/x
20846 genfile --file=directory/y
20847
20848 sleep 1
20849
20850 tar -cf archive.1 -g db directory
20851
20852 mv directory/x directory/z
20853 cp db db.old
20854 tar -cf archive.2 -g db directory
20855
20856 mv directory orig
20857
20858 echo Listing of archive.1
20859 tar -tf archive.1 | sort
20860 echo Listing of archive.2
20861 tar -tf archive.2 | sort
20862
20863 echo Directory after first restore
20864 tar -xf archive.1 -g db --warning=no-timestamp
20865 find directory | sort
20866
20867 echo Directory after second restore
20868 tar -xf archive.2 -g db --warning=no-timestamp
20869 find directory | sort
20870 )"
20871 at_fn_check_prepare_notrace 'a `...` command substitution' "incr03.at:31"
20872 ( $at_check_trace;
20873 mkdir posix
20874 (cd posix
20875 TEST_TAR_FORMAT=posix
20876 export TEST_TAR_FORMAT
20877 TAR_OPTIONS="-H posix"
20878 export TAR_OPTIONS
20879 rm -rf *
20880
20881
20882 test -z "`sort < /dev/null 2>&1`" || exit 77
20883
20884 mkdir directory
20885 genfile --file=directory/x
20886 genfile --file=directory/y
20887
20888 sleep 1
20889
20890 tar -cf archive.1 -g db directory
20891
20892 mv directory/x directory/z
20893 cp db db.old
20894 tar -cf archive.2 -g db directory
20895
20896 mv directory orig
20897
20898 echo Listing of archive.1
20899 tar -tf archive.1 | sort
20900 echo Listing of archive.2
20901 tar -tf archive.2 | sort
20902
20903 echo Directory after first restore
20904 tar -xf archive.1 -g db --warning=no-timestamp
20905 find directory | sort
20906
20907 echo Directory after second restore
20908 tar -xf archive.2 -g db --warning=no-timestamp
20909 find directory | sort
20910 )
20911 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
20912 at_status=$? at_failed=false
20913 $at_check_filter
20914 at_fn_diff_devnull "$at_stderr" || at_failed=:
20915 echo >>"$at_stdout"; $as_echo "Listing of archive.1
20916 directory/
20917 directory/x
20918 directory/y
20919 Listing of archive.2
20920 directory/
20921 directory/z
20922 Directory after first restore
20923 directory
20924 directory/x
20925 directory/y
20926 Directory after second restore
20927 directory
20928 directory/y
20929 directory/z
20930 " | \
20931   $at_diff - "$at_stdout" || at_failed=:
20932 at_fn_check_status 0 $at_status "$at_srcdir/incr03.at:31"
20933 $at_failed && at_fn_log_failure
20934 $at_traceon; }
20935
20936
20937
20938
20939   set +x
20940   $at_times_p && times >"$at_times_file"
20941 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
20942 read at_status <"$at_status_file"
20943 #AT_STOP_90
20944 #AT_START_91
20945 at_fn_group_banner 91 'incr04.at:29' \
20946   "proper icontents initialization" "                " 11
20947 at_xfail=no
20948       test -f $XFAILFILE && at_xfail=yes
20949 (
20950   $as_echo "91. $at_setup_line: testing $at_desc ..."
20951   $at_traceon
20952
20953
20954
20955
20956
20957
20958
20959   { set +x
20960 $as_echo "$at_srcdir/incr04.at:34:
20961 mkdir gnu
20962 (cd gnu
20963 TEST_TAR_FORMAT=gnu
20964 export TEST_TAR_FORMAT
20965 TAR_OPTIONS=\"-H gnu\"
20966 export TAR_OPTIONS
20967 rm -rf *
20968
20969
20970 install-sh -d a/b >/dev/null  || exit 77
20971 awk 'BEGIN {
20972   for (i=1;i<=142;i++)
20973     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
20974   }' < /dev/null | genfile --files-from -
20975
20976 sleep 1
20977
20978 echo \"Initial dump\"
20979 tar cvf a0.tar -g a.sna a
20980 mv a/b a/c
20981 echo \"Incremental dump\"
20982 tar cvf a1.tar -g a.sna a
20983 )"
20984 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
20985 ( $at_check_trace;
20986 mkdir gnu
20987 (cd gnu
20988 TEST_TAR_FORMAT=gnu
20989 export TEST_TAR_FORMAT
20990 TAR_OPTIONS="-H gnu"
20991 export TAR_OPTIONS
20992 rm -rf *
20993
20994
20995 install-sh -d a/b >/dev/null  || exit 77
20996 awk 'BEGIN {
20997   for (i=1;i<=142;i++)
20998     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
20999   }' < /dev/null | genfile --files-from -
21000
21001 sleep 1
21002
21003 echo "Initial dump"
21004 tar cvf a0.tar -g a.sna a
21005 mv a/b a/c
21006 echo "Incremental dump"
21007 tar cvf a1.tar -g a.sna a
21008 )
21009 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21010 at_status=$? at_failed=false
21011 $at_check_filter
21012 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
21013 tar: a/b: Directory is new
21014 tar: a/c: Directory has been renamed from 'a/b'
21015 " | \
21016   $at_diff - "$at_stderr" || at_failed=:
21017 echo >>"$at_stdout"; $as_echo "Initial dump
21018 a/
21019 a/b/
21020 a/b/one_31_chars_long_file_name_001
21021 a/b/one_31_chars_long_file_name_002
21022 a/b/one_31_chars_long_file_name_003
21023 a/b/one_31_chars_long_file_name_004
21024 a/b/one_31_chars_long_file_name_005
21025 a/b/one_31_chars_long_file_name_006
21026 a/b/one_31_chars_long_file_name_007
21027 a/b/one_31_chars_long_file_name_008
21028 a/b/one_31_chars_long_file_name_009
21029 a/b/one_31_chars_long_file_name_010
21030 a/b/one_31_chars_long_file_name_011
21031 a/b/one_31_chars_long_file_name_012
21032 a/b/one_31_chars_long_file_name_013
21033 a/b/one_31_chars_long_file_name_014
21034 a/b/one_31_chars_long_file_name_015
21035 a/b/one_31_chars_long_file_name_016
21036 a/b/one_31_chars_long_file_name_017
21037 a/b/one_31_chars_long_file_name_018
21038 a/b/one_31_chars_long_file_name_019
21039 a/b/one_31_chars_long_file_name_020
21040 a/b/one_31_chars_long_file_name_021
21041 a/b/one_31_chars_long_file_name_022
21042 a/b/one_31_chars_long_file_name_023
21043 a/b/one_31_chars_long_file_name_024
21044 a/b/one_31_chars_long_file_name_025
21045 a/b/one_31_chars_long_file_name_026
21046 a/b/one_31_chars_long_file_name_027
21047 a/b/one_31_chars_long_file_name_028
21048 a/b/one_31_chars_long_file_name_029
21049 a/b/one_31_chars_long_file_name_030
21050 a/b/one_31_chars_long_file_name_031
21051 a/b/one_31_chars_long_file_name_032
21052 a/b/one_31_chars_long_file_name_033
21053 a/b/one_31_chars_long_file_name_034
21054 a/b/one_31_chars_long_file_name_035
21055 a/b/one_31_chars_long_file_name_036
21056 a/b/one_31_chars_long_file_name_037
21057 a/b/one_31_chars_long_file_name_038
21058 a/b/one_31_chars_long_file_name_039
21059 a/b/one_31_chars_long_file_name_040
21060 a/b/one_31_chars_long_file_name_041
21061 a/b/one_31_chars_long_file_name_042
21062 a/b/one_31_chars_long_file_name_043
21063 a/b/one_31_chars_long_file_name_044
21064 a/b/one_31_chars_long_file_name_045
21065 a/b/one_31_chars_long_file_name_046
21066 a/b/one_31_chars_long_file_name_047
21067 a/b/one_31_chars_long_file_name_048
21068 a/b/one_31_chars_long_file_name_049
21069 a/b/one_31_chars_long_file_name_050
21070 a/b/one_31_chars_long_file_name_051
21071 a/b/one_31_chars_long_file_name_052
21072 a/b/one_31_chars_long_file_name_053
21073 a/b/one_31_chars_long_file_name_054
21074 a/b/one_31_chars_long_file_name_055
21075 a/b/one_31_chars_long_file_name_056
21076 a/b/one_31_chars_long_file_name_057
21077 a/b/one_31_chars_long_file_name_058
21078 a/b/one_31_chars_long_file_name_059
21079 a/b/one_31_chars_long_file_name_060
21080 a/b/one_31_chars_long_file_name_061
21081 a/b/one_31_chars_long_file_name_062
21082 a/b/one_31_chars_long_file_name_063
21083 a/b/one_31_chars_long_file_name_064
21084 a/b/one_31_chars_long_file_name_065
21085 a/b/one_31_chars_long_file_name_066
21086 a/b/one_31_chars_long_file_name_067
21087 a/b/one_31_chars_long_file_name_068
21088 a/b/one_31_chars_long_file_name_069
21089 a/b/one_31_chars_long_file_name_070
21090 a/b/one_31_chars_long_file_name_071
21091 a/b/one_31_chars_long_file_name_072
21092 a/b/one_31_chars_long_file_name_073
21093 a/b/one_31_chars_long_file_name_074
21094 a/b/one_31_chars_long_file_name_075
21095 a/b/one_31_chars_long_file_name_076
21096 a/b/one_31_chars_long_file_name_077
21097 a/b/one_31_chars_long_file_name_078
21098 a/b/one_31_chars_long_file_name_079
21099 a/b/one_31_chars_long_file_name_080
21100 a/b/one_31_chars_long_file_name_081
21101 a/b/one_31_chars_long_file_name_082
21102 a/b/one_31_chars_long_file_name_083
21103 a/b/one_31_chars_long_file_name_084
21104 a/b/one_31_chars_long_file_name_085
21105 a/b/one_31_chars_long_file_name_086
21106 a/b/one_31_chars_long_file_name_087
21107 a/b/one_31_chars_long_file_name_088
21108 a/b/one_31_chars_long_file_name_089
21109 a/b/one_31_chars_long_file_name_090
21110 a/b/one_31_chars_long_file_name_091
21111 a/b/one_31_chars_long_file_name_092
21112 a/b/one_31_chars_long_file_name_093
21113 a/b/one_31_chars_long_file_name_094
21114 a/b/one_31_chars_long_file_name_095
21115 a/b/one_31_chars_long_file_name_096
21116 a/b/one_31_chars_long_file_name_097
21117 a/b/one_31_chars_long_file_name_098
21118 a/b/one_31_chars_long_file_name_099
21119 a/b/one_31_chars_long_file_name_100
21120 a/b/one_31_chars_long_file_name_101
21121 a/b/one_31_chars_long_file_name_102
21122 a/b/one_31_chars_long_file_name_103
21123 a/b/one_31_chars_long_file_name_104
21124 a/b/one_31_chars_long_file_name_105
21125 a/b/one_31_chars_long_file_name_106
21126 a/b/one_31_chars_long_file_name_107
21127 a/b/one_31_chars_long_file_name_108
21128 a/b/one_31_chars_long_file_name_109
21129 a/b/one_31_chars_long_file_name_110
21130 a/b/one_31_chars_long_file_name_111
21131 a/b/one_31_chars_long_file_name_112
21132 a/b/one_31_chars_long_file_name_113
21133 a/b/one_31_chars_long_file_name_114
21134 a/b/one_31_chars_long_file_name_115
21135 a/b/one_31_chars_long_file_name_116
21136 a/b/one_31_chars_long_file_name_117
21137 a/b/one_31_chars_long_file_name_118
21138 a/b/one_31_chars_long_file_name_119
21139 a/b/one_31_chars_long_file_name_120
21140 a/b/one_31_chars_long_file_name_121
21141 a/b/one_31_chars_long_file_name_122
21142 a/b/one_31_chars_long_file_name_123
21143 a/b/one_31_chars_long_file_name_124
21144 a/b/one_31_chars_long_file_name_125
21145 a/b/one_31_chars_long_file_name_126
21146 a/b/one_31_chars_long_file_name_127
21147 a/b/one_31_chars_long_file_name_128
21148 a/b/one_31_chars_long_file_name_129
21149 a/b/one_31_chars_long_file_name_130
21150 a/b/one_31_chars_long_file_name_131
21151 a/b/one_31_chars_long_file_name_132
21152 a/b/one_31_chars_long_file_name_133
21153 a/b/one_31_chars_long_file_name_134
21154 a/b/one_31_chars_long_file_name_135
21155 a/b/one_31_chars_long_file_name_136
21156 a/b/one_31_chars_long_file_name_137
21157 a/b/one_31_chars_long_file_name_138
21158 a/b/one_31_chars_long_file_name_139
21159 a/b/one_31_chars_long_file_name_140
21160 a/b/one_31_chars_long_file_name_141
21161 a/b/one_31_chars_long_file_name_142
21162 Incremental dump
21163 a/
21164 a/c/
21165 " | \
21166   $at_diff - "$at_stdout" || at_failed=:
21167 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
21168 $at_failed && at_fn_log_failure
21169 $at_traceon; }
21170
21171               { set +x
21172 $as_echo "$at_srcdir/incr04.at:34:
21173 mkdir oldgnu
21174 (cd oldgnu
21175 TEST_TAR_FORMAT=oldgnu
21176 export TEST_TAR_FORMAT
21177 TAR_OPTIONS=\"-H oldgnu\"
21178 export TAR_OPTIONS
21179 rm -rf *
21180
21181
21182 install-sh -d a/b >/dev/null  || exit 77
21183 awk 'BEGIN {
21184   for (i=1;i<=142;i++)
21185     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
21186   }' < /dev/null | genfile --files-from -
21187
21188 sleep 1
21189
21190 echo \"Initial dump\"
21191 tar cvf a0.tar -g a.sna a
21192 mv a/b a/c
21193 echo \"Incremental dump\"
21194 tar cvf a1.tar -g a.sna a
21195 )"
21196 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
21197 ( $at_check_trace;
21198 mkdir oldgnu
21199 (cd oldgnu
21200 TEST_TAR_FORMAT=oldgnu
21201 export TEST_TAR_FORMAT
21202 TAR_OPTIONS="-H oldgnu"
21203 export TAR_OPTIONS
21204 rm -rf *
21205
21206
21207 install-sh -d a/b >/dev/null  || exit 77
21208 awk 'BEGIN {
21209   for (i=1;i<=142;i++)
21210     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
21211   }' < /dev/null | genfile --files-from -
21212
21213 sleep 1
21214
21215 echo "Initial dump"
21216 tar cvf a0.tar -g a.sna a
21217 mv a/b a/c
21218 echo "Incremental dump"
21219 tar cvf a1.tar -g a.sna a
21220 )
21221 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21222 at_status=$? at_failed=false
21223 $at_check_filter
21224 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
21225 tar: a/b: Directory is new
21226 tar: a/c: Directory has been renamed from 'a/b'
21227 " | \
21228   $at_diff - "$at_stderr" || at_failed=:
21229 echo >>"$at_stdout"; $as_echo "Initial dump
21230 a/
21231 a/b/
21232 a/b/one_31_chars_long_file_name_001
21233 a/b/one_31_chars_long_file_name_002
21234 a/b/one_31_chars_long_file_name_003
21235 a/b/one_31_chars_long_file_name_004
21236 a/b/one_31_chars_long_file_name_005
21237 a/b/one_31_chars_long_file_name_006
21238 a/b/one_31_chars_long_file_name_007
21239 a/b/one_31_chars_long_file_name_008
21240 a/b/one_31_chars_long_file_name_009
21241 a/b/one_31_chars_long_file_name_010
21242 a/b/one_31_chars_long_file_name_011
21243 a/b/one_31_chars_long_file_name_012
21244 a/b/one_31_chars_long_file_name_013
21245 a/b/one_31_chars_long_file_name_014
21246 a/b/one_31_chars_long_file_name_015
21247 a/b/one_31_chars_long_file_name_016
21248 a/b/one_31_chars_long_file_name_017
21249 a/b/one_31_chars_long_file_name_018
21250 a/b/one_31_chars_long_file_name_019
21251 a/b/one_31_chars_long_file_name_020
21252 a/b/one_31_chars_long_file_name_021
21253 a/b/one_31_chars_long_file_name_022
21254 a/b/one_31_chars_long_file_name_023
21255 a/b/one_31_chars_long_file_name_024
21256 a/b/one_31_chars_long_file_name_025
21257 a/b/one_31_chars_long_file_name_026
21258 a/b/one_31_chars_long_file_name_027
21259 a/b/one_31_chars_long_file_name_028
21260 a/b/one_31_chars_long_file_name_029
21261 a/b/one_31_chars_long_file_name_030
21262 a/b/one_31_chars_long_file_name_031
21263 a/b/one_31_chars_long_file_name_032
21264 a/b/one_31_chars_long_file_name_033
21265 a/b/one_31_chars_long_file_name_034
21266 a/b/one_31_chars_long_file_name_035
21267 a/b/one_31_chars_long_file_name_036
21268 a/b/one_31_chars_long_file_name_037
21269 a/b/one_31_chars_long_file_name_038
21270 a/b/one_31_chars_long_file_name_039
21271 a/b/one_31_chars_long_file_name_040
21272 a/b/one_31_chars_long_file_name_041
21273 a/b/one_31_chars_long_file_name_042
21274 a/b/one_31_chars_long_file_name_043
21275 a/b/one_31_chars_long_file_name_044
21276 a/b/one_31_chars_long_file_name_045
21277 a/b/one_31_chars_long_file_name_046
21278 a/b/one_31_chars_long_file_name_047
21279 a/b/one_31_chars_long_file_name_048
21280 a/b/one_31_chars_long_file_name_049
21281 a/b/one_31_chars_long_file_name_050
21282 a/b/one_31_chars_long_file_name_051
21283 a/b/one_31_chars_long_file_name_052
21284 a/b/one_31_chars_long_file_name_053
21285 a/b/one_31_chars_long_file_name_054
21286 a/b/one_31_chars_long_file_name_055
21287 a/b/one_31_chars_long_file_name_056
21288 a/b/one_31_chars_long_file_name_057
21289 a/b/one_31_chars_long_file_name_058
21290 a/b/one_31_chars_long_file_name_059
21291 a/b/one_31_chars_long_file_name_060
21292 a/b/one_31_chars_long_file_name_061
21293 a/b/one_31_chars_long_file_name_062
21294 a/b/one_31_chars_long_file_name_063
21295 a/b/one_31_chars_long_file_name_064
21296 a/b/one_31_chars_long_file_name_065
21297 a/b/one_31_chars_long_file_name_066
21298 a/b/one_31_chars_long_file_name_067
21299 a/b/one_31_chars_long_file_name_068
21300 a/b/one_31_chars_long_file_name_069
21301 a/b/one_31_chars_long_file_name_070
21302 a/b/one_31_chars_long_file_name_071
21303 a/b/one_31_chars_long_file_name_072
21304 a/b/one_31_chars_long_file_name_073
21305 a/b/one_31_chars_long_file_name_074
21306 a/b/one_31_chars_long_file_name_075
21307 a/b/one_31_chars_long_file_name_076
21308 a/b/one_31_chars_long_file_name_077
21309 a/b/one_31_chars_long_file_name_078
21310 a/b/one_31_chars_long_file_name_079
21311 a/b/one_31_chars_long_file_name_080
21312 a/b/one_31_chars_long_file_name_081
21313 a/b/one_31_chars_long_file_name_082
21314 a/b/one_31_chars_long_file_name_083
21315 a/b/one_31_chars_long_file_name_084
21316 a/b/one_31_chars_long_file_name_085
21317 a/b/one_31_chars_long_file_name_086
21318 a/b/one_31_chars_long_file_name_087
21319 a/b/one_31_chars_long_file_name_088
21320 a/b/one_31_chars_long_file_name_089
21321 a/b/one_31_chars_long_file_name_090
21322 a/b/one_31_chars_long_file_name_091
21323 a/b/one_31_chars_long_file_name_092
21324 a/b/one_31_chars_long_file_name_093
21325 a/b/one_31_chars_long_file_name_094
21326 a/b/one_31_chars_long_file_name_095
21327 a/b/one_31_chars_long_file_name_096
21328 a/b/one_31_chars_long_file_name_097
21329 a/b/one_31_chars_long_file_name_098
21330 a/b/one_31_chars_long_file_name_099
21331 a/b/one_31_chars_long_file_name_100
21332 a/b/one_31_chars_long_file_name_101
21333 a/b/one_31_chars_long_file_name_102
21334 a/b/one_31_chars_long_file_name_103
21335 a/b/one_31_chars_long_file_name_104
21336 a/b/one_31_chars_long_file_name_105
21337 a/b/one_31_chars_long_file_name_106
21338 a/b/one_31_chars_long_file_name_107
21339 a/b/one_31_chars_long_file_name_108
21340 a/b/one_31_chars_long_file_name_109
21341 a/b/one_31_chars_long_file_name_110
21342 a/b/one_31_chars_long_file_name_111
21343 a/b/one_31_chars_long_file_name_112
21344 a/b/one_31_chars_long_file_name_113
21345 a/b/one_31_chars_long_file_name_114
21346 a/b/one_31_chars_long_file_name_115
21347 a/b/one_31_chars_long_file_name_116
21348 a/b/one_31_chars_long_file_name_117
21349 a/b/one_31_chars_long_file_name_118
21350 a/b/one_31_chars_long_file_name_119
21351 a/b/one_31_chars_long_file_name_120
21352 a/b/one_31_chars_long_file_name_121
21353 a/b/one_31_chars_long_file_name_122
21354 a/b/one_31_chars_long_file_name_123
21355 a/b/one_31_chars_long_file_name_124
21356 a/b/one_31_chars_long_file_name_125
21357 a/b/one_31_chars_long_file_name_126
21358 a/b/one_31_chars_long_file_name_127
21359 a/b/one_31_chars_long_file_name_128
21360 a/b/one_31_chars_long_file_name_129
21361 a/b/one_31_chars_long_file_name_130
21362 a/b/one_31_chars_long_file_name_131
21363 a/b/one_31_chars_long_file_name_132
21364 a/b/one_31_chars_long_file_name_133
21365 a/b/one_31_chars_long_file_name_134
21366 a/b/one_31_chars_long_file_name_135
21367 a/b/one_31_chars_long_file_name_136
21368 a/b/one_31_chars_long_file_name_137
21369 a/b/one_31_chars_long_file_name_138
21370 a/b/one_31_chars_long_file_name_139
21371 a/b/one_31_chars_long_file_name_140
21372 a/b/one_31_chars_long_file_name_141
21373 a/b/one_31_chars_long_file_name_142
21374 Incremental dump
21375 a/
21376 a/c/
21377 " | \
21378   $at_diff - "$at_stdout" || at_failed=:
21379 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
21380 $at_failed && at_fn_log_failure
21381 $at_traceon; }
21382
21383               { set +x
21384 $as_echo "$at_srcdir/incr04.at:34:
21385 mkdir posix
21386 (cd posix
21387 TEST_TAR_FORMAT=posix
21388 export TEST_TAR_FORMAT
21389 TAR_OPTIONS=\"-H posix\"
21390 export TAR_OPTIONS
21391 rm -rf *
21392
21393
21394 install-sh -d a/b >/dev/null  || exit 77
21395 awk 'BEGIN {
21396   for (i=1;i<=142;i++)
21397     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
21398   }' < /dev/null | genfile --files-from -
21399
21400 sleep 1
21401
21402 echo \"Initial dump\"
21403 tar cvf a0.tar -g a.sna a
21404 mv a/b a/c
21405 echo \"Incremental dump\"
21406 tar cvf a1.tar -g a.sna a
21407 )"
21408 at_fn_check_prepare_notrace 'an embedded newline' "incr04.at:34"
21409 ( $at_check_trace;
21410 mkdir posix
21411 (cd posix
21412 TEST_TAR_FORMAT=posix
21413 export TEST_TAR_FORMAT
21414 TAR_OPTIONS="-H posix"
21415 export TAR_OPTIONS
21416 rm -rf *
21417
21418
21419 install-sh -d a/b >/dev/null  || exit 77
21420 awk 'BEGIN {
21421   for (i=1;i<=142;i++)
21422     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
21423   }' < /dev/null | genfile --files-from -
21424
21425 sleep 1
21426
21427 echo "Initial dump"
21428 tar cvf a0.tar -g a.sna a
21429 mv a/b a/c
21430 echo "Incremental dump"
21431 tar cvf a1.tar -g a.sna a
21432 )
21433 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21434 at_status=$? at_failed=false
21435 $at_check_filter
21436 echo >>"$at_stderr"; $as_echo "tar: a: Directory is new
21437 tar: a/b: Directory is new
21438 tar: a/c: Directory has been renamed from 'a/b'
21439 " | \
21440   $at_diff - "$at_stderr" || at_failed=:
21441 echo >>"$at_stdout"; $as_echo "Initial dump
21442 a/
21443 a/b/
21444 a/b/one_31_chars_long_file_name_001
21445 a/b/one_31_chars_long_file_name_002
21446 a/b/one_31_chars_long_file_name_003
21447 a/b/one_31_chars_long_file_name_004
21448 a/b/one_31_chars_long_file_name_005
21449 a/b/one_31_chars_long_file_name_006
21450 a/b/one_31_chars_long_file_name_007
21451 a/b/one_31_chars_long_file_name_008
21452 a/b/one_31_chars_long_file_name_009
21453 a/b/one_31_chars_long_file_name_010
21454 a/b/one_31_chars_long_file_name_011
21455 a/b/one_31_chars_long_file_name_012
21456 a/b/one_31_chars_long_file_name_013
21457 a/b/one_31_chars_long_file_name_014
21458 a/b/one_31_chars_long_file_name_015
21459 a/b/one_31_chars_long_file_name_016
21460 a/b/one_31_chars_long_file_name_017
21461 a/b/one_31_chars_long_file_name_018
21462 a/b/one_31_chars_long_file_name_019
21463 a/b/one_31_chars_long_file_name_020
21464 a/b/one_31_chars_long_file_name_021
21465 a/b/one_31_chars_long_file_name_022
21466 a/b/one_31_chars_long_file_name_023
21467 a/b/one_31_chars_long_file_name_024
21468 a/b/one_31_chars_long_file_name_025
21469 a/b/one_31_chars_long_file_name_026
21470 a/b/one_31_chars_long_file_name_027
21471 a/b/one_31_chars_long_file_name_028
21472 a/b/one_31_chars_long_file_name_029
21473 a/b/one_31_chars_long_file_name_030
21474 a/b/one_31_chars_long_file_name_031
21475 a/b/one_31_chars_long_file_name_032
21476 a/b/one_31_chars_long_file_name_033
21477 a/b/one_31_chars_long_file_name_034
21478 a/b/one_31_chars_long_file_name_035
21479 a/b/one_31_chars_long_file_name_036
21480 a/b/one_31_chars_long_file_name_037
21481 a/b/one_31_chars_long_file_name_038
21482 a/b/one_31_chars_long_file_name_039
21483 a/b/one_31_chars_long_file_name_040
21484 a/b/one_31_chars_long_file_name_041
21485 a/b/one_31_chars_long_file_name_042
21486 a/b/one_31_chars_long_file_name_043
21487 a/b/one_31_chars_long_file_name_044
21488 a/b/one_31_chars_long_file_name_045
21489 a/b/one_31_chars_long_file_name_046
21490 a/b/one_31_chars_long_file_name_047
21491 a/b/one_31_chars_long_file_name_048
21492 a/b/one_31_chars_long_file_name_049
21493 a/b/one_31_chars_long_file_name_050
21494 a/b/one_31_chars_long_file_name_051
21495 a/b/one_31_chars_long_file_name_052
21496 a/b/one_31_chars_long_file_name_053
21497 a/b/one_31_chars_long_file_name_054
21498 a/b/one_31_chars_long_file_name_055
21499 a/b/one_31_chars_long_file_name_056
21500 a/b/one_31_chars_long_file_name_057
21501 a/b/one_31_chars_long_file_name_058
21502 a/b/one_31_chars_long_file_name_059
21503 a/b/one_31_chars_long_file_name_060
21504 a/b/one_31_chars_long_file_name_061
21505 a/b/one_31_chars_long_file_name_062
21506 a/b/one_31_chars_long_file_name_063
21507 a/b/one_31_chars_long_file_name_064
21508 a/b/one_31_chars_long_file_name_065
21509 a/b/one_31_chars_long_file_name_066
21510 a/b/one_31_chars_long_file_name_067
21511 a/b/one_31_chars_long_file_name_068
21512 a/b/one_31_chars_long_file_name_069
21513 a/b/one_31_chars_long_file_name_070
21514 a/b/one_31_chars_long_file_name_071
21515 a/b/one_31_chars_long_file_name_072
21516 a/b/one_31_chars_long_file_name_073
21517 a/b/one_31_chars_long_file_name_074
21518 a/b/one_31_chars_long_file_name_075
21519 a/b/one_31_chars_long_file_name_076
21520 a/b/one_31_chars_long_file_name_077
21521 a/b/one_31_chars_long_file_name_078
21522 a/b/one_31_chars_long_file_name_079
21523 a/b/one_31_chars_long_file_name_080
21524 a/b/one_31_chars_long_file_name_081
21525 a/b/one_31_chars_long_file_name_082
21526 a/b/one_31_chars_long_file_name_083
21527 a/b/one_31_chars_long_file_name_084
21528 a/b/one_31_chars_long_file_name_085
21529 a/b/one_31_chars_long_file_name_086
21530 a/b/one_31_chars_long_file_name_087
21531 a/b/one_31_chars_long_file_name_088
21532 a/b/one_31_chars_long_file_name_089
21533 a/b/one_31_chars_long_file_name_090
21534 a/b/one_31_chars_long_file_name_091
21535 a/b/one_31_chars_long_file_name_092
21536 a/b/one_31_chars_long_file_name_093
21537 a/b/one_31_chars_long_file_name_094
21538 a/b/one_31_chars_long_file_name_095
21539 a/b/one_31_chars_long_file_name_096
21540 a/b/one_31_chars_long_file_name_097
21541 a/b/one_31_chars_long_file_name_098
21542 a/b/one_31_chars_long_file_name_099
21543 a/b/one_31_chars_long_file_name_100
21544 a/b/one_31_chars_long_file_name_101
21545 a/b/one_31_chars_long_file_name_102
21546 a/b/one_31_chars_long_file_name_103
21547 a/b/one_31_chars_long_file_name_104
21548 a/b/one_31_chars_long_file_name_105
21549 a/b/one_31_chars_long_file_name_106
21550 a/b/one_31_chars_long_file_name_107
21551 a/b/one_31_chars_long_file_name_108
21552 a/b/one_31_chars_long_file_name_109
21553 a/b/one_31_chars_long_file_name_110
21554 a/b/one_31_chars_long_file_name_111
21555 a/b/one_31_chars_long_file_name_112
21556 a/b/one_31_chars_long_file_name_113
21557 a/b/one_31_chars_long_file_name_114
21558 a/b/one_31_chars_long_file_name_115
21559 a/b/one_31_chars_long_file_name_116
21560 a/b/one_31_chars_long_file_name_117
21561 a/b/one_31_chars_long_file_name_118
21562 a/b/one_31_chars_long_file_name_119
21563 a/b/one_31_chars_long_file_name_120
21564 a/b/one_31_chars_long_file_name_121
21565 a/b/one_31_chars_long_file_name_122
21566 a/b/one_31_chars_long_file_name_123
21567 a/b/one_31_chars_long_file_name_124
21568 a/b/one_31_chars_long_file_name_125
21569 a/b/one_31_chars_long_file_name_126
21570 a/b/one_31_chars_long_file_name_127
21571 a/b/one_31_chars_long_file_name_128
21572 a/b/one_31_chars_long_file_name_129
21573 a/b/one_31_chars_long_file_name_130
21574 a/b/one_31_chars_long_file_name_131
21575 a/b/one_31_chars_long_file_name_132
21576 a/b/one_31_chars_long_file_name_133
21577 a/b/one_31_chars_long_file_name_134
21578 a/b/one_31_chars_long_file_name_135
21579 a/b/one_31_chars_long_file_name_136
21580 a/b/one_31_chars_long_file_name_137
21581 a/b/one_31_chars_long_file_name_138
21582 a/b/one_31_chars_long_file_name_139
21583 a/b/one_31_chars_long_file_name_140
21584 a/b/one_31_chars_long_file_name_141
21585 a/b/one_31_chars_long_file_name_142
21586 Incremental dump
21587 a/
21588 a/c/
21589 " | \
21590   $at_diff - "$at_stdout" || at_failed=:
21591 at_fn_check_status 0 $at_status "$at_srcdir/incr04.at:34"
21592 $at_failed && at_fn_log_failure
21593 $at_traceon; }
21594
21595
21596
21597
21598
21599   set +x
21600   $at_times_p && times >"$at_times_file"
21601 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21602 read at_status <"$at_status_file"
21603 #AT_STOP_91
21604 #AT_START_92
21605 at_fn_group_banner 92 'incr05.at:21' \
21606   "incremental dumps with -C" "                      " 11
21607 at_xfail=no
21608       test -f $XFAILFILE && at_xfail=yes
21609 (
21610   $as_echo "92. $at_setup_line: testing $at_desc ..."
21611   $at_traceon
21612
21613
21614
21615
21616
21617   { set +x
21618 $as_echo "$at_srcdir/incr05.at:24:
21619 mkdir gnu
21620 (cd gnu
21621 TEST_TAR_FORMAT=gnu
21622 export TEST_TAR_FORMAT
21623 TAR_OPTIONS=\"-H gnu\"
21624 export TAR_OPTIONS
21625 rm -rf *
21626
21627 mkdir dir
21628 mkdir dir/sub
21629 genfile --file dir/file1
21630 genfile --file dir/sub/file2
21631
21632 echo Level 0
21633 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21634
21635 genfile --file dir/file3
21636 echo Level 1
21637 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21638 )"
21639 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
21640 ( $at_check_trace;
21641 mkdir gnu
21642 (cd gnu
21643 TEST_TAR_FORMAT=gnu
21644 export TEST_TAR_FORMAT
21645 TAR_OPTIONS="-H gnu"
21646 export TAR_OPTIONS
21647 rm -rf *
21648
21649 mkdir dir
21650 mkdir dir/sub
21651 genfile --file dir/file1
21652 genfile --file dir/sub/file2
21653
21654 echo Level 0
21655 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21656
21657 genfile --file dir/file3
21658 echo Level 1
21659 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21660 )
21661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21662 at_status=$? at_failed=false
21663 $at_check_filter
21664 at_fn_diff_devnull "$at_stderr" || at_failed=:
21665 echo >>"$at_stdout"; $as_echo "Level 0
21666 ./
21667 ./sub/
21668 ./file1
21669 ./sub/file2
21670 Level 1
21671 ./
21672 ./sub/
21673 ./file3
21674 " | \
21675   $at_diff - "$at_stdout" || at_failed=:
21676 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
21677 $at_failed && at_fn_log_failure
21678 $at_traceon; }
21679
21680               { set +x
21681 $as_echo "$at_srcdir/incr05.at:24:
21682 mkdir oldgnu
21683 (cd oldgnu
21684 TEST_TAR_FORMAT=oldgnu
21685 export TEST_TAR_FORMAT
21686 TAR_OPTIONS=\"-H oldgnu\"
21687 export TAR_OPTIONS
21688 rm -rf *
21689
21690 mkdir dir
21691 mkdir dir/sub
21692 genfile --file dir/file1
21693 genfile --file dir/sub/file2
21694
21695 echo Level 0
21696 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21697
21698 genfile --file dir/file3
21699 echo Level 1
21700 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21701 )"
21702 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
21703 ( $at_check_trace;
21704 mkdir oldgnu
21705 (cd oldgnu
21706 TEST_TAR_FORMAT=oldgnu
21707 export TEST_TAR_FORMAT
21708 TAR_OPTIONS="-H oldgnu"
21709 export TAR_OPTIONS
21710 rm -rf *
21711
21712 mkdir dir
21713 mkdir dir/sub
21714 genfile --file dir/file1
21715 genfile --file dir/sub/file2
21716
21717 echo Level 0
21718 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21719
21720 genfile --file dir/file3
21721 echo Level 1
21722 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21723 )
21724 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21725 at_status=$? at_failed=false
21726 $at_check_filter
21727 at_fn_diff_devnull "$at_stderr" || at_failed=:
21728 echo >>"$at_stdout"; $as_echo "Level 0
21729 ./
21730 ./sub/
21731 ./file1
21732 ./sub/file2
21733 Level 1
21734 ./
21735 ./sub/
21736 ./file3
21737 " | \
21738   $at_diff - "$at_stdout" || at_failed=:
21739 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
21740 $at_failed && at_fn_log_failure
21741 $at_traceon; }
21742
21743               { set +x
21744 $as_echo "$at_srcdir/incr05.at:24:
21745 mkdir posix
21746 (cd posix
21747 TEST_TAR_FORMAT=posix
21748 export TEST_TAR_FORMAT
21749 TAR_OPTIONS=\"-H posix\"
21750 export TAR_OPTIONS
21751 rm -rf *
21752
21753 mkdir dir
21754 mkdir dir/sub
21755 genfile --file dir/file1
21756 genfile --file dir/sub/file2
21757
21758 echo Level 0
21759 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21760
21761 genfile --file dir/file3
21762 echo Level 1
21763 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21764 )"
21765 at_fn_check_prepare_notrace 'an embedded newline' "incr05.at:24"
21766 ( $at_check_trace;
21767 mkdir posix
21768 (cd posix
21769 TEST_TAR_FORMAT=posix
21770 export TEST_TAR_FORMAT
21771 TAR_OPTIONS="-H posix"
21772 export TAR_OPTIONS
21773 rm -rf *
21774
21775 mkdir dir
21776 mkdir dir/sub
21777 genfile --file dir/file1
21778 genfile --file dir/sub/file2
21779
21780 echo Level 0
21781 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21782
21783 genfile --file dir/file3
21784 echo Level 1
21785 tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir .
21786 )
21787 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21788 at_status=$? at_failed=false
21789 $at_check_filter
21790 at_fn_diff_devnull "$at_stderr" || at_failed=:
21791 echo >>"$at_stdout"; $as_echo "Level 0
21792 ./
21793 ./sub/
21794 ./file1
21795 ./sub/file2
21796 Level 1
21797 ./
21798 ./sub/
21799 ./file3
21800 " | \
21801   $at_diff - "$at_stdout" || at_failed=:
21802 at_fn_check_status 0 $at_status "$at_srcdir/incr05.at:24"
21803 $at_failed && at_fn_log_failure
21804 $at_traceon; }
21805
21806
21807
21808
21809   set +x
21810   $at_times_p && times >"$at_times_file"
21811 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
21812 read at_status <"$at_status_file"
21813 #AT_STOP_92
21814 #AT_START_93
21815 at_fn_group_banner 93 'incr06.at:21' \
21816   "incremental dumps of nested directories" "        " 11
21817 at_xfail=no
21818       test -f $XFAILFILE && at_xfail=yes
21819 (
21820   $as_echo "93. $at_setup_line: testing $at_desc ..."
21821   $at_traceon
21822
21823
21824
21825
21826
21827   { set +x
21828 $as_echo "$at_srcdir/incr06.at:24:
21829 mkdir gnu
21830 (cd gnu
21831 TEST_TAR_FORMAT=gnu
21832 export TEST_TAR_FORMAT
21833 TAR_OPTIONS=\"-H gnu\"
21834 export TAR_OPTIONS
21835 rm -rf *
21836
21837 mkdir dir
21838 mkdir dir/sub
21839 mkdir dir/sub/a
21840 mkdir dir/sub/b
21841 genfile --file dir/file1
21842 genfile --file dir/sub/file2
21843 genfile --file dir/sub/a/file3
21844
21845 echo Level 0 . sub
21846 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21847 echo Level 0 sub .
21848 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21849
21850 mkdir dir/c
21851 genfile --file dir/sub/b/file4
21852
21853 echo Level 1 . sub
21854 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21855 echo Level 1 sub .
21856 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21857 )"
21858 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
21859 ( $at_check_trace;
21860 mkdir gnu
21861 (cd gnu
21862 TEST_TAR_FORMAT=gnu
21863 export TEST_TAR_FORMAT
21864 TAR_OPTIONS="-H gnu"
21865 export TAR_OPTIONS
21866 rm -rf *
21867
21868 mkdir dir
21869 mkdir dir/sub
21870 mkdir dir/sub/a
21871 mkdir dir/sub/b
21872 genfile --file dir/file1
21873 genfile --file dir/sub/file2
21874 genfile --file dir/sub/a/file3
21875
21876 echo Level 0 . sub
21877 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21878 echo Level 0 sub .
21879 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21880
21881 mkdir dir/c
21882 genfile --file dir/sub/b/file4
21883
21884 echo Level 1 . sub
21885 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21886 echo Level 1 sub .
21887 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21888 )
21889 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21890 at_status=$? at_failed=false
21891 $at_check_filter
21892 at_fn_diff_devnull "$at_stderr" || at_failed=:
21893 echo >>"$at_stdout"; $as_echo "Level 0 . sub
21894 ./
21895 sub/
21896 sub/a/
21897 sub/b/
21898 ./file1
21899 sub/file2
21900 sub/a/file3
21901 Level 0 sub .
21902 ./
21903 sub/
21904 sub/a/
21905 sub/b/
21906 ./file1
21907 sub/file2
21908 sub/a/file3
21909 Level 1 . sub
21910 ./
21911 ./c/
21912 sub/
21913 sub/a/
21914 sub/b/
21915 sub/b/file4
21916 Level 1 sub .
21917 ./
21918 ./c/
21919 sub/
21920 sub/a/
21921 sub/b/
21922 sub/b/file4
21923 " | \
21924   $at_diff - "$at_stdout" || at_failed=:
21925 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
21926 $at_failed && at_fn_log_failure
21927 $at_traceon; }
21928
21929               { set +x
21930 $as_echo "$at_srcdir/incr06.at:24:
21931 mkdir oldgnu
21932 (cd oldgnu
21933 TEST_TAR_FORMAT=oldgnu
21934 export TEST_TAR_FORMAT
21935 TAR_OPTIONS=\"-H oldgnu\"
21936 export TAR_OPTIONS
21937 rm -rf *
21938
21939 mkdir dir
21940 mkdir dir/sub
21941 mkdir dir/sub/a
21942 mkdir dir/sub/b
21943 genfile --file dir/file1
21944 genfile --file dir/sub/file2
21945 genfile --file dir/sub/a/file3
21946
21947 echo Level 0 . sub
21948 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21949 echo Level 0 sub .
21950 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21951
21952 mkdir dir/c
21953 genfile --file dir/sub/b/file4
21954
21955 echo Level 1 . sub
21956 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21957 echo Level 1 sub .
21958 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21959 )"
21960 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
21961 ( $at_check_trace;
21962 mkdir oldgnu
21963 (cd oldgnu
21964 TEST_TAR_FORMAT=oldgnu
21965 export TEST_TAR_FORMAT
21966 TAR_OPTIONS="-H oldgnu"
21967 export TAR_OPTIONS
21968 rm -rf *
21969
21970 mkdir dir
21971 mkdir dir/sub
21972 mkdir dir/sub/a
21973 mkdir dir/sub/b
21974 genfile --file dir/file1
21975 genfile --file dir/sub/file2
21976 genfile --file dir/sub/a/file3
21977
21978 echo Level 0 . sub
21979 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21980 echo Level 0 sub .
21981 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21982
21983 mkdir dir/c
21984 genfile --file dir/sub/b/file4
21985
21986 echo Level 1 . sub
21987 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
21988 echo Level 1 sub .
21989 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
21990 )
21991 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
21992 at_status=$? at_failed=false
21993 $at_check_filter
21994 at_fn_diff_devnull "$at_stderr" || at_failed=:
21995 echo >>"$at_stdout"; $as_echo "Level 0 . sub
21996 ./
21997 sub/
21998 sub/a/
21999 sub/b/
22000 ./file1
22001 sub/file2
22002 sub/a/file3
22003 Level 0 sub .
22004 ./
22005 sub/
22006 sub/a/
22007 sub/b/
22008 ./file1
22009 sub/file2
22010 sub/a/file3
22011 Level 1 . sub
22012 ./
22013 ./c/
22014 sub/
22015 sub/a/
22016 sub/b/
22017 sub/b/file4
22018 Level 1 sub .
22019 ./
22020 ./c/
22021 sub/
22022 sub/a/
22023 sub/b/
22024 sub/b/file4
22025 " | \
22026   $at_diff - "$at_stdout" || at_failed=:
22027 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
22028 $at_failed && at_fn_log_failure
22029 $at_traceon; }
22030
22031               { set +x
22032 $as_echo "$at_srcdir/incr06.at:24:
22033 mkdir posix
22034 (cd posix
22035 TEST_TAR_FORMAT=posix
22036 export TEST_TAR_FORMAT
22037 TAR_OPTIONS=\"-H posix\"
22038 export TAR_OPTIONS
22039 rm -rf *
22040
22041 mkdir dir
22042 mkdir dir/sub
22043 mkdir dir/sub/a
22044 mkdir dir/sub/b
22045 genfile --file dir/file1
22046 genfile --file dir/sub/file2
22047 genfile --file dir/sub/a/file3
22048
22049 echo Level 0 . sub
22050 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
22051 echo Level 0 sub .
22052 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
22053
22054 mkdir dir/c
22055 genfile --file dir/sub/b/file4
22056
22057 echo Level 1 . sub
22058 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
22059 echo Level 1 sub .
22060 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
22061 )"
22062 at_fn_check_prepare_notrace 'an embedded newline' "incr06.at:24"
22063 ( $at_check_trace;
22064 mkdir posix
22065 (cd posix
22066 TEST_TAR_FORMAT=posix
22067 export TEST_TAR_FORMAT
22068 TAR_OPTIONS="-H posix"
22069 export TAR_OPTIONS
22070 rm -rf *
22071
22072 mkdir dir
22073 mkdir dir/sub
22074 mkdir dir/sub/a
22075 mkdir dir/sub/b
22076 genfile --file dir/file1
22077 genfile --file dir/sub/file2
22078 genfile --file dir/sub/a/file3
22079
22080 echo Level 0 . sub
22081 tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
22082 echo Level 0 sub .
22083 tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
22084
22085 mkdir dir/c
22086 genfile --file dir/sub/b/file4
22087
22088 echo Level 1 . sub
22089 tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub
22090 echo Level 1 sub .
22091 tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub .
22092 )
22093 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22094 at_status=$? at_failed=false
22095 $at_check_filter
22096 at_fn_diff_devnull "$at_stderr" || at_failed=:
22097 echo >>"$at_stdout"; $as_echo "Level 0 . sub
22098 ./
22099 sub/
22100 sub/a/
22101 sub/b/
22102 ./file1
22103 sub/file2
22104 sub/a/file3
22105 Level 0 sub .
22106 ./
22107 sub/
22108 sub/a/
22109 sub/b/
22110 ./file1
22111 sub/file2
22112 sub/a/file3
22113 Level 1 . sub
22114 ./
22115 ./c/
22116 sub/
22117 sub/a/
22118 sub/b/
22119 sub/b/file4
22120 Level 1 sub .
22121 ./
22122 ./c/
22123 sub/
22124 sub/a/
22125 sub/b/
22126 sub/b/file4
22127 " | \
22128   $at_diff - "$at_stdout" || at_failed=:
22129 at_fn_check_status 0 $at_status "$at_srcdir/incr06.at:24"
22130 $at_failed && at_fn_log_failure
22131 $at_traceon; }
22132
22133
22134
22135
22136   set +x
22137   $at_times_p && times >"$at_times_file"
22138 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22139 read at_status <"$at_status_file"
22140 #AT_STOP_93
22141 #AT_START_94
22142 at_fn_group_banner 94 'incr07.at:18' \
22143   "incremental restores with -C" "                   " 11
22144 at_xfail=no
22145       test -f $XFAILFILE && at_xfail=yes
22146 (
22147   $as_echo "94. $at_setup_line: testing $at_desc ..."
22148   $at_traceon
22149
22150
22151
22152 # Tar 1.26 had problems extracting from incremental restores when given
22153 # the -C option.  The code in incremen.c:try_purge_directory and
22154 # misc.c:remove_any_file was using savedir(), which ignored eventual changes
22155 # in the current working directory and caused the malfunctioning.
22156 #
22157 # The problem was reported by Piotr Rotter on 2013-03-22.
22158 #
22159 # This testcase is based on scripts provided by Piotr Rotter and Nathan
22160 # Stratton Treadway.
22161 #
22162 # References: <514C8F56.90900@active24.pl>,
22163 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00036.html,
22164 #             <20130326181922.GZ3732@shire.ontko.com>,
22165 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00042.html,
22166 #             <20130327051828.GA3732@shire.ontko.com>,
22167 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00043.html,
22168 #             <20130327054957.GB3732@shire.ontko.com>,
22169 #             http://lists.gnu.org/archive/html/bug-tar/2013-03/msg00044.html
22170
22171
22172
22173   { set +x
22174 $as_echo "$at_srcdir/incr07.at:40:
22175 mkdir gnu
22176 (cd gnu
22177 TEST_TAR_FORMAT=gnu
22178 export TEST_TAR_FORMAT
22179 TAR_OPTIONS=\"-H gnu\"
22180 export TAR_OPTIONS
22181 rm -rf *
22182
22183 mkdir dirA
22184 echo 'a' > dirA/a
22185 echo 'a' > dirA/b
22186
22187 decho C0
22188 tar -g test.snar -vcf test.0.tar dirA
22189
22190 echo 'a' > dirA/c
22191 decho C1
22192 tar -g test.snar -vcf test.1.tar dirA
22193
22194 rm -f dirA/a
22195 decho C2
22196 tar -g test.snar -vcf test.2.tar dirA
22197
22198 mkdir ext
22199 rm -rf dirA
22200
22201 decho E0
22202 tar -g test.snar -vxf test.0.tar -C ext/
22203 decho E1
22204 tar -g test.snar -vxf test.1.tar -C ext/
22205
22206 decho E2
22207 tar -g test.snar -vxf test.2.tar -C ext/
22208
22209 mkdir ext/dirA/dirB
22210 touch ext/dirA/dirB/file
22211
22212 decho E3
22213 tar -g test.snar -vxf test.2.tar -C ext/
22214
22215 echo FIN
22216 test -d dirA && echo >&2 \"toplevel dirA exists\"
22217 exit 0
22218 )"
22219 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
22220 ( $at_check_trace;
22221 mkdir gnu
22222 (cd gnu
22223 TEST_TAR_FORMAT=gnu
22224 export TEST_TAR_FORMAT
22225 TAR_OPTIONS="-H gnu"
22226 export TAR_OPTIONS
22227 rm -rf *
22228
22229 mkdir dirA
22230 echo 'a' > dirA/a
22231 echo 'a' > dirA/b
22232
22233 decho C0
22234 tar -g test.snar -vcf test.0.tar dirA
22235
22236 echo 'a' > dirA/c
22237 decho C1
22238 tar -g test.snar -vcf test.1.tar dirA
22239
22240 rm -f dirA/a
22241 decho C2
22242 tar -g test.snar -vcf test.2.tar dirA
22243
22244 mkdir ext
22245 rm -rf dirA
22246
22247 decho E0
22248 tar -g test.snar -vxf test.0.tar -C ext/
22249 decho E1
22250 tar -g test.snar -vxf test.1.tar -C ext/
22251
22252 decho E2
22253 tar -g test.snar -vxf test.2.tar -C ext/
22254
22255 mkdir ext/dirA/dirB
22256 touch ext/dirA/dirB/file
22257
22258 decho E3
22259 tar -g test.snar -vxf test.2.tar -C ext/
22260
22261 echo FIN
22262 test -d dirA && echo >&2 "toplevel dirA exists"
22263 exit 0
22264 )
22265 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22266 at_status=$? at_failed=false
22267 $at_check_filter
22268 echo >>"$at_stderr"; $as_echo "C0
22269 tar: dirA: Directory is new
22270 C1
22271 C2
22272 E0
22273 E1
22274 E2
22275 E3
22276 " | \
22277   $at_diff - "$at_stderr" || at_failed=:
22278 echo >>"$at_stdout"; $as_echo "C0
22279 dirA/
22280 dirA/a
22281 dirA/b
22282 C1
22283 dirA/
22284 dirA/c
22285 C2
22286 dirA/
22287 E0
22288 dirA/
22289 dirA/a
22290 dirA/b
22291 E1
22292 dirA/
22293 dirA/c
22294 E2
22295 dirA/
22296 tar: Deleting 'dirA/a'
22297 E3
22298 dirA/
22299 tar: Deleting 'dirA/dirB'
22300 FIN
22301 " | \
22302   $at_diff - "$at_stdout" || at_failed=:
22303 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
22304 $at_failed && at_fn_log_failure
22305 $at_traceon; }
22306
22307               { set +x
22308 $as_echo "$at_srcdir/incr07.at:40:
22309 mkdir oldgnu
22310 (cd oldgnu
22311 TEST_TAR_FORMAT=oldgnu
22312 export TEST_TAR_FORMAT
22313 TAR_OPTIONS=\"-H oldgnu\"
22314 export TAR_OPTIONS
22315 rm -rf *
22316
22317 mkdir dirA
22318 echo 'a' > dirA/a
22319 echo 'a' > dirA/b
22320
22321 decho C0
22322 tar -g test.snar -vcf test.0.tar dirA
22323
22324 echo 'a' > dirA/c
22325 decho C1
22326 tar -g test.snar -vcf test.1.tar dirA
22327
22328 rm -f dirA/a
22329 decho C2
22330 tar -g test.snar -vcf test.2.tar dirA
22331
22332 mkdir ext
22333 rm -rf dirA
22334
22335 decho E0
22336 tar -g test.snar -vxf test.0.tar -C ext/
22337 decho E1
22338 tar -g test.snar -vxf test.1.tar -C ext/
22339
22340 decho E2
22341 tar -g test.snar -vxf test.2.tar -C ext/
22342
22343 mkdir ext/dirA/dirB
22344 touch ext/dirA/dirB/file
22345
22346 decho E3
22347 tar -g test.snar -vxf test.2.tar -C ext/
22348
22349 echo FIN
22350 test -d dirA && echo >&2 \"toplevel dirA exists\"
22351 exit 0
22352 )"
22353 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
22354 ( $at_check_trace;
22355 mkdir oldgnu
22356 (cd oldgnu
22357 TEST_TAR_FORMAT=oldgnu
22358 export TEST_TAR_FORMAT
22359 TAR_OPTIONS="-H oldgnu"
22360 export TAR_OPTIONS
22361 rm -rf *
22362
22363 mkdir dirA
22364 echo 'a' > dirA/a
22365 echo 'a' > dirA/b
22366
22367 decho C0
22368 tar -g test.snar -vcf test.0.tar dirA
22369
22370 echo 'a' > dirA/c
22371 decho C1
22372 tar -g test.snar -vcf test.1.tar dirA
22373
22374 rm -f dirA/a
22375 decho C2
22376 tar -g test.snar -vcf test.2.tar dirA
22377
22378 mkdir ext
22379 rm -rf dirA
22380
22381 decho E0
22382 tar -g test.snar -vxf test.0.tar -C ext/
22383 decho E1
22384 tar -g test.snar -vxf test.1.tar -C ext/
22385
22386 decho E2
22387 tar -g test.snar -vxf test.2.tar -C ext/
22388
22389 mkdir ext/dirA/dirB
22390 touch ext/dirA/dirB/file
22391
22392 decho E3
22393 tar -g test.snar -vxf test.2.tar -C ext/
22394
22395 echo FIN
22396 test -d dirA && echo >&2 "toplevel dirA exists"
22397 exit 0
22398 )
22399 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22400 at_status=$? at_failed=false
22401 $at_check_filter
22402 echo >>"$at_stderr"; $as_echo "C0
22403 tar: dirA: Directory is new
22404 C1
22405 C2
22406 E0
22407 E1
22408 E2
22409 E3
22410 " | \
22411   $at_diff - "$at_stderr" || at_failed=:
22412 echo >>"$at_stdout"; $as_echo "C0
22413 dirA/
22414 dirA/a
22415 dirA/b
22416 C1
22417 dirA/
22418 dirA/c
22419 C2
22420 dirA/
22421 E0
22422 dirA/
22423 dirA/a
22424 dirA/b
22425 E1
22426 dirA/
22427 dirA/c
22428 E2
22429 dirA/
22430 tar: Deleting 'dirA/a'
22431 E3
22432 dirA/
22433 tar: Deleting 'dirA/dirB'
22434 FIN
22435 " | \
22436   $at_diff - "$at_stdout" || at_failed=:
22437 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
22438 $at_failed && at_fn_log_failure
22439 $at_traceon; }
22440
22441               { set +x
22442 $as_echo "$at_srcdir/incr07.at:40:
22443 mkdir posix
22444 (cd posix
22445 TEST_TAR_FORMAT=posix
22446 export TEST_TAR_FORMAT
22447 TAR_OPTIONS=\"-H posix\"
22448 export TAR_OPTIONS
22449 rm -rf *
22450
22451 mkdir dirA
22452 echo 'a' > dirA/a
22453 echo 'a' > dirA/b
22454
22455 decho C0
22456 tar -g test.snar -vcf test.0.tar dirA
22457
22458 echo 'a' > dirA/c
22459 decho C1
22460 tar -g test.snar -vcf test.1.tar dirA
22461
22462 rm -f dirA/a
22463 decho C2
22464 tar -g test.snar -vcf test.2.tar dirA
22465
22466 mkdir ext
22467 rm -rf dirA
22468
22469 decho E0
22470 tar -g test.snar -vxf test.0.tar -C ext/
22471 decho E1
22472 tar -g test.snar -vxf test.1.tar -C ext/
22473
22474 decho E2
22475 tar -g test.snar -vxf test.2.tar -C ext/
22476
22477 mkdir ext/dirA/dirB
22478 touch ext/dirA/dirB/file
22479
22480 decho E3
22481 tar -g test.snar -vxf test.2.tar -C ext/
22482
22483 echo FIN
22484 test -d dirA && echo >&2 \"toplevel dirA exists\"
22485 exit 0
22486 )"
22487 at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40"
22488 ( $at_check_trace;
22489 mkdir posix
22490 (cd posix
22491 TEST_TAR_FORMAT=posix
22492 export TEST_TAR_FORMAT
22493 TAR_OPTIONS="-H posix"
22494 export TAR_OPTIONS
22495 rm -rf *
22496
22497 mkdir dirA
22498 echo 'a' > dirA/a
22499 echo 'a' > dirA/b
22500
22501 decho C0
22502 tar -g test.snar -vcf test.0.tar dirA
22503
22504 echo 'a' > dirA/c
22505 decho C1
22506 tar -g test.snar -vcf test.1.tar dirA
22507
22508 rm -f dirA/a
22509 decho C2
22510 tar -g test.snar -vcf test.2.tar dirA
22511
22512 mkdir ext
22513 rm -rf dirA
22514
22515 decho E0
22516 tar -g test.snar -vxf test.0.tar -C ext/
22517 decho E1
22518 tar -g test.snar -vxf test.1.tar -C ext/
22519
22520 decho E2
22521 tar -g test.snar -vxf test.2.tar -C ext/
22522
22523 mkdir ext/dirA/dirB
22524 touch ext/dirA/dirB/file
22525
22526 decho E3
22527 tar -g test.snar -vxf test.2.tar -C ext/
22528
22529 echo FIN
22530 test -d dirA && echo >&2 "toplevel dirA exists"
22531 exit 0
22532 )
22533 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22534 at_status=$? at_failed=false
22535 $at_check_filter
22536 echo >>"$at_stderr"; $as_echo "C0
22537 tar: dirA: Directory is new
22538 C1
22539 C2
22540 E0
22541 E1
22542 E2
22543 E3
22544 " | \
22545   $at_diff - "$at_stderr" || at_failed=:
22546 echo >>"$at_stdout"; $as_echo "C0
22547 dirA/
22548 dirA/a
22549 dirA/b
22550 C1
22551 dirA/
22552 dirA/c
22553 C2
22554 dirA/
22555 E0
22556 dirA/
22557 dirA/a
22558 dirA/b
22559 E1
22560 dirA/
22561 dirA/c
22562 E2
22563 dirA/
22564 tar: Deleting 'dirA/a'
22565 E3
22566 dirA/
22567 tar: Deleting 'dirA/dirB'
22568 FIN
22569 " | \
22570   $at_diff - "$at_stdout" || at_failed=:
22571 at_fn_check_status 0 $at_status "$at_srcdir/incr07.at:40"
22572 $at_failed && at_fn_log_failure
22573 $at_traceon; }
22574
22575
22576
22577
22578   set +x
22579   $at_times_p && times >"$at_times_file"
22580 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22581 read at_status <"$at_status_file"
22582 #AT_STOP_94
22583 #AT_START_95
22584 at_fn_group_banner 95 'incr08.at:38' \
22585   "filename normalization" "                         " 11
22586 at_xfail=no
22587       test -f $XFAILFILE && at_xfail=yes
22588 (
22589   $as_echo "95. $at_setup_line: testing $at_desc ..."
22590   $at_traceon
22591
22592
22593
22594
22595
22596   { set +x
22597 $as_echo "$at_srcdir/incr08.at:41:
22598 mkdir gnu
22599 (cd gnu
22600 TEST_TAR_FORMAT=gnu
22601 export TEST_TAR_FORMAT
22602 TAR_OPTIONS=\"-H gnu\"
22603 export TAR_OPTIONS
22604 rm -rf *
22605
22606
22607 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22608
22609 mkdir tartest
22610 cd tartest
22611 mkdir foo
22612 mkdir foo/subdir
22613 mkdir foo/subdir/dir1
22614 mkdir subdir
22615 mkdir subdir/dir2
22616 decho A
22617 find .|sort
22618
22619 decho B
22620 DIR=\`pwd\`
22621 tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . \$DIR 2>../err |\\
22622   sed \"s|\$DIR|ABSPATH|\"
22623 sed \"s|\$DIR|ABSPATH|\" ../err >&2
22624 )"
22625 at_fn_check_prepare_notrace 'a `...` command substitution' "incr08.at:41"
22626 ( $at_check_trace;
22627 mkdir gnu
22628 (cd gnu
22629 TEST_TAR_FORMAT=gnu
22630 export TEST_TAR_FORMAT
22631 TAR_OPTIONS="-H gnu"
22632 export TAR_OPTIONS
22633 rm -rf *
22634
22635
22636 test -z "`sort < /dev/null 2>&1`" || exit 77
22637
22638 mkdir tartest
22639 cd tartest
22640 mkdir foo
22641 mkdir foo/subdir
22642 mkdir foo/subdir/dir1
22643 mkdir subdir
22644 mkdir subdir/dir2
22645 decho A
22646 find .|sort
22647
22648 decho B
22649 DIR=`pwd`
22650 tar -cvf ../foo.tar --listed-incremental=../foo.snar -C foo . $DIR 2>../err |\
22651   sed "s|$DIR|ABSPATH|"
22652 sed "s|$DIR|ABSPATH|" ../err >&2
22653 )
22654 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22655 at_status=$? at_failed=false
22656 $at_check_filter
22657 echo >>"$at_stderr"; $as_echo "A
22658 B
22659 tar: .: Directory is new
22660 tar: ./subdir: Directory is new
22661 tar: ./subdir/dir1: Directory is new
22662 tar: ABSPATH: Directory is new
22663 tar: ABSPATH/subdir: Directory is new
22664 tar: ABSPATH/subdir/dir2: Directory is new
22665 tar: Removing leading \`/' from member names
22666 " | \
22667   $at_diff - "$at_stderr" || at_failed=:
22668 echo >>"$at_stdout"; $as_echo "A
22669 .
22670 ./foo
22671 ./foo/subdir
22672 ./foo/subdir/dir1
22673 ./subdir
22674 ./subdir/dir2
22675 B
22676 ./
22677 ./subdir/
22678 ./subdir/dir1/
22679 ABSPATH/
22680 ABSPATH/subdir/
22681 ABSPATH/subdir/dir2/
22682 " | \
22683   $at_diff - "$at_stdout" || at_failed=:
22684 at_fn_check_status 0 $at_status "$at_srcdir/incr08.at:41"
22685 $at_failed && at_fn_log_failure
22686 $at_traceon; }
22687
22688
22689
22690
22691   set +x
22692   $at_times_p && times >"$at_times_file"
22693 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22694 read at_status <"$at_status_file"
22695 #AT_STOP_95
22696 #AT_START_96
22697 at_fn_group_banner 96 'incr09.at:26' \
22698   "incremental with alternating -C" "                " 11
22699 at_xfail=no
22700       test -f $XFAILFILE && at_xfail=yes
22701 (
22702   $as_echo "96. $at_setup_line: testing $at_desc ..."
22703   $at_traceon
22704
22705
22706
22707
22708
22709   { set +x
22710 $as_echo "$at_srcdir/incr09.at:29:
22711 mkdir gnu
22712 (cd gnu
22713 TEST_TAR_FORMAT=gnu
22714 export TEST_TAR_FORMAT
22715 TAR_OPTIONS=\"-H gnu\"
22716 export TAR_OPTIONS
22717 rm -rf *
22718
22719
22720 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
22721
22722 mkdir foo bar middle
22723 echo foo/foo_file > foo/foo_file
22724 echo bar/bar_file > bar/bar_file
22725 echo middle/file > middle/middle_file
22726 decho A
22727 tar -cvf foo.tar --incremental -C foo . -C \`pwd\` middle  -C bar .
22728
22729 rm foo.tar
22730 >toplevel_file
22731 decho B
22732 tar -cvf foo.tar --incremental -C foo . -C \`pwd\` toplevel_file  -C bar .
22733 )"
22734 at_fn_check_prepare_notrace 'a `...` command substitution' "incr09.at:29"
22735 ( $at_check_trace;
22736 mkdir gnu
22737 (cd gnu
22738 TEST_TAR_FORMAT=gnu
22739 export TEST_TAR_FORMAT
22740 TAR_OPTIONS="-H gnu"
22741 export TAR_OPTIONS
22742 rm -rf *
22743
22744
22745 test -z "`sort < /dev/null 2>&1`" || exit 77
22746
22747 mkdir foo bar middle
22748 echo foo/foo_file > foo/foo_file
22749 echo bar/bar_file > bar/bar_file
22750 echo middle/file > middle/middle_file
22751 decho A
22752 tar -cvf foo.tar --incremental -C foo . -C `pwd` middle  -C bar .
22753
22754 rm foo.tar
22755 >toplevel_file
22756 decho B
22757 tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file  -C bar .
22758 )
22759 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22760 at_status=$? at_failed=false
22761 $at_check_filter
22762 echo >>"$at_stderr"; $as_echo "A
22763 tar: .: Directory is new
22764 tar: middle: Directory is new
22765 tar: .: Directory is new
22766 B
22767 tar: .: Directory is new
22768 tar: .: Directory is new
22769 " | \
22770   $at_diff - "$at_stderr" || at_failed=:
22771 echo >>"$at_stdout"; $as_echo "A
22772 ./
22773 ./
22774 middle/
22775 ./bar_file
22776 ./foo_file
22777 middle/middle_file
22778 B
22779 ./
22780 ./
22781 toplevel_file
22782 ./bar_file
22783 ./foo_file
22784 " | \
22785   $at_diff - "$at_stdout" || at_failed=:
22786 at_fn_check_status 0 $at_status "$at_srcdir/incr09.at:29"
22787 $at_failed && at_fn_log_failure
22788 $at_traceon; }
22789
22790
22791
22792
22793   set +x
22794   $at_times_p && times >"$at_times_file"
22795 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22796 read at_status <"$at_status_file"
22797 #AT_STOP_96
22798 #AT_START_97
22799 at_fn_group_banner 97 'filerem01.at:36' \
22800   "file removed as we read it (ca. 22 seconds)" "    " 12
22801 at_xfail=no
22802       test -f $XFAILFILE && at_xfail=yes
22803 (
22804   $as_echo "97. $at_setup_line: testing $at_desc ..."
22805   $at_traceon
22806
22807
22808
22809
22810
22811   { set +x
22812 $as_echo "$at_srcdir/filerem01.at:39:
22813 mkdir gnu
22814 (cd gnu
22815 TEST_TAR_FORMAT=gnu
22816 export TEST_TAR_FORMAT
22817 TAR_OPTIONS=\"-H gnu\"
22818 export TAR_OPTIONS
22819 rm -rf *
22820
22821 mkdir dir
22822 mkdir dir/sub
22823 genfile --file dir/file1
22824 genfile --file dir/sub/file2
22825
22826 genfile --run --checkpoint=3 --unlink dir/file1 -- \\
22827        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
22828        --checkpoint-action='echo' -c -f archive.tar \\
22829        --listed-incremental db -v dir >/dev/null
22830 )"
22831 at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
22832 ( $at_check_trace;
22833 mkdir gnu
22834 (cd gnu
22835 TEST_TAR_FORMAT=gnu
22836 export TEST_TAR_FORMAT
22837 TAR_OPTIONS="-H gnu"
22838 export TAR_OPTIONS
22839 rm -rf *
22840
22841 mkdir dir
22842 mkdir dir/sub
22843 genfile --file dir/file1
22844 genfile --file dir/sub/file2
22845
22846 genfile --run --checkpoint=3 --unlink dir/file1 -- \
22847        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
22848        --checkpoint-action='echo' -c -f archive.tar \
22849        --listed-incremental db -v dir >/dev/null
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: dir: Directory is new
22855 tar: dir/sub: Directory is new
22856 tar: dir/file1: File removed before we read it
22857 " | \
22858   $at_diff - "$at_stderr" || at_failed=:
22859 echo stdout:; cat "$at_stdout"
22860 at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
22861 $at_failed && at_fn_log_failure
22862 $at_traceon; }
22863
22864               { set +x
22865 $as_echo "$at_srcdir/filerem01.at:39:
22866 mkdir posix
22867 (cd posix
22868 TEST_TAR_FORMAT=posix
22869 export TEST_TAR_FORMAT
22870 TAR_OPTIONS=\"-H posix\"
22871 export TAR_OPTIONS
22872 rm -rf *
22873
22874 mkdir dir
22875 mkdir dir/sub
22876 genfile --file dir/file1
22877 genfile --file dir/sub/file2
22878
22879 genfile --run --checkpoint=3 --unlink dir/file1 -- \\
22880        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
22881        --checkpoint-action='echo' -c -f archive.tar \\
22882        --listed-incremental db -v dir >/dev/null
22883 )"
22884 at_fn_check_prepare_notrace 'an embedded newline' "filerem01.at:39"
22885 ( $at_check_trace;
22886 mkdir posix
22887 (cd posix
22888 TEST_TAR_FORMAT=posix
22889 export TEST_TAR_FORMAT
22890 TAR_OPTIONS="-H posix"
22891 export TAR_OPTIONS
22892 rm -rf *
22893
22894 mkdir dir
22895 mkdir dir/sub
22896 genfile --file dir/file1
22897 genfile --file dir/sub/file2
22898
22899 genfile --run --checkpoint=3 --unlink dir/file1 -- \
22900        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
22901        --checkpoint-action='echo' -c -f archive.tar \
22902        --listed-incremental db -v dir >/dev/null
22903 )
22904 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
22905 at_status=$? at_failed=false
22906 $at_check_filter
22907 echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new
22908 tar: dir/sub: Directory is new
22909 tar: dir/file1: File removed before we read it
22910 " | \
22911   $at_diff - "$at_stderr" || at_failed=:
22912 echo stdout:; cat "$at_stdout"
22913 at_fn_check_status 1 $at_status "$at_srcdir/filerem01.at:39"
22914 $at_failed && at_fn_log_failure
22915 $at_traceon; }
22916
22917
22918
22919
22920 # Timing information:
22921 #
22922 # For -Hgnu the above command line takes about 8 seconds to execute and
22923 # produces:
22924 #
22925 # tar: dir: Directory is new
22926 # tar: dir/sub: Directory is new
22927 # dir/
22928 # tar: Write checkpoint 1
22929 # tar: Write checkpoint 2
22930 # dir/sub/
22931 # tar: Write checkpoint 3
22932 # tar: Write checkpoint 4
22933 # dir/file1
22934 # tar: Write checkpoint 5
22935 # dir/sub/file2
22936 # tar: Write checkpoint 6
22937 # tar: Write checkpoint 7
22938 # tar: Write checkpoint 8
22939 #
22940 # For -Hposix the above command line takes about 14 seconds to execute and
22941 # produces:
22942 #
22943 # ./tar: dir: Directory is new
22944 # ./tar: dir/sub: Directory is new
22945 # dir/
22946 # ./tar: Write checkpoint 1
22947 # ./tar: Write checkpoint 2
22948 # ./tar: Write checkpoint 3
22949 # dir/sub/
22950 # ./tar: Write checkpoint 4
22951 # ./tar: Write checkpoint 5
22952 # ./tar: Write checkpoint 6
22953 # dir/file1
22954 # ./tar: Write checkpoint 7
22955 # ./tar: Write checkpoint 8
22956 # ./tar: Write checkpoint 9
22957 # dir/sub/file2
22958 # ./tar: Write checkpoint 10
22959 # ./tar: Write checkpoint 11
22960 # ./tar: Write checkpoint 12
22961 # ./tar: Write checkpoint 13
22962 # ./tar: Write checkpoint 14
22963
22964
22965   set +x
22966   $at_times_p && times >"$at_times_file"
22967 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
22968 read at_status <"$at_status_file"
22969 #AT_STOP_97
22970 #AT_START_98
22971 at_fn_group_banner 98 'filerem02.at:26' \
22972   "toplevel file removed (ca. 24 seconds)" "         " 12
22973 at_xfail=no
22974       test -f $XFAILFILE && at_xfail=yes
22975 (
22976   $as_echo "98. $at_setup_line: testing $at_desc ..."
22977   $at_traceon
22978
22979
22980
22981
22982
22983   { set +x
22984 $as_echo "$at_srcdir/filerem02.at:29:
22985 mkdir gnu
22986 (cd gnu
22987 TEST_TAR_FORMAT=gnu
22988 export TEST_TAR_FORMAT
22989 TAR_OPTIONS=\"-H gnu\"
22990 export TAR_OPTIONS
22991 rm -rf *
22992
22993 mkdir dir
22994 mkdir dir/sub
22995 genfile --file dir/file1
22996 genfile --file dir/sub/file2
22997 mkdir dir2
22998 genfile --file dir2/file1
22999
23000 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
23001        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
23002        --checkpoint-action='echo' -c -f archive.tar \\
23003        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
23004 )"
23005 at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
23006 ( $at_check_trace;
23007 mkdir gnu
23008 (cd gnu
23009 TEST_TAR_FORMAT=gnu
23010 export TEST_TAR_FORMAT
23011 TAR_OPTIONS="-H gnu"
23012 export TAR_OPTIONS
23013 rm -rf *
23014
23015 mkdir dir
23016 mkdir dir/sub
23017 genfile --file dir/file1
23018 genfile --file dir/sub/file2
23019 mkdir dir2
23020 genfile --file dir2/file1
23021
23022 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
23023        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
23024        --checkpoint-action='echo' -c -f archive.tar \
23025        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
23026 )
23027 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23028 at_status=$? at_failed=false
23029 $at_check_filter
23030 echo stderr:; cat "$at_stderr"
23031 echo stdout:; cat "$at_stdout"
23032 at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
23033 $at_failed && at_fn_log_failure
23034 $at_traceon; }
23035
23036               { set +x
23037 $as_echo "$at_srcdir/filerem02.at:29:
23038 mkdir posix
23039 (cd posix
23040 TEST_TAR_FORMAT=posix
23041 export TEST_TAR_FORMAT
23042 TAR_OPTIONS=\"-H posix\"
23043 export TAR_OPTIONS
23044 rm -rf *
23045
23046 mkdir dir
23047 mkdir dir/sub
23048 genfile --file dir/file1
23049 genfile --file dir/sub/file2
23050 mkdir dir2
23051 genfile --file dir2/file1
23052
23053 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\
23054        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\
23055        --checkpoint-action='echo' -c -f archive.tar \\
23056        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
23057 )"
23058 at_fn_check_prepare_notrace 'an embedded newline' "filerem02.at:29"
23059 ( $at_check_trace;
23060 mkdir posix
23061 (cd posix
23062 TEST_TAR_FORMAT=posix
23063 export TEST_TAR_FORMAT
23064 TAR_OPTIONS="-H posix"
23065 export TAR_OPTIONS
23066 rm -rf *
23067
23068 mkdir dir
23069 mkdir dir/sub
23070 genfile --file dir/file1
23071 genfile --file dir/sub/file2
23072 mkdir dir2
23073 genfile --file dir2/file1
23074
23075 genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \
23076        tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \
23077        --checkpoint-action='echo' -c -f archive.tar \
23078        --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null
23079 )
23080 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23081 at_status=$? at_failed=false
23082 $at_check_filter
23083 echo stderr:; cat "$at_stderr"
23084 echo stdout:; cat "$at_stdout"
23085 at_fn_check_status 2 $at_status "$at_srcdir/filerem02.at:29"
23086 $at_failed && at_fn_log_failure
23087 $at_traceon; }
23088
23089
23090
23091
23092 # Ignore stdout and stderr because their contents depend on
23093 # the file system implementation.
23094
23095 # Timing information: see filerem01.at
23096
23097   set +x
23098   $at_times_p && times >"$at_times_file"
23099 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23100 read at_status <"$at_status_file"
23101 #AT_STOP_98
23102 #AT_START_99
23103 at_fn_group_banner 99 'rename01.at:24' \
23104   "renamed dirs in incrementals" "                   " 13
23105 at_xfail=no
23106       test -f $XFAILFILE && at_xfail=yes
23107 (
23108   $as_echo "99. $at_setup_line: testing $at_desc ..."
23109   $at_traceon
23110
23111
23112
23113
23114
23115   { set +x
23116 $as_echo "$at_srcdir/rename01.at:27:
23117 mkdir gnu
23118 (cd gnu
23119 TEST_TAR_FORMAT=gnu
23120 export TEST_TAR_FORMAT
23121 TAR_OPTIONS=\"-H gnu\"
23122 export TAR_OPTIONS
23123 rm -rf *
23124
23125
23126 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23127
23128
23129 mkdir foo
23130 genfile --file foo/file1
23131 genfile --file foo/file2
23132 mkdir foo/bar
23133 genfile --file foo/bar/file
23134
23135 echo \"Creating base archive\"
23136 tar -g incr -cf arch.1 -v foo
23137
23138 mv foo/bar foo/baz
23139
23140 echo \"Creating incremental archive\"
23141 tar -g incr -cf arch.2 -v foo
23142
23143 mv foo old
23144
23145 tar xfg arch.1 /dev/null
23146
23147 echo \"Begin directory listing 1\"
23148 find foo | sort
23149 echo \"End directory listing 1\"
23150
23151 tar xfg arch.2 /dev/null
23152 echo Begin directory listing 2
23153 find foo | sort
23154 echo End directory listing 2
23155 )"
23156 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
23157 ( $at_check_trace;
23158 mkdir gnu
23159 (cd gnu
23160 TEST_TAR_FORMAT=gnu
23161 export TEST_TAR_FORMAT
23162 TAR_OPTIONS="-H gnu"
23163 export TAR_OPTIONS
23164 rm -rf *
23165
23166
23167 test -z "`sort < /dev/null 2>&1`" || exit 77
23168
23169
23170 mkdir foo
23171 genfile --file foo/file1
23172 genfile --file foo/file2
23173 mkdir foo/bar
23174 genfile --file foo/bar/file
23175
23176 echo "Creating base archive"
23177 tar -g incr -cf arch.1 -v foo
23178
23179 mv foo/bar foo/baz
23180
23181 echo "Creating incremental archive"
23182 tar -g incr -cf arch.2 -v foo
23183
23184 mv foo old
23185
23186 tar xfg arch.1 /dev/null
23187
23188 echo "Begin directory listing 1"
23189 find foo | sort
23190 echo "End directory listing 1"
23191
23192 tar xfg arch.2 /dev/null
23193 echo Begin directory listing 2
23194 find foo | sort
23195 echo End directory listing 2
23196 )
23197 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23198 at_status=$? at_failed=false
23199 $at_check_filter
23200 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23201 tar: foo/bar: Directory is new
23202 tar: foo/baz: Directory has been renamed from 'foo/bar'
23203 " | \
23204   $at_diff - "$at_stderr" || at_failed=:
23205 echo >>"$at_stdout"; $as_echo "Creating base archive
23206 foo/
23207 foo/bar/
23208 foo/file1
23209 foo/file2
23210 foo/bar/file
23211 Creating incremental archive
23212 foo/
23213 foo/baz/
23214 Begin directory listing 1
23215 foo
23216 foo/bar
23217 foo/bar/file
23218 foo/file1
23219 foo/file2
23220 End directory listing 1
23221 Begin directory listing 2
23222 foo
23223 foo/baz
23224 foo/baz/file
23225 foo/file1
23226 foo/file2
23227 End directory listing 2
23228 " | \
23229   $at_diff - "$at_stdout" || at_failed=:
23230 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
23231 $at_failed && at_fn_log_failure
23232 $at_traceon; }
23233
23234               { set +x
23235 $as_echo "$at_srcdir/rename01.at:27:
23236 mkdir oldgnu
23237 (cd oldgnu
23238 TEST_TAR_FORMAT=oldgnu
23239 export TEST_TAR_FORMAT
23240 TAR_OPTIONS=\"-H oldgnu\"
23241 export TAR_OPTIONS
23242 rm -rf *
23243
23244
23245 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23246
23247
23248 mkdir foo
23249 genfile --file foo/file1
23250 genfile --file foo/file2
23251 mkdir foo/bar
23252 genfile --file foo/bar/file
23253
23254 echo \"Creating base archive\"
23255 tar -g incr -cf arch.1 -v foo
23256
23257 mv foo/bar foo/baz
23258
23259 echo \"Creating incremental archive\"
23260 tar -g incr -cf arch.2 -v foo
23261
23262 mv foo old
23263
23264 tar xfg arch.1 /dev/null
23265
23266 echo \"Begin directory listing 1\"
23267 find foo | sort
23268 echo \"End directory listing 1\"
23269
23270 tar xfg arch.2 /dev/null
23271 echo Begin directory listing 2
23272 find foo | sort
23273 echo End directory listing 2
23274 )"
23275 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
23276 ( $at_check_trace;
23277 mkdir oldgnu
23278 (cd oldgnu
23279 TEST_TAR_FORMAT=oldgnu
23280 export TEST_TAR_FORMAT
23281 TAR_OPTIONS="-H oldgnu"
23282 export TAR_OPTIONS
23283 rm -rf *
23284
23285
23286 test -z "`sort < /dev/null 2>&1`" || exit 77
23287
23288
23289 mkdir foo
23290 genfile --file foo/file1
23291 genfile --file foo/file2
23292 mkdir foo/bar
23293 genfile --file foo/bar/file
23294
23295 echo "Creating base archive"
23296 tar -g incr -cf arch.1 -v foo
23297
23298 mv foo/bar foo/baz
23299
23300 echo "Creating incremental archive"
23301 tar -g incr -cf arch.2 -v foo
23302
23303 mv foo old
23304
23305 tar xfg arch.1 /dev/null
23306
23307 echo "Begin directory listing 1"
23308 find foo | sort
23309 echo "End directory listing 1"
23310
23311 tar xfg arch.2 /dev/null
23312 echo Begin directory listing 2
23313 find foo | sort
23314 echo End directory listing 2
23315 )
23316 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23317 at_status=$? at_failed=false
23318 $at_check_filter
23319 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23320 tar: foo/bar: Directory is new
23321 tar: foo/baz: Directory has been renamed from 'foo/bar'
23322 " | \
23323   $at_diff - "$at_stderr" || at_failed=:
23324 echo >>"$at_stdout"; $as_echo "Creating base archive
23325 foo/
23326 foo/bar/
23327 foo/file1
23328 foo/file2
23329 foo/bar/file
23330 Creating incremental archive
23331 foo/
23332 foo/baz/
23333 Begin directory listing 1
23334 foo
23335 foo/bar
23336 foo/bar/file
23337 foo/file1
23338 foo/file2
23339 End directory listing 1
23340 Begin directory listing 2
23341 foo
23342 foo/baz
23343 foo/baz/file
23344 foo/file1
23345 foo/file2
23346 End directory listing 2
23347 " | \
23348   $at_diff - "$at_stdout" || at_failed=:
23349 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
23350 $at_failed && at_fn_log_failure
23351 $at_traceon; }
23352
23353               { set +x
23354 $as_echo "$at_srcdir/rename01.at:27:
23355 mkdir posix
23356 (cd posix
23357 TEST_TAR_FORMAT=posix
23358 export TEST_TAR_FORMAT
23359 TAR_OPTIONS=\"-H posix\"
23360 export TAR_OPTIONS
23361 rm -rf *
23362
23363
23364 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23365
23366
23367 mkdir foo
23368 genfile --file foo/file1
23369 genfile --file foo/file2
23370 mkdir foo/bar
23371 genfile --file foo/bar/file
23372
23373 echo \"Creating base archive\"
23374 tar -g incr -cf arch.1 -v foo
23375
23376 mv foo/bar foo/baz
23377
23378 echo \"Creating incremental archive\"
23379 tar -g incr -cf arch.2 -v foo
23380
23381 mv foo old
23382
23383 tar xfg arch.1 /dev/null
23384
23385 echo \"Begin directory listing 1\"
23386 find foo | sort
23387 echo \"End directory listing 1\"
23388
23389 tar xfg arch.2 /dev/null
23390 echo Begin directory listing 2
23391 find foo | sort
23392 echo End directory listing 2
23393 )"
23394 at_fn_check_prepare_notrace 'a `...` command substitution' "rename01.at:27"
23395 ( $at_check_trace;
23396 mkdir posix
23397 (cd posix
23398 TEST_TAR_FORMAT=posix
23399 export TEST_TAR_FORMAT
23400 TAR_OPTIONS="-H posix"
23401 export TAR_OPTIONS
23402 rm -rf *
23403
23404
23405 test -z "`sort < /dev/null 2>&1`" || exit 77
23406
23407
23408 mkdir foo
23409 genfile --file foo/file1
23410 genfile --file foo/file2
23411 mkdir foo/bar
23412 genfile --file foo/bar/file
23413
23414 echo "Creating base archive"
23415 tar -g incr -cf arch.1 -v foo
23416
23417 mv foo/bar foo/baz
23418
23419 echo "Creating incremental archive"
23420 tar -g incr -cf arch.2 -v foo
23421
23422 mv foo old
23423
23424 tar xfg arch.1 /dev/null
23425
23426 echo "Begin directory listing 1"
23427 find foo | sort
23428 echo "End directory listing 1"
23429
23430 tar xfg arch.2 /dev/null
23431 echo Begin directory listing 2
23432 find foo | sort
23433 echo End directory listing 2
23434 )
23435 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23436 at_status=$? at_failed=false
23437 $at_check_filter
23438 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23439 tar: foo/bar: Directory is new
23440 tar: foo/baz: Directory has been renamed from 'foo/bar'
23441 " | \
23442   $at_diff - "$at_stderr" || at_failed=:
23443 echo >>"$at_stdout"; $as_echo "Creating base archive
23444 foo/
23445 foo/bar/
23446 foo/file1
23447 foo/file2
23448 foo/bar/file
23449 Creating incremental archive
23450 foo/
23451 foo/baz/
23452 Begin directory listing 1
23453 foo
23454 foo/bar
23455 foo/bar/file
23456 foo/file1
23457 foo/file2
23458 End directory listing 1
23459 Begin directory listing 2
23460 foo
23461 foo/baz
23462 foo/baz/file
23463 foo/file1
23464 foo/file2
23465 End directory listing 2
23466 " | \
23467   $at_diff - "$at_stdout" || at_failed=:
23468 at_fn_check_status 0 $at_status "$at_srcdir/rename01.at:27"
23469 $at_failed && at_fn_log_failure
23470 $at_traceon; }
23471
23472
23473
23474
23475   set +x
23476   $at_times_p && times >"$at_times_file"
23477 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23478 read at_status <"$at_status_file"
23479 #AT_STOP_99
23480 #AT_START_100
23481 at_fn_group_banner 100 'rename02.at:24' \
23482   "move between hierarchies" "                       " 13
23483 at_xfail=no
23484       test -f $XFAILFILE && at_xfail=yes
23485 (
23486   $as_echo "100. $at_setup_line: testing $at_desc ..."
23487   $at_traceon
23488
23489
23490
23491
23492
23493   { set +x
23494 $as_echo "$at_srcdir/rename02.at:27:
23495 mkdir gnu
23496 (cd gnu
23497 TEST_TAR_FORMAT=gnu
23498 export TEST_TAR_FORMAT
23499 TAR_OPTIONS=\"-H gnu\"
23500 export TAR_OPTIONS
23501 rm -rf *
23502
23503
23504 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23505
23506 mkdir foo
23507 genfile --file foo/file1
23508 genfile --file foo/file2
23509 mkdir foo/bar
23510 genfile --file foo/bar/file.r
23511 mkdir foo/bar/baz
23512 genfile --file foo/bar/baz/file.z
23513
23514 sleep 1
23515
23516 echo \"Creating base archive\"
23517 tar -g incr -cf arch.1 -v foo
23518
23519 mv foo/bar/baz foo
23520
23521 echo \"Creating incremental archive\"
23522 tar -g incr -cf arch.2 -v foo
23523
23524 mv foo old
23525
23526 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23527 sort tmperr >&2
23528
23529 echo \"Begin directory listing 1\"
23530 find foo | sort
23531 echo \"End directory listing 1\"
23532
23533 tar xfgv arch.2 /dev/null --warning=no-timestamp
23534 echo Begin directory listing 2
23535 find foo | sort
23536 echo End directory listing 2
23537 )"
23538 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
23539 ( $at_check_trace;
23540 mkdir gnu
23541 (cd gnu
23542 TEST_TAR_FORMAT=gnu
23543 export TEST_TAR_FORMAT
23544 TAR_OPTIONS="-H gnu"
23545 export TAR_OPTIONS
23546 rm -rf *
23547
23548
23549 test -z "`sort < /dev/null 2>&1`" || exit 77
23550
23551 mkdir foo
23552 genfile --file foo/file1
23553 genfile --file foo/file2
23554 mkdir foo/bar
23555 genfile --file foo/bar/file.r
23556 mkdir foo/bar/baz
23557 genfile --file foo/bar/baz/file.z
23558
23559 sleep 1
23560
23561 echo "Creating base archive"
23562 tar -g incr -cf arch.1 -v foo
23563
23564 mv foo/bar/baz foo
23565
23566 echo "Creating incremental archive"
23567 tar -g incr -cf arch.2 -v foo
23568
23569 mv foo old
23570
23571 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23572 sort tmperr >&2
23573
23574 echo "Begin directory listing 1"
23575 find foo | sort
23576 echo "End directory listing 1"
23577
23578 tar xfgv arch.2 /dev/null --warning=no-timestamp
23579 echo Begin directory listing 2
23580 find foo | sort
23581 echo End directory listing 2
23582 )
23583 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23584 at_status=$? at_failed=false
23585 $at_check_filter
23586 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23587 tar: foo/bar: Directory is new
23588 tar: foo/bar/baz: Directory is new
23589 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
23590 " | \
23591   $at_diff - "$at_stderr" || at_failed=:
23592 echo >>"$at_stdout"; $as_echo "Creating base archive
23593 foo/
23594 foo/bar/
23595 foo/bar/baz/
23596 foo/file1
23597 foo/file2
23598 foo/bar/file.r
23599 foo/bar/baz/file.z
23600 Creating incremental archive
23601 foo/
23602 foo/bar/
23603 foo/baz/
23604 Begin directory listing 1
23605 foo
23606 foo/bar
23607 foo/bar/baz
23608 foo/bar/baz/file.z
23609 foo/bar/file.r
23610 foo/file1
23611 foo/file2
23612 End directory listing 1
23613 foo/
23614 foo/bar/
23615 foo/baz/
23616 Begin directory listing 2
23617 foo
23618 foo/bar
23619 foo/bar/file.r
23620 foo/baz
23621 foo/baz/file.z
23622 foo/file1
23623 foo/file2
23624 End directory listing 2
23625 " | \
23626   $at_diff - "$at_stdout" || at_failed=:
23627 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
23628 $at_failed && at_fn_log_failure
23629 $at_traceon; }
23630
23631               { set +x
23632 $as_echo "$at_srcdir/rename02.at:27:
23633 mkdir oldgnu
23634 (cd oldgnu
23635 TEST_TAR_FORMAT=oldgnu
23636 export TEST_TAR_FORMAT
23637 TAR_OPTIONS=\"-H oldgnu\"
23638 export TAR_OPTIONS
23639 rm -rf *
23640
23641
23642 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23643
23644 mkdir foo
23645 genfile --file foo/file1
23646 genfile --file foo/file2
23647 mkdir foo/bar
23648 genfile --file foo/bar/file.r
23649 mkdir foo/bar/baz
23650 genfile --file foo/bar/baz/file.z
23651
23652 sleep 1
23653
23654 echo \"Creating base archive\"
23655 tar -g incr -cf arch.1 -v foo
23656
23657 mv foo/bar/baz foo
23658
23659 echo \"Creating incremental archive\"
23660 tar -g incr -cf arch.2 -v foo
23661
23662 mv foo old
23663
23664 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23665 sort tmperr >&2
23666
23667 echo \"Begin directory listing 1\"
23668 find foo | sort
23669 echo \"End directory listing 1\"
23670
23671 tar xfgv arch.2 /dev/null --warning=no-timestamp
23672 echo Begin directory listing 2
23673 find foo | sort
23674 echo End directory listing 2
23675 )"
23676 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
23677 ( $at_check_trace;
23678 mkdir oldgnu
23679 (cd oldgnu
23680 TEST_TAR_FORMAT=oldgnu
23681 export TEST_TAR_FORMAT
23682 TAR_OPTIONS="-H oldgnu"
23683 export TAR_OPTIONS
23684 rm -rf *
23685
23686
23687 test -z "`sort < /dev/null 2>&1`" || exit 77
23688
23689 mkdir foo
23690 genfile --file foo/file1
23691 genfile --file foo/file2
23692 mkdir foo/bar
23693 genfile --file foo/bar/file.r
23694 mkdir foo/bar/baz
23695 genfile --file foo/bar/baz/file.z
23696
23697 sleep 1
23698
23699 echo "Creating base archive"
23700 tar -g incr -cf arch.1 -v foo
23701
23702 mv foo/bar/baz foo
23703
23704 echo "Creating incremental archive"
23705 tar -g incr -cf arch.2 -v foo
23706
23707 mv foo old
23708
23709 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23710 sort tmperr >&2
23711
23712 echo "Begin directory listing 1"
23713 find foo | sort
23714 echo "End directory listing 1"
23715
23716 tar xfgv arch.2 /dev/null --warning=no-timestamp
23717 echo Begin directory listing 2
23718 find foo | sort
23719 echo End directory listing 2
23720 )
23721 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23722 at_status=$? at_failed=false
23723 $at_check_filter
23724 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23725 tar: foo/bar: Directory is new
23726 tar: foo/bar/baz: Directory is new
23727 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
23728 " | \
23729   $at_diff - "$at_stderr" || at_failed=:
23730 echo >>"$at_stdout"; $as_echo "Creating base archive
23731 foo/
23732 foo/bar/
23733 foo/bar/baz/
23734 foo/file1
23735 foo/file2
23736 foo/bar/file.r
23737 foo/bar/baz/file.z
23738 Creating incremental archive
23739 foo/
23740 foo/bar/
23741 foo/baz/
23742 Begin directory listing 1
23743 foo
23744 foo/bar
23745 foo/bar/baz
23746 foo/bar/baz/file.z
23747 foo/bar/file.r
23748 foo/file1
23749 foo/file2
23750 End directory listing 1
23751 foo/
23752 foo/bar/
23753 foo/baz/
23754 Begin directory listing 2
23755 foo
23756 foo/bar
23757 foo/bar/file.r
23758 foo/baz
23759 foo/baz/file.z
23760 foo/file1
23761 foo/file2
23762 End directory listing 2
23763 " | \
23764   $at_diff - "$at_stdout" || at_failed=:
23765 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
23766 $at_failed && at_fn_log_failure
23767 $at_traceon; }
23768
23769               { set +x
23770 $as_echo "$at_srcdir/rename02.at:27:
23771 mkdir posix
23772 (cd posix
23773 TEST_TAR_FORMAT=posix
23774 export TEST_TAR_FORMAT
23775 TAR_OPTIONS=\"-H posix\"
23776 export TAR_OPTIONS
23777 rm -rf *
23778
23779
23780 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23781
23782 mkdir foo
23783 genfile --file foo/file1
23784 genfile --file foo/file2
23785 mkdir foo/bar
23786 genfile --file foo/bar/file.r
23787 mkdir foo/bar/baz
23788 genfile --file foo/bar/baz/file.z
23789
23790 sleep 1
23791
23792 echo \"Creating base archive\"
23793 tar -g incr -cf arch.1 -v foo
23794
23795 mv foo/bar/baz foo
23796
23797 echo \"Creating incremental archive\"
23798 tar -g incr -cf arch.2 -v foo
23799
23800 mv foo old
23801
23802 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23803 sort tmperr >&2
23804
23805 echo \"Begin directory listing 1\"
23806 find foo | sort
23807 echo \"End directory listing 1\"
23808
23809 tar xfgv arch.2 /dev/null --warning=no-timestamp
23810 echo Begin directory listing 2
23811 find foo | sort
23812 echo End directory listing 2
23813 )"
23814 at_fn_check_prepare_notrace 'a `...` command substitution' "rename02.at:27"
23815 ( $at_check_trace;
23816 mkdir posix
23817 (cd posix
23818 TEST_TAR_FORMAT=posix
23819 export TEST_TAR_FORMAT
23820 TAR_OPTIONS="-H posix"
23821 export TAR_OPTIONS
23822 rm -rf *
23823
23824
23825 test -z "`sort < /dev/null 2>&1`" || exit 77
23826
23827 mkdir foo
23828 genfile --file foo/file1
23829 genfile --file foo/file2
23830 mkdir foo/bar
23831 genfile --file foo/bar/file.r
23832 mkdir foo/bar/baz
23833 genfile --file foo/bar/baz/file.z
23834
23835 sleep 1
23836
23837 echo "Creating base archive"
23838 tar -g incr -cf arch.1 -v foo
23839
23840 mv foo/bar/baz foo
23841
23842 echo "Creating incremental archive"
23843 tar -g incr -cf arch.2 -v foo
23844
23845 mv foo old
23846
23847 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
23848 sort tmperr >&2
23849
23850 echo "Begin directory listing 1"
23851 find foo | sort
23852 echo "End directory listing 1"
23853
23854 tar xfgv arch.2 /dev/null --warning=no-timestamp
23855 echo Begin directory listing 2
23856 find foo | sort
23857 echo End directory listing 2
23858 )
23859 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
23860 at_status=$? at_failed=false
23861 $at_check_filter
23862 echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new
23863 tar: foo/bar: Directory is new
23864 tar: foo/bar/baz: Directory is new
23865 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
23866 " | \
23867   $at_diff - "$at_stderr" || at_failed=:
23868 echo >>"$at_stdout"; $as_echo "Creating base archive
23869 foo/
23870 foo/bar/
23871 foo/bar/baz/
23872 foo/file1
23873 foo/file2
23874 foo/bar/file.r
23875 foo/bar/baz/file.z
23876 Creating incremental archive
23877 foo/
23878 foo/bar/
23879 foo/baz/
23880 Begin directory listing 1
23881 foo
23882 foo/bar
23883 foo/bar/baz
23884 foo/bar/baz/file.z
23885 foo/bar/file.r
23886 foo/file1
23887 foo/file2
23888 End directory listing 1
23889 foo/
23890 foo/bar/
23891 foo/baz/
23892 Begin directory listing 2
23893 foo
23894 foo/bar
23895 foo/bar/file.r
23896 foo/baz
23897 foo/baz/file.z
23898 foo/file1
23899 foo/file2
23900 End directory listing 2
23901 " | \
23902   $at_diff - "$at_stdout" || at_failed=:
23903 at_fn_check_status 0 $at_status "$at_srcdir/rename02.at:27"
23904 $at_failed && at_fn_log_failure
23905 $at_traceon; }
23906
23907
23908
23909
23910   set +x
23911   $at_times_p && times >"$at_times_file"
23912 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
23913 read at_status <"$at_status_file"
23914 #AT_STOP_100
23915 #AT_START_101
23916 at_fn_group_banner 101 'rename03.at:23' \
23917   "cyclic renames" "                                 " 13
23918 at_xfail=no
23919       test -f $XFAILFILE && at_xfail=yes
23920 (
23921   $as_echo "101. $at_setup_line: testing $at_desc ..."
23922   $at_traceon
23923
23924
23925
23926
23927
23928   { set +x
23929 $as_echo "$at_srcdir/rename03.at:26:
23930 mkdir gnu
23931 (cd gnu
23932 TEST_TAR_FORMAT=gnu
23933 export TEST_TAR_FORMAT
23934 TAR_OPTIONS=\"-H gnu\"
23935 export TAR_OPTIONS
23936 rm -rf *
23937
23938
23939 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
23940
23941
23942 mkdir foo
23943 genfile --file foo/file1
23944 genfile --file foo/file2
23945
23946 mkdir foo/a
23947 genfile --file foo/a/filea
23948
23949 mkdir foo/b
23950 genfile --file foo/b/fileb
23951
23952 mkdir foo/c
23953 genfile --file foo/c/filec
23954
23955 sleep 1
23956
23957 echo \"First dump\"
23958 echo \"First dump\">&2
23959 tar -g incr -cf arch.1 -v foo 2>tmperr
23960 sort tmperr >&2
23961
23962 # Shuffle directories:
23963 (cd foo
23964 mv a \$\$
23965 mv c a
23966 mv b c
23967 mv \$\$ b)
23968
23969 echo \"Second dump\"
23970 echo \"Second dump\" >&2
23971 tar -g incr -cf arch.2 -v foo 2>tmperr
23972 sort tmperr >&2
23973
23974 tar xfg arch.1 /dev/null --warning=no-timestamp
23975
23976 echo \"Begin directory listing 1\"
23977 find foo | sort
23978 echo \"End directory listing 1\"
23979
23980 tar xfgv arch.2 /dev/null --warning=no-timestamp
23981 echo Begin directory listing 2
23982 find foo | sort
23983 echo End directory listing 2
23984 )"
23985 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
23986 ( $at_check_trace;
23987 mkdir gnu
23988 (cd gnu
23989 TEST_TAR_FORMAT=gnu
23990 export TEST_TAR_FORMAT
23991 TAR_OPTIONS="-H gnu"
23992 export TAR_OPTIONS
23993 rm -rf *
23994
23995
23996 test -z "`sort < /dev/null 2>&1`" || exit 77
23997
23998
23999 mkdir foo
24000 genfile --file foo/file1
24001 genfile --file foo/file2
24002
24003 mkdir foo/a
24004 genfile --file foo/a/filea
24005
24006 mkdir foo/b
24007 genfile --file foo/b/fileb
24008
24009 mkdir foo/c
24010 genfile --file foo/c/filec
24011
24012 sleep 1
24013
24014 echo "First dump"
24015 echo "First dump">&2
24016 tar -g incr -cf arch.1 -v foo 2>tmperr
24017 sort tmperr >&2
24018
24019 # Shuffle directories:
24020 (cd foo
24021 mv a $$
24022 mv c a
24023 mv b c
24024 mv $$ b)
24025
24026 echo "Second dump"
24027 echo "Second dump" >&2
24028 tar -g incr -cf arch.2 -v foo 2>tmperr
24029 sort tmperr >&2
24030
24031 tar xfg arch.1 /dev/null --warning=no-timestamp
24032
24033 echo "Begin directory listing 1"
24034 find foo | sort
24035 echo "End directory listing 1"
24036
24037 tar xfgv arch.2 /dev/null --warning=no-timestamp
24038 echo Begin directory listing 2
24039 find foo | sort
24040 echo End directory listing 2
24041 )
24042 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24043 at_status=$? at_failed=false
24044 $at_check_filter
24045 echo >>"$at_stderr"; $as_echo "First dump
24046 tar: foo/a: Directory is new
24047 tar: foo/b: Directory is new
24048 tar: foo/c: Directory is new
24049 tar: foo: Directory is new
24050 Second dump
24051 tar: foo/a: Directory has been renamed from 'foo/c'
24052 tar: foo/b: Directory has been renamed from 'foo/a'
24053 tar: foo/c: Directory has been renamed from 'foo/b'
24054 " | \
24055   $at_diff - "$at_stderr" || at_failed=:
24056 echo >>"$at_stdout"; $as_echo "First dump
24057 foo/
24058 foo/a/
24059 foo/b/
24060 foo/c/
24061 foo/file1
24062 foo/file2
24063 foo/a/filea
24064 foo/b/fileb
24065 foo/c/filec
24066 Second dump
24067 foo/
24068 foo/a/
24069 foo/b/
24070 foo/c/
24071 Begin directory listing 1
24072 foo
24073 foo/a
24074 foo/a/filea
24075 foo/b
24076 foo/b/fileb
24077 foo/c
24078 foo/c/filec
24079 foo/file1
24080 foo/file2
24081 End directory listing 1
24082 foo/
24083 foo/a/
24084 foo/b/
24085 foo/c/
24086 Begin directory listing 2
24087 foo
24088 foo/a
24089 foo/a/filec
24090 foo/b
24091 foo/b/filea
24092 foo/c
24093 foo/c/fileb
24094 foo/file1
24095 foo/file2
24096 End directory listing 2
24097 " | \
24098   $at_diff - "$at_stdout" || at_failed=:
24099 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
24100 $at_failed && at_fn_log_failure
24101 $at_traceon; }
24102
24103               { set +x
24104 $as_echo "$at_srcdir/rename03.at:26:
24105 mkdir oldgnu
24106 (cd oldgnu
24107 TEST_TAR_FORMAT=oldgnu
24108 export TEST_TAR_FORMAT
24109 TAR_OPTIONS=\"-H oldgnu\"
24110 export TAR_OPTIONS
24111 rm -rf *
24112
24113
24114 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24115
24116
24117 mkdir foo
24118 genfile --file foo/file1
24119 genfile --file foo/file2
24120
24121 mkdir foo/a
24122 genfile --file foo/a/filea
24123
24124 mkdir foo/b
24125 genfile --file foo/b/fileb
24126
24127 mkdir foo/c
24128 genfile --file foo/c/filec
24129
24130 sleep 1
24131
24132 echo \"First dump\"
24133 echo \"First dump\">&2
24134 tar -g incr -cf arch.1 -v foo 2>tmperr
24135 sort tmperr >&2
24136
24137 # Shuffle directories:
24138 (cd foo
24139 mv a \$\$
24140 mv c a
24141 mv b c
24142 mv \$\$ b)
24143
24144 echo \"Second dump\"
24145 echo \"Second dump\" >&2
24146 tar -g incr -cf arch.2 -v foo 2>tmperr
24147 sort tmperr >&2
24148
24149 tar xfg arch.1 /dev/null --warning=no-timestamp
24150
24151 echo \"Begin directory listing 1\"
24152 find foo | sort
24153 echo \"End directory listing 1\"
24154
24155 tar xfgv arch.2 /dev/null --warning=no-timestamp
24156 echo Begin directory listing 2
24157 find foo | sort
24158 echo End directory listing 2
24159 )"
24160 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
24161 ( $at_check_trace;
24162 mkdir oldgnu
24163 (cd oldgnu
24164 TEST_TAR_FORMAT=oldgnu
24165 export TEST_TAR_FORMAT
24166 TAR_OPTIONS="-H oldgnu"
24167 export TAR_OPTIONS
24168 rm -rf *
24169
24170
24171 test -z "`sort < /dev/null 2>&1`" || exit 77
24172
24173
24174 mkdir foo
24175 genfile --file foo/file1
24176 genfile --file foo/file2
24177
24178 mkdir foo/a
24179 genfile --file foo/a/filea
24180
24181 mkdir foo/b
24182 genfile --file foo/b/fileb
24183
24184 mkdir foo/c
24185 genfile --file foo/c/filec
24186
24187 sleep 1
24188
24189 echo "First dump"
24190 echo "First dump">&2
24191 tar -g incr -cf arch.1 -v foo 2>tmperr
24192 sort tmperr >&2
24193
24194 # Shuffle directories:
24195 (cd foo
24196 mv a $$
24197 mv c a
24198 mv b c
24199 mv $$ b)
24200
24201 echo "Second dump"
24202 echo "Second dump" >&2
24203 tar -g incr -cf arch.2 -v foo 2>tmperr
24204 sort tmperr >&2
24205
24206 tar xfg arch.1 /dev/null --warning=no-timestamp
24207
24208 echo "Begin directory listing 1"
24209 find foo | sort
24210 echo "End directory listing 1"
24211
24212 tar xfgv arch.2 /dev/null --warning=no-timestamp
24213 echo Begin directory listing 2
24214 find foo | sort
24215 echo End directory listing 2
24216 )
24217 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24218 at_status=$? at_failed=false
24219 $at_check_filter
24220 echo >>"$at_stderr"; $as_echo "First dump
24221 tar: foo/a: Directory is new
24222 tar: foo/b: Directory is new
24223 tar: foo/c: Directory is new
24224 tar: foo: Directory is new
24225 Second dump
24226 tar: foo/a: Directory has been renamed from 'foo/c'
24227 tar: foo/b: Directory has been renamed from 'foo/a'
24228 tar: foo/c: Directory has been renamed from 'foo/b'
24229 " | \
24230   $at_diff - "$at_stderr" || at_failed=:
24231 echo >>"$at_stdout"; $as_echo "First dump
24232 foo/
24233 foo/a/
24234 foo/b/
24235 foo/c/
24236 foo/file1
24237 foo/file2
24238 foo/a/filea
24239 foo/b/fileb
24240 foo/c/filec
24241 Second dump
24242 foo/
24243 foo/a/
24244 foo/b/
24245 foo/c/
24246 Begin directory listing 1
24247 foo
24248 foo/a
24249 foo/a/filea
24250 foo/b
24251 foo/b/fileb
24252 foo/c
24253 foo/c/filec
24254 foo/file1
24255 foo/file2
24256 End directory listing 1
24257 foo/
24258 foo/a/
24259 foo/b/
24260 foo/c/
24261 Begin directory listing 2
24262 foo
24263 foo/a
24264 foo/a/filec
24265 foo/b
24266 foo/b/filea
24267 foo/c
24268 foo/c/fileb
24269 foo/file1
24270 foo/file2
24271 End directory listing 2
24272 " | \
24273   $at_diff - "$at_stdout" || at_failed=:
24274 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
24275 $at_failed && at_fn_log_failure
24276 $at_traceon; }
24277
24278               { set +x
24279 $as_echo "$at_srcdir/rename03.at:26:
24280 mkdir posix
24281 (cd posix
24282 TEST_TAR_FORMAT=posix
24283 export TEST_TAR_FORMAT
24284 TAR_OPTIONS=\"-H posix\"
24285 export TAR_OPTIONS
24286 rm -rf *
24287
24288
24289 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24290
24291
24292 mkdir foo
24293 genfile --file foo/file1
24294 genfile --file foo/file2
24295
24296 mkdir foo/a
24297 genfile --file foo/a/filea
24298
24299 mkdir foo/b
24300 genfile --file foo/b/fileb
24301
24302 mkdir foo/c
24303 genfile --file foo/c/filec
24304
24305 sleep 1
24306
24307 echo \"First dump\"
24308 echo \"First dump\">&2
24309 tar -g incr -cf arch.1 -v foo 2>tmperr
24310 sort tmperr >&2
24311
24312 # Shuffle directories:
24313 (cd foo
24314 mv a \$\$
24315 mv c a
24316 mv b c
24317 mv \$\$ b)
24318
24319 echo \"Second dump\"
24320 echo \"Second dump\" >&2
24321 tar -g incr -cf arch.2 -v foo 2>tmperr
24322 sort tmperr >&2
24323
24324 tar xfg arch.1 /dev/null --warning=no-timestamp
24325
24326 echo \"Begin directory listing 1\"
24327 find foo | sort
24328 echo \"End directory listing 1\"
24329
24330 tar xfgv arch.2 /dev/null --warning=no-timestamp
24331 echo Begin directory listing 2
24332 find foo | sort
24333 echo End directory listing 2
24334 )"
24335 at_fn_check_prepare_notrace 'a `...` command substitution' "rename03.at:26"
24336 ( $at_check_trace;
24337 mkdir posix
24338 (cd posix
24339 TEST_TAR_FORMAT=posix
24340 export TEST_TAR_FORMAT
24341 TAR_OPTIONS="-H posix"
24342 export TAR_OPTIONS
24343 rm -rf *
24344
24345
24346 test -z "`sort < /dev/null 2>&1`" || exit 77
24347
24348
24349 mkdir foo
24350 genfile --file foo/file1
24351 genfile --file foo/file2
24352
24353 mkdir foo/a
24354 genfile --file foo/a/filea
24355
24356 mkdir foo/b
24357 genfile --file foo/b/fileb
24358
24359 mkdir foo/c
24360 genfile --file foo/c/filec
24361
24362 sleep 1
24363
24364 echo "First dump"
24365 echo "First dump">&2
24366 tar -g incr -cf arch.1 -v foo 2>tmperr
24367 sort tmperr >&2
24368
24369 # Shuffle directories:
24370 (cd foo
24371 mv a $$
24372 mv c a
24373 mv b c
24374 mv $$ b)
24375
24376 echo "Second dump"
24377 echo "Second dump" >&2
24378 tar -g incr -cf arch.2 -v foo 2>tmperr
24379 sort tmperr >&2
24380
24381 tar xfg arch.1 /dev/null --warning=no-timestamp
24382
24383 echo "Begin directory listing 1"
24384 find foo | sort
24385 echo "End directory listing 1"
24386
24387 tar xfgv arch.2 /dev/null --warning=no-timestamp
24388 echo Begin directory listing 2
24389 find foo | sort
24390 echo End directory listing 2
24391 )
24392 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24393 at_status=$? at_failed=false
24394 $at_check_filter
24395 echo >>"$at_stderr"; $as_echo "First dump
24396 tar: foo/a: Directory is new
24397 tar: foo/b: Directory is new
24398 tar: foo/c: Directory is new
24399 tar: foo: Directory is new
24400 Second dump
24401 tar: foo/a: Directory has been renamed from 'foo/c'
24402 tar: foo/b: Directory has been renamed from 'foo/a'
24403 tar: foo/c: Directory has been renamed from 'foo/b'
24404 " | \
24405   $at_diff - "$at_stderr" || at_failed=:
24406 echo >>"$at_stdout"; $as_echo "First dump
24407 foo/
24408 foo/a/
24409 foo/b/
24410 foo/c/
24411 foo/file1
24412 foo/file2
24413 foo/a/filea
24414 foo/b/fileb
24415 foo/c/filec
24416 Second dump
24417 foo/
24418 foo/a/
24419 foo/b/
24420 foo/c/
24421 Begin directory listing 1
24422 foo
24423 foo/a
24424 foo/a/filea
24425 foo/b
24426 foo/b/fileb
24427 foo/c
24428 foo/c/filec
24429 foo/file1
24430 foo/file2
24431 End directory listing 1
24432 foo/
24433 foo/a/
24434 foo/b/
24435 foo/c/
24436 Begin directory listing 2
24437 foo
24438 foo/a
24439 foo/a/filec
24440 foo/b
24441 foo/b/filea
24442 foo/c
24443 foo/c/fileb
24444 foo/file1
24445 foo/file2
24446 End directory listing 2
24447 " | \
24448   $at_diff - "$at_stdout" || at_failed=:
24449 at_fn_check_status 0 $at_status "$at_srcdir/rename03.at:26"
24450 $at_failed && at_fn_log_failure
24451 $at_traceon; }
24452
24453
24454
24455
24456   set +x
24457   $at_times_p && times >"$at_times_file"
24458 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24459 read at_status <"$at_status_file"
24460 #AT_STOP_101
24461 #AT_START_102
24462 at_fn_group_banner 102 'rename04.at:27' \
24463   "renamed directory containing subdirectories" "    " 13
24464 at_xfail=no
24465       test -f $XFAILFILE && at_xfail=yes
24466 (
24467   $as_echo "102. $at_setup_line: testing $at_desc ..."
24468   $at_traceon
24469
24470
24471
24472
24473
24474   { set +x
24475 $as_echo "$at_srcdir/rename04.at:30:
24476 mkdir gnu
24477 (cd gnu
24478 TEST_TAR_FORMAT=gnu
24479 export TEST_TAR_FORMAT
24480 TAR_OPTIONS=\"-H gnu\"
24481 export TAR_OPTIONS
24482 rm -rf *
24483
24484
24485 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24486
24487
24488 decho Creating directory structure
24489 mkdir directory
24490 mkdir directory/subdir
24491 genfile --file=directory/file
24492
24493 decho Creating initial archive
24494 tar -cf archive.1 -g db.1 directory
24495
24496 decho Renaming
24497 mv directory dir
24498
24499 decho Creating incremental archive
24500 cp db.1 db.2
24501 tar -cf archive.2 -g db.2 dir
24502
24503 mv dir orig
24504
24505 decho First restore
24506 tar -xf archive.1 -g db.1
24507 find directory | sort
24508
24509 decho Second restore
24510 tar -xf archive.2 -g db.2
24511 find dir | sort
24512 )"
24513 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
24514 ( $at_check_trace;
24515 mkdir gnu
24516 (cd gnu
24517 TEST_TAR_FORMAT=gnu
24518 export TEST_TAR_FORMAT
24519 TAR_OPTIONS="-H gnu"
24520 export TAR_OPTIONS
24521 rm -rf *
24522
24523
24524 test -z "`sort < /dev/null 2>&1`" || exit 77
24525
24526
24527 decho Creating directory structure
24528 mkdir directory
24529 mkdir directory/subdir
24530 genfile --file=directory/file
24531
24532 decho Creating initial archive
24533 tar -cf archive.1 -g db.1 directory
24534
24535 decho Renaming
24536 mv directory dir
24537
24538 decho Creating incremental archive
24539 cp db.1 db.2
24540 tar -cf archive.2 -g db.2 dir
24541
24542 mv dir orig
24543
24544 decho First restore
24545 tar -xf archive.1 -g db.1
24546 find directory | sort
24547
24548 decho Second restore
24549 tar -xf archive.2 -g db.2
24550 find dir | sort
24551 )
24552 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24553 at_status=$? at_failed=false
24554 $at_check_filter
24555 echo >>"$at_stderr"; $as_echo "Creating directory structure
24556 Creating initial archive
24557 Renaming
24558 Creating incremental archive
24559 First restore
24560 Second restore
24561 " | \
24562   $at_diff - "$at_stderr" || at_failed=:
24563 echo >>"$at_stdout"; $as_echo "Creating directory structure
24564 Creating initial archive
24565 Renaming
24566 Creating incremental archive
24567 First restore
24568 directory
24569 directory/file
24570 directory/subdir
24571 Second restore
24572 dir
24573 dir/subdir
24574 " | \
24575   $at_diff - "$at_stdout" || at_failed=:
24576 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
24577 $at_failed && at_fn_log_failure
24578 $at_traceon; }
24579
24580               { set +x
24581 $as_echo "$at_srcdir/rename04.at:30:
24582 mkdir oldgnu
24583 (cd oldgnu
24584 TEST_TAR_FORMAT=oldgnu
24585 export TEST_TAR_FORMAT
24586 TAR_OPTIONS=\"-H oldgnu\"
24587 export TAR_OPTIONS
24588 rm -rf *
24589
24590
24591 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24592
24593
24594 decho Creating directory structure
24595 mkdir directory
24596 mkdir directory/subdir
24597 genfile --file=directory/file
24598
24599 decho Creating initial archive
24600 tar -cf archive.1 -g db.1 directory
24601
24602 decho Renaming
24603 mv directory dir
24604
24605 decho Creating incremental archive
24606 cp db.1 db.2
24607 tar -cf archive.2 -g db.2 dir
24608
24609 mv dir orig
24610
24611 decho First restore
24612 tar -xf archive.1 -g db.1
24613 find directory | sort
24614
24615 decho Second restore
24616 tar -xf archive.2 -g db.2
24617 find dir | sort
24618 )"
24619 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
24620 ( $at_check_trace;
24621 mkdir oldgnu
24622 (cd oldgnu
24623 TEST_TAR_FORMAT=oldgnu
24624 export TEST_TAR_FORMAT
24625 TAR_OPTIONS="-H oldgnu"
24626 export TAR_OPTIONS
24627 rm -rf *
24628
24629
24630 test -z "`sort < /dev/null 2>&1`" || exit 77
24631
24632
24633 decho Creating directory structure
24634 mkdir directory
24635 mkdir directory/subdir
24636 genfile --file=directory/file
24637
24638 decho Creating initial archive
24639 tar -cf archive.1 -g db.1 directory
24640
24641 decho Renaming
24642 mv directory dir
24643
24644 decho Creating incremental archive
24645 cp db.1 db.2
24646 tar -cf archive.2 -g db.2 dir
24647
24648 mv dir orig
24649
24650 decho First restore
24651 tar -xf archive.1 -g db.1
24652 find directory | sort
24653
24654 decho Second restore
24655 tar -xf archive.2 -g db.2
24656 find dir | sort
24657 )
24658 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24659 at_status=$? at_failed=false
24660 $at_check_filter
24661 echo >>"$at_stderr"; $as_echo "Creating directory structure
24662 Creating initial archive
24663 Renaming
24664 Creating incremental archive
24665 First restore
24666 Second restore
24667 " | \
24668   $at_diff - "$at_stderr" || at_failed=:
24669 echo >>"$at_stdout"; $as_echo "Creating directory structure
24670 Creating initial archive
24671 Renaming
24672 Creating incremental archive
24673 First restore
24674 directory
24675 directory/file
24676 directory/subdir
24677 Second restore
24678 dir
24679 dir/subdir
24680 " | \
24681   $at_diff - "$at_stdout" || at_failed=:
24682 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
24683 $at_failed && at_fn_log_failure
24684 $at_traceon; }
24685
24686               { set +x
24687 $as_echo "$at_srcdir/rename04.at:30:
24688 mkdir posix
24689 (cd posix
24690 TEST_TAR_FORMAT=posix
24691 export TEST_TAR_FORMAT
24692 TAR_OPTIONS=\"-H posix\"
24693 export TAR_OPTIONS
24694 rm -rf *
24695
24696
24697 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24698
24699
24700 decho Creating directory structure
24701 mkdir directory
24702 mkdir directory/subdir
24703 genfile --file=directory/file
24704
24705 decho Creating initial archive
24706 tar -cf archive.1 -g db.1 directory
24707
24708 decho Renaming
24709 mv directory dir
24710
24711 decho Creating incremental archive
24712 cp db.1 db.2
24713 tar -cf archive.2 -g db.2 dir
24714
24715 mv dir orig
24716
24717 decho First restore
24718 tar -xf archive.1 -g db.1
24719 find directory | sort
24720
24721 decho Second restore
24722 tar -xf archive.2 -g db.2
24723 find dir | sort
24724 )"
24725 at_fn_check_prepare_notrace 'a `...` command substitution' "rename04.at:30"
24726 ( $at_check_trace;
24727 mkdir posix
24728 (cd posix
24729 TEST_TAR_FORMAT=posix
24730 export TEST_TAR_FORMAT
24731 TAR_OPTIONS="-H posix"
24732 export TAR_OPTIONS
24733 rm -rf *
24734
24735
24736 test -z "`sort < /dev/null 2>&1`" || exit 77
24737
24738
24739 decho Creating directory structure
24740 mkdir directory
24741 mkdir directory/subdir
24742 genfile --file=directory/file
24743
24744 decho Creating initial archive
24745 tar -cf archive.1 -g db.1 directory
24746
24747 decho Renaming
24748 mv directory dir
24749
24750 decho Creating incremental archive
24751 cp db.1 db.2
24752 tar -cf archive.2 -g db.2 dir
24753
24754 mv dir orig
24755
24756 decho First restore
24757 tar -xf archive.1 -g db.1
24758 find directory | sort
24759
24760 decho Second restore
24761 tar -xf archive.2 -g db.2
24762 find dir | sort
24763 )
24764 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24765 at_status=$? at_failed=false
24766 $at_check_filter
24767 echo >>"$at_stderr"; $as_echo "Creating directory structure
24768 Creating initial archive
24769 Renaming
24770 Creating incremental archive
24771 First restore
24772 Second restore
24773 " | \
24774   $at_diff - "$at_stderr" || at_failed=:
24775 echo >>"$at_stdout"; $as_echo "Creating directory structure
24776 Creating initial archive
24777 Renaming
24778 Creating incremental archive
24779 First restore
24780 directory
24781 directory/file
24782 directory/subdir
24783 Second restore
24784 dir
24785 dir/subdir
24786 " | \
24787   $at_diff - "$at_stdout" || at_failed=:
24788 at_fn_check_status 0 $at_status "$at_srcdir/rename04.at:30"
24789 $at_failed && at_fn_log_failure
24790 $at_traceon; }
24791
24792
24793
24794
24795   set +x
24796   $at_times_p && times >"$at_times_file"
24797 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
24798 read at_status <"$at_status_file"
24799 #AT_STOP_102
24800 #AT_START_103
24801 at_fn_group_banner 103 'rename05.at:24' \
24802   "renamed subdirectories" "                         " 13
24803 at_xfail=no
24804       test -f $XFAILFILE && at_xfail=yes
24805 (
24806   $as_echo "103. $at_setup_line: testing $at_desc ..."
24807   $at_traceon
24808
24809
24810
24811
24812
24813   { set +x
24814 $as_echo "$at_srcdir/rename05.at:27:
24815 mkdir gnu
24816 (cd gnu
24817 TEST_TAR_FORMAT=gnu
24818 export TEST_TAR_FORMAT
24819 TAR_OPTIONS=\"-H gnu\"
24820 export TAR_OPTIONS
24821 rm -rf *
24822
24823
24824 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24825
24826
24827 decho Creating directory structure
24828 mkdir directory
24829 mkdir directory/subdir
24830 genfile --file=directory/file
24831
24832 decho Creating initial archive
24833 tar -cf archive.1 -g db.1 directory
24834
24835 decho Renaming
24836 mv directory/subdir directory/subdir.0
24837 mv directory dir
24838
24839 decho Creating incremental archive
24840 cp db.1 db.2
24841 tar -cf archive.2 -g db.2 dir
24842
24843 mv dir orig
24844
24845 decho First restore
24846 tar -xf archive.1 -g db.1 --warning=no-timestamp
24847 find directory | sort
24848
24849 decho Second restore
24850 tar -xf archive.2 -g db.2 --warning=no-timestamp
24851 find dir | sort
24852 )"
24853 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
24854 ( $at_check_trace;
24855 mkdir gnu
24856 (cd gnu
24857 TEST_TAR_FORMAT=gnu
24858 export TEST_TAR_FORMAT
24859 TAR_OPTIONS="-H gnu"
24860 export TAR_OPTIONS
24861 rm -rf *
24862
24863
24864 test -z "`sort < /dev/null 2>&1`" || exit 77
24865
24866
24867 decho Creating directory structure
24868 mkdir directory
24869 mkdir directory/subdir
24870 genfile --file=directory/file
24871
24872 decho Creating initial archive
24873 tar -cf archive.1 -g db.1 directory
24874
24875 decho Renaming
24876 mv directory/subdir directory/subdir.0
24877 mv directory dir
24878
24879 decho Creating incremental archive
24880 cp db.1 db.2
24881 tar -cf archive.2 -g db.2 dir
24882
24883 mv dir orig
24884
24885 decho First restore
24886 tar -xf archive.1 -g db.1 --warning=no-timestamp
24887 find directory | sort
24888
24889 decho Second restore
24890 tar -xf archive.2 -g db.2 --warning=no-timestamp
24891 find dir | sort
24892 )
24893 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
24894 at_status=$? at_failed=false
24895 $at_check_filter
24896 echo >>"$at_stderr"; $as_echo "Creating directory structure
24897 Creating initial archive
24898 Renaming
24899 Creating incremental archive
24900 First restore
24901 Second restore
24902 " | \
24903   $at_diff - "$at_stderr" || at_failed=:
24904 echo >>"$at_stdout"; $as_echo "Creating directory structure
24905 Creating initial archive
24906 Renaming
24907 Creating incremental archive
24908 First restore
24909 directory
24910 directory/file
24911 directory/subdir
24912 Second restore
24913 dir
24914 dir/subdir.0
24915 " | \
24916   $at_diff - "$at_stdout" || at_failed=:
24917 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
24918 $at_failed && at_fn_log_failure
24919 $at_traceon; }
24920
24921               { set +x
24922 $as_echo "$at_srcdir/rename05.at:27:
24923 mkdir oldgnu
24924 (cd oldgnu
24925 TEST_TAR_FORMAT=oldgnu
24926 export TEST_TAR_FORMAT
24927 TAR_OPTIONS=\"-H oldgnu\"
24928 export TAR_OPTIONS
24929 rm -rf *
24930
24931
24932 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
24933
24934
24935 decho Creating directory structure
24936 mkdir directory
24937 mkdir directory/subdir
24938 genfile --file=directory/file
24939
24940 decho Creating initial archive
24941 tar -cf archive.1 -g db.1 directory
24942
24943 decho Renaming
24944 mv directory/subdir directory/subdir.0
24945 mv directory dir
24946
24947 decho Creating incremental archive
24948 cp db.1 db.2
24949 tar -cf archive.2 -g db.2 dir
24950
24951 mv dir orig
24952
24953 decho First restore
24954 tar -xf archive.1 -g db.1 --warning=no-timestamp
24955 find directory | sort
24956
24957 decho Second restore
24958 tar -xf archive.2 -g db.2 --warning=no-timestamp
24959 find dir | sort
24960 )"
24961 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
24962 ( $at_check_trace;
24963 mkdir oldgnu
24964 (cd oldgnu
24965 TEST_TAR_FORMAT=oldgnu
24966 export TEST_TAR_FORMAT
24967 TAR_OPTIONS="-H oldgnu"
24968 export TAR_OPTIONS
24969 rm -rf *
24970
24971
24972 test -z "`sort < /dev/null 2>&1`" || exit 77
24973
24974
24975 decho Creating directory structure
24976 mkdir directory
24977 mkdir directory/subdir
24978 genfile --file=directory/file
24979
24980 decho Creating initial archive
24981 tar -cf archive.1 -g db.1 directory
24982
24983 decho Renaming
24984 mv directory/subdir directory/subdir.0
24985 mv directory dir
24986
24987 decho Creating incremental archive
24988 cp db.1 db.2
24989 tar -cf archive.2 -g db.2 dir
24990
24991 mv dir orig
24992
24993 decho First restore
24994 tar -xf archive.1 -g db.1 --warning=no-timestamp
24995 find directory | sort
24996
24997 decho Second restore
24998 tar -xf archive.2 -g db.2 --warning=no-timestamp
24999 find dir | sort
25000 )
25001 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25002 at_status=$? at_failed=false
25003 $at_check_filter
25004 echo >>"$at_stderr"; $as_echo "Creating directory structure
25005 Creating initial archive
25006 Renaming
25007 Creating incremental archive
25008 First restore
25009 Second restore
25010 " | \
25011   $at_diff - "$at_stderr" || at_failed=:
25012 echo >>"$at_stdout"; $as_echo "Creating directory structure
25013 Creating initial archive
25014 Renaming
25015 Creating incremental archive
25016 First restore
25017 directory
25018 directory/file
25019 directory/subdir
25020 Second restore
25021 dir
25022 dir/subdir.0
25023 " | \
25024   $at_diff - "$at_stdout" || at_failed=:
25025 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
25026 $at_failed && at_fn_log_failure
25027 $at_traceon; }
25028
25029               { set +x
25030 $as_echo "$at_srcdir/rename05.at:27:
25031 mkdir posix
25032 (cd posix
25033 TEST_TAR_FORMAT=posix
25034 export TEST_TAR_FORMAT
25035 TAR_OPTIONS=\"-H posix\"
25036 export TAR_OPTIONS
25037 rm -rf *
25038
25039
25040 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
25041
25042
25043 decho Creating directory structure
25044 mkdir directory
25045 mkdir directory/subdir
25046 genfile --file=directory/file
25047
25048 decho Creating initial archive
25049 tar -cf archive.1 -g db.1 directory
25050
25051 decho Renaming
25052 mv directory/subdir directory/subdir.0
25053 mv directory dir
25054
25055 decho Creating incremental archive
25056 cp db.1 db.2
25057 tar -cf archive.2 -g db.2 dir
25058
25059 mv dir orig
25060
25061 decho First restore
25062 tar -xf archive.1 -g db.1 --warning=no-timestamp
25063 find directory | sort
25064
25065 decho Second restore
25066 tar -xf archive.2 -g db.2 --warning=no-timestamp
25067 find dir | sort
25068 )"
25069 at_fn_check_prepare_notrace 'a `...` command substitution' "rename05.at:27"
25070 ( $at_check_trace;
25071 mkdir posix
25072 (cd posix
25073 TEST_TAR_FORMAT=posix
25074 export TEST_TAR_FORMAT
25075 TAR_OPTIONS="-H posix"
25076 export TAR_OPTIONS
25077 rm -rf *
25078
25079
25080 test -z "`sort < /dev/null 2>&1`" || exit 77
25081
25082
25083 decho Creating directory structure
25084 mkdir directory
25085 mkdir directory/subdir
25086 genfile --file=directory/file
25087
25088 decho Creating initial archive
25089 tar -cf archive.1 -g db.1 directory
25090
25091 decho Renaming
25092 mv directory/subdir directory/subdir.0
25093 mv directory dir
25094
25095 decho Creating incremental archive
25096 cp db.1 db.2
25097 tar -cf archive.2 -g db.2 dir
25098
25099 mv dir orig
25100
25101 decho First restore
25102 tar -xf archive.1 -g db.1 --warning=no-timestamp
25103 find directory | sort
25104
25105 decho Second restore
25106 tar -xf archive.2 -g db.2 --warning=no-timestamp
25107 find dir | sort
25108 )
25109 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25110 at_status=$? at_failed=false
25111 $at_check_filter
25112 echo >>"$at_stderr"; $as_echo "Creating directory structure
25113 Creating initial archive
25114 Renaming
25115 Creating incremental archive
25116 First restore
25117 Second restore
25118 " | \
25119   $at_diff - "$at_stderr" || at_failed=:
25120 echo >>"$at_stdout"; $as_echo "Creating directory structure
25121 Creating initial archive
25122 Renaming
25123 Creating incremental archive
25124 First restore
25125 directory
25126 directory/file
25127 directory/subdir
25128 Second restore
25129 dir
25130 dir/subdir.0
25131 " | \
25132   $at_diff - "$at_stdout" || at_failed=:
25133 at_fn_check_status 0 $at_status "$at_srcdir/rename05.at:27"
25134 $at_failed && at_fn_log_failure
25135 $at_traceon; }
25136
25137
25138
25139
25140   set +x
25141   $at_times_p && times >"$at_times_file"
25142 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25143 read at_status <"$at_status_file"
25144 #AT_STOP_103
25145 #AT_START_104
25146 at_fn_group_banner 104 'chtype.at:27' \
25147   "changed file types in incrementals" "             " 13
25148 at_xfail=no
25149       test -f $XFAILFILE && at_xfail=yes
25150 (
25151   $as_echo "104. $at_setup_line: testing $at_desc ..."
25152   $at_traceon
25153
25154
25155
25156
25157
25158   { set +x
25159 $as_echo "$at_srcdir/chtype.at:30:
25160 mkdir gnu
25161 (cd gnu
25162 TEST_TAR_FORMAT=gnu
25163 export TEST_TAR_FORMAT
25164 TAR_OPTIONS=\"-H gnu\"
25165 export TAR_OPTIONS
25166 rm -rf *
25167
25168
25169 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
25170
25171
25172 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
25173 mkdir directory/a
25174 genfile --file directory/a/a
25175
25176 echo First backup
25177 tar --create --file=archive.1 --listed-incremental=db.1 directory
25178
25179 sleep 2
25180
25181 # Remove directory b and create a file with this name.
25182 # Previous versions were not able to restore over this file.
25183 rm -r directory/b
25184 genfile --file directory/b
25185 genfile --file directory/a/b
25186
25187 echo Second backup
25188 tar --create --file=archive.2 --listed-incremental=db.2 directory
25189
25190 # Delete a
25191 rm -r directory
25192
25193 echo Restore archive.1
25194 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
25195 echo Restore archive.2
25196 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
25197 find directory | sort
25198 )"
25199 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
25200 ( $at_check_trace;
25201 mkdir gnu
25202 (cd gnu
25203 TEST_TAR_FORMAT=gnu
25204 export TEST_TAR_FORMAT
25205 TAR_OPTIONS="-H gnu"
25206 export TAR_OPTIONS
25207 rm -rf *
25208
25209
25210 test -z "`sort < /dev/null 2>&1`" || exit 77
25211
25212
25213 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
25214 mkdir directory/a
25215 genfile --file directory/a/a
25216
25217 echo First backup
25218 tar --create --file=archive.1 --listed-incremental=db.1 directory
25219
25220 sleep 2
25221
25222 # Remove directory b and create a file with this name.
25223 # Previous versions were not able to restore over this file.
25224 rm -r directory/b
25225 genfile --file directory/b
25226 genfile --file directory/a/b
25227
25228 echo Second backup
25229 tar --create --file=archive.2 --listed-incremental=db.2 directory
25230
25231 # Delete a
25232 rm -r directory
25233
25234 echo Restore archive.1
25235 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
25236 echo Restore archive.2
25237 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
25238 find directory | sort
25239 )
25240 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25241 at_status=$? at_failed=false
25242 $at_check_filter
25243 at_fn_diff_devnull "$at_stderr" || at_failed=:
25244 echo >>"$at_stdout"; $as_echo "First backup
25245 Second backup
25246 Restore archive.1
25247 Restore archive.2
25248 directory
25249 directory/a
25250 directory/a/a
25251 directory/a/b
25252 directory/b
25253 " | \
25254   $at_diff - "$at_stdout" || at_failed=:
25255 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
25256 $at_failed && at_fn_log_failure
25257 $at_traceon; }
25258
25259               { set +x
25260 $as_echo "$at_srcdir/chtype.at:30:
25261 mkdir oldgnu
25262 (cd oldgnu
25263 TEST_TAR_FORMAT=oldgnu
25264 export TEST_TAR_FORMAT
25265 TAR_OPTIONS=\"-H oldgnu\"
25266 export TAR_OPTIONS
25267 rm -rf *
25268
25269
25270 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
25271
25272
25273 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
25274 mkdir directory/a
25275 genfile --file directory/a/a
25276
25277 echo First backup
25278 tar --create --file=archive.1 --listed-incremental=db.1 directory
25279
25280 sleep 2
25281
25282 # Remove directory b and create a file with this name.
25283 # Previous versions were not able to restore over this file.
25284 rm -r directory/b
25285 genfile --file directory/b
25286 genfile --file directory/a/b
25287
25288 echo Second backup
25289 tar --create --file=archive.2 --listed-incremental=db.2 directory
25290
25291 # Delete a
25292 rm -r directory
25293
25294 echo Restore archive.1
25295 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
25296 echo Restore archive.2
25297 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
25298 find directory | sort
25299 )"
25300 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
25301 ( $at_check_trace;
25302 mkdir oldgnu
25303 (cd oldgnu
25304 TEST_TAR_FORMAT=oldgnu
25305 export TEST_TAR_FORMAT
25306 TAR_OPTIONS="-H oldgnu"
25307 export TAR_OPTIONS
25308 rm -rf *
25309
25310
25311 test -z "`sort < /dev/null 2>&1`" || exit 77
25312
25313
25314 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
25315 mkdir directory/a
25316 genfile --file directory/a/a
25317
25318 echo First backup
25319 tar --create --file=archive.1 --listed-incremental=db.1 directory
25320
25321 sleep 2
25322
25323 # Remove directory b and create a file with this name.
25324 # Previous versions were not able to restore over this file.
25325 rm -r directory/b
25326 genfile --file directory/b
25327 genfile --file directory/a/b
25328
25329 echo Second backup
25330 tar --create --file=archive.2 --listed-incremental=db.2 directory
25331
25332 # Delete a
25333 rm -r directory
25334
25335 echo Restore archive.1
25336 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
25337 echo Restore archive.2
25338 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
25339 find directory | sort
25340 )
25341 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25342 at_status=$? at_failed=false
25343 $at_check_filter
25344 at_fn_diff_devnull "$at_stderr" || at_failed=:
25345 echo >>"$at_stdout"; $as_echo "First backup
25346 Second backup
25347 Restore archive.1
25348 Restore archive.2
25349 directory
25350 directory/a
25351 directory/a/a
25352 directory/a/b
25353 directory/b
25354 " | \
25355   $at_diff - "$at_stdout" || at_failed=:
25356 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
25357 $at_failed && at_fn_log_failure
25358 $at_traceon; }
25359
25360               { set +x
25361 $as_echo "$at_srcdir/chtype.at:30:
25362 mkdir posix
25363 (cd posix
25364 TEST_TAR_FORMAT=posix
25365 export TEST_TAR_FORMAT
25366 TAR_OPTIONS=\"-H posix\"
25367 export TAR_OPTIONS
25368 rm -rf *
25369
25370
25371 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
25372
25373
25374 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
25375 mkdir directory/a
25376 genfile --file directory/a/a
25377
25378 echo First backup
25379 tar --create --file=archive.1 --listed-incremental=db.1 directory
25380
25381 sleep 2
25382
25383 # Remove directory b and create a file with this name.
25384 # Previous versions were not able to restore over this file.
25385 rm -r directory/b
25386 genfile --file directory/b
25387 genfile --file directory/a/b
25388
25389 echo Second backup
25390 tar --create --file=archive.2 --listed-incremental=db.2 directory
25391
25392 # Delete a
25393 rm -r directory
25394
25395 echo Restore archive.1
25396 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
25397 echo Restore archive.2
25398 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
25399 find directory | sort
25400 )"
25401 at_fn_check_prepare_notrace 'a `...` command substitution' "chtype.at:30"
25402 ( $at_check_trace;
25403 mkdir posix
25404 (cd posix
25405 TEST_TAR_FORMAT=posix
25406 export TEST_TAR_FORMAT
25407 TAR_OPTIONS="-H posix"
25408 export TAR_OPTIONS
25409 rm -rf *
25410
25411
25412 test -z "`sort < /dev/null 2>&1`" || exit 77
25413
25414
25415 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
25416 mkdir directory/a
25417 genfile --file directory/a/a
25418
25419 echo First backup
25420 tar --create --file=archive.1 --listed-incremental=db.1 directory
25421
25422 sleep 2
25423
25424 # Remove directory b and create a file with this name.
25425 # Previous versions were not able to restore over this file.
25426 rm -r directory/b
25427 genfile --file directory/b
25428 genfile --file directory/a/b
25429
25430 echo Second backup
25431 tar --create --file=archive.2 --listed-incremental=db.2 directory
25432
25433 # Delete a
25434 rm -r directory
25435
25436 echo Restore archive.1
25437 tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp
25438 echo Restore archive.2
25439 tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp
25440 find directory | sort
25441 )
25442 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25443 at_status=$? at_failed=false
25444 $at_check_filter
25445 at_fn_diff_devnull "$at_stderr" || at_failed=:
25446 echo >>"$at_stdout"; $as_echo "First backup
25447 Second backup
25448 Restore archive.1
25449 Restore archive.2
25450 directory
25451 directory/a
25452 directory/a/a
25453 directory/a/b
25454 directory/b
25455 " | \
25456   $at_diff - "$at_stdout" || at_failed=:
25457 at_fn_check_status 0 $at_status "$at_srcdir/chtype.at:30"
25458 $at_failed && at_fn_log_failure
25459 $at_traceon; }
25460
25461
25462
25463
25464   set +x
25465   $at_times_p && times >"$at_times_file"
25466 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
25467 read at_status <"$at_status_file"
25468 #AT_STOP_104
25469 #AT_START_105
25470 at_fn_group_banner 105 'ignfail.at:23' \
25471   "ignfail" "                                        " 14
25472 at_xfail=no
25473       test -f $XFAILFILE && at_xfail=yes
25474 (
25475   $as_echo "105. $at_setup_line: testing $at_desc ..."
25476   $at_traceon
25477
25478
25479
25480
25481
25482   { set +x
25483 $as_echo "$at_srcdir/ignfail.at:26:
25484 mkdir v7
25485 (cd v7
25486 TEST_TAR_FORMAT=v7
25487 export TEST_TAR_FORMAT
25488 TAR_OPTIONS=\"-H v7\"
25489 export TAR_OPTIONS
25490 rm -rf *
25491
25492 # The test is meaningless for super-user.
25493
25494 echo \"test\" > \$\$
25495 chmod 0 \$\$
25496 cat \$\$ > /dev/null 2>&1
25497 result=\$?
25498 rm -f \$\$
25499 test \$result -eq 0 && exit 77
25500
25501
25502 touch file
25503 mkdir directory
25504 touch directory/file
25505
25506 echo 1>&2 -----
25507 chmod 000 file
25508 tar cf archive file
25509 status=\$?
25510 chmod 600 file
25511 test \$status = 2 || exit 1
25512
25513 echo 1>&2 -----
25514 chmod 000 file
25515 tar cf archive --ignore-failed-read file || exit 1
25516 status=\$?
25517 chmod 600 file
25518 test \$status = 0 || exit 1
25519
25520 echo 1>&2 -----
25521 chmod 000 directory
25522 tar cf archive directory
25523 status=\$?
25524 chmod 700 directory
25525 test \$status = 2 || exit 1
25526
25527 echo 1>&2 -----
25528 chmod 000 directory
25529 tar cf archive --ignore-failed-read directory || exit 1
25530 status=\$?
25531 chmod 700 directory
25532 test \$status = 0
25533 )"
25534 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25535 ( $at_check_trace;
25536 mkdir v7
25537 (cd v7
25538 TEST_TAR_FORMAT=v7
25539 export TEST_TAR_FORMAT
25540 TAR_OPTIONS="-H v7"
25541 export TAR_OPTIONS
25542 rm -rf *
25543
25544 # The test is meaningless for super-user.
25545
25546 echo "test" > $$
25547 chmod 0 $$
25548 cat $$ > /dev/null 2>&1
25549 result=$?
25550 rm -f $$
25551 test $result -eq 0 && exit 77
25552
25553
25554 touch file
25555 mkdir directory
25556 touch directory/file
25557
25558 echo 1>&2 -----
25559 chmod 000 file
25560 tar cf archive file
25561 status=$?
25562 chmod 600 file
25563 test $status = 2 || exit 1
25564
25565 echo 1>&2 -----
25566 chmod 000 file
25567 tar cf archive --ignore-failed-read file || exit 1
25568 status=$?
25569 chmod 600 file
25570 test $status = 0 || exit 1
25571
25572 echo 1>&2 -----
25573 chmod 000 directory
25574 tar cf archive directory
25575 status=$?
25576 chmod 700 directory
25577 test $status = 2 || exit 1
25578
25579 echo 1>&2 -----
25580 chmod 000 directory
25581 tar cf archive --ignore-failed-read directory || exit 1
25582 status=$?
25583 chmod 700 directory
25584 test $status = 0
25585 )
25586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25587 at_status=$? at_failed=false
25588 $at_check_filter
25589 echo >>"$at_stderr"; $as_echo "-----
25590 tar: file: Cannot open: Permission denied
25591 tar: Exiting with failure status due to previous errors
25592 -----
25593 tar: file: Warning: Cannot open: Permission denied
25594 -----
25595 tar: directory: Cannot open: Permission denied
25596 tar: Exiting with failure status due to previous errors
25597 -----
25598 tar: directory: Warning: Cannot open: Permission denied
25599 " | \
25600   $at_diff - "$at_stderr" || at_failed=:
25601 at_fn_diff_devnull "$at_stdout" || at_failed=:
25602 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25603 $at_failed && at_fn_log_failure
25604 $at_traceon; }
25605
25606               { set +x
25607 $as_echo "$at_srcdir/ignfail.at:26:
25608 mkdir oldgnu
25609 (cd oldgnu
25610 TEST_TAR_FORMAT=oldgnu
25611 export TEST_TAR_FORMAT
25612 TAR_OPTIONS=\"-H oldgnu\"
25613 export TAR_OPTIONS
25614 rm -rf *
25615
25616 # The test is meaningless for super-user.
25617
25618 echo \"test\" > \$\$
25619 chmod 0 \$\$
25620 cat \$\$ > /dev/null 2>&1
25621 result=\$?
25622 rm -f \$\$
25623 test \$result -eq 0 && exit 77
25624
25625
25626 touch file
25627 mkdir directory
25628 touch directory/file
25629
25630 echo 1>&2 -----
25631 chmod 000 file
25632 tar cf archive file
25633 status=\$?
25634 chmod 600 file
25635 test \$status = 2 || exit 1
25636
25637 echo 1>&2 -----
25638 chmod 000 file
25639 tar cf archive --ignore-failed-read file || exit 1
25640 status=\$?
25641 chmod 600 file
25642 test \$status = 0 || exit 1
25643
25644 echo 1>&2 -----
25645 chmod 000 directory
25646 tar cf archive directory
25647 status=\$?
25648 chmod 700 directory
25649 test \$status = 2 || exit 1
25650
25651 echo 1>&2 -----
25652 chmod 000 directory
25653 tar cf archive --ignore-failed-read directory || exit 1
25654 status=\$?
25655 chmod 700 directory
25656 test \$status = 0
25657 )"
25658 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25659 ( $at_check_trace;
25660 mkdir oldgnu
25661 (cd oldgnu
25662 TEST_TAR_FORMAT=oldgnu
25663 export TEST_TAR_FORMAT
25664 TAR_OPTIONS="-H oldgnu"
25665 export TAR_OPTIONS
25666 rm -rf *
25667
25668 # The test is meaningless for super-user.
25669
25670 echo "test" > $$
25671 chmod 0 $$
25672 cat $$ > /dev/null 2>&1
25673 result=$?
25674 rm -f $$
25675 test $result -eq 0 && exit 77
25676
25677
25678 touch file
25679 mkdir directory
25680 touch directory/file
25681
25682 echo 1>&2 -----
25683 chmod 000 file
25684 tar cf archive file
25685 status=$?
25686 chmod 600 file
25687 test $status = 2 || exit 1
25688
25689 echo 1>&2 -----
25690 chmod 000 file
25691 tar cf archive --ignore-failed-read file || exit 1
25692 status=$?
25693 chmod 600 file
25694 test $status = 0 || exit 1
25695
25696 echo 1>&2 -----
25697 chmod 000 directory
25698 tar cf archive directory
25699 status=$?
25700 chmod 700 directory
25701 test $status = 2 || exit 1
25702
25703 echo 1>&2 -----
25704 chmod 000 directory
25705 tar cf archive --ignore-failed-read directory || exit 1
25706 status=$?
25707 chmod 700 directory
25708 test $status = 0
25709 )
25710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25711 at_status=$? at_failed=false
25712 $at_check_filter
25713 echo >>"$at_stderr"; $as_echo "-----
25714 tar: file: Cannot open: Permission denied
25715 tar: Exiting with failure status due to previous errors
25716 -----
25717 tar: file: Warning: Cannot open: Permission denied
25718 -----
25719 tar: directory: Cannot open: Permission denied
25720 tar: Exiting with failure status due to previous errors
25721 -----
25722 tar: directory: Warning: Cannot open: Permission denied
25723 " | \
25724   $at_diff - "$at_stderr" || at_failed=:
25725 at_fn_diff_devnull "$at_stdout" || at_failed=:
25726 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25727 $at_failed && at_fn_log_failure
25728 $at_traceon; }
25729
25730               { set +x
25731 $as_echo "$at_srcdir/ignfail.at:26:
25732 mkdir ustar
25733 (cd ustar
25734 TEST_TAR_FORMAT=ustar
25735 export TEST_TAR_FORMAT
25736 TAR_OPTIONS=\"-H ustar\"
25737 export TAR_OPTIONS
25738 rm -rf *
25739
25740 # The test is meaningless for super-user.
25741
25742 echo \"test\" > \$\$
25743 chmod 0 \$\$
25744 cat \$\$ > /dev/null 2>&1
25745 result=\$?
25746 rm -f \$\$
25747 test \$result -eq 0 && exit 77
25748
25749
25750 touch file
25751 mkdir directory
25752 touch directory/file
25753
25754 echo 1>&2 -----
25755 chmod 000 file
25756 tar cf archive file
25757 status=\$?
25758 chmod 600 file
25759 test \$status = 2 || exit 1
25760
25761 echo 1>&2 -----
25762 chmod 000 file
25763 tar cf archive --ignore-failed-read file || exit 1
25764 status=\$?
25765 chmod 600 file
25766 test \$status = 0 || exit 1
25767
25768 echo 1>&2 -----
25769 chmod 000 directory
25770 tar cf archive directory
25771 status=\$?
25772 chmod 700 directory
25773 test \$status = 2 || exit 1
25774
25775 echo 1>&2 -----
25776 chmod 000 directory
25777 tar cf archive --ignore-failed-read directory || exit 1
25778 status=\$?
25779 chmod 700 directory
25780 test \$status = 0
25781 )"
25782 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25783 ( $at_check_trace;
25784 mkdir ustar
25785 (cd ustar
25786 TEST_TAR_FORMAT=ustar
25787 export TEST_TAR_FORMAT
25788 TAR_OPTIONS="-H ustar"
25789 export TAR_OPTIONS
25790 rm -rf *
25791
25792 # The test is meaningless for super-user.
25793
25794 echo "test" > $$
25795 chmod 0 $$
25796 cat $$ > /dev/null 2>&1
25797 result=$?
25798 rm -f $$
25799 test $result -eq 0 && exit 77
25800
25801
25802 touch file
25803 mkdir directory
25804 touch directory/file
25805
25806 echo 1>&2 -----
25807 chmod 000 file
25808 tar cf archive file
25809 status=$?
25810 chmod 600 file
25811 test $status = 2 || exit 1
25812
25813 echo 1>&2 -----
25814 chmod 000 file
25815 tar cf archive --ignore-failed-read file || exit 1
25816 status=$?
25817 chmod 600 file
25818 test $status = 0 || exit 1
25819
25820 echo 1>&2 -----
25821 chmod 000 directory
25822 tar cf archive directory
25823 status=$?
25824 chmod 700 directory
25825 test $status = 2 || exit 1
25826
25827 echo 1>&2 -----
25828 chmod 000 directory
25829 tar cf archive --ignore-failed-read directory || exit 1
25830 status=$?
25831 chmod 700 directory
25832 test $status = 0
25833 )
25834 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25835 at_status=$? at_failed=false
25836 $at_check_filter
25837 echo >>"$at_stderr"; $as_echo "-----
25838 tar: file: Cannot open: Permission denied
25839 tar: Exiting with failure status due to previous errors
25840 -----
25841 tar: file: Warning: Cannot open: Permission denied
25842 -----
25843 tar: directory: Cannot open: Permission denied
25844 tar: Exiting with failure status due to previous errors
25845 -----
25846 tar: directory: Warning: Cannot open: Permission denied
25847 " | \
25848   $at_diff - "$at_stderr" || at_failed=:
25849 at_fn_diff_devnull "$at_stdout" || at_failed=:
25850 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25851 $at_failed && at_fn_log_failure
25852 $at_traceon; }
25853
25854               { set +x
25855 $as_echo "$at_srcdir/ignfail.at:26:
25856 mkdir posix
25857 (cd posix
25858 TEST_TAR_FORMAT=posix
25859 export TEST_TAR_FORMAT
25860 TAR_OPTIONS=\"-H posix\"
25861 export TAR_OPTIONS
25862 rm -rf *
25863
25864 # The test is meaningless for super-user.
25865
25866 echo \"test\" > \$\$
25867 chmod 0 \$\$
25868 cat \$\$ > /dev/null 2>&1
25869 result=\$?
25870 rm -f \$\$
25871 test \$result -eq 0 && exit 77
25872
25873
25874 touch file
25875 mkdir directory
25876 touch directory/file
25877
25878 echo 1>&2 -----
25879 chmod 000 file
25880 tar cf archive file
25881 status=\$?
25882 chmod 600 file
25883 test \$status = 2 || exit 1
25884
25885 echo 1>&2 -----
25886 chmod 000 file
25887 tar cf archive --ignore-failed-read file || exit 1
25888 status=\$?
25889 chmod 600 file
25890 test \$status = 0 || exit 1
25891
25892 echo 1>&2 -----
25893 chmod 000 directory
25894 tar cf archive directory
25895 status=\$?
25896 chmod 700 directory
25897 test \$status = 2 || exit 1
25898
25899 echo 1>&2 -----
25900 chmod 000 directory
25901 tar cf archive --ignore-failed-read directory || exit 1
25902 status=\$?
25903 chmod 700 directory
25904 test \$status = 0
25905 )"
25906 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
25907 ( $at_check_trace;
25908 mkdir posix
25909 (cd posix
25910 TEST_TAR_FORMAT=posix
25911 export TEST_TAR_FORMAT
25912 TAR_OPTIONS="-H posix"
25913 export TAR_OPTIONS
25914 rm -rf *
25915
25916 # The test is meaningless for super-user.
25917
25918 echo "test" > $$
25919 chmod 0 $$
25920 cat $$ > /dev/null 2>&1
25921 result=$?
25922 rm -f $$
25923 test $result -eq 0 && exit 77
25924
25925
25926 touch file
25927 mkdir directory
25928 touch directory/file
25929
25930 echo 1>&2 -----
25931 chmod 000 file
25932 tar cf archive file
25933 status=$?
25934 chmod 600 file
25935 test $status = 2 || exit 1
25936
25937 echo 1>&2 -----
25938 chmod 000 file
25939 tar cf archive --ignore-failed-read file || exit 1
25940 status=$?
25941 chmod 600 file
25942 test $status = 0 || exit 1
25943
25944 echo 1>&2 -----
25945 chmod 000 directory
25946 tar cf archive directory
25947 status=$?
25948 chmod 700 directory
25949 test $status = 2 || exit 1
25950
25951 echo 1>&2 -----
25952 chmod 000 directory
25953 tar cf archive --ignore-failed-read directory || exit 1
25954 status=$?
25955 chmod 700 directory
25956 test $status = 0
25957 )
25958 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
25959 at_status=$? at_failed=false
25960 $at_check_filter
25961 echo >>"$at_stderr"; $as_echo "-----
25962 tar: file: Cannot open: Permission denied
25963 tar: Exiting with failure status due to previous errors
25964 -----
25965 tar: file: Warning: Cannot open: Permission denied
25966 -----
25967 tar: directory: Cannot open: Permission denied
25968 tar: Exiting with failure status due to previous errors
25969 -----
25970 tar: directory: Warning: Cannot open: Permission denied
25971 " | \
25972   $at_diff - "$at_stderr" || at_failed=:
25973 at_fn_diff_devnull "$at_stdout" || at_failed=:
25974 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
25975 $at_failed && at_fn_log_failure
25976 $at_traceon; }
25977
25978               { set +x
25979 $as_echo "$at_srcdir/ignfail.at:26:
25980 mkdir gnu
25981 (cd gnu
25982 TEST_TAR_FORMAT=gnu
25983 export TEST_TAR_FORMAT
25984 TAR_OPTIONS=\"-H gnu\"
25985 export TAR_OPTIONS
25986 rm -rf *
25987
25988 # The test is meaningless for super-user.
25989
25990 echo \"test\" > \$\$
25991 chmod 0 \$\$
25992 cat \$\$ > /dev/null 2>&1
25993 result=\$?
25994 rm -f \$\$
25995 test \$result -eq 0 && exit 77
25996
25997
25998 touch file
25999 mkdir directory
26000 touch directory/file
26001
26002 echo 1>&2 -----
26003 chmod 000 file
26004 tar cf archive file
26005 status=\$?
26006 chmod 600 file
26007 test \$status = 2 || exit 1
26008
26009 echo 1>&2 -----
26010 chmod 000 file
26011 tar cf archive --ignore-failed-read file || exit 1
26012 status=\$?
26013 chmod 600 file
26014 test \$status = 0 || exit 1
26015
26016 echo 1>&2 -----
26017 chmod 000 directory
26018 tar cf archive directory
26019 status=\$?
26020 chmod 700 directory
26021 test \$status = 2 || exit 1
26022
26023 echo 1>&2 -----
26024 chmod 000 directory
26025 tar cf archive --ignore-failed-read directory || exit 1
26026 status=\$?
26027 chmod 700 directory
26028 test \$status = 0
26029 )"
26030 at_fn_check_prepare_notrace 'an embedded newline' "ignfail.at:26"
26031 ( $at_check_trace;
26032 mkdir gnu
26033 (cd gnu
26034 TEST_TAR_FORMAT=gnu
26035 export TEST_TAR_FORMAT
26036 TAR_OPTIONS="-H gnu"
26037 export TAR_OPTIONS
26038 rm -rf *
26039
26040 # The test is meaningless for super-user.
26041
26042 echo "test" > $$
26043 chmod 0 $$
26044 cat $$ > /dev/null 2>&1
26045 result=$?
26046 rm -f $$
26047 test $result -eq 0 && exit 77
26048
26049
26050 touch file
26051 mkdir directory
26052 touch directory/file
26053
26054 echo 1>&2 -----
26055 chmod 000 file
26056 tar cf archive file
26057 status=$?
26058 chmod 600 file
26059 test $status = 2 || exit 1
26060
26061 echo 1>&2 -----
26062 chmod 000 file
26063 tar cf archive --ignore-failed-read file || exit 1
26064 status=$?
26065 chmod 600 file
26066 test $status = 0 || exit 1
26067
26068 echo 1>&2 -----
26069 chmod 000 directory
26070 tar cf archive directory
26071 status=$?
26072 chmod 700 directory
26073 test $status = 2 || exit 1
26074
26075 echo 1>&2 -----
26076 chmod 000 directory
26077 tar cf archive --ignore-failed-read directory || exit 1
26078 status=$?
26079 chmod 700 directory
26080 test $status = 0
26081 )
26082 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26083 at_status=$? at_failed=false
26084 $at_check_filter
26085 echo >>"$at_stderr"; $as_echo "-----
26086 tar: file: Cannot open: Permission denied
26087 tar: Exiting with failure status due to previous errors
26088 -----
26089 tar: file: Warning: Cannot open: Permission denied
26090 -----
26091 tar: directory: Cannot open: Permission denied
26092 tar: Exiting with failure status due to previous errors
26093 -----
26094 tar: directory: Warning: Cannot open: Permission denied
26095 " | \
26096   $at_diff - "$at_stderr" || at_failed=:
26097 at_fn_diff_devnull "$at_stdout" || at_failed=:
26098 at_fn_check_status 0 $at_status "$at_srcdir/ignfail.at:26"
26099 $at_failed && at_fn_log_failure
26100 $at_traceon; }
26101
26102
26103
26104
26105   set +x
26106   $at_times_p && times >"$at_times_file"
26107 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26108 read at_status <"$at_status_file"
26109 #AT_STOP_105
26110 #AT_START_106
26111 at_fn_group_banner 106 'link01.at:33' \
26112   "link count gt 2" "                                " 15
26113 at_xfail=no
26114       test -f $XFAILFILE && at_xfail=yes
26115 (
26116   $as_echo "106. $at_setup_line: testing $at_desc ..."
26117   $at_traceon
26118
26119
26120
26121
26122
26123   { set +x
26124 $as_echo "$at_srcdir/link01.at:36:
26125 mkdir v7
26126 (cd v7
26127 TEST_TAR_FORMAT=v7
26128 export TEST_TAR_FORMAT
26129 TAR_OPTIONS=\"-H v7\"
26130 export TAR_OPTIONS
26131 rm -rf *
26132
26133 mkdir directory
26134 mkdir directory/test1
26135 mkdir directory/test2
26136
26137 echo TEST > directory/test1/test.txt
26138 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26139
26140 tar cf archive directory/test1/test.txt directory/test1/test.txt
26141
26142 rm -r directory
26143 tar xf archive --warning=no-timestamp
26144
26145 ls directory/test1
26146 )"
26147 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
26148 ( $at_check_trace;
26149 mkdir v7
26150 (cd v7
26151 TEST_TAR_FORMAT=v7
26152 export TEST_TAR_FORMAT
26153 TAR_OPTIONS="-H v7"
26154 export TAR_OPTIONS
26155 rm -rf *
26156
26157 mkdir directory
26158 mkdir directory/test1
26159 mkdir directory/test2
26160
26161 echo TEST > directory/test1/test.txt
26162 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26163
26164 tar cf archive directory/test1/test.txt directory/test1/test.txt
26165
26166 rm -r directory
26167 tar xf archive --warning=no-timestamp
26168
26169 ls directory/test1
26170 )
26171 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26172 at_status=$? at_failed=false
26173 $at_check_filter
26174 at_fn_diff_devnull "$at_stderr" || at_failed=:
26175 echo >>"$at_stdout"; $as_echo "test.txt
26176 " | \
26177   $at_diff - "$at_stdout" || at_failed=:
26178 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
26179 $at_failed && at_fn_log_failure
26180 $at_traceon; }
26181
26182               { set +x
26183 $as_echo "$at_srcdir/link01.at:36:
26184 mkdir oldgnu
26185 (cd oldgnu
26186 TEST_TAR_FORMAT=oldgnu
26187 export TEST_TAR_FORMAT
26188 TAR_OPTIONS=\"-H oldgnu\"
26189 export TAR_OPTIONS
26190 rm -rf *
26191
26192 mkdir directory
26193 mkdir directory/test1
26194 mkdir directory/test2
26195
26196 echo TEST > directory/test1/test.txt
26197 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26198
26199 tar cf archive directory/test1/test.txt directory/test1/test.txt
26200
26201 rm -r directory
26202 tar xf archive --warning=no-timestamp
26203
26204 ls directory/test1
26205 )"
26206 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
26207 ( $at_check_trace;
26208 mkdir oldgnu
26209 (cd oldgnu
26210 TEST_TAR_FORMAT=oldgnu
26211 export TEST_TAR_FORMAT
26212 TAR_OPTIONS="-H oldgnu"
26213 export TAR_OPTIONS
26214 rm -rf *
26215
26216 mkdir directory
26217 mkdir directory/test1
26218 mkdir directory/test2
26219
26220 echo TEST > directory/test1/test.txt
26221 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26222
26223 tar cf archive directory/test1/test.txt directory/test1/test.txt
26224
26225 rm -r directory
26226 tar xf archive --warning=no-timestamp
26227
26228 ls directory/test1
26229 )
26230 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26231 at_status=$? at_failed=false
26232 $at_check_filter
26233 at_fn_diff_devnull "$at_stderr" || at_failed=:
26234 echo >>"$at_stdout"; $as_echo "test.txt
26235 " | \
26236   $at_diff - "$at_stdout" || at_failed=:
26237 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
26238 $at_failed && at_fn_log_failure
26239 $at_traceon; }
26240
26241               { set +x
26242 $as_echo "$at_srcdir/link01.at:36:
26243 mkdir ustar
26244 (cd ustar
26245 TEST_TAR_FORMAT=ustar
26246 export TEST_TAR_FORMAT
26247 TAR_OPTIONS=\"-H ustar\"
26248 export TAR_OPTIONS
26249 rm -rf *
26250
26251 mkdir directory
26252 mkdir directory/test1
26253 mkdir directory/test2
26254
26255 echo TEST > directory/test1/test.txt
26256 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26257
26258 tar cf archive directory/test1/test.txt directory/test1/test.txt
26259
26260 rm -r directory
26261 tar xf archive --warning=no-timestamp
26262
26263 ls directory/test1
26264 )"
26265 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
26266 ( $at_check_trace;
26267 mkdir ustar
26268 (cd ustar
26269 TEST_TAR_FORMAT=ustar
26270 export TEST_TAR_FORMAT
26271 TAR_OPTIONS="-H ustar"
26272 export TAR_OPTIONS
26273 rm -rf *
26274
26275 mkdir directory
26276 mkdir directory/test1
26277 mkdir directory/test2
26278
26279 echo TEST > directory/test1/test.txt
26280 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26281
26282 tar cf archive directory/test1/test.txt directory/test1/test.txt
26283
26284 rm -r directory
26285 tar xf archive --warning=no-timestamp
26286
26287 ls directory/test1
26288 )
26289 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26290 at_status=$? at_failed=false
26291 $at_check_filter
26292 at_fn_diff_devnull "$at_stderr" || at_failed=:
26293 echo >>"$at_stdout"; $as_echo "test.txt
26294 " | \
26295   $at_diff - "$at_stdout" || at_failed=:
26296 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
26297 $at_failed && at_fn_log_failure
26298 $at_traceon; }
26299
26300               { set +x
26301 $as_echo "$at_srcdir/link01.at:36:
26302 mkdir posix
26303 (cd posix
26304 TEST_TAR_FORMAT=posix
26305 export TEST_TAR_FORMAT
26306 TAR_OPTIONS=\"-H posix\"
26307 export TAR_OPTIONS
26308 rm -rf *
26309
26310 mkdir directory
26311 mkdir directory/test1
26312 mkdir directory/test2
26313
26314 echo TEST > directory/test1/test.txt
26315 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26316
26317 tar cf archive directory/test1/test.txt directory/test1/test.txt
26318
26319 rm -r directory
26320 tar xf archive --warning=no-timestamp
26321
26322 ls directory/test1
26323 )"
26324 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
26325 ( $at_check_trace;
26326 mkdir posix
26327 (cd posix
26328 TEST_TAR_FORMAT=posix
26329 export TEST_TAR_FORMAT
26330 TAR_OPTIONS="-H posix"
26331 export TAR_OPTIONS
26332 rm -rf *
26333
26334 mkdir directory
26335 mkdir directory/test1
26336 mkdir directory/test2
26337
26338 echo TEST > directory/test1/test.txt
26339 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26340
26341 tar cf archive directory/test1/test.txt directory/test1/test.txt
26342
26343 rm -r directory
26344 tar xf archive --warning=no-timestamp
26345
26346 ls directory/test1
26347 )
26348 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26349 at_status=$? at_failed=false
26350 $at_check_filter
26351 at_fn_diff_devnull "$at_stderr" || at_failed=:
26352 echo >>"$at_stdout"; $as_echo "test.txt
26353 " | \
26354   $at_diff - "$at_stdout" || at_failed=:
26355 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
26356 $at_failed && at_fn_log_failure
26357 $at_traceon; }
26358
26359               { set +x
26360 $as_echo "$at_srcdir/link01.at:36:
26361 mkdir gnu
26362 (cd gnu
26363 TEST_TAR_FORMAT=gnu
26364 export TEST_TAR_FORMAT
26365 TAR_OPTIONS=\"-H gnu\"
26366 export TAR_OPTIONS
26367 rm -rf *
26368
26369 mkdir directory
26370 mkdir directory/test1
26371 mkdir directory/test2
26372
26373 echo TEST > directory/test1/test.txt
26374 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26375
26376 tar cf archive directory/test1/test.txt directory/test1/test.txt
26377
26378 rm -r directory
26379 tar xf archive --warning=no-timestamp
26380
26381 ls directory/test1
26382 )"
26383 at_fn_check_prepare_notrace 'an embedded newline' "link01.at:36"
26384 ( $at_check_trace;
26385 mkdir gnu
26386 (cd gnu
26387 TEST_TAR_FORMAT=gnu
26388 export TEST_TAR_FORMAT
26389 TAR_OPTIONS="-H gnu"
26390 export TAR_OPTIONS
26391 rm -rf *
26392
26393 mkdir directory
26394 mkdir directory/test1
26395 mkdir directory/test2
26396
26397 echo TEST > directory/test1/test.txt
26398 ln directory/test1/test.txt directory/test2/test.txt || exit 77
26399
26400 tar cf archive directory/test1/test.txt directory/test1/test.txt
26401
26402 rm -r directory
26403 tar xf archive --warning=no-timestamp
26404
26405 ls directory/test1
26406 )
26407 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26408 at_status=$? at_failed=false
26409 $at_check_filter
26410 at_fn_diff_devnull "$at_stderr" || at_failed=:
26411 echo >>"$at_stdout"; $as_echo "test.txt
26412 " | \
26413   $at_diff - "$at_stdout" || at_failed=:
26414 at_fn_check_status 0 $at_status "$at_srcdir/link01.at:36"
26415 $at_failed && at_fn_log_failure
26416 $at_traceon; }
26417
26418
26419
26420
26421   set +x
26422   $at_times_p && times >"$at_times_file"
26423 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26424 read at_status <"$at_status_file"
26425 #AT_STOP_106
26426 #AT_START_107
26427 at_fn_group_banner 107 'link02.at:32' \
26428   "preserve hard links with --remove-files" "        " 15
26429 at_xfail=no
26430       test -f $XFAILFILE && at_xfail=yes
26431 (
26432   $as_echo "107. $at_setup_line: testing $at_desc ..."
26433   $at_traceon
26434
26435
26436
26437
26438
26439   { set +x
26440 $as_echo "$at_srcdir/link02.at:35:
26441 mkdir v7
26442 (cd v7
26443 TEST_TAR_FORMAT=v7
26444 export TEST_TAR_FORMAT
26445 TAR_OPTIONS=\"-H v7\"
26446 export TAR_OPTIONS
26447 rm -rf *
26448
26449 genfile -l 64 -f file1
26450 ln file1 file2
26451 ln file2 file3
26452 ln file3 file4
26453 tar -c -f archive --remove-files file1 file2 file3 file4
26454 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26455 )"
26456 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26457 ( $at_check_trace;
26458 mkdir v7
26459 (cd v7
26460 TEST_TAR_FORMAT=v7
26461 export TEST_TAR_FORMAT
26462 TAR_OPTIONS="-H v7"
26463 export TAR_OPTIONS
26464 rm -rf *
26465
26466 genfile -l 64 -f file1
26467 ln file1 file2
26468 ln file2 file3
26469 ln file3 file4
26470 tar -c -f archive --remove-files file1 file2 file3 file4
26471 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26472 )
26473 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26474 at_status=$? at_failed=false
26475 $at_check_filter
26476 at_fn_diff_devnull "$at_stderr" || at_failed=:
26477 echo >>"$at_stdout"; $as_echo "file1
26478 file1
26479 file1
26480 " | \
26481   $at_diff - "$at_stdout" || at_failed=:
26482 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26483 $at_failed && at_fn_log_failure
26484 $at_traceon; }
26485
26486               { set +x
26487 $as_echo "$at_srcdir/link02.at:35:
26488 mkdir oldgnu
26489 (cd oldgnu
26490 TEST_TAR_FORMAT=oldgnu
26491 export TEST_TAR_FORMAT
26492 TAR_OPTIONS=\"-H oldgnu\"
26493 export TAR_OPTIONS
26494 rm -rf *
26495
26496 genfile -l 64 -f file1
26497 ln file1 file2
26498 ln file2 file3
26499 ln file3 file4
26500 tar -c -f archive --remove-files file1 file2 file3 file4
26501 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26502 )"
26503 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26504 ( $at_check_trace;
26505 mkdir oldgnu
26506 (cd oldgnu
26507 TEST_TAR_FORMAT=oldgnu
26508 export TEST_TAR_FORMAT
26509 TAR_OPTIONS="-H oldgnu"
26510 export TAR_OPTIONS
26511 rm -rf *
26512
26513 genfile -l 64 -f file1
26514 ln file1 file2
26515 ln file2 file3
26516 ln file3 file4
26517 tar -c -f archive --remove-files file1 file2 file3 file4
26518 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26519 )
26520 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26521 at_status=$? at_failed=false
26522 $at_check_filter
26523 at_fn_diff_devnull "$at_stderr" || at_failed=:
26524 echo >>"$at_stdout"; $as_echo "file1
26525 file1
26526 file1
26527 " | \
26528   $at_diff - "$at_stdout" || at_failed=:
26529 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26530 $at_failed && at_fn_log_failure
26531 $at_traceon; }
26532
26533               { set +x
26534 $as_echo "$at_srcdir/link02.at:35:
26535 mkdir ustar
26536 (cd ustar
26537 TEST_TAR_FORMAT=ustar
26538 export TEST_TAR_FORMAT
26539 TAR_OPTIONS=\"-H ustar\"
26540 export TAR_OPTIONS
26541 rm -rf *
26542
26543 genfile -l 64 -f file1
26544 ln file1 file2
26545 ln file2 file3
26546 ln file3 file4
26547 tar -c -f archive --remove-files file1 file2 file3 file4
26548 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26549 )"
26550 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26551 ( $at_check_trace;
26552 mkdir ustar
26553 (cd ustar
26554 TEST_TAR_FORMAT=ustar
26555 export TEST_TAR_FORMAT
26556 TAR_OPTIONS="-H ustar"
26557 export TAR_OPTIONS
26558 rm -rf *
26559
26560 genfile -l 64 -f file1
26561 ln file1 file2
26562 ln file2 file3
26563 ln file3 file4
26564 tar -c -f archive --remove-files file1 file2 file3 file4
26565 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26566 )
26567 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26568 at_status=$? at_failed=false
26569 $at_check_filter
26570 at_fn_diff_devnull "$at_stderr" || at_failed=:
26571 echo >>"$at_stdout"; $as_echo "file1
26572 file1
26573 file1
26574 " | \
26575   $at_diff - "$at_stdout" || at_failed=:
26576 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26577 $at_failed && at_fn_log_failure
26578 $at_traceon; }
26579
26580               { set +x
26581 $as_echo "$at_srcdir/link02.at:35:
26582 mkdir posix
26583 (cd posix
26584 TEST_TAR_FORMAT=posix
26585 export TEST_TAR_FORMAT
26586 TAR_OPTIONS=\"-H posix\"
26587 export TAR_OPTIONS
26588 rm -rf *
26589
26590 genfile -l 64 -f file1
26591 ln file1 file2
26592 ln file2 file3
26593 ln file3 file4
26594 tar -c -f archive --remove-files file1 file2 file3 file4
26595 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26596 )"
26597 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26598 ( $at_check_trace;
26599 mkdir posix
26600 (cd posix
26601 TEST_TAR_FORMAT=posix
26602 export TEST_TAR_FORMAT
26603 TAR_OPTIONS="-H posix"
26604 export TAR_OPTIONS
26605 rm -rf *
26606
26607 genfile -l 64 -f file1
26608 ln file1 file2
26609 ln file2 file3
26610 ln file3 file4
26611 tar -c -f archive --remove-files file1 file2 file3 file4
26612 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26613 )
26614 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26615 at_status=$? at_failed=false
26616 $at_check_filter
26617 at_fn_diff_devnull "$at_stderr" || at_failed=:
26618 echo >>"$at_stdout"; $as_echo "file1
26619 file1
26620 file1
26621 " | \
26622   $at_diff - "$at_stdout" || at_failed=:
26623 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26624 $at_failed && at_fn_log_failure
26625 $at_traceon; }
26626
26627               { set +x
26628 $as_echo "$at_srcdir/link02.at:35:
26629 mkdir gnu
26630 (cd gnu
26631 TEST_TAR_FORMAT=gnu
26632 export TEST_TAR_FORMAT
26633 TAR_OPTIONS=\"-H gnu\"
26634 export TAR_OPTIONS
26635 rm -rf *
26636
26637 genfile -l 64 -f file1
26638 ln file1 file2
26639 ln file2 file3
26640 ln file3 file4
26641 tar -c -f archive --remove-files file1 file2 file3 file4
26642 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26643 )"
26644 at_fn_check_prepare_notrace 'an embedded newline' "link02.at:35"
26645 ( $at_check_trace;
26646 mkdir gnu
26647 (cd gnu
26648 TEST_TAR_FORMAT=gnu
26649 export TEST_TAR_FORMAT
26650 TAR_OPTIONS="-H gnu"
26651 export TAR_OPTIONS
26652 rm -rf *
26653
26654 genfile -l 64 -f file1
26655 ln file1 file2
26656 ln file2 file3
26657 ln file3 file4
26658 tar -c -f archive --remove-files file1 file2 file3 file4
26659 tar tfv archive | sed -n 's/.*file[2-4] link to //p'
26660 )
26661 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26662 at_status=$? at_failed=false
26663 $at_check_filter
26664 at_fn_diff_devnull "$at_stderr" || at_failed=:
26665 echo >>"$at_stdout"; $as_echo "file1
26666 file1
26667 file1
26668 " | \
26669   $at_diff - "$at_stdout" || at_failed=:
26670 at_fn_check_status 0 $at_status "$at_srcdir/link02.at:35"
26671 $at_failed && at_fn_log_failure
26672 $at_traceon; }
26673
26674
26675
26676
26677   set +x
26678   $at_times_p && times >"$at_times_file"
26679 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
26680 read at_status <"$at_status_file"
26681 #AT_STOP_107
26682 #AT_START_108
26683 at_fn_group_banner 108 'link03.at:24' \
26684   "working -l with --remove-files" "                 " 15
26685 at_xfail=no
26686       test -f $XFAILFILE && at_xfail=yes
26687 (
26688   $as_echo "108. $at_setup_line: testing $at_desc ..."
26689   $at_traceon
26690
26691
26692
26693
26694
26695
26696
26697   { set +x
26698 $as_echo "$at_srcdir/link03.at:34:
26699 mkdir v7
26700 (cd v7
26701 TEST_TAR_FORMAT=v7
26702 export TEST_TAR_FORMAT
26703 TAR_OPTIONS=\"-H v7\"
26704 export TAR_OPTIONS
26705 rm -rf *
26706
26707
26708 genfile -l 64 -f file1
26709 ln file1 file2
26710 ln file2 file3
26711 ln file3 file4
26712
26713 echo archive.1
26714 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26715
26716 genfile -l 64 -f file1
26717 ln file1 file2
26718 ln file2 file3
26719 ln file3 file4
26720
26721 echo archive.2
26722 tar -c -f archive.2 -l --remove-files file1 file2 file3
26723 echo testing archive.2
26724 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26725 )"
26726 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26727 ( $at_check_trace;
26728 mkdir v7
26729 (cd v7
26730 TEST_TAR_FORMAT=v7
26731 export TEST_TAR_FORMAT
26732 TAR_OPTIONS="-H v7"
26733 export TAR_OPTIONS
26734 rm -rf *
26735
26736
26737 genfile -l 64 -f file1
26738 ln file1 file2
26739 ln file2 file3
26740 ln file3 file4
26741
26742 echo archive.1
26743 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26744
26745 genfile -l 64 -f file1
26746 ln file1 file2
26747 ln file2 file3
26748 ln file3 file4
26749
26750 echo archive.2
26751 tar -c -f archive.2 -l --remove-files file1 file2 file3
26752 echo testing archive.2
26753 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26754 )
26755 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26756 at_status=$? at_failed=false
26757 $at_check_filter
26758 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26759 " | \
26760   $at_diff - "$at_stderr" || at_failed=:
26761 echo >>"$at_stdout"; $as_echo "archive.1
26762 archive.2
26763 testing archive.2
26764 file1
26765 file1
26766 " | \
26767   $at_diff - "$at_stdout" || at_failed=:
26768 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26769 $at_failed && at_fn_log_failure
26770 $at_traceon; }
26771
26772               { set +x
26773 $as_echo "$at_srcdir/link03.at:34:
26774 mkdir oldgnu
26775 (cd oldgnu
26776 TEST_TAR_FORMAT=oldgnu
26777 export TEST_TAR_FORMAT
26778 TAR_OPTIONS=\"-H oldgnu\"
26779 export TAR_OPTIONS
26780 rm -rf *
26781
26782
26783 genfile -l 64 -f file1
26784 ln file1 file2
26785 ln file2 file3
26786 ln file3 file4
26787
26788 echo archive.1
26789 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26790
26791 genfile -l 64 -f file1
26792 ln file1 file2
26793 ln file2 file3
26794 ln file3 file4
26795
26796 echo archive.2
26797 tar -c -f archive.2 -l --remove-files file1 file2 file3
26798 echo testing archive.2
26799 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26800 )"
26801 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26802 ( $at_check_trace;
26803 mkdir oldgnu
26804 (cd oldgnu
26805 TEST_TAR_FORMAT=oldgnu
26806 export TEST_TAR_FORMAT
26807 TAR_OPTIONS="-H oldgnu"
26808 export TAR_OPTIONS
26809 rm -rf *
26810
26811
26812 genfile -l 64 -f file1
26813 ln file1 file2
26814 ln file2 file3
26815 ln file3 file4
26816
26817 echo archive.1
26818 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26819
26820 genfile -l 64 -f file1
26821 ln file1 file2
26822 ln file2 file3
26823 ln file3 file4
26824
26825 echo archive.2
26826 tar -c -f archive.2 -l --remove-files file1 file2 file3
26827 echo testing archive.2
26828 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26829 )
26830 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26831 at_status=$? at_failed=false
26832 $at_check_filter
26833 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26834 " | \
26835   $at_diff - "$at_stderr" || at_failed=:
26836 echo >>"$at_stdout"; $as_echo "archive.1
26837 archive.2
26838 testing archive.2
26839 file1
26840 file1
26841 " | \
26842   $at_diff - "$at_stdout" || at_failed=:
26843 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26844 $at_failed && at_fn_log_failure
26845 $at_traceon; }
26846
26847               { set +x
26848 $as_echo "$at_srcdir/link03.at:34:
26849 mkdir ustar
26850 (cd ustar
26851 TEST_TAR_FORMAT=ustar
26852 export TEST_TAR_FORMAT
26853 TAR_OPTIONS=\"-H ustar\"
26854 export TAR_OPTIONS
26855 rm -rf *
26856
26857
26858 genfile -l 64 -f file1
26859 ln file1 file2
26860 ln file2 file3
26861 ln file3 file4
26862
26863 echo archive.1
26864 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26865
26866 genfile -l 64 -f file1
26867 ln file1 file2
26868 ln file2 file3
26869 ln file3 file4
26870
26871 echo archive.2
26872 tar -c -f archive.2 -l --remove-files file1 file2 file3
26873 echo testing archive.2
26874 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26875 )"
26876 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26877 ( $at_check_trace;
26878 mkdir ustar
26879 (cd ustar
26880 TEST_TAR_FORMAT=ustar
26881 export TEST_TAR_FORMAT
26882 TAR_OPTIONS="-H ustar"
26883 export TAR_OPTIONS
26884 rm -rf *
26885
26886
26887 genfile -l 64 -f file1
26888 ln file1 file2
26889 ln file2 file3
26890 ln file3 file4
26891
26892 echo archive.1
26893 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26894
26895 genfile -l 64 -f file1
26896 ln file1 file2
26897 ln file2 file3
26898 ln file3 file4
26899
26900 echo archive.2
26901 tar -c -f archive.2 -l --remove-files file1 file2 file3
26902 echo testing archive.2
26903 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26904 )
26905 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26906 at_status=$? at_failed=false
26907 $at_check_filter
26908 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26909 " | \
26910   $at_diff - "$at_stderr" || at_failed=:
26911 echo >>"$at_stdout"; $as_echo "archive.1
26912 archive.2
26913 testing archive.2
26914 file1
26915 file1
26916 " | \
26917   $at_diff - "$at_stdout" || at_failed=:
26918 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26919 $at_failed && at_fn_log_failure
26920 $at_traceon; }
26921
26922               { set +x
26923 $as_echo "$at_srcdir/link03.at:34:
26924 mkdir posix
26925 (cd posix
26926 TEST_TAR_FORMAT=posix
26927 export TEST_TAR_FORMAT
26928 TAR_OPTIONS=\"-H posix\"
26929 export TAR_OPTIONS
26930 rm -rf *
26931
26932
26933 genfile -l 64 -f file1
26934 ln file1 file2
26935 ln file2 file3
26936 ln file3 file4
26937
26938 echo archive.1
26939 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26940
26941 genfile -l 64 -f file1
26942 ln file1 file2
26943 ln file2 file3
26944 ln file3 file4
26945
26946 echo archive.2
26947 tar -c -f archive.2 -l --remove-files file1 file2 file3
26948 echo testing archive.2
26949 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26950 )"
26951 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
26952 ( $at_check_trace;
26953 mkdir posix
26954 (cd posix
26955 TEST_TAR_FORMAT=posix
26956 export TEST_TAR_FORMAT
26957 TAR_OPTIONS="-H posix"
26958 export TAR_OPTIONS
26959 rm -rf *
26960
26961
26962 genfile -l 64 -f file1
26963 ln file1 file2
26964 ln file2 file3
26965 ln file3 file4
26966
26967 echo archive.1
26968 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
26969
26970 genfile -l 64 -f file1
26971 ln file1 file2
26972 ln file2 file3
26973 ln file3 file4
26974
26975 echo archive.2
26976 tar -c -f archive.2 -l --remove-files file1 file2 file3
26977 echo testing archive.2
26978 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
26979 )
26980 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
26981 at_status=$? at_failed=false
26982 $at_check_filter
26983 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
26984 " | \
26985   $at_diff - "$at_stderr" || at_failed=:
26986 echo >>"$at_stdout"; $as_echo "archive.1
26987 archive.2
26988 testing archive.2
26989 file1
26990 file1
26991 " | \
26992   $at_diff - "$at_stdout" || at_failed=:
26993 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
26994 $at_failed && at_fn_log_failure
26995 $at_traceon; }
26996
26997               { set +x
26998 $as_echo "$at_srcdir/link03.at:34:
26999 mkdir gnu
27000 (cd gnu
27001 TEST_TAR_FORMAT=gnu
27002 export TEST_TAR_FORMAT
27003 TAR_OPTIONS=\"-H gnu\"
27004 export TAR_OPTIONS
27005 rm -rf *
27006
27007
27008 genfile -l 64 -f file1
27009 ln file1 file2
27010 ln file2 file3
27011 ln file3 file4
27012
27013 echo archive.1
27014 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
27015
27016 genfile -l 64 -f file1
27017 ln file1 file2
27018 ln file2 file3
27019 ln file3 file4
27020
27021 echo archive.2
27022 tar -c -f archive.2 -l --remove-files file1 file2 file3
27023 echo testing archive.2
27024 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
27025 )"
27026 at_fn_check_prepare_notrace 'an embedded newline' "link03.at:34"
27027 ( $at_check_trace;
27028 mkdir gnu
27029 (cd gnu
27030 TEST_TAR_FORMAT=gnu
27031 export TEST_TAR_FORMAT
27032 TAR_OPTIONS="-H gnu"
27033 export TAR_OPTIONS
27034 rm -rf *
27035
27036
27037 genfile -l 64 -f file1
27038 ln file1 file2
27039 ln file2 file3
27040 ln file3 file4
27041
27042 echo archive.1
27043 tar -c -f archive.1 -l --remove-files file1 file2 file3 file4
27044
27045 genfile -l 64 -f file1
27046 ln file1 file2
27047 ln file2 file3
27048 ln file3 file4
27049
27050 echo archive.2
27051 tar -c -f archive.2 -l --remove-files file1 file2 file3
27052 echo testing archive.2
27053 tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p'
27054 )
27055 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27056 at_status=$? at_failed=false
27057 $at_check_filter
27058 echo >>"$at_stderr"; $as_echo "tar: Missing links to 'file1'.
27059 " | \
27060   $at_diff - "$at_stderr" || at_failed=:
27061 echo >>"$at_stdout"; $as_echo "archive.1
27062 archive.2
27063 testing archive.2
27064 file1
27065 file1
27066 " | \
27067   $at_diff - "$at_stdout" || at_failed=:
27068 at_fn_check_status 0 $at_status "$at_srcdir/link03.at:34"
27069 $at_failed && at_fn_log_failure
27070 $at_traceon; }
27071
27072
27073
27074
27075
27076   set +x
27077   $at_times_p && times >"$at_times_file"
27078 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27079 read at_status <"$at_status_file"
27080 #AT_STOP_108
27081 #AT_START_109
27082 at_fn_group_banner 109 'link04.at:29' \
27083   "link count is 1 but multiple occurrences" "       " 15
27084 at_xfail=no
27085       test -f $XFAILFILE && at_xfail=yes
27086 (
27087   $as_echo "109. $at_setup_line: testing $at_desc ..."
27088   $at_traceon
27089
27090
27091
27092
27093
27094   { set +x
27095 $as_echo "$at_srcdir/link04.at:32:
27096 mkdir v7
27097 (cd v7
27098 TEST_TAR_FORMAT=v7
27099 export TEST_TAR_FORMAT
27100 TAR_OPTIONS=\"-H v7\"
27101 export TAR_OPTIONS
27102 rm -rf *
27103
27104 mkdir dir
27105 echo TEST > dir/file
27106 ln -s file dir/symlink || exit 77
27107
27108 tar cf archive dir dir
27109 tar tvf archive | sed '
27110   s,.*[0-9] dir/,dir/,
27111 ' | sort
27112
27113 echo ==
27114
27115 tar chf archive dir
27116 tar tvf archive | sed '
27117   s,.*[0-9] dir/,dir/,
27118   s,file,FOO,g
27119   s,symlink,FOO,g
27120 ' | sort
27121 )"
27122 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
27123 ( $at_check_trace;
27124 mkdir v7
27125 (cd v7
27126 TEST_TAR_FORMAT=v7
27127 export TEST_TAR_FORMAT
27128 TAR_OPTIONS="-H v7"
27129 export TAR_OPTIONS
27130 rm -rf *
27131
27132 mkdir dir
27133 echo TEST > dir/file
27134 ln -s file dir/symlink || exit 77
27135
27136 tar cf archive dir dir
27137 tar tvf archive | sed '
27138   s,.*[0-9] dir/,dir/,
27139 ' | sort
27140
27141 echo ==
27142
27143 tar chf archive dir
27144 tar tvf archive | sed '
27145   s,.*[0-9] dir/,dir/,
27146   s,file,FOO,g
27147   s,symlink,FOO,g
27148 ' | sort
27149 )
27150 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27151 at_status=$? at_failed=false
27152 $at_check_filter
27153 at_fn_diff_devnull "$at_stderr" || at_failed=:
27154 echo >>"$at_stdout"; $as_echo "dir/
27155 dir/
27156 dir/file
27157 dir/file link to dir/file
27158 dir/symlink -> file
27159 dir/symlink link to dir/symlink
27160 ==
27161 dir/
27162 dir/FOO
27163 dir/FOO link to dir/FOO
27164 " | \
27165   $at_diff - "$at_stdout" || at_failed=:
27166 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
27167 $at_failed && at_fn_log_failure
27168 $at_traceon; }
27169
27170               { set +x
27171 $as_echo "$at_srcdir/link04.at:32:
27172 mkdir oldgnu
27173 (cd oldgnu
27174 TEST_TAR_FORMAT=oldgnu
27175 export TEST_TAR_FORMAT
27176 TAR_OPTIONS=\"-H oldgnu\"
27177 export TAR_OPTIONS
27178 rm -rf *
27179
27180 mkdir dir
27181 echo TEST > dir/file
27182 ln -s file dir/symlink || exit 77
27183
27184 tar cf archive dir dir
27185 tar tvf archive | sed '
27186   s,.*[0-9] dir/,dir/,
27187 ' | sort
27188
27189 echo ==
27190
27191 tar chf archive dir
27192 tar tvf archive | sed '
27193   s,.*[0-9] dir/,dir/,
27194   s,file,FOO,g
27195   s,symlink,FOO,g
27196 ' | sort
27197 )"
27198 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
27199 ( $at_check_trace;
27200 mkdir oldgnu
27201 (cd oldgnu
27202 TEST_TAR_FORMAT=oldgnu
27203 export TEST_TAR_FORMAT
27204 TAR_OPTIONS="-H oldgnu"
27205 export TAR_OPTIONS
27206 rm -rf *
27207
27208 mkdir dir
27209 echo TEST > dir/file
27210 ln -s file dir/symlink || exit 77
27211
27212 tar cf archive dir dir
27213 tar tvf archive | sed '
27214   s,.*[0-9] dir/,dir/,
27215 ' | sort
27216
27217 echo ==
27218
27219 tar chf archive dir
27220 tar tvf archive | sed '
27221   s,.*[0-9] dir/,dir/,
27222   s,file,FOO,g
27223   s,symlink,FOO,g
27224 ' | sort
27225 )
27226 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27227 at_status=$? at_failed=false
27228 $at_check_filter
27229 at_fn_diff_devnull "$at_stderr" || at_failed=:
27230 echo >>"$at_stdout"; $as_echo "dir/
27231 dir/
27232 dir/file
27233 dir/file link to dir/file
27234 dir/symlink -> file
27235 dir/symlink link to dir/symlink
27236 ==
27237 dir/
27238 dir/FOO
27239 dir/FOO link to dir/FOO
27240 " | \
27241   $at_diff - "$at_stdout" || at_failed=:
27242 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
27243 $at_failed && at_fn_log_failure
27244 $at_traceon; }
27245
27246               { set +x
27247 $as_echo "$at_srcdir/link04.at:32:
27248 mkdir ustar
27249 (cd ustar
27250 TEST_TAR_FORMAT=ustar
27251 export TEST_TAR_FORMAT
27252 TAR_OPTIONS=\"-H ustar\"
27253 export TAR_OPTIONS
27254 rm -rf *
27255
27256 mkdir dir
27257 echo TEST > dir/file
27258 ln -s file dir/symlink || exit 77
27259
27260 tar cf archive dir dir
27261 tar tvf archive | sed '
27262   s,.*[0-9] dir/,dir/,
27263 ' | sort
27264
27265 echo ==
27266
27267 tar chf archive dir
27268 tar tvf archive | sed '
27269   s,.*[0-9] dir/,dir/,
27270   s,file,FOO,g
27271   s,symlink,FOO,g
27272 ' | sort
27273 )"
27274 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
27275 ( $at_check_trace;
27276 mkdir ustar
27277 (cd ustar
27278 TEST_TAR_FORMAT=ustar
27279 export TEST_TAR_FORMAT
27280 TAR_OPTIONS="-H ustar"
27281 export TAR_OPTIONS
27282 rm -rf *
27283
27284 mkdir dir
27285 echo TEST > dir/file
27286 ln -s file dir/symlink || exit 77
27287
27288 tar cf archive dir dir
27289 tar tvf archive | sed '
27290   s,.*[0-9] dir/,dir/,
27291 ' | sort
27292
27293 echo ==
27294
27295 tar chf archive dir
27296 tar tvf archive | sed '
27297   s,.*[0-9] dir/,dir/,
27298   s,file,FOO,g
27299   s,symlink,FOO,g
27300 ' | sort
27301 )
27302 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27303 at_status=$? at_failed=false
27304 $at_check_filter
27305 at_fn_diff_devnull "$at_stderr" || at_failed=:
27306 echo >>"$at_stdout"; $as_echo "dir/
27307 dir/
27308 dir/file
27309 dir/file link to dir/file
27310 dir/symlink -> file
27311 dir/symlink link to dir/symlink
27312 ==
27313 dir/
27314 dir/FOO
27315 dir/FOO link to dir/FOO
27316 " | \
27317   $at_diff - "$at_stdout" || at_failed=:
27318 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
27319 $at_failed && at_fn_log_failure
27320 $at_traceon; }
27321
27322               { set +x
27323 $as_echo "$at_srcdir/link04.at:32:
27324 mkdir posix
27325 (cd posix
27326 TEST_TAR_FORMAT=posix
27327 export TEST_TAR_FORMAT
27328 TAR_OPTIONS=\"-H posix\"
27329 export TAR_OPTIONS
27330 rm -rf *
27331
27332 mkdir dir
27333 echo TEST > dir/file
27334 ln -s file dir/symlink || exit 77
27335
27336 tar cf archive dir dir
27337 tar tvf archive | sed '
27338   s,.*[0-9] dir/,dir/,
27339 ' | sort
27340
27341 echo ==
27342
27343 tar chf archive dir
27344 tar tvf archive | sed '
27345   s,.*[0-9] dir/,dir/,
27346   s,file,FOO,g
27347   s,symlink,FOO,g
27348 ' | sort
27349 )"
27350 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
27351 ( $at_check_trace;
27352 mkdir posix
27353 (cd posix
27354 TEST_TAR_FORMAT=posix
27355 export TEST_TAR_FORMAT
27356 TAR_OPTIONS="-H posix"
27357 export TAR_OPTIONS
27358 rm -rf *
27359
27360 mkdir dir
27361 echo TEST > dir/file
27362 ln -s file dir/symlink || exit 77
27363
27364 tar cf archive dir dir
27365 tar tvf archive | sed '
27366   s,.*[0-9] dir/,dir/,
27367 ' | sort
27368
27369 echo ==
27370
27371 tar chf archive dir
27372 tar tvf archive | sed '
27373   s,.*[0-9] dir/,dir/,
27374   s,file,FOO,g
27375   s,symlink,FOO,g
27376 ' | sort
27377 )
27378 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27379 at_status=$? at_failed=false
27380 $at_check_filter
27381 at_fn_diff_devnull "$at_stderr" || at_failed=:
27382 echo >>"$at_stdout"; $as_echo "dir/
27383 dir/
27384 dir/file
27385 dir/file link to dir/file
27386 dir/symlink -> file
27387 dir/symlink link to dir/symlink
27388 ==
27389 dir/
27390 dir/FOO
27391 dir/FOO link to dir/FOO
27392 " | \
27393   $at_diff - "$at_stdout" || at_failed=:
27394 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
27395 $at_failed && at_fn_log_failure
27396 $at_traceon; }
27397
27398               { set +x
27399 $as_echo "$at_srcdir/link04.at:32:
27400 mkdir gnu
27401 (cd gnu
27402 TEST_TAR_FORMAT=gnu
27403 export TEST_TAR_FORMAT
27404 TAR_OPTIONS=\"-H gnu\"
27405 export TAR_OPTIONS
27406 rm -rf *
27407
27408 mkdir dir
27409 echo TEST > dir/file
27410 ln -s file dir/symlink || exit 77
27411
27412 tar cf archive dir dir
27413 tar tvf archive | sed '
27414   s,.*[0-9] dir/,dir/,
27415 ' | sort
27416
27417 echo ==
27418
27419 tar chf archive dir
27420 tar tvf archive | sed '
27421   s,.*[0-9] dir/,dir/,
27422   s,file,FOO,g
27423   s,symlink,FOO,g
27424 ' | sort
27425 )"
27426 at_fn_check_prepare_notrace 'an embedded newline' "link04.at:32"
27427 ( $at_check_trace;
27428 mkdir gnu
27429 (cd gnu
27430 TEST_TAR_FORMAT=gnu
27431 export TEST_TAR_FORMAT
27432 TAR_OPTIONS="-H gnu"
27433 export TAR_OPTIONS
27434 rm -rf *
27435
27436 mkdir dir
27437 echo TEST > dir/file
27438 ln -s file dir/symlink || exit 77
27439
27440 tar cf archive dir dir
27441 tar tvf archive | sed '
27442   s,.*[0-9] dir/,dir/,
27443 ' | sort
27444
27445 echo ==
27446
27447 tar chf archive dir
27448 tar tvf archive | sed '
27449   s,.*[0-9] dir/,dir/,
27450   s,file,FOO,g
27451   s,symlink,FOO,g
27452 ' | sort
27453 )
27454 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27455 at_status=$? at_failed=false
27456 $at_check_filter
27457 at_fn_diff_devnull "$at_stderr" || at_failed=:
27458 echo >>"$at_stdout"; $as_echo "dir/
27459 dir/
27460 dir/file
27461 dir/file link to dir/file
27462 dir/symlink -> file
27463 dir/symlink link to dir/symlink
27464 ==
27465 dir/
27466 dir/FOO
27467 dir/FOO link to dir/FOO
27468 " | \
27469   $at_diff - "$at_stdout" || at_failed=:
27470 at_fn_check_status 0 $at_status "$at_srcdir/link04.at:32"
27471 $at_failed && at_fn_log_failure
27472 $at_traceon; }
27473
27474
27475
27476
27477   set +x
27478   $at_times_p && times >"$at_times_file"
27479 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27480 read at_status <"$at_status_file"
27481 #AT_STOP_109
27482 #AT_START_110
27483 at_fn_group_banner 110 'longv7.at:24' \
27484   "long names in V7 archives" "                      " 16
27485 at_xfail=no
27486       test -f $XFAILFILE && at_xfail=yes
27487 (
27488   $as_echo "110. $at_setup_line: testing $at_desc ..."
27489   $at_traceon
27490
27491
27492
27493
27494
27495
27496
27497
27498   { set +x
27499 $as_echo "$at_srcdir/longv7.at:30:
27500 mkdir v7
27501 (cd v7
27502 TEST_TAR_FORMAT=v7
27503 export TEST_TAR_FORMAT
27504 TAR_OPTIONS=\"-H v7\"
27505 export TAR_OPTIONS
27506 rm -rf *
27507
27508 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
27509 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
27510
27511 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
27512 echo separator
27513 tar tf archive
27514 )"
27515 at_fn_check_prepare_notrace 'an embedded newline' "longv7.at:30"
27516 ( $at_check_trace;
27517 mkdir v7
27518 (cd v7
27519 TEST_TAR_FORMAT=v7
27520 export TEST_TAR_FORMAT
27521 TAR_OPTIONS="-H v7"
27522 export TAR_OPTIONS
27523 rm -rf *
27524
27525 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
27526 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
27527
27528 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
27529 echo separator
27530 tar tf archive
27531 )
27532 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27533 at_status=$? at_failed=false
27534 $at_check_filter
27535 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
27536 tar: Exiting with failure status due to previous errors
27537 " | \
27538   $at_diff - "$at_stderr" || at_failed=:
27539 echo >>"$at_stdout"; $as_echo "separator
27540 this_is_a_very_long_name_for_a_directory_which_causes_problems/
27541 " | \
27542   $at_diff - "$at_stdout" || at_failed=:
27543 at_fn_check_status 0 $at_status "$at_srcdir/longv7.at:30"
27544 $at_failed && at_fn_log_failure
27545 $at_traceon; }
27546
27547
27548
27549
27550
27551
27552   set +x
27553   $at_times_p && times >"$at_times_file"
27554 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27555 read at_status <"$at_status_file"
27556 #AT_STOP_110
27557 #AT_START_111
27558 at_fn_group_banner 111 'long01.at:28' \
27559   "long file names divisible by block size" "        " 16
27560 at_xfail=no
27561       test -f $XFAILFILE && at_xfail=yes
27562 (
27563   $as_echo "111. $at_setup_line: testing $at_desc ..."
27564   $at_traceon
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574   { set +x
27575 $as_echo "$at_srcdir/long01.at:36:
27576 mkdir gnu
27577 (cd gnu
27578 TEST_TAR_FORMAT=gnu
27579 export TEST_TAR_FORMAT
27580 TAR_OPTIONS=\"-H gnu\"
27581 export TAR_OPTIONS
27582 rm -rf *
27583
27584
27585 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
27586 echo test > endfile
27587
27588 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
27589 tar tf archive)"
27590 at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
27591 ( $at_check_trace;
27592 mkdir gnu
27593 (cd gnu
27594 TEST_TAR_FORMAT=gnu
27595 export TEST_TAR_FORMAT
27596 TAR_OPTIONS="-H gnu"
27597 export TAR_OPTIONS
27598 rm -rf *
27599
27600
27601 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
27602 echo test > endfile
27603
27604 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
27605 tar tf archive)
27606 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27607 at_status=$? at_failed=false
27608 $at_check_filter
27609 at_fn_diff_devnull "$at_stderr" || at_failed=:
27610 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
27611 endfile
27612 " | \
27613   $at_diff - "$at_stdout" || at_failed=:
27614 at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
27615 $at_failed && at_fn_log_failure
27616 $at_traceon; }
27617
27618               { set +x
27619 $as_echo "$at_srcdir/long01.at:36:
27620 mkdir oldgnu
27621 (cd oldgnu
27622 TEST_TAR_FORMAT=oldgnu
27623 export TEST_TAR_FORMAT
27624 TAR_OPTIONS=\"-H oldgnu\"
27625 export TAR_OPTIONS
27626 rm -rf *
27627
27628
27629 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
27630 echo test > endfile
27631
27632 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
27633 tar tf archive)"
27634 at_fn_check_prepare_notrace 'an embedded newline' "long01.at:36"
27635 ( $at_check_trace;
27636 mkdir oldgnu
27637 (cd oldgnu
27638 TEST_TAR_FORMAT=oldgnu
27639 export TEST_TAR_FORMAT
27640 TAR_OPTIONS="-H oldgnu"
27641 export TAR_OPTIONS
27642 rm -rf *
27643
27644
27645 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
27646 echo test > endfile
27647
27648 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
27649 tar tf archive)
27650 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27651 at_status=$? at_failed=false
27652 $at_check_filter
27653 at_fn_diff_devnull "$at_stderr" || at_failed=:
27654 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
27655 endfile
27656 " | \
27657   $at_diff - "$at_stdout" || at_failed=:
27658 at_fn_check_status 0 $at_status "$at_srcdir/long01.at:36"
27659 $at_failed && at_fn_log_failure
27660 $at_traceon; }
27661
27662
27663
27664
27665
27666
27667   set +x
27668   $at_times_p && times >"$at_times_file"
27669 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27670 read at_status <"$at_status_file"
27671 #AT_STOP_111
27672 #AT_START_112
27673 at_fn_group_banner 112 'lustar01.at:21' \
27674   "ustar: unsplittable file name" "                  " 16
27675 at_xfail=no
27676       test -f $XFAILFILE && at_xfail=yes
27677 (
27678   $as_echo "112. $at_setup_line: testing $at_desc ..."
27679   $at_traceon
27680
27681
27682
27683
27684
27685
27686
27687   { set +x
27688 $as_echo "$at_srcdir/lustar01.at:27:
27689 mkdir ustar
27690 (cd ustar
27691 TEST_TAR_FORMAT=ustar
27692 export TEST_TAR_FORMAT
27693 TAR_OPTIONS=\"-H ustar\"
27694 export TAR_OPTIONS
27695 rm -rf *
27696
27697 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
27698 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
27699 )"
27700 at_fn_check_prepare_notrace 'an embedded newline' "lustar01.at:27"
27701 ( $at_check_trace;
27702 mkdir ustar
27703 (cd ustar
27704 TEST_TAR_FORMAT=ustar
27705 export TEST_TAR_FORMAT
27706 TAR_OPTIONS="-H ustar"
27707 export TAR_OPTIONS
27708 rm -rf *
27709
27710 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
27711 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
27712 )
27713 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27714 at_status=$? at_failed=false
27715 $at_check_filter
27716 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
27717 tar: Exiting with failure status due to previous errors
27718 " | \
27719   $at_diff - "$at_stderr" || at_failed=:
27720 at_fn_diff_devnull "$at_stdout" || at_failed=:
27721 at_fn_check_status 2 $at_status "$at_srcdir/lustar01.at:27"
27722 $at_failed && at_fn_log_failure
27723 $at_traceon; }
27724
27725
27726
27727
27728
27729   set +x
27730   $at_times_p && times >"$at_times_file"
27731 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27732 read at_status <"$at_status_file"
27733 #AT_STOP_112
27734 #AT_START_113
27735 at_fn_group_banner 113 'lustar02.at:21' \
27736   "ustar: unsplittable path name" "                  " 16
27737 at_xfail=no
27738       test -f $XFAILFILE && at_xfail=yes
27739 (
27740   $as_echo "113. $at_setup_line: testing $at_desc ..."
27741   $at_traceon
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753   { set +x
27754 $as_echo "$at_srcdir/lustar02.at:32:
27755 mkdir ustar
27756 (cd ustar
27757 TEST_TAR_FORMAT=ustar
27758 export TEST_TAR_FORMAT
27759 TAR_OPTIONS=\"-H ustar\"
27760 export TAR_OPTIONS
27761 rm -rf *
27762
27763
27764 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
27765 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
27766 )"
27767 at_fn_check_prepare_notrace 'an embedded newline' "lustar02.at:32"
27768 ( $at_check_trace;
27769 mkdir ustar
27770 (cd ustar
27771 TEST_TAR_FORMAT=ustar
27772 export TEST_TAR_FORMAT
27773 TAR_OPTIONS="-H ustar"
27774 export TAR_OPTIONS
27775 rm -rf *
27776
27777
27778 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
27779 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
27780 )
27781 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27782 at_status=$? at_failed=false
27783 $at_check_filter
27784 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
27785 tar: Exiting with failure status due to previous errors
27786 " | \
27787   $at_diff - "$at_stderr" || at_failed=:
27788 at_fn_diff_devnull "$at_stdout" || at_failed=:
27789 at_fn_check_status 2 $at_status "$at_srcdir/lustar02.at:32"
27790 $at_failed && at_fn_log_failure
27791 $at_traceon; }
27792
27793
27794
27795
27796
27797
27798
27799
27800   set +x
27801   $at_times_p && times >"$at_times_file"
27802 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27803 read at_status <"$at_status_file"
27804 #AT_STOP_113
27805 #AT_START_114
27806 at_fn_group_banner 114 'lustar03.at:21' \
27807   "ustar: splitting long names" "                    " 16
27808 at_xfail=no
27809       test -f $XFAILFILE && at_xfail=yes
27810 (
27811   $as_echo "114. $at_setup_line: testing $at_desc ..."
27812   $at_traceon
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822   { set +x
27823 $as_echo "$at_srcdir/lustar03.at:29:
27824 mkdir ustar
27825 (cd ustar
27826 TEST_TAR_FORMAT=ustar
27827 export TEST_TAR_FORMAT
27828 TAR_OPTIONS=\"-H ustar\"
27829 export TAR_OPTIONS
27830 rm -rf *
27831
27832
27833 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
27834 echo \"Create archive\"
27835 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
27836 echo \"List archive\"
27837 tar tf archive)"
27838 at_fn_check_prepare_notrace 'an embedded newline' "lustar03.at:29"
27839 ( $at_check_trace;
27840 mkdir ustar
27841 (cd ustar
27842 TEST_TAR_FORMAT=ustar
27843 export TEST_TAR_FORMAT
27844 TAR_OPTIONS="-H ustar"
27845 export TAR_OPTIONS
27846 rm -rf *
27847
27848
27849 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
27850 echo "Create archive"
27851 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
27852 echo "List archive"
27853 tar tf archive)
27854 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27855 at_status=$? at_failed=false
27856 $at_check_filter
27857 at_fn_diff_devnull "$at_stderr" || at_failed=:
27858 echo >>"$at_stdout"; $as_echo "Create archive
27859 List archive
27860 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/
27861 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
27862 " | \
27863   $at_diff - "$at_stdout" || at_failed=:
27864 at_fn_check_status 0 $at_status "$at_srcdir/lustar03.at:29"
27865 $at_failed && at_fn_log_failure
27866 $at_traceon; }
27867
27868
27869
27870
27871
27872
27873   set +x
27874   $at_times_p && times >"$at_times_file"
27875 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27876 read at_status <"$at_status_file"
27877 #AT_STOP_114
27878 #AT_START_115
27879 at_fn_group_banner 115 'old.at:23' \
27880   "old archives" "                                   " 16
27881 at_xfail=no
27882 (
27883   $as_echo "115. $at_setup_line: testing $at_desc ..."
27884   $at_traceon
27885
27886
27887
27888 unset TAR_OPTIONS
27889 { set +x
27890 $as_echo "$at_srcdir/old.at:27:
27891 mkdir directory
27892 tar cfvo archive directory || exit 1
27893 tar tf archive
27894 "
27895 at_fn_check_prepare_notrace 'an embedded newline' "old.at:27"
27896 ( $at_check_trace;
27897 mkdir directory
27898 tar cfvo archive directory || exit 1
27899 tar tf archive
27900
27901 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
27902 at_status=$? at_failed=false
27903 $at_check_filter
27904 at_fn_diff_devnull "$at_stderr" || at_failed=:
27905 echo >>"$at_stdout"; $as_echo "directory/
27906 directory/
27907 " | \
27908   $at_diff - "$at_stdout" || at_failed=:
27909 at_fn_check_status 0 $at_status "$at_srcdir/old.at:27"
27910 $at_failed && at_fn_log_failure
27911 $at_traceon; }
27912
27913
27914   set +x
27915   $at_times_p && times >"$at_times_file"
27916 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
27917 read at_status <"$at_status_file"
27918 #AT_STOP_115
27919 #AT_START_116
27920 at_fn_group_banner 116 'time01.at:20' \
27921   "time: tricky time stamps" "                       " 16
27922 at_xfail=no
27923       test -f $XFAILFILE && at_xfail=yes
27924 (
27925   $as_echo "116. $at_setup_line: testing $at_desc ..."
27926   $at_traceon
27927
27928
27929
27930
27931
27932   { set +x
27933 $as_echo "$at_srcdir/time01.at:23:
27934 mkdir pax
27935 (cd pax
27936 TEST_TAR_FORMAT=pax
27937 export TEST_TAR_FORMAT
27938 TAR_OPTIONS=\"-H pax\"
27939 export TAR_OPTIONS
27940 rm -rf *
27941
27942 export TZ=UTC0
27943 mkdir dir
27944
27945 # Test files with time stamps that are near common sources of error,
27946 # typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
27947 # Use GNU-style @ notation for very large time stamps, since they
27948 # typically don't render into years correctly due to int overflow.
27949 for s in \\
27950   @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \\
27951   0000-01-01T00:00:00 0000-01-01T00:00:01 \\
27952   0000-01-02T00:00:00 \\
27953   1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \\
27954   1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \\
27955   1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \\
27956   1901-12-14T20:45:51 \\
27957   1969-12-31T23:59:58 1969-12-31T23:59:59 \\
27958   1970-01-01T00:00:00 1970-01-01T00:00:01 \\
27959   2038-01-18T03:14:07 \\
27960   2038-01-19T03:14:07 2038-01-19T03:14:08 \\
27961   2106-02-07T06:28:15 2106-02-07T06:28:16 \\
27962   2242-03-16T12:56:31 2242-03-16T12:56:32 \\
27963   9999-12-31T23:59:58 9999-12-31T23:59:59 \\
27964   @9223372036854775807 @9223372036854775808
27965 do
27966   # Skip a time stamp \$s if it's out of range for this platform,
27967   # of if it uses a notation that this platform does not recognize.
27968   touch -d \$s dir/f\$s >/dev/null 2>&1 || continue
27969
27970   # Likewise for \$s.1.  If \$s is the most negative time stamp and
27971   # time stamps are signed, then \$s.1 is out of range.
27972   touch -d \$s.1 dir/f\$s.\$ns >/dev/null 2>&1 || continue
27973
27974   for frac in   01 001 00001 000001 0000001 00000001 000000001 0000000001 \\
27975               9 99 999 99999 999999 9999999 99999999 999999999 9999999999
27976   do
27977     touch -d \$s.\$frac dir/f\$s.\$frac
27978   done
27979 done
27980
27981 tar -c -f archive.tar dir
27982 tar -d -f archive.tar dir
27983 )"
27984 at_fn_check_prepare_notrace 'an embedded newline' "time01.at:23"
27985 ( $at_check_trace;
27986 mkdir pax
27987 (cd pax
27988 TEST_TAR_FORMAT=pax
27989 export TEST_TAR_FORMAT
27990 TAR_OPTIONS="-H pax"
27991 export TAR_OPTIONS
27992 rm -rf *
27993
27994 export TZ=UTC0
27995 mkdir dir
27996
27997 # Test files with time stamps that are near common sources of error,
27998 # typically near powers of 2 (for seconds) or near 0, 1970, or 9999 (years).
27999 # Use GNU-style @ notation for very large time stamps, since they
28000 # typically don't render into years correctly due to int overflow.
28001 for s in \
28002   @-9223372036854775809 @-9223372036854775808 @-9223372036854775807 \
28003   0000-01-01T00:00:00 0000-01-01T00:00:01 \
28004   0000-01-02T00:00:00 \
28005   1697-10-17T11:03:27 1697-10-17T11:03:28 1697-10-17T11:03:29 \
28006   1833-11-24T17:31:43 1833-11-24T17:31:44 1833-11-24T17:31:45 \
28007   1901-12-13T20:45:51 1901-12-13T20:45:52 1901-12-13T20:45:53 \
28008   1901-12-14T20:45:51 \
28009   1969-12-31T23:59:58 1969-12-31T23:59:59 \
28010   1970-01-01T00:00:00 1970-01-01T00:00:01 \
28011   2038-01-18T03:14:07 \
28012   2038-01-19T03:14:07 2038-01-19T03:14:08 \
28013   2106-02-07T06:28:15 2106-02-07T06:28:16 \
28014   2242-03-16T12:56:31 2242-03-16T12:56:32 \
28015   9999-12-31T23:59:58 9999-12-31T23:59:59 \
28016   @9223372036854775807 @9223372036854775808
28017 do
28018   # Skip a time stamp $s if it's out of range for this platform,
28019   # of if it uses a notation that this platform does not recognize.
28020   touch -d $s dir/f$s >/dev/null 2>&1 || continue
28021
28022   # Likewise for $s.1.  If $s is the most negative time stamp and
28023   # time stamps are signed, then $s.1 is out of range.
28024   touch -d $s.1 dir/f$s.$ns >/dev/null 2>&1 || continue
28025
28026   for frac in   01 001 00001 000001 0000001 00000001 000000001 0000000001 \
28027               9 99 999 99999 999999 9999999 99999999 999999999 9999999999
28028   do
28029     touch -d $s.$frac dir/f$s.$frac
28030   done
28031 done
28032
28033 tar -c -f archive.tar dir
28034 tar -d -f archive.tar dir
28035 )
28036 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28037 at_status=$? at_failed=false
28038 $at_check_filter
28039 at_fn_diff_devnull "$at_stderr" || at_failed=:
28040 at_fn_diff_devnull "$at_stdout" || at_failed=:
28041 at_fn_check_status 0 $at_status "$at_srcdir/time01.at:23"
28042 $at_failed && at_fn_log_failure
28043 $at_traceon; }
28044
28045
28046
28047
28048   set +x
28049   $at_times_p && times >"$at_times_file"
28050 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28051 read at_status <"$at_status_file"
28052 #AT_STOP_116
28053 #AT_START_117
28054 at_fn_group_banner 117 'multiv01.at:24' \
28055   "multivolume dumps from pipes" "                   " 17
28056 at_xfail=no
28057       test -f $XFAILFILE && at_xfail=yes
28058 (
28059   $as_echo "117. $at_setup_line: testing $at_desc ..."
28060   $at_traceon
28061
28062
28063
28064 # Fixme: should be configurable
28065 #  TRUSS=truss -o /tmp/tr
28066 #  TRUSS=strace
28067
28068
28069
28070   { set +x
28071 $as_echo "$at_srcdir/multiv01.at:31:
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 exec <&-
28081 genfile --length 7168 --file file1
28082
28083 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
28084               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
28085   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
28086   for count in 2 3 4 5 6 7 8 ; do
28087     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
28088   done
28089 done >file2
28090
28091 if test \$TEST_TAR_FORMAT = pax; then
28092   TAPE_LENGTH=11
28093 else
28094   TAPE_LENGTH=10
28095 fi
28096
28097 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
28098   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
28099
28100 mkdir extract-dir-pipe
28101 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
28102 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
28103       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
28104       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
28105
28106 cmp file1 extract-dir-pipe/file1
28107 cmp file2 extract-dir-pipe/file2
28108 )"
28109 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
28110 ( $at_check_trace;
28111 mkdir gnu
28112 (cd gnu
28113 TEST_TAR_FORMAT=gnu
28114 export TEST_TAR_FORMAT
28115 TAR_OPTIONS="-H gnu"
28116 export TAR_OPTIONS
28117 rm -rf *
28118
28119 exec <&-
28120 genfile --length 7168 --file file1
28121
28122 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
28123               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
28124   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
28125   for count in 2 3 4 5 6 7 8 ; do
28126     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
28127   done
28128 done >file2
28129
28130 if test $TEST_TAR_FORMAT = pax; then
28131   TAPE_LENGTH=11
28132 else
28133   TAPE_LENGTH=10
28134 fi
28135
28136 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
28137   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
28138
28139 mkdir extract-dir-pipe
28140 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
28141 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
28142       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
28143       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
28144
28145 cmp file1 extract-dir-pipe/file1
28146 cmp file2 extract-dir-pipe/file2
28147 )
28148 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28149 at_status=$? at_failed=false
28150 $at_check_filter
28151 at_fn_diff_devnull "$at_stderr" || at_failed=:
28152 at_fn_diff_devnull "$at_stdout" || at_failed=:
28153 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
28154 $at_failed && at_fn_log_failure
28155 $at_traceon; }
28156
28157               { set +x
28158 $as_echo "$at_srcdir/multiv01.at:31:
28159 mkdir oldgnu
28160 (cd oldgnu
28161 TEST_TAR_FORMAT=oldgnu
28162 export TEST_TAR_FORMAT
28163 TAR_OPTIONS=\"-H oldgnu\"
28164 export TAR_OPTIONS
28165 rm -rf *
28166
28167 exec <&-
28168 genfile --length 7168 --file file1
28169
28170 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
28171               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
28172   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
28173   for count in 2 3 4 5 6 7 8 ; do
28174     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
28175   done
28176 done >file2
28177
28178 if test \$TEST_TAR_FORMAT = pax; then
28179   TAPE_LENGTH=11
28180 else
28181   TAPE_LENGTH=10
28182 fi
28183
28184 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
28185   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
28186
28187 mkdir extract-dir-pipe
28188 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
28189 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
28190       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
28191       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
28192
28193 cmp file1 extract-dir-pipe/file1
28194 cmp file2 extract-dir-pipe/file2
28195 )"
28196 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
28197 ( $at_check_trace;
28198 mkdir oldgnu
28199 (cd oldgnu
28200 TEST_TAR_FORMAT=oldgnu
28201 export TEST_TAR_FORMAT
28202 TAR_OPTIONS="-H oldgnu"
28203 export TAR_OPTIONS
28204 rm -rf *
28205
28206 exec <&-
28207 genfile --length 7168 --file file1
28208
28209 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
28210               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
28211   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
28212   for count in 2 3 4 5 6 7 8 ; do
28213     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
28214   done
28215 done >file2
28216
28217 if test $TEST_TAR_FORMAT = pax; then
28218   TAPE_LENGTH=11
28219 else
28220   TAPE_LENGTH=10
28221 fi
28222
28223 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
28224   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
28225
28226 mkdir extract-dir-pipe
28227 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
28228 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
28229       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
28230       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
28231
28232 cmp file1 extract-dir-pipe/file1
28233 cmp file2 extract-dir-pipe/file2
28234 )
28235 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28236 at_status=$? at_failed=false
28237 $at_check_filter
28238 at_fn_diff_devnull "$at_stderr" || at_failed=:
28239 at_fn_diff_devnull "$at_stdout" || at_failed=:
28240 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
28241 $at_failed && at_fn_log_failure
28242 $at_traceon; }
28243
28244               { set +x
28245 $as_echo "$at_srcdir/multiv01.at:31:
28246 mkdir pax
28247 (cd pax
28248 TEST_TAR_FORMAT=pax
28249 export TEST_TAR_FORMAT
28250 TAR_OPTIONS=\"-H pax\"
28251 export TAR_OPTIONS
28252 rm -rf *
28253
28254 exec <&-
28255 genfile --length 7168 --file file1
28256
28257 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
28258               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
28259   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
28260   for count in 2 3 4 5 6 7 8 ; do
28261     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
28262   done
28263 done >file2
28264
28265 if test \$TEST_TAR_FORMAT = pax; then
28266   TAPE_LENGTH=11
28267 else
28268   TAPE_LENGTH=10
28269 fi
28270
28271 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
28272   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
28273
28274 mkdir extract-dir-pipe
28275 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
28276 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
28277       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\
28278       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
28279
28280 cmp file1 extract-dir-pipe/file1
28281 cmp file2 extract-dir-pipe/file2
28282 )"
28283 at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31"
28284 ( $at_check_trace;
28285 mkdir pax
28286 (cd pax
28287 TEST_TAR_FORMAT=pax
28288 export TEST_TAR_FORMAT
28289 TAR_OPTIONS="-H pax"
28290 export TAR_OPTIONS
28291 rm -rf *
28292
28293 exec <&-
28294 genfile --length 7168 --file file1
28295
28296 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
28297               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
28298   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
28299   for count in 2 3 4 5 6 7 8 ; do
28300     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
28301   done
28302 done >file2
28303
28304 if test $TEST_TAR_FORMAT = pax; then
28305   TAPE_LENGTH=11
28306 else
28307   TAPE_LENGTH=10
28308 fi
28309
28310 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
28311   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
28312
28313 mkdir extract-dir-pipe
28314 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
28315 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
28316       -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \
28317       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
28318
28319 cmp file1 extract-dir-pipe/file1
28320 cmp file2 extract-dir-pipe/file2
28321 )
28322 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28323 at_status=$? at_failed=false
28324 $at_check_filter
28325 at_fn_diff_devnull "$at_stderr" || at_failed=:
28326 at_fn_diff_devnull "$at_stdout" || at_failed=:
28327 at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31"
28328 $at_failed && at_fn_log_failure
28329 $at_traceon; }
28330
28331
28332
28333
28334   set +x
28335   $at_times_p && times >"$at_times_file"
28336 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28337 read at_status <"$at_status_file"
28338 #AT_STOP_117
28339 #AT_START_118
28340 at_fn_group_banner 118 'multiv02.at:28' \
28341   "skipping a straddling member" "                   " 17
28342 at_xfail=no
28343       test -f $XFAILFILE && at_xfail=yes
28344 (
28345   $as_echo "118. $at_setup_line: testing $at_desc ..."
28346   $at_traceon
28347
28348
28349
28350
28351
28352   { set +x
28353 $as_echo "$at_srcdir/multiv02.at:31:
28354 mkdir gnu
28355 (cd gnu
28356 TEST_TAR_FORMAT=gnu
28357 export TEST_TAR_FORMAT
28358 TAR_OPTIONS=\"-H gnu\"
28359 export TAR_OPTIONS
28360 rm -rf *
28361
28362 genfile --length 10240 --file en
28363 genfile --length 20000 --file to
28364 genfile --length 20000 --file tre
28365 genfile --length 10240 --file fire
28366
28367 exec <&-
28368
28369 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
28370 echo separator
28371 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
28372 )"
28373 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
28374 ( $at_check_trace;
28375 mkdir gnu
28376 (cd gnu
28377 TEST_TAR_FORMAT=gnu
28378 export TEST_TAR_FORMAT
28379 TAR_OPTIONS="-H gnu"
28380 export TAR_OPTIONS
28381 rm -rf *
28382
28383 genfile --length 10240 --file en
28384 genfile --length 20000 --file to
28385 genfile --length 20000 --file tre
28386 genfile --length 10240 --file fire
28387
28388 exec <&-
28389
28390 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
28391 echo separator
28392 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
28393 )
28394 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28395 at_status=$? at_failed=false
28396 $at_check_filter
28397 at_fn_diff_devnull "$at_stderr" || at_failed=:
28398 echo >>"$at_stdout"; $as_echo "separator
28399 en
28400 " | \
28401   $at_diff - "$at_stdout" || at_failed=:
28402 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
28403 $at_failed && at_fn_log_failure
28404 $at_traceon; }
28405
28406               { set +x
28407 $as_echo "$at_srcdir/multiv02.at:31:
28408 mkdir oldgnu
28409 (cd oldgnu
28410 TEST_TAR_FORMAT=oldgnu
28411 export TEST_TAR_FORMAT
28412 TAR_OPTIONS=\"-H oldgnu\"
28413 export TAR_OPTIONS
28414 rm -rf *
28415
28416 genfile --length 10240 --file en
28417 genfile --length 20000 --file to
28418 genfile --length 20000 --file tre
28419 genfile --length 10240 --file fire
28420
28421 exec <&-
28422
28423 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
28424 echo separator
28425 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
28426 )"
28427 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
28428 ( $at_check_trace;
28429 mkdir oldgnu
28430 (cd oldgnu
28431 TEST_TAR_FORMAT=oldgnu
28432 export TEST_TAR_FORMAT
28433 TAR_OPTIONS="-H oldgnu"
28434 export TAR_OPTIONS
28435 rm -rf *
28436
28437 genfile --length 10240 --file en
28438 genfile --length 20000 --file to
28439 genfile --length 20000 --file tre
28440 genfile --length 10240 --file fire
28441
28442 exec <&-
28443
28444 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
28445 echo separator
28446 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
28447 )
28448 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28449 at_status=$? at_failed=false
28450 $at_check_filter
28451 at_fn_diff_devnull "$at_stderr" || at_failed=:
28452 echo >>"$at_stdout"; $as_echo "separator
28453 en
28454 " | \
28455   $at_diff - "$at_stdout" || at_failed=:
28456 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
28457 $at_failed && at_fn_log_failure
28458 $at_traceon; }
28459
28460               { set +x
28461 $as_echo "$at_srcdir/multiv02.at:31:
28462 mkdir pax
28463 (cd pax
28464 TEST_TAR_FORMAT=pax
28465 export TEST_TAR_FORMAT
28466 TAR_OPTIONS=\"-H pax\"
28467 export TAR_OPTIONS
28468 rm -rf *
28469
28470 genfile --length 10240 --file en
28471 genfile --length 20000 --file to
28472 genfile --length 20000 --file tre
28473 genfile --length 10240 --file fire
28474
28475 exec <&-
28476
28477 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
28478 echo separator
28479 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
28480 )"
28481 at_fn_check_prepare_notrace 'an embedded newline' "multiv02.at:31"
28482 ( $at_check_trace;
28483 mkdir pax
28484 (cd pax
28485 TEST_TAR_FORMAT=pax
28486 export TEST_TAR_FORMAT
28487 TAR_OPTIONS="-H pax"
28488 export TAR_OPTIONS
28489 rm -rf *
28490
28491 genfile --length 10240 --file en
28492 genfile --length 20000 --file to
28493 genfile --length 20000 --file tre
28494 genfile --length 10240 --file fire
28495
28496 exec <&-
28497
28498 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
28499 echo separator
28500 tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1
28501 )
28502 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28503 at_status=$? at_failed=false
28504 $at_check_filter
28505 at_fn_diff_devnull "$at_stderr" || at_failed=:
28506 echo >>"$at_stdout"; $as_echo "separator
28507 en
28508 " | \
28509   $at_diff - "$at_stdout" || at_failed=:
28510 at_fn_check_status 0 $at_status "$at_srcdir/multiv02.at:31"
28511 $at_failed && at_fn_log_failure
28512 $at_traceon; }
28513
28514
28515
28516
28517   set +x
28518   $at_times_p && times >"$at_times_file"
28519 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28520 read at_status <"$at_status_file"
28521 #AT_STOP_118
28522 #AT_START_119
28523 at_fn_group_banner 119 'multiv03.at:30' \
28524   "MV archive & long filenames" "                    " 17
28525 at_xfail=no
28526       test -f $XFAILFILE && at_xfail=yes
28527 (
28528   $as_echo "119. $at_setup_line: testing $at_desc ..."
28529   $at_traceon
28530
28531
28532
28533
28534
28535   { set +x
28536 $as_echo "$at_srcdir/multiv03.at:33:
28537 mkdir gnu
28538 (cd gnu
28539 TEST_TAR_FORMAT=gnu
28540 export TEST_TAR_FORMAT
28541 TAR_OPTIONS=\"-H gnu\"
28542 export TAR_OPTIONS
28543 rm -rf *
28544
28545 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
28546 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
28547
28548 cat > ../experr <<EOF
28549 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
28550 tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
28551 EOF
28552
28553 cat > ../expout <<EOF
28554 \$AFILE
28555 separator-1
28556 separator-2
28557 EOF
28558
28559 genfile --length 15360 --file \$AFILE
28560
28561 exec <&-
28562
28563 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
28564 tar -tM -f arch.1 -f arch.2 || exit 1
28565
28566 echo separator-1
28567
28568 genfile --length 15360 --file \$BFILE
28569 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
28570
28571 echo separator-2
28572 mv \$BFILE bfile
28573 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
28574 cmp \$BFILE bfile
28575 )"
28576 at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
28577 ( $at_check_trace;
28578 mkdir gnu
28579 (cd gnu
28580 TEST_TAR_FORMAT=gnu
28581 export TEST_TAR_FORMAT
28582 TAR_OPTIONS="-H gnu"
28583 export TAR_OPTIONS
28584 rm -rf *
28585
28586 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
28587 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
28588
28589 cat > ../experr <<EOF
28590 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
28591 tar: '$BFILE' is possibly continued on this volume: header contains truncated name
28592 EOF
28593
28594 cat > ../expout <<EOF
28595 $AFILE
28596 separator-1
28597 separator-2
28598 EOF
28599
28600 genfile --length 15360 --file $AFILE
28601
28602 exec <&-
28603
28604 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
28605 tar -tM -f arch.1 -f arch.2 || exit 1
28606
28607 echo separator-1
28608
28609 genfile --length 15360 --file $BFILE
28610 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
28611
28612 echo separator-2
28613 mv $BFILE bfile
28614 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
28615 cmp $BFILE bfile
28616 )
28617 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28618 at_status=$? at_failed=false
28619 $at_check_filter
28620 $at_diff experr "$at_stderr" || at_failed=:
28621 $at_diff expout "$at_stdout" || at_failed=:
28622 at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
28623 $at_failed && at_fn_log_failure
28624 $at_traceon; }
28625
28626               { set +x
28627 $as_echo "$at_srcdir/multiv03.at:33:
28628 mkdir oldgnu
28629 (cd oldgnu
28630 TEST_TAR_FORMAT=oldgnu
28631 export TEST_TAR_FORMAT
28632 TAR_OPTIONS=\"-H oldgnu\"
28633 export TAR_OPTIONS
28634 rm -rf *
28635
28636 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
28637 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
28638
28639 cat > ../experr <<EOF
28640 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
28641 tar: '\$BFILE' is possibly continued on this volume: header contains truncated name
28642 EOF
28643
28644 cat > ../expout <<EOF
28645 \$AFILE
28646 separator-1
28647 separator-2
28648 EOF
28649
28650 genfile --length 15360 --file \$AFILE
28651
28652 exec <&-
28653
28654 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
28655 tar -tM -f arch.1 -f arch.2 || exit 1
28656
28657 echo separator-1
28658
28659 genfile --length 15360 --file \$BFILE
28660 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
28661
28662 echo separator-2
28663 mv \$BFILE bfile
28664 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
28665 cmp \$BFILE bfile
28666 )"
28667 at_fn_check_prepare_notrace 'a `...` command substitution' "multiv03.at:33"
28668 ( $at_check_trace;
28669 mkdir oldgnu
28670 (cd oldgnu
28671 TEST_TAR_FORMAT=oldgnu
28672 export TEST_TAR_FORMAT
28673 TAR_OPTIONS="-H oldgnu"
28674 export TAR_OPTIONS
28675 rm -rf *
28676
28677 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
28678 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
28679
28680 cat > ../experr <<EOF
28681 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
28682 tar: '$BFILE' is possibly continued on this volume: header contains truncated name
28683 EOF
28684
28685 cat > ../expout <<EOF
28686 $AFILE
28687 separator-1
28688 separator-2
28689 EOF
28690
28691 genfile --length 15360 --file $AFILE
28692
28693 exec <&-
28694
28695 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
28696 tar -tM -f arch.1 -f arch.2 || exit 1
28697
28698 echo separator-1
28699
28700 genfile --length 15360 --file $BFILE
28701 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
28702
28703 echo separator-2
28704 mv $BFILE bfile
28705 tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1
28706 cmp $BFILE bfile
28707 )
28708 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28709 at_status=$? at_failed=false
28710 $at_check_filter
28711 $at_diff experr "$at_stderr" || at_failed=:
28712 $at_diff expout "$at_stdout" || at_failed=:
28713 at_fn_check_status 0 $at_status "$at_srcdir/multiv03.at:33"
28714 $at_failed && at_fn_log_failure
28715 $at_traceon; }
28716
28717
28718
28719
28720   set +x
28721   $at_times_p && times >"$at_times_file"
28722 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28723 read at_status <"$at_status_file"
28724 #AT_STOP_119
28725 #AT_START_120
28726 at_fn_group_banner 120 'multiv04.at:36' \
28727   "split directory members in a MV archive" "        " 17
28728 at_xfail=no
28729       test -f $XFAILFILE && at_xfail=yes
28730 (
28731   $as_echo "120. $at_setup_line: testing $at_desc ..."
28732   $at_traceon
28733
28734
28735
28736
28737
28738   { set +x
28739 $as_echo "$at_srcdir/multiv04.at:39:
28740 mkdir gnu
28741 (cd gnu
28742 TEST_TAR_FORMAT=gnu
28743 export TEST_TAR_FORMAT
28744 TAR_OPTIONS=\"-H gnu\"
28745 export TAR_OPTIONS
28746 rm -rf *
28747
28748
28749 mkdir directory
28750 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
28751
28752 exec <&-
28753
28754 sleep 2
28755
28756 tar --listed-incremental=list -c -f archive.a directory
28757
28758 sleep 2
28759
28760 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
28761
28762 echo separator
28763
28764 tar -MRt -f arc.1 -f arc.2)"
28765 at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
28766 ( $at_check_trace;
28767 mkdir gnu
28768 (cd gnu
28769 TEST_TAR_FORMAT=gnu
28770 export TEST_TAR_FORMAT
28771 TAR_OPTIONS="-H gnu"
28772 export TAR_OPTIONS
28773 rm -rf *
28774
28775
28776 mkdir directory
28777 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
28778
28779 exec <&-
28780
28781 sleep 2
28782
28783 tar --listed-incremental=list -c -f archive.a directory
28784
28785 sleep 2
28786
28787 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
28788
28789 echo separator
28790
28791 tar -MRt -f arc.1 -f arc.2)
28792 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28793 at_status=$? at_failed=false
28794 $at_check_filter
28795 at_fn_diff_devnull "$at_stderr" || at_failed=:
28796 echo >>"$at_stdout"; $as_echo "directory/
28797 separator
28798 block 0: directory/
28799 block 35: ** Block of NULs **
28800 " | \
28801   $at_diff - "$at_stdout" || at_failed=:
28802 at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
28803 $at_failed && at_fn_log_failure
28804 $at_traceon; }
28805
28806               { set +x
28807 $as_echo "$at_srcdir/multiv04.at:39:
28808 mkdir oldgnu
28809 (cd oldgnu
28810 TEST_TAR_FORMAT=oldgnu
28811 export TEST_TAR_FORMAT
28812 TAR_OPTIONS=\"-H oldgnu\"
28813 export TAR_OPTIONS
28814 rm -rf *
28815
28816
28817 mkdir directory
28818 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
28819
28820 exec <&-
28821
28822 sleep 2
28823
28824 tar --listed-incremental=list -c -f archive.a directory
28825
28826 sleep 2
28827
28828 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
28829
28830 echo separator
28831
28832 tar -MRt -f arc.1 -f arc.2)"
28833 at_fn_check_prepare_notrace 'an embedded newline' "multiv04.at:39"
28834 ( $at_check_trace;
28835 mkdir oldgnu
28836 (cd oldgnu
28837 TEST_TAR_FORMAT=oldgnu
28838 export TEST_TAR_FORMAT
28839 TAR_OPTIONS="-H oldgnu"
28840 export TAR_OPTIONS
28841 rm -rf *
28842
28843
28844 mkdir directory
28845 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
28846
28847 exec <&-
28848
28849 sleep 2
28850
28851 tar --listed-incremental=list -c -f archive.a directory
28852
28853 sleep 2
28854
28855 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
28856
28857 echo separator
28858
28859 tar -MRt -f arc.1 -f arc.2)
28860 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28861 at_status=$? at_failed=false
28862 $at_check_filter
28863 at_fn_diff_devnull "$at_stderr" || at_failed=:
28864 echo >>"$at_stdout"; $as_echo "directory/
28865 separator
28866 block 0: directory/
28867 block 35: ** Block of NULs **
28868 " | \
28869   $at_diff - "$at_stdout" || at_failed=:
28870 at_fn_check_status 0 $at_status "$at_srcdir/multiv04.at:39"
28871 $at_failed && at_fn_log_failure
28872 $at_traceon; }
28873
28874
28875
28876
28877   set +x
28878   $at_times_p && times >"$at_times_file"
28879 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
28880 read at_status <"$at_status_file"
28881 #AT_STOP_120
28882 #AT_START_121
28883 at_fn_group_banner 121 'multiv05.at:26' \
28884   "Restoring after an out of sync volume" "          " 17
28885 at_xfail=no
28886       test -f $XFAILFILE && at_xfail=yes
28887 (
28888   $as_echo "121. $at_setup_line: testing $at_desc ..."
28889   $at_traceon
28890
28891
28892
28893
28894
28895
28896   { set +x
28897 $as_echo "$at_srcdir/multiv05.at:30:
28898 mkdir gnu
28899 (cd gnu
28900 TEST_TAR_FORMAT=gnu
28901 export TEST_TAR_FORMAT
28902 TAR_OPTIONS=\"-H gnu\"
28903 export TAR_OPTIONS
28904 rm -rf *
28905
28906 exec <&-
28907
28908 genfile --length 250k --file jeden
28909 genfile --length 250k --file dwa
28910 genfile --length 250k --file trzy
28911 genfile --length 250k --file cztery
28912 genfile --length 250k --file piec
28913 genfile --length 250k --file szesc
28914
28915
28916 echo Creating archive
28917 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
28918 echo separator
28919 mkdir bak
28920 mv jeden dwa trzy cztery piec szesc bak
28921 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
28922 echo Diffing jeden
28923    cmp bak/jeden jeden || exit 1
28924 echo Diffing dwa
28925    cmp bak/dwa dwa || exit 1
28926 echo Diffing trzy
28927    cmp bak/trzy trzy || exit 1
28928 echo Diffing cztery
28929    cmp bak/cztery cztery || exit 1
28930 echo Diffing piec
28931    cmp bak/piec piec || exit 1
28932 echo Diffing szesc
28933    cmp bak/szesc szesc || exit 1
28934 )"
28935 at_fn_check_prepare_notrace 'an embedded newline' "multiv05.at:30"
28936 ( $at_check_trace;
28937 mkdir gnu
28938 (cd gnu
28939 TEST_TAR_FORMAT=gnu
28940 export TEST_TAR_FORMAT
28941 TAR_OPTIONS="-H gnu"
28942 export TAR_OPTIONS
28943 rm -rf *
28944
28945 exec <&-
28946
28947 genfile --length 250k --file jeden
28948 genfile --length 250k --file dwa
28949 genfile --length 250k --file trzy
28950 genfile --length 250k --file cztery
28951 genfile --length 250k --file piec
28952 genfile --length 250k --file szesc
28953
28954
28955 echo Creating archive
28956 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
28957 echo separator
28958 mkdir bak
28959 mv jeden dwa trzy cztery piec szesc bak
28960 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
28961 echo Diffing jeden
28962    cmp bak/jeden jeden || exit 1
28963 echo Diffing dwa
28964    cmp bak/dwa dwa || exit 1
28965 echo Diffing trzy
28966    cmp bak/trzy trzy || exit 1
28967 echo Diffing cztery
28968    cmp bak/cztery cztery || exit 1
28969 echo Diffing piec
28970    cmp bak/piec piec || exit 1
28971 echo Diffing szesc
28972    cmp bak/szesc szesc || exit 1
28973 )
28974 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
28975 at_status=$? at_failed=false
28976 $at_check_filter
28977 echo >>"$at_stderr"; $as_echo "tar: 'trzy' is not continued on this volume
28978 " | \
28979   $at_diff - "$at_stderr" || at_failed=:
28980 echo >>"$at_stdout"; $as_echo "Creating archive
28981 separator
28982 jeden
28983 dwa
28984 trzy
28985 cztery
28986 piec
28987 szesc
28988 Diffing jeden
28989 Diffing dwa
28990 Diffing trzy
28991 Diffing cztery
28992 Diffing piec
28993 Diffing szesc
28994 " | \
28995   $at_diff - "$at_stdout" || at_failed=:
28996 at_fn_check_status 0 $at_status "$at_srcdir/multiv05.at:30"
28997 $at_failed && at_fn_log_failure
28998 $at_traceon; }
28999
29000
29001
29002
29003
29004   set +x
29005   $at_times_p && times >"$at_times_file"
29006 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29007 read at_status <"$at_status_file"
29008 #AT_STOP_121
29009 #AT_START_122
29010 at_fn_group_banner 122 'multiv06.at:27' \
29011   "Multivolumes with L=record_size" "                " 17
29012 at_xfail=no
29013       test -f $XFAILFILE && at_xfail=yes
29014 (
29015   $as_echo "122. $at_setup_line: testing $at_desc ..."
29016   $at_traceon
29017
29018
29019
29020
29021
29022   { set +x
29023 $as_echo "$at_srcdir/multiv06.at:30:
29024 mkdir gnu
29025 (cd gnu
29026 TEST_TAR_FORMAT=gnu
29027 export TEST_TAR_FORMAT
29028 TAR_OPTIONS=\"-H gnu\"
29029 export TAR_OPTIONS
29030 rm -rf *
29031
29032 exec <&-
29033 decho Creating file
29034 genfile --length 20139 --file file
29035 decho Creating archive
29036 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
29037 decho Testing archive
29038 tar -t -M -farc.1 -farc.2 -farc.3)"
29039 at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
29040 ( $at_check_trace;
29041 mkdir gnu
29042 (cd gnu
29043 TEST_TAR_FORMAT=gnu
29044 export TEST_TAR_FORMAT
29045 TAR_OPTIONS="-H gnu"
29046 export TAR_OPTIONS
29047 rm -rf *
29048
29049 exec <&-
29050 decho Creating file
29051 genfile --length 20139 --file file
29052 decho Creating archive
29053 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
29054 decho Testing archive
29055 tar -t -M -farc.1 -farc.2 -farc.3)
29056 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29057 at_status=$? at_failed=false
29058 $at_check_filter
29059 echo >>"$at_stderr"; $as_echo "Creating file
29060 Creating archive
29061 Testing archive
29062 " | \
29063   $at_diff - "$at_stderr" || at_failed=:
29064 echo >>"$at_stdout"; $as_echo "Creating file
29065 Creating archive
29066 Testing archive
29067 file
29068 " | \
29069   $at_diff - "$at_stdout" || at_failed=:
29070 at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
29071 $at_failed && at_fn_log_failure
29072 $at_traceon; }
29073
29074               { set +x
29075 $as_echo "$at_srcdir/multiv06.at:30:
29076 mkdir pax
29077 (cd pax
29078 TEST_TAR_FORMAT=pax
29079 export TEST_TAR_FORMAT
29080 TAR_OPTIONS=\"-H pax\"
29081 export TAR_OPTIONS
29082 rm -rf *
29083
29084 exec <&-
29085 decho Creating file
29086 genfile --length 20139 --file file
29087 decho Creating archive
29088 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
29089 decho Testing archive
29090 tar -t -M -farc.1 -farc.2 -farc.3)"
29091 at_fn_check_prepare_notrace 'an embedded newline' "multiv06.at:30"
29092 ( $at_check_trace;
29093 mkdir pax
29094 (cd pax
29095 TEST_TAR_FORMAT=pax
29096 export TEST_TAR_FORMAT
29097 TAR_OPTIONS="-H pax"
29098 export TAR_OPTIONS
29099 rm -rf *
29100
29101 exec <&-
29102 decho Creating file
29103 genfile --length 20139 --file file
29104 decho Creating archive
29105 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
29106 decho Testing archive
29107 tar -t -M -farc.1 -farc.2 -farc.3)
29108 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29109 at_status=$? at_failed=false
29110 $at_check_filter
29111 echo >>"$at_stderr"; $as_echo "Creating file
29112 Creating archive
29113 Testing archive
29114 " | \
29115   $at_diff - "$at_stderr" || at_failed=:
29116 echo >>"$at_stdout"; $as_echo "Creating file
29117 Creating archive
29118 Testing archive
29119 file
29120 " | \
29121   $at_diff - "$at_stdout" || at_failed=:
29122 at_fn_check_status 0 $at_status "$at_srcdir/multiv06.at:30"
29123 $at_failed && at_fn_log_failure
29124 $at_traceon; }
29125
29126
29127
29128
29129   set +x
29130   $at_times_p && times >"$at_times_file"
29131 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29132 read at_status <"$at_status_file"
29133 #AT_STOP_122
29134 #AT_START_123
29135 at_fn_group_banner 123 'multiv07.at:28' \
29136   "volumes split at an extended header" "            " 17
29137 at_xfail=no
29138       test -f $XFAILFILE && at_xfail=yes
29139 (
29140   $as_echo "123. $at_setup_line: testing $at_desc ..."
29141   $at_traceon
29142
29143
29144
29145 { set +x
29146 $as_echo "$at_srcdir/multiv07.at:31:
29147
29148
29149 test -z \"\$TEST_DATA_DIR\" && exit 77
29150 tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
29151
29152 test -z \"\$TEST_DATA_DIR\" && exit 77
29153 tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
29154
29155 exec <&-
29156
29157 cd \$TEST_DATA_DIR
29158 tar -t -M -fxsplit-1.tar -fxsplit-2.tar
29159 "
29160 at_fn_check_prepare_notrace 'an embedded newline' "multiv07.at:31"
29161 ( $at_check_trace;
29162
29163
29164 test -z "$TEST_DATA_DIR" && exit 77
29165 tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
29166
29167 test -z "$TEST_DATA_DIR" && exit 77
29168 tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
29169
29170 exec <&-
29171
29172 cd $TEST_DATA_DIR
29173 tar -t -M -fxsplit-1.tar -fxsplit-2.tar
29174
29175 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29176 at_status=$? at_failed=false
29177 $at_check_filter
29178 at_fn_diff_devnull "$at_stderr" || at_failed=:
29179 echo >>"$at_stdout"; $as_echo "Archive volumes split at an extended header Volume 1
29180 foo
29181 bar
29182 " | \
29183   $at_diff - "$at_stdout" || at_failed=:
29184 at_fn_check_status 0 $at_status "$at_srcdir/multiv07.at:31"
29185 $at_failed && at_fn_log_failure
29186 $at_traceon; }
29187
29188
29189   set +x
29190   $at_times_p && times >"$at_times_file"
29191 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29192 read at_status <"$at_status_file"
29193 #AT_STOP_123
29194 #AT_START_124
29195 at_fn_group_banner 124 'multiv08.at:25' \
29196   "multivolume header creation" "                    " 17
29197 at_xfail=no
29198       test -f $XFAILFILE && at_xfail=yes
29199 (
29200   $as_echo "124. $at_setup_line: testing $at_desc ..."
29201   $at_traceon
29202
29203
29204
29205
29206
29207   { set +x
29208 $as_echo "$at_srcdir/multiv08.at:28:
29209 mkdir gnu
29210 (cd gnu
29211 TEST_TAR_FORMAT=gnu
29212 export TEST_TAR_FORMAT
29213 TAR_OPTIONS=\"-H gnu\"
29214 export TAR_OPTIONS
29215 rm -rf *
29216
29217 genfile --length 9472 --file a
29218 genfile --length 9984 --file b
29219 decho Creating
29220 tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
29221 decho Testing
29222 tar -tMR -f A.tar -f B.tar -f C.tar
29223 )"
29224 at_fn_check_prepare_notrace 'an embedded newline' "multiv08.at:28"
29225 ( $at_check_trace;
29226 mkdir gnu
29227 (cd gnu
29228 TEST_TAR_FORMAT=gnu
29229 export TEST_TAR_FORMAT
29230 TAR_OPTIONS="-H gnu"
29231 export TAR_OPTIONS
29232 rm -rf *
29233
29234 genfile --length 9472 --file a
29235 genfile --length 9984 --file b
29236 decho Creating
29237 tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b
29238 decho Testing
29239 tar -tMR -f A.tar -f B.tar -f C.tar
29240 )
29241 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29242 at_status=$? at_failed=false
29243 $at_check_filter
29244 echo >>"$at_stderr"; $as_echo "Creating
29245 Testing
29246 " | \
29247   $at_diff - "$at_stderr" || at_failed=:
29248 echo >>"$at_stdout"; $as_echo "Creating
29249 Testing
29250 block 0: a
29251 block 21: b
29252 block 43: ** Block of NULs **
29253 " | \
29254   $at_diff - "$at_stdout" || at_failed=:
29255 at_fn_check_status 0 $at_status "$at_srcdir/multiv08.at:28"
29256 $at_failed && at_fn_log_failure
29257 $at_traceon; }
29258
29259
29260
29261
29262   set +x
29263   $at_times_p && times >"$at_times_file"
29264 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29265 read at_status <"$at_status_file"
29266 #AT_STOP_124
29267 #AT_START_125
29268 at_fn_group_banner 125 'owner.at:21' \
29269   "--owner and --group" "                            " 18
29270 at_xfail=no
29271       test -f $XFAILFILE && at_xfail=yes
29272 (
29273   $as_echo "125. $at_setup_line: testing $at_desc ..."
29274   $at_traceon
29275
29276
29277
29278
29279
29280   { set +x
29281 $as_echo "$at_srcdir/owner.at:24:
29282 mkdir gnu
29283 (cd gnu
29284 TEST_TAR_FORMAT=gnu
29285 export TEST_TAR_FORMAT
29286 TAR_OPTIONS=\"-H gnu\"
29287 export TAR_OPTIONS
29288 rm -rf *
29289
29290 export TZ=UTC0
29291
29292 genfile --file a
29293
29294 tar --owner=\"Joe the Plumber:1234\" \\
29295     --group=\"Plumber's Union:5678\" \\
29296     --mtime='@0' \\
29297     --mode='u=rw,go=r' \\
29298     -cf arc a
29299
29300 tar -tvf arc
29301 tar --numeric-owner -tvf arc
29302 )"
29303 at_fn_check_prepare_notrace 'an embedded newline' "owner.at:24"
29304 ( $at_check_trace;
29305 mkdir gnu
29306 (cd gnu
29307 TEST_TAR_FORMAT=gnu
29308 export TEST_TAR_FORMAT
29309 TAR_OPTIONS="-H gnu"
29310 export TAR_OPTIONS
29311 rm -rf *
29312
29313 export TZ=UTC0
29314
29315 genfile --file a
29316
29317 tar --owner="Joe the Plumber:1234" \
29318     --group="Plumber's Union:5678" \
29319     --mtime='@0' \
29320     --mode='u=rw,go=r' \
29321     -cf arc a
29322
29323 tar -tvf arc
29324 tar --numeric-owner -tvf arc
29325 )
29326 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29327 at_status=$? at_failed=false
29328 $at_check_filter
29329 at_fn_diff_devnull "$at_stderr" || at_failed=:
29330 echo >>"$at_stdout"; $as_echo "-rw-r--r-- Joe the Plumber/Plumber's Union 0 1970-01-01 00:00 a
29331 -rw-r--r-- 1234/5678         0 1970-01-01 00:00 a
29332 " | \
29333   $at_diff - "$at_stdout" || at_failed=:
29334 at_fn_check_status 0 $at_status "$at_srcdir/owner.at:24"
29335 $at_failed && at_fn_log_failure
29336 $at_traceon; }
29337
29338
29339
29340
29341   set +x
29342   $at_times_p && times >"$at_times_file"
29343 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29344 read at_status <"$at_status_file"
29345 #AT_STOP_125
29346 #AT_START_126
29347 at_fn_group_banner 126 'sparse01.at:21' \
29348   "sparse files" "                                   " 19
29349 at_xfail=no
29350       test -f $XFAILFILE && at_xfail=yes
29351 (
29352   $as_echo "126. $at_setup_line: testing $at_desc ..."
29353   $at_traceon
29354
29355
29356
29357
29358
29359   { set +x
29360 $as_echo "$at_srcdir/sparse01.at:24:
29361 mkdir posix
29362 (cd posix
29363 TEST_TAR_FORMAT=posix
29364 export TEST_TAR_FORMAT
29365 TAR_OPTIONS=\"-H posix\"
29366 export TAR_OPTIONS
29367 rm -rf *
29368
29369 genfile --length 1000 -f begin
29370 genfile --length 1000 -f end
29371 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29372 tar -c -f archive --sparse begin sparsefile end || exit 1
29373 echo separator
29374
29375 tar tfv archive
29376 echo separator
29377 mkdir directory
29378 tar Cxf directory archive --warning=no-timestamp
29379 genfile --stat=name,size sparsefile
29380 cmp sparsefile directory/sparsefile
29381 )"
29382 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
29383 ( $at_check_trace;
29384 mkdir posix
29385 (cd posix
29386 TEST_TAR_FORMAT=posix
29387 export TEST_TAR_FORMAT
29388 TAR_OPTIONS="-H posix"
29389 export TAR_OPTIONS
29390 rm -rf *
29391
29392 genfile --length 1000 -f begin
29393 genfile --length 1000 -f end
29394 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29395 tar -c -f archive --sparse begin sparsefile end || exit 1
29396 echo separator
29397
29398 tar tfv archive
29399 echo separator
29400 mkdir directory
29401 tar Cxf directory archive --warning=no-timestamp
29402 genfile --stat=name,size sparsefile
29403 cmp sparsefile directory/sparsefile
29404 )
29405 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29406 at_status=$? at_failed=false
29407 $at_check_filter
29408 at_fn_diff_devnull "$at_stderr" || at_failed=:
29409 echo stdout:; tee stdout <"$at_stdout"
29410 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
29411 $at_failed && at_fn_log_failure
29412 $at_traceon; }
29413
29414               { set +x
29415 $as_echo "$at_srcdir/sparse01.at:24:
29416 mkdir gnu
29417 (cd gnu
29418 TEST_TAR_FORMAT=gnu
29419 export TEST_TAR_FORMAT
29420 TAR_OPTIONS=\"-H gnu\"
29421 export TAR_OPTIONS
29422 rm -rf *
29423
29424 genfile --length 1000 -f begin
29425 genfile --length 1000 -f end
29426 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29427 tar -c -f archive --sparse begin sparsefile end || exit 1
29428 echo separator
29429
29430 tar tfv archive
29431 echo separator
29432 mkdir directory
29433 tar Cxf directory archive --warning=no-timestamp
29434 genfile --stat=name,size sparsefile
29435 cmp sparsefile directory/sparsefile
29436 )"
29437 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
29438 ( $at_check_trace;
29439 mkdir gnu
29440 (cd gnu
29441 TEST_TAR_FORMAT=gnu
29442 export TEST_TAR_FORMAT
29443 TAR_OPTIONS="-H gnu"
29444 export TAR_OPTIONS
29445 rm -rf *
29446
29447 genfile --length 1000 -f begin
29448 genfile --length 1000 -f end
29449 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29450 tar -c -f archive --sparse begin sparsefile end || exit 1
29451 echo separator
29452
29453 tar tfv archive
29454 echo separator
29455 mkdir directory
29456 tar Cxf directory archive --warning=no-timestamp
29457 genfile --stat=name,size sparsefile
29458 cmp sparsefile directory/sparsefile
29459 )
29460 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29461 at_status=$? at_failed=false
29462 $at_check_filter
29463 at_fn_diff_devnull "$at_stderr" || at_failed=:
29464 echo stdout:; tee stdout <"$at_stdout"
29465 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
29466 $at_failed && at_fn_log_failure
29467 $at_traceon; }
29468
29469               { set +x
29470 $as_echo "$at_srcdir/sparse01.at:24:
29471 mkdir oldgnu
29472 (cd oldgnu
29473 TEST_TAR_FORMAT=oldgnu
29474 export TEST_TAR_FORMAT
29475 TAR_OPTIONS=\"-H oldgnu\"
29476 export TAR_OPTIONS
29477 rm -rf *
29478
29479 genfile --length 1000 -f begin
29480 genfile --length 1000 -f end
29481 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29482 tar -c -f archive --sparse begin sparsefile end || exit 1
29483 echo separator
29484
29485 tar tfv archive
29486 echo separator
29487 mkdir directory
29488 tar Cxf directory archive --warning=no-timestamp
29489 genfile --stat=name,size sparsefile
29490 cmp sparsefile directory/sparsefile
29491 )"
29492 at_fn_check_prepare_notrace 'an embedded newline' "sparse01.at:24"
29493 ( $at_check_trace;
29494 mkdir oldgnu
29495 (cd oldgnu
29496 TEST_TAR_FORMAT=oldgnu
29497 export TEST_TAR_FORMAT
29498 TAR_OPTIONS="-H oldgnu"
29499 export TAR_OPTIONS
29500 rm -rf *
29501
29502 genfile --length 1000 -f begin
29503 genfile --length 1000 -f end
29504 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29505 tar -c -f archive --sparse begin sparsefile end || exit 1
29506 echo separator
29507
29508 tar tfv archive
29509 echo separator
29510 mkdir directory
29511 tar Cxf directory archive --warning=no-timestamp
29512 genfile --stat=name,size sparsefile
29513 cmp sparsefile directory/sparsefile
29514 )
29515 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29516 at_status=$? at_failed=false
29517 $at_check_filter
29518 at_fn_diff_devnull "$at_stderr" || at_failed=:
29519 echo stdout:; tee stdout <"$at_stdout"
29520 at_fn_check_status 0 $at_status "$at_srcdir/sparse01.at:24"
29521 $at_failed && at_fn_log_failure
29522 $at_traceon; }
29523
29524
29525
29526
29527
29528 cat >stdout.re <<'_ATEOF'
29529 separator
29530 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
29531 -rw-r--r-- ^ ^ *  *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
29532 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
29533 separator
29534 sparsefile 10344448
29535 _ATEOF
29536
29537 awk '{print NR " " $0}' stdout > $$.1
29538 awk '{print NR " " $0}' stdout.re | join - $$.1 |
29539 while read NUM RE LINE
29540 do
29541   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
29542 done
29543
29544
29545   set +x
29546   $at_times_p && times >"$at_times_file"
29547 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29548 read at_status <"$at_status_file"
29549 #AT_STOP_126
29550 #AT_START_127
29551 at_fn_group_banner 127 'sparse02.at:21' \
29552   "extracting sparse file over a pipe" "             " 19
29553 at_xfail=no
29554       test -f $XFAILFILE && at_xfail=yes
29555 (
29556   $as_echo "127. $at_setup_line: testing $at_desc ..."
29557   $at_traceon
29558
29559
29560
29561 # Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
29562 # References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
29563 # http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
29564
29565
29566
29567   { set +x
29568 $as_echo "$at_srcdir/sparse02.at:28:
29569 mkdir posix
29570 (cd posix
29571 TEST_TAR_FORMAT=posix
29572 export TEST_TAR_FORMAT
29573 TAR_OPTIONS=\"-H posix\"
29574 export TAR_OPTIONS
29575 rm -rf *
29576
29577 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29578 tar -c -f archive --sparse sparsefile || exit 1
29579 echo separator
29580
29581 tar xfO archive | cat - > sparsecopy || exit 1
29582 cmp sparsefile sparsecopy
29583 )"
29584 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
29585 ( $at_check_trace;
29586 mkdir posix
29587 (cd posix
29588 TEST_TAR_FORMAT=posix
29589 export TEST_TAR_FORMAT
29590 TAR_OPTIONS="-H posix"
29591 export TAR_OPTIONS
29592 rm -rf *
29593
29594 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29595 tar -c -f archive --sparse sparsefile || exit 1
29596 echo separator
29597
29598 tar xfO archive | cat - > sparsecopy || exit 1
29599 cmp sparsefile sparsecopy
29600 )
29601 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29602 at_status=$? at_failed=false
29603 $at_check_filter
29604 at_fn_diff_devnull "$at_stderr" || at_failed=:
29605 echo >>"$at_stdout"; $as_echo "separator
29606 " | \
29607   $at_diff - "$at_stdout" || at_failed=:
29608 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
29609 $at_failed && at_fn_log_failure
29610 $at_traceon; }
29611
29612               { set +x
29613 $as_echo "$at_srcdir/sparse02.at:28:
29614 mkdir gnu
29615 (cd gnu
29616 TEST_TAR_FORMAT=gnu
29617 export TEST_TAR_FORMAT
29618 TAR_OPTIONS=\"-H gnu\"
29619 export TAR_OPTIONS
29620 rm -rf *
29621
29622 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29623 tar -c -f archive --sparse sparsefile || exit 1
29624 echo separator
29625
29626 tar xfO archive | cat - > sparsecopy || exit 1
29627 cmp sparsefile sparsecopy
29628 )"
29629 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
29630 ( $at_check_trace;
29631 mkdir gnu
29632 (cd gnu
29633 TEST_TAR_FORMAT=gnu
29634 export TEST_TAR_FORMAT
29635 TAR_OPTIONS="-H gnu"
29636 export TAR_OPTIONS
29637 rm -rf *
29638
29639 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29640 tar -c -f archive --sparse sparsefile || exit 1
29641 echo separator
29642
29643 tar xfO archive | cat - > sparsecopy || exit 1
29644 cmp sparsefile sparsecopy
29645 )
29646 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29647 at_status=$? at_failed=false
29648 $at_check_filter
29649 at_fn_diff_devnull "$at_stderr" || at_failed=:
29650 echo >>"$at_stdout"; $as_echo "separator
29651 " | \
29652   $at_diff - "$at_stdout" || at_failed=:
29653 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
29654 $at_failed && at_fn_log_failure
29655 $at_traceon; }
29656
29657               { set +x
29658 $as_echo "$at_srcdir/sparse02.at:28:
29659 mkdir oldgnu
29660 (cd oldgnu
29661 TEST_TAR_FORMAT=oldgnu
29662 export TEST_TAR_FORMAT
29663 TAR_OPTIONS=\"-H oldgnu\"
29664 export TAR_OPTIONS
29665 rm -rf *
29666
29667 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29668 tar -c -f archive --sparse sparsefile || exit 1
29669 echo separator
29670
29671 tar xfO archive | cat - > sparsecopy || exit 1
29672 cmp sparsefile sparsecopy
29673 )"
29674 at_fn_check_prepare_notrace 'an embedded newline' "sparse02.at:28"
29675 ( $at_check_trace;
29676 mkdir oldgnu
29677 (cd oldgnu
29678 TEST_TAR_FORMAT=oldgnu
29679 export TEST_TAR_FORMAT
29680 TAR_OPTIONS="-H oldgnu"
29681 export TAR_OPTIONS
29682 rm -rf *
29683
29684 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
29685 tar -c -f archive --sparse sparsefile || exit 1
29686 echo separator
29687
29688 tar xfO archive | cat - > sparsecopy || exit 1
29689 cmp sparsefile sparsecopy
29690 )
29691 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29692 at_status=$? at_failed=false
29693 $at_check_filter
29694 at_fn_diff_devnull "$at_stderr" || at_failed=:
29695 echo >>"$at_stdout"; $as_echo "separator
29696 " | \
29697   $at_diff - "$at_stdout" || at_failed=:
29698 at_fn_check_status 0 $at_status "$at_srcdir/sparse02.at:28"
29699 $at_failed && at_fn_log_failure
29700 $at_traceon; }
29701
29702
29703
29704
29705   set +x
29706   $at_times_p && times >"$at_times_file"
29707 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29708 read at_status <"$at_status_file"
29709 #AT_STOP_127
29710 #AT_START_128
29711 at_fn_group_banner 128 'sparse03.at:21' \
29712   "storing sparse files > 8G" "                      " 19
29713 at_xfail=no
29714       test -f $XFAILFILE && at_xfail=yes
29715 (
29716   $as_echo "128. $at_setup_line: testing $at_desc ..."
29717   $at_traceon
29718
29719
29720
29721 # Tar 1.15.1 incorrectly computed sparse member size if the extended
29722 # PAX header contained size keyword.
29723 # References: <87vf46nb36.fsf@penguin.cs.ucla.edu>
29724 # http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
29725
29726
29727
29728   { set +x
29729 $as_echo "$at_srcdir/sparse03.at:29:
29730 mkdir posix
29731 (cd posix
29732 TEST_TAR_FORMAT=posix
29733 export TEST_TAR_FORMAT
29734 TAR_OPTIONS=\"-H posix\"
29735 export TAR_OPTIONS
29736 rm -rf *
29737
29738 genfile --length 1000 --file begin
29739 genfile --length 1000 --file end
29740 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
29741 tar -c -f archive --sparse begin sparsefile end || exit 1
29742 echo separator
29743
29744 tar tfv archive
29745 echo separator
29746 mkdir directory
29747 tar Cxf directory archive
29748 genfile --stat=name,size sparsefile
29749 cmp sparsefile directory/sparsefile
29750 )"
29751 at_fn_check_prepare_notrace 'an embedded newline' "sparse03.at:29"
29752 ( $at_check_trace;
29753 mkdir posix
29754 (cd posix
29755 TEST_TAR_FORMAT=posix
29756 export TEST_TAR_FORMAT
29757 TAR_OPTIONS="-H posix"
29758 export TAR_OPTIONS
29759 rm -rf *
29760
29761 genfile --length 1000 --file begin
29762 genfile --length 1000 --file end
29763 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
29764 tar -c -f archive --sparse begin sparsefile end || exit 1
29765 echo separator
29766
29767 tar tfv archive
29768 echo separator
29769 mkdir directory
29770 tar Cxf directory archive
29771 genfile --stat=name,size sparsefile
29772 cmp sparsefile directory/sparsefile
29773 )
29774 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29775 at_status=$? at_failed=false
29776 $at_check_filter
29777 at_fn_diff_devnull "$at_stderr" || at_failed=:
29778 echo stdout:; tee stdout <"$at_stdout"
29779 at_fn_check_status 0 $at_status "$at_srcdir/sparse03.at:29"
29780 $at_failed && at_fn_log_failure
29781 $at_traceon; }
29782
29783
29784
29785
29786
29787 cat >stdout.re <<'_ATEOF'
29788 separator
29789 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
29790 -rw-r--r-- ^ ^ *  *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
29791 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
29792 separator
29793 sparsefile 8589935104
29794 _ATEOF
29795
29796 awk '{print NR " " $0}' stdout > $$.1
29797 awk '{print NR " " $0}' stdout.re | join - $$.1 |
29798 while read NUM RE LINE
29799 do
29800   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
29801 done
29802
29803
29804   set +x
29805   $at_times_p && times >"$at_times_file"
29806 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29807 read at_status <"$at_status_file"
29808 #AT_STOP_128
29809 #AT_START_129
29810 at_fn_group_banner 129 'sparse04.at:21' \
29811   "storing long sparse file names" "                 " 19
29812 at_xfail=no
29813       test -f $XFAILFILE && at_xfail=yes
29814 (
29815   $as_echo "129. $at_setup_line: testing $at_desc ..."
29816   $at_traceon
29817
29818
29819
29820 # Description: Tar versions from 1.15.92 to 1.25 would incorrectly
29821 # store sparse file names longer than 100 characters in pax mode.
29822 # Namely, the 'path' keyword of the produced PAX header would contain the
29823 # crafted name of the header itself, instead of that of the file.
29824 # Reported by: Kamil Dudka <kdudka@redhat.com>
29825 # References: <201011250026.44908.kdudka@redhat.com>,
29826 #             http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html
29827
29828
29829
29830
29831
29832   { set +x
29833 $as_echo "$at_srcdir/sparse04.at:35:
29834 mkdir pax
29835 (cd pax
29836 TEST_TAR_FORMAT=pax
29837 export TEST_TAR_FORMAT
29838 TAR_OPTIONS=\"-H pax\"
29839 export TAR_OPTIONS
29840 rm -rf *
29841
29842 genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
29843 tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
29844 )"
29845 at_fn_check_prepare_notrace 'an embedded newline' "sparse04.at:35"
29846 ( $at_check_trace;
29847 mkdir pax
29848 (cd pax
29849 TEST_TAR_FORMAT=pax
29850 export TEST_TAR_FORMAT
29851 TAR_OPTIONS="-H pax"
29852 export TAR_OPTIONS
29853 rm -rf *
29854
29855 genfile --sparse --file 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 --block-size 512 8M A || exit 77
29856 tar -f - -c --sparse --posix 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 | tar tf -
29857 )
29858 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
29859 at_status=$? at_failed=false
29860 $at_check_filter
29861 at_fn_diff_devnull "$at_stderr" || at_failed=:
29862 echo >>"$at_stdout"; $as_echo "123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
29863 " | \
29864   $at_diff - "$at_stdout" || at_failed=:
29865 at_fn_check_status 0 $at_status "$at_srcdir/sparse04.at:35"
29866 $at_failed && at_fn_log_failure
29867 $at_traceon; }
29868
29869
29870
29871
29872
29873   set +x
29874   $at_times_p && times >"$at_times_file"
29875 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
29876 read at_status <"$at_status_file"
29877 #AT_STOP_129
29878 #AT_START_130
29879 at_fn_group_banner 130 'sparsemv.at:21' \
29880   "sparse files in MV archives" "                    " 19
29881 at_xfail=no
29882       test -f $XFAILFILE && at_xfail=yes
29883 (
29884   $as_echo "130. $at_setup_line: testing $at_desc ..."
29885   $at_traceon
29886
29887
29888
29889 # Check if sparse files are correctly split between GNU multi-volume
29890 # archives.
29891 # There are two cases: the file can be split within an empty (null) block,
29892 # or within a data block. Since null blocks are not archived, the first
29893 # case means the file is split between two consecutive data blocks.
29894 #
29895
29896
29897
29898   { set +x
29899 $as_echo "$at_srcdir/sparsemv.at:31:
29900 mkdir gnu
29901 (cd gnu
29902 TEST_TAR_FORMAT=gnu
29903 export TEST_TAR_FORMAT
29904 TAR_OPTIONS=\"-H gnu\"
29905 export TAR_OPTIONS
29906 rm -rf *
29907
29908 exec <&-
29909 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29910 echo \"Pass 1: Split between data blocks\"
29911 echo \"Create archive\"
29912 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29913 echo \"Test archive\"
29914 tar --record-size=512 -t -M -f arc.1 -f arc.2
29915 echo \"Compare archive\"
29916 tar --record-size=512 -d -M -f arc.1 -f arc.2
29917
29918 echo \"Pass 2: Split within a data block\"
29919 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29920 echo \"Create archive\"
29921 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29922 echo \"Test archive\"
29923 tar --record-size=512 -t -M -f arc.1 -f arc.2
29924 echo \"Compare archive\"
29925 tar --record-size=512 -d -M -f arc.1 -f arc.2
29926 )"
29927 at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
29928 ( $at_check_trace;
29929 mkdir gnu
29930 (cd gnu
29931 TEST_TAR_FORMAT=gnu
29932 export TEST_TAR_FORMAT
29933 TAR_OPTIONS="-H gnu"
29934 export TAR_OPTIONS
29935 rm -rf *
29936
29937 exec <&-
29938 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29939 echo "Pass 1: Split between data blocks"
29940 echo "Create archive"
29941 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29942 echo "Test archive"
29943 tar --record-size=512 -t -M -f arc.1 -f arc.2
29944 echo "Compare archive"
29945 tar --record-size=512 -d -M -f arc.1 -f arc.2
29946
29947 echo "Pass 2: Split within a data block"
29948 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29949 echo "Create archive"
29950 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29951 echo "Test archive"
29952 tar --record-size=512 -t -M -f arc.1 -f arc.2
29953 echo "Compare archive"
29954 tar --record-size=512 -d -M -f arc.1 -f arc.2
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 "Pass 1: Split between data blocks
29961 Create archive
29962 Test archive
29963 sparsefile
29964 Compare archive
29965 Pass 2: Split within a data block
29966 Create archive
29967 Test archive
29968 sparsefile
29969 Compare archive
29970 " | \
29971   $at_diff - "$at_stdout" || at_failed=:
29972 at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
29973 $at_failed && at_fn_log_failure
29974 $at_traceon; }
29975
29976               { set +x
29977 $as_echo "$at_srcdir/sparsemv.at:31:
29978 mkdir oldgnu
29979 (cd oldgnu
29980 TEST_TAR_FORMAT=oldgnu
29981 export TEST_TAR_FORMAT
29982 TAR_OPTIONS=\"-H oldgnu\"
29983 export TAR_OPTIONS
29984 rm -rf *
29985
29986 exec <&-
29987 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
29988 echo \"Pass 1: Split between data blocks\"
29989 echo \"Create archive\"
29990 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
29991 echo \"Test archive\"
29992 tar --record-size=512 -t -M -f arc.1 -f arc.2
29993 echo \"Compare archive\"
29994 tar --record-size=512 -d -M -f arc.1 -f arc.2
29995
29996 echo \"Pass 2: Split within a data block\"
29997 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
29998 echo \"Create archive\"
29999 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
30000 echo \"Test archive\"
30001 tar --record-size=512 -t -M -f arc.1 -f arc.2
30002 echo \"Compare archive\"
30003 tar --record-size=512 -d -M -f arc.1 -f arc.2
30004 )"
30005 at_fn_check_prepare_notrace 'an embedded newline' "sparsemv.at:31"
30006 ( $at_check_trace;
30007 mkdir oldgnu
30008 (cd oldgnu
30009 TEST_TAR_FORMAT=oldgnu
30010 export TEST_TAR_FORMAT
30011 TAR_OPTIONS="-H oldgnu"
30012 export TAR_OPTIONS
30013 rm -rf *
30014
30015 exec <&-
30016 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
30017 echo "Pass 1: Split between data blocks"
30018 echo "Create archive"
30019 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
30020 echo "Test archive"
30021 tar --record-size=512 -t -M -f arc.1 -f arc.2
30022 echo "Compare archive"
30023 tar --record-size=512 -d -M -f arc.1 -f arc.2
30024
30025 echo "Pass 2: Split within a data block"
30026 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
30027 echo "Create archive"
30028 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
30029 echo "Test archive"
30030 tar --record-size=512 -t -M -f arc.1 -f arc.2
30031 echo "Compare archive"
30032 tar --record-size=512 -d -M -f arc.1 -f arc.2
30033 )
30034 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30035 at_status=$? at_failed=false
30036 $at_check_filter
30037 at_fn_diff_devnull "$at_stderr" || at_failed=:
30038 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
30039 Create archive
30040 Test archive
30041 sparsefile
30042 Compare archive
30043 Pass 2: Split within a data block
30044 Create archive
30045 Test archive
30046 sparsefile
30047 Compare archive
30048 " | \
30049   $at_diff - "$at_stdout" || at_failed=:
30050 at_fn_check_status 0 $at_status "$at_srcdir/sparsemv.at:31"
30051 $at_failed && at_fn_log_failure
30052 $at_traceon; }
30053
30054
30055
30056
30057   set +x
30058   $at_times_p && times >"$at_times_file"
30059 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30060 read at_status <"$at_status_file"
30061 #AT_STOP_130
30062 #AT_START_131
30063 at_fn_group_banner 131 'spmvp00.at:21' \
30064   "sparse files in PAX MV archives, v.0.0" "         " 19
30065 at_xfail=no
30066       test -f $XFAILFILE && at_xfail=yes
30067 (
30068   $as_echo "131. $at_setup_line: testing $at_desc ..."
30069   $at_traceon
30070
30071
30072
30073
30074
30075
30076   { set +x
30077 $as_echo "$at_srcdir/spmvp00.at:24:
30078 mkdir pax
30079 (cd pax
30080 TEST_TAR_FORMAT=pax
30081 export TEST_TAR_FORMAT
30082 TAR_OPTIONS=\"-H pax\"
30083 export TAR_OPTIONS
30084 rm -rf *
30085
30086 exec <&-
30087 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
30088 echo \"Pass 1: Split between data blocks\"
30089 echo \"Create archive\"
30090 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30091 echo \"Test archive\"
30092 tar -t -M -f arc.1 -f arc.2 -f arc.3
30093 echo \"Compare archive\"
30094 tar -d -M -f arc.1 -f arc.2 -f arc.3
30095
30096 echo \"Pass 2: Split within a data block\"
30097 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
30098 echo \"Create archive\"
30099 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30100 echo \"Test archive\"
30101 tar -t -M -f arc.1 -f arc.2 -f arc.3
30102 echo \"Compare archive\"
30103 tar -d -M -f arc.1 -f arc.2 -f arc.3
30104 )"
30105 at_fn_check_prepare_notrace 'an embedded newline' "spmvp00.at:24"
30106 ( $at_check_trace;
30107 mkdir pax
30108 (cd pax
30109 TEST_TAR_FORMAT=pax
30110 export TEST_TAR_FORMAT
30111 TAR_OPTIONS="-H pax"
30112 export TAR_OPTIONS
30113 rm -rf *
30114
30115 exec <&-
30116 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
30117 echo "Pass 1: Split between data blocks"
30118 echo "Create archive"
30119 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30120 echo "Test archive"
30121 tar -t -M -f arc.1 -f arc.2 -f arc.3
30122 echo "Compare archive"
30123 tar -d -M -f arc.1 -f arc.2 -f arc.3
30124
30125 echo "Pass 2: Split within a data block"
30126 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
30127 echo "Create archive"
30128 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30129 echo "Test archive"
30130 tar -t -M -f arc.1 -f arc.2 -f arc.3
30131 echo "Compare archive"
30132 tar -d -M -f arc.1 -f arc.2 -f arc.3
30133 )
30134 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30135 at_status=$? at_failed=false
30136 $at_check_filter
30137 at_fn_diff_devnull "$at_stderr" || at_failed=:
30138 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
30139 Create archive
30140 Test archive
30141 sparsefile
30142 Compare archive
30143 Pass 2: Split within a data block
30144 Create archive
30145 Test archive
30146 sparsefile
30147 Compare archive
30148 " | \
30149   $at_diff - "$at_stdout" || at_failed=:
30150 at_fn_check_status 0 $at_status "$at_srcdir/spmvp00.at:24"
30151 $at_failed && at_fn_log_failure
30152 $at_traceon; }
30153
30154
30155
30156
30157   set +x
30158   $at_times_p && times >"$at_times_file"
30159 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30160 read at_status <"$at_status_file"
30161 #AT_STOP_131
30162 #AT_START_132
30163 at_fn_group_banner 132 'spmvp01.at:21' \
30164   "sparse files in PAX MV archives, v.0.1" "         " 19
30165 at_xfail=no
30166       test -f $XFAILFILE && at_xfail=yes
30167 (
30168   $as_echo "132. $at_setup_line: testing $at_desc ..."
30169   $at_traceon
30170
30171
30172
30173
30174
30175
30176   { set +x
30177 $as_echo "$at_srcdir/spmvp01.at:24:
30178 mkdir pax
30179 (cd pax
30180 TEST_TAR_FORMAT=pax
30181 export TEST_TAR_FORMAT
30182 TAR_OPTIONS=\"-H pax\"
30183 export TAR_OPTIONS
30184 rm -rf *
30185
30186 exec <&-
30187 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
30188 echo \"Pass 1: Split between data blocks\"
30189 echo \"Create archive\"
30190 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30191 echo \"Test archive\"
30192 tar -t -M -f arc.1 -f arc.2 -f arc.3
30193 echo \"Compare archive\"
30194 tar -d -M -f arc.1 -f arc.2 -f arc.3
30195
30196 echo \"Pass 2: Split within a data block\"
30197 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
30198 echo \"Create archive\"
30199 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30200 echo \"Test archive\"
30201 tar -t -M -f arc.1 -f arc.2 -f arc.3
30202 echo \"Compare archive\"
30203 tar -d -M -f arc.1 -f arc.2 -f arc.3
30204 )"
30205 at_fn_check_prepare_notrace 'an embedded newline' "spmvp01.at:24"
30206 ( $at_check_trace;
30207 mkdir pax
30208 (cd pax
30209 TEST_TAR_FORMAT=pax
30210 export TEST_TAR_FORMAT
30211 TAR_OPTIONS="-H pax"
30212 export TAR_OPTIONS
30213 rm -rf *
30214
30215 exec <&-
30216 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
30217 echo "Pass 1: Split between data blocks"
30218 echo "Create archive"
30219 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30220 echo "Test archive"
30221 tar -t -M -f arc.1 -f arc.2 -f arc.3
30222 echo "Compare archive"
30223 tar -d -M -f arc.1 -f arc.2 -f arc.3
30224
30225 echo "Pass 2: Split within a data block"
30226 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
30227 echo "Create archive"
30228 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30229 echo "Test archive"
30230 tar -t -M -f arc.1 -f arc.2 -f arc.3
30231 echo "Compare archive"
30232 tar -d -M -f arc.1 -f arc.2 -f arc.3
30233 )
30234 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30235 at_status=$? at_failed=false
30236 $at_check_filter
30237 at_fn_diff_devnull "$at_stderr" || at_failed=:
30238 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
30239 Create archive
30240 Test archive
30241 sparsefile
30242 Compare archive
30243 Pass 2: Split within a data block
30244 Create archive
30245 Test archive
30246 sparsefile
30247 Compare archive
30248 " | \
30249   $at_diff - "$at_stdout" || at_failed=:
30250 at_fn_check_status 0 $at_status "$at_srcdir/spmvp01.at:24"
30251 $at_failed && at_fn_log_failure
30252 $at_traceon; }
30253
30254
30255
30256
30257   set +x
30258   $at_times_p && times >"$at_times_file"
30259 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30260 read at_status <"$at_status_file"
30261 #AT_STOP_132
30262 #AT_START_133
30263 at_fn_group_banner 133 'spmvp10.at:21' \
30264   "sparse files in PAX MV archives, v.1.0" "         " 19
30265 at_xfail=no
30266       test -f $XFAILFILE && at_xfail=yes
30267 (
30268   $as_echo "133. $at_setup_line: testing $at_desc ..."
30269   $at_traceon
30270
30271
30272
30273
30274
30275
30276   { set +x
30277 $as_echo "$at_srcdir/spmvp10.at:24:
30278 mkdir pax
30279 (cd pax
30280 TEST_TAR_FORMAT=pax
30281 export TEST_TAR_FORMAT
30282 TAR_OPTIONS=\"-H pax\"
30283 export TAR_OPTIONS
30284 rm -rf *
30285
30286 exec <&-
30287 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
30288 echo \"Pass 1: Split between data blocks\"
30289 echo \"Create archive\"
30290 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30291 echo \"Test archive\"
30292 tar -t -M -f arc.1 -f arc.2 -f arc.3
30293 echo \"Compare archive\"
30294 tar -d -M -f arc.1 -f arc.2 -f arc.3
30295
30296 echo \"Pass 2: Split within a data block\"
30297 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
30298 echo \"Create archive\"
30299 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30300 echo \"Test archive\"
30301 tar -t -M -f arc.1 -f arc.2 -f arc.3
30302 echo \"Compare archive\"
30303 tar -d -M -f arc.1 -f arc.2 -f arc.3
30304 )"
30305 at_fn_check_prepare_notrace 'an embedded newline' "spmvp10.at:24"
30306 ( $at_check_trace;
30307 mkdir pax
30308 (cd pax
30309 TEST_TAR_FORMAT=pax
30310 export TEST_TAR_FORMAT
30311 TAR_OPTIONS="-H pax"
30312 export TAR_OPTIONS
30313 rm -rf *
30314
30315 exec <&-
30316 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
30317 echo "Pass 1: Split between data blocks"
30318 echo "Create archive"
30319 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30320 echo "Test archive"
30321 tar -t -M -f arc.1 -f arc.2 -f arc.3
30322 echo "Compare archive"
30323 tar -d -M -f arc.1 -f arc.2 -f arc.3
30324
30325 echo "Pass 2: Split within a data block"
30326 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
30327 echo "Create archive"
30328 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
30329 echo "Test archive"
30330 tar -t -M -f arc.1 -f arc.2 -f arc.3
30331 echo "Compare archive"
30332 tar -d -M -f arc.1 -f arc.2 -f arc.3
30333 )
30334 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30335 at_status=$? at_failed=false
30336 $at_check_filter
30337 at_fn_diff_devnull "$at_stderr" || at_failed=:
30338 echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks
30339 Create archive
30340 Test archive
30341 sparsefile
30342 Compare archive
30343 Pass 2: Split within a data block
30344 Create archive
30345 Test archive
30346 sparsefile
30347 Compare archive
30348 " | \
30349   $at_diff - "$at_stdout" || at_failed=:
30350 at_fn_check_status 0 $at_status "$at_srcdir/spmvp10.at:24"
30351 $at_failed && at_fn_log_failure
30352 $at_traceon; }
30353
30354
30355
30356
30357   set +x
30358   $at_times_p && times >"$at_times_file"
30359 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30360 read at_status <"$at_status_file"
30361 #AT_STOP_133
30362 #AT_START_134
30363 at_fn_group_banner 134 'update.at:28' \
30364   "update unchanged directories" "                   " 20
30365 at_xfail=no
30366       test -f $XFAILFILE && at_xfail=yes
30367 (
30368   $as_echo "134. $at_setup_line: testing $at_desc ..."
30369   $at_traceon
30370
30371
30372
30373
30374
30375   { set +x
30376 $as_echo "$at_srcdir/update.at:31:
30377 mkdir v7
30378 (cd v7
30379 TEST_TAR_FORMAT=v7
30380 export TEST_TAR_FORMAT
30381 TAR_OPTIONS=\"-H v7\"
30382 export TAR_OPTIONS
30383 rm -rf *
30384
30385
30386 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30387
30388 mkdir directory
30389 genfile --length 10240 --pattern zeros --file directory/file1
30390 genfile --length 10240 --pattern default --file directory/file2
30391
30392 tar cf archive directory || exit 1
30393 echo separator
30394 tar uf archive directory || exit 1
30395 echo separator
30396 tar tf archive | sort || exit 1
30397 )"
30398 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
30399 ( $at_check_trace;
30400 mkdir v7
30401 (cd v7
30402 TEST_TAR_FORMAT=v7
30403 export TEST_TAR_FORMAT
30404 TAR_OPTIONS="-H v7"
30405 export TAR_OPTIONS
30406 rm -rf *
30407
30408
30409 test -z "`sort < /dev/null 2>&1`" || exit 77
30410
30411 mkdir directory
30412 genfile --length 10240 --pattern zeros --file directory/file1
30413 genfile --length 10240 --pattern default --file directory/file2
30414
30415 tar cf archive directory || exit 1
30416 echo separator
30417 tar uf archive directory || exit 1
30418 echo separator
30419 tar tf archive | sort || exit 1
30420 )
30421 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30422 at_status=$? at_failed=false
30423 $at_check_filter
30424 at_fn_diff_devnull "$at_stderr" || at_failed=:
30425 echo >>"$at_stdout"; $as_echo "separator
30426 separator
30427 directory/
30428 directory/file1
30429 directory/file2
30430 " | \
30431   $at_diff - "$at_stdout" || at_failed=:
30432 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30433 $at_failed && at_fn_log_failure
30434 $at_traceon; }
30435
30436               { set +x
30437 $as_echo "$at_srcdir/update.at:31:
30438 mkdir oldgnu
30439 (cd oldgnu
30440 TEST_TAR_FORMAT=oldgnu
30441 export TEST_TAR_FORMAT
30442 TAR_OPTIONS=\"-H oldgnu\"
30443 export TAR_OPTIONS
30444 rm -rf *
30445
30446
30447 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30448
30449 mkdir directory
30450 genfile --length 10240 --pattern zeros --file directory/file1
30451 genfile --length 10240 --pattern default --file directory/file2
30452
30453 tar cf archive directory || exit 1
30454 echo separator
30455 tar uf archive directory || exit 1
30456 echo separator
30457 tar tf archive | sort || exit 1
30458 )"
30459 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
30460 ( $at_check_trace;
30461 mkdir oldgnu
30462 (cd oldgnu
30463 TEST_TAR_FORMAT=oldgnu
30464 export TEST_TAR_FORMAT
30465 TAR_OPTIONS="-H oldgnu"
30466 export TAR_OPTIONS
30467 rm -rf *
30468
30469
30470 test -z "`sort < /dev/null 2>&1`" || exit 77
30471
30472 mkdir directory
30473 genfile --length 10240 --pattern zeros --file directory/file1
30474 genfile --length 10240 --pattern default --file directory/file2
30475
30476 tar cf archive directory || exit 1
30477 echo separator
30478 tar uf archive directory || exit 1
30479 echo separator
30480 tar tf archive | sort || exit 1
30481 )
30482 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30483 at_status=$? at_failed=false
30484 $at_check_filter
30485 at_fn_diff_devnull "$at_stderr" || at_failed=:
30486 echo >>"$at_stdout"; $as_echo "separator
30487 separator
30488 directory/
30489 directory/file1
30490 directory/file2
30491 " | \
30492   $at_diff - "$at_stdout" || at_failed=:
30493 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30494 $at_failed && at_fn_log_failure
30495 $at_traceon; }
30496
30497               { set +x
30498 $as_echo "$at_srcdir/update.at:31:
30499 mkdir ustar
30500 (cd ustar
30501 TEST_TAR_FORMAT=ustar
30502 export TEST_TAR_FORMAT
30503 TAR_OPTIONS=\"-H ustar\"
30504 export TAR_OPTIONS
30505 rm -rf *
30506
30507
30508 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30509
30510 mkdir directory
30511 genfile --length 10240 --pattern zeros --file directory/file1
30512 genfile --length 10240 --pattern default --file directory/file2
30513
30514 tar cf archive directory || exit 1
30515 echo separator
30516 tar uf archive directory || exit 1
30517 echo separator
30518 tar tf archive | sort || exit 1
30519 )"
30520 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
30521 ( $at_check_trace;
30522 mkdir ustar
30523 (cd ustar
30524 TEST_TAR_FORMAT=ustar
30525 export TEST_TAR_FORMAT
30526 TAR_OPTIONS="-H ustar"
30527 export TAR_OPTIONS
30528 rm -rf *
30529
30530
30531 test -z "`sort < /dev/null 2>&1`" || exit 77
30532
30533 mkdir directory
30534 genfile --length 10240 --pattern zeros --file directory/file1
30535 genfile --length 10240 --pattern default --file directory/file2
30536
30537 tar cf archive directory || exit 1
30538 echo separator
30539 tar uf archive directory || exit 1
30540 echo separator
30541 tar tf archive | sort || exit 1
30542 )
30543 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30544 at_status=$? at_failed=false
30545 $at_check_filter
30546 at_fn_diff_devnull "$at_stderr" || at_failed=:
30547 echo >>"$at_stdout"; $as_echo "separator
30548 separator
30549 directory/
30550 directory/file1
30551 directory/file2
30552 " | \
30553   $at_diff - "$at_stdout" || at_failed=:
30554 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30555 $at_failed && at_fn_log_failure
30556 $at_traceon; }
30557
30558               { set +x
30559 $as_echo "$at_srcdir/update.at:31:
30560 mkdir posix
30561 (cd posix
30562 TEST_TAR_FORMAT=posix
30563 export TEST_TAR_FORMAT
30564 TAR_OPTIONS=\"-H posix\"
30565 export TAR_OPTIONS
30566 rm -rf *
30567
30568
30569 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30570
30571 mkdir directory
30572 genfile --length 10240 --pattern zeros --file directory/file1
30573 genfile --length 10240 --pattern default --file directory/file2
30574
30575 tar cf archive directory || exit 1
30576 echo separator
30577 tar uf archive directory || exit 1
30578 echo separator
30579 tar tf archive | sort || exit 1
30580 )"
30581 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
30582 ( $at_check_trace;
30583 mkdir posix
30584 (cd posix
30585 TEST_TAR_FORMAT=posix
30586 export TEST_TAR_FORMAT
30587 TAR_OPTIONS="-H posix"
30588 export TAR_OPTIONS
30589 rm -rf *
30590
30591
30592 test -z "`sort < /dev/null 2>&1`" || exit 77
30593
30594 mkdir directory
30595 genfile --length 10240 --pattern zeros --file directory/file1
30596 genfile --length 10240 --pattern default --file directory/file2
30597
30598 tar cf archive directory || exit 1
30599 echo separator
30600 tar uf archive directory || exit 1
30601 echo separator
30602 tar tf archive | sort || exit 1
30603 )
30604 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30605 at_status=$? at_failed=false
30606 $at_check_filter
30607 at_fn_diff_devnull "$at_stderr" || at_failed=:
30608 echo >>"$at_stdout"; $as_echo "separator
30609 separator
30610 directory/
30611 directory/file1
30612 directory/file2
30613 " | \
30614   $at_diff - "$at_stdout" || at_failed=:
30615 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30616 $at_failed && at_fn_log_failure
30617 $at_traceon; }
30618
30619               { set +x
30620 $as_echo "$at_srcdir/update.at:31:
30621 mkdir gnu
30622 (cd gnu
30623 TEST_TAR_FORMAT=gnu
30624 export TEST_TAR_FORMAT
30625 TAR_OPTIONS=\"-H gnu\"
30626 export TAR_OPTIONS
30627 rm -rf *
30628
30629
30630 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30631
30632 mkdir directory
30633 genfile --length 10240 --pattern zeros --file directory/file1
30634 genfile --length 10240 --pattern default --file directory/file2
30635
30636 tar cf archive directory || exit 1
30637 echo separator
30638 tar uf archive directory || exit 1
30639 echo separator
30640 tar tf archive | sort || exit 1
30641 )"
30642 at_fn_check_prepare_notrace 'a `...` command substitution' "update.at:31"
30643 ( $at_check_trace;
30644 mkdir gnu
30645 (cd gnu
30646 TEST_TAR_FORMAT=gnu
30647 export TEST_TAR_FORMAT
30648 TAR_OPTIONS="-H gnu"
30649 export TAR_OPTIONS
30650 rm -rf *
30651
30652
30653 test -z "`sort < /dev/null 2>&1`" || exit 77
30654
30655 mkdir directory
30656 genfile --length 10240 --pattern zeros --file directory/file1
30657 genfile --length 10240 --pattern default --file directory/file2
30658
30659 tar cf archive directory || exit 1
30660 echo separator
30661 tar uf archive directory || exit 1
30662 echo separator
30663 tar tf archive | sort || exit 1
30664 )
30665 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30666 at_status=$? at_failed=false
30667 $at_check_filter
30668 at_fn_diff_devnull "$at_stderr" || at_failed=:
30669 echo >>"$at_stdout"; $as_echo "separator
30670 separator
30671 directory/
30672 directory/file1
30673 directory/file2
30674 " | \
30675   $at_diff - "$at_stdout" || at_failed=:
30676 at_fn_check_status 0 $at_status "$at_srcdir/update.at:31"
30677 $at_failed && at_fn_log_failure
30678 $at_traceon; }
30679
30680
30681
30682
30683   set +x
30684   $at_times_p && times >"$at_times_file"
30685 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
30686 read at_status <"$at_status_file"
30687 #AT_STOP_134
30688 #AT_START_135
30689 at_fn_group_banner 135 'update01.at:29' \
30690   "update directories" "                             " 20
30691 at_xfail=no
30692       test -f $XFAILFILE && at_xfail=yes
30693 (
30694   $as_echo "135. $at_setup_line: testing $at_desc ..."
30695   $at_traceon
30696
30697
30698
30699
30700
30701   { set +x
30702 $as_echo "$at_srcdir/update01.at:32:
30703 mkdir v7
30704 (cd v7
30705 TEST_TAR_FORMAT=v7
30706 export TEST_TAR_FORMAT
30707 TAR_OPTIONS=\"-H v7\"
30708 export TAR_OPTIONS
30709 rm -rf *
30710
30711
30712 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30713
30714 mkdir a
30715 genfile --file a/b
30716
30717 tar cf arc a
30718
30719 echo \"separator\"
30720
30721 sleep 2
30722 genfile --file a/c
30723
30724 tar ufv arc a
30725 echo \"separator\"
30726 tar tf arc | sort || exit 1
30727 )"
30728 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30729 ( $at_check_trace;
30730 mkdir v7
30731 (cd v7
30732 TEST_TAR_FORMAT=v7
30733 export TEST_TAR_FORMAT
30734 TAR_OPTIONS="-H v7"
30735 export TAR_OPTIONS
30736 rm -rf *
30737
30738
30739 test -z "`sort < /dev/null 2>&1`" || exit 77
30740
30741 mkdir a
30742 genfile --file a/b
30743
30744 tar cf arc a
30745
30746 echo "separator"
30747
30748 sleep 2
30749 genfile --file a/c
30750
30751 tar ufv arc a
30752 echo "separator"
30753 tar tf arc | sort || exit 1
30754 )
30755 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30756 at_status=$? at_failed=false
30757 $at_check_filter
30758 at_fn_diff_devnull "$at_stderr" || at_failed=:
30759 echo >>"$at_stdout"; $as_echo "separator
30760 a/c
30761 separator
30762 a/
30763 a/b
30764 a/c
30765 " | \
30766   $at_diff - "$at_stdout" || at_failed=:
30767 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30768 $at_failed && at_fn_log_failure
30769 $at_traceon; }
30770
30771               { set +x
30772 $as_echo "$at_srcdir/update01.at:32:
30773 mkdir oldgnu
30774 (cd oldgnu
30775 TEST_TAR_FORMAT=oldgnu
30776 export TEST_TAR_FORMAT
30777 TAR_OPTIONS=\"-H oldgnu\"
30778 export TAR_OPTIONS
30779 rm -rf *
30780
30781
30782 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30783
30784 mkdir a
30785 genfile --file a/b
30786
30787 tar cf arc a
30788
30789 echo \"separator\"
30790
30791 sleep 2
30792 genfile --file a/c
30793
30794 tar ufv arc a
30795 echo \"separator\"
30796 tar tf arc | sort || exit 1
30797 )"
30798 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30799 ( $at_check_trace;
30800 mkdir oldgnu
30801 (cd oldgnu
30802 TEST_TAR_FORMAT=oldgnu
30803 export TEST_TAR_FORMAT
30804 TAR_OPTIONS="-H oldgnu"
30805 export TAR_OPTIONS
30806 rm -rf *
30807
30808
30809 test -z "`sort < /dev/null 2>&1`" || exit 77
30810
30811 mkdir a
30812 genfile --file a/b
30813
30814 tar cf arc a
30815
30816 echo "separator"
30817
30818 sleep 2
30819 genfile --file a/c
30820
30821 tar ufv arc a
30822 echo "separator"
30823 tar tf arc | sort || exit 1
30824 )
30825 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30826 at_status=$? at_failed=false
30827 $at_check_filter
30828 at_fn_diff_devnull "$at_stderr" || at_failed=:
30829 echo >>"$at_stdout"; $as_echo "separator
30830 a/c
30831 separator
30832 a/
30833 a/b
30834 a/c
30835 " | \
30836   $at_diff - "$at_stdout" || at_failed=:
30837 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30838 $at_failed && at_fn_log_failure
30839 $at_traceon; }
30840
30841               { set +x
30842 $as_echo "$at_srcdir/update01.at:32:
30843 mkdir ustar
30844 (cd ustar
30845 TEST_TAR_FORMAT=ustar
30846 export TEST_TAR_FORMAT
30847 TAR_OPTIONS=\"-H ustar\"
30848 export TAR_OPTIONS
30849 rm -rf *
30850
30851
30852 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30853
30854 mkdir a
30855 genfile --file a/b
30856
30857 tar cf arc a
30858
30859 echo \"separator\"
30860
30861 sleep 2
30862 genfile --file a/c
30863
30864 tar ufv arc a
30865 echo \"separator\"
30866 tar tf arc | sort || exit 1
30867 )"
30868 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30869 ( $at_check_trace;
30870 mkdir ustar
30871 (cd ustar
30872 TEST_TAR_FORMAT=ustar
30873 export TEST_TAR_FORMAT
30874 TAR_OPTIONS="-H ustar"
30875 export TAR_OPTIONS
30876 rm -rf *
30877
30878
30879 test -z "`sort < /dev/null 2>&1`" || exit 77
30880
30881 mkdir a
30882 genfile --file a/b
30883
30884 tar cf arc a
30885
30886 echo "separator"
30887
30888 sleep 2
30889 genfile --file a/c
30890
30891 tar ufv arc a
30892 echo "separator"
30893 tar tf arc | sort || exit 1
30894 )
30895 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30896 at_status=$? at_failed=false
30897 $at_check_filter
30898 at_fn_diff_devnull "$at_stderr" || at_failed=:
30899 echo >>"$at_stdout"; $as_echo "separator
30900 a/c
30901 separator
30902 a/
30903 a/b
30904 a/c
30905 " | \
30906   $at_diff - "$at_stdout" || at_failed=:
30907 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30908 $at_failed && at_fn_log_failure
30909 $at_traceon; }
30910
30911               { set +x
30912 $as_echo "$at_srcdir/update01.at:32:
30913 mkdir posix
30914 (cd posix
30915 TEST_TAR_FORMAT=posix
30916 export TEST_TAR_FORMAT
30917 TAR_OPTIONS=\"-H posix\"
30918 export TAR_OPTIONS
30919 rm -rf *
30920
30921
30922 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30923
30924 mkdir a
30925 genfile --file a/b
30926
30927 tar cf arc a
30928
30929 echo \"separator\"
30930
30931 sleep 2
30932 genfile --file a/c
30933
30934 tar ufv arc a
30935 echo \"separator\"
30936 tar tf arc | sort || exit 1
30937 )"
30938 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
30939 ( $at_check_trace;
30940 mkdir posix
30941 (cd posix
30942 TEST_TAR_FORMAT=posix
30943 export TEST_TAR_FORMAT
30944 TAR_OPTIONS="-H posix"
30945 export TAR_OPTIONS
30946 rm -rf *
30947
30948
30949 test -z "`sort < /dev/null 2>&1`" || exit 77
30950
30951 mkdir a
30952 genfile --file a/b
30953
30954 tar cf arc a
30955
30956 echo "separator"
30957
30958 sleep 2
30959 genfile --file a/c
30960
30961 tar ufv arc a
30962 echo "separator"
30963 tar tf arc | sort || exit 1
30964 )
30965 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
30966 at_status=$? at_failed=false
30967 $at_check_filter
30968 at_fn_diff_devnull "$at_stderr" || at_failed=:
30969 echo >>"$at_stdout"; $as_echo "separator
30970 a/c
30971 separator
30972 a/
30973 a/b
30974 a/c
30975 " | \
30976   $at_diff - "$at_stdout" || at_failed=:
30977 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
30978 $at_failed && at_fn_log_failure
30979 $at_traceon; }
30980
30981               { set +x
30982 $as_echo "$at_srcdir/update01.at:32:
30983 mkdir gnu
30984 (cd gnu
30985 TEST_TAR_FORMAT=gnu
30986 export TEST_TAR_FORMAT
30987 TAR_OPTIONS=\"-H gnu\"
30988 export TAR_OPTIONS
30989 rm -rf *
30990
30991
30992 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
30993
30994 mkdir a
30995 genfile --file a/b
30996
30997 tar cf arc a
30998
30999 echo \"separator\"
31000
31001 sleep 2
31002 genfile --file a/c
31003
31004 tar ufv arc a
31005 echo \"separator\"
31006 tar tf arc | sort || exit 1
31007 )"
31008 at_fn_check_prepare_notrace 'a `...` command substitution' "update01.at:32"
31009 ( $at_check_trace;
31010 mkdir gnu
31011 (cd gnu
31012 TEST_TAR_FORMAT=gnu
31013 export TEST_TAR_FORMAT
31014 TAR_OPTIONS="-H gnu"
31015 export TAR_OPTIONS
31016 rm -rf *
31017
31018
31019 test -z "`sort < /dev/null 2>&1`" || exit 77
31020
31021 mkdir a
31022 genfile --file a/b
31023
31024 tar cf arc a
31025
31026 echo "separator"
31027
31028 sleep 2
31029 genfile --file a/c
31030
31031 tar ufv arc a
31032 echo "separator"
31033 tar tf arc | sort || exit 1
31034 )
31035 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31036 at_status=$? at_failed=false
31037 $at_check_filter
31038 at_fn_diff_devnull "$at_stderr" || at_failed=:
31039 echo >>"$at_stdout"; $as_echo "separator
31040 a/c
31041 separator
31042 a/
31043 a/b
31044 a/c
31045 " | \
31046   $at_diff - "$at_stdout" || at_failed=:
31047 at_fn_check_status 0 $at_status "$at_srcdir/update01.at:32"
31048 $at_failed && at_fn_log_failure
31049 $at_traceon; }
31050
31051
31052
31053
31054   set +x
31055   $at_times_p && times >"$at_times_file"
31056 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31057 read at_status <"$at_status_file"
31058 #AT_STOP_135
31059 #AT_START_136
31060 at_fn_group_banner 136 'update02.at:26' \
31061   "update changed files" "                           " 20
31062 at_xfail=no
31063       test -f $XFAILFILE && at_xfail=yes
31064 (
31065   $as_echo "136. $at_setup_line: testing $at_desc ..."
31066   $at_traceon
31067
31068
31069
31070
31071
31072   { set +x
31073 $as_echo "$at_srcdir/update02.at:29:
31074 mkdir v7
31075 (cd v7
31076 TEST_TAR_FORMAT=v7
31077 export TEST_TAR_FORMAT
31078 TAR_OPTIONS=\"-H v7\"
31079 export TAR_OPTIONS
31080 rm -rf *
31081
31082
31083 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31084
31085 mkdir a
31086 genfile --file a/b
31087
31088 tar cf arc a
31089
31090 echo \"separator\"
31091
31092 sleep 2
31093 touch a/b
31094
31095 tar ufv arc a
31096 echo \"separator\"
31097 tar tf arc | sort || exit 1
31098 )"
31099 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
31100 ( $at_check_trace;
31101 mkdir v7
31102 (cd v7
31103 TEST_TAR_FORMAT=v7
31104 export TEST_TAR_FORMAT
31105 TAR_OPTIONS="-H v7"
31106 export TAR_OPTIONS
31107 rm -rf *
31108
31109
31110 test -z "`sort < /dev/null 2>&1`" || exit 77
31111
31112 mkdir a
31113 genfile --file a/b
31114
31115 tar cf arc a
31116
31117 echo "separator"
31118
31119 sleep 2
31120 touch a/b
31121
31122 tar ufv arc a
31123 echo "separator"
31124 tar tf arc | sort || exit 1
31125 )
31126 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31127 at_status=$? at_failed=false
31128 $at_check_filter
31129 at_fn_diff_devnull "$at_stderr" || at_failed=:
31130 echo >>"$at_stdout"; $as_echo "separator
31131 a/b
31132 separator
31133 a/
31134 a/b
31135 a/b
31136 " | \
31137   $at_diff - "$at_stdout" || at_failed=:
31138 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
31139 $at_failed && at_fn_log_failure
31140 $at_traceon; }
31141
31142               { set +x
31143 $as_echo "$at_srcdir/update02.at:29:
31144 mkdir oldgnu
31145 (cd oldgnu
31146 TEST_TAR_FORMAT=oldgnu
31147 export TEST_TAR_FORMAT
31148 TAR_OPTIONS=\"-H oldgnu\"
31149 export TAR_OPTIONS
31150 rm -rf *
31151
31152
31153 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31154
31155 mkdir a
31156 genfile --file a/b
31157
31158 tar cf arc a
31159
31160 echo \"separator\"
31161
31162 sleep 2
31163 touch a/b
31164
31165 tar ufv arc a
31166 echo \"separator\"
31167 tar tf arc | sort || exit 1
31168 )"
31169 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
31170 ( $at_check_trace;
31171 mkdir oldgnu
31172 (cd oldgnu
31173 TEST_TAR_FORMAT=oldgnu
31174 export TEST_TAR_FORMAT
31175 TAR_OPTIONS="-H oldgnu"
31176 export TAR_OPTIONS
31177 rm -rf *
31178
31179
31180 test -z "`sort < /dev/null 2>&1`" || exit 77
31181
31182 mkdir a
31183 genfile --file a/b
31184
31185 tar cf arc a
31186
31187 echo "separator"
31188
31189 sleep 2
31190 touch a/b
31191
31192 tar ufv arc a
31193 echo "separator"
31194 tar tf arc | sort || exit 1
31195 )
31196 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31197 at_status=$? at_failed=false
31198 $at_check_filter
31199 at_fn_diff_devnull "$at_stderr" || at_failed=:
31200 echo >>"$at_stdout"; $as_echo "separator
31201 a/b
31202 separator
31203 a/
31204 a/b
31205 a/b
31206 " | \
31207   $at_diff - "$at_stdout" || at_failed=:
31208 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
31209 $at_failed && at_fn_log_failure
31210 $at_traceon; }
31211
31212               { set +x
31213 $as_echo "$at_srcdir/update02.at:29:
31214 mkdir ustar
31215 (cd ustar
31216 TEST_TAR_FORMAT=ustar
31217 export TEST_TAR_FORMAT
31218 TAR_OPTIONS=\"-H ustar\"
31219 export TAR_OPTIONS
31220 rm -rf *
31221
31222
31223 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31224
31225 mkdir a
31226 genfile --file a/b
31227
31228 tar cf arc a
31229
31230 echo \"separator\"
31231
31232 sleep 2
31233 touch a/b
31234
31235 tar ufv arc a
31236 echo \"separator\"
31237 tar tf arc | sort || exit 1
31238 )"
31239 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
31240 ( $at_check_trace;
31241 mkdir ustar
31242 (cd ustar
31243 TEST_TAR_FORMAT=ustar
31244 export TEST_TAR_FORMAT
31245 TAR_OPTIONS="-H ustar"
31246 export TAR_OPTIONS
31247 rm -rf *
31248
31249
31250 test -z "`sort < /dev/null 2>&1`" || exit 77
31251
31252 mkdir a
31253 genfile --file a/b
31254
31255 tar cf arc a
31256
31257 echo "separator"
31258
31259 sleep 2
31260 touch a/b
31261
31262 tar ufv arc a
31263 echo "separator"
31264 tar tf arc | sort || exit 1
31265 )
31266 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31267 at_status=$? at_failed=false
31268 $at_check_filter
31269 at_fn_diff_devnull "$at_stderr" || at_failed=:
31270 echo >>"$at_stdout"; $as_echo "separator
31271 a/b
31272 separator
31273 a/
31274 a/b
31275 a/b
31276 " | \
31277   $at_diff - "$at_stdout" || at_failed=:
31278 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
31279 $at_failed && at_fn_log_failure
31280 $at_traceon; }
31281
31282               { set +x
31283 $as_echo "$at_srcdir/update02.at:29:
31284 mkdir posix
31285 (cd posix
31286 TEST_TAR_FORMAT=posix
31287 export TEST_TAR_FORMAT
31288 TAR_OPTIONS=\"-H posix\"
31289 export TAR_OPTIONS
31290 rm -rf *
31291
31292
31293 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31294
31295 mkdir a
31296 genfile --file a/b
31297
31298 tar cf arc a
31299
31300 echo \"separator\"
31301
31302 sleep 2
31303 touch a/b
31304
31305 tar ufv arc a
31306 echo \"separator\"
31307 tar tf arc | sort || exit 1
31308 )"
31309 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
31310 ( $at_check_trace;
31311 mkdir posix
31312 (cd posix
31313 TEST_TAR_FORMAT=posix
31314 export TEST_TAR_FORMAT
31315 TAR_OPTIONS="-H posix"
31316 export TAR_OPTIONS
31317 rm -rf *
31318
31319
31320 test -z "`sort < /dev/null 2>&1`" || exit 77
31321
31322 mkdir a
31323 genfile --file a/b
31324
31325 tar cf arc a
31326
31327 echo "separator"
31328
31329 sleep 2
31330 touch a/b
31331
31332 tar ufv arc a
31333 echo "separator"
31334 tar tf arc | sort || exit 1
31335 )
31336 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31337 at_status=$? at_failed=false
31338 $at_check_filter
31339 at_fn_diff_devnull "$at_stderr" || at_failed=:
31340 echo >>"$at_stdout"; $as_echo "separator
31341 a/b
31342 separator
31343 a/
31344 a/b
31345 a/b
31346 " | \
31347   $at_diff - "$at_stdout" || at_failed=:
31348 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
31349 $at_failed && at_fn_log_failure
31350 $at_traceon; }
31351
31352               { set +x
31353 $as_echo "$at_srcdir/update02.at:29:
31354 mkdir gnu
31355 (cd gnu
31356 TEST_TAR_FORMAT=gnu
31357 export TEST_TAR_FORMAT
31358 TAR_OPTIONS=\"-H gnu\"
31359 export TAR_OPTIONS
31360 rm -rf *
31361
31362
31363 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31364
31365 mkdir a
31366 genfile --file a/b
31367
31368 tar cf arc a
31369
31370 echo \"separator\"
31371
31372 sleep 2
31373 touch a/b
31374
31375 tar ufv arc a
31376 echo \"separator\"
31377 tar tf arc | sort || exit 1
31378 )"
31379 at_fn_check_prepare_notrace 'a `...` command substitution' "update02.at:29"
31380 ( $at_check_trace;
31381 mkdir gnu
31382 (cd gnu
31383 TEST_TAR_FORMAT=gnu
31384 export TEST_TAR_FORMAT
31385 TAR_OPTIONS="-H gnu"
31386 export TAR_OPTIONS
31387 rm -rf *
31388
31389
31390 test -z "`sort < /dev/null 2>&1`" || exit 77
31391
31392 mkdir a
31393 genfile --file a/b
31394
31395 tar cf arc a
31396
31397 echo "separator"
31398
31399 sleep 2
31400 touch a/b
31401
31402 tar ufv arc a
31403 echo "separator"
31404 tar tf arc | sort || exit 1
31405 )
31406 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31407 at_status=$? at_failed=false
31408 $at_check_filter
31409 at_fn_diff_devnull "$at_stderr" || at_failed=:
31410 echo >>"$at_stdout"; $as_echo "separator
31411 a/b
31412 separator
31413 a/
31414 a/b
31415 a/b
31416 " | \
31417   $at_diff - "$at_stdout" || at_failed=:
31418 at_fn_check_status 0 $at_status "$at_srcdir/update02.at:29"
31419 $at_failed && at_fn_log_failure
31420 $at_traceon; }
31421
31422
31423
31424
31425   set +x
31426   $at_times_p && times >"$at_times_file"
31427 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31428 read at_status <"$at_status_file"
31429 #AT_STOP_136
31430 #AT_START_137
31431 at_fn_group_banner 137 'verify.at:25' \
31432   "verify" "                                         " 21
31433 at_xfail=no
31434       test -f $XFAILFILE && at_xfail=yes
31435 (
31436   $as_echo "137. $at_setup_line: testing $at_desc ..."
31437   $at_traceon
31438
31439
31440
31441
31442
31443   { set +x
31444 $as_echo "$at_srcdir/verify.at:28:
31445 mkdir v7
31446 (cd v7
31447 TEST_TAR_FORMAT=v7
31448 export TEST_TAR_FORMAT
31449 TAR_OPTIONS=\"-H v7\"
31450 export TAR_OPTIONS
31451 rm -rf *
31452
31453 touch foo
31454 tar -cvf archive.tar --verify foo
31455 )"
31456 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31457 ( $at_check_trace;
31458 mkdir v7
31459 (cd v7
31460 TEST_TAR_FORMAT=v7
31461 export TEST_TAR_FORMAT
31462 TAR_OPTIONS="-H v7"
31463 export TAR_OPTIONS
31464 rm -rf *
31465
31466 touch foo
31467 tar -cvf archive.tar --verify foo
31468 )
31469 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31470 at_status=$? at_failed=false
31471 $at_check_filter
31472 at_fn_diff_devnull "$at_stderr" || at_failed=:
31473 echo >>"$at_stdout"; $as_echo "foo
31474 Verify foo
31475 " | \
31476   $at_diff - "$at_stdout" || at_failed=:
31477 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31478 $at_failed && at_fn_log_failure
31479 $at_traceon; }
31480
31481               { set +x
31482 $as_echo "$at_srcdir/verify.at:28:
31483 mkdir oldgnu
31484 (cd oldgnu
31485 TEST_TAR_FORMAT=oldgnu
31486 export TEST_TAR_FORMAT
31487 TAR_OPTIONS=\"-H oldgnu\"
31488 export TAR_OPTIONS
31489 rm -rf *
31490
31491 touch foo
31492 tar -cvf archive.tar --verify foo
31493 )"
31494 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31495 ( $at_check_trace;
31496 mkdir oldgnu
31497 (cd oldgnu
31498 TEST_TAR_FORMAT=oldgnu
31499 export TEST_TAR_FORMAT
31500 TAR_OPTIONS="-H oldgnu"
31501 export TAR_OPTIONS
31502 rm -rf *
31503
31504 touch foo
31505 tar -cvf archive.tar --verify foo
31506 )
31507 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31508 at_status=$? at_failed=false
31509 $at_check_filter
31510 at_fn_diff_devnull "$at_stderr" || at_failed=:
31511 echo >>"$at_stdout"; $as_echo "foo
31512 Verify foo
31513 " | \
31514   $at_diff - "$at_stdout" || at_failed=:
31515 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31516 $at_failed && at_fn_log_failure
31517 $at_traceon; }
31518
31519               { set +x
31520 $as_echo "$at_srcdir/verify.at:28:
31521 mkdir ustar
31522 (cd ustar
31523 TEST_TAR_FORMAT=ustar
31524 export TEST_TAR_FORMAT
31525 TAR_OPTIONS=\"-H ustar\"
31526 export TAR_OPTIONS
31527 rm -rf *
31528
31529 touch foo
31530 tar -cvf archive.tar --verify foo
31531 )"
31532 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31533 ( $at_check_trace;
31534 mkdir ustar
31535 (cd ustar
31536 TEST_TAR_FORMAT=ustar
31537 export TEST_TAR_FORMAT
31538 TAR_OPTIONS="-H ustar"
31539 export TAR_OPTIONS
31540 rm -rf *
31541
31542 touch foo
31543 tar -cvf archive.tar --verify foo
31544 )
31545 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31546 at_status=$? at_failed=false
31547 $at_check_filter
31548 at_fn_diff_devnull "$at_stderr" || at_failed=:
31549 echo >>"$at_stdout"; $as_echo "foo
31550 Verify foo
31551 " | \
31552   $at_diff - "$at_stdout" || at_failed=:
31553 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31554 $at_failed && at_fn_log_failure
31555 $at_traceon; }
31556
31557               { set +x
31558 $as_echo "$at_srcdir/verify.at:28:
31559 mkdir posix
31560 (cd posix
31561 TEST_TAR_FORMAT=posix
31562 export TEST_TAR_FORMAT
31563 TAR_OPTIONS=\"-H posix\"
31564 export TAR_OPTIONS
31565 rm -rf *
31566
31567 touch foo
31568 tar -cvf archive.tar --verify foo
31569 )"
31570 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31571 ( $at_check_trace;
31572 mkdir posix
31573 (cd posix
31574 TEST_TAR_FORMAT=posix
31575 export TEST_TAR_FORMAT
31576 TAR_OPTIONS="-H posix"
31577 export TAR_OPTIONS
31578 rm -rf *
31579
31580 touch foo
31581 tar -cvf archive.tar --verify foo
31582 )
31583 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31584 at_status=$? at_failed=false
31585 $at_check_filter
31586 at_fn_diff_devnull "$at_stderr" || at_failed=:
31587 echo >>"$at_stdout"; $as_echo "foo
31588 Verify foo
31589 " | \
31590   $at_diff - "$at_stdout" || at_failed=:
31591 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31592 $at_failed && at_fn_log_failure
31593 $at_traceon; }
31594
31595               { set +x
31596 $as_echo "$at_srcdir/verify.at:28:
31597 mkdir gnu
31598 (cd gnu
31599 TEST_TAR_FORMAT=gnu
31600 export TEST_TAR_FORMAT
31601 TAR_OPTIONS=\"-H gnu\"
31602 export TAR_OPTIONS
31603 rm -rf *
31604
31605 touch foo
31606 tar -cvf archive.tar --verify foo
31607 )"
31608 at_fn_check_prepare_notrace 'an embedded newline' "verify.at:28"
31609 ( $at_check_trace;
31610 mkdir gnu
31611 (cd gnu
31612 TEST_TAR_FORMAT=gnu
31613 export TEST_TAR_FORMAT
31614 TAR_OPTIONS="-H gnu"
31615 export TAR_OPTIONS
31616 rm -rf *
31617
31618 touch foo
31619 tar -cvf archive.tar --verify foo
31620 )
31621 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31622 at_status=$? at_failed=false
31623 $at_check_filter
31624 at_fn_diff_devnull "$at_stderr" || at_failed=:
31625 echo >>"$at_stdout"; $as_echo "foo
31626 Verify foo
31627 " | \
31628   $at_diff - "$at_stdout" || at_failed=:
31629 at_fn_check_status 0 $at_status "$at_srcdir/verify.at:28"
31630 $at_failed && at_fn_log_failure
31631 $at_traceon; }
31632
31633
31634
31635
31636   set +x
31637   $at_times_p && times >"$at_times_file"
31638 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31639 read at_status <"$at_status_file"
31640 #AT_STOP_137
31641 #AT_START_138
31642 at_fn_group_banner 138 'volume.at:23' \
31643   "volume" "                                         " 22
31644 at_xfail=no
31645       test -f $XFAILFILE && at_xfail=yes
31646 (
31647   $as_echo "138. $at_setup_line: testing $at_desc ..."
31648   $at_traceon
31649
31650
31651
31652
31653
31654   { set +x
31655 $as_echo "$at_srcdir/volume.at:26:
31656 mkdir gnu
31657 (cd gnu
31658 TEST_TAR_FORMAT=gnu
31659 export TEST_TAR_FORMAT
31660 TAR_OPTIONS=\"-H gnu\"
31661 export TAR_OPTIONS
31662 rm -rf *
31663
31664 tar -cf archive -V label -T /dev/null || exit 1
31665
31666 tar xfV archive label || exit 1
31667 tar xfV archive 'la?el' || exit 1
31668 tar xfV archive 'l*l' || exit 1
31669
31670 echo 1>&2 -----
31671 tar xfV archive lab
31672 test \$? = 2 || exit 1
31673 echo 1>&2 -----
31674 tar xfV archive bel
31675 test \$? = 2 || exit 1
31676 echo 1>&2 -----
31677 tar xfV archive babel
31678 test \$? = 2
31679 )"
31680 at_fn_check_prepare_notrace 'an embedded newline' "volume.at:26"
31681 ( $at_check_trace;
31682 mkdir gnu
31683 (cd gnu
31684 TEST_TAR_FORMAT=gnu
31685 export TEST_TAR_FORMAT
31686 TAR_OPTIONS="-H gnu"
31687 export TAR_OPTIONS
31688 rm -rf *
31689
31690 tar -cf archive -V label -T /dev/null || exit 1
31691
31692 tar xfV archive label || exit 1
31693 tar xfV archive 'la?el' || exit 1
31694 tar xfV archive 'l*l' || exit 1
31695
31696 echo 1>&2 -----
31697 tar xfV archive lab
31698 test $? = 2 || exit 1
31699 echo 1>&2 -----
31700 tar xfV archive bel
31701 test $? = 2 || exit 1
31702 echo 1>&2 -----
31703 tar xfV archive babel
31704 test $? = 2
31705 )
31706 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31707 at_status=$? at_failed=false
31708 $at_check_filter
31709 echo >>"$at_stderr"; $as_echo "-----
31710 tar: Volume 'label' does not match 'lab'
31711 tar: Error is not recoverable: exiting now
31712 -----
31713 tar: Volume 'label' does not match 'bel'
31714 tar: Error is not recoverable: exiting now
31715 -----
31716 tar: Volume 'label' does not match 'babel'
31717 tar: Error is not recoverable: exiting now
31718 " | \
31719   $at_diff - "$at_stderr" || at_failed=:
31720 at_fn_diff_devnull "$at_stdout" || at_failed=:
31721 at_fn_check_status 0 $at_status "$at_srcdir/volume.at:26"
31722 $at_failed && at_fn_log_failure
31723 $at_traceon; }
31724
31725               { set +x
31726 $as_echo "$at_srcdir/volume.at:26:
31727 mkdir oldgnu
31728 (cd oldgnu
31729 TEST_TAR_FORMAT=oldgnu
31730 export TEST_TAR_FORMAT
31731 TAR_OPTIONS=\"-H oldgnu\"
31732 export TAR_OPTIONS
31733 rm -rf *
31734
31735 tar -cf archive -V label -T /dev/null || exit 1
31736
31737 tar xfV archive label || exit 1
31738 tar xfV archive 'la?el' || exit 1
31739 tar xfV archive 'l*l' || exit 1
31740
31741 echo 1>&2 -----
31742 tar xfV archive lab
31743 test \$? = 2 || exit 1
31744 echo 1>&2 -----
31745 tar xfV archive bel
31746 test \$? = 2 || exit 1
31747 echo 1>&2 -----
31748 tar xfV archive babel
31749 test \$? = 2
31750 )"
31751 at_fn_check_prepare_notrace 'an embedded newline' "volume.at:26"
31752 ( $at_check_trace;
31753 mkdir oldgnu
31754 (cd oldgnu
31755 TEST_TAR_FORMAT=oldgnu
31756 export TEST_TAR_FORMAT
31757 TAR_OPTIONS="-H oldgnu"
31758 export TAR_OPTIONS
31759 rm -rf *
31760
31761 tar -cf archive -V label -T /dev/null || exit 1
31762
31763 tar xfV archive label || exit 1
31764 tar xfV archive 'la?el' || exit 1
31765 tar xfV archive 'l*l' || exit 1
31766
31767 echo 1>&2 -----
31768 tar xfV archive lab
31769 test $? = 2 || exit 1
31770 echo 1>&2 -----
31771 tar xfV archive bel
31772 test $? = 2 || exit 1
31773 echo 1>&2 -----
31774 tar xfV archive babel
31775 test $? = 2
31776 )
31777 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31778 at_status=$? at_failed=false
31779 $at_check_filter
31780 echo >>"$at_stderr"; $as_echo "-----
31781 tar: Volume 'label' does not match 'lab'
31782 tar: Error is not recoverable: exiting now
31783 -----
31784 tar: Volume 'label' does not match 'bel'
31785 tar: Error is not recoverable: exiting now
31786 -----
31787 tar: Volume 'label' does not match 'babel'
31788 tar: Error is not recoverable: exiting now
31789 " | \
31790   $at_diff - "$at_stderr" || at_failed=:
31791 at_fn_diff_devnull "$at_stdout" || at_failed=:
31792 at_fn_check_status 0 $at_status "$at_srcdir/volume.at:26"
31793 $at_failed && at_fn_log_failure
31794 $at_traceon; }
31795
31796
31797
31798
31799   set +x
31800   $at_times_p && times >"$at_times_file"
31801 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
31802 read at_status <"$at_status_file"
31803 #AT_STOP_138
31804 #AT_START_139
31805 at_fn_group_banner 139 'volsize.at:29' \
31806   "volume header size" "                             " 22
31807 at_xfail=no
31808       test -f $XFAILFILE && at_xfail=yes
31809 (
31810   $as_echo "139. $at_setup_line: testing $at_desc ..."
31811   $at_traceon
31812
31813
31814
31815
31816
31817   { set +x
31818 $as_echo "$at_srcdir/volsize.at:32:
31819 mkdir v7
31820 (cd v7
31821 TEST_TAR_FORMAT=v7
31822 export TEST_TAR_FORMAT
31823 TAR_OPTIONS=\"-H v7\"
31824 export TAR_OPTIONS
31825 rm -rf *
31826
31827
31828 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31829
31830
31831 test -z \"\$TEST_DATA_DIR\" && exit 77
31832 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
31833
31834 echo Short Listing
31835 tar tf \$TEST_DATA_DIR/abc.tar
31836 echo Verbose Listing
31837 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
31838 echo Extracted directory
31839 tar xf \$TEST_DATA_DIR/abc.tar
31840 find abc|sort
31841 )"
31842 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
31843 ( $at_check_trace;
31844 mkdir v7
31845 (cd v7
31846 TEST_TAR_FORMAT=v7
31847 export TEST_TAR_FORMAT
31848 TAR_OPTIONS="-H v7"
31849 export TAR_OPTIONS
31850 rm -rf *
31851
31852
31853 test -z "`sort < /dev/null 2>&1`" || exit 77
31854
31855
31856 test -z "$TEST_DATA_DIR" && exit 77
31857 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
31858
31859 echo Short Listing
31860 tar tf $TEST_DATA_DIR/abc.tar
31861 echo Verbose Listing
31862 tar --utc -tvf $TEST_DATA_DIR/abc.tar
31863 echo Extracted directory
31864 tar xf $TEST_DATA_DIR/abc.tar
31865 find abc|sort
31866 )
31867 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31868 at_status=$? at_failed=false
31869 $at_check_filter
31870 at_fn_diff_devnull "$at_stderr" || at_failed=:
31871 echo >>"$at_stdout"; $as_echo "Short Listing
31872 abc/not-a-file.gif
31873 abc/CCC
31874 Verbose Listing
31875 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
31876 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
31877 Extracted directory
31878 abc
31879 abc/CCC
31880 " | \
31881   $at_diff - "$at_stdout" || at_failed=:
31882 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
31883 $at_failed && at_fn_log_failure
31884 $at_traceon; }
31885
31886               { set +x
31887 $as_echo "$at_srcdir/volsize.at:32:
31888 mkdir oldgnu
31889 (cd oldgnu
31890 TEST_TAR_FORMAT=oldgnu
31891 export TEST_TAR_FORMAT
31892 TAR_OPTIONS=\"-H oldgnu\"
31893 export TAR_OPTIONS
31894 rm -rf *
31895
31896
31897 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31898
31899
31900 test -z \"\$TEST_DATA_DIR\" && exit 77
31901 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
31902
31903 echo Short Listing
31904 tar tf \$TEST_DATA_DIR/abc.tar
31905 echo Verbose Listing
31906 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
31907 echo Extracted directory
31908 tar xf \$TEST_DATA_DIR/abc.tar
31909 find abc|sort
31910 )"
31911 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
31912 ( $at_check_trace;
31913 mkdir oldgnu
31914 (cd oldgnu
31915 TEST_TAR_FORMAT=oldgnu
31916 export TEST_TAR_FORMAT
31917 TAR_OPTIONS="-H oldgnu"
31918 export TAR_OPTIONS
31919 rm -rf *
31920
31921
31922 test -z "`sort < /dev/null 2>&1`" || exit 77
31923
31924
31925 test -z "$TEST_DATA_DIR" && exit 77
31926 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
31927
31928 echo Short Listing
31929 tar tf $TEST_DATA_DIR/abc.tar
31930 echo Verbose Listing
31931 tar --utc -tvf $TEST_DATA_DIR/abc.tar
31932 echo Extracted directory
31933 tar xf $TEST_DATA_DIR/abc.tar
31934 find abc|sort
31935 )
31936 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
31937 at_status=$? at_failed=false
31938 $at_check_filter
31939 at_fn_diff_devnull "$at_stderr" || at_failed=:
31940 echo >>"$at_stdout"; $as_echo "Short Listing
31941 abc/not-a-file.gif
31942 abc/CCC
31943 Verbose Listing
31944 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
31945 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
31946 Extracted directory
31947 abc
31948 abc/CCC
31949 " | \
31950   $at_diff - "$at_stdout" || at_failed=:
31951 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
31952 $at_failed && at_fn_log_failure
31953 $at_traceon; }
31954
31955               { set +x
31956 $as_echo "$at_srcdir/volsize.at:32:
31957 mkdir ustar
31958 (cd ustar
31959 TEST_TAR_FORMAT=ustar
31960 export TEST_TAR_FORMAT
31961 TAR_OPTIONS=\"-H ustar\"
31962 export TAR_OPTIONS
31963 rm -rf *
31964
31965
31966 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
31967
31968
31969 test -z \"\$TEST_DATA_DIR\" && exit 77
31970 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
31971
31972 echo Short Listing
31973 tar tf \$TEST_DATA_DIR/abc.tar
31974 echo Verbose Listing
31975 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
31976 echo Extracted directory
31977 tar xf \$TEST_DATA_DIR/abc.tar
31978 find abc|sort
31979 )"
31980 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
31981 ( $at_check_trace;
31982 mkdir ustar
31983 (cd ustar
31984 TEST_TAR_FORMAT=ustar
31985 export TEST_TAR_FORMAT
31986 TAR_OPTIONS="-H ustar"
31987 export TAR_OPTIONS
31988 rm -rf *
31989
31990
31991 test -z "`sort < /dev/null 2>&1`" || exit 77
31992
31993
31994 test -z "$TEST_DATA_DIR" && exit 77
31995 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
31996
31997 echo Short Listing
31998 tar tf $TEST_DATA_DIR/abc.tar
31999 echo Verbose Listing
32000 tar --utc -tvf $TEST_DATA_DIR/abc.tar
32001 echo Extracted directory
32002 tar xf $TEST_DATA_DIR/abc.tar
32003 find abc|sort
32004 )
32005 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32006 at_status=$? at_failed=false
32007 $at_check_filter
32008 at_fn_diff_devnull "$at_stderr" || at_failed=:
32009 echo >>"$at_stdout"; $as_echo "Short Listing
32010 abc/not-a-file.gif
32011 abc/CCC
32012 Verbose Listing
32013 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
32014 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
32015 Extracted directory
32016 abc
32017 abc/CCC
32018 " | \
32019   $at_diff - "$at_stdout" || at_failed=:
32020 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
32021 $at_failed && at_fn_log_failure
32022 $at_traceon; }
32023
32024               { set +x
32025 $as_echo "$at_srcdir/volsize.at:32:
32026 mkdir posix
32027 (cd posix
32028 TEST_TAR_FORMAT=posix
32029 export TEST_TAR_FORMAT
32030 TAR_OPTIONS=\"-H posix\"
32031 export TAR_OPTIONS
32032 rm -rf *
32033
32034
32035 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32036
32037
32038 test -z \"\$TEST_DATA_DIR\" && exit 77
32039 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
32040
32041 echo Short Listing
32042 tar tf \$TEST_DATA_DIR/abc.tar
32043 echo Verbose Listing
32044 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
32045 echo Extracted directory
32046 tar xf \$TEST_DATA_DIR/abc.tar
32047 find abc|sort
32048 )"
32049 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
32050 ( $at_check_trace;
32051 mkdir posix
32052 (cd posix
32053 TEST_TAR_FORMAT=posix
32054 export TEST_TAR_FORMAT
32055 TAR_OPTIONS="-H posix"
32056 export TAR_OPTIONS
32057 rm -rf *
32058
32059
32060 test -z "`sort < /dev/null 2>&1`" || exit 77
32061
32062
32063 test -z "$TEST_DATA_DIR" && exit 77
32064 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
32065
32066 echo Short Listing
32067 tar tf $TEST_DATA_DIR/abc.tar
32068 echo Verbose Listing
32069 tar --utc -tvf $TEST_DATA_DIR/abc.tar
32070 echo Extracted directory
32071 tar xf $TEST_DATA_DIR/abc.tar
32072 find abc|sort
32073 )
32074 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32075 at_status=$? at_failed=false
32076 $at_check_filter
32077 at_fn_diff_devnull "$at_stderr" || at_failed=:
32078 echo >>"$at_stdout"; $as_echo "Short Listing
32079 abc/not-a-file.gif
32080 abc/CCC
32081 Verbose Listing
32082 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
32083 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
32084 Extracted directory
32085 abc
32086 abc/CCC
32087 " | \
32088   $at_diff - "$at_stdout" || at_failed=:
32089 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
32090 $at_failed && at_fn_log_failure
32091 $at_traceon; }
32092
32093               { set +x
32094 $as_echo "$at_srcdir/volsize.at:32:
32095 mkdir gnu
32096 (cd gnu
32097 TEST_TAR_FORMAT=gnu
32098 export TEST_TAR_FORMAT
32099 TAR_OPTIONS=\"-H gnu\"
32100 export TAR_OPTIONS
32101 rm -rf *
32102
32103
32104 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
32105
32106
32107 test -z \"\$TEST_DATA_DIR\" && exit 77
32108 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 \$TEST_DATA_DIR \$TEST_DATA_URL || exit 77
32109
32110 echo Short Listing
32111 tar tf \$TEST_DATA_DIR/abc.tar
32112 echo Verbose Listing
32113 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
32114 echo Extracted directory
32115 tar xf \$TEST_DATA_DIR/abc.tar
32116 find abc|sort
32117 )"
32118 at_fn_check_prepare_notrace 'a `...` command substitution' "volsize.at:32"
32119 ( $at_check_trace;
32120 mkdir gnu
32121 (cd gnu
32122 TEST_TAR_FORMAT=gnu
32123 export TEST_TAR_FORMAT
32124 TAR_OPTIONS="-H gnu"
32125 export TAR_OPTIONS
32126 rm -rf *
32127
32128
32129 test -z "`sort < /dev/null 2>&1`" || exit 77
32130
32131
32132 test -z "$TEST_DATA_DIR" && exit 77
32133 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
32134
32135 echo Short Listing
32136 tar tf $TEST_DATA_DIR/abc.tar
32137 echo Verbose Listing
32138 tar --utc -tvf $TEST_DATA_DIR/abc.tar
32139 echo Extracted directory
32140 tar xf $TEST_DATA_DIR/abc.tar
32141 find abc|sort
32142 )
32143 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32144 at_status=$? at_failed=false
32145 $at_check_filter
32146 at_fn_diff_devnull "$at_stderr" || at_failed=:
32147 echo >>"$at_stdout"; $as_echo "Short Listing
32148 abc/not-a-file.gif
32149 abc/CCC
32150 Verbose Listing
32151 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
32152 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
32153 Extracted directory
32154 abc
32155 abc/CCC
32156 " | \
32157   $at_diff - "$at_stdout" || at_failed=:
32158 at_fn_check_status 0 $at_status "$at_srcdir/volsize.at:32"
32159 $at_failed && at_fn_log_failure
32160 $at_traceon; }
32161
32162
32163
32164
32165   set +x
32166   $at_times_p && times >"$at_times_file"
32167 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32168 read at_status <"$at_status_file"
32169 #AT_STOP_139
32170 #AT_START_140
32171 at_fn_group_banner 140 'comprec.at:21' \
32172   "compressed format recognition" "                  " 23
32173 at_xfail=no
32174       test -f $XFAILFILE && at_xfail=yes
32175 (
32176   $as_echo "140. $at_setup_line: testing $at_desc ..."
32177   $at_traceon
32178
32179
32180
32181
32182
32183
32184   { set +x
32185 $as_echo "$at_srcdir/comprec.at:25:
32186 mkdir v7
32187 (cd v7
32188 TEST_TAR_FORMAT=v7
32189 export TEST_TAR_FORMAT
32190 TAR_OPTIONS=\"-H v7\"
32191 export TAR_OPTIONS
32192 rm -rf *
32193
32194
32195 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32196
32197 genfile --length 10240 --file file1
32198 echo \"separator\"
32199 tar cfz archive file1
32200 echo \"separator\"
32201 mv file1 orig
32202 tar xfv archive --warning=no-timestamp
32203 cmp orig file1
32204 )"
32205 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
32206 ( $at_check_trace;
32207 mkdir v7
32208 (cd v7
32209 TEST_TAR_FORMAT=v7
32210 export TEST_TAR_FORMAT
32211 TAR_OPTIONS="-H v7"
32212 export TAR_OPTIONS
32213 rm -rf *
32214
32215
32216 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32217
32218 genfile --length 10240 --file file1
32219 echo "separator"
32220 tar cfz archive file1
32221 echo "separator"
32222 mv file1 orig
32223 tar xfv archive --warning=no-timestamp
32224 cmp orig file1
32225 )
32226 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32227 at_status=$? at_failed=false
32228 $at_check_filter
32229 at_fn_diff_devnull "$at_stderr" || at_failed=:
32230 echo >>"$at_stdout"; $as_echo "separator
32231 separator
32232 file1
32233 " | \
32234   $at_diff - "$at_stdout" || at_failed=:
32235 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
32236 $at_failed && at_fn_log_failure
32237 $at_traceon; }
32238
32239               { set +x
32240 $as_echo "$at_srcdir/comprec.at:25:
32241 mkdir oldgnu
32242 (cd oldgnu
32243 TEST_TAR_FORMAT=oldgnu
32244 export TEST_TAR_FORMAT
32245 TAR_OPTIONS=\"-H oldgnu\"
32246 export TAR_OPTIONS
32247 rm -rf *
32248
32249
32250 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32251
32252 genfile --length 10240 --file file1
32253 echo \"separator\"
32254 tar cfz archive file1
32255 echo \"separator\"
32256 mv file1 orig
32257 tar xfv archive --warning=no-timestamp
32258 cmp orig file1
32259 )"
32260 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
32261 ( $at_check_trace;
32262 mkdir oldgnu
32263 (cd oldgnu
32264 TEST_TAR_FORMAT=oldgnu
32265 export TEST_TAR_FORMAT
32266 TAR_OPTIONS="-H oldgnu"
32267 export TAR_OPTIONS
32268 rm -rf *
32269
32270
32271 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32272
32273 genfile --length 10240 --file file1
32274 echo "separator"
32275 tar cfz archive file1
32276 echo "separator"
32277 mv file1 orig
32278 tar xfv archive --warning=no-timestamp
32279 cmp orig file1
32280 )
32281 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32282 at_status=$? at_failed=false
32283 $at_check_filter
32284 at_fn_diff_devnull "$at_stderr" || at_failed=:
32285 echo >>"$at_stdout"; $as_echo "separator
32286 separator
32287 file1
32288 " | \
32289   $at_diff - "$at_stdout" || at_failed=:
32290 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
32291 $at_failed && at_fn_log_failure
32292 $at_traceon; }
32293
32294               { set +x
32295 $as_echo "$at_srcdir/comprec.at:25:
32296 mkdir ustar
32297 (cd ustar
32298 TEST_TAR_FORMAT=ustar
32299 export TEST_TAR_FORMAT
32300 TAR_OPTIONS=\"-H ustar\"
32301 export TAR_OPTIONS
32302 rm -rf *
32303
32304
32305 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32306
32307 genfile --length 10240 --file file1
32308 echo \"separator\"
32309 tar cfz archive file1
32310 echo \"separator\"
32311 mv file1 orig
32312 tar xfv archive --warning=no-timestamp
32313 cmp orig file1
32314 )"
32315 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
32316 ( $at_check_trace;
32317 mkdir ustar
32318 (cd ustar
32319 TEST_TAR_FORMAT=ustar
32320 export TEST_TAR_FORMAT
32321 TAR_OPTIONS="-H ustar"
32322 export TAR_OPTIONS
32323 rm -rf *
32324
32325
32326 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32327
32328 genfile --length 10240 --file file1
32329 echo "separator"
32330 tar cfz archive file1
32331 echo "separator"
32332 mv file1 orig
32333 tar xfv archive --warning=no-timestamp
32334 cmp orig file1
32335 )
32336 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32337 at_status=$? at_failed=false
32338 $at_check_filter
32339 at_fn_diff_devnull "$at_stderr" || at_failed=:
32340 echo >>"$at_stdout"; $as_echo "separator
32341 separator
32342 file1
32343 " | \
32344   $at_diff - "$at_stdout" || at_failed=:
32345 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
32346 $at_failed && at_fn_log_failure
32347 $at_traceon; }
32348
32349               { set +x
32350 $as_echo "$at_srcdir/comprec.at:25:
32351 mkdir posix
32352 (cd posix
32353 TEST_TAR_FORMAT=posix
32354 export TEST_TAR_FORMAT
32355 TAR_OPTIONS=\"-H posix\"
32356 export TAR_OPTIONS
32357 rm -rf *
32358
32359
32360 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32361
32362 genfile --length 10240 --file file1
32363 echo \"separator\"
32364 tar cfz archive file1
32365 echo \"separator\"
32366 mv file1 orig
32367 tar xfv archive --warning=no-timestamp
32368 cmp orig file1
32369 )"
32370 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
32371 ( $at_check_trace;
32372 mkdir posix
32373 (cd posix
32374 TEST_TAR_FORMAT=posix
32375 export TEST_TAR_FORMAT
32376 TAR_OPTIONS="-H posix"
32377 export TAR_OPTIONS
32378 rm -rf *
32379
32380
32381 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32382
32383 genfile --length 10240 --file file1
32384 echo "separator"
32385 tar cfz archive file1
32386 echo "separator"
32387 mv file1 orig
32388 tar xfv archive --warning=no-timestamp
32389 cmp orig file1
32390 )
32391 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32392 at_status=$? at_failed=false
32393 $at_check_filter
32394 at_fn_diff_devnull "$at_stderr" || at_failed=:
32395 echo >>"$at_stdout"; $as_echo "separator
32396 separator
32397 file1
32398 " | \
32399   $at_diff - "$at_stdout" || at_failed=:
32400 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
32401 $at_failed && at_fn_log_failure
32402 $at_traceon; }
32403
32404               { set +x
32405 $as_echo "$at_srcdir/comprec.at:25:
32406 mkdir gnu
32407 (cd gnu
32408 TEST_TAR_FORMAT=gnu
32409 export TEST_TAR_FORMAT
32410 TAR_OPTIONS=\"-H gnu\"
32411 export TAR_OPTIONS
32412 rm -rf *
32413
32414
32415 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32416
32417 genfile --length 10240 --file file1
32418 echo \"separator\"
32419 tar cfz archive file1
32420 echo \"separator\"
32421 mv file1 orig
32422 tar xfv archive --warning=no-timestamp
32423 cmp orig file1
32424 )"
32425 at_fn_check_prepare_notrace 'an embedded newline' "comprec.at:25"
32426 ( $at_check_trace;
32427 mkdir gnu
32428 (cd gnu
32429 TEST_TAR_FORMAT=gnu
32430 export TEST_TAR_FORMAT
32431 TAR_OPTIONS="-H gnu"
32432 export TAR_OPTIONS
32433 rm -rf *
32434
32435
32436 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
32437
32438 genfile --length 10240 --file file1
32439 echo "separator"
32440 tar cfz archive file1
32441 echo "separator"
32442 mv file1 orig
32443 tar xfv archive --warning=no-timestamp
32444 cmp orig file1
32445 )
32446 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32447 at_status=$? at_failed=false
32448 $at_check_filter
32449 at_fn_diff_devnull "$at_stderr" || at_failed=:
32450 echo >>"$at_stdout"; $as_echo "separator
32451 separator
32452 file1
32453 " | \
32454   $at_diff - "$at_stdout" || at_failed=:
32455 at_fn_check_status 0 $at_status "$at_srcdir/comprec.at:25"
32456 $at_failed && at_fn_log_failure
32457 $at_traceon; }
32458
32459
32460
32461
32462   set +x
32463   $at_times_p && times >"$at_times_file"
32464 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32465 read at_status <"$at_status_file"
32466 #AT_STOP_140
32467 #AT_START_141
32468 at_fn_group_banner 141 'shortfile.at:26' \
32469   "short input files" "                              " 23
32470 at_xfail=no
32471       test -f $XFAILFILE && at_xfail=yes
32472 (
32473   $as_echo "141. $at_setup_line: testing $at_desc ..."
32474   $at_traceon
32475
32476
32477
32478
32479
32480   { set +x
32481 $as_echo "$at_srcdir/shortfile.at:29:
32482 mkdir gnu
32483 (cd gnu
32484 TEST_TAR_FORMAT=gnu
32485 export TEST_TAR_FORMAT
32486 TAR_OPTIONS=\"-H gnu\"
32487 export TAR_OPTIONS
32488 rm -rf *
32489
32490 genfile --length 511 --file foo || exit 5
32491 tar tf foo
32492 )"
32493 at_fn_check_prepare_notrace 'an embedded newline' "shortfile.at:29"
32494 ( $at_check_trace;
32495 mkdir gnu
32496 (cd gnu
32497 TEST_TAR_FORMAT=gnu
32498 export TEST_TAR_FORMAT
32499 TAR_OPTIONS="-H gnu"
32500 export TAR_OPTIONS
32501 rm -rf *
32502
32503 genfile --length 511 --file foo || exit 5
32504 tar tf foo
32505 )
32506 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32507 at_status=$? at_failed=false
32508 $at_check_filter
32509 echo >>"$at_stderr"; $as_echo "tar: This does not look like a tar archive
32510 tar: Exiting with failure status due to previous errors
32511 " | \
32512   $at_diff - "$at_stderr" || at_failed=:
32513 at_fn_diff_devnull "$at_stdout" || at_failed=:
32514 at_fn_check_status 2 $at_status "$at_srcdir/shortfile.at:29"
32515 $at_failed && at_fn_log_failure
32516 $at_traceon; }
32517
32518
32519
32520
32521   set +x
32522   $at_times_p && times >"$at_times_file"
32523 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32524 read at_status <"$at_status_file"
32525 #AT_STOP_141
32526 #AT_START_142
32527 at_fn_group_banner 142 'shortupd.at:31' \
32528   "updating short archives" "                        " 23
32529 at_xfail=no
32530       test -f $XFAILFILE && at_xfail=yes
32531 (
32532   $as_echo "142. $at_setup_line: testing $at_desc ..."
32533   $at_traceon
32534
32535
32536
32537
32538
32539   { set +x
32540 $as_echo "$at_srcdir/shortupd.at:34:
32541 mkdir v7
32542 (cd v7
32543 TEST_TAR_FORMAT=v7
32544 export TEST_TAR_FORMAT
32545 TAR_OPTIONS=\"-H v7\"
32546 export TAR_OPTIONS
32547 rm -rf *
32548
32549 touch foo
32550 tar uf archive foo
32551 )"
32552 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32553 ( $at_check_trace;
32554 mkdir v7
32555 (cd v7
32556 TEST_TAR_FORMAT=v7
32557 export TEST_TAR_FORMAT
32558 TAR_OPTIONS="-H v7"
32559 export TAR_OPTIONS
32560 rm -rf *
32561
32562 touch foo
32563 tar uf archive foo
32564 )
32565 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32566 at_status=$? at_failed=false
32567 $at_check_filter
32568 at_fn_diff_devnull "$at_stderr" || at_failed=:
32569 at_fn_diff_devnull "$at_stdout" || at_failed=:
32570 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32571 $at_failed && at_fn_log_failure
32572 $at_traceon; }
32573
32574               { set +x
32575 $as_echo "$at_srcdir/shortupd.at:34:
32576 mkdir oldgnu
32577 (cd oldgnu
32578 TEST_TAR_FORMAT=oldgnu
32579 export TEST_TAR_FORMAT
32580 TAR_OPTIONS=\"-H oldgnu\"
32581 export TAR_OPTIONS
32582 rm -rf *
32583
32584 touch foo
32585 tar uf archive foo
32586 )"
32587 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32588 ( $at_check_trace;
32589 mkdir oldgnu
32590 (cd oldgnu
32591 TEST_TAR_FORMAT=oldgnu
32592 export TEST_TAR_FORMAT
32593 TAR_OPTIONS="-H oldgnu"
32594 export TAR_OPTIONS
32595 rm -rf *
32596
32597 touch foo
32598 tar uf archive foo
32599 )
32600 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32601 at_status=$? at_failed=false
32602 $at_check_filter
32603 at_fn_diff_devnull "$at_stderr" || at_failed=:
32604 at_fn_diff_devnull "$at_stdout" || at_failed=:
32605 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32606 $at_failed && at_fn_log_failure
32607 $at_traceon; }
32608
32609               { set +x
32610 $as_echo "$at_srcdir/shortupd.at:34:
32611 mkdir ustar
32612 (cd ustar
32613 TEST_TAR_FORMAT=ustar
32614 export TEST_TAR_FORMAT
32615 TAR_OPTIONS=\"-H ustar\"
32616 export TAR_OPTIONS
32617 rm -rf *
32618
32619 touch foo
32620 tar uf archive foo
32621 )"
32622 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32623 ( $at_check_trace;
32624 mkdir ustar
32625 (cd ustar
32626 TEST_TAR_FORMAT=ustar
32627 export TEST_TAR_FORMAT
32628 TAR_OPTIONS="-H ustar"
32629 export TAR_OPTIONS
32630 rm -rf *
32631
32632 touch foo
32633 tar uf archive foo
32634 )
32635 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32636 at_status=$? at_failed=false
32637 $at_check_filter
32638 at_fn_diff_devnull "$at_stderr" || at_failed=:
32639 at_fn_diff_devnull "$at_stdout" || at_failed=:
32640 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32641 $at_failed && at_fn_log_failure
32642 $at_traceon; }
32643
32644               { set +x
32645 $as_echo "$at_srcdir/shortupd.at:34:
32646 mkdir posix
32647 (cd posix
32648 TEST_TAR_FORMAT=posix
32649 export TEST_TAR_FORMAT
32650 TAR_OPTIONS=\"-H posix\"
32651 export TAR_OPTIONS
32652 rm -rf *
32653
32654 touch foo
32655 tar uf archive foo
32656 )"
32657 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32658 ( $at_check_trace;
32659 mkdir posix
32660 (cd posix
32661 TEST_TAR_FORMAT=posix
32662 export TEST_TAR_FORMAT
32663 TAR_OPTIONS="-H posix"
32664 export TAR_OPTIONS
32665 rm -rf *
32666
32667 touch foo
32668 tar uf archive foo
32669 )
32670 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32671 at_status=$? at_failed=false
32672 $at_check_filter
32673 at_fn_diff_devnull "$at_stderr" || at_failed=:
32674 at_fn_diff_devnull "$at_stdout" || at_failed=:
32675 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32676 $at_failed && at_fn_log_failure
32677 $at_traceon; }
32678
32679               { set +x
32680 $as_echo "$at_srcdir/shortupd.at:34:
32681 mkdir gnu
32682 (cd gnu
32683 TEST_TAR_FORMAT=gnu
32684 export TEST_TAR_FORMAT
32685 TAR_OPTIONS=\"-H gnu\"
32686 export TAR_OPTIONS
32687 rm -rf *
32688
32689 touch foo
32690 tar uf archive foo
32691 )"
32692 at_fn_check_prepare_notrace 'an embedded newline' "shortupd.at:34"
32693 ( $at_check_trace;
32694 mkdir gnu
32695 (cd gnu
32696 TEST_TAR_FORMAT=gnu
32697 export TEST_TAR_FORMAT
32698 TAR_OPTIONS="-H gnu"
32699 export TAR_OPTIONS
32700 rm -rf *
32701
32702 touch foo
32703 tar uf archive foo
32704 )
32705 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32706 at_status=$? at_failed=false
32707 $at_check_filter
32708 at_fn_diff_devnull "$at_stderr" || at_failed=:
32709 at_fn_diff_devnull "$at_stdout" || at_failed=:
32710 at_fn_check_status 0 $at_status "$at_srcdir/shortupd.at:34"
32711 $at_failed && at_fn_log_failure
32712 $at_traceon; }
32713
32714
32715
32716
32717   set +x
32718   $at_times_p && times >"$at_times_file"
32719 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
32720 read at_status <"$at_status_file"
32721 #AT_STOP_142
32722 #AT_START_143
32723 at_fn_group_banner 143 'truncate.at:29' \
32724   "truncate" "                                       " 23
32725 at_xfail=no
32726       test -f $XFAILFILE && at_xfail=yes
32727 (
32728   $as_echo "143. $at_setup_line: testing $at_desc ..."
32729   $at_traceon
32730
32731
32732
32733
32734
32735   { set +x
32736 $as_echo "$at_srcdir/truncate.at:32:
32737 mkdir v7
32738 (cd v7
32739 TEST_TAR_FORMAT=v7
32740 export TEST_TAR_FORMAT
32741 TAR_OPTIONS=\"-H v7\"
32742 export TAR_OPTIONS
32743 rm -rf *
32744
32745 genfile --file foo --length 200k
32746 genfile --file baz
32747 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32748 echo Exit status: \$?
32749 echo separator
32750 genfile --file foo --seek 195k --length 5k --pattern=zeros
32751 tar dvf bar)"
32752 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32753 ( $at_check_trace;
32754 mkdir v7
32755 (cd v7
32756 TEST_TAR_FORMAT=v7
32757 export TEST_TAR_FORMAT
32758 TAR_OPTIONS="-H v7"
32759 export TAR_OPTIONS
32760 rm -rf *
32761
32762 genfile --file foo --length 200k
32763 genfile --file baz
32764 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32765 echo Exit status: $?
32766 echo separator
32767 genfile --file foo --seek 195k --length 5k --pattern=zeros
32768 tar dvf bar)
32769 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32770 at_status=$? at_failed=false
32771 $at_check_filter
32772 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32773 " | \
32774   $at_diff - "$at_stderr" || at_failed=:
32775 echo >>"$at_stdout"; $as_echo "foo
32776 baz
32777 Exit status: 1
32778 separator
32779 foo
32780 foo: Mod time differs
32781 baz
32782 " | \
32783   $at_diff - "$at_stdout" || at_failed=:
32784 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32785 $at_failed && at_fn_log_failure
32786 $at_traceon; }
32787
32788               { set +x
32789 $as_echo "$at_srcdir/truncate.at:32:
32790 mkdir oldgnu
32791 (cd oldgnu
32792 TEST_TAR_FORMAT=oldgnu
32793 export TEST_TAR_FORMAT
32794 TAR_OPTIONS=\"-H oldgnu\"
32795 export TAR_OPTIONS
32796 rm -rf *
32797
32798 genfile --file foo --length 200k
32799 genfile --file baz
32800 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32801 echo Exit status: \$?
32802 echo separator
32803 genfile --file foo --seek 195k --length 5k --pattern=zeros
32804 tar dvf bar)"
32805 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32806 ( $at_check_trace;
32807 mkdir oldgnu
32808 (cd oldgnu
32809 TEST_TAR_FORMAT=oldgnu
32810 export TEST_TAR_FORMAT
32811 TAR_OPTIONS="-H oldgnu"
32812 export TAR_OPTIONS
32813 rm -rf *
32814
32815 genfile --file foo --length 200k
32816 genfile --file baz
32817 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32818 echo Exit status: $?
32819 echo separator
32820 genfile --file foo --seek 195k --length 5k --pattern=zeros
32821 tar dvf bar)
32822 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32823 at_status=$? at_failed=false
32824 $at_check_filter
32825 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32826 " | \
32827   $at_diff - "$at_stderr" || at_failed=:
32828 echo >>"$at_stdout"; $as_echo "foo
32829 baz
32830 Exit status: 1
32831 separator
32832 foo
32833 foo: Mod time differs
32834 baz
32835 " | \
32836   $at_diff - "$at_stdout" || at_failed=:
32837 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32838 $at_failed && at_fn_log_failure
32839 $at_traceon; }
32840
32841               { set +x
32842 $as_echo "$at_srcdir/truncate.at:32:
32843 mkdir ustar
32844 (cd ustar
32845 TEST_TAR_FORMAT=ustar
32846 export TEST_TAR_FORMAT
32847 TAR_OPTIONS=\"-H ustar\"
32848 export TAR_OPTIONS
32849 rm -rf *
32850
32851 genfile --file foo --length 200k
32852 genfile --file baz
32853 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32854 echo Exit status: \$?
32855 echo separator
32856 genfile --file foo --seek 195k --length 5k --pattern=zeros
32857 tar dvf bar)"
32858 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32859 ( $at_check_trace;
32860 mkdir ustar
32861 (cd ustar
32862 TEST_TAR_FORMAT=ustar
32863 export TEST_TAR_FORMAT
32864 TAR_OPTIONS="-H ustar"
32865 export TAR_OPTIONS
32866 rm -rf *
32867
32868 genfile --file foo --length 200k
32869 genfile --file baz
32870 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32871 echo Exit status: $?
32872 echo separator
32873 genfile --file foo --seek 195k --length 5k --pattern=zeros
32874 tar dvf bar)
32875 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32876 at_status=$? at_failed=false
32877 $at_check_filter
32878 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32879 " | \
32880   $at_diff - "$at_stderr" || at_failed=:
32881 echo >>"$at_stdout"; $as_echo "foo
32882 baz
32883 Exit status: 1
32884 separator
32885 foo
32886 foo: Mod time differs
32887 baz
32888 " | \
32889   $at_diff - "$at_stdout" || at_failed=:
32890 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32891 $at_failed && at_fn_log_failure
32892 $at_traceon; }
32893
32894               { set +x
32895 $as_echo "$at_srcdir/truncate.at:32:
32896 mkdir posix
32897 (cd posix
32898 TEST_TAR_FORMAT=posix
32899 export TEST_TAR_FORMAT
32900 TAR_OPTIONS=\"-H posix\"
32901 export TAR_OPTIONS
32902 rm -rf *
32903
32904 genfile --file foo --length 200k
32905 genfile --file baz
32906 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32907 echo Exit status: \$?
32908 echo separator
32909 genfile --file foo --seek 195k --length 5k --pattern=zeros
32910 tar dvf bar)"
32911 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32912 ( $at_check_trace;
32913 mkdir posix
32914 (cd posix
32915 TEST_TAR_FORMAT=posix
32916 export TEST_TAR_FORMAT
32917 TAR_OPTIONS="-H posix"
32918 export TAR_OPTIONS
32919 rm -rf *
32920
32921 genfile --file foo --length 200k
32922 genfile --file baz
32923 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32924 echo Exit status: $?
32925 echo separator
32926 genfile --file foo --seek 195k --length 5k --pattern=zeros
32927 tar dvf bar)
32928 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32929 at_status=$? at_failed=false
32930 $at_check_filter
32931 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32932 " | \
32933   $at_diff - "$at_stderr" || at_failed=:
32934 echo >>"$at_stdout"; $as_echo "foo
32935 baz
32936 Exit status: 1
32937 separator
32938 foo
32939 foo: Mod time differs
32940 baz
32941 " | \
32942   $at_diff - "$at_stdout" || at_failed=:
32943 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32944 $at_failed && at_fn_log_failure
32945 $at_traceon; }
32946
32947               { set +x
32948 $as_echo "$at_srcdir/truncate.at:32:
32949 mkdir gnu
32950 (cd gnu
32951 TEST_TAR_FORMAT=gnu
32952 export TEST_TAR_FORMAT
32953 TAR_OPTIONS=\"-H gnu\"
32954 export TAR_OPTIONS
32955 rm -rf *
32956
32957 genfile --file foo --length 200k
32958 genfile --file baz
32959 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32960 echo Exit status: \$?
32961 echo separator
32962 genfile --file foo --seek 195k --length 5k --pattern=zeros
32963 tar dvf bar)"
32964 at_fn_check_prepare_notrace 'an embedded newline' "truncate.at:32"
32965 ( $at_check_trace;
32966 mkdir gnu
32967 (cd gnu
32968 TEST_TAR_FORMAT=gnu
32969 export TEST_TAR_FORMAT
32970 TAR_OPTIONS="-H gnu"
32971 export TAR_OPTIONS
32972 rm -rf *
32973
32974 genfile --file foo --length 200k
32975 genfile --file baz
32976 genfile --run --checkpoint 10 --length 195k --truncate foo -- tar --checkpoint --checkpoint-action=echo --checkpoint-action=sleep=1 -vcf bar foo baz
32977 echo Exit status: $?
32978 echo separator
32979 genfile --file foo --seek 195k --length 5k --pattern=zeros
32980 tar dvf bar)
32981 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
32982 at_status=$? at_failed=false
32983 $at_check_filter
32984 echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros
32985 " | \
32986   $at_diff - "$at_stderr" || at_failed=:
32987 echo >>"$at_stdout"; $as_echo "foo
32988 baz
32989 Exit status: 1
32990 separator
32991 foo
32992 foo: Mod time differs
32993 baz
32994 " | \
32995   $at_diff - "$at_stdout" || at_failed=:
32996 at_fn_check_status 1 $at_status "$at_srcdir/truncate.at:32"
32997 $at_failed && at_fn_log_failure
32998 $at_traceon; }
32999
33000
33001
33002
33003   set +x
33004   $at_times_p && times >"$at_times_file"
33005 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33006 read at_status <"$at_status_file"
33007 #AT_STOP_143
33008 #AT_START_144
33009 at_fn_group_banner 144 'grow.at:24' \
33010   "grow" "                                           " 23
33011 at_xfail=no
33012       test -f $XFAILFILE && at_xfail=yes
33013 (
33014   $as_echo "144. $at_setup_line: testing $at_desc ..."
33015   $at_traceon
33016
33017
33018
33019
33020
33021   { set +x
33022 $as_echo "$at_srcdir/grow.at:27:
33023 mkdir v7
33024 (cd v7
33025 TEST_TAR_FORMAT=v7
33026 export TEST_TAR_FORMAT
33027 TAR_OPTIONS=\"-H v7\"
33028 export TAR_OPTIONS
33029 rm -rf *
33030
33031 genfile --file foo --length 50000k
33032 genfile --file baz
33033 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33034 )"
33035 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
33036 ( $at_check_trace;
33037 mkdir v7
33038 (cd v7
33039 TEST_TAR_FORMAT=v7
33040 export TEST_TAR_FORMAT
33041 TAR_OPTIONS="-H v7"
33042 export TAR_OPTIONS
33043 rm -rf *
33044
33045 genfile --file foo --length 50000k
33046 genfile --file baz
33047 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33048 )
33049 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33050 at_status=$? at_failed=false
33051 $at_check_filter
33052 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
33053 " | \
33054   $at_diff - "$at_stderr" || at_failed=:
33055 echo >>"$at_stdout"; $as_echo "foo
33056 baz
33057 " | \
33058   $at_diff - "$at_stdout" || at_failed=:
33059 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
33060 $at_failed && at_fn_log_failure
33061 $at_traceon; }
33062
33063               { set +x
33064 $as_echo "$at_srcdir/grow.at:27:
33065 mkdir oldgnu
33066 (cd oldgnu
33067 TEST_TAR_FORMAT=oldgnu
33068 export TEST_TAR_FORMAT
33069 TAR_OPTIONS=\"-H oldgnu\"
33070 export TAR_OPTIONS
33071 rm -rf *
33072
33073 genfile --file foo --length 50000k
33074 genfile --file baz
33075 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33076 )"
33077 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
33078 ( $at_check_trace;
33079 mkdir oldgnu
33080 (cd oldgnu
33081 TEST_TAR_FORMAT=oldgnu
33082 export TEST_TAR_FORMAT
33083 TAR_OPTIONS="-H oldgnu"
33084 export TAR_OPTIONS
33085 rm -rf *
33086
33087 genfile --file foo --length 50000k
33088 genfile --file baz
33089 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33090 )
33091 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33092 at_status=$? at_failed=false
33093 $at_check_filter
33094 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
33095 " | \
33096   $at_diff - "$at_stderr" || at_failed=:
33097 echo >>"$at_stdout"; $as_echo "foo
33098 baz
33099 " | \
33100   $at_diff - "$at_stdout" || at_failed=:
33101 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
33102 $at_failed && at_fn_log_failure
33103 $at_traceon; }
33104
33105               { set +x
33106 $as_echo "$at_srcdir/grow.at:27:
33107 mkdir ustar
33108 (cd ustar
33109 TEST_TAR_FORMAT=ustar
33110 export TEST_TAR_FORMAT
33111 TAR_OPTIONS=\"-H ustar\"
33112 export TAR_OPTIONS
33113 rm -rf *
33114
33115 genfile --file foo --length 50000k
33116 genfile --file baz
33117 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33118 )"
33119 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
33120 ( $at_check_trace;
33121 mkdir ustar
33122 (cd ustar
33123 TEST_TAR_FORMAT=ustar
33124 export TEST_TAR_FORMAT
33125 TAR_OPTIONS="-H ustar"
33126 export TAR_OPTIONS
33127 rm -rf *
33128
33129 genfile --file foo --length 50000k
33130 genfile --file baz
33131 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33132 )
33133 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33134 at_status=$? at_failed=false
33135 $at_check_filter
33136 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
33137 " | \
33138   $at_diff - "$at_stderr" || at_failed=:
33139 echo >>"$at_stdout"; $as_echo "foo
33140 baz
33141 " | \
33142   $at_diff - "$at_stdout" || at_failed=:
33143 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
33144 $at_failed && at_fn_log_failure
33145 $at_traceon; }
33146
33147               { set +x
33148 $as_echo "$at_srcdir/grow.at:27:
33149 mkdir posix
33150 (cd posix
33151 TEST_TAR_FORMAT=posix
33152 export TEST_TAR_FORMAT
33153 TAR_OPTIONS=\"-H posix\"
33154 export TAR_OPTIONS
33155 rm -rf *
33156
33157 genfile --file foo --length 50000k
33158 genfile --file baz
33159 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33160 )"
33161 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
33162 ( $at_check_trace;
33163 mkdir posix
33164 (cd posix
33165 TEST_TAR_FORMAT=posix
33166 export TEST_TAR_FORMAT
33167 TAR_OPTIONS="-H posix"
33168 export TAR_OPTIONS
33169 rm -rf *
33170
33171 genfile --file foo --length 50000k
33172 genfile --file baz
33173 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33174 )
33175 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33176 at_status=$? at_failed=false
33177 $at_check_filter
33178 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
33179 " | \
33180   $at_diff - "$at_stderr" || at_failed=:
33181 echo >>"$at_stdout"; $as_echo "foo
33182 baz
33183 " | \
33184   $at_diff - "$at_stdout" || at_failed=:
33185 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
33186 $at_failed && at_fn_log_failure
33187 $at_traceon; }
33188
33189               { set +x
33190 $as_echo "$at_srcdir/grow.at:27:
33191 mkdir gnu
33192 (cd gnu
33193 TEST_TAR_FORMAT=gnu
33194 export TEST_TAR_FORMAT
33195 TAR_OPTIONS=\"-H gnu\"
33196 export TAR_OPTIONS
33197 rm -rf *
33198
33199 genfile --file foo --length 50000k
33200 genfile --file baz
33201 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33202 )"
33203 at_fn_check_prepare_notrace 'an embedded newline' "grow.at:27"
33204 ( $at_check_trace;
33205 mkdir gnu
33206 (cd gnu
33207 TEST_TAR_FORMAT=gnu
33208 export TEST_TAR_FORMAT
33209 TAR_OPTIONS="-H gnu"
33210 export TAR_OPTIONS
33211 rm -rf *
33212
33213 genfile --file foo --length 50000k
33214 genfile --file baz
33215 genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz
33216 )
33217 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33218 at_status=$? at_failed=false
33219 $at_check_filter
33220 echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it
33221 " | \
33222   $at_diff - "$at_stderr" || at_failed=:
33223 echo >>"$at_stdout"; $as_echo "foo
33224 baz
33225 " | \
33226   $at_diff - "$at_stdout" || at_failed=:
33227 at_fn_check_status 1 $at_status "$at_srcdir/grow.at:27"
33228 $at_failed && at_fn_log_failure
33229 $at_traceon; }
33230
33231
33232
33233
33234   set +x
33235   $at_times_p && times >"$at_times_file"
33236 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33237 read at_status <"$at_status_file"
33238 #AT_STOP_144
33239 #AT_START_145
33240 at_fn_group_banner 145 'sigpipe.at:21' \
33241   "sigpipe handling" "                               " 23
33242 at_xfail=no
33243 (
33244   $as_echo "145. $at_setup_line: testing $at_desc ..."
33245   $at_traceon
33246
33247
33248
33249 # Description: Tar 1.23 ignored sigpipe which lead to spurious "write
33250 # error" diagnostics when piping output to another programs.
33251 # Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
33252 # References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html
33253 #             <20100319184141.GC30047@wo.int.altlinux.org>
33254
33255 { set +x
33256 $as_echo "$at_srcdir/sigpipe.at:30:
33257
33258 case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
33259 ?*) exit 77;;
33260 esac
33261
33262
33263 genfile --length 2048 --file first
33264 genfile --length 2048 --file second
33265 genfile --length 2049 --file third
33266
33267 tar cf archive first second third
33268
33269 # Discard diagnostics that some shells generate about broken pipes.
33270 (tar tf archive 2>&3 | :) 3>&2 2>/dev/null
33271 "
33272 at_fn_check_prepare_notrace 'a `...` command substitution' "sigpipe.at:30"
33273 ( $at_check_trace;
33274
33275 case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
33276 ?*) exit 77;;
33277 esac
33278
33279
33280 genfile --length 2048 --file first
33281 genfile --length 2048 --file second
33282 genfile --length 2049 --file third
33283
33284 tar cf archive first second third
33285
33286 # Discard diagnostics that some shells generate about broken pipes.
33287 (tar tf archive 2>&3 | :) 3>&2 2>/dev/null
33288
33289 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33290 at_status=$? at_failed=false
33291 $at_check_filter
33292 at_fn_diff_devnull "$at_stderr" || at_failed=:
33293 at_fn_diff_devnull "$at_stdout" || at_failed=:
33294 at_fn_check_status 0 $at_status "$at_srcdir/sigpipe.at:30"
33295 $at_failed && at_fn_log_failure
33296 $at_traceon; }
33297
33298
33299   set +x
33300   $at_times_p && times >"$at_times_file"
33301 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33302 read at_status <"$at_status_file"
33303 #AT_STOP_145
33304 #AT_START_146
33305 at_fn_group_banner 146 'remfiles01.at:28' \
33306   "remove-files with compression" "                  " 24
33307 at_xfail=no
33308 (
33309   $as_echo "146. $at_setup_line: testing $at_desc ..."
33310   $at_traceon
33311
33312
33313
33314 unset TAR_OPTIONS
33315 { set +x
33316 $as_echo "$at_srcdir/remfiles01.at:32:
33317
33318 echo \"test\" > \$\$
33319 chmod 0 \$\$
33320 cat \$\$ > /dev/null 2>&1
33321 result=\$?
33322 rm -f \$\$
33323 test \$result -eq 0 && exit 77
33324
33325
33326 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
33327
33328
33329 case \`(cat \"\$at_myself\" 2>&3 | :) 3>&1 >/dev/null\` in #(
33330 ?*) exit 77;;
33331 esac
33332
33333
33334 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33335
33336
33337 mkdir dir
33338 cd dir
33339 genfile --file a --length 0
33340 chmod 0 a
33341 genfile --file b
33342 mkdir c
33343
33344 # Depending on when the SIGPIPE gets delivered, the invocation below
33345 # may finish with either
33346 #  tar: a: Cannot write: Broken pipe
33347 # or
33348 #  tar: Child returned status 2
33349
33350 # Discard diagnostics that some shells generate about broken pipes,
33351 # and discard all of tar's diagnostics except for the ones saying \"(child)\".
33352 # Gzip's exit code is propagated to the shell.  Usually it is 141.
33353 # Convert all non-zero exits to 2 to make it predictable.
33354 (tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
33355 EC=\$?
33356 sed -n '/(child)/p' err >&2
33357 rm err
33358 find . | sort
33359 exit \$EC
33360 "
33361 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles01.at:32"
33362 ( $at_check_trace;
33363
33364 echo "test" > $$
33365 chmod 0 $$
33366 cat $$ > /dev/null 2>&1
33367 result=$?
33368 rm -f $$
33369 test $result -eq 0 && exit 77
33370
33371
33372 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
33373
33374
33375 case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
33376 ?*) exit 77;;
33377 esac
33378
33379
33380 test -z "`sort < /dev/null 2>&1`" || exit 77
33381
33382
33383 mkdir dir
33384 cd dir
33385 genfile --file a --length 0
33386 chmod 0 a
33387 genfile --file b
33388 mkdir c
33389
33390 # Depending on when the SIGPIPE gets delivered, the invocation below
33391 # may finish with either
33392 #  tar: a: Cannot write: Broken pipe
33393 # or
33394 #  tar: Child returned status 2
33395
33396 # Discard diagnostics that some shells generate about broken pipes,
33397 # and discard all of tar's diagnostics except for the ones saying "(child)".
33398 # Gzip's exit code is propagated to the shell.  Usually it is 141.
33399 # Convert all non-zero exits to 2 to make it predictable.
33400 (tar -c -f a -z --remove-files b c 2>err || (exit 2) ) 2>/dev/null
33401 EC=$?
33402 sed -n '/(child)/p' err >&2
33403 rm err
33404 find . | sort
33405 exit $EC
33406
33407 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33408 at_status=$? at_failed=false
33409 $at_check_filter
33410 echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Permission denied
33411 tar (child): Error is not recoverable: exiting now
33412 " | \
33413   $at_diff - "$at_stderr" || at_failed=:
33414 echo >>"$at_stdout"; $as_echo ".
33415 ./a
33416 ./b
33417 ./c
33418 " | \
33419   $at_diff - "$at_stdout" || at_failed=:
33420 at_fn_check_status 2 $at_status "$at_srcdir/remfiles01.at:32"
33421 $at_failed && at_fn_log_failure
33422 $at_traceon; }
33423
33424
33425   set +x
33426   $at_times_p && times >"$at_times_file"
33427 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33428 read at_status <"$at_status_file"
33429 #AT_STOP_146
33430 #AT_START_147
33431 at_fn_group_banner 147 'remfiles02.at:28' \
33432   "remove-files with compression: grand-child" "     " 24
33433 at_xfail=no
33434 (
33435   $as_echo "147. $at_setup_line: testing $at_desc ..."
33436   $at_traceon
33437
33438
33439
33440 unset TAR_OPTIONS
33441 { set +x
33442 $as_echo "$at_srcdir/remfiles02.at:32:
33443
33444 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
33445
33446
33447 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33448
33449
33450 mkdir dir
33451 cd dir
33452 mkdir a
33453 genfile --file b
33454 mkdir c
33455
33456 tar -c -f a -z --remove-files b c 2>err
33457 EC=\$?
33458 sed -n '/(child)/p' err >&2
33459 rm err
33460 find . | sort
33461 exit \$EC
33462 "
33463 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles02.at:32"
33464 ( $at_check_trace;
33465
33466 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
33467
33468
33469 test -z "`sort < /dev/null 2>&1`" || exit 77
33470
33471
33472 mkdir dir
33473 cd dir
33474 mkdir a
33475 genfile --file b
33476 mkdir c
33477
33478 tar -c -f a -z --remove-files b c 2>err
33479 EC=$?
33480 sed -n '/(child)/p' err >&2
33481 rm err
33482 find . | sort
33483 exit $EC
33484
33485 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33486 at_status=$? at_failed=false
33487 $at_check_filter
33488 echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Is a directory
33489 tar (child): Error is not recoverable: exiting now
33490 " | \
33491   $at_diff - "$at_stderr" || at_failed=:
33492 echo >>"$at_stdout"; $as_echo ".
33493 ./a
33494 ./b
33495 ./c
33496 " | \
33497   $at_diff - "$at_stdout" || at_failed=:
33498 at_fn_check_status 2 $at_status "$at_srcdir/remfiles02.at:32"
33499 $at_failed && at_fn_log_failure
33500 $at_traceon; }
33501
33502
33503   set +x
33504   $at_times_p && times >"$at_times_file"
33505 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33506 read at_status <"$at_status_file"
33507 #AT_STOP_147
33508 #AT_START_148
33509 at_fn_group_banner 148 'remfiles03.at:28' \
33510   "remove-files with symbolic links" "               " 24
33511 at_xfail=no
33512 (
33513   $as_echo "148. $at_setup_line: testing $at_desc ..."
33514   $at_traceon
33515
33516
33517
33518 { set +x
33519 $as_echo "$at_srcdir/remfiles03.at:31:
33520 mkdir a
33521 mkdir a/b
33522 ln -s b a/c || exit 77
33523 tar --remove-files -cf a.tar a
33524 genfile --stat a
33525 "
33526 at_fn_check_prepare_notrace 'an embedded newline' "remfiles03.at:31"
33527 ( $at_check_trace;
33528 mkdir a
33529 mkdir a/b
33530 ln -s b a/c || exit 77
33531 tar --remove-files -cf a.tar a
33532 genfile --stat a
33533
33534 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33535 at_status=$? at_failed=false
33536 $at_check_filter
33537 echo >>"$at_stderr"; $as_echo "genfile: stat(a) failed: No such file or directory
33538 " | \
33539   $at_diff - "$at_stderr" || at_failed=:
33540 at_fn_diff_devnull "$at_stdout" || at_failed=:
33541 at_fn_check_status 0 $at_status "$at_srcdir/remfiles03.at:31"
33542 $at_failed && at_fn_log_failure
33543 $at_traceon; }
33544
33545
33546   set +x
33547   $at_times_p && times >"$at_times_file"
33548 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33549 read at_status <"$at_status_file"
33550 #AT_STOP_148
33551 #AT_START_149
33552 at_fn_group_banner 149 'remfiles04a.at:25' \
33553   "remove-files with -C:rel in -c/non-incr. mode" "  " 24
33554 at_xfail=no
33555       test -f $XFAILFILE && at_xfail=yes
33556 (
33557   $as_echo "149. $at_setup_line: testing $at_desc ..."
33558   $at_traceon
33559
33560
33561
33562
33563
33564   { set +x
33565 $as_echo "$at_srcdir/remfiles04a.at:28:
33566 mkdir gnu
33567 (cd gnu
33568 TEST_TAR_FORMAT=gnu
33569 export TEST_TAR_FORMAT
33570 TAR_OPTIONS=\"-H gnu\"
33571 export TAR_OPTIONS
33572 rm -rf *
33573
33574
33575 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33576
33577 mkdir foo
33578 echo bar > bar
33579 echo foobar > foo/bar
33580 tar -cf foo.tar --remove-files -C foo bar
33581 echo A
33582 find . | sort
33583 )"
33584 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04a.at:28"
33585 ( $at_check_trace;
33586 mkdir gnu
33587 (cd gnu
33588 TEST_TAR_FORMAT=gnu
33589 export TEST_TAR_FORMAT
33590 TAR_OPTIONS="-H gnu"
33591 export TAR_OPTIONS
33592 rm -rf *
33593
33594
33595 test -z "`sort < /dev/null 2>&1`" || exit 77
33596
33597 mkdir foo
33598 echo bar > bar
33599 echo foobar > foo/bar
33600 tar -cf foo.tar --remove-files -C foo bar
33601 echo A
33602 find . | sort
33603 )
33604 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33605 at_status=$? at_failed=false
33606 $at_check_filter
33607 at_fn_diff_devnull "$at_stderr" || at_failed=:
33608 echo >>"$at_stdout"; $as_echo "A
33609 .
33610 ./bar
33611 ./foo
33612 ./foo.tar
33613 " | \
33614   $at_diff - "$at_stdout" || at_failed=:
33615 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04a.at:28"
33616 $at_failed && at_fn_log_failure
33617 $at_traceon; }
33618
33619
33620
33621
33622   set +x
33623   $at_times_p && times >"$at_times_file"
33624 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33625 read at_status <"$at_status_file"
33626 #AT_STOP_149
33627 #AT_START_150
33628 at_fn_group_banner 150 'remfiles04b.at:33' \
33629   "remove-files with -C:rel in -c/incr. mode" "      " 24
33630 at_xfail=no
33631       test -f $XFAILFILE && at_xfail=yes
33632 (
33633   $as_echo "150. $at_setup_line: testing $at_desc ..."
33634   $at_traceon
33635
33636
33637
33638
33639
33640   { set +x
33641 $as_echo "$at_srcdir/remfiles04b.at:36:
33642 mkdir gnu
33643 (cd gnu
33644 TEST_TAR_FORMAT=gnu
33645 export TEST_TAR_FORMAT
33646 TAR_OPTIONS=\"-H gnu\"
33647 export TAR_OPTIONS
33648 rm -rf *
33649
33650
33651 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33652
33653 mkdir foo
33654 echo bar > bar
33655 echo foobar > foo/bar
33656 tar -cf foo.tar --incremental --remove-files -C foo bar
33657 echo A
33658 find . | sort
33659 )"
33660 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04b.at:36"
33661 ( $at_check_trace;
33662 mkdir gnu
33663 (cd gnu
33664 TEST_TAR_FORMAT=gnu
33665 export TEST_TAR_FORMAT
33666 TAR_OPTIONS="-H gnu"
33667 export TAR_OPTIONS
33668 rm -rf *
33669
33670
33671 test -z "`sort < /dev/null 2>&1`" || exit 77
33672
33673 mkdir foo
33674 echo bar > bar
33675 echo foobar > foo/bar
33676 tar -cf foo.tar --incremental --remove-files -C foo bar
33677 echo A
33678 find . | sort
33679 )
33680 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33681 at_status=$? at_failed=false
33682 $at_check_filter
33683 at_fn_diff_devnull "$at_stderr" || at_failed=:
33684 echo >>"$at_stdout"; $as_echo "A
33685 .
33686 ./bar
33687 ./foo
33688 ./foo.tar
33689 " | \
33690   $at_diff - "$at_stdout" || at_failed=:
33691 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04b.at:36"
33692 $at_failed && at_fn_log_failure
33693 $at_traceon; }
33694
33695
33696
33697
33698   set +x
33699   $at_times_p && times >"$at_times_file"
33700 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33701 read at_status <"$at_status_file"
33702 #AT_STOP_150
33703 #AT_START_151
33704 at_fn_group_banner 151 'remfiles04c.at:33' \
33705   "remove-files with -C:rel in -r mode" "            " 24
33706 at_xfail=no
33707       test -f $XFAILFILE && at_xfail=yes
33708 (
33709   $as_echo "151. $at_setup_line: testing $at_desc ..."
33710   $at_traceon
33711
33712
33713
33714
33715
33716   { set +x
33717 $as_echo "$at_srcdir/remfiles04c.at:36:
33718 mkdir gnu
33719 (cd gnu
33720 TEST_TAR_FORMAT=gnu
33721 export TEST_TAR_FORMAT
33722 TAR_OPTIONS=\"-H gnu\"
33723 export TAR_OPTIONS
33724 rm -rf *
33725
33726
33727 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33728
33729 mkdir foo
33730 echo bar > bar
33731 echo foobar > foo/bar
33732 tar -cf foo.tar -C foo bar
33733 echo A
33734 find . | sort
33735 tar -rf foo.tar --remove-files -C foo bar
33736 echo B
33737 find . | sort
33738 )"
33739 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles04c.at:36"
33740 ( $at_check_trace;
33741 mkdir gnu
33742 (cd gnu
33743 TEST_TAR_FORMAT=gnu
33744 export TEST_TAR_FORMAT
33745 TAR_OPTIONS="-H gnu"
33746 export TAR_OPTIONS
33747 rm -rf *
33748
33749
33750 test -z "`sort < /dev/null 2>&1`" || exit 77
33751
33752 mkdir foo
33753 echo bar > bar
33754 echo foobar > foo/bar
33755 tar -cf foo.tar -C foo bar
33756 echo A
33757 find . | sort
33758 tar -rf foo.tar --remove-files -C foo bar
33759 echo B
33760 find . | sort
33761 )
33762 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33763 at_status=$? at_failed=false
33764 $at_check_filter
33765 at_fn_diff_devnull "$at_stderr" || at_failed=:
33766 echo >>"$at_stdout"; $as_echo "A
33767 .
33768 ./bar
33769 ./foo
33770 ./foo.tar
33771 ./foo/bar
33772 B
33773 .
33774 ./bar
33775 ./foo
33776 ./foo.tar
33777 " | \
33778   $at_diff - "$at_stdout" || at_failed=:
33779 at_fn_check_status 0 $at_status "$at_srcdir/remfiles04c.at:36"
33780 $at_failed && at_fn_log_failure
33781 $at_traceon; }
33782
33783
33784
33785
33786   set +x
33787   $at_times_p && times >"$at_times_file"
33788 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33789 read at_status <"$at_status_file"
33790 #AT_STOP_151
33791 #AT_START_152
33792 at_fn_group_banner 152 'remfiles05a.at:34' \
33793   "remove-files with -C:rel,rel in -c/non-incr. mode" "" 24
33794 at_xfail=no
33795       test -f $XFAILFILE && at_xfail=yes
33796 (
33797   $as_echo "152. $at_setup_line: testing $at_desc ..."
33798   $at_traceon
33799
33800
33801
33802
33803
33804   { set +x
33805 $as_echo "$at_srcdir/remfiles05a.at:37:
33806 mkdir gnu
33807 (cd gnu
33808 TEST_TAR_FORMAT=gnu
33809 export TEST_TAR_FORMAT
33810 TAR_OPTIONS=\"-H gnu\"
33811 export TAR_OPTIONS
33812 rm -rf *
33813
33814
33815 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33816
33817 mkdir foo
33818 mkdir bar
33819 echo file > file
33820 echo foo/file > foo/file
33821 echo bar/file > bar/file
33822 decho A
33823 tar -cvf foo.tar --remove-files -C foo file -C ../bar file
33824 decho B
33825 find . | sort
33826 )"
33827 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05a.at:37"
33828 ( $at_check_trace;
33829 mkdir gnu
33830 (cd gnu
33831 TEST_TAR_FORMAT=gnu
33832 export TEST_TAR_FORMAT
33833 TAR_OPTIONS="-H gnu"
33834 export TAR_OPTIONS
33835 rm -rf *
33836
33837
33838 test -z "`sort < /dev/null 2>&1`" || exit 77
33839
33840 mkdir foo
33841 mkdir bar
33842 echo file > file
33843 echo foo/file > foo/file
33844 echo bar/file > bar/file
33845 decho A
33846 tar -cvf foo.tar --remove-files -C foo file -C ../bar file
33847 decho B
33848 find . | sort
33849 )
33850 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33851 at_status=$? at_failed=false
33852 $at_check_filter
33853 echo >>"$at_stderr"; $as_echo "A
33854 B
33855 " | \
33856   $at_diff - "$at_stderr" || at_failed=:
33857 echo >>"$at_stdout"; $as_echo "A
33858 file
33859 file
33860 B
33861 .
33862 ./bar
33863 ./file
33864 ./foo
33865 ./foo.tar
33866 " | \
33867   $at_diff - "$at_stdout" || at_failed=:
33868 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05a.at:37"
33869 $at_failed && at_fn_log_failure
33870 $at_traceon; }
33871
33872
33873
33874
33875   set +x
33876   $at_times_p && times >"$at_times_file"
33877 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33878 read at_status <"$at_status_file"
33879 #AT_STOP_152
33880 #AT_START_153
33881 at_fn_group_banner 153 'remfiles05b.at:25' \
33882   "remove-files with -C:rel,rel in -c/incr. mode" "  " 24
33883 at_xfail=no
33884       test -f $XFAILFILE && at_xfail=yes
33885 (
33886   $as_echo "153. $at_setup_line: testing $at_desc ..."
33887   $at_traceon
33888
33889
33890
33891
33892
33893   { set +x
33894 $as_echo "$at_srcdir/remfiles05b.at:28:
33895 mkdir gnu
33896 (cd gnu
33897 TEST_TAR_FORMAT=gnu
33898 export TEST_TAR_FORMAT
33899 TAR_OPTIONS=\"-H gnu\"
33900 export TAR_OPTIONS
33901 rm -rf *
33902
33903
33904 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33905
33906 mkdir foo
33907 mkdir bar
33908 echo file > file
33909 echo foo/file > foo/file
33910 echo bar/file > bar/file
33911 decho A
33912 tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
33913 decho B
33914 find . | sort
33915 )"
33916 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05b.at:28"
33917 ( $at_check_trace;
33918 mkdir gnu
33919 (cd gnu
33920 TEST_TAR_FORMAT=gnu
33921 export TEST_TAR_FORMAT
33922 TAR_OPTIONS="-H gnu"
33923 export TAR_OPTIONS
33924 rm -rf *
33925
33926
33927 test -z "`sort < /dev/null 2>&1`" || exit 77
33928
33929 mkdir foo
33930 mkdir bar
33931 echo file > file
33932 echo foo/file > foo/file
33933 echo bar/file > bar/file
33934 decho A
33935 tar -cvf foo.tar --incremental --remove-files -C foo file -C ../bar file
33936 decho B
33937 find . | sort
33938 )
33939 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
33940 at_status=$? at_failed=false
33941 $at_check_filter
33942 echo >>"$at_stderr"; $as_echo "A
33943 B
33944 " | \
33945   $at_diff - "$at_stderr" || at_failed=:
33946 echo >>"$at_stdout"; $as_echo "A
33947 file
33948 file
33949 B
33950 .
33951 ./bar
33952 ./file
33953 ./foo
33954 ./foo.tar
33955 " | \
33956   $at_diff - "$at_stdout" || at_failed=:
33957 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05b.at:28"
33958 $at_failed && at_fn_log_failure
33959 $at_traceon; }
33960
33961
33962
33963
33964   set +x
33965   $at_times_p && times >"$at_times_file"
33966 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
33967 read at_status <"$at_status_file"
33968 #AT_STOP_153
33969 #AT_START_154
33970 at_fn_group_banner 154 'remfiles05c.at:25' \
33971   "remove-files with -C:rel,rel in -r mode" "        " 24
33972 at_xfail=no
33973       test -f $XFAILFILE && at_xfail=yes
33974 (
33975   $as_echo "154. $at_setup_line: testing $at_desc ..."
33976   $at_traceon
33977
33978
33979
33980
33981
33982   { set +x
33983 $as_echo "$at_srcdir/remfiles05c.at:28:
33984 mkdir gnu
33985 (cd gnu
33986 TEST_TAR_FORMAT=gnu
33987 export TEST_TAR_FORMAT
33988 TAR_OPTIONS=\"-H gnu\"
33989 export TAR_OPTIONS
33990 rm -rf *
33991
33992
33993 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
33994
33995 mkdir foo
33996 mkdir bar
33997 echo file > file
33998 echo foo/file > foo/file
33999 echo bar/file > bar/file
34000 tar -cf foo.tar -C foo file -C ../bar file
34001 decho A
34002 find . | sort
34003 decho B
34004 tar -rvf foo.tar --remove-files -C foo file -C ../bar file
34005 decho C
34006 find . | sort
34007 )"
34008 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles05c.at:28"
34009 ( $at_check_trace;
34010 mkdir gnu
34011 (cd gnu
34012 TEST_TAR_FORMAT=gnu
34013 export TEST_TAR_FORMAT
34014 TAR_OPTIONS="-H gnu"
34015 export TAR_OPTIONS
34016 rm -rf *
34017
34018
34019 test -z "`sort < /dev/null 2>&1`" || exit 77
34020
34021 mkdir foo
34022 mkdir bar
34023 echo file > file
34024 echo foo/file > foo/file
34025 echo bar/file > bar/file
34026 tar -cf foo.tar -C foo file -C ../bar file
34027 decho A
34028 find . | sort
34029 decho B
34030 tar -rvf foo.tar --remove-files -C foo file -C ../bar file
34031 decho C
34032 find . | sort
34033 )
34034 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34035 at_status=$? at_failed=false
34036 $at_check_filter
34037 echo >>"$at_stderr"; $as_echo "A
34038 B
34039 C
34040 " | \
34041   $at_diff - "$at_stderr" || at_failed=:
34042 echo >>"$at_stdout"; $as_echo "A
34043 .
34044 ./bar
34045 ./bar/file
34046 ./file
34047 ./foo
34048 ./foo.tar
34049 ./foo/file
34050 B
34051 file
34052 file
34053 C
34054 .
34055 ./bar
34056 ./file
34057 ./foo
34058 ./foo.tar
34059 " | \
34060   $at_diff - "$at_stdout" || at_failed=:
34061 at_fn_check_status 0 $at_status "$at_srcdir/remfiles05c.at:28"
34062 $at_failed && at_fn_log_failure
34063 $at_traceon; }
34064
34065
34066
34067
34068   set +x
34069   $at_times_p && times >"$at_times_file"
34070 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34071 read at_status <"$at_status_file"
34072 #AT_STOP_154
34073 #AT_START_155
34074 at_fn_group_banner 155 'remfiles06a.at:25' \
34075   "remove-files with -C:rel,abs in -c/non-incr. mode" "" 24
34076 at_xfail=no
34077       test -f $XFAILFILE && at_xfail=yes
34078 (
34079   $as_echo "155. $at_setup_line: testing $at_desc ..."
34080   $at_traceon
34081
34082
34083
34084
34085
34086   { set +x
34087 $as_echo "$at_srcdir/remfiles06a.at:28:
34088 mkdir gnu
34089 (cd gnu
34090 TEST_TAR_FORMAT=gnu
34091 export TEST_TAR_FORMAT
34092 TAR_OPTIONS=\"-H gnu\"
34093 export TAR_OPTIONS
34094 rm -rf *
34095
34096
34097 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34098
34099 mkdir foo
34100 mkdir bar
34101 echo file > file
34102 echo foo/file > foo/file
34103 echo bar/file > bar/file
34104 DIR=\`pwd\`
34105 decho A
34106 tar -cvf foo.tar --remove-files -C foo file -C \$DIR/bar file
34107 decho B
34108 find . | sort
34109 )"
34110 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06a.at:28"
34111 ( $at_check_trace;
34112 mkdir gnu
34113 (cd gnu
34114 TEST_TAR_FORMAT=gnu
34115 export TEST_TAR_FORMAT
34116 TAR_OPTIONS="-H gnu"
34117 export TAR_OPTIONS
34118 rm -rf *
34119
34120
34121 test -z "`sort < /dev/null 2>&1`" || exit 77
34122
34123 mkdir foo
34124 mkdir bar
34125 echo file > file
34126 echo foo/file > foo/file
34127 echo bar/file > bar/file
34128 DIR=`pwd`
34129 decho A
34130 tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file
34131 decho B
34132 find . | sort
34133 )
34134 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34135 at_status=$? at_failed=false
34136 $at_check_filter
34137 echo >>"$at_stderr"; $as_echo "A
34138 B
34139 " | \
34140   $at_diff - "$at_stderr" || at_failed=:
34141 echo >>"$at_stdout"; $as_echo "A
34142 file
34143 file
34144 B
34145 .
34146 ./bar
34147 ./file
34148 ./foo
34149 ./foo.tar
34150 " | \
34151   $at_diff - "$at_stdout" || at_failed=:
34152 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06a.at:28"
34153 $at_failed && at_fn_log_failure
34154 $at_traceon; }
34155
34156
34157
34158
34159   set +x
34160   $at_times_p && times >"$at_times_file"
34161 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34162 read at_status <"$at_status_file"
34163 #AT_STOP_155
34164 #AT_START_156
34165 at_fn_group_banner 156 'remfiles06b.at:25' \
34166   "remove-files with -C:rel,abs in -c/incr. mode" "  " 24
34167 at_xfail=no
34168       test -f $XFAILFILE && at_xfail=yes
34169 (
34170   $as_echo "156. $at_setup_line: testing $at_desc ..."
34171   $at_traceon
34172
34173
34174
34175
34176
34177   { set +x
34178 $as_echo "$at_srcdir/remfiles06b.at:28:
34179 mkdir gnu
34180 (cd gnu
34181 TEST_TAR_FORMAT=gnu
34182 export TEST_TAR_FORMAT
34183 TAR_OPTIONS=\"-H gnu\"
34184 export TAR_OPTIONS
34185 rm -rf *
34186
34187
34188 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34189
34190 mkdir foo
34191 mkdir bar
34192 echo file > file
34193 echo foo/file > foo/file
34194 echo bar/file > bar/file
34195 DIR=\`pwd\`
34196 decho A
34197 tar -cvf foo.tar --incremental --remove-files -C foo file -C \$DIR/bar file
34198 decho B
34199 find . | sort
34200 )"
34201 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06b.at:28"
34202 ( $at_check_trace;
34203 mkdir gnu
34204 (cd gnu
34205 TEST_TAR_FORMAT=gnu
34206 export TEST_TAR_FORMAT
34207 TAR_OPTIONS="-H gnu"
34208 export TAR_OPTIONS
34209 rm -rf *
34210
34211
34212 test -z "`sort < /dev/null 2>&1`" || exit 77
34213
34214 mkdir foo
34215 mkdir bar
34216 echo file > file
34217 echo foo/file > foo/file
34218 echo bar/file > bar/file
34219 DIR=`pwd`
34220 decho A
34221 tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file
34222 decho B
34223 find . | sort
34224 )
34225 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34226 at_status=$? at_failed=false
34227 $at_check_filter
34228 echo >>"$at_stderr"; $as_echo "A
34229 B
34230 " | \
34231   $at_diff - "$at_stderr" || at_failed=:
34232 echo >>"$at_stdout"; $as_echo "A
34233 file
34234 file
34235 B
34236 .
34237 ./bar
34238 ./file
34239 ./foo
34240 ./foo.tar
34241 " | \
34242   $at_diff - "$at_stdout" || at_failed=:
34243 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06b.at:28"
34244 $at_failed && at_fn_log_failure
34245 $at_traceon; }
34246
34247
34248
34249
34250   set +x
34251   $at_times_p && times >"$at_times_file"
34252 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34253 read at_status <"$at_status_file"
34254 #AT_STOP_156
34255 #AT_START_157
34256 at_fn_group_banner 157 'remfiles06c.at:25' \
34257   "remove-files with -C:rel,abs in -r mode" "        " 24
34258 at_xfail=no
34259       test -f $XFAILFILE && at_xfail=yes
34260 (
34261   $as_echo "157. $at_setup_line: testing $at_desc ..."
34262   $at_traceon
34263
34264
34265
34266
34267
34268   { set +x
34269 $as_echo "$at_srcdir/remfiles06c.at:28:
34270 mkdir gnu
34271 (cd gnu
34272 TEST_TAR_FORMAT=gnu
34273 export TEST_TAR_FORMAT
34274 TAR_OPTIONS=\"-H gnu\"
34275 export TAR_OPTIONS
34276 rm -rf *
34277
34278
34279 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34280
34281 mkdir foo
34282 mkdir bar
34283 echo file > file
34284 echo foo/file > foo/file
34285 echo bar/file > bar/file
34286 DIR=\`pwd\`
34287 tar -cf foo.tar -C foo file -C \$DIR/bar file
34288 decho A
34289 find . | sort
34290 decho B
34291 tar -rvf foo.tar --remove-files -C foo file -C \$DIR/bar file
34292 decho C
34293 find . | sort
34294 )"
34295 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles06c.at:28"
34296 ( $at_check_trace;
34297 mkdir gnu
34298 (cd gnu
34299 TEST_TAR_FORMAT=gnu
34300 export TEST_TAR_FORMAT
34301 TAR_OPTIONS="-H gnu"
34302 export TAR_OPTIONS
34303 rm -rf *
34304
34305
34306 test -z "`sort < /dev/null 2>&1`" || exit 77
34307
34308 mkdir foo
34309 mkdir bar
34310 echo file > file
34311 echo foo/file > foo/file
34312 echo bar/file > bar/file
34313 DIR=`pwd`
34314 tar -cf foo.tar -C foo file -C $DIR/bar file
34315 decho A
34316 find . | sort
34317 decho B
34318 tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file
34319 decho C
34320 find . | sort
34321 )
34322 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34323 at_status=$? at_failed=false
34324 $at_check_filter
34325 echo >>"$at_stderr"; $as_echo "A
34326 B
34327 C
34328 " | \
34329   $at_diff - "$at_stderr" || at_failed=:
34330 echo >>"$at_stdout"; $as_echo "A
34331 .
34332 ./bar
34333 ./bar/file
34334 ./file
34335 ./foo
34336 ./foo.tar
34337 ./foo/file
34338 B
34339 file
34340 file
34341 C
34342 .
34343 ./bar
34344 ./file
34345 ./foo
34346 ./foo.tar
34347 " | \
34348   $at_diff - "$at_stdout" || at_failed=:
34349 at_fn_check_status 0 $at_status "$at_srcdir/remfiles06c.at:28"
34350 $at_failed && at_fn_log_failure
34351 $at_traceon; }
34352
34353
34354
34355
34356   set +x
34357   $at_times_p && times >"$at_times_file"
34358 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34359 read at_status <"$at_status_file"
34360 #AT_STOP_157
34361 #AT_START_158
34362 at_fn_group_banner 158 'remfiles07a.at:25' \
34363   "remove-files with -C:abs,rel in -c/non-incr. mode" "" 24
34364 at_xfail=no
34365       test -f $XFAILFILE && at_xfail=yes
34366 (
34367   $as_echo "158. $at_setup_line: testing $at_desc ..."
34368   $at_traceon
34369
34370
34371
34372
34373
34374   { set +x
34375 $as_echo "$at_srcdir/remfiles07a.at:28:
34376 mkdir gnu
34377 (cd gnu
34378 TEST_TAR_FORMAT=gnu
34379 export TEST_TAR_FORMAT
34380 TAR_OPTIONS=\"-H gnu\"
34381 export TAR_OPTIONS
34382 rm -rf *
34383
34384
34385 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34386
34387 mkdir foo
34388 mkdir bar
34389 echo file > file
34390 echo foo/file > foo/file
34391 echo bar/file > bar/file
34392 DIR=\`pwd\`
34393 decho A
34394 tar -cvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
34395 decho B
34396 find . | sort
34397 )"
34398 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07a.at:28"
34399 ( $at_check_trace;
34400 mkdir gnu
34401 (cd gnu
34402 TEST_TAR_FORMAT=gnu
34403 export TEST_TAR_FORMAT
34404 TAR_OPTIONS="-H gnu"
34405 export TAR_OPTIONS
34406 rm -rf *
34407
34408
34409 test -z "`sort < /dev/null 2>&1`" || exit 77
34410
34411 mkdir foo
34412 mkdir bar
34413 echo file > file
34414 echo foo/file > foo/file
34415 echo bar/file > bar/file
34416 DIR=`pwd`
34417 decho A
34418 tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
34419 decho B
34420 find . | sort
34421 )
34422 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34423 at_status=$? at_failed=false
34424 $at_check_filter
34425 echo >>"$at_stderr"; $as_echo "A
34426 B
34427 " | \
34428   $at_diff - "$at_stderr" || at_failed=:
34429 echo >>"$at_stdout"; $as_echo "A
34430 file
34431 file
34432 B
34433 .
34434 ./bar
34435 ./file
34436 ./foo
34437 ./foo.tar
34438 " | \
34439   $at_diff - "$at_stdout" || at_failed=:
34440 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07a.at:28"
34441 $at_failed && at_fn_log_failure
34442 $at_traceon; }
34443
34444
34445
34446
34447   set +x
34448   $at_times_p && times >"$at_times_file"
34449 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34450 read at_status <"$at_status_file"
34451 #AT_STOP_158
34452 #AT_START_159
34453 at_fn_group_banner 159 'remfiles07b.at:25' \
34454   "remove-files with -C:abs,rel in -c/incr. mode" "  " 24
34455 at_xfail=no
34456       test -f $XFAILFILE && at_xfail=yes
34457 (
34458   $as_echo "159. $at_setup_line: testing $at_desc ..."
34459   $at_traceon
34460
34461
34462
34463
34464
34465   { set +x
34466 $as_echo "$at_srcdir/remfiles07b.at:28:
34467 mkdir gnu
34468 (cd gnu
34469 TEST_TAR_FORMAT=gnu
34470 export TEST_TAR_FORMAT
34471 TAR_OPTIONS=\"-H gnu\"
34472 export TAR_OPTIONS
34473 rm -rf *
34474
34475
34476 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34477
34478 mkdir foo
34479 mkdir bar
34480 echo file > file
34481 echo foo/file > foo/file
34482 echo bar/file > bar/file
34483 DIR=\`pwd\`
34484 decho A
34485 tar -cvf foo.tar --incremental --remove-files -C \$DIR/foo file -C ../bar file
34486 decho B
34487 find . | sort
34488 )"
34489 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07b.at:28"
34490 ( $at_check_trace;
34491 mkdir gnu
34492 (cd gnu
34493 TEST_TAR_FORMAT=gnu
34494 export TEST_TAR_FORMAT
34495 TAR_OPTIONS="-H gnu"
34496 export TAR_OPTIONS
34497 rm -rf *
34498
34499
34500 test -z "`sort < /dev/null 2>&1`" || exit 77
34501
34502 mkdir foo
34503 mkdir bar
34504 echo file > file
34505 echo foo/file > foo/file
34506 echo bar/file > bar/file
34507 DIR=`pwd`
34508 decho A
34509 tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file
34510 decho B
34511 find . | sort
34512 )
34513 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34514 at_status=$? at_failed=false
34515 $at_check_filter
34516 echo >>"$at_stderr"; $as_echo "A
34517 B
34518 " | \
34519   $at_diff - "$at_stderr" || at_failed=:
34520 echo >>"$at_stdout"; $as_echo "A
34521 file
34522 file
34523 B
34524 .
34525 ./bar
34526 ./file
34527 ./foo
34528 ./foo.tar
34529 " | \
34530   $at_diff - "$at_stdout" || at_failed=:
34531 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07b.at:28"
34532 $at_failed && at_fn_log_failure
34533 $at_traceon; }
34534
34535
34536
34537
34538   set +x
34539   $at_times_p && times >"$at_times_file"
34540 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34541 read at_status <"$at_status_file"
34542 #AT_STOP_159
34543 #AT_START_160
34544 at_fn_group_banner 160 'remfiles07c.at:25' \
34545   "remove-files with -C:abs,rel in -r mode" "        " 24
34546 at_xfail=no
34547       test -f $XFAILFILE && at_xfail=yes
34548 (
34549   $as_echo "160. $at_setup_line: testing $at_desc ..."
34550   $at_traceon
34551
34552
34553
34554
34555
34556   { set +x
34557 $as_echo "$at_srcdir/remfiles07c.at:28:
34558 mkdir gnu
34559 (cd gnu
34560 TEST_TAR_FORMAT=gnu
34561 export TEST_TAR_FORMAT
34562 TAR_OPTIONS=\"-H gnu\"
34563 export TAR_OPTIONS
34564 rm -rf *
34565
34566
34567 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34568
34569 mkdir foo
34570 mkdir bar
34571 echo file > file
34572 echo foo/file > foo/file
34573 echo bar/file > bar/file
34574 DIR=\`pwd\`
34575 tar -cf foo.tar -C \$DIR/foo file -C ../bar file
34576 decho A
34577 find . | sort
34578 decho B
34579 tar -rvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file
34580 decho C
34581 find . | sort
34582 )"
34583 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles07c.at:28"
34584 ( $at_check_trace;
34585 mkdir gnu
34586 (cd gnu
34587 TEST_TAR_FORMAT=gnu
34588 export TEST_TAR_FORMAT
34589 TAR_OPTIONS="-H gnu"
34590 export TAR_OPTIONS
34591 rm -rf *
34592
34593
34594 test -z "`sort < /dev/null 2>&1`" || exit 77
34595
34596 mkdir foo
34597 mkdir bar
34598 echo file > file
34599 echo foo/file > foo/file
34600 echo bar/file > bar/file
34601 DIR=`pwd`
34602 tar -cf foo.tar -C $DIR/foo file -C ../bar file
34603 decho A
34604 find . | sort
34605 decho B
34606 tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file
34607 decho C
34608 find . | sort
34609 )
34610 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34611 at_status=$? at_failed=false
34612 $at_check_filter
34613 echo >>"$at_stderr"; $as_echo "A
34614 B
34615 C
34616 " | \
34617   $at_diff - "$at_stderr" || at_failed=:
34618 echo >>"$at_stdout"; $as_echo "A
34619 .
34620 ./bar
34621 ./bar/file
34622 ./file
34623 ./foo
34624 ./foo.tar
34625 ./foo/file
34626 B
34627 file
34628 file
34629 C
34630 .
34631 ./bar
34632 ./file
34633 ./foo
34634 ./foo.tar
34635 " | \
34636   $at_diff - "$at_stdout" || at_failed=:
34637 at_fn_check_status 0 $at_status "$at_srcdir/remfiles07c.at:28"
34638 $at_failed && at_fn_log_failure
34639 $at_traceon; }
34640
34641
34642
34643
34644   set +x
34645   $at_times_p && times >"$at_times_file"
34646 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34647 read at_status <"$at_status_file"
34648 #AT_STOP_160
34649 #AT_START_161
34650 at_fn_group_banner 161 'remfiles08a.at:28' \
34651   "remove-files deleting two subdirs in -c/non-incr. mode" "" 24
34652 at_xfail=no
34653       test -f $XFAILFILE && at_xfail=yes
34654 (
34655   $as_echo "161. $at_setup_line: testing $at_desc ..."
34656   $at_traceon
34657
34658
34659
34660
34661
34662   { set +x
34663 $as_echo "$at_srcdir/remfiles08a.at:31:
34664 mkdir gnu
34665 (cd gnu
34666 TEST_TAR_FORMAT=gnu
34667 export TEST_TAR_FORMAT
34668 TAR_OPTIONS=\"-H gnu\"
34669 export TAR_OPTIONS
34670 rm -rf *
34671
34672 mkdir foo
34673 mkdir bar
34674 echo foo/foo_file > foo/foo_file
34675 echo bar/bar_file > bar/bar_file
34676 decho A
34677 tar -cvf foo.tar --remove-files -C foo . -C ../bar .
34678 decho B
34679 find .
34680 )"
34681 at_fn_check_prepare_notrace 'an embedded newline' "remfiles08a.at:31"
34682 ( $at_check_trace;
34683 mkdir gnu
34684 (cd gnu
34685 TEST_TAR_FORMAT=gnu
34686 export TEST_TAR_FORMAT
34687 TAR_OPTIONS="-H gnu"
34688 export TAR_OPTIONS
34689 rm -rf *
34690
34691 mkdir foo
34692 mkdir bar
34693 echo foo/foo_file > foo/foo_file
34694 echo bar/bar_file > bar/bar_file
34695 decho A
34696 tar -cvf foo.tar --remove-files -C foo . -C ../bar .
34697 decho B
34698 find .
34699 )
34700 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34701 at_status=$? at_failed=false
34702 $at_check_filter
34703 echo >>"$at_stderr"; $as_echo "A
34704 B
34705 " | \
34706   $at_diff - "$at_stderr" || at_failed=:
34707 echo >>"$at_stdout"; $as_echo "A
34708 ./
34709 ./foo_file
34710 ./
34711 ./bar_file
34712 B
34713 .
34714 ./foo.tar
34715 " | \
34716   $at_diff - "$at_stdout" || at_failed=:
34717 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08a.at:31"
34718 $at_failed && at_fn_log_failure
34719 $at_traceon; }
34720
34721
34722
34723
34724   set +x
34725   $at_times_p && times >"$at_times_file"
34726 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34727 read at_status <"$at_status_file"
34728 #AT_STOP_161
34729 #AT_START_162
34730 at_fn_group_banner 162 'remfiles08b.at:31' \
34731   "remove-files deleting two subdirs in -c/incr. mode" "" 24
34732 at_xfail=yes
34733       test -f $XFAILFILE && at_xfail=yes
34734 (
34735   $as_echo "162. $at_setup_line: testing $at_desc ..."
34736   $at_traceon
34737
34738
34739
34740  # we expect to fail in tar 1.27
34741
34742
34743
34744   { set +x
34745 $as_echo "$at_srcdir/remfiles08b.at:36:
34746 mkdir gnu
34747 (cd gnu
34748 TEST_TAR_FORMAT=gnu
34749 export TEST_TAR_FORMAT
34750 TAR_OPTIONS=\"-H gnu\"
34751 export TAR_OPTIONS
34752 rm -rf *
34753
34754 mkdir foo
34755 mkdir bar
34756 echo foo/foo_file > foo/foo_file
34757 echo bar/bar_file > bar/bar_file
34758 decho A
34759 tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
34760 decho B
34761 find .
34762 )"
34763 at_fn_check_prepare_notrace 'an embedded newline' "remfiles08b.at:36"
34764 ( $at_check_trace;
34765 mkdir gnu
34766 (cd gnu
34767 TEST_TAR_FORMAT=gnu
34768 export TEST_TAR_FORMAT
34769 TAR_OPTIONS="-H gnu"
34770 export TAR_OPTIONS
34771 rm -rf *
34772
34773 mkdir foo
34774 mkdir bar
34775 echo foo/foo_file > foo/foo_file
34776 echo bar/bar_file > bar/bar_file
34777 decho A
34778 tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar .
34779 decho B
34780 find .
34781 )
34782 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34783 at_status=$? at_failed=false
34784 $at_check_filter
34785 echo >>"$at_stderr"; $as_echo "A
34786 tar: .: Directory is new
34787 tar: .: Directory is new
34788 B
34789 " | \
34790   $at_diff - "$at_stderr" || at_failed=:
34791 echo >>"$at_stdout"; $as_echo "A
34792 ./
34793 ./
34794 ./foo_file
34795 ./bar_file
34796 B
34797 .
34798 ./foo.tar
34799 " | \
34800   $at_diff - "$at_stdout" || at_failed=:
34801 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08b.at:36"
34802 $at_failed && at_fn_log_failure
34803 $at_traceon; }
34804
34805
34806
34807
34808   set +x
34809   $at_times_p && times >"$at_times_file"
34810 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34811 read at_status <"$at_status_file"
34812 #AT_STOP_162
34813 #AT_START_163
34814 at_fn_group_banner 163 'remfiles08c.at:28' \
34815   "remove-files deleting two subdirs in -r mode" "   " 24
34816 at_xfail=no
34817       test -f $XFAILFILE && at_xfail=yes
34818 (
34819   $as_echo "163. $at_setup_line: testing $at_desc ..."
34820   $at_traceon
34821
34822
34823
34824
34825
34826   { set +x
34827 $as_echo "$at_srcdir/remfiles08c.at:31:
34828 mkdir gnu
34829 (cd gnu
34830 TEST_TAR_FORMAT=gnu
34831 export TEST_TAR_FORMAT
34832 TAR_OPTIONS=\"-H gnu\"
34833 export TAR_OPTIONS
34834 rm -rf *
34835
34836
34837 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
34838
34839 mkdir foo
34840 mkdir bar
34841 echo foo/foo_file > foo/foo_file
34842 echo bar/bar_file > bar/bar_file
34843 tar -cf foo.tar -C foo . -C ../bar .
34844 decho A
34845 find . | sort
34846 decho B
34847 tar -rvf foo.tar --remove-files -C foo . -C ../bar .
34848 decho C
34849 find .
34850 )"
34851 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:31"
34852 ( $at_check_trace;
34853 mkdir gnu
34854 (cd gnu
34855 TEST_TAR_FORMAT=gnu
34856 export TEST_TAR_FORMAT
34857 TAR_OPTIONS="-H gnu"
34858 export TAR_OPTIONS
34859 rm -rf *
34860
34861
34862 test -z "`sort < /dev/null 2>&1`" || exit 77
34863
34864 mkdir foo
34865 mkdir bar
34866 echo foo/foo_file > foo/foo_file
34867 echo bar/bar_file > bar/bar_file
34868 tar -cf foo.tar -C foo . -C ../bar .
34869 decho A
34870 find . | sort
34871 decho B
34872 tar -rvf foo.tar --remove-files -C foo . -C ../bar .
34873 decho C
34874 find .
34875 )
34876 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34877 at_status=$? at_failed=false
34878 $at_check_filter
34879 echo >>"$at_stderr"; $as_echo "A
34880 B
34881 C
34882 " | \
34883   $at_diff - "$at_stderr" || at_failed=:
34884 echo >>"$at_stdout"; $as_echo "A
34885 .
34886 ./bar
34887 ./bar/bar_file
34888 ./foo
34889 ./foo.tar
34890 ./foo/foo_file
34891 B
34892 ./
34893 ./foo_file
34894 ./
34895 ./bar_file
34896 C
34897 .
34898 ./foo.tar
34899 " | \
34900   $at_diff - "$at_stdout" || at_failed=:
34901 at_fn_check_status 0 $at_status "$at_srcdir/remfiles08c.at:31"
34902 $at_failed && at_fn_log_failure
34903 $at_traceon; }
34904
34905
34906
34907
34908   set +x
34909   $at_times_p && times >"$at_times_file"
34910 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34911 read at_status <"$at_status_file"
34912 #AT_STOP_163
34913 #AT_START_164
34914 at_fn_group_banner 164 'remfiles09a.at:25' \
34915   "remove-files on full directory in -c/non-incr. mode" "" 24
34916 at_xfail=no
34917       test -f $XFAILFILE && at_xfail=yes
34918 (
34919   $as_echo "164. $at_setup_line: testing $at_desc ..."
34920   $at_traceon
34921
34922
34923
34924
34925
34926   { set +x
34927 $as_echo "$at_srcdir/remfiles09a.at:28:
34928 mkdir gnu
34929 (cd gnu
34930 TEST_TAR_FORMAT=gnu
34931 export TEST_TAR_FORMAT
34932 TAR_OPTIONS=\"-H gnu\"
34933 export TAR_OPTIONS
34934 rm -rf *
34935
34936 mkdir foo
34937 echo foo/file > foo/file
34938 decho A
34939 tar -cvf foo.tar --remove-files foo
34940 decho B
34941 find .
34942 )"
34943 at_fn_check_prepare_notrace 'an embedded newline' "remfiles09a.at:28"
34944 ( $at_check_trace;
34945 mkdir gnu
34946 (cd gnu
34947 TEST_TAR_FORMAT=gnu
34948 export TEST_TAR_FORMAT
34949 TAR_OPTIONS="-H gnu"
34950 export TAR_OPTIONS
34951 rm -rf *
34952
34953 mkdir foo
34954 echo foo/file > foo/file
34955 decho A
34956 tar -cvf foo.tar --remove-files foo
34957 decho B
34958 find .
34959 )
34960 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
34961 at_status=$? at_failed=false
34962 $at_check_filter
34963 echo >>"$at_stderr"; $as_echo "A
34964 B
34965 " | \
34966   $at_diff - "$at_stderr" || at_failed=:
34967 echo >>"$at_stdout"; $as_echo "A
34968 foo/
34969 foo/file
34970 B
34971 .
34972 ./foo.tar
34973 " | \
34974   $at_diff - "$at_stdout" || at_failed=:
34975 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09a.at:28"
34976 $at_failed && at_fn_log_failure
34977 $at_traceon; }
34978
34979
34980
34981
34982   set +x
34983   $at_times_p && times >"$at_times_file"
34984 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
34985 read at_status <"$at_status_file"
34986 #AT_STOP_164
34987 #AT_START_165
34988 at_fn_group_banner 165 'remfiles09b.at:29' \
34989   "remove-files on full directory in -c/incr. mode" "" 24
34990 at_xfail=yes
34991       test -f $XFAILFILE && at_xfail=yes
34992 (
34993   $as_echo "165. $at_setup_line: testing $at_desc ..."
34994   $at_traceon
34995
34996
34997
34998  # we expect to fail in tar 1.27
34999
35000
35001
35002   { set +x
35003 $as_echo "$at_srcdir/remfiles09b.at:34:
35004 mkdir gnu
35005 (cd gnu
35006 TEST_TAR_FORMAT=gnu
35007 export TEST_TAR_FORMAT
35008 TAR_OPTIONS=\"-H gnu\"
35009 export TAR_OPTIONS
35010 rm -rf *
35011
35012 mkdir foo
35013 echo foo/file > foo/file
35014 decho A
35015 tar -cvf foo.tar --incremental --remove-files foo
35016 decho B
35017 find .
35018 )"
35019 at_fn_check_prepare_notrace 'an embedded newline' "remfiles09b.at:34"
35020 ( $at_check_trace;
35021 mkdir gnu
35022 (cd gnu
35023 TEST_TAR_FORMAT=gnu
35024 export TEST_TAR_FORMAT
35025 TAR_OPTIONS="-H gnu"
35026 export TAR_OPTIONS
35027 rm -rf *
35028
35029 mkdir foo
35030 echo foo/file > foo/file
35031 decho A
35032 tar -cvf foo.tar --incremental --remove-files foo
35033 decho B
35034 find .
35035 )
35036 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35037 at_status=$? at_failed=false
35038 $at_check_filter
35039 echo >>"$at_stderr"; $as_echo "A
35040 tar: foo: Directory is new
35041 B
35042 " | \
35043   $at_diff - "$at_stderr" || at_failed=:
35044 echo >>"$at_stdout"; $as_echo "A
35045 foo/
35046 foo/file
35047 B
35048 .
35049 ./foo.tar
35050 " | \
35051   $at_diff - "$at_stdout" || at_failed=:
35052 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09b.at:34"
35053 $at_failed && at_fn_log_failure
35054 $at_traceon; }
35055
35056
35057
35058
35059   set +x
35060   $at_times_p && times >"$at_times_file"
35061 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35062 read at_status <"$at_status_file"
35063 #AT_STOP_165
35064 #AT_START_166
35065 at_fn_group_banner 166 'remfiles09c.at:25' \
35066   "remove-files on full directory in -r mode" "      " 24
35067 at_xfail=no
35068       test -f $XFAILFILE && at_xfail=yes
35069 (
35070   $as_echo "166. $at_setup_line: testing $at_desc ..."
35071   $at_traceon
35072
35073
35074
35075
35076
35077   { set +x
35078 $as_echo "$at_srcdir/remfiles09c.at:28:
35079 mkdir gnu
35080 (cd gnu
35081 TEST_TAR_FORMAT=gnu
35082 export TEST_TAR_FORMAT
35083 TAR_OPTIONS=\"-H gnu\"
35084 export TAR_OPTIONS
35085 rm -rf *
35086
35087
35088 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
35089
35090 mkdir foo
35091 echo foo/file > foo/file
35092 tar -cf foo.tar foo
35093 decho A
35094 find . | sort
35095 decho B
35096 tar -rvf foo.tar --remove-files foo
35097 decho C
35098 find . | sort
35099 )"
35100 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles09c.at:28"
35101 ( $at_check_trace;
35102 mkdir gnu
35103 (cd gnu
35104 TEST_TAR_FORMAT=gnu
35105 export TEST_TAR_FORMAT
35106 TAR_OPTIONS="-H gnu"
35107 export TAR_OPTIONS
35108 rm -rf *
35109
35110
35111 test -z "`sort < /dev/null 2>&1`" || exit 77
35112
35113 mkdir foo
35114 echo foo/file > foo/file
35115 tar -cf foo.tar foo
35116 decho A
35117 find . | sort
35118 decho B
35119 tar -rvf foo.tar --remove-files foo
35120 decho C
35121 find . | sort
35122 )
35123 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35124 at_status=$? at_failed=false
35125 $at_check_filter
35126 echo >>"$at_stderr"; $as_echo "A
35127 B
35128 C
35129 " | \
35130   $at_diff - "$at_stderr" || at_failed=:
35131 echo >>"$at_stdout"; $as_echo "A
35132 .
35133 ./foo
35134 ./foo.tar
35135 ./foo/file
35136 B
35137 foo/
35138 foo/file
35139 C
35140 .
35141 ./foo.tar
35142 " | \
35143   $at_diff - "$at_stdout" || at_failed=:
35144 at_fn_check_status 0 $at_status "$at_srcdir/remfiles09c.at:28"
35145 $at_failed && at_fn_log_failure
35146 $at_traceon; }
35147
35148
35149
35150
35151   set +x
35152   $at_times_p && times >"$at_times_file"
35153 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35154 read at_status <"$at_status_file"
35155 #AT_STOP_166
35156 #AT_START_167
35157 at_fn_group_banner 167 'remfiles10.at:20' \
35158   "remove-files" "                                   " 24
35159 at_xfail=no
35160       test -f $XFAILFILE && at_xfail=yes
35161 (
35162   $as_echo "167. $at_setup_line: testing $at_desc ..."
35163   $at_traceon
35164
35165
35166
35167
35168
35169   { set +x
35170 $as_echo "$at_srcdir/remfiles10.at:23:
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 mkdir foo
35180 echo foo/file > foo/file
35181 decho A
35182 (cd foo && tar -cvf ../foo.tar --remove-files .)
35183 tar_status=\$?
35184 decho B
35185 find foo
35186 exit \$tar_status
35187 )"
35188 at_fn_check_prepare_notrace 'an embedded newline' "remfiles10.at:23"
35189 ( $at_check_trace;
35190 mkdir gnu
35191 (cd gnu
35192 TEST_TAR_FORMAT=gnu
35193 export TEST_TAR_FORMAT
35194 TAR_OPTIONS="-H gnu"
35195 export TAR_OPTIONS
35196 rm -rf *
35197
35198 mkdir foo
35199 echo foo/file > foo/file
35200 decho A
35201 (cd foo && tar -cvf ../foo.tar --remove-files .)
35202 tar_status=$?
35203 decho B
35204 find foo
35205 exit $tar_status
35206 )
35207 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35208 at_status=$? at_failed=false
35209 $at_check_filter
35210 echo >>"$at_stderr"; $as_echo "A
35211 tar: .: Cannot rmdir: Invalid argument
35212 tar: Exiting with failure status due to previous errors
35213 B
35214 " | \
35215   $at_diff - "$at_stderr" || at_failed=:
35216 echo >>"$at_stdout"; $as_echo "A
35217 ./
35218 ./file
35219 B
35220 foo
35221 " | \
35222   $at_diff - "$at_stdout" || at_failed=:
35223 at_fn_check_status 2 $at_status "$at_srcdir/remfiles10.at:23"
35224 $at_failed && at_fn_log_failure
35225 $at_traceon; }
35226
35227
35228
35229
35230   set +x
35231   $at_times_p && times >"$at_times_file"
35232 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35233 read at_status <"$at_status_file"
35234 #AT_STOP_167
35235 #AT_START_168
35236 at_fn_group_banner 168 'xattr01.at:25' \
35237   "xattrs: basic functionality" "                    " 25
35238 at_xfail=no
35239       test -f $XFAILFILE && at_xfail=yes
35240 (
35241   $as_echo "168. $at_setup_line: testing $at_desc ..."
35242   $at_traceon
35243
35244
35245
35246
35247
35248   { set +x
35249 $as_echo "$at_srcdir/xattr01.at:28:
35250 mkdir v7
35251 (cd v7
35252 TEST_TAR_FORMAT=v7
35253 export TEST_TAR_FORMAT
35254 TAR_OPTIONS=\"-H v7\"
35255 export TAR_OPTIONS
35256 rm -rf *
35257
35258
35259
35260   file=\$(TMPDIR=. mktemp fiXXXXXX)
35261
35262   setfattr -n user.test -v test \$file &> /dev/null
35263   if test \"\$?\" != 0; then
35264     exit 77
35265   fi
35266
35267
35268   getfattr \$file &> /dev/null
35269   if test \"\$?\" != 0; then
35270     exit 77
35271   fi
35272
35273
35274   file=\$(TMPDIR=. mktemp fiXXXXXX)
35275   setfattr -n user.test -v ahoj \$file
35276   # check whether tar fails to store xattrs
35277   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35278   if test \"\$err\" != \"0\"; then
35279     exit 77
35280   fi
35281
35282 mkdir dir
35283 genfile --file dir/file
35284
35285 setfattr -n user.test -v OurDirValue dir
35286 setfattr -n user.test -v OurFileValue dir/file
35287
35288 tar --xattrs -cf archive.tar dir
35289
35290 rm -rf dir
35291 tar --xattrs -xf archive.tar
35292
35293 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
35294 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
35295 )"
35296 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
35297 ( $at_check_trace;
35298 mkdir v7
35299 (cd v7
35300 TEST_TAR_FORMAT=v7
35301 export TEST_TAR_FORMAT
35302 TAR_OPTIONS="-H v7"
35303 export TAR_OPTIONS
35304 rm -rf *
35305
35306
35307
35308   file=$(TMPDIR=. mktemp fiXXXXXX)
35309
35310   setfattr -n user.test -v test $file &> /dev/null
35311   if test "$?" != 0; then
35312     exit 77
35313   fi
35314
35315
35316   getfattr $file &> /dev/null
35317   if test "$?" != 0; then
35318     exit 77
35319   fi
35320
35321
35322   file=$(TMPDIR=. mktemp fiXXXXXX)
35323   setfattr -n user.test -v ahoj $file
35324   # check whether tar fails to store xattrs
35325   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35326   if test "$err" != "0"; then
35327     exit 77
35328   fi
35329
35330 mkdir dir
35331 genfile --file dir/file
35332
35333 setfattr -n user.test -v OurDirValue dir
35334 setfattr -n user.test -v OurFileValue dir/file
35335
35336 tar --xattrs -cf archive.tar dir
35337
35338 rm -rf dir
35339 tar --xattrs -xf archive.tar
35340
35341 getfattr -h -d dir         | grep -v -e '^#' -e ^$
35342 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
35343 )
35344 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35345 at_status=$? at_failed=false
35346 $at_check_filter
35347 at_fn_diff_devnull "$at_stderr" || at_failed=:
35348 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
35349 user.test=\"OurFileValue\"
35350 " | \
35351   $at_diff - "$at_stdout" || at_failed=:
35352 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
35353 $at_failed && at_fn_log_failure
35354 $at_traceon; }
35355
35356               { set +x
35357 $as_echo "$at_srcdir/xattr01.at:28:
35358 mkdir oldgnu
35359 (cd oldgnu
35360 TEST_TAR_FORMAT=oldgnu
35361 export TEST_TAR_FORMAT
35362 TAR_OPTIONS=\"-H oldgnu\"
35363 export TAR_OPTIONS
35364 rm -rf *
35365
35366
35367
35368   file=\$(TMPDIR=. mktemp fiXXXXXX)
35369
35370   setfattr -n user.test -v test \$file &> /dev/null
35371   if test \"\$?\" != 0; then
35372     exit 77
35373   fi
35374
35375
35376   getfattr \$file &> /dev/null
35377   if test \"\$?\" != 0; then
35378     exit 77
35379   fi
35380
35381
35382   file=\$(TMPDIR=. mktemp fiXXXXXX)
35383   setfattr -n user.test -v ahoj \$file
35384   # check whether tar fails to store xattrs
35385   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35386   if test \"\$err\" != \"0\"; then
35387     exit 77
35388   fi
35389
35390 mkdir dir
35391 genfile --file dir/file
35392
35393 setfattr -n user.test -v OurDirValue dir
35394 setfattr -n user.test -v OurFileValue dir/file
35395
35396 tar --xattrs -cf archive.tar dir
35397
35398 rm -rf dir
35399 tar --xattrs -xf archive.tar
35400
35401 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
35402 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
35403 )"
35404 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
35405 ( $at_check_trace;
35406 mkdir oldgnu
35407 (cd oldgnu
35408 TEST_TAR_FORMAT=oldgnu
35409 export TEST_TAR_FORMAT
35410 TAR_OPTIONS="-H oldgnu"
35411 export TAR_OPTIONS
35412 rm -rf *
35413
35414
35415
35416   file=$(TMPDIR=. mktemp fiXXXXXX)
35417
35418   setfattr -n user.test -v test $file &> /dev/null
35419   if test "$?" != 0; then
35420     exit 77
35421   fi
35422
35423
35424   getfattr $file &> /dev/null
35425   if test "$?" != 0; then
35426     exit 77
35427   fi
35428
35429
35430   file=$(TMPDIR=. mktemp fiXXXXXX)
35431   setfattr -n user.test -v ahoj $file
35432   # check whether tar fails to store xattrs
35433   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35434   if test "$err" != "0"; then
35435     exit 77
35436   fi
35437
35438 mkdir dir
35439 genfile --file dir/file
35440
35441 setfattr -n user.test -v OurDirValue dir
35442 setfattr -n user.test -v OurFileValue dir/file
35443
35444 tar --xattrs -cf archive.tar dir
35445
35446 rm -rf dir
35447 tar --xattrs -xf archive.tar
35448
35449 getfattr -h -d dir         | grep -v -e '^#' -e ^$
35450 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
35451 )
35452 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35453 at_status=$? at_failed=false
35454 $at_check_filter
35455 at_fn_diff_devnull "$at_stderr" || at_failed=:
35456 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
35457 user.test=\"OurFileValue\"
35458 " | \
35459   $at_diff - "$at_stdout" || at_failed=:
35460 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
35461 $at_failed && at_fn_log_failure
35462 $at_traceon; }
35463
35464               { set +x
35465 $as_echo "$at_srcdir/xattr01.at:28:
35466 mkdir ustar
35467 (cd ustar
35468 TEST_TAR_FORMAT=ustar
35469 export TEST_TAR_FORMAT
35470 TAR_OPTIONS=\"-H ustar\"
35471 export TAR_OPTIONS
35472 rm -rf *
35473
35474
35475
35476   file=\$(TMPDIR=. mktemp fiXXXXXX)
35477
35478   setfattr -n user.test -v test \$file &> /dev/null
35479   if test \"\$?\" != 0; then
35480     exit 77
35481   fi
35482
35483
35484   getfattr \$file &> /dev/null
35485   if test \"\$?\" != 0; then
35486     exit 77
35487   fi
35488
35489
35490   file=\$(TMPDIR=. mktemp fiXXXXXX)
35491   setfattr -n user.test -v ahoj \$file
35492   # check whether tar fails to store xattrs
35493   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35494   if test \"\$err\" != \"0\"; then
35495     exit 77
35496   fi
35497
35498 mkdir dir
35499 genfile --file dir/file
35500
35501 setfattr -n user.test -v OurDirValue dir
35502 setfattr -n user.test -v OurFileValue dir/file
35503
35504 tar --xattrs -cf archive.tar dir
35505
35506 rm -rf dir
35507 tar --xattrs -xf archive.tar
35508
35509 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
35510 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
35511 )"
35512 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
35513 ( $at_check_trace;
35514 mkdir ustar
35515 (cd ustar
35516 TEST_TAR_FORMAT=ustar
35517 export TEST_TAR_FORMAT
35518 TAR_OPTIONS="-H ustar"
35519 export TAR_OPTIONS
35520 rm -rf *
35521
35522
35523
35524   file=$(TMPDIR=. mktemp fiXXXXXX)
35525
35526   setfattr -n user.test -v test $file &> /dev/null
35527   if test "$?" != 0; then
35528     exit 77
35529   fi
35530
35531
35532   getfattr $file &> /dev/null
35533   if test "$?" != 0; then
35534     exit 77
35535   fi
35536
35537
35538   file=$(TMPDIR=. mktemp fiXXXXXX)
35539   setfattr -n user.test -v ahoj $file
35540   # check whether tar fails to store xattrs
35541   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35542   if test "$err" != "0"; then
35543     exit 77
35544   fi
35545
35546 mkdir dir
35547 genfile --file dir/file
35548
35549 setfattr -n user.test -v OurDirValue dir
35550 setfattr -n user.test -v OurFileValue dir/file
35551
35552 tar --xattrs -cf archive.tar dir
35553
35554 rm -rf dir
35555 tar --xattrs -xf archive.tar
35556
35557 getfattr -h -d dir         | grep -v -e '^#' -e ^$
35558 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
35559 )
35560 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35561 at_status=$? at_failed=false
35562 $at_check_filter
35563 at_fn_diff_devnull "$at_stderr" || at_failed=:
35564 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
35565 user.test=\"OurFileValue\"
35566 " | \
35567   $at_diff - "$at_stdout" || at_failed=:
35568 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
35569 $at_failed && at_fn_log_failure
35570 $at_traceon; }
35571
35572               { set +x
35573 $as_echo "$at_srcdir/xattr01.at:28:
35574 mkdir posix
35575 (cd posix
35576 TEST_TAR_FORMAT=posix
35577 export TEST_TAR_FORMAT
35578 TAR_OPTIONS=\"-H posix\"
35579 export TAR_OPTIONS
35580 rm -rf *
35581
35582
35583
35584   file=\$(TMPDIR=. mktemp fiXXXXXX)
35585
35586   setfattr -n user.test -v test \$file &> /dev/null
35587   if test \"\$?\" != 0; then
35588     exit 77
35589   fi
35590
35591
35592   getfattr \$file &> /dev/null
35593   if test \"\$?\" != 0; then
35594     exit 77
35595   fi
35596
35597
35598   file=\$(TMPDIR=. mktemp fiXXXXXX)
35599   setfattr -n user.test -v ahoj \$file
35600   # check whether tar fails to store xattrs
35601   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35602   if test \"\$err\" != \"0\"; then
35603     exit 77
35604   fi
35605
35606 mkdir dir
35607 genfile --file dir/file
35608
35609 setfattr -n user.test -v OurDirValue dir
35610 setfattr -n user.test -v OurFileValue dir/file
35611
35612 tar --xattrs -cf archive.tar dir
35613
35614 rm -rf dir
35615 tar --xattrs -xf archive.tar
35616
35617 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
35618 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
35619 )"
35620 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
35621 ( $at_check_trace;
35622 mkdir posix
35623 (cd posix
35624 TEST_TAR_FORMAT=posix
35625 export TEST_TAR_FORMAT
35626 TAR_OPTIONS="-H posix"
35627 export TAR_OPTIONS
35628 rm -rf *
35629
35630
35631
35632   file=$(TMPDIR=. mktemp fiXXXXXX)
35633
35634   setfattr -n user.test -v test $file &> /dev/null
35635   if test "$?" != 0; then
35636     exit 77
35637   fi
35638
35639
35640   getfattr $file &> /dev/null
35641   if test "$?" != 0; then
35642     exit 77
35643   fi
35644
35645
35646   file=$(TMPDIR=. mktemp fiXXXXXX)
35647   setfattr -n user.test -v ahoj $file
35648   # check whether tar fails to store xattrs
35649   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35650   if test "$err" != "0"; then
35651     exit 77
35652   fi
35653
35654 mkdir dir
35655 genfile --file dir/file
35656
35657 setfattr -n user.test -v OurDirValue dir
35658 setfattr -n user.test -v OurFileValue dir/file
35659
35660 tar --xattrs -cf archive.tar dir
35661
35662 rm -rf dir
35663 tar --xattrs -xf archive.tar
35664
35665 getfattr -h -d dir         | grep -v -e '^#' -e ^$
35666 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
35667 )
35668 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35669 at_status=$? at_failed=false
35670 $at_check_filter
35671 at_fn_diff_devnull "$at_stderr" || at_failed=:
35672 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
35673 user.test=\"OurFileValue\"
35674 " | \
35675   $at_diff - "$at_stdout" || at_failed=:
35676 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
35677 $at_failed && at_fn_log_failure
35678 $at_traceon; }
35679
35680               { set +x
35681 $as_echo "$at_srcdir/xattr01.at:28:
35682 mkdir gnu
35683 (cd gnu
35684 TEST_TAR_FORMAT=gnu
35685 export TEST_TAR_FORMAT
35686 TAR_OPTIONS=\"-H gnu\"
35687 export TAR_OPTIONS
35688 rm -rf *
35689
35690
35691
35692   file=\$(TMPDIR=. mktemp fiXXXXXX)
35693
35694   setfattr -n user.test -v test \$file &> /dev/null
35695   if test \"\$?\" != 0; then
35696     exit 77
35697   fi
35698
35699
35700   getfattr \$file &> /dev/null
35701   if test \"\$?\" != 0; then
35702     exit 77
35703   fi
35704
35705
35706   file=\$(TMPDIR=. mktemp fiXXXXXX)
35707   setfattr -n user.test -v ahoj \$file
35708   # check whether tar fails to store xattrs
35709   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35710   if test \"\$err\" != \"0\"; then
35711     exit 77
35712   fi
35713
35714 mkdir dir
35715 genfile --file dir/file
35716
35717 setfattr -n user.test -v OurDirValue dir
35718 setfattr -n user.test -v OurFileValue dir/file
35719
35720 tar --xattrs -cf archive.tar dir
35721
35722 rm -rf dir
35723 tar --xattrs -xf archive.tar
35724
35725 getfattr -h -d dir         | grep -v -e '^#' -e ^\$
35726 getfattr -h -d dir/file    | grep -v -e '^#' -e ^\$
35727 )"
35728 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr01.at:28"
35729 ( $at_check_trace;
35730 mkdir gnu
35731 (cd gnu
35732 TEST_TAR_FORMAT=gnu
35733 export TEST_TAR_FORMAT
35734 TAR_OPTIONS="-H gnu"
35735 export TAR_OPTIONS
35736 rm -rf *
35737
35738
35739
35740   file=$(TMPDIR=. mktemp fiXXXXXX)
35741
35742   setfattr -n user.test -v test $file &> /dev/null
35743   if test "$?" != 0; then
35744     exit 77
35745   fi
35746
35747
35748   getfattr $file &> /dev/null
35749   if test "$?" != 0; then
35750     exit 77
35751   fi
35752
35753
35754   file=$(TMPDIR=. mktemp fiXXXXXX)
35755   setfattr -n user.test -v ahoj $file
35756   # check whether tar fails to store xattrs
35757   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35758   if test "$err" != "0"; then
35759     exit 77
35760   fi
35761
35762 mkdir dir
35763 genfile --file dir/file
35764
35765 setfattr -n user.test -v OurDirValue dir
35766 setfattr -n user.test -v OurFileValue dir/file
35767
35768 tar --xattrs -cf archive.tar dir
35769
35770 rm -rf dir
35771 tar --xattrs -xf archive.tar
35772
35773 getfattr -h -d dir         | grep -v -e '^#' -e ^$
35774 getfattr -h -d dir/file    | grep -v -e '^#' -e ^$
35775 )
35776 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35777 at_status=$? at_failed=false
35778 $at_check_filter
35779 at_fn_diff_devnull "$at_stderr" || at_failed=:
35780 echo >>"$at_stdout"; $as_echo "user.test=\"OurDirValue\"
35781 user.test=\"OurFileValue\"
35782 " | \
35783   $at_diff - "$at_stdout" || at_failed=:
35784 at_fn_check_status 0 $at_status "$at_srcdir/xattr01.at:28"
35785 $at_failed && at_fn_log_failure
35786 $at_traceon; }
35787
35788
35789
35790
35791   set +x
35792   $at_times_p && times >"$at_times_file"
35793 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
35794 read at_status <"$at_status_file"
35795 #AT_STOP_168
35796 #AT_START_169
35797 at_fn_group_banner 169 'xattr02.at:25' \
35798   "xattrs: change directory with -C option" "        " 25
35799 at_xfail=no
35800       test -f $XFAILFILE && at_xfail=yes
35801 (
35802   $as_echo "169. $at_setup_line: testing $at_desc ..."
35803   $at_traceon
35804
35805
35806
35807
35808
35809   { set +x
35810 $as_echo "$at_srcdir/xattr02.at:28:
35811 mkdir v7
35812 (cd v7
35813 TEST_TAR_FORMAT=v7
35814 export TEST_TAR_FORMAT
35815 TAR_OPTIONS=\"-H v7\"
35816 export TAR_OPTIONS
35817 rm -rf *
35818
35819
35820
35821   file=\$(TMPDIR=. mktemp fiXXXXXX)
35822
35823   setfattr -n user.test -v test \$file &> /dev/null
35824   if test \"\$?\" != 0; then
35825     exit 77
35826   fi
35827
35828
35829   getfattr \$file &> /dev/null
35830   if test \"\$?\" != 0; then
35831     exit 77
35832   fi
35833
35834
35835   file=\$(TMPDIR=. mktemp fiXXXXXX)
35836   setfattr -n user.test -v ahoj \$file
35837   # check whether tar fails to store xattrs
35838   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35839   if test \"\$err\" != \"0\"; then
35840     exit 77
35841   fi
35842
35843
35844 mkdir dir
35845 mkdir dir/subdir
35846 mkdir dir/subdir/subsubdir
35847 genfile --file dir/file1
35848 genfile --file dir/subdir/file2
35849
35850 setfattr -n user.test -v OurFile1Value dir/file1
35851 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35852 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35853
35854 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35855
35856 rm -rf dir
35857
35858 tar --xattrs -xf archive.tar
35859
35860 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
35861 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
35862 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
35863 )"
35864 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
35865 ( $at_check_trace;
35866 mkdir v7
35867 (cd v7
35868 TEST_TAR_FORMAT=v7
35869 export TEST_TAR_FORMAT
35870 TAR_OPTIONS="-H v7"
35871 export TAR_OPTIONS
35872 rm -rf *
35873
35874
35875
35876   file=$(TMPDIR=. mktemp fiXXXXXX)
35877
35878   setfattr -n user.test -v test $file &> /dev/null
35879   if test "$?" != 0; then
35880     exit 77
35881   fi
35882
35883
35884   getfattr $file &> /dev/null
35885   if test "$?" != 0; then
35886     exit 77
35887   fi
35888
35889
35890   file=$(TMPDIR=. mktemp fiXXXXXX)
35891   setfattr -n user.test -v ahoj $file
35892   # check whether tar fails to store xattrs
35893   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
35894   if test "$err" != "0"; then
35895     exit 77
35896   fi
35897
35898
35899 mkdir dir
35900 mkdir dir/subdir
35901 mkdir dir/subdir/subsubdir
35902 genfile --file dir/file1
35903 genfile --file dir/subdir/file2
35904
35905 setfattr -n user.test -v OurFile1Value dir/file1
35906 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35907 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35908
35909 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35910
35911 rm -rf dir
35912
35913 tar --xattrs -xf archive.tar
35914
35915 getfattr -h -d file1        | grep -v -e '^#' -e ^$
35916 getfattr -h -d file2        | grep -v -e '^#' -e ^$
35917 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
35918 )
35919 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
35920 at_status=$? at_failed=false
35921 $at_check_filter
35922 at_fn_diff_devnull "$at_stderr" || at_failed=:
35923 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
35924 user.test=\"OurFile2Value\"
35925 user.test=\"OurDirValue\"
35926 " | \
35927   $at_diff - "$at_stdout" || at_failed=:
35928 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
35929 $at_failed && at_fn_log_failure
35930 $at_traceon; }
35931
35932               { set +x
35933 $as_echo "$at_srcdir/xattr02.at:28:
35934 mkdir oldgnu
35935 (cd oldgnu
35936 TEST_TAR_FORMAT=oldgnu
35937 export TEST_TAR_FORMAT
35938 TAR_OPTIONS=\"-H oldgnu\"
35939 export TAR_OPTIONS
35940 rm -rf *
35941
35942
35943
35944   file=\$(TMPDIR=. mktemp fiXXXXXX)
35945
35946   setfattr -n user.test -v test \$file &> /dev/null
35947   if test \"\$?\" != 0; then
35948     exit 77
35949   fi
35950
35951
35952   getfattr \$file &> /dev/null
35953   if test \"\$?\" != 0; then
35954     exit 77
35955   fi
35956
35957
35958   file=\$(TMPDIR=. mktemp fiXXXXXX)
35959   setfattr -n user.test -v ahoj \$file
35960   # check whether tar fails to store xattrs
35961   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
35962   if test \"\$err\" != \"0\"; then
35963     exit 77
35964   fi
35965
35966
35967 mkdir dir
35968 mkdir dir/subdir
35969 mkdir dir/subdir/subsubdir
35970 genfile --file dir/file1
35971 genfile --file dir/subdir/file2
35972
35973 setfattr -n user.test -v OurFile1Value dir/file1
35974 setfattr -n user.test -v OurFile2Value dir/subdir/file2
35975 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
35976
35977 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
35978
35979 rm -rf dir
35980
35981 tar --xattrs -xf archive.tar
35982
35983 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
35984 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
35985 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
35986 )"
35987 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
35988 ( $at_check_trace;
35989 mkdir oldgnu
35990 (cd oldgnu
35991 TEST_TAR_FORMAT=oldgnu
35992 export TEST_TAR_FORMAT
35993 TAR_OPTIONS="-H oldgnu"
35994 export TAR_OPTIONS
35995 rm -rf *
35996
35997
35998
35999   file=$(TMPDIR=. mktemp fiXXXXXX)
36000
36001   setfattr -n user.test -v test $file &> /dev/null
36002   if test "$?" != 0; then
36003     exit 77
36004   fi
36005
36006
36007   getfattr $file &> /dev/null
36008   if test "$?" != 0; then
36009     exit 77
36010   fi
36011
36012
36013   file=$(TMPDIR=. mktemp fiXXXXXX)
36014   setfattr -n user.test -v ahoj $file
36015   # check whether tar fails to store xattrs
36016   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36017   if test "$err" != "0"; then
36018     exit 77
36019   fi
36020
36021
36022 mkdir dir
36023 mkdir dir/subdir
36024 mkdir dir/subdir/subsubdir
36025 genfile --file dir/file1
36026 genfile --file dir/subdir/file2
36027
36028 setfattr -n user.test -v OurFile1Value dir/file1
36029 setfattr -n user.test -v OurFile2Value dir/subdir/file2
36030 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
36031
36032 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36033
36034 rm -rf dir
36035
36036 tar --xattrs -xf archive.tar
36037
36038 getfattr -h -d file1        | grep -v -e '^#' -e ^$
36039 getfattr -h -d file2        | grep -v -e '^#' -e ^$
36040 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
36041 )
36042 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36043 at_status=$? at_failed=false
36044 $at_check_filter
36045 at_fn_diff_devnull "$at_stderr" || at_failed=:
36046 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
36047 user.test=\"OurFile2Value\"
36048 user.test=\"OurDirValue\"
36049 " | \
36050   $at_diff - "$at_stdout" || at_failed=:
36051 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
36052 $at_failed && at_fn_log_failure
36053 $at_traceon; }
36054
36055               { set +x
36056 $as_echo "$at_srcdir/xattr02.at:28:
36057 mkdir ustar
36058 (cd ustar
36059 TEST_TAR_FORMAT=ustar
36060 export TEST_TAR_FORMAT
36061 TAR_OPTIONS=\"-H ustar\"
36062 export TAR_OPTIONS
36063 rm -rf *
36064
36065
36066
36067   file=\$(TMPDIR=. mktemp fiXXXXXX)
36068
36069   setfattr -n user.test -v test \$file &> /dev/null
36070   if test \"\$?\" != 0; then
36071     exit 77
36072   fi
36073
36074
36075   getfattr \$file &> /dev/null
36076   if test \"\$?\" != 0; then
36077     exit 77
36078   fi
36079
36080
36081   file=\$(TMPDIR=. mktemp fiXXXXXX)
36082   setfattr -n user.test -v ahoj \$file
36083   # check whether tar fails to store xattrs
36084   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36085   if test \"\$err\" != \"0\"; then
36086     exit 77
36087   fi
36088
36089
36090 mkdir dir
36091 mkdir dir/subdir
36092 mkdir dir/subdir/subsubdir
36093 genfile --file dir/file1
36094 genfile --file dir/subdir/file2
36095
36096 setfattr -n user.test -v OurFile1Value dir/file1
36097 setfattr -n user.test -v OurFile2Value dir/subdir/file2
36098 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
36099
36100 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36101
36102 rm -rf dir
36103
36104 tar --xattrs -xf archive.tar
36105
36106 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
36107 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
36108 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
36109 )"
36110 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
36111 ( $at_check_trace;
36112 mkdir ustar
36113 (cd ustar
36114 TEST_TAR_FORMAT=ustar
36115 export TEST_TAR_FORMAT
36116 TAR_OPTIONS="-H ustar"
36117 export TAR_OPTIONS
36118 rm -rf *
36119
36120
36121
36122   file=$(TMPDIR=. mktemp fiXXXXXX)
36123
36124   setfattr -n user.test -v test $file &> /dev/null
36125   if test "$?" != 0; then
36126     exit 77
36127   fi
36128
36129
36130   getfattr $file &> /dev/null
36131   if test "$?" != 0; then
36132     exit 77
36133   fi
36134
36135
36136   file=$(TMPDIR=. mktemp fiXXXXXX)
36137   setfattr -n user.test -v ahoj $file
36138   # check whether tar fails to store xattrs
36139   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36140   if test "$err" != "0"; then
36141     exit 77
36142   fi
36143
36144
36145 mkdir dir
36146 mkdir dir/subdir
36147 mkdir dir/subdir/subsubdir
36148 genfile --file dir/file1
36149 genfile --file dir/subdir/file2
36150
36151 setfattr -n user.test -v OurFile1Value dir/file1
36152 setfattr -n user.test -v OurFile2Value dir/subdir/file2
36153 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
36154
36155 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36156
36157 rm -rf dir
36158
36159 tar --xattrs -xf archive.tar
36160
36161 getfattr -h -d file1        | grep -v -e '^#' -e ^$
36162 getfattr -h -d file2        | grep -v -e '^#' -e ^$
36163 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
36164 )
36165 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36166 at_status=$? at_failed=false
36167 $at_check_filter
36168 at_fn_diff_devnull "$at_stderr" || at_failed=:
36169 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
36170 user.test=\"OurFile2Value\"
36171 user.test=\"OurDirValue\"
36172 " | \
36173   $at_diff - "$at_stdout" || at_failed=:
36174 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
36175 $at_failed && at_fn_log_failure
36176 $at_traceon; }
36177
36178               { set +x
36179 $as_echo "$at_srcdir/xattr02.at:28:
36180 mkdir posix
36181 (cd posix
36182 TEST_TAR_FORMAT=posix
36183 export TEST_TAR_FORMAT
36184 TAR_OPTIONS=\"-H posix\"
36185 export TAR_OPTIONS
36186 rm -rf *
36187
36188
36189
36190   file=\$(TMPDIR=. mktemp fiXXXXXX)
36191
36192   setfattr -n user.test -v test \$file &> /dev/null
36193   if test \"\$?\" != 0; then
36194     exit 77
36195   fi
36196
36197
36198   getfattr \$file &> /dev/null
36199   if test \"\$?\" != 0; then
36200     exit 77
36201   fi
36202
36203
36204   file=\$(TMPDIR=. mktemp fiXXXXXX)
36205   setfattr -n user.test -v ahoj \$file
36206   # check whether tar fails to store xattrs
36207   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36208   if test \"\$err\" != \"0\"; then
36209     exit 77
36210   fi
36211
36212
36213 mkdir dir
36214 mkdir dir/subdir
36215 mkdir dir/subdir/subsubdir
36216 genfile --file dir/file1
36217 genfile --file dir/subdir/file2
36218
36219 setfattr -n user.test -v OurFile1Value dir/file1
36220 setfattr -n user.test -v OurFile2Value dir/subdir/file2
36221 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
36222
36223 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36224
36225 rm -rf dir
36226
36227 tar --xattrs -xf archive.tar
36228
36229 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
36230 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
36231 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
36232 )"
36233 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
36234 ( $at_check_trace;
36235 mkdir posix
36236 (cd posix
36237 TEST_TAR_FORMAT=posix
36238 export TEST_TAR_FORMAT
36239 TAR_OPTIONS="-H posix"
36240 export TAR_OPTIONS
36241 rm -rf *
36242
36243
36244
36245   file=$(TMPDIR=. mktemp fiXXXXXX)
36246
36247   setfattr -n user.test -v test $file &> /dev/null
36248   if test "$?" != 0; then
36249     exit 77
36250   fi
36251
36252
36253   getfattr $file &> /dev/null
36254   if test "$?" != 0; then
36255     exit 77
36256   fi
36257
36258
36259   file=$(TMPDIR=. mktemp fiXXXXXX)
36260   setfattr -n user.test -v ahoj $file
36261   # check whether tar fails to store xattrs
36262   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36263   if test "$err" != "0"; then
36264     exit 77
36265   fi
36266
36267
36268 mkdir dir
36269 mkdir dir/subdir
36270 mkdir dir/subdir/subsubdir
36271 genfile --file dir/file1
36272 genfile --file dir/subdir/file2
36273
36274 setfattr -n user.test -v OurFile1Value dir/file1
36275 setfattr -n user.test -v OurFile2Value dir/subdir/file2
36276 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
36277
36278 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36279
36280 rm -rf dir
36281
36282 tar --xattrs -xf archive.tar
36283
36284 getfattr -h -d file1        | grep -v -e '^#' -e ^$
36285 getfattr -h -d file2        | grep -v -e '^#' -e ^$
36286 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
36287 )
36288 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36289 at_status=$? at_failed=false
36290 $at_check_filter
36291 at_fn_diff_devnull "$at_stderr" || at_failed=:
36292 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
36293 user.test=\"OurFile2Value\"
36294 user.test=\"OurDirValue\"
36295 " | \
36296   $at_diff - "$at_stdout" || at_failed=:
36297 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
36298 $at_failed && at_fn_log_failure
36299 $at_traceon; }
36300
36301               { set +x
36302 $as_echo "$at_srcdir/xattr02.at:28:
36303 mkdir gnu
36304 (cd gnu
36305 TEST_TAR_FORMAT=gnu
36306 export TEST_TAR_FORMAT
36307 TAR_OPTIONS=\"-H gnu\"
36308 export TAR_OPTIONS
36309 rm -rf *
36310
36311
36312
36313   file=\$(TMPDIR=. mktemp fiXXXXXX)
36314
36315   setfattr -n user.test -v test \$file &> /dev/null
36316   if test \"\$?\" != 0; then
36317     exit 77
36318   fi
36319
36320
36321   getfattr \$file &> /dev/null
36322   if test \"\$?\" != 0; then
36323     exit 77
36324   fi
36325
36326
36327   file=\$(TMPDIR=. mktemp fiXXXXXX)
36328   setfattr -n user.test -v ahoj \$file
36329   # check whether tar fails to store xattrs
36330   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36331   if test \"\$err\" != \"0\"; then
36332     exit 77
36333   fi
36334
36335
36336 mkdir dir
36337 mkdir dir/subdir
36338 mkdir dir/subdir/subsubdir
36339 genfile --file dir/file1
36340 genfile --file dir/subdir/file2
36341
36342 setfattr -n user.test -v OurFile1Value dir/file1
36343 setfattr -n user.test -v OurFile2Value dir/subdir/file2
36344 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
36345
36346 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36347
36348 rm -rf dir
36349
36350 tar --xattrs -xf archive.tar
36351
36352 getfattr -h -d file1        | grep -v -e '^#' -e ^\$
36353 getfattr -h -d file2        | grep -v -e '^#' -e ^\$
36354 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^\$
36355 )"
36356 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr02.at:28"
36357 ( $at_check_trace;
36358 mkdir gnu
36359 (cd gnu
36360 TEST_TAR_FORMAT=gnu
36361 export TEST_TAR_FORMAT
36362 TAR_OPTIONS="-H gnu"
36363 export TAR_OPTIONS
36364 rm -rf *
36365
36366
36367
36368   file=$(TMPDIR=. mktemp fiXXXXXX)
36369
36370   setfattr -n user.test -v test $file &> /dev/null
36371   if test "$?" != 0; then
36372     exit 77
36373   fi
36374
36375
36376   getfattr $file &> /dev/null
36377   if test "$?" != 0; then
36378     exit 77
36379   fi
36380
36381
36382   file=$(TMPDIR=. mktemp fiXXXXXX)
36383   setfattr -n user.test -v ahoj $file
36384   # check whether tar fails to store xattrs
36385   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36386   if test "$err" != "0"; then
36387     exit 77
36388   fi
36389
36390
36391 mkdir dir
36392 mkdir dir/subdir
36393 mkdir dir/subdir/subsubdir
36394 genfile --file dir/file1
36395 genfile --file dir/subdir/file2
36396
36397 setfattr -n user.test -v OurFile1Value dir/file1
36398 setfattr -n user.test -v OurFile2Value dir/subdir/file2
36399 setfattr -n user.test -v OurDirValue   dir/subdir/subsubdir
36400
36401 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36402
36403 rm -rf dir
36404
36405 tar --xattrs -xf archive.tar
36406
36407 getfattr -h -d file1        | grep -v -e '^#' -e ^$
36408 getfattr -h -d file2        | grep -v -e '^#' -e ^$
36409 getfattr -h -d subsubdir    | grep -v -e '^#' -e ^$
36410 )
36411 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36412 at_status=$? at_failed=false
36413 $at_check_filter
36414 at_fn_diff_devnull "$at_stderr" || at_failed=:
36415 echo >>"$at_stdout"; $as_echo "user.test=\"OurFile1Value\"
36416 user.test=\"OurFile2Value\"
36417 user.test=\"OurDirValue\"
36418 " | \
36419   $at_diff - "$at_stdout" || at_failed=:
36420 at_fn_check_status 0 $at_status "$at_srcdir/xattr02.at:28"
36421 $at_failed && at_fn_log_failure
36422 $at_traceon; }
36423
36424
36425
36426
36427   set +x
36428   $at_times_p && times >"$at_times_file"
36429 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
36430 read at_status <"$at_status_file"
36431 #AT_STOP_169
36432 #AT_START_170
36433 at_fn_group_banner 170 'xattr03.at:25' \
36434   "xattrs: trusted.* attributes" "                   " 25
36435 at_xfail=no
36436       test -f $XFAILFILE && at_xfail=yes
36437 (
36438   $as_echo "170. $at_setup_line: testing $at_desc ..."
36439   $at_traceon
36440
36441
36442
36443
36444
36445   { set +x
36446 $as_echo "$at_srcdir/xattr03.at:28:
36447 mkdir v7
36448 (cd v7
36449 TEST_TAR_FORMAT=v7
36450 export TEST_TAR_FORMAT
36451 TAR_OPTIONS=\"-H v7\"
36452 export TAR_OPTIONS
36453 rm -rf *
36454
36455
36456 echo \"test\" > \$\$
36457 chmod 0 \$\$
36458 cat \$\$ > /dev/null 2>&1
36459 result=\$?
36460 rm -f \$\$
36461 test \$result -eq 0 || exit 77
36462
36463
36464
36465   file=\$(TMPDIR=. mktemp fiXXXXXX)
36466
36467   setfattr -n user.test -v test \$file &> /dev/null
36468   if test \"\$?\" != 0; then
36469     exit 77
36470   fi
36471
36472
36473   getfattr \$file &> /dev/null
36474   if test \"\$?\" != 0; then
36475     exit 77
36476   fi
36477
36478
36479   file=\$(TMPDIR=. mktemp fiXXXXXX)
36480   setfattr -n user.test -v ahoj \$file
36481   # check whether tar fails to store xattrs
36482   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36483   if test \"\$err\" != \"0\"; then
36484     exit 77
36485   fi
36486
36487
36488 mkdir dir
36489 mkdir dir/subdir
36490 mkdir dir/subdir/subsubdir
36491 genfile --file dir/file1
36492 genfile --file dir/subdir/file2
36493
36494 setfattr -n trusted.test -v OurFile1Value dir/file1
36495 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36496 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36497
36498 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36499
36500 rm -rf dir
36501
36502 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36503
36504 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
36505 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
36506 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
36507 )"
36508 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
36509 ( $at_check_trace;
36510 mkdir v7
36511 (cd v7
36512 TEST_TAR_FORMAT=v7
36513 export TEST_TAR_FORMAT
36514 TAR_OPTIONS="-H v7"
36515 export TAR_OPTIONS
36516 rm -rf *
36517
36518
36519 echo "test" > $$
36520 chmod 0 $$
36521 cat $$ > /dev/null 2>&1
36522 result=$?
36523 rm -f $$
36524 test $result -eq 0 || exit 77
36525
36526
36527
36528   file=$(TMPDIR=. mktemp fiXXXXXX)
36529
36530   setfattr -n user.test -v test $file &> /dev/null
36531   if test "$?" != 0; then
36532     exit 77
36533   fi
36534
36535
36536   getfattr $file &> /dev/null
36537   if test "$?" != 0; then
36538     exit 77
36539   fi
36540
36541
36542   file=$(TMPDIR=. mktemp fiXXXXXX)
36543   setfattr -n user.test -v ahoj $file
36544   # check whether tar fails to store xattrs
36545   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36546   if test "$err" != "0"; then
36547     exit 77
36548   fi
36549
36550
36551 mkdir dir
36552 mkdir dir/subdir
36553 mkdir dir/subdir/subsubdir
36554 genfile --file dir/file1
36555 genfile --file dir/subdir/file2
36556
36557 setfattr -n trusted.test -v OurFile1Value dir/file1
36558 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36559 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36560
36561 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36562
36563 rm -rf dir
36564
36565 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36566
36567 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36568 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36569 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36570 )
36571 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36572 at_status=$? at_failed=false
36573 $at_check_filter
36574 at_fn_diff_devnull "$at_stderr" || at_failed=:
36575 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36576 trusted.test=\"OurFile2Value\"
36577 trusted.test=\"OurDirValue\"
36578 " | \
36579   $at_diff - "$at_stdout" || at_failed=:
36580 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36581 $at_failed && at_fn_log_failure
36582 $at_traceon; }
36583
36584               { set +x
36585 $as_echo "$at_srcdir/xattr03.at:28:
36586 mkdir oldgnu
36587 (cd oldgnu
36588 TEST_TAR_FORMAT=oldgnu
36589 export TEST_TAR_FORMAT
36590 TAR_OPTIONS=\"-H oldgnu\"
36591 export TAR_OPTIONS
36592 rm -rf *
36593
36594
36595 echo \"test\" > \$\$
36596 chmod 0 \$\$
36597 cat \$\$ > /dev/null 2>&1
36598 result=\$?
36599 rm -f \$\$
36600 test \$result -eq 0 || exit 77
36601
36602
36603
36604   file=\$(TMPDIR=. mktemp fiXXXXXX)
36605
36606   setfattr -n user.test -v test \$file &> /dev/null
36607   if test \"\$?\" != 0; then
36608     exit 77
36609   fi
36610
36611
36612   getfattr \$file &> /dev/null
36613   if test \"\$?\" != 0; then
36614     exit 77
36615   fi
36616
36617
36618   file=\$(TMPDIR=. mktemp fiXXXXXX)
36619   setfattr -n user.test -v ahoj \$file
36620   # check whether tar fails to store xattrs
36621   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36622   if test \"\$err\" != \"0\"; then
36623     exit 77
36624   fi
36625
36626
36627 mkdir dir
36628 mkdir dir/subdir
36629 mkdir dir/subdir/subsubdir
36630 genfile --file dir/file1
36631 genfile --file dir/subdir/file2
36632
36633 setfattr -n trusted.test -v OurFile1Value dir/file1
36634 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36635 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36636
36637 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36638
36639 rm -rf dir
36640
36641 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36642
36643 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
36644 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
36645 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
36646 )"
36647 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
36648 ( $at_check_trace;
36649 mkdir oldgnu
36650 (cd oldgnu
36651 TEST_TAR_FORMAT=oldgnu
36652 export TEST_TAR_FORMAT
36653 TAR_OPTIONS="-H oldgnu"
36654 export TAR_OPTIONS
36655 rm -rf *
36656
36657
36658 echo "test" > $$
36659 chmod 0 $$
36660 cat $$ > /dev/null 2>&1
36661 result=$?
36662 rm -f $$
36663 test $result -eq 0 || exit 77
36664
36665
36666
36667   file=$(TMPDIR=. mktemp fiXXXXXX)
36668
36669   setfattr -n user.test -v test $file &> /dev/null
36670   if test "$?" != 0; then
36671     exit 77
36672   fi
36673
36674
36675   getfattr $file &> /dev/null
36676   if test "$?" != 0; then
36677     exit 77
36678   fi
36679
36680
36681   file=$(TMPDIR=. mktemp fiXXXXXX)
36682   setfattr -n user.test -v ahoj $file
36683   # check whether tar fails to store xattrs
36684   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36685   if test "$err" != "0"; then
36686     exit 77
36687   fi
36688
36689
36690 mkdir dir
36691 mkdir dir/subdir
36692 mkdir dir/subdir/subsubdir
36693 genfile --file dir/file1
36694 genfile --file dir/subdir/file2
36695
36696 setfattr -n trusted.test -v OurFile1Value dir/file1
36697 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36698 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36699
36700 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36701
36702 rm -rf dir
36703
36704 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36705
36706 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36707 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36708 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36709 )
36710 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36711 at_status=$? at_failed=false
36712 $at_check_filter
36713 at_fn_diff_devnull "$at_stderr" || at_failed=:
36714 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36715 trusted.test=\"OurFile2Value\"
36716 trusted.test=\"OurDirValue\"
36717 " | \
36718   $at_diff - "$at_stdout" || at_failed=:
36719 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36720 $at_failed && at_fn_log_failure
36721 $at_traceon; }
36722
36723               { set +x
36724 $as_echo "$at_srcdir/xattr03.at:28:
36725 mkdir ustar
36726 (cd ustar
36727 TEST_TAR_FORMAT=ustar
36728 export TEST_TAR_FORMAT
36729 TAR_OPTIONS=\"-H ustar\"
36730 export TAR_OPTIONS
36731 rm -rf *
36732
36733
36734 echo \"test\" > \$\$
36735 chmod 0 \$\$
36736 cat \$\$ > /dev/null 2>&1
36737 result=\$?
36738 rm -f \$\$
36739 test \$result -eq 0 || exit 77
36740
36741
36742
36743   file=\$(TMPDIR=. mktemp fiXXXXXX)
36744
36745   setfattr -n user.test -v test \$file &> /dev/null
36746   if test \"\$?\" != 0; then
36747     exit 77
36748   fi
36749
36750
36751   getfattr \$file &> /dev/null
36752   if test \"\$?\" != 0; then
36753     exit 77
36754   fi
36755
36756
36757   file=\$(TMPDIR=. mktemp fiXXXXXX)
36758   setfattr -n user.test -v ahoj \$file
36759   # check whether tar fails to store xattrs
36760   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36761   if test \"\$err\" != \"0\"; then
36762     exit 77
36763   fi
36764
36765
36766 mkdir dir
36767 mkdir dir/subdir
36768 mkdir dir/subdir/subsubdir
36769 genfile --file dir/file1
36770 genfile --file dir/subdir/file2
36771
36772 setfattr -n trusted.test -v OurFile1Value dir/file1
36773 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36774 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36775
36776 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36777
36778 rm -rf dir
36779
36780 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36781
36782 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
36783 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
36784 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
36785 )"
36786 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
36787 ( $at_check_trace;
36788 mkdir ustar
36789 (cd ustar
36790 TEST_TAR_FORMAT=ustar
36791 export TEST_TAR_FORMAT
36792 TAR_OPTIONS="-H ustar"
36793 export TAR_OPTIONS
36794 rm -rf *
36795
36796
36797 echo "test" > $$
36798 chmod 0 $$
36799 cat $$ > /dev/null 2>&1
36800 result=$?
36801 rm -f $$
36802 test $result -eq 0 || exit 77
36803
36804
36805
36806   file=$(TMPDIR=. mktemp fiXXXXXX)
36807
36808   setfattr -n user.test -v test $file &> /dev/null
36809   if test "$?" != 0; then
36810     exit 77
36811   fi
36812
36813
36814   getfattr $file &> /dev/null
36815   if test "$?" != 0; then
36816     exit 77
36817   fi
36818
36819
36820   file=$(TMPDIR=. mktemp fiXXXXXX)
36821   setfattr -n user.test -v ahoj $file
36822   # check whether tar fails to store xattrs
36823   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36824   if test "$err" != "0"; then
36825     exit 77
36826   fi
36827
36828
36829 mkdir dir
36830 mkdir dir/subdir
36831 mkdir dir/subdir/subsubdir
36832 genfile --file dir/file1
36833 genfile --file dir/subdir/file2
36834
36835 setfattr -n trusted.test -v OurFile1Value dir/file1
36836 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36837 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36838
36839 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36840
36841 rm -rf dir
36842
36843 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36844
36845 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36846 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36847 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36848 )
36849 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36850 at_status=$? at_failed=false
36851 $at_check_filter
36852 at_fn_diff_devnull "$at_stderr" || at_failed=:
36853 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36854 trusted.test=\"OurFile2Value\"
36855 trusted.test=\"OurDirValue\"
36856 " | \
36857   $at_diff - "$at_stdout" || at_failed=:
36858 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36859 $at_failed && at_fn_log_failure
36860 $at_traceon; }
36861
36862               { set +x
36863 $as_echo "$at_srcdir/xattr03.at:28:
36864 mkdir posix
36865 (cd posix
36866 TEST_TAR_FORMAT=posix
36867 export TEST_TAR_FORMAT
36868 TAR_OPTIONS=\"-H posix\"
36869 export TAR_OPTIONS
36870 rm -rf *
36871
36872
36873 echo \"test\" > \$\$
36874 chmod 0 \$\$
36875 cat \$\$ > /dev/null 2>&1
36876 result=\$?
36877 rm -f \$\$
36878 test \$result -eq 0 || exit 77
36879
36880
36881
36882   file=\$(TMPDIR=. mktemp fiXXXXXX)
36883
36884   setfattr -n user.test -v test \$file &> /dev/null
36885   if test \"\$?\" != 0; then
36886     exit 77
36887   fi
36888
36889
36890   getfattr \$file &> /dev/null
36891   if test \"\$?\" != 0; then
36892     exit 77
36893   fi
36894
36895
36896   file=\$(TMPDIR=. mktemp fiXXXXXX)
36897   setfattr -n user.test -v ahoj \$file
36898   # check whether tar fails to store xattrs
36899   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
36900   if test \"\$err\" != \"0\"; then
36901     exit 77
36902   fi
36903
36904
36905 mkdir dir
36906 mkdir dir/subdir
36907 mkdir dir/subdir/subsubdir
36908 genfile --file dir/file1
36909 genfile --file dir/subdir/file2
36910
36911 setfattr -n trusted.test -v OurFile1Value dir/file1
36912 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36913 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36914
36915 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36916
36917 rm -rf dir
36918
36919 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36920
36921 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
36922 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
36923 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
36924 )"
36925 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
36926 ( $at_check_trace;
36927 mkdir posix
36928 (cd posix
36929 TEST_TAR_FORMAT=posix
36930 export TEST_TAR_FORMAT
36931 TAR_OPTIONS="-H posix"
36932 export TAR_OPTIONS
36933 rm -rf *
36934
36935
36936 echo "test" > $$
36937 chmod 0 $$
36938 cat $$ > /dev/null 2>&1
36939 result=$?
36940 rm -f $$
36941 test $result -eq 0 || exit 77
36942
36943
36944
36945   file=$(TMPDIR=. mktemp fiXXXXXX)
36946
36947   setfattr -n user.test -v test $file &> /dev/null
36948   if test "$?" != 0; then
36949     exit 77
36950   fi
36951
36952
36953   getfattr $file &> /dev/null
36954   if test "$?" != 0; then
36955     exit 77
36956   fi
36957
36958
36959   file=$(TMPDIR=. mktemp fiXXXXXX)
36960   setfattr -n user.test -v ahoj $file
36961   # check whether tar fails to store xattrs
36962   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
36963   if test "$err" != "0"; then
36964     exit 77
36965   fi
36966
36967
36968 mkdir dir
36969 mkdir dir/subdir
36970 mkdir dir/subdir/subsubdir
36971 genfile --file dir/file1
36972 genfile --file dir/subdir/file2
36973
36974 setfattr -n trusted.test -v OurFile1Value dir/file1
36975 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
36976 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
36977
36978 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
36979
36980 rm -rf dir
36981
36982 tar --xattrs --xattrs-include=trusted* -xf archive.tar
36983
36984 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
36985 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
36986 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
36987 )
36988 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
36989 at_status=$? at_failed=false
36990 $at_check_filter
36991 at_fn_diff_devnull "$at_stderr" || at_failed=:
36992 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
36993 trusted.test=\"OurFile2Value\"
36994 trusted.test=\"OurDirValue\"
36995 " | \
36996   $at_diff - "$at_stdout" || at_failed=:
36997 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
36998 $at_failed && at_fn_log_failure
36999 $at_traceon; }
37000
37001               { set +x
37002 $as_echo "$at_srcdir/xattr03.at:28:
37003 mkdir gnu
37004 (cd gnu
37005 TEST_TAR_FORMAT=gnu
37006 export TEST_TAR_FORMAT
37007 TAR_OPTIONS=\"-H gnu\"
37008 export TAR_OPTIONS
37009 rm -rf *
37010
37011
37012 echo \"test\" > \$\$
37013 chmod 0 \$\$
37014 cat \$\$ > /dev/null 2>&1
37015 result=\$?
37016 rm -f \$\$
37017 test \$result -eq 0 || exit 77
37018
37019
37020
37021   file=\$(TMPDIR=. mktemp fiXXXXXX)
37022
37023   setfattr -n user.test -v test \$file &> /dev/null
37024   if test \"\$?\" != 0; then
37025     exit 77
37026   fi
37027
37028
37029   getfattr \$file &> /dev/null
37030   if test \"\$?\" != 0; then
37031     exit 77
37032   fi
37033
37034
37035   file=\$(TMPDIR=. mktemp fiXXXXXX)
37036   setfattr -n user.test -v ahoj \$file
37037   # check whether tar fails to store xattrs
37038   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37039   if test \"\$err\" != \"0\"; then
37040     exit 77
37041   fi
37042
37043
37044 mkdir dir
37045 mkdir dir/subdir
37046 mkdir dir/subdir/subsubdir
37047 genfile --file dir/file1
37048 genfile --file dir/subdir/file2
37049
37050 setfattr -n trusted.test -v OurFile1Value dir/file1
37051 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
37052 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
37053
37054 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
37055
37056 rm -rf dir
37057
37058 tar --xattrs --xattrs-include=trusted* -xf archive.tar
37059
37060 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^\$
37061 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^\$
37062 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^\$
37063 )"
37064 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr03.at:28"
37065 ( $at_check_trace;
37066 mkdir gnu
37067 (cd gnu
37068 TEST_TAR_FORMAT=gnu
37069 export TEST_TAR_FORMAT
37070 TAR_OPTIONS="-H gnu"
37071 export TAR_OPTIONS
37072 rm -rf *
37073
37074
37075 echo "test" > $$
37076 chmod 0 $$
37077 cat $$ > /dev/null 2>&1
37078 result=$?
37079 rm -f $$
37080 test $result -eq 0 || exit 77
37081
37082
37083
37084   file=$(TMPDIR=. mktemp fiXXXXXX)
37085
37086   setfattr -n user.test -v test $file &> /dev/null
37087   if test "$?" != 0; then
37088     exit 77
37089   fi
37090
37091
37092   getfattr $file &> /dev/null
37093   if test "$?" != 0; then
37094     exit 77
37095   fi
37096
37097
37098   file=$(TMPDIR=. mktemp fiXXXXXX)
37099   setfattr -n user.test -v ahoj $file
37100   # check whether tar fails to store xattrs
37101   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37102   if test "$err" != "0"; then
37103     exit 77
37104   fi
37105
37106
37107 mkdir dir
37108 mkdir dir/subdir
37109 mkdir dir/subdir/subsubdir
37110 genfile --file dir/file1
37111 genfile --file dir/subdir/file2
37112
37113 setfattr -n trusted.test -v OurFile1Value dir/file1
37114 setfattr -n trusted.test -v OurFile2Value dir/subdir/file2
37115 setfattr -n trusted.test -v OurDirValue   dir/subdir/subsubdir
37116
37117 tar --xattrs -cf archive.tar -C dir file1 -C subdir file2 subsubdir
37118
37119 rm -rf dir
37120
37121 tar --xattrs --xattrs-include=trusted* -xf archive.tar
37122
37123 getfattr -mtrusted. -d file1        | grep -v -e '^#' -e ^$
37124 getfattr -mtrusted. -d file2        | grep -v -e '^#' -e ^$
37125 getfattr -mtrusted. -d subsubdir    | grep -v -e '^#' -e ^$
37126 )
37127 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37128 at_status=$? at_failed=false
37129 $at_check_filter
37130 at_fn_diff_devnull "$at_stderr" || at_failed=:
37131 echo >>"$at_stdout"; $as_echo "trusted.test=\"OurFile1Value\"
37132 trusted.test=\"OurFile2Value\"
37133 trusted.test=\"OurDirValue\"
37134 " | \
37135   $at_diff - "$at_stdout" || at_failed=:
37136 at_fn_check_status 0 $at_status "$at_srcdir/xattr03.at:28"
37137 $at_failed && at_fn_log_failure
37138 $at_traceon; }
37139
37140
37141
37142
37143   set +x
37144   $at_times_p && times >"$at_times_file"
37145 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37146 read at_status <"$at_status_file"
37147 #AT_STOP_170
37148 #AT_START_171
37149 at_fn_group_banner 171 'xattr04.at:26' \
37150   "xattrs: s/open/openat/ regression" "              " 25
37151 at_xfail=no
37152       test -f $XFAILFILE && at_xfail=yes
37153 (
37154   $as_echo "171. $at_setup_line: testing $at_desc ..."
37155   $at_traceon
37156
37157
37158
37159
37160
37161   { set +x
37162 $as_echo "$at_srcdir/xattr04.at:29:
37163 mkdir v7
37164 (cd v7
37165 TEST_TAR_FORMAT=v7
37166 export TEST_TAR_FORMAT
37167 TAR_OPTIONS=\"-H v7\"
37168 export TAR_OPTIONS
37169 rm -rf *
37170
37171
37172
37173   file=\$(TMPDIR=. mktemp fiXXXXXX)
37174
37175   setfattr -n user.test -v test \$file &> /dev/null
37176   if test \"\$?\" != 0; then
37177     exit 77
37178   fi
37179
37180
37181   getfattr \$file &> /dev/null
37182   if test \"\$?\" != 0; then
37183     exit 77
37184   fi
37185
37186
37187   file=\$(TMPDIR=. mktemp fiXXXXXX)
37188   setfattr -n user.test -v ahoj \$file
37189   # check whether tar fails to store xattrs
37190   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37191   if test \"\$err\" != \"0\"; then
37192     exit 77
37193   fi
37194
37195
37196 mkdir dir
37197 mkdir output
37198 genfile --file dir/file
37199
37200 setfattr -n user.test -v value dir/file
37201
37202 # archive whole directory including binary xattrs
37203 tar --xattrs -cf archive.tar -C dir .
37204
37205 tar --xattrs -xf archive.tar -C output
37206 ret=\$?
37207 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
37208 exit \$ret
37209 )"
37210 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
37211 ( $at_check_trace;
37212 mkdir v7
37213 (cd v7
37214 TEST_TAR_FORMAT=v7
37215 export TEST_TAR_FORMAT
37216 TAR_OPTIONS="-H v7"
37217 export TAR_OPTIONS
37218 rm -rf *
37219
37220
37221
37222   file=$(TMPDIR=. mktemp fiXXXXXX)
37223
37224   setfattr -n user.test -v test $file &> /dev/null
37225   if test "$?" != 0; then
37226     exit 77
37227   fi
37228
37229
37230   getfattr $file &> /dev/null
37231   if test "$?" != 0; then
37232     exit 77
37233   fi
37234
37235
37236   file=$(TMPDIR=. mktemp fiXXXXXX)
37237   setfattr -n user.test -v ahoj $file
37238   # check whether tar fails to store xattrs
37239   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37240   if test "$err" != "0"; then
37241     exit 77
37242   fi
37243
37244
37245 mkdir dir
37246 mkdir output
37247 genfile --file dir/file
37248
37249 setfattr -n user.test -v value dir/file
37250
37251 # archive whole directory including binary xattrs
37252 tar --xattrs -cf archive.tar -C dir .
37253
37254 tar --xattrs -xf archive.tar -C output
37255 ret=$?
37256 getfattr -h -d output/file | grep -v -e '^#' -e ^$
37257 exit $ret
37258 )
37259 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37260 at_status=$? at_failed=false
37261 $at_check_filter
37262 at_fn_diff_devnull "$at_stderr" || at_failed=:
37263 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
37264 " | \
37265   $at_diff - "$at_stdout" || at_failed=:
37266 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
37267 $at_failed && at_fn_log_failure
37268 $at_traceon; }
37269
37270               { set +x
37271 $as_echo "$at_srcdir/xattr04.at:29:
37272 mkdir oldgnu
37273 (cd oldgnu
37274 TEST_TAR_FORMAT=oldgnu
37275 export TEST_TAR_FORMAT
37276 TAR_OPTIONS=\"-H oldgnu\"
37277 export TAR_OPTIONS
37278 rm -rf *
37279
37280
37281
37282   file=\$(TMPDIR=. mktemp fiXXXXXX)
37283
37284   setfattr -n user.test -v test \$file &> /dev/null
37285   if test \"\$?\" != 0; then
37286     exit 77
37287   fi
37288
37289
37290   getfattr \$file &> /dev/null
37291   if test \"\$?\" != 0; then
37292     exit 77
37293   fi
37294
37295
37296   file=\$(TMPDIR=. mktemp fiXXXXXX)
37297   setfattr -n user.test -v ahoj \$file
37298   # check whether tar fails to store xattrs
37299   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37300   if test \"\$err\" != \"0\"; then
37301     exit 77
37302   fi
37303
37304
37305 mkdir dir
37306 mkdir output
37307 genfile --file dir/file
37308
37309 setfattr -n user.test -v value dir/file
37310
37311 # archive whole directory including binary xattrs
37312 tar --xattrs -cf archive.tar -C dir .
37313
37314 tar --xattrs -xf archive.tar -C output
37315 ret=\$?
37316 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
37317 exit \$ret
37318 )"
37319 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
37320 ( $at_check_trace;
37321 mkdir oldgnu
37322 (cd oldgnu
37323 TEST_TAR_FORMAT=oldgnu
37324 export TEST_TAR_FORMAT
37325 TAR_OPTIONS="-H oldgnu"
37326 export TAR_OPTIONS
37327 rm -rf *
37328
37329
37330
37331   file=$(TMPDIR=. mktemp fiXXXXXX)
37332
37333   setfattr -n user.test -v test $file &> /dev/null
37334   if test "$?" != 0; then
37335     exit 77
37336   fi
37337
37338
37339   getfattr $file &> /dev/null
37340   if test "$?" != 0; then
37341     exit 77
37342   fi
37343
37344
37345   file=$(TMPDIR=. mktemp fiXXXXXX)
37346   setfattr -n user.test -v ahoj $file
37347   # check whether tar fails to store xattrs
37348   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37349   if test "$err" != "0"; then
37350     exit 77
37351   fi
37352
37353
37354 mkdir dir
37355 mkdir output
37356 genfile --file dir/file
37357
37358 setfattr -n user.test -v value dir/file
37359
37360 # archive whole directory including binary xattrs
37361 tar --xattrs -cf archive.tar -C dir .
37362
37363 tar --xattrs -xf archive.tar -C output
37364 ret=$?
37365 getfattr -h -d output/file | grep -v -e '^#' -e ^$
37366 exit $ret
37367 )
37368 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37369 at_status=$? at_failed=false
37370 $at_check_filter
37371 at_fn_diff_devnull "$at_stderr" || at_failed=:
37372 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
37373 " | \
37374   $at_diff - "$at_stdout" || at_failed=:
37375 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
37376 $at_failed && at_fn_log_failure
37377 $at_traceon; }
37378
37379               { set +x
37380 $as_echo "$at_srcdir/xattr04.at:29:
37381 mkdir ustar
37382 (cd ustar
37383 TEST_TAR_FORMAT=ustar
37384 export TEST_TAR_FORMAT
37385 TAR_OPTIONS=\"-H ustar\"
37386 export TAR_OPTIONS
37387 rm -rf *
37388
37389
37390
37391   file=\$(TMPDIR=. mktemp fiXXXXXX)
37392
37393   setfattr -n user.test -v test \$file &> /dev/null
37394   if test \"\$?\" != 0; then
37395     exit 77
37396   fi
37397
37398
37399   getfattr \$file &> /dev/null
37400   if test \"\$?\" != 0; then
37401     exit 77
37402   fi
37403
37404
37405   file=\$(TMPDIR=. mktemp fiXXXXXX)
37406   setfattr -n user.test -v ahoj \$file
37407   # check whether tar fails to store xattrs
37408   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37409   if test \"\$err\" != \"0\"; then
37410     exit 77
37411   fi
37412
37413
37414 mkdir dir
37415 mkdir output
37416 genfile --file dir/file
37417
37418 setfattr -n user.test -v value dir/file
37419
37420 # archive whole directory including binary xattrs
37421 tar --xattrs -cf archive.tar -C dir .
37422
37423 tar --xattrs -xf archive.tar -C output
37424 ret=\$?
37425 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
37426 exit \$ret
37427 )"
37428 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
37429 ( $at_check_trace;
37430 mkdir ustar
37431 (cd ustar
37432 TEST_TAR_FORMAT=ustar
37433 export TEST_TAR_FORMAT
37434 TAR_OPTIONS="-H ustar"
37435 export TAR_OPTIONS
37436 rm -rf *
37437
37438
37439
37440   file=$(TMPDIR=. mktemp fiXXXXXX)
37441
37442   setfattr -n user.test -v test $file &> /dev/null
37443   if test "$?" != 0; then
37444     exit 77
37445   fi
37446
37447
37448   getfattr $file &> /dev/null
37449   if test "$?" != 0; then
37450     exit 77
37451   fi
37452
37453
37454   file=$(TMPDIR=. mktemp fiXXXXXX)
37455   setfattr -n user.test -v ahoj $file
37456   # check whether tar fails to store xattrs
37457   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37458   if test "$err" != "0"; then
37459     exit 77
37460   fi
37461
37462
37463 mkdir dir
37464 mkdir output
37465 genfile --file dir/file
37466
37467 setfattr -n user.test -v value dir/file
37468
37469 # archive whole directory including binary xattrs
37470 tar --xattrs -cf archive.tar -C dir .
37471
37472 tar --xattrs -xf archive.tar -C output
37473 ret=$?
37474 getfattr -h -d output/file | grep -v -e '^#' -e ^$
37475 exit $ret
37476 )
37477 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37478 at_status=$? at_failed=false
37479 $at_check_filter
37480 at_fn_diff_devnull "$at_stderr" || at_failed=:
37481 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
37482 " | \
37483   $at_diff - "$at_stdout" || at_failed=:
37484 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
37485 $at_failed && at_fn_log_failure
37486 $at_traceon; }
37487
37488               { set +x
37489 $as_echo "$at_srcdir/xattr04.at:29:
37490 mkdir posix
37491 (cd posix
37492 TEST_TAR_FORMAT=posix
37493 export TEST_TAR_FORMAT
37494 TAR_OPTIONS=\"-H posix\"
37495 export TAR_OPTIONS
37496 rm -rf *
37497
37498
37499
37500   file=\$(TMPDIR=. mktemp fiXXXXXX)
37501
37502   setfattr -n user.test -v test \$file &> /dev/null
37503   if test \"\$?\" != 0; then
37504     exit 77
37505   fi
37506
37507
37508   getfattr \$file &> /dev/null
37509   if test \"\$?\" != 0; then
37510     exit 77
37511   fi
37512
37513
37514   file=\$(TMPDIR=. mktemp fiXXXXXX)
37515   setfattr -n user.test -v ahoj \$file
37516   # check whether tar fails to store xattrs
37517   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37518   if test \"\$err\" != \"0\"; then
37519     exit 77
37520   fi
37521
37522
37523 mkdir dir
37524 mkdir output
37525 genfile --file dir/file
37526
37527 setfattr -n user.test -v value dir/file
37528
37529 # archive whole directory including binary xattrs
37530 tar --xattrs -cf archive.tar -C dir .
37531
37532 tar --xattrs -xf archive.tar -C output
37533 ret=\$?
37534 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
37535 exit \$ret
37536 )"
37537 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
37538 ( $at_check_trace;
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.test -v value dir/file
37577
37578 # archive whole directory including binary xattrs
37579 tar --xattrs -cf archive.tar -C dir .
37580
37581 tar --xattrs -xf archive.tar -C output
37582 ret=$?
37583 getfattr -h -d output/file | grep -v -e '^#' -e ^$
37584 exit $ret
37585 )
37586 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37587 at_status=$? at_failed=false
37588 $at_check_filter
37589 at_fn_diff_devnull "$at_stderr" || at_failed=:
37590 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
37591 " | \
37592   $at_diff - "$at_stdout" || at_failed=:
37593 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
37594 $at_failed && at_fn_log_failure
37595 $at_traceon; }
37596
37597               { set +x
37598 $as_echo "$at_srcdir/xattr04.at:29:
37599 mkdir gnu
37600 (cd gnu
37601 TEST_TAR_FORMAT=gnu
37602 export TEST_TAR_FORMAT
37603 TAR_OPTIONS=\"-H gnu\"
37604 export TAR_OPTIONS
37605 rm -rf *
37606
37607
37608
37609   file=\$(TMPDIR=. mktemp fiXXXXXX)
37610
37611   setfattr -n user.test -v test \$file &> /dev/null
37612   if test \"\$?\" != 0; then
37613     exit 77
37614   fi
37615
37616
37617   getfattr \$file &> /dev/null
37618   if test \"\$?\" != 0; then
37619     exit 77
37620   fi
37621
37622
37623   file=\$(TMPDIR=. mktemp fiXXXXXX)
37624   setfattr -n user.test -v ahoj \$file
37625   # check whether tar fails to store xattrs
37626   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37627   if test \"\$err\" != \"0\"; then
37628     exit 77
37629   fi
37630
37631
37632 mkdir dir
37633 mkdir output
37634 genfile --file dir/file
37635
37636 setfattr -n user.test -v value dir/file
37637
37638 # archive whole directory including binary xattrs
37639 tar --xattrs -cf archive.tar -C dir .
37640
37641 tar --xattrs -xf archive.tar -C output
37642 ret=\$?
37643 getfattr -h -d output/file | grep -v -e '^#' -e ^\$
37644 exit \$ret
37645 )"
37646 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr04.at:29"
37647 ( $at_check_trace;
37648 mkdir gnu
37649 (cd gnu
37650 TEST_TAR_FORMAT=gnu
37651 export TEST_TAR_FORMAT
37652 TAR_OPTIONS="-H gnu"
37653 export TAR_OPTIONS
37654 rm -rf *
37655
37656
37657
37658   file=$(TMPDIR=. mktemp fiXXXXXX)
37659
37660   setfattr -n user.test -v test $file &> /dev/null
37661   if test "$?" != 0; then
37662     exit 77
37663   fi
37664
37665
37666   getfattr $file &> /dev/null
37667   if test "$?" != 0; then
37668     exit 77
37669   fi
37670
37671
37672   file=$(TMPDIR=. mktemp fiXXXXXX)
37673   setfattr -n user.test -v ahoj $file
37674   # check whether tar fails to store xattrs
37675   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37676   if test "$err" != "0"; then
37677     exit 77
37678   fi
37679
37680
37681 mkdir dir
37682 mkdir output
37683 genfile --file dir/file
37684
37685 setfattr -n user.test -v value dir/file
37686
37687 # archive whole directory including binary xattrs
37688 tar --xattrs -cf archive.tar -C dir .
37689
37690 tar --xattrs -xf archive.tar -C output
37691 ret=$?
37692 getfattr -h -d output/file | grep -v -e '^#' -e ^$
37693 exit $ret
37694 )
37695 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37696 at_status=$? at_failed=false
37697 $at_check_filter
37698 at_fn_diff_devnull "$at_stderr" || at_failed=:
37699 echo >>"$at_stdout"; $as_echo "user.test=\"value\"
37700 " | \
37701   $at_diff - "$at_stdout" || at_failed=:
37702 at_fn_check_status 0 $at_status "$at_srcdir/xattr04.at:29"
37703 $at_failed && at_fn_log_failure
37704 $at_traceon; }
37705
37706
37707
37708
37709   set +x
37710   $at_times_p && times >"$at_times_file"
37711 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
37712 read at_status <"$at_status_file"
37713 #AT_STOP_171
37714 #AT_START_172
37715 at_fn_group_banner 172 'xattr05.at:28' \
37716   "xattrs: keywords with '=' and '%'" "              " 25
37717 at_xfail=no
37718       test -f $XFAILFILE && at_xfail=yes
37719 (
37720   $as_echo "172. $at_setup_line: testing $at_desc ..."
37721   $at_traceon
37722
37723
37724
37725
37726
37727   { set +x
37728 $as_echo "$at_srcdir/xattr05.at:31:
37729 mkdir v7
37730 (cd v7
37731 TEST_TAR_FORMAT=v7
37732 export TEST_TAR_FORMAT
37733 TAR_OPTIONS=\"-H v7\"
37734 export TAR_OPTIONS
37735 rm -rf *
37736
37737
37738
37739   file=\$(TMPDIR=. mktemp fiXXXXXX)
37740
37741   setfattr -n user.test -v test \$file &> /dev/null
37742   if test \"\$?\" != 0; then
37743     exit 77
37744   fi
37745
37746
37747   getfattr \$file &> /dev/null
37748   if test \"\$?\" != 0; then
37749     exit 77
37750   fi
37751
37752
37753   file=\$(TMPDIR=. mktemp fiXXXXXX)
37754   setfattr -n user.test -v ahoj \$file
37755   # check whether tar fails to store xattrs
37756   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37757   if test \"\$err\" != \"0\"; then
37758     exit 77
37759   fi
37760
37761
37762 mkdir dir
37763 mkdir output
37764 genfile --file dir/file
37765
37766 setfattr -n user.=NAME%3D= -v value dir/file
37767 getfattr -d dir/file | grep -v '# ' > before
37768
37769 # archive whole directory including binary xattrs
37770 tar --xattrs -cf archive.tar -C dir .
37771
37772 tar --xattrs -xf archive.tar -C output
37773 getfattr -d output/file | grep -v '# ' > after
37774 diff before after
37775 )"
37776 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
37777 ( $at_check_trace;
37778 mkdir v7
37779 (cd v7
37780 TEST_TAR_FORMAT=v7
37781 export TEST_TAR_FORMAT
37782 TAR_OPTIONS="-H v7"
37783 export TAR_OPTIONS
37784 rm -rf *
37785
37786
37787
37788   file=$(TMPDIR=. mktemp fiXXXXXX)
37789
37790   setfattr -n user.test -v test $file &> /dev/null
37791   if test "$?" != 0; then
37792     exit 77
37793   fi
37794
37795
37796   getfattr $file &> /dev/null
37797   if test "$?" != 0; then
37798     exit 77
37799   fi
37800
37801
37802   file=$(TMPDIR=. mktemp fiXXXXXX)
37803   setfattr -n user.test -v ahoj $file
37804   # check whether tar fails to store xattrs
37805   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37806   if test "$err" != "0"; then
37807     exit 77
37808   fi
37809
37810
37811 mkdir dir
37812 mkdir output
37813 genfile --file dir/file
37814
37815 setfattr -n user.=NAME%3D= -v value dir/file
37816 getfattr -d dir/file | grep -v '# ' > before
37817
37818 # archive whole directory including binary xattrs
37819 tar --xattrs -cf archive.tar -C dir .
37820
37821 tar --xattrs -xf archive.tar -C output
37822 getfattr -d output/file | grep -v '# ' > after
37823 diff before after
37824 )
37825 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37826 at_status=$? at_failed=false
37827 $at_check_filter
37828 at_fn_diff_devnull "$at_stderr" || at_failed=:
37829 at_fn_diff_devnull "$at_stdout" || at_failed=:
37830 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
37831 $at_failed && at_fn_log_failure
37832 $at_traceon; }
37833
37834               { set +x
37835 $as_echo "$at_srcdir/xattr05.at:31:
37836 mkdir oldgnu
37837 (cd oldgnu
37838 TEST_TAR_FORMAT=oldgnu
37839 export TEST_TAR_FORMAT
37840 TAR_OPTIONS=\"-H oldgnu\"
37841 export TAR_OPTIONS
37842 rm -rf *
37843
37844
37845
37846   file=\$(TMPDIR=. mktemp fiXXXXXX)
37847
37848   setfattr -n user.test -v test \$file &> /dev/null
37849   if test \"\$?\" != 0; then
37850     exit 77
37851   fi
37852
37853
37854   getfattr \$file &> /dev/null
37855   if test \"\$?\" != 0; then
37856     exit 77
37857   fi
37858
37859
37860   file=\$(TMPDIR=. mktemp fiXXXXXX)
37861   setfattr -n user.test -v ahoj \$file
37862   # check whether tar fails to store xattrs
37863   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37864   if test \"\$err\" != \"0\"; then
37865     exit 77
37866   fi
37867
37868
37869 mkdir dir
37870 mkdir output
37871 genfile --file dir/file
37872
37873 setfattr -n user.=NAME%3D= -v value dir/file
37874 getfattr -d dir/file | grep -v '# ' > before
37875
37876 # archive whole directory including binary xattrs
37877 tar --xattrs -cf archive.tar -C dir .
37878
37879 tar --xattrs -xf archive.tar -C output
37880 getfattr -d output/file | grep -v '# ' > after
37881 diff before after
37882 )"
37883 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
37884 ( $at_check_trace;
37885 mkdir oldgnu
37886 (cd oldgnu
37887 TEST_TAR_FORMAT=oldgnu
37888 export TEST_TAR_FORMAT
37889 TAR_OPTIONS="-H oldgnu"
37890 export TAR_OPTIONS
37891 rm -rf *
37892
37893
37894
37895   file=$(TMPDIR=. mktemp fiXXXXXX)
37896
37897   setfattr -n user.test -v test $file &> /dev/null
37898   if test "$?" != 0; then
37899     exit 77
37900   fi
37901
37902
37903   getfattr $file &> /dev/null
37904   if test "$?" != 0; then
37905     exit 77
37906   fi
37907
37908
37909   file=$(TMPDIR=. mktemp fiXXXXXX)
37910   setfattr -n user.test -v ahoj $file
37911   # check whether tar fails to store xattrs
37912   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
37913   if test "$err" != "0"; then
37914     exit 77
37915   fi
37916
37917
37918 mkdir dir
37919 mkdir output
37920 genfile --file dir/file
37921
37922 setfattr -n user.=NAME%3D= -v value dir/file
37923 getfattr -d dir/file | grep -v '# ' > before
37924
37925 # archive whole directory including binary xattrs
37926 tar --xattrs -cf archive.tar -C dir .
37927
37928 tar --xattrs -xf archive.tar -C output
37929 getfattr -d output/file | grep -v '# ' > after
37930 diff before after
37931 )
37932 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
37933 at_status=$? at_failed=false
37934 $at_check_filter
37935 at_fn_diff_devnull "$at_stderr" || at_failed=:
37936 at_fn_diff_devnull "$at_stdout" || at_failed=:
37937 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
37938 $at_failed && at_fn_log_failure
37939 $at_traceon; }
37940
37941               { set +x
37942 $as_echo "$at_srcdir/xattr05.at:31:
37943 mkdir ustar
37944 (cd ustar
37945 TEST_TAR_FORMAT=ustar
37946 export TEST_TAR_FORMAT
37947 TAR_OPTIONS=\"-H ustar\"
37948 export TAR_OPTIONS
37949 rm -rf *
37950
37951
37952
37953   file=\$(TMPDIR=. mktemp fiXXXXXX)
37954
37955   setfattr -n user.test -v test \$file &> /dev/null
37956   if test \"\$?\" != 0; then
37957     exit 77
37958   fi
37959
37960
37961   getfattr \$file &> /dev/null
37962   if test \"\$?\" != 0; then
37963     exit 77
37964   fi
37965
37966
37967   file=\$(TMPDIR=. mktemp fiXXXXXX)
37968   setfattr -n user.test -v ahoj \$file
37969   # check whether tar fails to store xattrs
37970   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
37971   if test \"\$err\" != \"0\"; then
37972     exit 77
37973   fi
37974
37975
37976 mkdir dir
37977 mkdir output
37978 genfile --file dir/file
37979
37980 setfattr -n user.=NAME%3D= -v value dir/file
37981 getfattr -d dir/file | grep -v '# ' > before
37982
37983 # archive whole directory including binary xattrs
37984 tar --xattrs -cf archive.tar -C dir .
37985
37986 tar --xattrs -xf archive.tar -C output
37987 getfattr -d output/file | grep -v '# ' > after
37988 diff before after
37989 )"
37990 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
37991 ( $at_check_trace;
37992 mkdir ustar
37993 (cd ustar
37994 TEST_TAR_FORMAT=ustar
37995 export TEST_TAR_FORMAT
37996 TAR_OPTIONS="-H ustar"
37997 export TAR_OPTIONS
37998 rm -rf *
37999
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   file=$(TMPDIR=. mktemp fiXXXXXX)
38017   setfattr -n user.test -v ahoj $file
38018   # check whether tar fails to store xattrs
38019   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38020   if test "$err" != "0"; then
38021     exit 77
38022   fi
38023
38024
38025 mkdir dir
38026 mkdir output
38027 genfile --file dir/file
38028
38029 setfattr -n user.=NAME%3D= -v value dir/file
38030 getfattr -d dir/file | grep -v '# ' > before
38031
38032 # archive whole directory including binary xattrs
38033 tar --xattrs -cf archive.tar -C dir .
38034
38035 tar --xattrs -xf archive.tar -C output
38036 getfattr -d output/file | grep -v '# ' > after
38037 diff before after
38038 )
38039 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38040 at_status=$? at_failed=false
38041 $at_check_filter
38042 at_fn_diff_devnull "$at_stderr" || at_failed=:
38043 at_fn_diff_devnull "$at_stdout" || at_failed=:
38044 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
38045 $at_failed && at_fn_log_failure
38046 $at_traceon; }
38047
38048               { set +x
38049 $as_echo "$at_srcdir/xattr05.at:31:
38050 mkdir posix
38051 (cd posix
38052 TEST_TAR_FORMAT=posix
38053 export TEST_TAR_FORMAT
38054 TAR_OPTIONS=\"-H posix\"
38055 export TAR_OPTIONS
38056 rm -rf *
38057
38058
38059
38060   file=\$(TMPDIR=. mktemp fiXXXXXX)
38061
38062   setfattr -n user.test -v test \$file &> /dev/null
38063   if test \"\$?\" != 0; then
38064     exit 77
38065   fi
38066
38067
38068   getfattr \$file &> /dev/null
38069   if test \"\$?\" != 0; then
38070     exit 77
38071   fi
38072
38073
38074   file=\$(TMPDIR=. mktemp fiXXXXXX)
38075   setfattr -n user.test -v ahoj \$file
38076   # check whether tar fails to store xattrs
38077   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38078   if test \"\$err\" != \"0\"; then
38079     exit 77
38080   fi
38081
38082
38083 mkdir dir
38084 mkdir output
38085 genfile --file dir/file
38086
38087 setfattr -n user.=NAME%3D= -v value dir/file
38088 getfattr -d dir/file | grep -v '# ' > before
38089
38090 # archive whole directory including binary xattrs
38091 tar --xattrs -cf archive.tar -C dir .
38092
38093 tar --xattrs -xf archive.tar -C output
38094 getfattr -d output/file | grep -v '# ' > after
38095 diff before after
38096 )"
38097 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
38098 ( $at_check_trace;
38099 mkdir posix
38100 (cd posix
38101 TEST_TAR_FORMAT=posix
38102 export TEST_TAR_FORMAT
38103 TAR_OPTIONS="-H posix"
38104 export TAR_OPTIONS
38105 rm -rf *
38106
38107
38108
38109   file=$(TMPDIR=. mktemp fiXXXXXX)
38110
38111   setfattr -n user.test -v test $file &> /dev/null
38112   if test "$?" != 0; then
38113     exit 77
38114   fi
38115
38116
38117   getfattr $file &> /dev/null
38118   if test "$?" != 0; then
38119     exit 77
38120   fi
38121
38122
38123   file=$(TMPDIR=. mktemp fiXXXXXX)
38124   setfattr -n user.test -v ahoj $file
38125   # check whether tar fails to store xattrs
38126   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38127   if test "$err" != "0"; then
38128     exit 77
38129   fi
38130
38131
38132 mkdir dir
38133 mkdir output
38134 genfile --file dir/file
38135
38136 setfattr -n user.=NAME%3D= -v value dir/file
38137 getfattr -d dir/file | grep -v '# ' > before
38138
38139 # archive whole directory including binary xattrs
38140 tar --xattrs -cf archive.tar -C dir .
38141
38142 tar --xattrs -xf archive.tar -C output
38143 getfattr -d output/file | grep -v '# ' > after
38144 diff before after
38145 )
38146 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38147 at_status=$? at_failed=false
38148 $at_check_filter
38149 at_fn_diff_devnull "$at_stderr" || at_failed=:
38150 at_fn_diff_devnull "$at_stdout" || at_failed=:
38151 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
38152 $at_failed && at_fn_log_failure
38153 $at_traceon; }
38154
38155               { set +x
38156 $as_echo "$at_srcdir/xattr05.at:31:
38157 mkdir gnu
38158 (cd gnu
38159 TEST_TAR_FORMAT=gnu
38160 export TEST_TAR_FORMAT
38161 TAR_OPTIONS=\"-H gnu\"
38162 export TAR_OPTIONS
38163 rm -rf *
38164
38165
38166
38167   file=\$(TMPDIR=. mktemp fiXXXXXX)
38168
38169   setfattr -n user.test -v test \$file &> /dev/null
38170   if test \"\$?\" != 0; then
38171     exit 77
38172   fi
38173
38174
38175   getfattr \$file &> /dev/null
38176   if test \"\$?\" != 0; then
38177     exit 77
38178   fi
38179
38180
38181   file=\$(TMPDIR=. mktemp fiXXXXXX)
38182   setfattr -n user.test -v ahoj \$file
38183   # check whether tar fails to store xattrs
38184   err=\$( tar --xattrs -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 mkdir output
38192 genfile --file dir/file
38193
38194 setfattr -n user.=NAME%3D= -v value dir/file
38195 getfattr -d dir/file | grep -v '# ' > before
38196
38197 # archive whole directory including binary xattrs
38198 tar --xattrs -cf archive.tar -C dir .
38199
38200 tar --xattrs -xf archive.tar -C output
38201 getfattr -d output/file | grep -v '# ' > after
38202 diff before after
38203 )"
38204 at_fn_check_prepare_notrace 'a $(...) command substitution' "xattr05.at:31"
38205 ( $at_check_trace;
38206 mkdir gnu
38207 (cd gnu
38208 TEST_TAR_FORMAT=gnu
38209 export TEST_TAR_FORMAT
38210 TAR_OPTIONS="-H gnu"
38211 export TAR_OPTIONS
38212 rm -rf *
38213
38214
38215
38216   file=$(TMPDIR=. mktemp fiXXXXXX)
38217
38218   setfattr -n user.test -v test $file &> /dev/null
38219   if test "$?" != 0; then
38220     exit 77
38221   fi
38222
38223
38224   getfattr $file &> /dev/null
38225   if test "$?" != 0; then
38226     exit 77
38227   fi
38228
38229
38230   file=$(TMPDIR=. mktemp fiXXXXXX)
38231   setfattr -n user.test -v ahoj $file
38232   # check whether tar fails to store xattrs
38233   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38234   if test "$err" != "0"; then
38235     exit 77
38236   fi
38237
38238
38239 mkdir dir
38240 mkdir output
38241 genfile --file dir/file
38242
38243 setfattr -n user.=NAME%3D= -v value dir/file
38244 getfattr -d dir/file | grep -v '# ' > before
38245
38246 # archive whole directory including binary xattrs
38247 tar --xattrs -cf archive.tar -C dir .
38248
38249 tar --xattrs -xf archive.tar -C output
38250 getfattr -d output/file | grep -v '# ' > after
38251 diff before after
38252 )
38253 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38254 at_status=$? at_failed=false
38255 $at_check_filter
38256 at_fn_diff_devnull "$at_stderr" || at_failed=:
38257 at_fn_diff_devnull "$at_stdout" || at_failed=:
38258 at_fn_check_status 0 $at_status "$at_srcdir/xattr05.at:31"
38259 $at_failed && at_fn_log_failure
38260 $at_traceon; }
38261
38262
38263
38264
38265   set +x
38266   $at_times_p && times >"$at_times_file"
38267 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
38268 read at_status <"$at_status_file"
38269 #AT_STOP_172
38270 #AT_START_173
38271 at_fn_group_banner 173 'acls01.at:25' \
38272   "acls: basic functionality" "                      " 25
38273 at_xfail=no
38274       test -f $XFAILFILE && at_xfail=yes
38275 (
38276   $as_echo "173. $at_setup_line: testing $at_desc ..."
38277   $at_traceon
38278
38279
38280
38281
38282
38283   { set +x
38284 $as_echo "$at_srcdir/acls01.at:28:
38285 mkdir v7
38286 (cd v7
38287 TEST_TAR_FORMAT=v7
38288 export TEST_TAR_FORMAT
38289 TAR_OPTIONS=\"-H v7\"
38290 export TAR_OPTIONS
38291 rm -rf *
38292
38293
38294   file=\$(TMPDIR=. mktemp fiXXXXXX)
38295
38296   setfattr -n user.test -v test \$file &> /dev/null
38297   if test \"\$?\" != 0; then
38298     exit 77
38299   fi
38300
38301
38302   getfattr \$file &> /dev/null
38303   if test \"\$?\" != 0; then
38304     exit 77
38305   fi
38306
38307
38308
38309
38310   file=\$(TMPDIR=. mktemp fiXXXXXX)
38311
38312   setfacl -m u:\$UID:rwx \$file &> /dev/null
38313   if test \"\$?\" != 0; then
38314     exit 77
38315   fi
38316
38317
38318   getfacl \$file &> /dev/null
38319   if test \"\$?\" != 0; then
38320     exit 77
38321   fi
38322
38323   rm -rf \$file
38324
38325   file=\$(TMPDIR=. mktemp fiXXXXXX)
38326   setfacl -m u:\$UID:rwx \$file
38327   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38328   if test \"\$err\" != \"0\"; then
38329     exit 77
38330   fi
38331
38332
38333 mkdir dir
38334 genfile --file dir/file
38335
38336 MYNAME=\$( id -un )
38337
38338 setfacl -m u:\$MYNAME:--x dir/file
38339 setfacl -m u:\$MYNAME:--x dir
38340
38341 getfattr -h -m. -d dir dir/file > before
38342
38343 tar --acls -cf archive.tar dir
38344 rm -rf dir
38345
38346 tar --acls -xf archive.tar
38347
38348 getfattr -h -m. -d dir dir/file > after
38349
38350 diff before after
38351 test \"\$?\" = 0
38352 )"
38353 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
38354 ( $at_check_trace;
38355 mkdir v7
38356 (cd v7
38357 TEST_TAR_FORMAT=v7
38358 export TEST_TAR_FORMAT
38359 TAR_OPTIONS="-H v7"
38360 export TAR_OPTIONS
38361 rm -rf *
38362
38363
38364   file=$(TMPDIR=. mktemp fiXXXXXX)
38365
38366   setfattr -n user.test -v test $file &> /dev/null
38367   if test "$?" != 0; then
38368     exit 77
38369   fi
38370
38371
38372   getfattr $file &> /dev/null
38373   if test "$?" != 0; then
38374     exit 77
38375   fi
38376
38377
38378
38379
38380   file=$(TMPDIR=. mktemp fiXXXXXX)
38381
38382   setfacl -m u:$UID:rwx $file &> /dev/null
38383   if test "$?" != 0; then
38384     exit 77
38385   fi
38386
38387
38388   getfacl $file &> /dev/null
38389   if test "$?" != 0; then
38390     exit 77
38391   fi
38392
38393   rm -rf $file
38394
38395   file=$(TMPDIR=. mktemp fiXXXXXX)
38396   setfacl -m u:$UID:rwx $file
38397   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38398   if test "$err" != "0"; then
38399     exit 77
38400   fi
38401
38402
38403 mkdir dir
38404 genfile --file dir/file
38405
38406 MYNAME=$( id -un )
38407
38408 setfacl -m u:$MYNAME:--x dir/file
38409 setfacl -m u:$MYNAME:--x dir
38410
38411 getfattr -h -m. -d dir dir/file > before
38412
38413 tar --acls -cf archive.tar dir
38414 rm -rf dir
38415
38416 tar --acls -xf archive.tar
38417
38418 getfattr -h -m. -d dir dir/file > after
38419
38420 diff before after
38421 test "$?" = 0
38422 )
38423 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38424 at_status=$? at_failed=false
38425 $at_check_filter
38426 at_fn_diff_devnull "$at_stderr" || at_failed=:
38427 at_fn_diff_devnull "$at_stdout" || at_failed=:
38428 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
38429 $at_failed && at_fn_log_failure
38430 $at_traceon; }
38431
38432               { set +x
38433 $as_echo "$at_srcdir/acls01.at:28:
38434 mkdir oldgnu
38435 (cd oldgnu
38436 TEST_TAR_FORMAT=oldgnu
38437 export TEST_TAR_FORMAT
38438 TAR_OPTIONS=\"-H oldgnu\"
38439 export TAR_OPTIONS
38440 rm -rf *
38441
38442
38443   file=\$(TMPDIR=. mktemp fiXXXXXX)
38444
38445   setfattr -n user.test -v test \$file &> /dev/null
38446   if test \"\$?\" != 0; then
38447     exit 77
38448   fi
38449
38450
38451   getfattr \$file &> /dev/null
38452   if test \"\$?\" != 0; then
38453     exit 77
38454   fi
38455
38456
38457
38458
38459   file=\$(TMPDIR=. mktemp fiXXXXXX)
38460
38461   setfacl -m u:\$UID:rwx \$file &> /dev/null
38462   if test \"\$?\" != 0; then
38463     exit 77
38464   fi
38465
38466
38467   getfacl \$file &> /dev/null
38468   if test \"\$?\" != 0; then
38469     exit 77
38470   fi
38471
38472   rm -rf \$file
38473
38474   file=\$(TMPDIR=. mktemp fiXXXXXX)
38475   setfacl -m u:\$UID:rwx \$file
38476   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38477   if test \"\$err\" != \"0\"; then
38478     exit 77
38479   fi
38480
38481
38482 mkdir dir
38483 genfile --file dir/file
38484
38485 MYNAME=\$( id -un )
38486
38487 setfacl -m u:\$MYNAME:--x dir/file
38488 setfacl -m u:\$MYNAME:--x dir
38489
38490 getfattr -h -m. -d dir dir/file > before
38491
38492 tar --acls -cf archive.tar dir
38493 rm -rf dir
38494
38495 tar --acls -xf archive.tar
38496
38497 getfattr -h -m. -d dir dir/file > after
38498
38499 diff before after
38500 test \"\$?\" = 0
38501 )"
38502 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
38503 ( $at_check_trace;
38504 mkdir oldgnu
38505 (cd oldgnu
38506 TEST_TAR_FORMAT=oldgnu
38507 export TEST_TAR_FORMAT
38508 TAR_OPTIONS="-H oldgnu"
38509 export TAR_OPTIONS
38510 rm -rf *
38511
38512
38513   file=$(TMPDIR=. mktemp fiXXXXXX)
38514
38515   setfattr -n user.test -v test $file &> /dev/null
38516   if test "$?" != 0; then
38517     exit 77
38518   fi
38519
38520
38521   getfattr $file &> /dev/null
38522   if test "$?" != 0; then
38523     exit 77
38524   fi
38525
38526
38527
38528
38529   file=$(TMPDIR=. mktemp fiXXXXXX)
38530
38531   setfacl -m u:$UID:rwx $file &> /dev/null
38532   if test "$?" != 0; then
38533     exit 77
38534   fi
38535
38536
38537   getfacl $file &> /dev/null
38538   if test "$?" != 0; then
38539     exit 77
38540   fi
38541
38542   rm -rf $file
38543
38544   file=$(TMPDIR=. mktemp fiXXXXXX)
38545   setfacl -m u:$UID:rwx $file
38546   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38547   if test "$err" != "0"; then
38548     exit 77
38549   fi
38550
38551
38552 mkdir dir
38553 genfile --file dir/file
38554
38555 MYNAME=$( id -un )
38556
38557 setfacl -m u:$MYNAME:--x dir/file
38558 setfacl -m u:$MYNAME:--x dir
38559
38560 getfattr -h -m. -d dir dir/file > before
38561
38562 tar --acls -cf archive.tar dir
38563 rm -rf dir
38564
38565 tar --acls -xf archive.tar
38566
38567 getfattr -h -m. -d dir dir/file > after
38568
38569 diff before after
38570 test "$?" = 0
38571 )
38572 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38573 at_status=$? at_failed=false
38574 $at_check_filter
38575 at_fn_diff_devnull "$at_stderr" || at_failed=:
38576 at_fn_diff_devnull "$at_stdout" || at_failed=:
38577 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
38578 $at_failed && at_fn_log_failure
38579 $at_traceon; }
38580
38581               { set +x
38582 $as_echo "$at_srcdir/acls01.at:28:
38583 mkdir ustar
38584 (cd ustar
38585 TEST_TAR_FORMAT=ustar
38586 export TEST_TAR_FORMAT
38587 TAR_OPTIONS=\"-H ustar\"
38588 export TAR_OPTIONS
38589 rm -rf *
38590
38591
38592   file=\$(TMPDIR=. mktemp fiXXXXXX)
38593
38594   setfattr -n user.test -v test \$file &> /dev/null
38595   if test \"\$?\" != 0; then
38596     exit 77
38597   fi
38598
38599
38600   getfattr \$file &> /dev/null
38601   if test \"\$?\" != 0; then
38602     exit 77
38603   fi
38604
38605
38606
38607
38608   file=\$(TMPDIR=. mktemp fiXXXXXX)
38609
38610   setfacl -m u:\$UID:rwx \$file &> /dev/null
38611   if test \"\$?\" != 0; then
38612     exit 77
38613   fi
38614
38615
38616   getfacl \$file &> /dev/null
38617   if test \"\$?\" != 0; then
38618     exit 77
38619   fi
38620
38621   rm -rf \$file
38622
38623   file=\$(TMPDIR=. mktemp fiXXXXXX)
38624   setfacl -m u:\$UID:rwx \$file
38625   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38626   if test \"\$err\" != \"0\"; then
38627     exit 77
38628   fi
38629
38630
38631 mkdir dir
38632 genfile --file dir/file
38633
38634 MYNAME=\$( id -un )
38635
38636 setfacl -m u:\$MYNAME:--x dir/file
38637 setfacl -m u:\$MYNAME:--x dir
38638
38639 getfattr -h -m. -d dir dir/file > before
38640
38641 tar --acls -cf archive.tar dir
38642 rm -rf dir
38643
38644 tar --acls -xf archive.tar
38645
38646 getfattr -h -m. -d dir dir/file > after
38647
38648 diff before after
38649 test \"\$?\" = 0
38650 )"
38651 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
38652 ( $at_check_trace;
38653 mkdir ustar
38654 (cd ustar
38655 TEST_TAR_FORMAT=ustar
38656 export TEST_TAR_FORMAT
38657 TAR_OPTIONS="-H ustar"
38658 export TAR_OPTIONS
38659 rm -rf *
38660
38661
38662   file=$(TMPDIR=. mktemp fiXXXXXX)
38663
38664   setfattr -n user.test -v test $file &> /dev/null
38665   if test "$?" != 0; then
38666     exit 77
38667   fi
38668
38669
38670   getfattr $file &> /dev/null
38671   if test "$?" != 0; then
38672     exit 77
38673   fi
38674
38675
38676
38677
38678   file=$(TMPDIR=. mktemp fiXXXXXX)
38679
38680   setfacl -m u:$UID:rwx $file &> /dev/null
38681   if test "$?" != 0; then
38682     exit 77
38683   fi
38684
38685
38686   getfacl $file &> /dev/null
38687   if test "$?" != 0; then
38688     exit 77
38689   fi
38690
38691   rm -rf $file
38692
38693   file=$(TMPDIR=. mktemp fiXXXXXX)
38694   setfacl -m u:$UID:rwx $file
38695   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38696   if test "$err" != "0"; then
38697     exit 77
38698   fi
38699
38700
38701 mkdir dir
38702 genfile --file dir/file
38703
38704 MYNAME=$( id -un )
38705
38706 setfacl -m u:$MYNAME:--x dir/file
38707 setfacl -m u:$MYNAME:--x dir
38708
38709 getfattr -h -m. -d dir dir/file > before
38710
38711 tar --acls -cf archive.tar dir
38712 rm -rf dir
38713
38714 tar --acls -xf archive.tar
38715
38716 getfattr -h -m. -d dir dir/file > after
38717
38718 diff before after
38719 test "$?" = 0
38720 )
38721 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38722 at_status=$? at_failed=false
38723 $at_check_filter
38724 at_fn_diff_devnull "$at_stderr" || at_failed=:
38725 at_fn_diff_devnull "$at_stdout" || at_failed=:
38726 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
38727 $at_failed && at_fn_log_failure
38728 $at_traceon; }
38729
38730               { set +x
38731 $as_echo "$at_srcdir/acls01.at:28:
38732 mkdir posix
38733 (cd posix
38734 TEST_TAR_FORMAT=posix
38735 export TEST_TAR_FORMAT
38736 TAR_OPTIONS=\"-H posix\"
38737 export TAR_OPTIONS
38738 rm -rf *
38739
38740
38741   file=\$(TMPDIR=. mktemp fiXXXXXX)
38742
38743   setfattr -n user.test -v test \$file &> /dev/null
38744   if test \"\$?\" != 0; then
38745     exit 77
38746   fi
38747
38748
38749   getfattr \$file &> /dev/null
38750   if test \"\$?\" != 0; then
38751     exit 77
38752   fi
38753
38754
38755
38756
38757   file=\$(TMPDIR=. mktemp fiXXXXXX)
38758
38759   setfacl -m u:\$UID:rwx \$file &> /dev/null
38760   if test \"\$?\" != 0; then
38761     exit 77
38762   fi
38763
38764
38765   getfacl \$file &> /dev/null
38766   if test \"\$?\" != 0; then
38767     exit 77
38768   fi
38769
38770   rm -rf \$file
38771
38772   file=\$(TMPDIR=. mktemp fiXXXXXX)
38773   setfacl -m u:\$UID:rwx \$file
38774   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38775   if test \"\$err\" != \"0\"; then
38776     exit 77
38777   fi
38778
38779
38780 mkdir dir
38781 genfile --file dir/file
38782
38783 MYNAME=\$( id -un )
38784
38785 setfacl -m u:\$MYNAME:--x dir/file
38786 setfacl -m u:\$MYNAME:--x dir
38787
38788 getfattr -h -m. -d dir dir/file > before
38789
38790 tar --acls -cf archive.tar dir
38791 rm -rf dir
38792
38793 tar --acls -xf archive.tar
38794
38795 getfattr -h -m. -d dir dir/file > after
38796
38797 diff before after
38798 test \"\$?\" = 0
38799 )"
38800 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
38801 ( $at_check_trace;
38802 mkdir posix
38803 (cd posix
38804 TEST_TAR_FORMAT=posix
38805 export TEST_TAR_FORMAT
38806 TAR_OPTIONS="-H posix"
38807 export TAR_OPTIONS
38808 rm -rf *
38809
38810
38811   file=$(TMPDIR=. mktemp fiXXXXXX)
38812
38813   setfattr -n user.test -v test $file &> /dev/null
38814   if test "$?" != 0; then
38815     exit 77
38816   fi
38817
38818
38819   getfattr $file &> /dev/null
38820   if test "$?" != 0; then
38821     exit 77
38822   fi
38823
38824
38825
38826
38827   file=$(TMPDIR=. mktemp fiXXXXXX)
38828
38829   setfacl -m u:$UID:rwx $file &> /dev/null
38830   if test "$?" != 0; then
38831     exit 77
38832   fi
38833
38834
38835   getfacl $file &> /dev/null
38836   if test "$?" != 0; then
38837     exit 77
38838   fi
38839
38840   rm -rf $file
38841
38842   file=$(TMPDIR=. mktemp fiXXXXXX)
38843   setfacl -m u:$UID:rwx $file
38844   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38845   if test "$err" != "0"; then
38846     exit 77
38847   fi
38848
38849
38850 mkdir dir
38851 genfile --file dir/file
38852
38853 MYNAME=$( id -un )
38854
38855 setfacl -m u:$MYNAME:--x dir/file
38856 setfacl -m u:$MYNAME:--x dir
38857
38858 getfattr -h -m. -d dir dir/file > before
38859
38860 tar --acls -cf archive.tar dir
38861 rm -rf dir
38862
38863 tar --acls -xf archive.tar
38864
38865 getfattr -h -m. -d dir dir/file > after
38866
38867 diff before after
38868 test "$?" = 0
38869 )
38870 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
38871 at_status=$? at_failed=false
38872 $at_check_filter
38873 at_fn_diff_devnull "$at_stderr" || at_failed=:
38874 at_fn_diff_devnull "$at_stdout" || at_failed=:
38875 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
38876 $at_failed && at_fn_log_failure
38877 $at_traceon; }
38878
38879               { set +x
38880 $as_echo "$at_srcdir/acls01.at:28:
38881 mkdir gnu
38882 (cd gnu
38883 TEST_TAR_FORMAT=gnu
38884 export TEST_TAR_FORMAT
38885 TAR_OPTIONS=\"-H gnu\"
38886 export TAR_OPTIONS
38887 rm -rf *
38888
38889
38890   file=\$(TMPDIR=. mktemp fiXXXXXX)
38891
38892   setfattr -n user.test -v test \$file &> /dev/null
38893   if test \"\$?\" != 0; then
38894     exit 77
38895   fi
38896
38897
38898   getfattr \$file &> /dev/null
38899   if test \"\$?\" != 0; then
38900     exit 77
38901   fi
38902
38903
38904
38905
38906   file=\$(TMPDIR=. mktemp fiXXXXXX)
38907
38908   setfacl -m u:\$UID:rwx \$file &> /dev/null
38909   if test \"\$?\" != 0; then
38910     exit 77
38911   fi
38912
38913
38914   getfacl \$file &> /dev/null
38915   if test \"\$?\" != 0; then
38916     exit 77
38917   fi
38918
38919   rm -rf \$file
38920
38921   file=\$(TMPDIR=. mktemp fiXXXXXX)
38922   setfacl -m u:\$UID:rwx \$file
38923   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
38924   if test \"\$err\" != \"0\"; then
38925     exit 77
38926   fi
38927
38928
38929 mkdir dir
38930 genfile --file dir/file
38931
38932 MYNAME=\$( id -un )
38933
38934 setfacl -m u:\$MYNAME:--x dir/file
38935 setfacl -m u:\$MYNAME:--x dir
38936
38937 getfattr -h -m. -d dir dir/file > before
38938
38939 tar --acls -cf archive.tar dir
38940 rm -rf dir
38941
38942 tar --acls -xf archive.tar
38943
38944 getfattr -h -m. -d dir dir/file > after
38945
38946 diff before after
38947 test \"\$?\" = 0
38948 )"
38949 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls01.at:28"
38950 ( $at_check_trace;
38951 mkdir gnu
38952 (cd gnu
38953 TEST_TAR_FORMAT=gnu
38954 export TEST_TAR_FORMAT
38955 TAR_OPTIONS="-H gnu"
38956 export TAR_OPTIONS
38957 rm -rf *
38958
38959
38960   file=$(TMPDIR=. mktemp fiXXXXXX)
38961
38962   setfattr -n user.test -v test $file &> /dev/null
38963   if test "$?" != 0; then
38964     exit 77
38965   fi
38966
38967
38968   getfattr $file &> /dev/null
38969   if test "$?" != 0; then
38970     exit 77
38971   fi
38972
38973
38974
38975
38976   file=$(TMPDIR=. mktemp fiXXXXXX)
38977
38978   setfacl -m u:$UID:rwx $file &> /dev/null
38979   if test "$?" != 0; then
38980     exit 77
38981   fi
38982
38983
38984   getfacl $file &> /dev/null
38985   if test "$?" != 0; then
38986     exit 77
38987   fi
38988
38989   rm -rf $file
38990
38991   file=$(TMPDIR=. mktemp fiXXXXXX)
38992   setfacl -m u:$UID:rwx $file
38993   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
38994   if test "$err" != "0"; then
38995     exit 77
38996   fi
38997
38998
38999 mkdir dir
39000 genfile --file dir/file
39001
39002 MYNAME=$( id -un )
39003
39004 setfacl -m u:$MYNAME:--x dir/file
39005 setfacl -m u:$MYNAME:--x dir
39006
39007 getfattr -h -m. -d dir dir/file > before
39008
39009 tar --acls -cf archive.tar dir
39010 rm -rf dir
39011
39012 tar --acls -xf archive.tar
39013
39014 getfattr -h -m. -d dir dir/file > after
39015
39016 diff before after
39017 test "$?" = 0
39018 )
39019 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39020 at_status=$? at_failed=false
39021 $at_check_filter
39022 at_fn_diff_devnull "$at_stderr" || at_failed=:
39023 at_fn_diff_devnull "$at_stdout" || at_failed=:
39024 at_fn_check_status 0 $at_status "$at_srcdir/acls01.at:28"
39025 $at_failed && at_fn_log_failure
39026 $at_traceon; }
39027
39028
39029
39030
39031   set +x
39032   $at_times_p && times >"$at_times_file"
39033 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39034 read at_status <"$at_status_file"
39035 #AT_STOP_173
39036 #AT_START_174
39037 at_fn_group_banner 174 'acls02.at:25' \
39038   "acls: work with -C" "                             " 25
39039 at_xfail=no
39040       test -f $XFAILFILE && at_xfail=yes
39041 (
39042   $as_echo "174. $at_setup_line: testing $at_desc ..."
39043   $at_traceon
39044
39045
39046
39047
39048
39049   { set +x
39050 $as_echo "$at_srcdir/acls02.at:28:
39051 mkdir v7
39052 (cd v7
39053 TEST_TAR_FORMAT=v7
39054 export TEST_TAR_FORMAT
39055 TAR_OPTIONS=\"-H v7\"
39056 export TAR_OPTIONS
39057 rm -rf *
39058
39059
39060   file=\$(TMPDIR=. mktemp fiXXXXXX)
39061
39062   setfattr -n user.test -v test \$file &> /dev/null
39063   if test \"\$?\" != 0; then
39064     exit 77
39065   fi
39066
39067
39068   getfattr \$file &> /dev/null
39069   if test \"\$?\" != 0; then
39070     exit 77
39071   fi
39072
39073
39074
39075
39076   file=\$(TMPDIR=. mktemp fiXXXXXX)
39077
39078   setfacl -m u:\$UID:rwx \$file &> /dev/null
39079   if test \"\$?\" != 0; then
39080     exit 77
39081   fi
39082
39083
39084   getfacl \$file &> /dev/null
39085   if test \"\$?\" != 0; then
39086     exit 77
39087   fi
39088
39089   rm -rf \$file
39090
39091   file=\$(TMPDIR=. mktemp fiXXXXXX)
39092   setfacl -m u:\$UID:rwx \$file
39093   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39094   if test \"\$err\" != \"0\"; then
39095     exit 77
39096   fi
39097
39098
39099 mkdir dir
39100 mkdir dir/subdir
39101 genfile --file dir/subdir/file
39102
39103 MYNAME=\$( id -un )
39104
39105 setfacl -m u:\$MYNAME:--x dir/subdir
39106 setfacl -m u:\$MYNAME:--x dir/subdir/file
39107
39108 cd dir
39109 getfattr -h -m. -d subdir subdir/file > ../before
39110 cd ..
39111
39112 tar --acls -cf archive.tar -C dir subdir
39113 rm -rf dir
39114
39115 mkdir dir
39116 tar --acls -xf archive.tar -C dir
39117
39118 cd dir
39119 getfattr -h -m. -d subdir subdir/file > ../after
39120 cd ..
39121
39122 diff before after
39123 test \"\$?\" = 0
39124 )"
39125 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
39126 ( $at_check_trace;
39127 mkdir v7
39128 (cd v7
39129 TEST_TAR_FORMAT=v7
39130 export TEST_TAR_FORMAT
39131 TAR_OPTIONS="-H v7"
39132 export TAR_OPTIONS
39133 rm -rf *
39134
39135
39136   file=$(TMPDIR=. mktemp fiXXXXXX)
39137
39138   setfattr -n user.test -v test $file &> /dev/null
39139   if test "$?" != 0; then
39140     exit 77
39141   fi
39142
39143
39144   getfattr $file &> /dev/null
39145   if test "$?" != 0; then
39146     exit 77
39147   fi
39148
39149
39150
39151
39152   file=$(TMPDIR=. mktemp fiXXXXXX)
39153
39154   setfacl -m u:$UID:rwx $file &> /dev/null
39155   if test "$?" != 0; then
39156     exit 77
39157   fi
39158
39159
39160   getfacl $file &> /dev/null
39161   if test "$?" != 0; then
39162     exit 77
39163   fi
39164
39165   rm -rf $file
39166
39167   file=$(TMPDIR=. mktemp fiXXXXXX)
39168   setfacl -m u:$UID:rwx $file
39169   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39170   if test "$err" != "0"; then
39171     exit 77
39172   fi
39173
39174
39175 mkdir dir
39176 mkdir dir/subdir
39177 genfile --file dir/subdir/file
39178
39179 MYNAME=$( id -un )
39180
39181 setfacl -m u:$MYNAME:--x dir/subdir
39182 setfacl -m u:$MYNAME:--x dir/subdir/file
39183
39184 cd dir
39185 getfattr -h -m. -d subdir subdir/file > ../before
39186 cd ..
39187
39188 tar --acls -cf archive.tar -C dir subdir
39189 rm -rf dir
39190
39191 mkdir dir
39192 tar --acls -xf archive.tar -C dir
39193
39194 cd dir
39195 getfattr -h -m. -d subdir subdir/file > ../after
39196 cd ..
39197
39198 diff before after
39199 test "$?" = 0
39200 )
39201 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39202 at_status=$? at_failed=false
39203 $at_check_filter
39204 at_fn_diff_devnull "$at_stderr" || at_failed=:
39205 at_fn_diff_devnull "$at_stdout" || at_failed=:
39206 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
39207 $at_failed && at_fn_log_failure
39208 $at_traceon; }
39209
39210               { set +x
39211 $as_echo "$at_srcdir/acls02.at:28:
39212 mkdir oldgnu
39213 (cd oldgnu
39214 TEST_TAR_FORMAT=oldgnu
39215 export TEST_TAR_FORMAT
39216 TAR_OPTIONS=\"-H oldgnu\"
39217 export TAR_OPTIONS
39218 rm -rf *
39219
39220
39221   file=\$(TMPDIR=. mktemp fiXXXXXX)
39222
39223   setfattr -n user.test -v test \$file &> /dev/null
39224   if test \"\$?\" != 0; then
39225     exit 77
39226   fi
39227
39228
39229   getfattr \$file &> /dev/null
39230   if test \"\$?\" != 0; then
39231     exit 77
39232   fi
39233
39234
39235
39236
39237   file=\$(TMPDIR=. mktemp fiXXXXXX)
39238
39239   setfacl -m u:\$UID:rwx \$file &> /dev/null
39240   if test \"\$?\" != 0; then
39241     exit 77
39242   fi
39243
39244
39245   getfacl \$file &> /dev/null
39246   if test \"\$?\" != 0; then
39247     exit 77
39248   fi
39249
39250   rm -rf \$file
39251
39252   file=\$(TMPDIR=. mktemp fiXXXXXX)
39253   setfacl -m u:\$UID:rwx \$file
39254   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39255   if test \"\$err\" != \"0\"; then
39256     exit 77
39257   fi
39258
39259
39260 mkdir dir
39261 mkdir dir/subdir
39262 genfile --file dir/subdir/file
39263
39264 MYNAME=\$( id -un )
39265
39266 setfacl -m u:\$MYNAME:--x dir/subdir
39267 setfacl -m u:\$MYNAME:--x dir/subdir/file
39268
39269 cd dir
39270 getfattr -h -m. -d subdir subdir/file > ../before
39271 cd ..
39272
39273 tar --acls -cf archive.tar -C dir subdir
39274 rm -rf dir
39275
39276 mkdir dir
39277 tar --acls -xf archive.tar -C dir
39278
39279 cd dir
39280 getfattr -h -m. -d subdir subdir/file > ../after
39281 cd ..
39282
39283 diff before after
39284 test \"\$?\" = 0
39285 )"
39286 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
39287 ( $at_check_trace;
39288 mkdir oldgnu
39289 (cd oldgnu
39290 TEST_TAR_FORMAT=oldgnu
39291 export TEST_TAR_FORMAT
39292 TAR_OPTIONS="-H oldgnu"
39293 export TAR_OPTIONS
39294 rm -rf *
39295
39296
39297   file=$(TMPDIR=. mktemp fiXXXXXX)
39298
39299   setfattr -n user.test -v test $file &> /dev/null
39300   if test "$?" != 0; then
39301     exit 77
39302   fi
39303
39304
39305   getfattr $file &> /dev/null
39306   if test "$?" != 0; then
39307     exit 77
39308   fi
39309
39310
39311
39312
39313   file=$(TMPDIR=. mktemp fiXXXXXX)
39314
39315   setfacl -m u:$UID:rwx $file &> /dev/null
39316   if test "$?" != 0; then
39317     exit 77
39318   fi
39319
39320
39321   getfacl $file &> /dev/null
39322   if test "$?" != 0; then
39323     exit 77
39324   fi
39325
39326   rm -rf $file
39327
39328   file=$(TMPDIR=. mktemp fiXXXXXX)
39329   setfacl -m u:$UID:rwx $file
39330   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39331   if test "$err" != "0"; then
39332     exit 77
39333   fi
39334
39335
39336 mkdir dir
39337 mkdir dir/subdir
39338 genfile --file dir/subdir/file
39339
39340 MYNAME=$( id -un )
39341
39342 setfacl -m u:$MYNAME:--x dir/subdir
39343 setfacl -m u:$MYNAME:--x dir/subdir/file
39344
39345 cd dir
39346 getfattr -h -m. -d subdir subdir/file > ../before
39347 cd ..
39348
39349 tar --acls -cf archive.tar -C dir subdir
39350 rm -rf dir
39351
39352 mkdir dir
39353 tar --acls -xf archive.tar -C dir
39354
39355 cd dir
39356 getfattr -h -m. -d subdir subdir/file > ../after
39357 cd ..
39358
39359 diff before after
39360 test "$?" = 0
39361 )
39362 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39363 at_status=$? at_failed=false
39364 $at_check_filter
39365 at_fn_diff_devnull "$at_stderr" || at_failed=:
39366 at_fn_diff_devnull "$at_stdout" || at_failed=:
39367 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
39368 $at_failed && at_fn_log_failure
39369 $at_traceon; }
39370
39371               { set +x
39372 $as_echo "$at_srcdir/acls02.at:28:
39373 mkdir ustar
39374 (cd ustar
39375 TEST_TAR_FORMAT=ustar
39376 export TEST_TAR_FORMAT
39377 TAR_OPTIONS=\"-H ustar\"
39378 export TAR_OPTIONS
39379 rm -rf *
39380
39381
39382   file=\$(TMPDIR=. mktemp fiXXXXXX)
39383
39384   setfattr -n user.test -v test \$file &> /dev/null
39385   if test \"\$?\" != 0; then
39386     exit 77
39387   fi
39388
39389
39390   getfattr \$file &> /dev/null
39391   if test \"\$?\" != 0; then
39392     exit 77
39393   fi
39394
39395
39396
39397
39398   file=\$(TMPDIR=. mktemp fiXXXXXX)
39399
39400   setfacl -m u:\$UID:rwx \$file &> /dev/null
39401   if test \"\$?\" != 0; then
39402     exit 77
39403   fi
39404
39405
39406   getfacl \$file &> /dev/null
39407   if test \"\$?\" != 0; then
39408     exit 77
39409   fi
39410
39411   rm -rf \$file
39412
39413   file=\$(TMPDIR=. mktemp fiXXXXXX)
39414   setfacl -m u:\$UID:rwx \$file
39415   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39416   if test \"\$err\" != \"0\"; then
39417     exit 77
39418   fi
39419
39420
39421 mkdir dir
39422 mkdir dir/subdir
39423 genfile --file dir/subdir/file
39424
39425 MYNAME=\$( id -un )
39426
39427 setfacl -m u:\$MYNAME:--x dir/subdir
39428 setfacl -m u:\$MYNAME:--x dir/subdir/file
39429
39430 cd dir
39431 getfattr -h -m. -d subdir subdir/file > ../before
39432 cd ..
39433
39434 tar --acls -cf archive.tar -C dir subdir
39435 rm -rf dir
39436
39437 mkdir dir
39438 tar --acls -xf archive.tar -C dir
39439
39440 cd dir
39441 getfattr -h -m. -d subdir subdir/file > ../after
39442 cd ..
39443
39444 diff before after
39445 test \"\$?\" = 0
39446 )"
39447 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
39448 ( $at_check_trace;
39449 mkdir ustar
39450 (cd ustar
39451 TEST_TAR_FORMAT=ustar
39452 export TEST_TAR_FORMAT
39453 TAR_OPTIONS="-H ustar"
39454 export TAR_OPTIONS
39455 rm -rf *
39456
39457
39458   file=$(TMPDIR=. mktemp fiXXXXXX)
39459
39460   setfattr -n user.test -v test $file &> /dev/null
39461   if test "$?" != 0; then
39462     exit 77
39463   fi
39464
39465
39466   getfattr $file &> /dev/null
39467   if test "$?" != 0; then
39468     exit 77
39469   fi
39470
39471
39472
39473
39474   file=$(TMPDIR=. mktemp fiXXXXXX)
39475
39476   setfacl -m u:$UID:rwx $file &> /dev/null
39477   if test "$?" != 0; then
39478     exit 77
39479   fi
39480
39481
39482   getfacl $file &> /dev/null
39483   if test "$?" != 0; then
39484     exit 77
39485   fi
39486
39487   rm -rf $file
39488
39489   file=$(TMPDIR=. mktemp fiXXXXXX)
39490   setfacl -m u:$UID:rwx $file
39491   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39492   if test "$err" != "0"; then
39493     exit 77
39494   fi
39495
39496
39497 mkdir dir
39498 mkdir dir/subdir
39499 genfile --file dir/subdir/file
39500
39501 MYNAME=$( id -un )
39502
39503 setfacl -m u:$MYNAME:--x dir/subdir
39504 setfacl -m u:$MYNAME:--x dir/subdir/file
39505
39506 cd dir
39507 getfattr -h -m. -d subdir subdir/file > ../before
39508 cd ..
39509
39510 tar --acls -cf archive.tar -C dir subdir
39511 rm -rf dir
39512
39513 mkdir dir
39514 tar --acls -xf archive.tar -C dir
39515
39516 cd dir
39517 getfattr -h -m. -d subdir subdir/file > ../after
39518 cd ..
39519
39520 diff before after
39521 test "$?" = 0
39522 )
39523 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39524 at_status=$? at_failed=false
39525 $at_check_filter
39526 at_fn_diff_devnull "$at_stderr" || at_failed=:
39527 at_fn_diff_devnull "$at_stdout" || at_failed=:
39528 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
39529 $at_failed && at_fn_log_failure
39530 $at_traceon; }
39531
39532               { set +x
39533 $as_echo "$at_srcdir/acls02.at:28:
39534 mkdir posix
39535 (cd posix
39536 TEST_TAR_FORMAT=posix
39537 export TEST_TAR_FORMAT
39538 TAR_OPTIONS=\"-H posix\"
39539 export TAR_OPTIONS
39540 rm -rf *
39541
39542
39543   file=\$(TMPDIR=. mktemp fiXXXXXX)
39544
39545   setfattr -n user.test -v test \$file &> /dev/null
39546   if test \"\$?\" != 0; then
39547     exit 77
39548   fi
39549
39550
39551   getfattr \$file &> /dev/null
39552   if test \"\$?\" != 0; then
39553     exit 77
39554   fi
39555
39556
39557
39558
39559   file=\$(TMPDIR=. mktemp fiXXXXXX)
39560
39561   setfacl -m u:\$UID:rwx \$file &> /dev/null
39562   if test \"\$?\" != 0; then
39563     exit 77
39564   fi
39565
39566
39567   getfacl \$file &> /dev/null
39568   if test \"\$?\" != 0; then
39569     exit 77
39570   fi
39571
39572   rm -rf \$file
39573
39574   file=\$(TMPDIR=. mktemp fiXXXXXX)
39575   setfacl -m u:\$UID:rwx \$file
39576   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39577   if test \"\$err\" != \"0\"; then
39578     exit 77
39579   fi
39580
39581
39582 mkdir dir
39583 mkdir dir/subdir
39584 genfile --file dir/subdir/file
39585
39586 MYNAME=\$( id -un )
39587
39588 setfacl -m u:\$MYNAME:--x dir/subdir
39589 setfacl -m u:\$MYNAME:--x dir/subdir/file
39590
39591 cd dir
39592 getfattr -h -m. -d subdir subdir/file > ../before
39593 cd ..
39594
39595 tar --acls -cf archive.tar -C dir subdir
39596 rm -rf dir
39597
39598 mkdir dir
39599 tar --acls -xf archive.tar -C dir
39600
39601 cd dir
39602 getfattr -h -m. -d subdir subdir/file > ../after
39603 cd ..
39604
39605 diff before after
39606 test \"\$?\" = 0
39607 )"
39608 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
39609 ( $at_check_trace;
39610 mkdir posix
39611 (cd posix
39612 TEST_TAR_FORMAT=posix
39613 export TEST_TAR_FORMAT
39614 TAR_OPTIONS="-H posix"
39615 export TAR_OPTIONS
39616 rm -rf *
39617
39618
39619   file=$(TMPDIR=. mktemp fiXXXXXX)
39620
39621   setfattr -n user.test -v test $file &> /dev/null
39622   if test "$?" != 0; then
39623     exit 77
39624   fi
39625
39626
39627   getfattr $file &> /dev/null
39628   if test "$?" != 0; then
39629     exit 77
39630   fi
39631
39632
39633
39634
39635   file=$(TMPDIR=. mktemp fiXXXXXX)
39636
39637   setfacl -m u:$UID:rwx $file &> /dev/null
39638   if test "$?" != 0; then
39639     exit 77
39640   fi
39641
39642
39643   getfacl $file &> /dev/null
39644   if test "$?" != 0; then
39645     exit 77
39646   fi
39647
39648   rm -rf $file
39649
39650   file=$(TMPDIR=. mktemp fiXXXXXX)
39651   setfacl -m u:$UID:rwx $file
39652   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39653   if test "$err" != "0"; then
39654     exit 77
39655   fi
39656
39657
39658 mkdir dir
39659 mkdir dir/subdir
39660 genfile --file dir/subdir/file
39661
39662 MYNAME=$( id -un )
39663
39664 setfacl -m u:$MYNAME:--x dir/subdir
39665 setfacl -m u:$MYNAME:--x dir/subdir/file
39666
39667 cd dir
39668 getfattr -h -m. -d subdir subdir/file > ../before
39669 cd ..
39670
39671 tar --acls -cf archive.tar -C dir subdir
39672 rm -rf dir
39673
39674 mkdir dir
39675 tar --acls -xf archive.tar -C dir
39676
39677 cd dir
39678 getfattr -h -m. -d subdir subdir/file > ../after
39679 cd ..
39680
39681 diff before after
39682 test "$?" = 0
39683 )
39684 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39685 at_status=$? at_failed=false
39686 $at_check_filter
39687 at_fn_diff_devnull "$at_stderr" || at_failed=:
39688 at_fn_diff_devnull "$at_stdout" || at_failed=:
39689 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
39690 $at_failed && at_fn_log_failure
39691 $at_traceon; }
39692
39693               { set +x
39694 $as_echo "$at_srcdir/acls02.at:28:
39695 mkdir gnu
39696 (cd gnu
39697 TEST_TAR_FORMAT=gnu
39698 export TEST_TAR_FORMAT
39699 TAR_OPTIONS=\"-H gnu\"
39700 export TAR_OPTIONS
39701 rm -rf *
39702
39703
39704   file=\$(TMPDIR=. mktemp fiXXXXXX)
39705
39706   setfattr -n user.test -v test \$file &> /dev/null
39707   if test \"\$?\" != 0; then
39708     exit 77
39709   fi
39710
39711
39712   getfattr \$file &> /dev/null
39713   if test \"\$?\" != 0; then
39714     exit 77
39715   fi
39716
39717
39718
39719
39720   file=\$(TMPDIR=. mktemp fiXXXXXX)
39721
39722   setfacl -m u:\$UID:rwx \$file &> /dev/null
39723   if test \"\$?\" != 0; then
39724     exit 77
39725   fi
39726
39727
39728   getfacl \$file &> /dev/null
39729   if test \"\$?\" != 0; then
39730     exit 77
39731   fi
39732
39733   rm -rf \$file
39734
39735   file=\$(TMPDIR=. mktemp fiXXXXXX)
39736   setfacl -m u:\$UID:rwx \$file
39737   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39738   if test \"\$err\" != \"0\"; then
39739     exit 77
39740   fi
39741
39742
39743 mkdir dir
39744 mkdir dir/subdir
39745 genfile --file dir/subdir/file
39746
39747 MYNAME=\$( id -un )
39748
39749 setfacl -m u:\$MYNAME:--x dir/subdir
39750 setfacl -m u:\$MYNAME:--x dir/subdir/file
39751
39752 cd dir
39753 getfattr -h -m. -d subdir subdir/file > ../before
39754 cd ..
39755
39756 tar --acls -cf archive.tar -C dir subdir
39757 rm -rf dir
39758
39759 mkdir dir
39760 tar --acls -xf archive.tar -C dir
39761
39762 cd dir
39763 getfattr -h -m. -d subdir subdir/file > ../after
39764 cd ..
39765
39766 diff before after
39767 test \"\$?\" = 0
39768 )"
39769 at_fn_check_prepare_notrace 'a $(...) command substitution' "acls02.at:28"
39770 ( $at_check_trace;
39771 mkdir gnu
39772 (cd gnu
39773 TEST_TAR_FORMAT=gnu
39774 export TEST_TAR_FORMAT
39775 TAR_OPTIONS="-H gnu"
39776 export TAR_OPTIONS
39777 rm -rf *
39778
39779
39780   file=$(TMPDIR=. mktemp fiXXXXXX)
39781
39782   setfattr -n user.test -v test $file &> /dev/null
39783   if test "$?" != 0; then
39784     exit 77
39785   fi
39786
39787
39788   getfattr $file &> /dev/null
39789   if test "$?" != 0; then
39790     exit 77
39791   fi
39792
39793
39794
39795
39796   file=$(TMPDIR=. mktemp fiXXXXXX)
39797
39798   setfacl -m u:$UID:rwx $file &> /dev/null
39799   if test "$?" != 0; then
39800     exit 77
39801   fi
39802
39803
39804   getfacl $file &> /dev/null
39805   if test "$?" != 0; then
39806     exit 77
39807   fi
39808
39809   rm -rf $file
39810
39811   file=$(TMPDIR=. mktemp fiXXXXXX)
39812   setfacl -m u:$UID:rwx $file
39813   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
39814   if test "$err" != "0"; then
39815     exit 77
39816   fi
39817
39818
39819 mkdir dir
39820 mkdir dir/subdir
39821 genfile --file dir/subdir/file
39822
39823 MYNAME=$( id -un )
39824
39825 setfacl -m u:$MYNAME:--x dir/subdir
39826 setfacl -m u:$MYNAME:--x dir/subdir/file
39827
39828 cd dir
39829 getfattr -h -m. -d subdir subdir/file > ../before
39830 cd ..
39831
39832 tar --acls -cf archive.tar -C dir subdir
39833 rm -rf dir
39834
39835 mkdir dir
39836 tar --acls -xf archive.tar -C dir
39837
39838 cd dir
39839 getfattr -h -m. -d subdir subdir/file > ../after
39840 cd ..
39841
39842 diff before after
39843 test "$?" = 0
39844 )
39845 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
39846 at_status=$? at_failed=false
39847 $at_check_filter
39848 at_fn_diff_devnull "$at_stderr" || at_failed=:
39849 at_fn_diff_devnull "$at_stdout" || at_failed=:
39850 at_fn_check_status 0 $at_status "$at_srcdir/acls02.at:28"
39851 $at_failed && at_fn_log_failure
39852 $at_traceon; }
39853
39854
39855
39856
39857   set +x
39858   $at_times_p && times >"$at_times_file"
39859 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
39860 read at_status <"$at_status_file"
39861 #AT_STOP_174
39862 #AT_START_175
39863 at_fn_group_banner 175 'acls03.at:30' \
39864   "acls: default ACLs" "                             " 25
39865 at_xfail=no
39866       test -f $XFAILFILE && at_xfail=yes
39867 (
39868   $as_echo "175. $at_setup_line: testing $at_desc ..."
39869   $at_traceon
39870
39871
39872
39873
39874
39875
39876
39877
39878
39879   { set +x
39880 $as_echo "$at_srcdir/acls03.at:47:
39881 mkdir v7
39882 (cd v7
39883 TEST_TAR_FORMAT=v7
39884 export TEST_TAR_FORMAT
39885 TAR_OPTIONS=\"-H v7\"
39886 export TAR_OPTIONS
39887 rm -rf *
39888
39889
39890   file=\$(TMPDIR=. mktemp fiXXXXXX)
39891
39892   setfattr -n user.test -v test \$file &> /dev/null
39893   if test \"\$?\" != 0; then
39894     exit 77
39895   fi
39896
39897
39898   getfattr \$file &> /dev/null
39899   if test \"\$?\" != 0; then
39900     exit 77
39901   fi
39902
39903
39904
39905
39906   file=\$(TMPDIR=. mktemp fiXXXXXX)
39907
39908   setfacl -m u:\$UID:rwx \$file &> /dev/null
39909   if test \"\$?\" != 0; then
39910     exit 77
39911   fi
39912
39913
39914   getfacl \$file &> /dev/null
39915   if test \"\$?\" != 0; then
39916     exit 77
39917   fi
39918
39919   rm -rf \$file
39920
39921   file=\$(TMPDIR=. mktemp fiXXXXXX)
39922   setfacl -m u:\$UID:rwx \$file
39923   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
39924   if test \"\$err\" != \"0\"; then
39925     exit 77
39926   fi
39927
39928
39929 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
39930
39931
39932 MYNAME=\$( id -un )
39933 MYGROUP=\$( id -gn )
39934
39935 # Prepare directory structure with default ACLs
39936 mkdir -p pure/d1/d2
39937 genfile --file pure/d1/f2a
39938 genfile --file pure/d1/f2b
39939 genfile --file pure/d1/d2/f3a
39940 genfile --file pure/d1/d2/f3b
39941 setfacl    -m g:\$MYGROUP:r-x pure/d1
39942 setfacl -d -m g:\$MYGROUP:rwx pure/d1
39943 setfacl -d -m u:\$MYNAME:rwx  pure/d1
39944 # \"*a\" files have \"some\" additional ACLs
39945 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
39946 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
39947
39948 # use default format (no acls stored)
39949 tar -cf noacl.tar -C pure d1
39950
39951 # use posix format, acls stored
39952 tar --acls -cf acl.tar -C pure d1
39953
39954 # Directory names are chosen based on \"how the files were extracted from
39955 # archive\".  Equivalent no* tags are used also:
39956 #   ^sacl_    â€” extracted archive has stored ACLs
39957 #   _def_     â€” target directory (-C) has default ACLs
39958 #   _optacl\$  â€” extraction was done with --acls option
39959
39960 mkdir sacl_def_optacl
39961 mkdir sacl_def_optnoacl
39962 mkdir sacl_nodef_optacl
39963 mkdir sacl_nodef_optnoacl
39964 mkdir nosacl_def_optacl
39965 mkdir nosacl_def_optnoacl
39966 mkdir nosacl_nodef_optacl
39967 mkdir nosacl_nodef_optnoacl
39968
39969 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
39970 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
39971
39972 tar -xf acl.tar -C sacl_nodef_optnoacl
39973 tar --acls -xf acl.tar -C sacl_nodef_optacl
39974 tar -xf acl.tar -C sacl_def_optnoacl
39975 tar --acls -xf acl.tar -C sacl_def_optacl
39976 tar -xf noacl.tar -C nosacl_def_optnoacl
39977 # _NO_ ACLs in output
39978 tar -xf noacl.tar -C nosacl_nodef_optnoacl
39979 tar -xf noacl.tar -C nosacl_nodef_optacl
39980 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
39981 # _NO_ ACLs in output (even when default ACLs exist)
39982 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
39983
39984
39985     cd pure
39986     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
39987     cd ..
39988
39989
39990
39991     cd sacl_def_optacl
39992     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
39993     cd ..
39994
39995
39996     cd sacl_def_optnoacl
39997     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
39998     cd ..
39999
40000
40001     cd sacl_nodef_optacl
40002     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40003     cd ..
40004
40005
40006     cd sacl_nodef_optnoacl
40007     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40008     cd ..
40009
40010
40011     cd nosacl_def_optacl
40012     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40013     cd ..
40014
40015
40016     cd nosacl_def_optnoacl
40017     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40018     cd ..
40019
40020
40021     cd nosacl_nodef_optacl
40022     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40023     cd ..
40024
40025
40026     cd nosacl_nodef_optnoacl
40027     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40028     cd ..
40029
40030
40031
40032     echo \"\$pure\" > pure.log
40033     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40034     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
40035         echo \"bad 'pure' against 'sacl_def_optacl' output\"
40036     fi
40037
40038
40039
40040     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40041     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
40042     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
40043         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
40044     fi
40045
40046
40047     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
40048     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40049     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
40050         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
40051     fi
40052
40053
40054     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
40055     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40056     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
40057         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
40058     fi
40059
40060
40061     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
40062     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
40063     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
40064         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
40065     fi
40066
40067
40068     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
40069     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40070     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
40071         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
40072     fi
40073
40074
40075
40076     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40077     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
40078     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
40079         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
40080     fi
40081
40082
40083     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40084     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40085     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
40086         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
40087     fi
40088
40089
40090     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40091     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40092     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
40093         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
40094     fi
40095
40096 )"
40097 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
40098 ( $at_check_trace;
40099 mkdir v7
40100 (cd v7
40101 TEST_TAR_FORMAT=v7
40102 export TEST_TAR_FORMAT
40103 TAR_OPTIONS="-H v7"
40104 export TAR_OPTIONS
40105 rm -rf *
40106
40107
40108   file=$(TMPDIR=. mktemp fiXXXXXX)
40109
40110   setfattr -n user.test -v test $file &> /dev/null
40111   if test "$?" != 0; then
40112     exit 77
40113   fi
40114
40115
40116   getfattr $file &> /dev/null
40117   if test "$?" != 0; then
40118     exit 77
40119   fi
40120
40121
40122
40123
40124   file=$(TMPDIR=. mktemp fiXXXXXX)
40125
40126   setfacl -m u:$UID:rwx $file &> /dev/null
40127   if test "$?" != 0; then
40128     exit 77
40129   fi
40130
40131
40132   getfacl $file &> /dev/null
40133   if test "$?" != 0; then
40134     exit 77
40135   fi
40136
40137   rm -rf $file
40138
40139   file=$(TMPDIR=. mktemp fiXXXXXX)
40140   setfacl -m u:$UID:rwx $file
40141   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
40142   if test "$err" != "0"; then
40143     exit 77
40144   fi
40145
40146
40147 test -z "`sort < /dev/null 2>&1`" || exit 77
40148
40149
40150 MYNAME=$( id -un )
40151 MYGROUP=$( id -gn )
40152
40153 # Prepare directory structure with default ACLs
40154 mkdir -p pure/d1/d2
40155 genfile --file pure/d1/f2a
40156 genfile --file pure/d1/f2b
40157 genfile --file pure/d1/d2/f3a
40158 genfile --file pure/d1/d2/f3b
40159 setfacl    -m g:$MYGROUP:r-x pure/d1
40160 setfacl -d -m g:$MYGROUP:rwx pure/d1
40161 setfacl -d -m u:$MYNAME:rwx  pure/d1
40162 # "*a" files have "some" additional ACLs
40163 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
40164 setfacl    -m u:$MYNAME:--- pure/d1/f2a
40165
40166 # use default format (no acls stored)
40167 tar -cf noacl.tar -C pure d1
40168
40169 # use posix format, acls stored
40170 tar --acls -cf acl.tar -C pure d1
40171
40172 # Directory names are chosen based on "how the files were extracted from
40173 # archive".  Equivalent no* tags are used also:
40174 #   ^sacl_    â€” extracted archive has stored ACLs
40175 #   _def_     â€” target directory (-C) has default ACLs
40176 #   _optacl$  â€” extraction was done with --acls option
40177
40178 mkdir sacl_def_optacl
40179 mkdir sacl_def_optnoacl
40180 mkdir sacl_nodef_optacl
40181 mkdir sacl_nodef_optnoacl
40182 mkdir nosacl_def_optacl
40183 mkdir nosacl_def_optnoacl
40184 mkdir nosacl_nodef_optacl
40185 mkdir nosacl_nodef_optnoacl
40186
40187 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
40188 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
40189
40190 tar -xf acl.tar -C sacl_nodef_optnoacl
40191 tar --acls -xf acl.tar -C sacl_nodef_optacl
40192 tar -xf acl.tar -C sacl_def_optnoacl
40193 tar --acls -xf acl.tar -C sacl_def_optacl
40194 tar -xf noacl.tar -C nosacl_def_optnoacl
40195 # _NO_ ACLs in output
40196 tar -xf noacl.tar -C nosacl_nodef_optnoacl
40197 tar -xf noacl.tar -C nosacl_nodef_optacl
40198 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
40199 # _NO_ ACLs in output (even when default ACLs exist)
40200 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
40201
40202
40203     cd pure
40204     pure="$(find d1 | sort | xargs -n 1 getfacl)"
40205     cd ..
40206
40207
40208
40209     cd sacl_def_optacl
40210     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
40211     cd ..
40212
40213
40214     cd sacl_def_optnoacl
40215     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
40216     cd ..
40217
40218
40219     cd sacl_nodef_optacl
40220     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
40221     cd ..
40222
40223
40224     cd sacl_nodef_optnoacl
40225     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
40226     cd ..
40227
40228
40229     cd nosacl_def_optacl
40230     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
40231     cd ..
40232
40233
40234     cd nosacl_def_optnoacl
40235     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
40236     cd ..
40237
40238
40239     cd nosacl_nodef_optacl
40240     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
40241     cd ..
40242
40243
40244     cd nosacl_nodef_optnoacl
40245     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
40246     cd ..
40247
40248
40249
40250     echo "$pure" > pure.log
40251     echo "$sacl_def_optacl" > sacl_def_optacl.log
40252     if test ! "$pure" "=" "$sacl_def_optacl"; then
40253         echo "bad 'pure' against 'sacl_def_optacl' output"
40254     fi
40255
40256
40257
40258     echo "$sacl_def_optacl" > sacl_def_optacl.log
40259     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
40260     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
40261         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
40262     fi
40263
40264
40265     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
40266     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
40267     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
40268         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
40269     fi
40270
40271
40272     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
40273     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
40274     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
40275         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
40276     fi
40277
40278
40279     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
40280     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
40281     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
40282         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
40283     fi
40284
40285
40286     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
40287     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
40288     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
40289         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
40290     fi
40291
40292
40293
40294     echo "$sacl_def_optacl" > sacl_def_optacl.log
40295     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
40296     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
40297         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
40298     fi
40299
40300
40301     echo "$sacl_def_optacl" > sacl_def_optacl.log
40302     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
40303     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
40304         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
40305     fi
40306
40307
40308     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
40309     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
40310     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
40311         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
40312     fi
40313
40314 )
40315 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40316 at_status=$? at_failed=false
40317 $at_check_filter
40318 at_fn_diff_devnull "$at_stderr" || at_failed=:
40319 at_fn_diff_devnull "$at_stdout" || at_failed=:
40320 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
40321 $at_failed && at_fn_log_failure
40322 $at_traceon; }
40323
40324               { set +x
40325 $as_echo "$at_srcdir/acls03.at:47:
40326 mkdir oldgnu
40327 (cd oldgnu
40328 TEST_TAR_FORMAT=oldgnu
40329 export TEST_TAR_FORMAT
40330 TAR_OPTIONS=\"-H oldgnu\"
40331 export TAR_OPTIONS
40332 rm -rf *
40333
40334
40335   file=\$(TMPDIR=. mktemp fiXXXXXX)
40336
40337   setfattr -n user.test -v test \$file &> /dev/null
40338   if test \"\$?\" != 0; then
40339     exit 77
40340   fi
40341
40342
40343   getfattr \$file &> /dev/null
40344   if test \"\$?\" != 0; then
40345     exit 77
40346   fi
40347
40348
40349
40350
40351   file=\$(TMPDIR=. mktemp fiXXXXXX)
40352
40353   setfacl -m u:\$UID:rwx \$file &> /dev/null
40354   if test \"\$?\" != 0; then
40355     exit 77
40356   fi
40357
40358
40359   getfacl \$file &> /dev/null
40360   if test \"\$?\" != 0; then
40361     exit 77
40362   fi
40363
40364   rm -rf \$file
40365
40366   file=\$(TMPDIR=. mktemp fiXXXXXX)
40367   setfacl -m u:\$UID:rwx \$file
40368   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
40369   if test \"\$err\" != \"0\"; then
40370     exit 77
40371   fi
40372
40373
40374 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40375
40376
40377 MYNAME=\$( id -un )
40378 MYGROUP=\$( id -gn )
40379
40380 # Prepare directory structure with default ACLs
40381 mkdir -p pure/d1/d2
40382 genfile --file pure/d1/f2a
40383 genfile --file pure/d1/f2b
40384 genfile --file pure/d1/d2/f3a
40385 genfile --file pure/d1/d2/f3b
40386 setfacl    -m g:\$MYGROUP:r-x pure/d1
40387 setfacl -d -m g:\$MYGROUP:rwx pure/d1
40388 setfacl -d -m u:\$MYNAME:rwx  pure/d1
40389 # \"*a\" files have \"some\" additional ACLs
40390 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
40391 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
40392
40393 # use default format (no acls stored)
40394 tar -cf noacl.tar -C pure d1
40395
40396 # use posix format, acls stored
40397 tar --acls -cf acl.tar -C pure d1
40398
40399 # Directory names are chosen based on \"how the files were extracted from
40400 # archive\".  Equivalent no* tags are used also:
40401 #   ^sacl_    â€” extracted archive has stored ACLs
40402 #   _def_     â€” target directory (-C) has default ACLs
40403 #   _optacl\$  â€” extraction was done with --acls option
40404
40405 mkdir sacl_def_optacl
40406 mkdir sacl_def_optnoacl
40407 mkdir sacl_nodef_optacl
40408 mkdir sacl_nodef_optnoacl
40409 mkdir nosacl_def_optacl
40410 mkdir nosacl_def_optnoacl
40411 mkdir nosacl_nodef_optacl
40412 mkdir nosacl_nodef_optnoacl
40413
40414 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
40415 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
40416
40417 tar -xf acl.tar -C sacl_nodef_optnoacl
40418 tar --acls -xf acl.tar -C sacl_nodef_optacl
40419 tar -xf acl.tar -C sacl_def_optnoacl
40420 tar --acls -xf acl.tar -C sacl_def_optacl
40421 tar -xf noacl.tar -C nosacl_def_optnoacl
40422 # _NO_ ACLs in output
40423 tar -xf noacl.tar -C nosacl_nodef_optnoacl
40424 tar -xf noacl.tar -C nosacl_nodef_optacl
40425 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
40426 # _NO_ ACLs in output (even when default ACLs exist)
40427 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
40428
40429
40430     cd pure
40431     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40432     cd ..
40433
40434
40435
40436     cd sacl_def_optacl
40437     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40438     cd ..
40439
40440
40441     cd sacl_def_optnoacl
40442     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40443     cd ..
40444
40445
40446     cd sacl_nodef_optacl
40447     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40448     cd ..
40449
40450
40451     cd sacl_nodef_optnoacl
40452     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40453     cd ..
40454
40455
40456     cd nosacl_def_optacl
40457     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40458     cd ..
40459
40460
40461     cd nosacl_def_optnoacl
40462     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40463     cd ..
40464
40465
40466     cd nosacl_nodef_optacl
40467     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40468     cd ..
40469
40470
40471     cd nosacl_nodef_optnoacl
40472     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40473     cd ..
40474
40475
40476
40477     echo \"\$pure\" > pure.log
40478     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40479     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
40480         echo \"bad 'pure' against 'sacl_def_optacl' output\"
40481     fi
40482
40483
40484
40485     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40486     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
40487     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
40488         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
40489     fi
40490
40491
40492     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
40493     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40494     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
40495         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
40496     fi
40497
40498
40499     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
40500     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40501     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
40502         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
40503     fi
40504
40505
40506     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
40507     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
40508     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
40509         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
40510     fi
40511
40512
40513     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
40514     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40515     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
40516         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
40517     fi
40518
40519
40520
40521     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40522     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
40523     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
40524         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
40525     fi
40526
40527
40528     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40529     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40530     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
40531         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
40532     fi
40533
40534
40535     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40536     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40537     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
40538         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
40539     fi
40540
40541 )"
40542 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
40543 ( $at_check_trace;
40544 mkdir oldgnu
40545 (cd oldgnu
40546 TEST_TAR_FORMAT=oldgnu
40547 export TEST_TAR_FORMAT
40548 TAR_OPTIONS="-H oldgnu"
40549 export TAR_OPTIONS
40550 rm -rf *
40551
40552
40553   file=$(TMPDIR=. mktemp fiXXXXXX)
40554
40555   setfattr -n user.test -v test $file &> /dev/null
40556   if test "$?" != 0; then
40557     exit 77
40558   fi
40559
40560
40561   getfattr $file &> /dev/null
40562   if test "$?" != 0; then
40563     exit 77
40564   fi
40565
40566
40567
40568
40569   file=$(TMPDIR=. mktemp fiXXXXXX)
40570
40571   setfacl -m u:$UID:rwx $file &> /dev/null
40572   if test "$?" != 0; then
40573     exit 77
40574   fi
40575
40576
40577   getfacl $file &> /dev/null
40578   if test "$?" != 0; then
40579     exit 77
40580   fi
40581
40582   rm -rf $file
40583
40584   file=$(TMPDIR=. mktemp fiXXXXXX)
40585   setfacl -m u:$UID:rwx $file
40586   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
40587   if test "$err" != "0"; then
40588     exit 77
40589   fi
40590
40591
40592 test -z "`sort < /dev/null 2>&1`" || exit 77
40593
40594
40595 MYNAME=$( id -un )
40596 MYGROUP=$( id -gn )
40597
40598 # Prepare directory structure with default ACLs
40599 mkdir -p pure/d1/d2
40600 genfile --file pure/d1/f2a
40601 genfile --file pure/d1/f2b
40602 genfile --file pure/d1/d2/f3a
40603 genfile --file pure/d1/d2/f3b
40604 setfacl    -m g:$MYGROUP:r-x pure/d1
40605 setfacl -d -m g:$MYGROUP:rwx pure/d1
40606 setfacl -d -m u:$MYNAME:rwx  pure/d1
40607 # "*a" files have "some" additional ACLs
40608 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
40609 setfacl    -m u:$MYNAME:--- pure/d1/f2a
40610
40611 # use default format (no acls stored)
40612 tar -cf noacl.tar -C pure d1
40613
40614 # use posix format, acls stored
40615 tar --acls -cf acl.tar -C pure d1
40616
40617 # Directory names are chosen based on "how the files were extracted from
40618 # archive".  Equivalent no* tags are used also:
40619 #   ^sacl_    â€” extracted archive has stored ACLs
40620 #   _def_     â€” target directory (-C) has default ACLs
40621 #   _optacl$  â€” extraction was done with --acls option
40622
40623 mkdir sacl_def_optacl
40624 mkdir sacl_def_optnoacl
40625 mkdir sacl_nodef_optacl
40626 mkdir sacl_nodef_optnoacl
40627 mkdir nosacl_def_optacl
40628 mkdir nosacl_def_optnoacl
40629 mkdir nosacl_nodef_optacl
40630 mkdir nosacl_nodef_optnoacl
40631
40632 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
40633 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
40634
40635 tar -xf acl.tar -C sacl_nodef_optnoacl
40636 tar --acls -xf acl.tar -C sacl_nodef_optacl
40637 tar -xf acl.tar -C sacl_def_optnoacl
40638 tar --acls -xf acl.tar -C sacl_def_optacl
40639 tar -xf noacl.tar -C nosacl_def_optnoacl
40640 # _NO_ ACLs in output
40641 tar -xf noacl.tar -C nosacl_nodef_optnoacl
40642 tar -xf noacl.tar -C nosacl_nodef_optacl
40643 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
40644 # _NO_ ACLs in output (even when default ACLs exist)
40645 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
40646
40647
40648     cd pure
40649     pure="$(find d1 | sort | xargs -n 1 getfacl)"
40650     cd ..
40651
40652
40653
40654     cd sacl_def_optacl
40655     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
40656     cd ..
40657
40658
40659     cd sacl_def_optnoacl
40660     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
40661     cd ..
40662
40663
40664     cd sacl_nodef_optacl
40665     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
40666     cd ..
40667
40668
40669     cd sacl_nodef_optnoacl
40670     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
40671     cd ..
40672
40673
40674     cd nosacl_def_optacl
40675     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
40676     cd ..
40677
40678
40679     cd nosacl_def_optnoacl
40680     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
40681     cd ..
40682
40683
40684     cd nosacl_nodef_optacl
40685     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
40686     cd ..
40687
40688
40689     cd nosacl_nodef_optnoacl
40690     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
40691     cd ..
40692
40693
40694
40695     echo "$pure" > pure.log
40696     echo "$sacl_def_optacl" > sacl_def_optacl.log
40697     if test ! "$pure" "=" "$sacl_def_optacl"; then
40698         echo "bad 'pure' against 'sacl_def_optacl' output"
40699     fi
40700
40701
40702
40703     echo "$sacl_def_optacl" > sacl_def_optacl.log
40704     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
40705     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
40706         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
40707     fi
40708
40709
40710     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
40711     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
40712     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
40713         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
40714     fi
40715
40716
40717     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
40718     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
40719     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
40720         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
40721     fi
40722
40723
40724     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
40725     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
40726     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
40727         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
40728     fi
40729
40730
40731     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
40732     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
40733     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
40734         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
40735     fi
40736
40737
40738
40739     echo "$sacl_def_optacl" > sacl_def_optacl.log
40740     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
40741     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
40742         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
40743     fi
40744
40745
40746     echo "$sacl_def_optacl" > sacl_def_optacl.log
40747     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
40748     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
40749         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
40750     fi
40751
40752
40753     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
40754     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
40755     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
40756         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
40757     fi
40758
40759 )
40760 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
40761 at_status=$? at_failed=false
40762 $at_check_filter
40763 at_fn_diff_devnull "$at_stderr" || at_failed=:
40764 at_fn_diff_devnull "$at_stdout" || at_failed=:
40765 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
40766 $at_failed && at_fn_log_failure
40767 $at_traceon; }
40768
40769               { set +x
40770 $as_echo "$at_srcdir/acls03.at:47:
40771 mkdir ustar
40772 (cd ustar
40773 TEST_TAR_FORMAT=ustar
40774 export TEST_TAR_FORMAT
40775 TAR_OPTIONS=\"-H ustar\"
40776 export TAR_OPTIONS
40777 rm -rf *
40778
40779
40780   file=\$(TMPDIR=. mktemp fiXXXXXX)
40781
40782   setfattr -n user.test -v test \$file &> /dev/null
40783   if test \"\$?\" != 0; then
40784     exit 77
40785   fi
40786
40787
40788   getfattr \$file &> /dev/null
40789   if test \"\$?\" != 0; then
40790     exit 77
40791   fi
40792
40793
40794
40795
40796   file=\$(TMPDIR=. mktemp fiXXXXXX)
40797
40798   setfacl -m u:\$UID:rwx \$file &> /dev/null
40799   if test \"\$?\" != 0; then
40800     exit 77
40801   fi
40802
40803
40804   getfacl \$file &> /dev/null
40805   if test \"\$?\" != 0; then
40806     exit 77
40807   fi
40808
40809   rm -rf \$file
40810
40811   file=\$(TMPDIR=. mktemp fiXXXXXX)
40812   setfacl -m u:\$UID:rwx \$file
40813   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
40814   if test \"\$err\" != \"0\"; then
40815     exit 77
40816   fi
40817
40818
40819 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
40820
40821
40822 MYNAME=\$( id -un )
40823 MYGROUP=\$( id -gn )
40824
40825 # Prepare directory structure with default ACLs
40826 mkdir -p pure/d1/d2
40827 genfile --file pure/d1/f2a
40828 genfile --file pure/d1/f2b
40829 genfile --file pure/d1/d2/f3a
40830 genfile --file pure/d1/d2/f3b
40831 setfacl    -m g:\$MYGROUP:r-x pure/d1
40832 setfacl -d -m g:\$MYGROUP:rwx pure/d1
40833 setfacl -d -m u:\$MYNAME:rwx  pure/d1
40834 # \"*a\" files have \"some\" additional ACLs
40835 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
40836 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
40837
40838 # use default format (no acls stored)
40839 tar -cf noacl.tar -C pure d1
40840
40841 # use posix format, acls stored
40842 tar --acls -cf acl.tar -C pure d1
40843
40844 # Directory names are chosen based on \"how the files were extracted from
40845 # archive\".  Equivalent no* tags are used also:
40846 #   ^sacl_    â€” extracted archive has stored ACLs
40847 #   _def_     â€” target directory (-C) has default ACLs
40848 #   _optacl\$  â€” extraction was done with --acls option
40849
40850 mkdir sacl_def_optacl
40851 mkdir sacl_def_optnoacl
40852 mkdir sacl_nodef_optacl
40853 mkdir sacl_nodef_optnoacl
40854 mkdir nosacl_def_optacl
40855 mkdir nosacl_def_optnoacl
40856 mkdir nosacl_nodef_optacl
40857 mkdir nosacl_nodef_optnoacl
40858
40859 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
40860 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
40861
40862 tar -xf acl.tar -C sacl_nodef_optnoacl
40863 tar --acls -xf acl.tar -C sacl_nodef_optacl
40864 tar -xf acl.tar -C sacl_def_optnoacl
40865 tar --acls -xf acl.tar -C sacl_def_optacl
40866 tar -xf noacl.tar -C nosacl_def_optnoacl
40867 # _NO_ ACLs in output
40868 tar -xf noacl.tar -C nosacl_nodef_optnoacl
40869 tar -xf noacl.tar -C nosacl_nodef_optacl
40870 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
40871 # _NO_ ACLs in output (even when default ACLs exist)
40872 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
40873
40874
40875     cd pure
40876     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40877     cd ..
40878
40879
40880
40881     cd sacl_def_optacl
40882     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40883     cd ..
40884
40885
40886     cd sacl_def_optnoacl
40887     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40888     cd ..
40889
40890
40891     cd sacl_nodef_optacl
40892     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40893     cd ..
40894
40895
40896     cd sacl_nodef_optnoacl
40897     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40898     cd ..
40899
40900
40901     cd nosacl_def_optacl
40902     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40903     cd ..
40904
40905
40906     cd nosacl_def_optnoacl
40907     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40908     cd ..
40909
40910
40911     cd nosacl_nodef_optacl
40912     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40913     cd ..
40914
40915
40916     cd nosacl_nodef_optnoacl
40917     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
40918     cd ..
40919
40920
40921
40922     echo \"\$pure\" > pure.log
40923     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40924     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
40925         echo \"bad 'pure' against 'sacl_def_optacl' output\"
40926     fi
40927
40928
40929
40930     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40931     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
40932     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
40933         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
40934     fi
40935
40936
40937     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
40938     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40939     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
40940         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
40941     fi
40942
40943
40944     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
40945     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40946     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
40947         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
40948     fi
40949
40950
40951     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
40952     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
40953     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
40954         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
40955     fi
40956
40957
40958     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
40959     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40960     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
40961         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
40962     fi
40963
40964
40965
40966     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40967     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
40968     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
40969         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
40970     fi
40971
40972
40973     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
40974     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40975     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
40976         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
40977     fi
40978
40979
40980     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
40981     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
40982     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
40983         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
40984     fi
40985
40986 )"
40987 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
40988 ( $at_check_trace;
40989 mkdir ustar
40990 (cd ustar
40991 TEST_TAR_FORMAT=ustar
40992 export TEST_TAR_FORMAT
40993 TAR_OPTIONS="-H ustar"
40994 export TAR_OPTIONS
40995 rm -rf *
40996
40997
40998   file=$(TMPDIR=. mktemp fiXXXXXX)
40999
41000   setfattr -n user.test -v test $file &> /dev/null
41001   if test "$?" != 0; then
41002     exit 77
41003   fi
41004
41005
41006   getfattr $file &> /dev/null
41007   if test "$?" != 0; then
41008     exit 77
41009   fi
41010
41011
41012
41013
41014   file=$(TMPDIR=. mktemp fiXXXXXX)
41015
41016   setfacl -m u:$UID:rwx $file &> /dev/null
41017   if test "$?" != 0; then
41018     exit 77
41019   fi
41020
41021
41022   getfacl $file &> /dev/null
41023   if test "$?" != 0; then
41024     exit 77
41025   fi
41026
41027   rm -rf $file
41028
41029   file=$(TMPDIR=. mktemp fiXXXXXX)
41030   setfacl -m u:$UID:rwx $file
41031   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41032   if test "$err" != "0"; then
41033     exit 77
41034   fi
41035
41036
41037 test -z "`sort < /dev/null 2>&1`" || exit 77
41038
41039
41040 MYNAME=$( id -un )
41041 MYGROUP=$( id -gn )
41042
41043 # Prepare directory structure with default ACLs
41044 mkdir -p pure/d1/d2
41045 genfile --file pure/d1/f2a
41046 genfile --file pure/d1/f2b
41047 genfile --file pure/d1/d2/f3a
41048 genfile --file pure/d1/d2/f3b
41049 setfacl    -m g:$MYGROUP:r-x pure/d1
41050 setfacl -d -m g:$MYGROUP:rwx pure/d1
41051 setfacl -d -m u:$MYNAME:rwx  pure/d1
41052 # "*a" files have "some" additional ACLs
41053 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
41054 setfacl    -m u:$MYNAME:--- pure/d1/f2a
41055
41056 # use default format (no acls stored)
41057 tar -cf noacl.tar -C pure d1
41058
41059 # use posix format, acls stored
41060 tar --acls -cf acl.tar -C pure d1
41061
41062 # Directory names are chosen based on "how the files were extracted from
41063 # archive".  Equivalent no* tags are used also:
41064 #   ^sacl_    â€” extracted archive has stored ACLs
41065 #   _def_     â€” target directory (-C) has default ACLs
41066 #   _optacl$  â€” extraction was done with --acls option
41067
41068 mkdir sacl_def_optacl
41069 mkdir sacl_def_optnoacl
41070 mkdir sacl_nodef_optacl
41071 mkdir sacl_nodef_optnoacl
41072 mkdir nosacl_def_optacl
41073 mkdir nosacl_def_optnoacl
41074 mkdir nosacl_nodef_optacl
41075 mkdir nosacl_nodef_optnoacl
41076
41077 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41078 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41079
41080 tar -xf acl.tar -C sacl_nodef_optnoacl
41081 tar --acls -xf acl.tar -C sacl_nodef_optacl
41082 tar -xf acl.tar -C sacl_def_optnoacl
41083 tar --acls -xf acl.tar -C sacl_def_optacl
41084 tar -xf noacl.tar -C nosacl_def_optnoacl
41085 # _NO_ ACLs in output
41086 tar -xf noacl.tar -C nosacl_nodef_optnoacl
41087 tar -xf noacl.tar -C nosacl_nodef_optacl
41088 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
41089 # _NO_ ACLs in output (even when default ACLs exist)
41090 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
41091
41092
41093     cd pure
41094     pure="$(find d1 | sort | xargs -n 1 getfacl)"
41095     cd ..
41096
41097
41098
41099     cd sacl_def_optacl
41100     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41101     cd ..
41102
41103
41104     cd sacl_def_optnoacl
41105     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41106     cd ..
41107
41108
41109     cd sacl_nodef_optacl
41110     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41111     cd ..
41112
41113
41114     cd sacl_nodef_optnoacl
41115     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41116     cd ..
41117
41118
41119     cd nosacl_def_optacl
41120     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41121     cd ..
41122
41123
41124     cd nosacl_def_optnoacl
41125     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41126     cd ..
41127
41128
41129     cd nosacl_nodef_optacl
41130     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41131     cd ..
41132
41133
41134     cd nosacl_nodef_optnoacl
41135     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41136     cd ..
41137
41138
41139
41140     echo "$pure" > pure.log
41141     echo "$sacl_def_optacl" > sacl_def_optacl.log
41142     if test ! "$pure" "=" "$sacl_def_optacl"; then
41143         echo "bad 'pure' against 'sacl_def_optacl' output"
41144     fi
41145
41146
41147
41148     echo "$sacl_def_optacl" > sacl_def_optacl.log
41149     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
41150     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
41151         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
41152     fi
41153
41154
41155     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
41156     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
41157     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
41158         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
41159     fi
41160
41161
41162     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
41163     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
41164     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
41165         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
41166     fi
41167
41168
41169     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
41170     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
41171     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
41172         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
41173     fi
41174
41175
41176     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
41177     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
41178     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
41179         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
41180     fi
41181
41182
41183
41184     echo "$sacl_def_optacl" > sacl_def_optacl.log
41185     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
41186     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
41187         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
41188     fi
41189
41190
41191     echo "$sacl_def_optacl" > sacl_def_optacl.log
41192     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
41193     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
41194         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
41195     fi
41196
41197
41198     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
41199     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
41200     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
41201         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
41202     fi
41203
41204 )
41205 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41206 at_status=$? at_failed=false
41207 $at_check_filter
41208 at_fn_diff_devnull "$at_stderr" || at_failed=:
41209 at_fn_diff_devnull "$at_stdout" || at_failed=:
41210 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
41211 $at_failed && at_fn_log_failure
41212 $at_traceon; }
41213
41214               { set +x
41215 $as_echo "$at_srcdir/acls03.at:47:
41216 mkdir posix
41217 (cd posix
41218 TEST_TAR_FORMAT=posix
41219 export TEST_TAR_FORMAT
41220 TAR_OPTIONS=\"-H posix\"
41221 export TAR_OPTIONS
41222 rm -rf *
41223
41224
41225   file=\$(TMPDIR=. mktemp fiXXXXXX)
41226
41227   setfattr -n user.test -v test \$file &> /dev/null
41228   if test \"\$?\" != 0; then
41229     exit 77
41230   fi
41231
41232
41233   getfattr \$file &> /dev/null
41234   if test \"\$?\" != 0; then
41235     exit 77
41236   fi
41237
41238
41239
41240
41241   file=\$(TMPDIR=. mktemp fiXXXXXX)
41242
41243   setfacl -m u:\$UID:rwx \$file &> /dev/null
41244   if test \"\$?\" != 0; then
41245     exit 77
41246   fi
41247
41248
41249   getfacl \$file &> /dev/null
41250   if test \"\$?\" != 0; then
41251     exit 77
41252   fi
41253
41254   rm -rf \$file
41255
41256   file=\$(TMPDIR=. mktemp fiXXXXXX)
41257   setfacl -m u:\$UID:rwx \$file
41258   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41259   if test \"\$err\" != \"0\"; then
41260     exit 77
41261   fi
41262
41263
41264 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
41265
41266
41267 MYNAME=\$( id -un )
41268 MYGROUP=\$( id -gn )
41269
41270 # Prepare directory structure with default ACLs
41271 mkdir -p pure/d1/d2
41272 genfile --file pure/d1/f2a
41273 genfile --file pure/d1/f2b
41274 genfile --file pure/d1/d2/f3a
41275 genfile --file pure/d1/d2/f3b
41276 setfacl    -m g:\$MYGROUP:r-x pure/d1
41277 setfacl -d -m g:\$MYGROUP:rwx pure/d1
41278 setfacl -d -m u:\$MYNAME:rwx  pure/d1
41279 # \"*a\" files have \"some\" additional ACLs
41280 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
41281 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
41282
41283 # use default format (no acls stored)
41284 tar -cf noacl.tar -C pure d1
41285
41286 # use posix format, acls stored
41287 tar --acls -cf acl.tar -C pure d1
41288
41289 # Directory names are chosen based on \"how the files were extracted from
41290 # archive\".  Equivalent no* tags are used also:
41291 #   ^sacl_    â€” extracted archive has stored ACLs
41292 #   _def_     â€” target directory (-C) has default ACLs
41293 #   _optacl\$  â€” extraction was done with --acls option
41294
41295 mkdir sacl_def_optacl
41296 mkdir sacl_def_optnoacl
41297 mkdir sacl_nodef_optacl
41298 mkdir sacl_nodef_optnoacl
41299 mkdir nosacl_def_optacl
41300 mkdir nosacl_def_optnoacl
41301 mkdir nosacl_nodef_optacl
41302 mkdir nosacl_nodef_optnoacl
41303
41304 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41305 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41306
41307 tar -xf acl.tar -C sacl_nodef_optnoacl
41308 tar --acls -xf acl.tar -C sacl_nodef_optacl
41309 tar -xf acl.tar -C sacl_def_optnoacl
41310 tar --acls -xf acl.tar -C sacl_def_optacl
41311 tar -xf noacl.tar -C nosacl_def_optnoacl
41312 # _NO_ ACLs in output
41313 tar -xf noacl.tar -C nosacl_nodef_optnoacl
41314 tar -xf noacl.tar -C nosacl_nodef_optacl
41315 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
41316 # _NO_ ACLs in output (even when default ACLs exist)
41317 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
41318
41319
41320     cd pure
41321     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41322     cd ..
41323
41324
41325
41326     cd sacl_def_optacl
41327     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41328     cd ..
41329
41330
41331     cd sacl_def_optnoacl
41332     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41333     cd ..
41334
41335
41336     cd sacl_nodef_optacl
41337     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41338     cd ..
41339
41340
41341     cd sacl_nodef_optnoacl
41342     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41343     cd ..
41344
41345
41346     cd nosacl_def_optacl
41347     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41348     cd ..
41349
41350
41351     cd nosacl_def_optnoacl
41352     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41353     cd ..
41354
41355
41356     cd nosacl_nodef_optacl
41357     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41358     cd ..
41359
41360
41361     cd nosacl_nodef_optnoacl
41362     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41363     cd ..
41364
41365
41366
41367     echo \"\$pure\" > pure.log
41368     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
41369     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
41370         echo \"bad 'pure' against 'sacl_def_optacl' output\"
41371     fi
41372
41373
41374
41375     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
41376     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
41377     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
41378         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
41379     fi
41380
41381
41382     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
41383     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
41384     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
41385         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
41386     fi
41387
41388
41389     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
41390     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
41391     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
41392         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
41393     fi
41394
41395
41396     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
41397     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
41398     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
41399         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
41400     fi
41401
41402
41403     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
41404     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
41405     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
41406         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
41407     fi
41408
41409
41410
41411     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
41412     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
41413     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
41414         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
41415     fi
41416
41417
41418     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
41419     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
41420     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
41421         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
41422     fi
41423
41424
41425     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
41426     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
41427     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
41428         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
41429     fi
41430
41431 )"
41432 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
41433 ( $at_check_trace;
41434 mkdir posix
41435 (cd posix
41436 TEST_TAR_FORMAT=posix
41437 export TEST_TAR_FORMAT
41438 TAR_OPTIONS="-H posix"
41439 export TAR_OPTIONS
41440 rm -rf *
41441
41442
41443   file=$(TMPDIR=. mktemp fiXXXXXX)
41444
41445   setfattr -n user.test -v test $file &> /dev/null
41446   if test "$?" != 0; then
41447     exit 77
41448   fi
41449
41450
41451   getfattr $file &> /dev/null
41452   if test "$?" != 0; then
41453     exit 77
41454   fi
41455
41456
41457
41458
41459   file=$(TMPDIR=. mktemp fiXXXXXX)
41460
41461   setfacl -m u:$UID:rwx $file &> /dev/null
41462   if test "$?" != 0; then
41463     exit 77
41464   fi
41465
41466
41467   getfacl $file &> /dev/null
41468   if test "$?" != 0; then
41469     exit 77
41470   fi
41471
41472   rm -rf $file
41473
41474   file=$(TMPDIR=. mktemp fiXXXXXX)
41475   setfacl -m u:$UID:rwx $file
41476   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41477   if test "$err" != "0"; then
41478     exit 77
41479   fi
41480
41481
41482 test -z "`sort < /dev/null 2>&1`" || exit 77
41483
41484
41485 MYNAME=$( id -un )
41486 MYGROUP=$( id -gn )
41487
41488 # Prepare directory structure with default ACLs
41489 mkdir -p pure/d1/d2
41490 genfile --file pure/d1/f2a
41491 genfile --file pure/d1/f2b
41492 genfile --file pure/d1/d2/f3a
41493 genfile --file pure/d1/d2/f3b
41494 setfacl    -m g:$MYGROUP:r-x pure/d1
41495 setfacl -d -m g:$MYGROUP:rwx pure/d1
41496 setfacl -d -m u:$MYNAME:rwx  pure/d1
41497 # "*a" files have "some" additional ACLs
41498 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
41499 setfacl    -m u:$MYNAME:--- pure/d1/f2a
41500
41501 # use default format (no acls stored)
41502 tar -cf noacl.tar -C pure d1
41503
41504 # use posix format, acls stored
41505 tar --acls -cf acl.tar -C pure d1
41506
41507 # Directory names are chosen based on "how the files were extracted from
41508 # archive".  Equivalent no* tags are used also:
41509 #   ^sacl_    â€” extracted archive has stored ACLs
41510 #   _def_     â€” target directory (-C) has default ACLs
41511 #   _optacl$  â€” extraction was done with --acls option
41512
41513 mkdir sacl_def_optacl
41514 mkdir sacl_def_optnoacl
41515 mkdir sacl_nodef_optacl
41516 mkdir sacl_nodef_optnoacl
41517 mkdir nosacl_def_optacl
41518 mkdir nosacl_def_optnoacl
41519 mkdir nosacl_nodef_optacl
41520 mkdir nosacl_nodef_optnoacl
41521
41522 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41523 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41524
41525 tar -xf acl.tar -C sacl_nodef_optnoacl
41526 tar --acls -xf acl.tar -C sacl_nodef_optacl
41527 tar -xf acl.tar -C sacl_def_optnoacl
41528 tar --acls -xf acl.tar -C sacl_def_optacl
41529 tar -xf noacl.tar -C nosacl_def_optnoacl
41530 # _NO_ ACLs in output
41531 tar -xf noacl.tar -C nosacl_nodef_optnoacl
41532 tar -xf noacl.tar -C nosacl_nodef_optacl
41533 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
41534 # _NO_ ACLs in output (even when default ACLs exist)
41535 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
41536
41537
41538     cd pure
41539     pure="$(find d1 | sort | xargs -n 1 getfacl)"
41540     cd ..
41541
41542
41543
41544     cd sacl_def_optacl
41545     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41546     cd ..
41547
41548
41549     cd sacl_def_optnoacl
41550     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41551     cd ..
41552
41553
41554     cd sacl_nodef_optacl
41555     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41556     cd ..
41557
41558
41559     cd sacl_nodef_optnoacl
41560     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41561     cd ..
41562
41563
41564     cd nosacl_def_optacl
41565     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41566     cd ..
41567
41568
41569     cd nosacl_def_optnoacl
41570     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41571     cd ..
41572
41573
41574     cd nosacl_nodef_optacl
41575     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41576     cd ..
41577
41578
41579     cd nosacl_nodef_optnoacl
41580     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41581     cd ..
41582
41583
41584
41585     echo "$pure" > pure.log
41586     echo "$sacl_def_optacl" > sacl_def_optacl.log
41587     if test ! "$pure" "=" "$sacl_def_optacl"; then
41588         echo "bad 'pure' against 'sacl_def_optacl' output"
41589     fi
41590
41591
41592
41593     echo "$sacl_def_optacl" > sacl_def_optacl.log
41594     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
41595     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
41596         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
41597     fi
41598
41599
41600     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
41601     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
41602     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
41603         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
41604     fi
41605
41606
41607     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
41608     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
41609     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
41610         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
41611     fi
41612
41613
41614     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
41615     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
41616     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
41617         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
41618     fi
41619
41620
41621     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
41622     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
41623     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
41624         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
41625     fi
41626
41627
41628
41629     echo "$sacl_def_optacl" > sacl_def_optacl.log
41630     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
41631     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
41632         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
41633     fi
41634
41635
41636     echo "$sacl_def_optacl" > sacl_def_optacl.log
41637     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
41638     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
41639         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
41640     fi
41641
41642
41643     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
41644     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
41645     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
41646         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
41647     fi
41648
41649 )
41650 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
41651 at_status=$? at_failed=false
41652 $at_check_filter
41653 at_fn_diff_devnull "$at_stderr" || at_failed=:
41654 at_fn_diff_devnull "$at_stdout" || at_failed=:
41655 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
41656 $at_failed && at_fn_log_failure
41657 $at_traceon; }
41658
41659               { set +x
41660 $as_echo "$at_srcdir/acls03.at:47:
41661 mkdir gnu
41662 (cd gnu
41663 TEST_TAR_FORMAT=gnu
41664 export TEST_TAR_FORMAT
41665 TAR_OPTIONS=\"-H gnu\"
41666 export TAR_OPTIONS
41667 rm -rf *
41668
41669
41670   file=\$(TMPDIR=. mktemp fiXXXXXX)
41671
41672   setfattr -n user.test -v test \$file &> /dev/null
41673   if test \"\$?\" != 0; then
41674     exit 77
41675   fi
41676
41677
41678   getfattr \$file &> /dev/null
41679   if test \"\$?\" != 0; then
41680     exit 77
41681   fi
41682
41683
41684
41685
41686   file=\$(TMPDIR=. mktemp fiXXXXXX)
41687
41688   setfacl -m u:\$UID:rwx \$file &> /dev/null
41689   if test \"\$?\" != 0; then
41690     exit 77
41691   fi
41692
41693
41694   getfacl \$file &> /dev/null
41695   if test \"\$?\" != 0; then
41696     exit 77
41697   fi
41698
41699   rm -rf \$file
41700
41701   file=\$(TMPDIR=. mktemp fiXXXXXX)
41702   setfacl -m u:\$UID:rwx \$file
41703   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
41704   if test \"\$err\" != \"0\"; then
41705     exit 77
41706   fi
41707
41708
41709 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
41710
41711
41712 MYNAME=\$( id -un )
41713 MYGROUP=\$( id -gn )
41714
41715 # Prepare directory structure with default ACLs
41716 mkdir -p pure/d1/d2
41717 genfile --file pure/d1/f2a
41718 genfile --file pure/d1/f2b
41719 genfile --file pure/d1/d2/f3a
41720 genfile --file pure/d1/d2/f3b
41721 setfacl    -m g:\$MYGROUP:r-x pure/d1
41722 setfacl -d -m g:\$MYGROUP:rwx pure/d1
41723 setfacl -d -m u:\$MYNAME:rwx  pure/d1
41724 # \"*a\" files have \"some\" additional ACLs
41725 setfacl    -m u:\$MYNAME:--- pure/d1/d2/f3a
41726 setfacl    -m u:\$MYNAME:--- pure/d1/f2a
41727
41728 # use default format (no acls stored)
41729 tar -cf noacl.tar -C pure d1
41730
41731 # use posix format, acls stored
41732 tar --acls -cf acl.tar -C pure d1
41733
41734 # Directory names are chosen based on \"how the files were extracted from
41735 # archive\".  Equivalent no* tags are used also:
41736 #   ^sacl_    â€” extracted archive has stored ACLs
41737 #   _def_     â€” target directory (-C) has default ACLs
41738 #   _optacl\$  â€” extraction was done with --acls option
41739
41740 mkdir sacl_def_optacl
41741 mkdir sacl_def_optnoacl
41742 mkdir sacl_nodef_optacl
41743 mkdir sacl_nodef_optnoacl
41744 mkdir nosacl_def_optacl
41745 mkdir nosacl_def_optnoacl
41746 mkdir nosacl_nodef_optacl
41747 mkdir nosacl_nodef_optnoacl
41748
41749 setfacl -d -m u:\$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41750 setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41751
41752 tar -xf acl.tar -C sacl_nodef_optnoacl
41753 tar --acls -xf acl.tar -C sacl_nodef_optacl
41754 tar -xf acl.tar -C sacl_def_optnoacl
41755 tar --acls -xf acl.tar -C sacl_def_optacl
41756 tar -xf noacl.tar -C nosacl_def_optnoacl
41757 # _NO_ ACLs in output
41758 tar -xf noacl.tar -C nosacl_nodef_optnoacl
41759 tar -xf noacl.tar -C nosacl_nodef_optacl
41760 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
41761 # _NO_ ACLs in output (even when default ACLs exist)
41762 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
41763
41764
41765     cd pure
41766     pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41767     cd ..
41768
41769
41770
41771     cd sacl_def_optacl
41772     sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41773     cd ..
41774
41775
41776     cd sacl_def_optnoacl
41777     sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41778     cd ..
41779
41780
41781     cd sacl_nodef_optacl
41782     sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41783     cd ..
41784
41785
41786     cd sacl_nodef_optnoacl
41787     sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41788     cd ..
41789
41790
41791     cd nosacl_def_optacl
41792     nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41793     cd ..
41794
41795
41796     cd nosacl_def_optnoacl
41797     nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41798     cd ..
41799
41800
41801     cd nosacl_nodef_optacl
41802     nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41803     cd ..
41804
41805
41806     cd nosacl_nodef_optnoacl
41807     nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\"
41808     cd ..
41809
41810
41811
41812     echo \"\$pure\" > pure.log
41813     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
41814     if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then
41815         echo \"bad 'pure' against 'sacl_def_optacl' output\"
41816     fi
41817
41818
41819
41820     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
41821     echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log
41822     if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then
41823         echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\"
41824     fi
41825
41826
41827     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
41828     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
41829     if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then
41830         echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\"
41831     fi
41832
41833
41834     echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log
41835     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
41836     if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
41837         echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\"
41838     fi
41839
41840
41841     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
41842     echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log
41843     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then
41844         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\"
41845     fi
41846
41847
41848     echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log
41849     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
41850     if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then
41851         echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\"
41852     fi
41853
41854
41855
41856     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
41857     echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log
41858     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then
41859         echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\"
41860     fi
41861
41862
41863     echo \"\$sacl_def_optacl\" > sacl_def_optacl.log
41864     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
41865     if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then
41866         echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\"
41867     fi
41868
41869
41870     echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log
41871     echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log
41872     if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then
41873         echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\"
41874     fi
41875
41876 )"
41877 at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47"
41878 ( $at_check_trace;
41879 mkdir gnu
41880 (cd gnu
41881 TEST_TAR_FORMAT=gnu
41882 export TEST_TAR_FORMAT
41883 TAR_OPTIONS="-H gnu"
41884 export TAR_OPTIONS
41885 rm -rf *
41886
41887
41888   file=$(TMPDIR=. mktemp fiXXXXXX)
41889
41890   setfattr -n user.test -v test $file &> /dev/null
41891   if test "$?" != 0; then
41892     exit 77
41893   fi
41894
41895
41896   getfattr $file &> /dev/null
41897   if test "$?" != 0; then
41898     exit 77
41899   fi
41900
41901
41902
41903
41904   file=$(TMPDIR=. mktemp fiXXXXXX)
41905
41906   setfacl -m u:$UID:rwx $file &> /dev/null
41907   if test "$?" != 0; then
41908     exit 77
41909   fi
41910
41911
41912   getfacl $file &> /dev/null
41913   if test "$?" != 0; then
41914     exit 77
41915   fi
41916
41917   rm -rf $file
41918
41919   file=$(TMPDIR=. mktemp fiXXXXXX)
41920   setfacl -m u:$UID:rwx $file
41921   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
41922   if test "$err" != "0"; then
41923     exit 77
41924   fi
41925
41926
41927 test -z "`sort < /dev/null 2>&1`" || exit 77
41928
41929
41930 MYNAME=$( id -un )
41931 MYGROUP=$( id -gn )
41932
41933 # Prepare directory structure with default ACLs
41934 mkdir -p pure/d1/d2
41935 genfile --file pure/d1/f2a
41936 genfile --file pure/d1/f2b
41937 genfile --file pure/d1/d2/f3a
41938 genfile --file pure/d1/d2/f3b
41939 setfacl    -m g:$MYGROUP:r-x pure/d1
41940 setfacl -d -m g:$MYGROUP:rwx pure/d1
41941 setfacl -d -m u:$MYNAME:rwx  pure/d1
41942 # "*a" files have "some" additional ACLs
41943 setfacl    -m u:$MYNAME:--- pure/d1/d2/f3a
41944 setfacl    -m u:$MYNAME:--- pure/d1/f2a
41945
41946 # use default format (no acls stored)
41947 tar -cf noacl.tar -C pure d1
41948
41949 # use posix format, acls stored
41950 tar --acls -cf acl.tar -C pure d1
41951
41952 # Directory names are chosen based on "how the files were extracted from
41953 # archive".  Equivalent no* tags are used also:
41954 #   ^sacl_    â€” extracted archive has stored ACLs
41955 #   _def_     â€” target directory (-C) has default ACLs
41956 #   _optacl$  â€” extraction was done with --acls option
41957
41958 mkdir sacl_def_optacl
41959 mkdir sacl_def_optnoacl
41960 mkdir sacl_nodef_optacl
41961 mkdir sacl_nodef_optnoacl
41962 mkdir nosacl_def_optacl
41963 mkdir nosacl_def_optnoacl
41964 mkdir nosacl_nodef_optacl
41965 mkdir nosacl_nodef_optnoacl
41966
41967 setfacl -d -m u:$MYNAME:---  nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41968 setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl
41969
41970 tar -xf acl.tar -C sacl_nodef_optnoacl
41971 tar --acls -xf acl.tar -C sacl_nodef_optacl
41972 tar -xf acl.tar -C sacl_def_optnoacl
41973 tar --acls -xf acl.tar -C sacl_def_optacl
41974 tar -xf noacl.tar -C nosacl_def_optnoacl
41975 # _NO_ ACLs in output
41976 tar -xf noacl.tar -C nosacl_nodef_optnoacl
41977 tar -xf noacl.tar -C nosacl_nodef_optacl
41978 tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1
41979 # _NO_ ACLs in output (even when default ACLs exist)
41980 tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl
41981
41982
41983     cd pure
41984     pure="$(find d1 | sort | xargs -n 1 getfacl)"
41985     cd ..
41986
41987
41988
41989     cd sacl_def_optacl
41990     sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
41991     cd ..
41992
41993
41994     cd sacl_def_optnoacl
41995     sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
41996     cd ..
41997
41998
41999     cd sacl_nodef_optacl
42000     sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
42001     cd ..
42002
42003
42004     cd sacl_nodef_optnoacl
42005     sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
42006     cd ..
42007
42008
42009     cd nosacl_def_optacl
42010     nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
42011     cd ..
42012
42013
42014     cd nosacl_def_optnoacl
42015     nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
42016     cd ..
42017
42018
42019     cd nosacl_nodef_optacl
42020     nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)"
42021     cd ..
42022
42023
42024     cd nosacl_nodef_optnoacl
42025     nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)"
42026     cd ..
42027
42028
42029
42030     echo "$pure" > pure.log
42031     echo "$sacl_def_optacl" > sacl_def_optacl.log
42032     if test ! "$pure" "=" "$sacl_def_optacl"; then
42033         echo "bad 'pure' against 'sacl_def_optacl' output"
42034     fi
42035
42036
42037
42038     echo "$sacl_def_optacl" > sacl_def_optacl.log
42039     echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log
42040     if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then
42041         echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output"
42042     fi
42043
42044
42045     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
42046     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
42047     if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then
42048         echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output"
42049     fi
42050
42051
42052     echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log
42053     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
42054     if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then
42055         echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output"
42056     fi
42057
42058
42059     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
42060     echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log
42061     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then
42062         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output"
42063     fi
42064
42065
42066     echo "$nosacl_def_optacl" > nosacl_def_optacl.log
42067     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
42068     if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then
42069         echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output"
42070     fi
42071
42072
42073
42074     echo "$sacl_def_optacl" > sacl_def_optacl.log
42075     echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log
42076     if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then
42077         echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output"
42078     fi
42079
42080
42081     echo "$sacl_def_optacl" > sacl_def_optacl.log
42082     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
42083     if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then
42084         echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output"
42085     fi
42086
42087
42088     echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log
42089     echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log
42090     if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then
42091         echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output"
42092     fi
42093
42094 )
42095 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42096 at_status=$? at_failed=false
42097 $at_check_filter
42098 at_fn_diff_devnull "$at_stderr" || at_failed=:
42099 at_fn_diff_devnull "$at_stdout" || at_failed=:
42100 at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47"
42101 $at_failed && at_fn_log_failure
42102 $at_traceon; }
42103
42104
42105
42106
42107   set +x
42108   $at_times_p && times >"$at_times_file"
42109 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
42110 read at_status <"$at_status_file"
42111 #AT_STOP_175
42112 #AT_START_176
42113 at_fn_group_banner 176 'selnx01.at:25' \
42114   "selinux: basic store/restore" "                   " 25
42115 at_xfail=no
42116       test -f $XFAILFILE && at_xfail=yes
42117 (
42118   $as_echo "176. $at_setup_line: testing $at_desc ..."
42119   $at_traceon
42120
42121
42122
42123
42124
42125   { set +x
42126 $as_echo "$at_srcdir/selnx01.at:28:
42127 mkdir v7
42128 (cd v7
42129 TEST_TAR_FORMAT=v7
42130 export TEST_TAR_FORMAT
42131 TAR_OPTIONS=\"-H v7\"
42132 export TAR_OPTIONS
42133 rm -rf *
42134
42135
42136   file=\$(TMPDIR=. mktemp fiXXXXXX)
42137
42138   setfattr -n user.test -v test \$file &> /dev/null
42139   if test \"\$?\" != 0; then
42140     exit 77
42141   fi
42142
42143
42144   getfattr \$file &> /dev/null
42145   if test \"\$?\" != 0; then
42146     exit 77
42147   fi
42148
42149
42150
42151
42152   file=\$(TMPDIR=. mktemp fiXXXXXX)
42153
42154   restorecon \$file &> /dev/null
42155   if test \"\$?\" != 0; then
42156     exit 77
42157   fi
42158
42159
42160   chcon -h --user=unconfined_u \$file &> /dev/null
42161   if test \"\$?\" != 0; then
42162     exit 77
42163   fi
42164
42165   rm -rf \$file
42166
42167   file=\$(TMPDIR=. mktemp fiXXXXXX)
42168   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42169   if test \"\$err\" != \"0\"; then
42170     exit 77
42171   fi
42172
42173
42174 mkdir dir
42175 genfile --file dir/file
42176 ln -s file dir/link
42177
42178 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
42179
42180 restorecon -R dir
42181 chcon -h --user=system_u     dir
42182 chcon -h --user=unconfined_u dir/file
42183 chcon -h --user=system_u     dir/link
42184
42185 # archive whole directory including selinux contexts
42186 tar --selinux -cf archive.tar dir
42187
42188 # clear the directory
42189 rm -rf dir
42190
42191 # ================================================
42192 # check if selinux contexts are correctly restored
42193
42194 tar --selinux -xf archive.tar
42195
42196 # archive for later debugging
42197 cp archive.tar archive_origin.tar
42198
42199 # check if selinux contexts were restored
42200 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
42201     grep -v -e '^#' -e ^\$ | cut -d: -f1
42202
42203 # ===========================================================================
42204 # check if selinux contexts are not restored when --selinux option is missing
42205
42206 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
42207 rm -rf dir
42208 tar -xf archive.tar
42209 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
42210
42211 diff with_selinux without_selinux > diff_with_without
42212 if test \"\$?\" -eq \"0\"; then
42213     echo \"selinux contexts probably restored while --selinux is off\"
42214 fi
42215
42216 # =================================================================
42217 # check if selinux is not archived when --selinux option is missing
42218
42219 tar -cf archive.tar dir
42220
42221 # clear the directory
42222 rm -rf dir
42223
42224 # restore (with --selinux)
42225 tar --selinux -xf archive.tar dir
42226
42227 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
42228 diff start final > final_diff
42229 if test \"\$?\" -ne \"0\"; then
42230     echo \"bad result\"
42231 fi
42232
42233 )"
42234 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
42235 ( $at_check_trace;
42236 mkdir v7
42237 (cd v7
42238 TEST_TAR_FORMAT=v7
42239 export TEST_TAR_FORMAT
42240 TAR_OPTIONS="-H v7"
42241 export TAR_OPTIONS
42242 rm -rf *
42243
42244
42245   file=$(TMPDIR=. mktemp fiXXXXXX)
42246
42247   setfattr -n user.test -v test $file &> /dev/null
42248   if test "$?" != 0; then
42249     exit 77
42250   fi
42251
42252
42253   getfattr $file &> /dev/null
42254   if test "$?" != 0; then
42255     exit 77
42256   fi
42257
42258
42259
42260
42261   file=$(TMPDIR=. mktemp fiXXXXXX)
42262
42263   restorecon $file &> /dev/null
42264   if test "$?" != 0; then
42265     exit 77
42266   fi
42267
42268
42269   chcon -h --user=unconfined_u $file &> /dev/null
42270   if test "$?" != 0; then
42271     exit 77
42272   fi
42273
42274   rm -rf $file
42275
42276   file=$(TMPDIR=. mktemp fiXXXXXX)
42277   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42278   if test "$err" != "0"; then
42279     exit 77
42280   fi
42281
42282
42283 mkdir dir
42284 genfile --file dir/file
42285 ln -s file dir/link
42286
42287 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
42288
42289 restorecon -R dir
42290 chcon -h --user=system_u     dir
42291 chcon -h --user=unconfined_u dir/file
42292 chcon -h --user=system_u     dir/link
42293
42294 # archive whole directory including selinux contexts
42295 tar --selinux -cf archive.tar dir
42296
42297 # clear the directory
42298 rm -rf dir
42299
42300 # ================================================
42301 # check if selinux contexts are correctly restored
42302
42303 tar --selinux -xf archive.tar
42304
42305 # archive for later debugging
42306 cp archive.tar archive_origin.tar
42307
42308 # check if selinux contexts were restored
42309 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
42310     grep -v -e '^#' -e ^$ | cut -d: -f1
42311
42312 # ===========================================================================
42313 # check if selinux contexts are not restored when --selinux option is missing
42314
42315 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
42316 rm -rf dir
42317 tar -xf archive.tar
42318 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
42319
42320 diff with_selinux without_selinux > diff_with_without
42321 if test "$?" -eq "0"; then
42322     echo "selinux contexts probably restored while --selinux is off"
42323 fi
42324
42325 # =================================================================
42326 # check if selinux is not archived when --selinux option is missing
42327
42328 tar -cf archive.tar dir
42329
42330 # clear the directory
42331 rm -rf dir
42332
42333 # restore (with --selinux)
42334 tar --selinux -xf archive.tar dir
42335
42336 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
42337 diff start final > final_diff
42338 if test "$?" -ne "0"; then
42339     echo "bad result"
42340 fi
42341
42342 )
42343 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42344 at_status=$? at_failed=false
42345 $at_check_filter
42346 at_fn_diff_devnull "$at_stderr" || at_failed=:
42347 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
42348 security.selinux=\"unconfined_u
42349 security.selinux=\"system_u
42350 " | \
42351   $at_diff - "$at_stdout" || at_failed=:
42352 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
42353 $at_failed && at_fn_log_failure
42354 $at_traceon; }
42355
42356               { set +x
42357 $as_echo "$at_srcdir/selnx01.at:28:
42358 mkdir oldgnu
42359 (cd oldgnu
42360 TEST_TAR_FORMAT=oldgnu
42361 export TEST_TAR_FORMAT
42362 TAR_OPTIONS=\"-H oldgnu\"
42363 export TAR_OPTIONS
42364 rm -rf *
42365
42366
42367   file=\$(TMPDIR=. mktemp fiXXXXXX)
42368
42369   setfattr -n user.test -v test \$file &> /dev/null
42370   if test \"\$?\" != 0; then
42371     exit 77
42372   fi
42373
42374
42375   getfattr \$file &> /dev/null
42376   if test \"\$?\" != 0; then
42377     exit 77
42378   fi
42379
42380
42381
42382
42383   file=\$(TMPDIR=. mktemp fiXXXXXX)
42384
42385   restorecon \$file &> /dev/null
42386   if test \"\$?\" != 0; then
42387     exit 77
42388   fi
42389
42390
42391   chcon -h --user=unconfined_u \$file &> /dev/null
42392   if test \"\$?\" != 0; then
42393     exit 77
42394   fi
42395
42396   rm -rf \$file
42397
42398   file=\$(TMPDIR=. mktemp fiXXXXXX)
42399   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42400   if test \"\$err\" != \"0\"; then
42401     exit 77
42402   fi
42403
42404
42405 mkdir dir
42406 genfile --file dir/file
42407 ln -s file dir/link
42408
42409 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
42410
42411 restorecon -R dir
42412 chcon -h --user=system_u     dir
42413 chcon -h --user=unconfined_u dir/file
42414 chcon -h --user=system_u     dir/link
42415
42416 # archive whole directory including selinux contexts
42417 tar --selinux -cf archive.tar dir
42418
42419 # clear the directory
42420 rm -rf dir
42421
42422 # ================================================
42423 # check if selinux contexts are correctly restored
42424
42425 tar --selinux -xf archive.tar
42426
42427 # archive for later debugging
42428 cp archive.tar archive_origin.tar
42429
42430 # check if selinux contexts were restored
42431 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
42432     grep -v -e '^#' -e ^\$ | cut -d: -f1
42433
42434 # ===========================================================================
42435 # check if selinux contexts are not restored when --selinux option is missing
42436
42437 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
42438 rm -rf dir
42439 tar -xf archive.tar
42440 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
42441
42442 diff with_selinux without_selinux > diff_with_without
42443 if test \"\$?\" -eq \"0\"; then
42444     echo \"selinux contexts probably restored while --selinux is off\"
42445 fi
42446
42447 # =================================================================
42448 # check if selinux is not archived when --selinux option is missing
42449
42450 tar -cf archive.tar dir
42451
42452 # clear the directory
42453 rm -rf dir
42454
42455 # restore (with --selinux)
42456 tar --selinux -xf archive.tar dir
42457
42458 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
42459 diff start final > final_diff
42460 if test \"\$?\" -ne \"0\"; then
42461     echo \"bad result\"
42462 fi
42463
42464 )"
42465 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
42466 ( $at_check_trace;
42467 mkdir oldgnu
42468 (cd oldgnu
42469 TEST_TAR_FORMAT=oldgnu
42470 export TEST_TAR_FORMAT
42471 TAR_OPTIONS="-H oldgnu"
42472 export TAR_OPTIONS
42473 rm -rf *
42474
42475
42476   file=$(TMPDIR=. mktemp fiXXXXXX)
42477
42478   setfattr -n user.test -v test $file &> /dev/null
42479   if test "$?" != 0; then
42480     exit 77
42481   fi
42482
42483
42484   getfattr $file &> /dev/null
42485   if test "$?" != 0; then
42486     exit 77
42487   fi
42488
42489
42490
42491
42492   file=$(TMPDIR=. mktemp fiXXXXXX)
42493
42494   restorecon $file &> /dev/null
42495   if test "$?" != 0; then
42496     exit 77
42497   fi
42498
42499
42500   chcon -h --user=unconfined_u $file &> /dev/null
42501   if test "$?" != 0; then
42502     exit 77
42503   fi
42504
42505   rm -rf $file
42506
42507   file=$(TMPDIR=. mktemp fiXXXXXX)
42508   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42509   if test "$err" != "0"; then
42510     exit 77
42511   fi
42512
42513
42514 mkdir dir
42515 genfile --file dir/file
42516 ln -s file dir/link
42517
42518 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
42519
42520 restorecon -R dir
42521 chcon -h --user=system_u     dir
42522 chcon -h --user=unconfined_u dir/file
42523 chcon -h --user=system_u     dir/link
42524
42525 # archive whole directory including selinux contexts
42526 tar --selinux -cf archive.tar dir
42527
42528 # clear the directory
42529 rm -rf dir
42530
42531 # ================================================
42532 # check if selinux contexts are correctly restored
42533
42534 tar --selinux -xf archive.tar
42535
42536 # archive for later debugging
42537 cp archive.tar archive_origin.tar
42538
42539 # check if selinux contexts were restored
42540 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
42541     grep -v -e '^#' -e ^$ | cut -d: -f1
42542
42543 # ===========================================================================
42544 # check if selinux contexts are not restored when --selinux option is missing
42545
42546 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
42547 rm -rf dir
42548 tar -xf archive.tar
42549 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
42550
42551 diff with_selinux without_selinux > diff_with_without
42552 if test "$?" -eq "0"; then
42553     echo "selinux contexts probably restored while --selinux is off"
42554 fi
42555
42556 # =================================================================
42557 # check if selinux is not archived when --selinux option is missing
42558
42559 tar -cf archive.tar dir
42560
42561 # clear the directory
42562 rm -rf dir
42563
42564 # restore (with --selinux)
42565 tar --selinux -xf archive.tar dir
42566
42567 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
42568 diff start final > final_diff
42569 if test "$?" -ne "0"; then
42570     echo "bad result"
42571 fi
42572
42573 )
42574 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42575 at_status=$? at_failed=false
42576 $at_check_filter
42577 at_fn_diff_devnull "$at_stderr" || at_failed=:
42578 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
42579 security.selinux=\"unconfined_u
42580 security.selinux=\"system_u
42581 " | \
42582   $at_diff - "$at_stdout" || at_failed=:
42583 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
42584 $at_failed && at_fn_log_failure
42585 $at_traceon; }
42586
42587               { set +x
42588 $as_echo "$at_srcdir/selnx01.at:28:
42589 mkdir ustar
42590 (cd ustar
42591 TEST_TAR_FORMAT=ustar
42592 export TEST_TAR_FORMAT
42593 TAR_OPTIONS=\"-H ustar\"
42594 export TAR_OPTIONS
42595 rm -rf *
42596
42597
42598   file=\$(TMPDIR=. mktemp fiXXXXXX)
42599
42600   setfattr -n user.test -v test \$file &> /dev/null
42601   if test \"\$?\" != 0; then
42602     exit 77
42603   fi
42604
42605
42606   getfattr \$file &> /dev/null
42607   if test \"\$?\" != 0; then
42608     exit 77
42609   fi
42610
42611
42612
42613
42614   file=\$(TMPDIR=. mktemp fiXXXXXX)
42615
42616   restorecon \$file &> /dev/null
42617   if test \"\$?\" != 0; then
42618     exit 77
42619   fi
42620
42621
42622   chcon -h --user=unconfined_u \$file &> /dev/null
42623   if test \"\$?\" != 0; then
42624     exit 77
42625   fi
42626
42627   rm -rf \$file
42628
42629   file=\$(TMPDIR=. mktemp fiXXXXXX)
42630   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42631   if test \"\$err\" != \"0\"; then
42632     exit 77
42633   fi
42634
42635
42636 mkdir dir
42637 genfile --file dir/file
42638 ln -s file dir/link
42639
42640 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
42641
42642 restorecon -R dir
42643 chcon -h --user=system_u     dir
42644 chcon -h --user=unconfined_u dir/file
42645 chcon -h --user=system_u     dir/link
42646
42647 # archive whole directory including selinux contexts
42648 tar --selinux -cf archive.tar dir
42649
42650 # clear the directory
42651 rm -rf dir
42652
42653 # ================================================
42654 # check if selinux contexts are correctly restored
42655
42656 tar --selinux -xf archive.tar
42657
42658 # archive for later debugging
42659 cp archive.tar archive_origin.tar
42660
42661 # check if selinux contexts were restored
42662 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
42663     grep -v -e '^#' -e ^\$ | cut -d: -f1
42664
42665 # ===========================================================================
42666 # check if selinux contexts are not restored when --selinux option is missing
42667
42668 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
42669 rm -rf dir
42670 tar -xf archive.tar
42671 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
42672
42673 diff with_selinux without_selinux > diff_with_without
42674 if test \"\$?\" -eq \"0\"; then
42675     echo \"selinux contexts probably restored while --selinux is off\"
42676 fi
42677
42678 # =================================================================
42679 # check if selinux is not archived when --selinux option is missing
42680
42681 tar -cf archive.tar dir
42682
42683 # clear the directory
42684 rm -rf dir
42685
42686 # restore (with --selinux)
42687 tar --selinux -xf archive.tar dir
42688
42689 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
42690 diff start final > final_diff
42691 if test \"\$?\" -ne \"0\"; then
42692     echo \"bad result\"
42693 fi
42694
42695 )"
42696 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
42697 ( $at_check_trace;
42698 mkdir ustar
42699 (cd ustar
42700 TEST_TAR_FORMAT=ustar
42701 export TEST_TAR_FORMAT
42702 TAR_OPTIONS="-H ustar"
42703 export TAR_OPTIONS
42704 rm -rf *
42705
42706
42707   file=$(TMPDIR=. mktemp fiXXXXXX)
42708
42709   setfattr -n user.test -v test $file &> /dev/null
42710   if test "$?" != 0; then
42711     exit 77
42712   fi
42713
42714
42715   getfattr $file &> /dev/null
42716   if test "$?" != 0; then
42717     exit 77
42718   fi
42719
42720
42721
42722
42723   file=$(TMPDIR=. mktemp fiXXXXXX)
42724
42725   restorecon $file &> /dev/null
42726   if test "$?" != 0; then
42727     exit 77
42728   fi
42729
42730
42731   chcon -h --user=unconfined_u $file &> /dev/null
42732   if test "$?" != 0; then
42733     exit 77
42734   fi
42735
42736   rm -rf $file
42737
42738   file=$(TMPDIR=. mktemp fiXXXXXX)
42739   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42740   if test "$err" != "0"; then
42741     exit 77
42742   fi
42743
42744
42745 mkdir dir
42746 genfile --file dir/file
42747 ln -s file dir/link
42748
42749 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
42750
42751 restorecon -R dir
42752 chcon -h --user=system_u     dir
42753 chcon -h --user=unconfined_u dir/file
42754 chcon -h --user=system_u     dir/link
42755
42756 # archive whole directory including selinux contexts
42757 tar --selinux -cf archive.tar dir
42758
42759 # clear the directory
42760 rm -rf dir
42761
42762 # ================================================
42763 # check if selinux contexts are correctly restored
42764
42765 tar --selinux -xf archive.tar
42766
42767 # archive for later debugging
42768 cp archive.tar archive_origin.tar
42769
42770 # check if selinux contexts were restored
42771 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
42772     grep -v -e '^#' -e ^$ | cut -d: -f1
42773
42774 # ===========================================================================
42775 # check if selinux contexts are not restored when --selinux option is missing
42776
42777 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
42778 rm -rf dir
42779 tar -xf archive.tar
42780 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
42781
42782 diff with_selinux without_selinux > diff_with_without
42783 if test "$?" -eq "0"; then
42784     echo "selinux contexts probably restored while --selinux is off"
42785 fi
42786
42787 # =================================================================
42788 # check if selinux is not archived when --selinux option is missing
42789
42790 tar -cf archive.tar dir
42791
42792 # clear the directory
42793 rm -rf dir
42794
42795 # restore (with --selinux)
42796 tar --selinux -xf archive.tar dir
42797
42798 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
42799 diff start final > final_diff
42800 if test "$?" -ne "0"; then
42801     echo "bad result"
42802 fi
42803
42804 )
42805 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
42806 at_status=$? at_failed=false
42807 $at_check_filter
42808 at_fn_diff_devnull "$at_stderr" || at_failed=:
42809 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
42810 security.selinux=\"unconfined_u
42811 security.selinux=\"system_u
42812 " | \
42813   $at_diff - "$at_stdout" || at_failed=:
42814 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
42815 $at_failed && at_fn_log_failure
42816 $at_traceon; }
42817
42818               { set +x
42819 $as_echo "$at_srcdir/selnx01.at:28:
42820 mkdir posix
42821 (cd posix
42822 TEST_TAR_FORMAT=posix
42823 export TEST_TAR_FORMAT
42824 TAR_OPTIONS=\"-H posix\"
42825 export TAR_OPTIONS
42826 rm -rf *
42827
42828
42829   file=\$(TMPDIR=. mktemp fiXXXXXX)
42830
42831   setfattr -n user.test -v test \$file &> /dev/null
42832   if test \"\$?\" != 0; then
42833     exit 77
42834   fi
42835
42836
42837   getfattr \$file &> /dev/null
42838   if test \"\$?\" != 0; then
42839     exit 77
42840   fi
42841
42842
42843
42844
42845   file=\$(TMPDIR=. mktemp fiXXXXXX)
42846
42847   restorecon \$file &> /dev/null
42848   if test \"\$?\" != 0; then
42849     exit 77
42850   fi
42851
42852
42853   chcon -h --user=unconfined_u \$file &> /dev/null
42854   if test \"\$?\" != 0; then
42855     exit 77
42856   fi
42857
42858   rm -rf \$file
42859
42860   file=\$(TMPDIR=. mktemp fiXXXXXX)
42861   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
42862   if test \"\$err\" != \"0\"; then
42863     exit 77
42864   fi
42865
42866
42867 mkdir dir
42868 genfile --file dir/file
42869 ln -s file dir/link
42870
42871 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
42872
42873 restorecon -R dir
42874 chcon -h --user=system_u     dir
42875 chcon -h --user=unconfined_u dir/file
42876 chcon -h --user=system_u     dir/link
42877
42878 # archive whole directory including selinux contexts
42879 tar --selinux -cf archive.tar dir
42880
42881 # clear the directory
42882 rm -rf dir
42883
42884 # ================================================
42885 # check if selinux contexts are correctly restored
42886
42887 tar --selinux -xf archive.tar
42888
42889 # archive for later debugging
42890 cp archive.tar archive_origin.tar
42891
42892 # check if selinux contexts were restored
42893 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
42894     grep -v -e '^#' -e ^\$ | cut -d: -f1
42895
42896 # ===========================================================================
42897 # check if selinux contexts are not restored when --selinux option is missing
42898
42899 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
42900 rm -rf dir
42901 tar -xf archive.tar
42902 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
42903
42904 diff with_selinux without_selinux > diff_with_without
42905 if test \"\$?\" -eq \"0\"; then
42906     echo \"selinux contexts probably restored while --selinux is off\"
42907 fi
42908
42909 # =================================================================
42910 # check if selinux is not archived when --selinux option is missing
42911
42912 tar -cf archive.tar dir
42913
42914 # clear the directory
42915 rm -rf dir
42916
42917 # restore (with --selinux)
42918 tar --selinux -xf archive.tar dir
42919
42920 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
42921 diff start final > final_diff
42922 if test \"\$?\" -ne \"0\"; then
42923     echo \"bad result\"
42924 fi
42925
42926 )"
42927 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
42928 ( $at_check_trace;
42929 mkdir posix
42930 (cd posix
42931 TEST_TAR_FORMAT=posix
42932 export TEST_TAR_FORMAT
42933 TAR_OPTIONS="-H posix"
42934 export TAR_OPTIONS
42935 rm -rf *
42936
42937
42938   file=$(TMPDIR=. mktemp fiXXXXXX)
42939
42940   setfattr -n user.test -v test $file &> /dev/null
42941   if test "$?" != 0; then
42942     exit 77
42943   fi
42944
42945
42946   getfattr $file &> /dev/null
42947   if test "$?" != 0; then
42948     exit 77
42949   fi
42950
42951
42952
42953
42954   file=$(TMPDIR=. mktemp fiXXXXXX)
42955
42956   restorecon $file &> /dev/null
42957   if test "$?" != 0; then
42958     exit 77
42959   fi
42960
42961
42962   chcon -h --user=unconfined_u $file &> /dev/null
42963   if test "$?" != 0; then
42964     exit 77
42965   fi
42966
42967   rm -rf $file
42968
42969   file=$(TMPDIR=. mktemp fiXXXXXX)
42970   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
42971   if test "$err" != "0"; then
42972     exit 77
42973   fi
42974
42975
42976 mkdir dir
42977 genfile --file dir/file
42978 ln -s file dir/link
42979
42980 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
42981
42982 restorecon -R dir
42983 chcon -h --user=system_u     dir
42984 chcon -h --user=unconfined_u dir/file
42985 chcon -h --user=system_u     dir/link
42986
42987 # archive whole directory including selinux contexts
42988 tar --selinux -cf archive.tar dir
42989
42990 # clear the directory
42991 rm -rf dir
42992
42993 # ================================================
42994 # check if selinux contexts are correctly restored
42995
42996 tar --selinux -xf archive.tar
42997
42998 # archive for later debugging
42999 cp archive.tar archive_origin.tar
43000
43001 # check if selinux contexts were restored
43002 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
43003     grep -v -e '^#' -e ^$ | cut -d: -f1
43004
43005 # ===========================================================================
43006 # check if selinux contexts are not restored when --selinux option is missing
43007
43008 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
43009 rm -rf dir
43010 tar -xf archive.tar
43011 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
43012
43013 diff with_selinux without_selinux > diff_with_without
43014 if test "$?" -eq "0"; then
43015     echo "selinux contexts probably restored while --selinux is off"
43016 fi
43017
43018 # =================================================================
43019 # check if selinux is not archived when --selinux option is missing
43020
43021 tar -cf archive.tar dir
43022
43023 # clear the directory
43024 rm -rf dir
43025
43026 # restore (with --selinux)
43027 tar --selinux -xf archive.tar dir
43028
43029 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
43030 diff start final > final_diff
43031 if test "$?" -ne "0"; then
43032     echo "bad result"
43033 fi
43034
43035 )
43036 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43037 at_status=$? at_failed=false
43038 $at_check_filter
43039 at_fn_diff_devnull "$at_stderr" || at_failed=:
43040 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
43041 security.selinux=\"unconfined_u
43042 security.selinux=\"system_u
43043 " | \
43044   $at_diff - "$at_stdout" || at_failed=:
43045 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
43046 $at_failed && at_fn_log_failure
43047 $at_traceon; }
43048
43049               { set +x
43050 $as_echo "$at_srcdir/selnx01.at:28:
43051 mkdir gnu
43052 (cd gnu
43053 TEST_TAR_FORMAT=gnu
43054 export TEST_TAR_FORMAT
43055 TAR_OPTIONS=\"-H gnu\"
43056 export TAR_OPTIONS
43057 rm -rf *
43058
43059
43060   file=\$(TMPDIR=. mktemp fiXXXXXX)
43061
43062   setfattr -n user.test -v test \$file &> /dev/null
43063   if test \"\$?\" != 0; then
43064     exit 77
43065   fi
43066
43067
43068   getfattr \$file &> /dev/null
43069   if test \"\$?\" != 0; then
43070     exit 77
43071   fi
43072
43073
43074
43075
43076   file=\$(TMPDIR=. mktemp fiXXXXXX)
43077
43078   restorecon \$file &> /dev/null
43079   if test \"\$?\" != 0; then
43080     exit 77
43081   fi
43082
43083
43084   chcon -h --user=unconfined_u \$file &> /dev/null
43085   if test \"\$?\" != 0; then
43086     exit 77
43087   fi
43088
43089   rm -rf \$file
43090
43091   file=\$(TMPDIR=. mktemp fiXXXXXX)
43092   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43093   if test \"\$err\" != \"0\"; then
43094     exit 77
43095   fi
43096
43097
43098 mkdir dir
43099 genfile --file dir/file
43100 ln -s file dir/link
43101
43102 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
43103
43104 restorecon -R dir
43105 chcon -h --user=system_u     dir
43106 chcon -h --user=unconfined_u dir/file
43107 chcon -h --user=system_u     dir/link
43108
43109 # archive whole directory including selinux contexts
43110 tar --selinux -cf archive.tar dir
43111
43112 # clear the directory
43113 rm -rf dir
43114
43115 # ================================================
43116 # check if selinux contexts are correctly restored
43117
43118 tar --selinux -xf archive.tar
43119
43120 # archive for later debugging
43121 cp archive.tar archive_origin.tar
43122
43123 # check if selinux contexts were restored
43124 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\
43125     grep -v -e '^#' -e ^\$ | cut -d: -f1
43126
43127 # ===========================================================================
43128 # check if selinux contexts are not restored when --selinux option is missing
43129
43130 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
43131 rm -rf dir
43132 tar -xf archive.tar
43133 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
43134
43135 diff with_selinux without_selinux > diff_with_without
43136 if test \"\$?\" -eq \"0\"; then
43137     echo \"selinux contexts probably restored while --selinux is off\"
43138 fi
43139
43140 # =================================================================
43141 # check if selinux is not archived when --selinux option is missing
43142
43143 tar -cf archive.tar dir
43144
43145 # clear the directory
43146 rm -rf dir
43147
43148 # restore (with --selinux)
43149 tar --selinux -xf archive.tar dir
43150
43151 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
43152 diff start final > final_diff
43153 if test \"\$?\" -ne \"0\"; then
43154     echo \"bad result\"
43155 fi
43156
43157 )"
43158 at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28"
43159 ( $at_check_trace;
43160 mkdir gnu
43161 (cd gnu
43162 TEST_TAR_FORMAT=gnu
43163 export TEST_TAR_FORMAT
43164 TAR_OPTIONS="-H gnu"
43165 export TAR_OPTIONS
43166 rm -rf *
43167
43168
43169   file=$(TMPDIR=. mktemp fiXXXXXX)
43170
43171   setfattr -n user.test -v test $file &> /dev/null
43172   if test "$?" != 0; then
43173     exit 77
43174   fi
43175
43176
43177   getfattr $file &> /dev/null
43178   if test "$?" != 0; then
43179     exit 77
43180   fi
43181
43182
43183
43184
43185   file=$(TMPDIR=. mktemp fiXXXXXX)
43186
43187   restorecon $file &> /dev/null
43188   if test "$?" != 0; then
43189     exit 77
43190   fi
43191
43192
43193   chcon -h --user=unconfined_u $file &> /dev/null
43194   if test "$?" != 0; then
43195     exit 77
43196   fi
43197
43198   rm -rf $file
43199
43200   file=$(TMPDIR=. mktemp fiXXXXXX)
43201   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43202   if test "$err" != "0"; then
43203     exit 77
43204   fi
43205
43206
43207 mkdir dir
43208 genfile --file dir/file
43209 ln -s file dir/link
43210
43211 getfattr -h -d -msecurity.selinux dir dir/file dir/link > start
43212
43213 restorecon -R dir
43214 chcon -h --user=system_u     dir
43215 chcon -h --user=unconfined_u dir/file
43216 chcon -h --user=system_u     dir/link
43217
43218 # archive whole directory including selinux contexts
43219 tar --selinux -cf archive.tar dir
43220
43221 # clear the directory
43222 rm -rf dir
43223
43224 # ================================================
43225 # check if selinux contexts are correctly restored
43226
43227 tar --selinux -xf archive.tar
43228
43229 # archive for later debugging
43230 cp archive.tar archive_origin.tar
43231
43232 # check if selinux contexts were restored
43233 getfattr -h -d dir dir/file dir/link -msecurity.selinux | \
43234     grep -v -e '^#' -e ^$ | cut -d: -f1
43235
43236 # ===========================================================================
43237 # check if selinux contexts are not restored when --selinux option is missing
43238
43239 getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux
43240 rm -rf dir
43241 tar -xf archive.tar
43242 getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux
43243
43244 diff with_selinux without_selinux > diff_with_without
43245 if test "$?" -eq "0"; then
43246     echo "selinux contexts probably restored while --selinux is off"
43247 fi
43248
43249 # =================================================================
43250 # check if selinux is not archived when --selinux option is missing
43251
43252 tar -cf archive.tar dir
43253
43254 # clear the directory
43255 rm -rf dir
43256
43257 # restore (with --selinux)
43258 tar --selinux -xf archive.tar dir
43259
43260 getfattr -h -d -msecurity.selinux dir dir/file dir/link > final
43261 diff start final > final_diff
43262 if test "$?" -ne "0"; then
43263     echo "bad result"
43264 fi
43265
43266 )
43267 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43268 at_status=$? at_failed=false
43269 $at_check_filter
43270 at_fn_diff_devnull "$at_stderr" || at_failed=:
43271 echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u
43272 security.selinux=\"unconfined_u
43273 security.selinux=\"system_u
43274 " | \
43275   $at_diff - "$at_stdout" || at_failed=:
43276 at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28"
43277 $at_failed && at_fn_log_failure
43278 $at_traceon; }
43279
43280
43281
43282
43283   set +x
43284   $at_times_p && times >"$at_times_file"
43285 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
43286 read at_status <"$at_status_file"
43287 #AT_STOP_176
43288 #AT_START_177
43289 at_fn_group_banner 177 'selacl01.at:25' \
43290   "acls/selinux: special files & fifos" "            " 25
43291 at_xfail=no
43292       test -f $XFAILFILE && at_xfail=yes
43293 (
43294   $as_echo "177. $at_setup_line: testing $at_desc ..."
43295   $at_traceon
43296
43297
43298
43299
43300
43301   { set +x
43302 $as_echo "$at_srcdir/selacl01.at:28:
43303 mkdir v7
43304 (cd v7
43305 TEST_TAR_FORMAT=v7
43306 export TEST_TAR_FORMAT
43307 TAR_OPTIONS=\"-H v7\"
43308 export TAR_OPTIONS
43309 rm -rf *
43310
43311
43312 echo \"test\" > \$\$
43313 chmod 0 \$\$
43314 cat \$\$ > /dev/null 2>&1
43315 result=\$?
43316 rm -f \$\$
43317 test \$result -eq 0 || exit 77
43318
43319
43320   file=\$(TMPDIR=. mktemp fiXXXXXX)
43321
43322   setfattr -n user.test -v test \$file &> /dev/null
43323   if test \"\$?\" != 0; then
43324     exit 77
43325   fi
43326
43327
43328   getfattr \$file &> /dev/null
43329   if test \"\$?\" != 0; then
43330     exit 77
43331   fi
43332
43333
43334
43335
43336   file=\$(TMPDIR=. mktemp fiXXXXXX)
43337
43338   restorecon \$file &> /dev/null
43339   if test \"\$?\" != 0; then
43340     exit 77
43341   fi
43342
43343
43344   chcon -h --user=unconfined_u \$file &> /dev/null
43345   if test \"\$?\" != 0; then
43346     exit 77
43347   fi
43348
43349   rm -rf \$file
43350
43351   file=\$(TMPDIR=. mktemp fiXXXXXX)
43352   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43353   if test \"\$err\" != \"0\"; then
43354     exit 77
43355   fi
43356
43357
43358
43359   file=\$(TMPDIR=. mktemp fiXXXXXX)
43360
43361   setfacl -m u:\$UID:rwx \$file &> /dev/null
43362   if test \"\$?\" != 0; then
43363     exit 77
43364   fi
43365
43366
43367   getfacl \$file &> /dev/null
43368   if test \"\$?\" != 0; then
43369     exit 77
43370   fi
43371
43372   rm -rf \$file
43373
43374   file=\$(TMPDIR=. mktemp fiXXXXXX)
43375   setfacl -m u:\$UID:rwx \$file
43376   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43377   if test \"\$err\" != \"0\"; then
43378     exit 77
43379   fi
43380
43381
43382 mkdir dir
43383 mkfifo dir/fifo
43384 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
43385 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
43386 mknod dir/chartype c \$MAJOR \$MINOR
43387
43388 # setup attributes
43389 restorecon -R dir
43390 chcon -h --user=system_u dir/fifo
43391 chcon -h --user=system_u dir/chartype
43392 setfacl -m u:\$UID:--- dir/fifo
43393 setfacl -m u:\$UID:rwx dir/chartype
43394
43395 getfacl dir/fifo >> before
43396 getfattr -msecurity.selinux dir/chartype >> before
43397
43398 tar --xattrs --selinux --acls -cf archive.tar dir
43399
43400 mv dir olddir
43401
43402 tar --xattrs --selinux --acls -xf archive.tar
43403
43404 getfacl dir/fifo >> after
43405 getfattr -msecurity.selinux dir/chartype >> after
43406
43407 diff before after
43408 echo separator
43409 )"
43410 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
43411 ( $at_check_trace;
43412 mkdir v7
43413 (cd v7
43414 TEST_TAR_FORMAT=v7
43415 export TEST_TAR_FORMAT
43416 TAR_OPTIONS="-H v7"
43417 export TAR_OPTIONS
43418 rm -rf *
43419
43420
43421 echo "test" > $$
43422 chmod 0 $$
43423 cat $$ > /dev/null 2>&1
43424 result=$?
43425 rm -f $$
43426 test $result -eq 0 || exit 77
43427
43428
43429   file=$(TMPDIR=. mktemp fiXXXXXX)
43430
43431   setfattr -n user.test -v test $file &> /dev/null
43432   if test "$?" != 0; then
43433     exit 77
43434   fi
43435
43436
43437   getfattr $file &> /dev/null
43438   if test "$?" != 0; then
43439     exit 77
43440   fi
43441
43442
43443
43444
43445   file=$(TMPDIR=. mktemp fiXXXXXX)
43446
43447   restorecon $file &> /dev/null
43448   if test "$?" != 0; then
43449     exit 77
43450   fi
43451
43452
43453   chcon -h --user=unconfined_u $file &> /dev/null
43454   if test "$?" != 0; then
43455     exit 77
43456   fi
43457
43458   rm -rf $file
43459
43460   file=$(TMPDIR=. mktemp fiXXXXXX)
43461   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43462   if test "$err" != "0"; then
43463     exit 77
43464   fi
43465
43466
43467
43468   file=$(TMPDIR=. mktemp fiXXXXXX)
43469
43470   setfacl -m u:$UID:rwx $file &> /dev/null
43471   if test "$?" != 0; then
43472     exit 77
43473   fi
43474
43475
43476   getfacl $file &> /dev/null
43477   if test "$?" != 0; then
43478     exit 77
43479   fi
43480
43481   rm -rf $file
43482
43483   file=$(TMPDIR=. mktemp fiXXXXXX)
43484   setfacl -m u:$UID:rwx $file
43485   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43486   if test "$err" != "0"; then
43487     exit 77
43488   fi
43489
43490
43491 mkdir dir
43492 mkfifo dir/fifo
43493 MAJOR=$( stat /dev/urandom --printf="%t" )
43494 MINOR=$( stat /dev/urandom --printf="%T" )
43495 mknod dir/chartype c $MAJOR $MINOR
43496
43497 # setup attributes
43498 restorecon -R dir
43499 chcon -h --user=system_u dir/fifo
43500 chcon -h --user=system_u dir/chartype
43501 setfacl -m u:$UID:--- dir/fifo
43502 setfacl -m u:$UID:rwx dir/chartype
43503
43504 getfacl dir/fifo >> before
43505 getfattr -msecurity.selinux dir/chartype >> before
43506
43507 tar --xattrs --selinux --acls -cf archive.tar dir
43508
43509 mv dir olddir
43510
43511 tar --xattrs --selinux --acls -xf archive.tar
43512
43513 getfacl dir/fifo >> after
43514 getfattr -msecurity.selinux dir/chartype >> after
43515
43516 diff before after
43517 echo separator
43518 )
43519 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43520 at_status=$? at_failed=false
43521 $at_check_filter
43522 at_fn_diff_devnull "$at_stderr" || at_failed=:
43523 echo >>"$at_stdout"; $as_echo "separator
43524 " | \
43525   $at_diff - "$at_stdout" || at_failed=:
43526 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
43527 $at_failed && at_fn_log_failure
43528 $at_traceon; }
43529
43530               { set +x
43531 $as_echo "$at_srcdir/selacl01.at:28:
43532 mkdir oldgnu
43533 (cd oldgnu
43534 TEST_TAR_FORMAT=oldgnu
43535 export TEST_TAR_FORMAT
43536 TAR_OPTIONS=\"-H oldgnu\"
43537 export TAR_OPTIONS
43538 rm -rf *
43539
43540
43541 echo \"test\" > \$\$
43542 chmod 0 \$\$
43543 cat \$\$ > /dev/null 2>&1
43544 result=\$?
43545 rm -f \$\$
43546 test \$result -eq 0 || exit 77
43547
43548
43549   file=\$(TMPDIR=. mktemp fiXXXXXX)
43550
43551   setfattr -n user.test -v test \$file &> /dev/null
43552   if test \"\$?\" != 0; then
43553     exit 77
43554   fi
43555
43556
43557   getfattr \$file &> /dev/null
43558   if test \"\$?\" != 0; then
43559     exit 77
43560   fi
43561
43562
43563
43564
43565   file=\$(TMPDIR=. mktemp fiXXXXXX)
43566
43567   restorecon \$file &> /dev/null
43568   if test \"\$?\" != 0; then
43569     exit 77
43570   fi
43571
43572
43573   chcon -h --user=unconfined_u \$file &> /dev/null
43574   if test \"\$?\" != 0; then
43575     exit 77
43576   fi
43577
43578   rm -rf \$file
43579
43580   file=\$(TMPDIR=. mktemp fiXXXXXX)
43581   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43582   if test \"\$err\" != \"0\"; then
43583     exit 77
43584   fi
43585
43586
43587
43588   file=\$(TMPDIR=. mktemp fiXXXXXX)
43589
43590   setfacl -m u:\$UID:rwx \$file &> /dev/null
43591   if test \"\$?\" != 0; then
43592     exit 77
43593   fi
43594
43595
43596   getfacl \$file &> /dev/null
43597   if test \"\$?\" != 0; then
43598     exit 77
43599   fi
43600
43601   rm -rf \$file
43602
43603   file=\$(TMPDIR=. mktemp fiXXXXXX)
43604   setfacl -m u:\$UID:rwx \$file
43605   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43606   if test \"\$err\" != \"0\"; then
43607     exit 77
43608   fi
43609
43610
43611 mkdir dir
43612 mkfifo dir/fifo
43613 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
43614 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
43615 mknod dir/chartype c \$MAJOR \$MINOR
43616
43617 # setup attributes
43618 restorecon -R dir
43619 chcon -h --user=system_u dir/fifo
43620 chcon -h --user=system_u dir/chartype
43621 setfacl -m u:\$UID:--- dir/fifo
43622 setfacl -m u:\$UID:rwx dir/chartype
43623
43624 getfacl dir/fifo >> before
43625 getfattr -msecurity.selinux dir/chartype >> before
43626
43627 tar --xattrs --selinux --acls -cf archive.tar dir
43628
43629 mv dir olddir
43630
43631 tar --xattrs --selinux --acls -xf archive.tar
43632
43633 getfacl dir/fifo >> after
43634 getfattr -msecurity.selinux dir/chartype >> after
43635
43636 diff before after
43637 echo separator
43638 )"
43639 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
43640 ( $at_check_trace;
43641 mkdir oldgnu
43642 (cd oldgnu
43643 TEST_TAR_FORMAT=oldgnu
43644 export TEST_TAR_FORMAT
43645 TAR_OPTIONS="-H oldgnu"
43646 export TAR_OPTIONS
43647 rm -rf *
43648
43649
43650 echo "test" > $$
43651 chmod 0 $$
43652 cat $$ > /dev/null 2>&1
43653 result=$?
43654 rm -f $$
43655 test $result -eq 0 || exit 77
43656
43657
43658   file=$(TMPDIR=. mktemp fiXXXXXX)
43659
43660   setfattr -n user.test -v test $file &> /dev/null
43661   if test "$?" != 0; then
43662     exit 77
43663   fi
43664
43665
43666   getfattr $file &> /dev/null
43667   if test "$?" != 0; then
43668     exit 77
43669   fi
43670
43671
43672
43673
43674   file=$(TMPDIR=. mktemp fiXXXXXX)
43675
43676   restorecon $file &> /dev/null
43677   if test "$?" != 0; then
43678     exit 77
43679   fi
43680
43681
43682   chcon -h --user=unconfined_u $file &> /dev/null
43683   if test "$?" != 0; then
43684     exit 77
43685   fi
43686
43687   rm -rf $file
43688
43689   file=$(TMPDIR=. mktemp fiXXXXXX)
43690   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43691   if test "$err" != "0"; then
43692     exit 77
43693   fi
43694
43695
43696
43697   file=$(TMPDIR=. mktemp fiXXXXXX)
43698
43699   setfacl -m u:$UID:rwx $file &> /dev/null
43700   if test "$?" != 0; then
43701     exit 77
43702   fi
43703
43704
43705   getfacl $file &> /dev/null
43706   if test "$?" != 0; then
43707     exit 77
43708   fi
43709
43710   rm -rf $file
43711
43712   file=$(TMPDIR=. mktemp fiXXXXXX)
43713   setfacl -m u:$UID:rwx $file
43714   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43715   if test "$err" != "0"; then
43716     exit 77
43717   fi
43718
43719
43720 mkdir dir
43721 mkfifo dir/fifo
43722 MAJOR=$( stat /dev/urandom --printf="%t" )
43723 MINOR=$( stat /dev/urandom --printf="%T" )
43724 mknod dir/chartype c $MAJOR $MINOR
43725
43726 # setup attributes
43727 restorecon -R dir
43728 chcon -h --user=system_u dir/fifo
43729 chcon -h --user=system_u dir/chartype
43730 setfacl -m u:$UID:--- dir/fifo
43731 setfacl -m u:$UID:rwx dir/chartype
43732
43733 getfacl dir/fifo >> before
43734 getfattr -msecurity.selinux dir/chartype >> before
43735
43736 tar --xattrs --selinux --acls -cf archive.tar dir
43737
43738 mv dir olddir
43739
43740 tar --xattrs --selinux --acls -xf archive.tar
43741
43742 getfacl dir/fifo >> after
43743 getfattr -msecurity.selinux dir/chartype >> after
43744
43745 diff before after
43746 echo separator
43747 )
43748 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43749 at_status=$? at_failed=false
43750 $at_check_filter
43751 at_fn_diff_devnull "$at_stderr" || at_failed=:
43752 echo >>"$at_stdout"; $as_echo "separator
43753 " | \
43754   $at_diff - "$at_stdout" || at_failed=:
43755 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
43756 $at_failed && at_fn_log_failure
43757 $at_traceon; }
43758
43759               { set +x
43760 $as_echo "$at_srcdir/selacl01.at:28:
43761 mkdir ustar
43762 (cd ustar
43763 TEST_TAR_FORMAT=ustar
43764 export TEST_TAR_FORMAT
43765 TAR_OPTIONS=\"-H ustar\"
43766 export TAR_OPTIONS
43767 rm -rf *
43768
43769
43770 echo \"test\" > \$\$
43771 chmod 0 \$\$
43772 cat \$\$ > /dev/null 2>&1
43773 result=\$?
43774 rm -f \$\$
43775 test \$result -eq 0 || exit 77
43776
43777
43778   file=\$(TMPDIR=. mktemp fiXXXXXX)
43779
43780   setfattr -n user.test -v test \$file &> /dev/null
43781   if test \"\$?\" != 0; then
43782     exit 77
43783   fi
43784
43785
43786   getfattr \$file &> /dev/null
43787   if test \"\$?\" != 0; then
43788     exit 77
43789   fi
43790
43791
43792
43793
43794   file=\$(TMPDIR=. mktemp fiXXXXXX)
43795
43796   restorecon \$file &> /dev/null
43797   if test \"\$?\" != 0; then
43798     exit 77
43799   fi
43800
43801
43802   chcon -h --user=unconfined_u \$file &> /dev/null
43803   if test \"\$?\" != 0; then
43804     exit 77
43805   fi
43806
43807   rm -rf \$file
43808
43809   file=\$(TMPDIR=. mktemp fiXXXXXX)
43810   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43811   if test \"\$err\" != \"0\"; then
43812     exit 77
43813   fi
43814
43815
43816
43817   file=\$(TMPDIR=. mktemp fiXXXXXX)
43818
43819   setfacl -m u:\$UID:rwx \$file &> /dev/null
43820   if test \"\$?\" != 0; then
43821     exit 77
43822   fi
43823
43824
43825   getfacl \$file &> /dev/null
43826   if test \"\$?\" != 0; then
43827     exit 77
43828   fi
43829
43830   rm -rf \$file
43831
43832   file=\$(TMPDIR=. mktemp fiXXXXXX)
43833   setfacl -m u:\$UID:rwx \$file
43834   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
43835   if test \"\$err\" != \"0\"; then
43836     exit 77
43837   fi
43838
43839
43840 mkdir dir
43841 mkfifo dir/fifo
43842 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
43843 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
43844 mknod dir/chartype c \$MAJOR \$MINOR
43845
43846 # setup attributes
43847 restorecon -R dir
43848 chcon -h --user=system_u dir/fifo
43849 chcon -h --user=system_u dir/chartype
43850 setfacl -m u:\$UID:--- dir/fifo
43851 setfacl -m u:\$UID:rwx dir/chartype
43852
43853 getfacl dir/fifo >> before
43854 getfattr -msecurity.selinux dir/chartype >> before
43855
43856 tar --xattrs --selinux --acls -cf archive.tar dir
43857
43858 mv dir olddir
43859
43860 tar --xattrs --selinux --acls -xf archive.tar
43861
43862 getfacl dir/fifo >> after
43863 getfattr -msecurity.selinux dir/chartype >> after
43864
43865 diff before after
43866 echo separator
43867 )"
43868 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
43869 ( $at_check_trace;
43870 mkdir ustar
43871 (cd ustar
43872 TEST_TAR_FORMAT=ustar
43873 export TEST_TAR_FORMAT
43874 TAR_OPTIONS="-H ustar"
43875 export TAR_OPTIONS
43876 rm -rf *
43877
43878
43879 echo "test" > $$
43880 chmod 0 $$
43881 cat $$ > /dev/null 2>&1
43882 result=$?
43883 rm -f $$
43884 test $result -eq 0 || exit 77
43885
43886
43887   file=$(TMPDIR=. mktemp fiXXXXXX)
43888
43889   setfattr -n user.test -v test $file &> /dev/null
43890   if test "$?" != 0; then
43891     exit 77
43892   fi
43893
43894
43895   getfattr $file &> /dev/null
43896   if test "$?" != 0; then
43897     exit 77
43898   fi
43899
43900
43901
43902
43903   file=$(TMPDIR=. mktemp fiXXXXXX)
43904
43905   restorecon $file &> /dev/null
43906   if test "$?" != 0; then
43907     exit 77
43908   fi
43909
43910
43911   chcon -h --user=unconfined_u $file &> /dev/null
43912   if test "$?" != 0; then
43913     exit 77
43914   fi
43915
43916   rm -rf $file
43917
43918   file=$(TMPDIR=. mktemp fiXXXXXX)
43919   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43920   if test "$err" != "0"; then
43921     exit 77
43922   fi
43923
43924
43925
43926   file=$(TMPDIR=. mktemp fiXXXXXX)
43927
43928   setfacl -m u:$UID:rwx $file &> /dev/null
43929   if test "$?" != 0; then
43930     exit 77
43931   fi
43932
43933
43934   getfacl $file &> /dev/null
43935   if test "$?" != 0; then
43936     exit 77
43937   fi
43938
43939   rm -rf $file
43940
43941   file=$(TMPDIR=. mktemp fiXXXXXX)
43942   setfacl -m u:$UID:rwx $file
43943   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
43944   if test "$err" != "0"; then
43945     exit 77
43946   fi
43947
43948
43949 mkdir dir
43950 mkfifo dir/fifo
43951 MAJOR=$( stat /dev/urandom --printf="%t" )
43952 MINOR=$( stat /dev/urandom --printf="%T" )
43953 mknod dir/chartype c $MAJOR $MINOR
43954
43955 # setup attributes
43956 restorecon -R dir
43957 chcon -h --user=system_u dir/fifo
43958 chcon -h --user=system_u dir/chartype
43959 setfacl -m u:$UID:--- dir/fifo
43960 setfacl -m u:$UID:rwx dir/chartype
43961
43962 getfacl dir/fifo >> before
43963 getfattr -msecurity.selinux dir/chartype >> before
43964
43965 tar --xattrs --selinux --acls -cf archive.tar dir
43966
43967 mv dir olddir
43968
43969 tar --xattrs --selinux --acls -xf archive.tar
43970
43971 getfacl dir/fifo >> after
43972 getfattr -msecurity.selinux dir/chartype >> after
43973
43974 diff before after
43975 echo separator
43976 )
43977 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
43978 at_status=$? at_failed=false
43979 $at_check_filter
43980 at_fn_diff_devnull "$at_stderr" || at_failed=:
43981 echo >>"$at_stdout"; $as_echo "separator
43982 " | \
43983   $at_diff - "$at_stdout" || at_failed=:
43984 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
43985 $at_failed && at_fn_log_failure
43986 $at_traceon; }
43987
43988               { set +x
43989 $as_echo "$at_srcdir/selacl01.at:28:
43990 mkdir posix
43991 (cd posix
43992 TEST_TAR_FORMAT=posix
43993 export TEST_TAR_FORMAT
43994 TAR_OPTIONS=\"-H posix\"
43995 export TAR_OPTIONS
43996 rm -rf *
43997
43998
43999 echo \"test\" > \$\$
44000 chmod 0 \$\$
44001 cat \$\$ > /dev/null 2>&1
44002 result=\$?
44003 rm -f \$\$
44004 test \$result -eq 0 || exit 77
44005
44006
44007   file=\$(TMPDIR=. mktemp fiXXXXXX)
44008
44009   setfattr -n user.test -v test \$file &> /dev/null
44010   if test \"\$?\" != 0; then
44011     exit 77
44012   fi
44013
44014
44015   getfattr \$file &> /dev/null
44016   if test \"\$?\" != 0; then
44017     exit 77
44018   fi
44019
44020
44021
44022
44023   file=\$(TMPDIR=. mktemp fiXXXXXX)
44024
44025   restorecon \$file &> /dev/null
44026   if test \"\$?\" != 0; then
44027     exit 77
44028   fi
44029
44030
44031   chcon -h --user=unconfined_u \$file &> /dev/null
44032   if test \"\$?\" != 0; then
44033     exit 77
44034   fi
44035
44036   rm -rf \$file
44037
44038   file=\$(TMPDIR=. mktemp fiXXXXXX)
44039   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44040   if test \"\$err\" != \"0\"; then
44041     exit 77
44042   fi
44043
44044
44045
44046   file=\$(TMPDIR=. mktemp fiXXXXXX)
44047
44048   setfacl -m u:\$UID:rwx \$file &> /dev/null
44049   if test \"\$?\" != 0; then
44050     exit 77
44051   fi
44052
44053
44054   getfacl \$file &> /dev/null
44055   if test \"\$?\" != 0; then
44056     exit 77
44057   fi
44058
44059   rm -rf \$file
44060
44061   file=\$(TMPDIR=. mktemp fiXXXXXX)
44062   setfacl -m u:\$UID:rwx \$file
44063   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44064   if test \"\$err\" != \"0\"; then
44065     exit 77
44066   fi
44067
44068
44069 mkdir dir
44070 mkfifo dir/fifo
44071 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
44072 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
44073 mknod dir/chartype c \$MAJOR \$MINOR
44074
44075 # setup attributes
44076 restorecon -R dir
44077 chcon -h --user=system_u dir/fifo
44078 chcon -h --user=system_u dir/chartype
44079 setfacl -m u:\$UID:--- dir/fifo
44080 setfacl -m u:\$UID:rwx dir/chartype
44081
44082 getfacl dir/fifo >> before
44083 getfattr -msecurity.selinux dir/chartype >> before
44084
44085 tar --xattrs --selinux --acls -cf archive.tar dir
44086
44087 mv dir olddir
44088
44089 tar --xattrs --selinux --acls -xf archive.tar
44090
44091 getfacl dir/fifo >> after
44092 getfattr -msecurity.selinux dir/chartype >> after
44093
44094 diff before after
44095 echo separator
44096 )"
44097 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
44098 ( $at_check_trace;
44099 mkdir posix
44100 (cd posix
44101 TEST_TAR_FORMAT=posix
44102 export TEST_TAR_FORMAT
44103 TAR_OPTIONS="-H posix"
44104 export TAR_OPTIONS
44105 rm -rf *
44106
44107
44108 echo "test" > $$
44109 chmod 0 $$
44110 cat $$ > /dev/null 2>&1
44111 result=$?
44112 rm -f $$
44113 test $result -eq 0 || exit 77
44114
44115
44116   file=$(TMPDIR=. mktemp fiXXXXXX)
44117
44118   setfattr -n user.test -v test $file &> /dev/null
44119   if test "$?" != 0; then
44120     exit 77
44121   fi
44122
44123
44124   getfattr $file &> /dev/null
44125   if test "$?" != 0; then
44126     exit 77
44127   fi
44128
44129
44130
44131
44132   file=$(TMPDIR=. mktemp fiXXXXXX)
44133
44134   restorecon $file &> /dev/null
44135   if test "$?" != 0; then
44136     exit 77
44137   fi
44138
44139
44140   chcon -h --user=unconfined_u $file &> /dev/null
44141   if test "$?" != 0; then
44142     exit 77
44143   fi
44144
44145   rm -rf $file
44146
44147   file=$(TMPDIR=. mktemp fiXXXXXX)
44148   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44149   if test "$err" != "0"; then
44150     exit 77
44151   fi
44152
44153
44154
44155   file=$(TMPDIR=. mktemp fiXXXXXX)
44156
44157   setfacl -m u:$UID:rwx $file &> /dev/null
44158   if test "$?" != 0; then
44159     exit 77
44160   fi
44161
44162
44163   getfacl $file &> /dev/null
44164   if test "$?" != 0; then
44165     exit 77
44166   fi
44167
44168   rm -rf $file
44169
44170   file=$(TMPDIR=. mktemp fiXXXXXX)
44171   setfacl -m u:$UID:rwx $file
44172   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44173   if test "$err" != "0"; then
44174     exit 77
44175   fi
44176
44177
44178 mkdir dir
44179 mkfifo dir/fifo
44180 MAJOR=$( stat /dev/urandom --printf="%t" )
44181 MINOR=$( stat /dev/urandom --printf="%T" )
44182 mknod dir/chartype c $MAJOR $MINOR
44183
44184 # setup attributes
44185 restorecon -R dir
44186 chcon -h --user=system_u dir/fifo
44187 chcon -h --user=system_u dir/chartype
44188 setfacl -m u:$UID:--- dir/fifo
44189 setfacl -m u:$UID:rwx dir/chartype
44190
44191 getfacl dir/fifo >> before
44192 getfattr -msecurity.selinux dir/chartype >> before
44193
44194 tar --xattrs --selinux --acls -cf archive.tar dir
44195
44196 mv dir olddir
44197
44198 tar --xattrs --selinux --acls -xf archive.tar
44199
44200 getfacl dir/fifo >> after
44201 getfattr -msecurity.selinux dir/chartype >> after
44202
44203 diff before after
44204 echo separator
44205 )
44206 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44207 at_status=$? at_failed=false
44208 $at_check_filter
44209 at_fn_diff_devnull "$at_stderr" || at_failed=:
44210 echo >>"$at_stdout"; $as_echo "separator
44211 " | \
44212   $at_diff - "$at_stdout" || at_failed=:
44213 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
44214 $at_failed && at_fn_log_failure
44215 $at_traceon; }
44216
44217               { set +x
44218 $as_echo "$at_srcdir/selacl01.at:28:
44219 mkdir gnu
44220 (cd gnu
44221 TEST_TAR_FORMAT=gnu
44222 export TEST_TAR_FORMAT
44223 TAR_OPTIONS=\"-H gnu\"
44224 export TAR_OPTIONS
44225 rm -rf *
44226
44227
44228 echo \"test\" > \$\$
44229 chmod 0 \$\$
44230 cat \$\$ > /dev/null 2>&1
44231 result=\$?
44232 rm -f \$\$
44233 test \$result -eq 0 || exit 77
44234
44235
44236   file=\$(TMPDIR=. mktemp fiXXXXXX)
44237
44238   setfattr -n user.test -v test \$file &> /dev/null
44239   if test \"\$?\" != 0; then
44240     exit 77
44241   fi
44242
44243
44244   getfattr \$file &> /dev/null
44245   if test \"\$?\" != 0; then
44246     exit 77
44247   fi
44248
44249
44250
44251
44252   file=\$(TMPDIR=. mktemp fiXXXXXX)
44253
44254   restorecon \$file &> /dev/null
44255   if test \"\$?\" != 0; then
44256     exit 77
44257   fi
44258
44259
44260   chcon -h --user=unconfined_u \$file &> /dev/null
44261   if test \"\$?\" != 0; then
44262     exit 77
44263   fi
44264
44265   rm -rf \$file
44266
44267   file=\$(TMPDIR=. mktemp fiXXXXXX)
44268   err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44269   if test \"\$err\" != \"0\"; then
44270     exit 77
44271   fi
44272
44273
44274
44275   file=\$(TMPDIR=. mktemp fiXXXXXX)
44276
44277   setfacl -m u:\$UID:rwx \$file &> /dev/null
44278   if test \"\$?\" != 0; then
44279     exit 77
44280   fi
44281
44282
44283   getfacl \$file &> /dev/null
44284   if test \"\$?\" != 0; then
44285     exit 77
44286   fi
44287
44288   rm -rf \$file
44289
44290   file=\$(TMPDIR=. mktemp fiXXXXXX)
44291   setfacl -m u:\$UID:rwx \$file
44292   err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44293   if test \"\$err\" != \"0\"; then
44294     exit 77
44295   fi
44296
44297
44298 mkdir dir
44299 mkfifo dir/fifo
44300 MAJOR=\$( stat /dev/urandom --printf=\"%t\" )
44301 MINOR=\$( stat /dev/urandom --printf=\"%T\" )
44302 mknod dir/chartype c \$MAJOR \$MINOR
44303
44304 # setup attributes
44305 restorecon -R dir
44306 chcon -h --user=system_u dir/fifo
44307 chcon -h --user=system_u dir/chartype
44308 setfacl -m u:\$UID:--- dir/fifo
44309 setfacl -m u:\$UID:rwx dir/chartype
44310
44311 getfacl dir/fifo >> before
44312 getfattr -msecurity.selinux dir/chartype >> before
44313
44314 tar --xattrs --selinux --acls -cf archive.tar dir
44315
44316 mv dir olddir
44317
44318 tar --xattrs --selinux --acls -xf archive.tar
44319
44320 getfacl dir/fifo >> after
44321 getfattr -msecurity.selinux dir/chartype >> after
44322
44323 diff before after
44324 echo separator
44325 )"
44326 at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28"
44327 ( $at_check_trace;
44328 mkdir gnu
44329 (cd gnu
44330 TEST_TAR_FORMAT=gnu
44331 export TEST_TAR_FORMAT
44332 TAR_OPTIONS="-H gnu"
44333 export TAR_OPTIONS
44334 rm -rf *
44335
44336
44337 echo "test" > $$
44338 chmod 0 $$
44339 cat $$ > /dev/null 2>&1
44340 result=$?
44341 rm -f $$
44342 test $result -eq 0 || exit 77
44343
44344
44345   file=$(TMPDIR=. mktemp fiXXXXXX)
44346
44347   setfattr -n user.test -v test $file &> /dev/null
44348   if test "$?" != 0; then
44349     exit 77
44350   fi
44351
44352
44353   getfattr $file &> /dev/null
44354   if test "$?" != 0; then
44355     exit 77
44356   fi
44357
44358
44359
44360
44361   file=$(TMPDIR=. mktemp fiXXXXXX)
44362
44363   restorecon $file &> /dev/null
44364   if test "$?" != 0; then
44365     exit 77
44366   fi
44367
44368
44369   chcon -h --user=unconfined_u $file &> /dev/null
44370   if test "$?" != 0; then
44371     exit 77
44372   fi
44373
44374   rm -rf $file
44375
44376   file=$(TMPDIR=. mktemp fiXXXXXX)
44377   err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44378   if test "$err" != "0"; then
44379     exit 77
44380   fi
44381
44382
44383
44384   file=$(TMPDIR=. mktemp fiXXXXXX)
44385
44386   setfacl -m u:$UID:rwx $file &> /dev/null
44387   if test "$?" != 0; then
44388     exit 77
44389   fi
44390
44391
44392   getfacl $file &> /dev/null
44393   if test "$?" != 0; then
44394     exit 77
44395   fi
44396
44397   rm -rf $file
44398
44399   file=$(TMPDIR=. mktemp fiXXXXXX)
44400   setfacl -m u:$UID:rwx $file
44401   err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44402   if test "$err" != "0"; then
44403     exit 77
44404   fi
44405
44406
44407 mkdir dir
44408 mkfifo dir/fifo
44409 MAJOR=$( stat /dev/urandom --printf="%t" )
44410 MINOR=$( stat /dev/urandom --printf="%T" )
44411 mknod dir/chartype c $MAJOR $MINOR
44412
44413 # setup attributes
44414 restorecon -R dir
44415 chcon -h --user=system_u dir/fifo
44416 chcon -h --user=system_u dir/chartype
44417 setfacl -m u:$UID:--- dir/fifo
44418 setfacl -m u:$UID:rwx dir/chartype
44419
44420 getfacl dir/fifo >> before
44421 getfattr -msecurity.selinux dir/chartype >> before
44422
44423 tar --xattrs --selinux --acls -cf archive.tar dir
44424
44425 mv dir olddir
44426
44427 tar --xattrs --selinux --acls -xf archive.tar
44428
44429 getfacl dir/fifo >> after
44430 getfattr -msecurity.selinux dir/chartype >> after
44431
44432 diff before after
44433 echo separator
44434 )
44435 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44436 at_status=$? at_failed=false
44437 $at_check_filter
44438 at_fn_diff_devnull "$at_stderr" || at_failed=:
44439 echo >>"$at_stdout"; $as_echo "separator
44440 " | \
44441   $at_diff - "$at_stdout" || at_failed=:
44442 at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28"
44443 $at_failed && at_fn_log_failure
44444 $at_traceon; }
44445
44446
44447
44448
44449   set +x
44450   $at_times_p && times >"$at_times_file"
44451 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
44452 read at_status <"$at_status_file"
44453 #AT_STOP_177
44454 #AT_START_178
44455 at_fn_group_banner 178 'capabs_raw01.at:25' \
44456   "capabilities: binary store/restore" "             " 25
44457 at_xfail=no
44458       test -f $XFAILFILE && at_xfail=yes
44459 (
44460   $as_echo "178. $at_setup_line: testing $at_desc ..."
44461   $at_traceon
44462
44463
44464
44465
44466
44467   { set +x
44468 $as_echo "$at_srcdir/capabs_raw01.at:28:
44469 mkdir v7
44470 (cd v7
44471 TEST_TAR_FORMAT=v7
44472 export TEST_TAR_FORMAT
44473 TAR_OPTIONS=\"-H v7\"
44474 export TAR_OPTIONS
44475 rm -rf *
44476
44477
44478 echo \"test\" > \$\$
44479 chmod 0 \$\$
44480 cat \$\$ > /dev/null 2>&1
44481 result=\$?
44482 rm -f \$\$
44483 test \$result -eq 0 || exit 77
44484
44485
44486
44487   file=\$(TMPDIR=. mktemp fiXXXXXX)
44488
44489   setfattr -n user.test -v test \$file &> /dev/null
44490   if test \"\$?\" != 0; then
44491     exit 77
44492   fi
44493
44494
44495   getfattr \$file &> /dev/null
44496   if test \"\$?\" != 0; then
44497     exit 77
44498   fi
44499
44500
44501   file=\$(TMPDIR=. mktemp fiXXXXXX)
44502   setfattr -n user.test -v ahoj \$file
44503   # check whether tar fails to store xattrs
44504   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44505   if test \"\$err\" != \"0\"; then
44506     exit 77
44507   fi
44508
44509
44510   file=\$(TMPDIR=. mktemp fiXXXXXX)
44511
44512   setcap \"= cap_chown=ei\" \$file &> /dev/null
44513   if test \"\$?\" != 0; then
44514     exit 77
44515   fi
44516
44517
44518   getcap \$file &> /dev/null
44519   if test \"\$?\" != 0; then
44520     exit 77
44521   fi
44522
44523   rm -rf \$file
44524
44525
44526 mkdir dir
44527 genfile --file dir/file
44528
44529 setcap \"= cap_chown=ei\" dir/file
44530
44531 # archive whole directory including binary xattrs
44532 tar --xattrs -cf archive.tar dir
44533
44534 # clear the directory
44535 rm -rf dir
44536
44537 # restore _all_ xattrs (not just the user.* domain)
44538 tar --xattrs --xattrs-include='*' -xf archive.tar
44539
44540 getcap dir/file
44541 )"
44542 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
44543 ( $at_check_trace;
44544 mkdir v7
44545 (cd v7
44546 TEST_TAR_FORMAT=v7
44547 export TEST_TAR_FORMAT
44548 TAR_OPTIONS="-H v7"
44549 export TAR_OPTIONS
44550 rm -rf *
44551
44552
44553 echo "test" > $$
44554 chmod 0 $$
44555 cat $$ > /dev/null 2>&1
44556 result=$?
44557 rm -f $$
44558 test $result -eq 0 || exit 77
44559
44560
44561
44562   file=$(TMPDIR=. mktemp fiXXXXXX)
44563
44564   setfattr -n user.test -v test $file &> /dev/null
44565   if test "$?" != 0; then
44566     exit 77
44567   fi
44568
44569
44570   getfattr $file &> /dev/null
44571   if test "$?" != 0; then
44572     exit 77
44573   fi
44574
44575
44576   file=$(TMPDIR=. mktemp fiXXXXXX)
44577   setfattr -n user.test -v ahoj $file
44578   # check whether tar fails to store xattrs
44579   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44580   if test "$err" != "0"; then
44581     exit 77
44582   fi
44583
44584
44585   file=$(TMPDIR=. mktemp fiXXXXXX)
44586
44587   setcap "= cap_chown=ei" $file &> /dev/null
44588   if test "$?" != 0; then
44589     exit 77
44590   fi
44591
44592
44593   getcap $file &> /dev/null
44594   if test "$?" != 0; then
44595     exit 77
44596   fi
44597
44598   rm -rf $file
44599
44600
44601 mkdir dir
44602 genfile --file dir/file
44603
44604 setcap "= cap_chown=ei" dir/file
44605
44606 # archive whole directory including binary xattrs
44607 tar --xattrs -cf archive.tar dir
44608
44609 # clear the directory
44610 rm -rf dir
44611
44612 # restore _all_ xattrs (not just the user.* domain)
44613 tar --xattrs --xattrs-include='*' -xf archive.tar
44614
44615 getcap dir/file
44616 )
44617 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44618 at_status=$? at_failed=false
44619 $at_check_filter
44620 at_fn_diff_devnull "$at_stderr" || at_failed=:
44621 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
44622 " | \
44623   $at_diff - "$at_stdout" || at_failed=:
44624 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
44625 $at_failed && at_fn_log_failure
44626 $at_traceon; }
44627
44628               { set +x
44629 $as_echo "$at_srcdir/capabs_raw01.at:28:
44630 mkdir oldgnu
44631 (cd oldgnu
44632 TEST_TAR_FORMAT=oldgnu
44633 export TEST_TAR_FORMAT
44634 TAR_OPTIONS=\"-H oldgnu\"
44635 export TAR_OPTIONS
44636 rm -rf *
44637
44638
44639 echo \"test\" > \$\$
44640 chmod 0 \$\$
44641 cat \$\$ > /dev/null 2>&1
44642 result=\$?
44643 rm -f \$\$
44644 test \$result -eq 0 || exit 77
44645
44646
44647
44648   file=\$(TMPDIR=. mktemp fiXXXXXX)
44649
44650   setfattr -n user.test -v test \$file &> /dev/null
44651   if test \"\$?\" != 0; then
44652     exit 77
44653   fi
44654
44655
44656   getfattr \$file &> /dev/null
44657   if test \"\$?\" != 0; then
44658     exit 77
44659   fi
44660
44661
44662   file=\$(TMPDIR=. mktemp fiXXXXXX)
44663   setfattr -n user.test -v ahoj \$file
44664   # check whether tar fails to store xattrs
44665   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44666   if test \"\$err\" != \"0\"; then
44667     exit 77
44668   fi
44669
44670
44671   file=\$(TMPDIR=. mktemp fiXXXXXX)
44672
44673   setcap \"= cap_chown=ei\" \$file &> /dev/null
44674   if test \"\$?\" != 0; then
44675     exit 77
44676   fi
44677
44678
44679   getcap \$file &> /dev/null
44680   if test \"\$?\" != 0; then
44681     exit 77
44682   fi
44683
44684   rm -rf \$file
44685
44686
44687 mkdir dir
44688 genfile --file dir/file
44689
44690 setcap \"= cap_chown=ei\" dir/file
44691
44692 # archive whole directory including binary xattrs
44693 tar --xattrs -cf archive.tar dir
44694
44695 # clear the directory
44696 rm -rf dir
44697
44698 # restore _all_ xattrs (not just the user.* domain)
44699 tar --xattrs --xattrs-include='*' -xf archive.tar
44700
44701 getcap dir/file
44702 )"
44703 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
44704 ( $at_check_trace;
44705 mkdir oldgnu
44706 (cd oldgnu
44707 TEST_TAR_FORMAT=oldgnu
44708 export TEST_TAR_FORMAT
44709 TAR_OPTIONS="-H oldgnu"
44710 export TAR_OPTIONS
44711 rm -rf *
44712
44713
44714 echo "test" > $$
44715 chmod 0 $$
44716 cat $$ > /dev/null 2>&1
44717 result=$?
44718 rm -f $$
44719 test $result -eq 0 || exit 77
44720
44721
44722
44723   file=$(TMPDIR=. mktemp fiXXXXXX)
44724
44725   setfattr -n user.test -v test $file &> /dev/null
44726   if test "$?" != 0; then
44727     exit 77
44728   fi
44729
44730
44731   getfattr $file &> /dev/null
44732   if test "$?" != 0; then
44733     exit 77
44734   fi
44735
44736
44737   file=$(TMPDIR=. mktemp fiXXXXXX)
44738   setfattr -n user.test -v ahoj $file
44739   # check whether tar fails to store xattrs
44740   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44741   if test "$err" != "0"; then
44742     exit 77
44743   fi
44744
44745
44746   file=$(TMPDIR=. mktemp fiXXXXXX)
44747
44748   setcap "= cap_chown=ei" $file &> /dev/null
44749   if test "$?" != 0; then
44750     exit 77
44751   fi
44752
44753
44754   getcap $file &> /dev/null
44755   if test "$?" != 0; then
44756     exit 77
44757   fi
44758
44759   rm -rf $file
44760
44761
44762 mkdir dir
44763 genfile --file dir/file
44764
44765 setcap "= cap_chown=ei" dir/file
44766
44767 # archive whole directory including binary xattrs
44768 tar --xattrs -cf archive.tar dir
44769
44770 # clear the directory
44771 rm -rf dir
44772
44773 # restore _all_ xattrs (not just the user.* domain)
44774 tar --xattrs --xattrs-include='*' -xf archive.tar
44775
44776 getcap dir/file
44777 )
44778 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44779 at_status=$? at_failed=false
44780 $at_check_filter
44781 at_fn_diff_devnull "$at_stderr" || at_failed=:
44782 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
44783 " | \
44784   $at_diff - "$at_stdout" || at_failed=:
44785 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
44786 $at_failed && at_fn_log_failure
44787 $at_traceon; }
44788
44789               { set +x
44790 $as_echo "$at_srcdir/capabs_raw01.at:28:
44791 mkdir ustar
44792 (cd ustar
44793 TEST_TAR_FORMAT=ustar
44794 export TEST_TAR_FORMAT
44795 TAR_OPTIONS=\"-H ustar\"
44796 export TAR_OPTIONS
44797 rm -rf *
44798
44799
44800 echo \"test\" > \$\$
44801 chmod 0 \$\$
44802 cat \$\$ > /dev/null 2>&1
44803 result=\$?
44804 rm -f \$\$
44805 test \$result -eq 0 || exit 77
44806
44807
44808
44809   file=\$(TMPDIR=. mktemp fiXXXXXX)
44810
44811   setfattr -n user.test -v test \$file &> /dev/null
44812   if test \"\$?\" != 0; then
44813     exit 77
44814   fi
44815
44816
44817   getfattr \$file &> /dev/null
44818   if test \"\$?\" != 0; then
44819     exit 77
44820   fi
44821
44822
44823   file=\$(TMPDIR=. mktemp fiXXXXXX)
44824   setfattr -n user.test -v ahoj \$file
44825   # check whether tar fails to store xattrs
44826   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44827   if test \"\$err\" != \"0\"; then
44828     exit 77
44829   fi
44830
44831
44832   file=\$(TMPDIR=. mktemp fiXXXXXX)
44833
44834   setcap \"= cap_chown=ei\" \$file &> /dev/null
44835   if test \"\$?\" != 0; then
44836     exit 77
44837   fi
44838
44839
44840   getcap \$file &> /dev/null
44841   if test \"\$?\" != 0; then
44842     exit 77
44843   fi
44844
44845   rm -rf \$file
44846
44847
44848 mkdir dir
44849 genfile --file dir/file
44850
44851 setcap \"= cap_chown=ei\" dir/file
44852
44853 # archive whole directory including binary xattrs
44854 tar --xattrs -cf archive.tar dir
44855
44856 # clear the directory
44857 rm -rf dir
44858
44859 # restore _all_ xattrs (not just the user.* domain)
44860 tar --xattrs --xattrs-include='*' -xf archive.tar
44861
44862 getcap dir/file
44863 )"
44864 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
44865 ( $at_check_trace;
44866 mkdir ustar
44867 (cd ustar
44868 TEST_TAR_FORMAT=ustar
44869 export TEST_TAR_FORMAT
44870 TAR_OPTIONS="-H ustar"
44871 export TAR_OPTIONS
44872 rm -rf *
44873
44874
44875 echo "test" > $$
44876 chmod 0 $$
44877 cat $$ > /dev/null 2>&1
44878 result=$?
44879 rm -f $$
44880 test $result -eq 0 || exit 77
44881
44882
44883
44884   file=$(TMPDIR=. mktemp fiXXXXXX)
44885
44886   setfattr -n user.test -v test $file &> /dev/null
44887   if test "$?" != 0; then
44888     exit 77
44889   fi
44890
44891
44892   getfattr $file &> /dev/null
44893   if test "$?" != 0; then
44894     exit 77
44895   fi
44896
44897
44898   file=$(TMPDIR=. mktemp fiXXXXXX)
44899   setfattr -n user.test -v ahoj $file
44900   # check whether tar fails to store xattrs
44901   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
44902   if test "$err" != "0"; then
44903     exit 77
44904   fi
44905
44906
44907   file=$(TMPDIR=. mktemp fiXXXXXX)
44908
44909   setcap "= cap_chown=ei" $file &> /dev/null
44910   if test "$?" != 0; then
44911     exit 77
44912   fi
44913
44914
44915   getcap $file &> /dev/null
44916   if test "$?" != 0; then
44917     exit 77
44918   fi
44919
44920   rm -rf $file
44921
44922
44923 mkdir dir
44924 genfile --file dir/file
44925
44926 setcap "= cap_chown=ei" dir/file
44927
44928 # archive whole directory including binary xattrs
44929 tar --xattrs -cf archive.tar dir
44930
44931 # clear the directory
44932 rm -rf dir
44933
44934 # restore _all_ xattrs (not just the user.* domain)
44935 tar --xattrs --xattrs-include='*' -xf archive.tar
44936
44937 getcap dir/file
44938 )
44939 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
44940 at_status=$? at_failed=false
44941 $at_check_filter
44942 at_fn_diff_devnull "$at_stderr" || at_failed=:
44943 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
44944 " | \
44945   $at_diff - "$at_stdout" || at_failed=:
44946 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
44947 $at_failed && at_fn_log_failure
44948 $at_traceon; }
44949
44950               { set +x
44951 $as_echo "$at_srcdir/capabs_raw01.at:28:
44952 mkdir posix
44953 (cd posix
44954 TEST_TAR_FORMAT=posix
44955 export TEST_TAR_FORMAT
44956 TAR_OPTIONS=\"-H posix\"
44957 export TAR_OPTIONS
44958 rm -rf *
44959
44960
44961 echo \"test\" > \$\$
44962 chmod 0 \$\$
44963 cat \$\$ > /dev/null 2>&1
44964 result=\$?
44965 rm -f \$\$
44966 test \$result -eq 0 || exit 77
44967
44968
44969
44970   file=\$(TMPDIR=. mktemp fiXXXXXX)
44971
44972   setfattr -n user.test -v test \$file &> /dev/null
44973   if test \"\$?\" != 0; then
44974     exit 77
44975   fi
44976
44977
44978   getfattr \$file &> /dev/null
44979   if test \"\$?\" != 0; then
44980     exit 77
44981   fi
44982
44983
44984   file=\$(TMPDIR=. mktemp fiXXXXXX)
44985   setfattr -n user.test -v ahoj \$file
44986   # check whether tar fails to store xattrs
44987   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
44988   if test \"\$err\" != \"0\"; then
44989     exit 77
44990   fi
44991
44992
44993   file=\$(TMPDIR=. mktemp fiXXXXXX)
44994
44995   setcap \"= cap_chown=ei\" \$file &> /dev/null
44996   if test \"\$?\" != 0; then
44997     exit 77
44998   fi
44999
45000
45001   getcap \$file &> /dev/null
45002   if test \"\$?\" != 0; then
45003     exit 77
45004   fi
45005
45006   rm -rf \$file
45007
45008
45009 mkdir dir
45010 genfile --file dir/file
45011
45012 setcap \"= cap_chown=ei\" dir/file
45013
45014 # archive whole directory including binary xattrs
45015 tar --xattrs -cf archive.tar dir
45016
45017 # clear the directory
45018 rm -rf dir
45019
45020 # restore _all_ xattrs (not just the user.* domain)
45021 tar --xattrs --xattrs-include='*' -xf archive.tar
45022
45023 getcap dir/file
45024 )"
45025 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
45026 ( $at_check_trace;
45027 mkdir posix
45028 (cd posix
45029 TEST_TAR_FORMAT=posix
45030 export TEST_TAR_FORMAT
45031 TAR_OPTIONS="-H posix"
45032 export TAR_OPTIONS
45033 rm -rf *
45034
45035
45036 echo "test" > $$
45037 chmod 0 $$
45038 cat $$ > /dev/null 2>&1
45039 result=$?
45040 rm -f $$
45041 test $result -eq 0 || exit 77
45042
45043
45044
45045   file=$(TMPDIR=. mktemp fiXXXXXX)
45046
45047   setfattr -n user.test -v test $file &> /dev/null
45048   if test "$?" != 0; then
45049     exit 77
45050   fi
45051
45052
45053   getfattr $file &> /dev/null
45054   if test "$?" != 0; then
45055     exit 77
45056   fi
45057
45058
45059   file=$(TMPDIR=. mktemp fiXXXXXX)
45060   setfattr -n user.test -v ahoj $file
45061   # check whether tar fails to store xattrs
45062   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
45063   if test "$err" != "0"; then
45064     exit 77
45065   fi
45066
45067
45068   file=$(TMPDIR=. mktemp fiXXXXXX)
45069
45070   setcap "= cap_chown=ei" $file &> /dev/null
45071   if test "$?" != 0; then
45072     exit 77
45073   fi
45074
45075
45076   getcap $file &> /dev/null
45077   if test "$?" != 0; then
45078     exit 77
45079   fi
45080
45081   rm -rf $file
45082
45083
45084 mkdir dir
45085 genfile --file dir/file
45086
45087 setcap "= cap_chown=ei" dir/file
45088
45089 # archive whole directory including binary xattrs
45090 tar --xattrs -cf archive.tar dir
45091
45092 # clear the directory
45093 rm -rf dir
45094
45095 # restore _all_ xattrs (not just the user.* domain)
45096 tar --xattrs --xattrs-include='*' -xf archive.tar
45097
45098 getcap dir/file
45099 )
45100 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45101 at_status=$? at_failed=false
45102 $at_check_filter
45103 at_fn_diff_devnull "$at_stderr" || at_failed=:
45104 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
45105 " | \
45106   $at_diff - "$at_stdout" || at_failed=:
45107 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
45108 $at_failed && at_fn_log_failure
45109 $at_traceon; }
45110
45111               { set +x
45112 $as_echo "$at_srcdir/capabs_raw01.at:28:
45113 mkdir gnu
45114 (cd gnu
45115 TEST_TAR_FORMAT=gnu
45116 export TEST_TAR_FORMAT
45117 TAR_OPTIONS=\"-H gnu\"
45118 export TAR_OPTIONS
45119 rm -rf *
45120
45121
45122 echo \"test\" > \$\$
45123 chmod 0 \$\$
45124 cat \$\$ > /dev/null 2>&1
45125 result=\$?
45126 rm -f \$\$
45127 test \$result -eq 0 || exit 77
45128
45129
45130
45131   file=\$(TMPDIR=. mktemp fiXXXXXX)
45132
45133   setfattr -n user.test -v test \$file &> /dev/null
45134   if test \"\$?\" != 0; then
45135     exit 77
45136   fi
45137
45138
45139   getfattr \$file &> /dev/null
45140   if test \"\$?\" != 0; then
45141     exit 77
45142   fi
45143
45144
45145   file=\$(TMPDIR=. mktemp fiXXXXXX)
45146   setfattr -n user.test -v ahoj \$file
45147   # check whether tar fails to store xattrs
45148   err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l )
45149   if test \"\$err\" != \"0\"; then
45150     exit 77
45151   fi
45152
45153
45154   file=\$(TMPDIR=. mktemp fiXXXXXX)
45155
45156   setcap \"= cap_chown=ei\" \$file &> /dev/null
45157   if test \"\$?\" != 0; then
45158     exit 77
45159   fi
45160
45161
45162   getcap \$file &> /dev/null
45163   if test \"\$?\" != 0; then
45164     exit 77
45165   fi
45166
45167   rm -rf \$file
45168
45169
45170 mkdir dir
45171 genfile --file dir/file
45172
45173 setcap \"= cap_chown=ei\" dir/file
45174
45175 # archive whole directory including binary xattrs
45176 tar --xattrs -cf archive.tar dir
45177
45178 # clear the directory
45179 rm -rf dir
45180
45181 # restore _all_ xattrs (not just the user.* domain)
45182 tar --xattrs --xattrs-include='*' -xf archive.tar
45183
45184 getcap dir/file
45185 )"
45186 at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28"
45187 ( $at_check_trace;
45188 mkdir gnu
45189 (cd gnu
45190 TEST_TAR_FORMAT=gnu
45191 export TEST_TAR_FORMAT
45192 TAR_OPTIONS="-H gnu"
45193 export TAR_OPTIONS
45194 rm -rf *
45195
45196
45197 echo "test" > $$
45198 chmod 0 $$
45199 cat $$ > /dev/null 2>&1
45200 result=$?
45201 rm -f $$
45202 test $result -eq 0 || exit 77
45203
45204
45205
45206   file=$(TMPDIR=. mktemp fiXXXXXX)
45207
45208   setfattr -n user.test -v test $file &> /dev/null
45209   if test "$?" != 0; then
45210     exit 77
45211   fi
45212
45213
45214   getfattr $file &> /dev/null
45215   if test "$?" != 0; then
45216     exit 77
45217   fi
45218
45219
45220   file=$(TMPDIR=. mktemp fiXXXXXX)
45221   setfattr -n user.test -v ahoj $file
45222   # check whether tar fails to store xattrs
45223   err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l )
45224   if test "$err" != "0"; then
45225     exit 77
45226   fi
45227
45228
45229   file=$(TMPDIR=. mktemp fiXXXXXX)
45230
45231   setcap "= cap_chown=ei" $file &> /dev/null
45232   if test "$?" != 0; then
45233     exit 77
45234   fi
45235
45236
45237   getcap $file &> /dev/null
45238   if test "$?" != 0; then
45239     exit 77
45240   fi
45241
45242   rm -rf $file
45243
45244
45245 mkdir dir
45246 genfile --file dir/file
45247
45248 setcap "= cap_chown=ei" dir/file
45249
45250 # archive whole directory including binary xattrs
45251 tar --xattrs -cf archive.tar dir
45252
45253 # clear the directory
45254 rm -rf dir
45255
45256 # restore _all_ xattrs (not just the user.* domain)
45257 tar --xattrs --xattrs-include='*' -xf archive.tar
45258
45259 getcap dir/file
45260 )
45261 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45262 at_status=$? at_failed=false
45263 $at_check_filter
45264 at_fn_diff_devnull "$at_stderr" || at_failed=:
45265 echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei
45266 " | \
45267   $at_diff - "$at_stdout" || at_failed=:
45268 at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28"
45269 $at_failed && at_fn_log_failure
45270 $at_traceon; }
45271
45272
45273
45274
45275   set +x
45276   $at_times_p && times >"$at_times_file"
45277 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45278 read at_status <"$at_status_file"
45279 #AT_STOP_178
45280 #AT_START_179
45281 at_fn_group_banner 179 'onetop01.at:21' \
45282   "tar --one-top-level" "                            " 26
45283 at_xfail=no
45284       test -f $XFAILFILE && at_xfail=yes
45285 (
45286   $as_echo "179. $at_setup_line: testing $at_desc ..."
45287   $at_traceon
45288
45289
45290
45291
45292
45293   { set +x
45294 $as_echo "$at_srcdir/onetop01.at:24:
45295 mkdir v7
45296 (cd v7
45297 TEST_TAR_FORMAT=v7
45298 export TEST_TAR_FORMAT
45299 TAR_OPTIONS=\"-H v7\"
45300 export TAR_OPTIONS
45301 rm -rf *
45302
45303
45304 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45305
45306 mkdir a
45307 genfile --file a/b
45308 genfile --file c
45309 tar cf a.tar a c
45310 mkdir out
45311 cd out
45312 tar --one-top-level -x -f ../a.tar
45313 find . | sort
45314 )"
45315 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
45316 ( $at_check_trace;
45317 mkdir v7
45318 (cd v7
45319 TEST_TAR_FORMAT=v7
45320 export TEST_TAR_FORMAT
45321 TAR_OPTIONS="-H v7"
45322 export TAR_OPTIONS
45323 rm -rf *
45324
45325
45326 test -z "`sort < /dev/null 2>&1`" || exit 77
45327
45328 mkdir a
45329 genfile --file a/b
45330 genfile --file c
45331 tar cf a.tar a c
45332 mkdir out
45333 cd out
45334 tar --one-top-level -x -f ../a.tar
45335 find . | sort
45336 )
45337 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45338 at_status=$? at_failed=false
45339 $at_check_filter
45340 at_fn_diff_devnull "$at_stderr" || at_failed=:
45341 echo >>"$at_stdout"; $as_echo ".
45342 ./a
45343 ./a/b
45344 ./a/c
45345 " | \
45346   $at_diff - "$at_stdout" || at_failed=:
45347 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
45348 $at_failed && at_fn_log_failure
45349 $at_traceon; }
45350
45351               { set +x
45352 $as_echo "$at_srcdir/onetop01.at:24:
45353 mkdir oldgnu
45354 (cd oldgnu
45355 TEST_TAR_FORMAT=oldgnu
45356 export TEST_TAR_FORMAT
45357 TAR_OPTIONS=\"-H oldgnu\"
45358 export TAR_OPTIONS
45359 rm -rf *
45360
45361
45362 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45363
45364 mkdir a
45365 genfile --file a/b
45366 genfile --file c
45367 tar cf a.tar a c
45368 mkdir out
45369 cd out
45370 tar --one-top-level -x -f ../a.tar
45371 find . | sort
45372 )"
45373 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
45374 ( $at_check_trace;
45375 mkdir oldgnu
45376 (cd oldgnu
45377 TEST_TAR_FORMAT=oldgnu
45378 export TEST_TAR_FORMAT
45379 TAR_OPTIONS="-H oldgnu"
45380 export TAR_OPTIONS
45381 rm -rf *
45382
45383
45384 test -z "`sort < /dev/null 2>&1`" || exit 77
45385
45386 mkdir a
45387 genfile --file a/b
45388 genfile --file c
45389 tar cf a.tar a c
45390 mkdir out
45391 cd out
45392 tar --one-top-level -x -f ../a.tar
45393 find . | sort
45394 )
45395 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45396 at_status=$? at_failed=false
45397 $at_check_filter
45398 at_fn_diff_devnull "$at_stderr" || at_failed=:
45399 echo >>"$at_stdout"; $as_echo ".
45400 ./a
45401 ./a/b
45402 ./a/c
45403 " | \
45404   $at_diff - "$at_stdout" || at_failed=:
45405 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
45406 $at_failed && at_fn_log_failure
45407 $at_traceon; }
45408
45409               { set +x
45410 $as_echo "$at_srcdir/onetop01.at:24:
45411 mkdir ustar
45412 (cd ustar
45413 TEST_TAR_FORMAT=ustar
45414 export TEST_TAR_FORMAT
45415 TAR_OPTIONS=\"-H ustar\"
45416 export TAR_OPTIONS
45417 rm -rf *
45418
45419
45420 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45421
45422 mkdir a
45423 genfile --file a/b
45424 genfile --file c
45425 tar cf a.tar a c
45426 mkdir out
45427 cd out
45428 tar --one-top-level -x -f ../a.tar
45429 find . | sort
45430 )"
45431 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
45432 ( $at_check_trace;
45433 mkdir ustar
45434 (cd ustar
45435 TEST_TAR_FORMAT=ustar
45436 export TEST_TAR_FORMAT
45437 TAR_OPTIONS="-H ustar"
45438 export TAR_OPTIONS
45439 rm -rf *
45440
45441
45442 test -z "`sort < /dev/null 2>&1`" || exit 77
45443
45444 mkdir a
45445 genfile --file a/b
45446 genfile --file c
45447 tar cf a.tar a c
45448 mkdir out
45449 cd out
45450 tar --one-top-level -x -f ../a.tar
45451 find . | sort
45452 )
45453 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45454 at_status=$? at_failed=false
45455 $at_check_filter
45456 at_fn_diff_devnull "$at_stderr" || at_failed=:
45457 echo >>"$at_stdout"; $as_echo ".
45458 ./a
45459 ./a/b
45460 ./a/c
45461 " | \
45462   $at_diff - "$at_stdout" || at_failed=:
45463 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
45464 $at_failed && at_fn_log_failure
45465 $at_traceon; }
45466
45467               { set +x
45468 $as_echo "$at_srcdir/onetop01.at:24:
45469 mkdir posix
45470 (cd posix
45471 TEST_TAR_FORMAT=posix
45472 export TEST_TAR_FORMAT
45473 TAR_OPTIONS=\"-H posix\"
45474 export TAR_OPTIONS
45475 rm -rf *
45476
45477
45478 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45479
45480 mkdir a
45481 genfile --file a/b
45482 genfile --file c
45483 tar cf a.tar a c
45484 mkdir out
45485 cd out
45486 tar --one-top-level -x -f ../a.tar
45487 find . | sort
45488 )"
45489 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
45490 ( $at_check_trace;
45491 mkdir posix
45492 (cd posix
45493 TEST_TAR_FORMAT=posix
45494 export TEST_TAR_FORMAT
45495 TAR_OPTIONS="-H posix"
45496 export TAR_OPTIONS
45497 rm -rf *
45498
45499
45500 test -z "`sort < /dev/null 2>&1`" || exit 77
45501
45502 mkdir a
45503 genfile --file a/b
45504 genfile --file c
45505 tar cf a.tar a c
45506 mkdir out
45507 cd out
45508 tar --one-top-level -x -f ../a.tar
45509 find . | sort
45510 )
45511 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45512 at_status=$? at_failed=false
45513 $at_check_filter
45514 at_fn_diff_devnull "$at_stderr" || at_failed=:
45515 echo >>"$at_stdout"; $as_echo ".
45516 ./a
45517 ./a/b
45518 ./a/c
45519 " | \
45520   $at_diff - "$at_stdout" || at_failed=:
45521 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
45522 $at_failed && at_fn_log_failure
45523 $at_traceon; }
45524
45525               { set +x
45526 $as_echo "$at_srcdir/onetop01.at:24:
45527 mkdir gnu
45528 (cd gnu
45529 TEST_TAR_FORMAT=gnu
45530 export TEST_TAR_FORMAT
45531 TAR_OPTIONS=\"-H gnu\"
45532 export TAR_OPTIONS
45533 rm -rf *
45534
45535
45536 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45537
45538 mkdir a
45539 genfile --file a/b
45540 genfile --file c
45541 tar cf a.tar a c
45542 mkdir out
45543 cd out
45544 tar --one-top-level -x -f ../a.tar
45545 find . | sort
45546 )"
45547 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24"
45548 ( $at_check_trace;
45549 mkdir gnu
45550 (cd gnu
45551 TEST_TAR_FORMAT=gnu
45552 export TEST_TAR_FORMAT
45553 TAR_OPTIONS="-H gnu"
45554 export TAR_OPTIONS
45555 rm -rf *
45556
45557
45558 test -z "`sort < /dev/null 2>&1`" || exit 77
45559
45560 mkdir a
45561 genfile --file a/b
45562 genfile --file c
45563 tar cf a.tar a c
45564 mkdir out
45565 cd out
45566 tar --one-top-level -x -f ../a.tar
45567 find . | sort
45568 )
45569 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45570 at_status=$? at_failed=false
45571 $at_check_filter
45572 at_fn_diff_devnull "$at_stderr" || at_failed=:
45573 echo >>"$at_stdout"; $as_echo ".
45574 ./a
45575 ./a/b
45576 ./a/c
45577 " | \
45578   $at_diff - "$at_stdout" || at_failed=:
45579 at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24"
45580 $at_failed && at_fn_log_failure
45581 $at_traceon; }
45582
45583
45584
45585
45586   set +x
45587   $at_times_p && times >"$at_times_file"
45588 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45589 read at_status <"$at_status_file"
45590 #AT_STOP_179
45591 #AT_START_180
45592 at_fn_group_banner 180 'onetop02.at:21' \
45593   "tar --one-top-level --show-transformed" "         " 26
45594 at_xfail=no
45595       test -f $XFAILFILE && at_xfail=yes
45596 (
45597   $as_echo "180. $at_setup_line: testing $at_desc ..."
45598   $at_traceon
45599
45600
45601
45602
45603
45604   { set +x
45605 $as_echo "$at_srcdir/onetop02.at:24:
45606 mkdir v7
45607 (cd v7
45608 TEST_TAR_FORMAT=v7
45609 export TEST_TAR_FORMAT
45610 TAR_OPTIONS=\"-H v7\"
45611 export TAR_OPTIONS
45612 rm -rf *
45613
45614
45615 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45616
45617 mkdir a
45618 genfile --file a/b
45619 genfile --file c
45620 tar cf a.tar a c
45621 mkdir out
45622 cd out
45623 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45624 find . | sort
45625 )"
45626 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
45627 ( $at_check_trace;
45628 mkdir v7
45629 (cd v7
45630 TEST_TAR_FORMAT=v7
45631 export TEST_TAR_FORMAT
45632 TAR_OPTIONS="-H v7"
45633 export TAR_OPTIONS
45634 rm -rf *
45635
45636
45637 test -z "`sort < /dev/null 2>&1`" || exit 77
45638
45639 mkdir a
45640 genfile --file a/b
45641 genfile --file c
45642 tar cf a.tar a c
45643 mkdir out
45644 cd out
45645 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45646 find . | sort
45647 )
45648 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45649 at_status=$? at_failed=false
45650 $at_check_filter
45651 at_fn_diff_devnull "$at_stderr" || at_failed=:
45652 echo >>"$at_stdout"; $as_echo "a/
45653 a/b
45654 a/c
45655 .
45656 ./a
45657 ./a/b
45658 ./a/c
45659 " | \
45660   $at_diff - "$at_stdout" || at_failed=:
45661 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
45662 $at_failed && at_fn_log_failure
45663 $at_traceon; }
45664
45665               { set +x
45666 $as_echo "$at_srcdir/onetop02.at:24:
45667 mkdir oldgnu
45668 (cd oldgnu
45669 TEST_TAR_FORMAT=oldgnu
45670 export TEST_TAR_FORMAT
45671 TAR_OPTIONS=\"-H oldgnu\"
45672 export TAR_OPTIONS
45673 rm -rf *
45674
45675
45676 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45677
45678 mkdir a
45679 genfile --file a/b
45680 genfile --file c
45681 tar cf a.tar a c
45682 mkdir out
45683 cd out
45684 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45685 find . | sort
45686 )"
45687 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
45688 ( $at_check_trace;
45689 mkdir oldgnu
45690 (cd oldgnu
45691 TEST_TAR_FORMAT=oldgnu
45692 export TEST_TAR_FORMAT
45693 TAR_OPTIONS="-H oldgnu"
45694 export TAR_OPTIONS
45695 rm -rf *
45696
45697
45698 test -z "`sort < /dev/null 2>&1`" || exit 77
45699
45700 mkdir a
45701 genfile --file a/b
45702 genfile --file c
45703 tar cf a.tar a c
45704 mkdir out
45705 cd out
45706 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45707 find . | sort
45708 )
45709 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45710 at_status=$? at_failed=false
45711 $at_check_filter
45712 at_fn_diff_devnull "$at_stderr" || at_failed=:
45713 echo >>"$at_stdout"; $as_echo "a/
45714 a/b
45715 a/c
45716 .
45717 ./a
45718 ./a/b
45719 ./a/c
45720 " | \
45721   $at_diff - "$at_stdout" || at_failed=:
45722 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
45723 $at_failed && at_fn_log_failure
45724 $at_traceon; }
45725
45726               { set +x
45727 $as_echo "$at_srcdir/onetop02.at:24:
45728 mkdir ustar
45729 (cd ustar
45730 TEST_TAR_FORMAT=ustar
45731 export TEST_TAR_FORMAT
45732 TAR_OPTIONS=\"-H ustar\"
45733 export TAR_OPTIONS
45734 rm -rf *
45735
45736
45737 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45738
45739 mkdir a
45740 genfile --file a/b
45741 genfile --file c
45742 tar cf a.tar a c
45743 mkdir out
45744 cd out
45745 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45746 find . | sort
45747 )"
45748 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
45749 ( $at_check_trace;
45750 mkdir ustar
45751 (cd ustar
45752 TEST_TAR_FORMAT=ustar
45753 export TEST_TAR_FORMAT
45754 TAR_OPTIONS="-H ustar"
45755 export TAR_OPTIONS
45756 rm -rf *
45757
45758
45759 test -z "`sort < /dev/null 2>&1`" || exit 77
45760
45761 mkdir a
45762 genfile --file a/b
45763 genfile --file c
45764 tar cf a.tar a c
45765 mkdir out
45766 cd out
45767 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45768 find . | sort
45769 )
45770 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45771 at_status=$? at_failed=false
45772 $at_check_filter
45773 at_fn_diff_devnull "$at_stderr" || at_failed=:
45774 echo >>"$at_stdout"; $as_echo "a/
45775 a/b
45776 a/c
45777 .
45778 ./a
45779 ./a/b
45780 ./a/c
45781 " | \
45782   $at_diff - "$at_stdout" || at_failed=:
45783 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
45784 $at_failed && at_fn_log_failure
45785 $at_traceon; }
45786
45787               { set +x
45788 $as_echo "$at_srcdir/onetop02.at:24:
45789 mkdir posix
45790 (cd posix
45791 TEST_TAR_FORMAT=posix
45792 export TEST_TAR_FORMAT
45793 TAR_OPTIONS=\"-H posix\"
45794 export TAR_OPTIONS
45795 rm -rf *
45796
45797
45798 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45799
45800 mkdir a
45801 genfile --file a/b
45802 genfile --file c
45803 tar cf a.tar a c
45804 mkdir out
45805 cd out
45806 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45807 find . | sort
45808 )"
45809 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
45810 ( $at_check_trace;
45811 mkdir posix
45812 (cd posix
45813 TEST_TAR_FORMAT=posix
45814 export TEST_TAR_FORMAT
45815 TAR_OPTIONS="-H posix"
45816 export TAR_OPTIONS
45817 rm -rf *
45818
45819
45820 test -z "`sort < /dev/null 2>&1`" || exit 77
45821
45822 mkdir a
45823 genfile --file a/b
45824 genfile --file c
45825 tar cf a.tar a c
45826 mkdir out
45827 cd out
45828 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45829 find . | sort
45830 )
45831 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45832 at_status=$? at_failed=false
45833 $at_check_filter
45834 at_fn_diff_devnull "$at_stderr" || at_failed=:
45835 echo >>"$at_stdout"; $as_echo "a/
45836 a/b
45837 a/c
45838 .
45839 ./a
45840 ./a/b
45841 ./a/c
45842 " | \
45843   $at_diff - "$at_stdout" || at_failed=:
45844 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
45845 $at_failed && at_fn_log_failure
45846 $at_traceon; }
45847
45848               { set +x
45849 $as_echo "$at_srcdir/onetop02.at:24:
45850 mkdir gnu
45851 (cd gnu
45852 TEST_TAR_FORMAT=gnu
45853 export TEST_TAR_FORMAT
45854 TAR_OPTIONS=\"-H gnu\"
45855 export TAR_OPTIONS
45856 rm -rf *
45857
45858
45859 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45860
45861 mkdir a
45862 genfile --file a/b
45863 genfile --file c
45864 tar cf a.tar a c
45865 mkdir out
45866 cd out
45867 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45868 find . | sort
45869 )"
45870 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24"
45871 ( $at_check_trace;
45872 mkdir gnu
45873 (cd gnu
45874 TEST_TAR_FORMAT=gnu
45875 export TEST_TAR_FORMAT
45876 TAR_OPTIONS="-H gnu"
45877 export TAR_OPTIONS
45878 rm -rf *
45879
45880
45881 test -z "`sort < /dev/null 2>&1`" || exit 77
45882
45883 mkdir a
45884 genfile --file a/b
45885 genfile --file c
45886 tar cf a.tar a c
45887 mkdir out
45888 cd out
45889 tar --one-top-level --show-transformed  -v -x -f ../a.tar
45890 find . | sort
45891 )
45892 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45893 at_status=$? at_failed=false
45894 $at_check_filter
45895 at_fn_diff_devnull "$at_stderr" || at_failed=:
45896 echo >>"$at_stdout"; $as_echo "a/
45897 a/b
45898 a/c
45899 .
45900 ./a
45901 ./a/b
45902 ./a/c
45903 " | \
45904   $at_diff - "$at_stdout" || at_failed=:
45905 at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24"
45906 $at_failed && at_fn_log_failure
45907 $at_traceon; }
45908
45909
45910
45911
45912   set +x
45913   $at_times_p && times >"$at_times_file"
45914 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
45915 read at_status <"$at_status_file"
45916 #AT_STOP_180
45917 #AT_START_181
45918 at_fn_group_banner 181 'onetop03.at:21' \
45919   "tar --one-top-level --transform" "                " 26
45920 at_xfail=no
45921       test -f $XFAILFILE && at_xfail=yes
45922 (
45923   $as_echo "181. $at_setup_line: testing $at_desc ..."
45924   $at_traceon
45925
45926
45927
45928
45929
45930   { set +x
45931 $as_echo "$at_srcdir/onetop03.at:24:
45932 mkdir v7
45933 (cd v7
45934 TEST_TAR_FORMAT=v7
45935 export TEST_TAR_FORMAT
45936 TAR_OPTIONS=\"-H v7\"
45937 export TAR_OPTIONS
45938 rm -rf *
45939
45940
45941 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
45942
45943 mkdir a
45944 genfile --file a/b
45945 genfile --file c
45946 tar cf a.tar a c
45947 mkdir out
45948 cd out
45949 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
45950 find . | sort
45951 )"
45952 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
45953 ( $at_check_trace;
45954 mkdir v7
45955 (cd v7
45956 TEST_TAR_FORMAT=v7
45957 export TEST_TAR_FORMAT
45958 TAR_OPTIONS="-H v7"
45959 export TAR_OPTIONS
45960 rm -rf *
45961
45962
45963 test -z "`sort < /dev/null 2>&1`" || exit 77
45964
45965 mkdir a
45966 genfile --file a/b
45967 genfile --file c
45968 tar cf a.tar a c
45969 mkdir out
45970 cd out
45971 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
45972 find . | sort
45973 )
45974 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
45975 at_status=$? at_failed=false
45976 $at_check_filter
45977 at_fn_diff_devnull "$at_stderr" || at_failed=:
45978 echo >>"$at_stdout"; $as_echo ".
45979 ./a
45980 ./a/b
45981 ./a/d
45982 " | \
45983   $at_diff - "$at_stdout" || at_failed=:
45984 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
45985 $at_failed && at_fn_log_failure
45986 $at_traceon; }
45987
45988               { set +x
45989 $as_echo "$at_srcdir/onetop03.at:24:
45990 mkdir oldgnu
45991 (cd oldgnu
45992 TEST_TAR_FORMAT=oldgnu
45993 export TEST_TAR_FORMAT
45994 TAR_OPTIONS=\"-H oldgnu\"
45995 export TAR_OPTIONS
45996 rm -rf *
45997
45998
45999 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46000
46001 mkdir a
46002 genfile --file a/b
46003 genfile --file c
46004 tar cf a.tar a c
46005 mkdir out
46006 cd out
46007 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
46008 find . | sort
46009 )"
46010 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
46011 ( $at_check_trace;
46012 mkdir oldgnu
46013 (cd oldgnu
46014 TEST_TAR_FORMAT=oldgnu
46015 export TEST_TAR_FORMAT
46016 TAR_OPTIONS="-H oldgnu"
46017 export TAR_OPTIONS
46018 rm -rf *
46019
46020
46021 test -z "`sort < /dev/null 2>&1`" || exit 77
46022
46023 mkdir a
46024 genfile --file a/b
46025 genfile --file c
46026 tar cf a.tar a c
46027 mkdir out
46028 cd out
46029 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
46030 find . | sort
46031 )
46032 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46033 at_status=$? at_failed=false
46034 $at_check_filter
46035 at_fn_diff_devnull "$at_stderr" || at_failed=:
46036 echo >>"$at_stdout"; $as_echo ".
46037 ./a
46038 ./a/b
46039 ./a/d
46040 " | \
46041   $at_diff - "$at_stdout" || at_failed=:
46042 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
46043 $at_failed && at_fn_log_failure
46044 $at_traceon; }
46045
46046               { set +x
46047 $as_echo "$at_srcdir/onetop03.at:24:
46048 mkdir ustar
46049 (cd ustar
46050 TEST_TAR_FORMAT=ustar
46051 export TEST_TAR_FORMAT
46052 TAR_OPTIONS=\"-H ustar\"
46053 export TAR_OPTIONS
46054 rm -rf *
46055
46056
46057 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46058
46059 mkdir a
46060 genfile --file a/b
46061 genfile --file c
46062 tar cf a.tar a c
46063 mkdir out
46064 cd out
46065 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
46066 find . | sort
46067 )"
46068 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
46069 ( $at_check_trace;
46070 mkdir ustar
46071 (cd ustar
46072 TEST_TAR_FORMAT=ustar
46073 export TEST_TAR_FORMAT
46074 TAR_OPTIONS="-H ustar"
46075 export TAR_OPTIONS
46076 rm -rf *
46077
46078
46079 test -z "`sort < /dev/null 2>&1`" || exit 77
46080
46081 mkdir a
46082 genfile --file a/b
46083 genfile --file c
46084 tar cf a.tar a c
46085 mkdir out
46086 cd out
46087 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
46088 find . | sort
46089 )
46090 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46091 at_status=$? at_failed=false
46092 $at_check_filter
46093 at_fn_diff_devnull "$at_stderr" || at_failed=:
46094 echo >>"$at_stdout"; $as_echo ".
46095 ./a
46096 ./a/b
46097 ./a/d
46098 " | \
46099   $at_diff - "$at_stdout" || at_failed=:
46100 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
46101 $at_failed && at_fn_log_failure
46102 $at_traceon; }
46103
46104               { set +x
46105 $as_echo "$at_srcdir/onetop03.at:24:
46106 mkdir posix
46107 (cd posix
46108 TEST_TAR_FORMAT=posix
46109 export TEST_TAR_FORMAT
46110 TAR_OPTIONS=\"-H posix\"
46111 export TAR_OPTIONS
46112 rm -rf *
46113
46114
46115 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46116
46117 mkdir a
46118 genfile --file a/b
46119 genfile --file c
46120 tar cf a.tar a c
46121 mkdir out
46122 cd out
46123 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
46124 find . | sort
46125 )"
46126 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
46127 ( $at_check_trace;
46128 mkdir posix
46129 (cd posix
46130 TEST_TAR_FORMAT=posix
46131 export TEST_TAR_FORMAT
46132 TAR_OPTIONS="-H posix"
46133 export TAR_OPTIONS
46134 rm -rf *
46135
46136
46137 test -z "`sort < /dev/null 2>&1`" || exit 77
46138
46139 mkdir a
46140 genfile --file a/b
46141 genfile --file c
46142 tar cf a.tar a c
46143 mkdir out
46144 cd out
46145 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
46146 find . | sort
46147 )
46148 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46149 at_status=$? at_failed=false
46150 $at_check_filter
46151 at_fn_diff_devnull "$at_stderr" || at_failed=:
46152 echo >>"$at_stdout"; $as_echo ".
46153 ./a
46154 ./a/b
46155 ./a/d
46156 " | \
46157   $at_diff - "$at_stdout" || at_failed=:
46158 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
46159 $at_failed && at_fn_log_failure
46160 $at_traceon; }
46161
46162               { set +x
46163 $as_echo "$at_srcdir/onetop03.at:24:
46164 mkdir gnu
46165 (cd gnu
46166 TEST_TAR_FORMAT=gnu
46167 export TEST_TAR_FORMAT
46168 TAR_OPTIONS=\"-H gnu\"
46169 export TAR_OPTIONS
46170 rm -rf *
46171
46172
46173 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46174
46175 mkdir a
46176 genfile --file a/b
46177 genfile --file c
46178 tar cf a.tar a c
46179 mkdir out
46180 cd out
46181 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
46182 find . | sort
46183 )"
46184 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24"
46185 ( $at_check_trace;
46186 mkdir gnu
46187 (cd gnu
46188 TEST_TAR_FORMAT=gnu
46189 export TEST_TAR_FORMAT
46190 TAR_OPTIONS="-H gnu"
46191 export TAR_OPTIONS
46192 rm -rf *
46193
46194
46195 test -z "`sort < /dev/null 2>&1`" || exit 77
46196
46197 mkdir a
46198 genfile --file a/b
46199 genfile --file c
46200 tar cf a.tar a c
46201 mkdir out
46202 cd out
46203 tar --one-top-level --transform 's/c/d/' -x -f ../a.tar
46204 find . | sort
46205 )
46206 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46207 at_status=$? at_failed=false
46208 $at_check_filter
46209 at_fn_diff_devnull "$at_stderr" || at_failed=:
46210 echo >>"$at_stdout"; $as_echo ".
46211 ./a
46212 ./a/b
46213 ./a/d
46214 " | \
46215   $at_diff - "$at_stdout" || at_failed=:
46216 at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24"
46217 $at_failed && at_fn_log_failure
46218 $at_traceon; }
46219
46220
46221
46222
46223   set +x
46224   $at_times_p && times >"$at_times_file"
46225 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46226 read at_status <"$at_status_file"
46227 #AT_STOP_181
46228 #AT_START_182
46229 at_fn_group_banner 182 'onetop04.at:21' \
46230   "tar --one-top-level --transform" "                " 26
46231 at_xfail=no
46232       test -f $XFAILFILE && at_xfail=yes
46233 (
46234   $as_echo "182. $at_setup_line: testing $at_desc ..."
46235   $at_traceon
46236
46237
46238
46239
46240
46241   { set +x
46242 $as_echo "$at_srcdir/onetop04.at:24:
46243 mkdir v7
46244 (cd v7
46245 TEST_TAR_FORMAT=v7
46246 export TEST_TAR_FORMAT
46247 TAR_OPTIONS=\"-H v7\"
46248 export TAR_OPTIONS
46249 rm -rf *
46250
46251
46252 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46253
46254 mkdir a
46255 genfile --file a/b
46256 genfile --file c
46257 tar cf a.tar a c
46258 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46259 )"
46260 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
46261 ( $at_check_trace;
46262 mkdir v7
46263 (cd v7
46264 TEST_TAR_FORMAT=v7
46265 export TEST_TAR_FORMAT
46266 TAR_OPTIONS="-H v7"
46267 export TAR_OPTIONS
46268 rm -rf *
46269
46270
46271 test -z "`sort < /dev/null 2>&1`" || exit 77
46272
46273 mkdir a
46274 genfile --file a/b
46275 genfile --file c
46276 tar cf a.tar a c
46277 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46278 )
46279 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46280 at_status=$? at_failed=false
46281 $at_check_filter
46282 at_fn_diff_devnull "$at_stderr" || at_failed=:
46283 echo >>"$at_stdout"; $as_echo "a/
46284 a/b
46285 a/d
46286 " | \
46287   $at_diff - "$at_stdout" || at_failed=:
46288 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
46289 $at_failed && at_fn_log_failure
46290 $at_traceon; }
46291
46292               { set +x
46293 $as_echo "$at_srcdir/onetop04.at:24:
46294 mkdir oldgnu
46295 (cd oldgnu
46296 TEST_TAR_FORMAT=oldgnu
46297 export TEST_TAR_FORMAT
46298 TAR_OPTIONS=\"-H oldgnu\"
46299 export TAR_OPTIONS
46300 rm -rf *
46301
46302
46303 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46304
46305 mkdir a
46306 genfile --file a/b
46307 genfile --file c
46308 tar cf a.tar a c
46309 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46310 )"
46311 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
46312 ( $at_check_trace;
46313 mkdir oldgnu
46314 (cd oldgnu
46315 TEST_TAR_FORMAT=oldgnu
46316 export TEST_TAR_FORMAT
46317 TAR_OPTIONS="-H oldgnu"
46318 export TAR_OPTIONS
46319 rm -rf *
46320
46321
46322 test -z "`sort < /dev/null 2>&1`" || exit 77
46323
46324 mkdir a
46325 genfile --file a/b
46326 genfile --file c
46327 tar cf a.tar a c
46328 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46329 )
46330 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46331 at_status=$? at_failed=false
46332 $at_check_filter
46333 at_fn_diff_devnull "$at_stderr" || at_failed=:
46334 echo >>"$at_stdout"; $as_echo "a/
46335 a/b
46336 a/d
46337 " | \
46338   $at_diff - "$at_stdout" || at_failed=:
46339 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
46340 $at_failed && at_fn_log_failure
46341 $at_traceon; }
46342
46343               { set +x
46344 $as_echo "$at_srcdir/onetop04.at:24:
46345 mkdir ustar
46346 (cd ustar
46347 TEST_TAR_FORMAT=ustar
46348 export TEST_TAR_FORMAT
46349 TAR_OPTIONS=\"-H ustar\"
46350 export TAR_OPTIONS
46351 rm -rf *
46352
46353
46354 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46355
46356 mkdir a
46357 genfile --file a/b
46358 genfile --file c
46359 tar cf a.tar a c
46360 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46361 )"
46362 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
46363 ( $at_check_trace;
46364 mkdir ustar
46365 (cd ustar
46366 TEST_TAR_FORMAT=ustar
46367 export TEST_TAR_FORMAT
46368 TAR_OPTIONS="-H ustar"
46369 export TAR_OPTIONS
46370 rm -rf *
46371
46372
46373 test -z "`sort < /dev/null 2>&1`" || exit 77
46374
46375 mkdir a
46376 genfile --file a/b
46377 genfile --file c
46378 tar cf a.tar a c
46379 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46380 )
46381 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46382 at_status=$? at_failed=false
46383 $at_check_filter
46384 at_fn_diff_devnull "$at_stderr" || at_failed=:
46385 echo >>"$at_stdout"; $as_echo "a/
46386 a/b
46387 a/d
46388 " | \
46389   $at_diff - "$at_stdout" || at_failed=:
46390 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
46391 $at_failed && at_fn_log_failure
46392 $at_traceon; }
46393
46394               { set +x
46395 $as_echo "$at_srcdir/onetop04.at:24:
46396 mkdir posix
46397 (cd posix
46398 TEST_TAR_FORMAT=posix
46399 export TEST_TAR_FORMAT
46400 TAR_OPTIONS=\"-H posix\"
46401 export TAR_OPTIONS
46402 rm -rf *
46403
46404
46405 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46406
46407 mkdir a
46408 genfile --file a/b
46409 genfile --file c
46410 tar cf a.tar a c
46411 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46412 )"
46413 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
46414 ( $at_check_trace;
46415 mkdir posix
46416 (cd posix
46417 TEST_TAR_FORMAT=posix
46418 export TEST_TAR_FORMAT
46419 TAR_OPTIONS="-H posix"
46420 export TAR_OPTIONS
46421 rm -rf *
46422
46423
46424 test -z "`sort < /dev/null 2>&1`" || exit 77
46425
46426 mkdir a
46427 genfile --file a/b
46428 genfile --file c
46429 tar cf a.tar a c
46430 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46431 )
46432 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46433 at_status=$? at_failed=false
46434 $at_check_filter
46435 at_fn_diff_devnull "$at_stderr" || at_failed=:
46436 echo >>"$at_stdout"; $as_echo "a/
46437 a/b
46438 a/d
46439 " | \
46440   $at_diff - "$at_stdout" || at_failed=:
46441 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
46442 $at_failed && at_fn_log_failure
46443 $at_traceon; }
46444
46445               { set +x
46446 $as_echo "$at_srcdir/onetop04.at:24:
46447 mkdir gnu
46448 (cd gnu
46449 TEST_TAR_FORMAT=gnu
46450 export TEST_TAR_FORMAT
46451 TAR_OPTIONS=\"-H gnu\"
46452 export TAR_OPTIONS
46453 rm -rf *
46454
46455
46456 test -z \"\`sort < /dev/null 2>&1\`\" || exit 77
46457
46458 mkdir a
46459 genfile --file a/b
46460 genfile --file c
46461 tar cf a.tar a c
46462 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46463 )"
46464 at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24"
46465 ( $at_check_trace;
46466 mkdir gnu
46467 (cd gnu
46468 TEST_TAR_FORMAT=gnu
46469 export TEST_TAR_FORMAT
46470 TAR_OPTIONS="-H gnu"
46471 export TAR_OPTIONS
46472 rm -rf *
46473
46474
46475 test -z "`sort < /dev/null 2>&1`" || exit 77
46476
46477 mkdir a
46478 genfile --file a/b
46479 genfile --file c
46480 tar cf a.tar a c
46481 tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort
46482 )
46483 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46484 at_status=$? at_failed=false
46485 $at_check_filter
46486 at_fn_diff_devnull "$at_stderr" || at_failed=:
46487 echo >>"$at_stdout"; $as_echo "a/
46488 a/b
46489 a/d
46490 " | \
46491   $at_diff - "$at_stdout" || at_failed=:
46492 at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24"
46493 $at_failed && at_fn_log_failure
46494 $at_traceon; }
46495
46496
46497
46498
46499   set +x
46500   $at_times_p && times >"$at_times_file"
46501 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46502 read at_status <"$at_status_file"
46503 #AT_STOP_182
46504 #AT_START_183
46505 at_fn_group_banner 183 'gtarfail.at:21' \
46506   "gtarfail" "                                       " 27
46507 at_xfail=no
46508 (
46509   $as_echo "183. $at_setup_line: testing $at_desc ..."
46510   $at_traceon
46511
46512
46513
46514 unset TAR_OPTIONS
46515
46516 { set +x
46517 $as_echo "$at_srcdir/gtarfail.at:26:
46518
46519 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
46520 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
46521
46522
46523 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail.tar
46524 "
46525 at_fn_check_prepare_notrace 'an embedded newline' "gtarfail.at:26"
46526 ( $at_check_trace;
46527
46528 test -z "$STAR_TESTSCRIPTS" && exit 77
46529 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
46530
46531
46532 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
46533
46534 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46535 at_status=$? at_failed=false
46536 $at_check_filter
46537 at_fn_diff_devnull "$at_stderr" || at_failed=:
46538 echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone       518 2001-05-25 14:41 vedpowered.gif
46539 -rw-r--r-- jes/glone      6825 1997-04-29 00:19 cd.gif
46540 -rw-r--r-- jes/glone     33354 1999-06-22 12:17 DSCN0049c.JPG
46541 -rw-r--r-- jes/glone     86159 2001-06-05 18:16 Window1.jpg
46542 -rw-r--r-- jes/glone      1310 2001-05-25 13:05 vipower.gif
46543 -rw-rw-rw- jes/glone    148753 1998-09-15 13:08 billyboy.jpg
46544 " | \
46545   $at_diff - "$at_stdout" || at_failed=:
46546 at_fn_check_status 0 $at_status "$at_srcdir/gtarfail.at:26"
46547 $at_failed && at_fn_log_failure
46548 $at_traceon; }
46549
46550
46551   set +x
46552   $at_times_p && times >"$at_times_file"
46553 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46554 read at_status <"$at_status_file"
46555 #AT_STOP_183
46556 #AT_START_184
46557 at_fn_group_banner 184 'gtarfail2.at:21' \
46558   "gtarfail2" "                                      " 27
46559 at_xfail=no
46560 (
46561   $as_echo "184. $at_setup_line: testing $at_desc ..."
46562   $at_traceon
46563
46564
46565
46566 unset TAR_OPTIONS
46567
46568 { set +x
46569 $as_echo "$at_srcdir/gtarfail2.at:26:
46570
46571 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
46572 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
46573
46574 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail2.tar
46575 "
46576 at_fn_check_prepare_notrace 'an embedded newline' "gtarfail2.at:26"
46577 ( $at_check_trace;
46578
46579 test -z "$STAR_TESTSCRIPTS" && exit 77
46580 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
46581
46582 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
46583
46584 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46585 at_status=$? at_failed=false
46586 $at_check_filter
46587 at_fn_diff_devnull "$at_stderr" || at_failed=:
46588 echo >>"$at_stdout"; $as_echo "-rwxr-xr-x jes/glone       214 2001-09-21 14:08 .clean
46589 lrwxrwxrwx jes/cats          0 1998-05-07 12:39 RULES -> makefiles/RULES
46590 drwxr-sr-x jes/glone         0 2001-12-10 00:00 build/
46591 -rw-r--r-- jes/glone    312019 2001-12-10 00:00 build/smake-1.2.tar.gz
46592 drwxr-sr-x jes/glone         0 2001-11-09 18:20 build/psmake/
46593 -rwxr-xr-x jes/glone       259 2000-01-09 16:36 build/psmake/MAKE
46594 -rwxr-xr-x jes/glone      4820 2001-02-25 22:45 build/psmake/MAKE.sh
46595 -rw-r--r-- jes/glone       647 2001-02-25 23:50 build/psmake/Makefile
46596 lrwxrwxrwx jes/glone         0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c
46597 lrwxrwxrwx jes/glone         0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c
46598 " | \
46599   $at_diff - "$at_stdout" || at_failed=:
46600 at_fn_check_status 0 $at_status "$at_srcdir/gtarfail2.at:26"
46601 $at_failed && at_fn_log_failure
46602 $at_traceon; }
46603
46604
46605   set +x
46606   $at_times_p && times >"$at_times_file"
46607 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46608 read at_status <"$at_status_file"
46609 #AT_STOP_184
46610 #AT_START_185
46611 at_fn_group_banner 185 'multi-fail.at:21' \
46612   "multi-fail" "                                     " 27
46613 at_xfail=no
46614 (
46615   $as_echo "185. $at_setup_line: testing $at_desc ..."
46616   $at_traceon
46617
46618
46619
46620 unset TAR_OPTIONS
46621
46622 { set +x
46623 $as_echo "$at_srcdir/multi-fail.at:26:
46624
46625 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
46626 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
46627
46628
46629 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
46630 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
46631
46632
46633 tar --utc -tvM -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \\
46634                -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
46635 "
46636 at_fn_check_prepare_notrace 'an embedded newline' "multi-fail.at:26"
46637 ( $at_check_trace;
46638
46639 test -z "$STAR_TESTSCRIPTS" && exit 77
46640 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
46641
46642
46643 test -z "$STAR_TESTSCRIPTS" && exit 77
46644 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
46645
46646
46647 tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
46648                -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
46649
46650 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46651 at_status=$? at_failed=false
46652 $at_check_filter
46653 at_fn_diff_devnull "$at_stderr" || at_failed=:
46654 echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs          0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/
46655 -rw-r--r-- joerg/bs          1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull
46656 -rw-r--r-- joerg/bs       1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d
46657 -rw-r--r-- joerg/bs       1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d
46658 -rw-r--r-- joerg/bs       1540 2003-10-10 18:06 OBJ/i386-sunos5-gcc/cpiohdr.d
46659 -rw-r--r-- joerg/bs       2245 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xheader.d
46660 -rw-r--r-- joerg/bs       1254 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xattr.d
46661 -rw-r--r-- joerg/bs       1330 2003-10-10 18:06 OBJ/i386-sunos5-gcc/list.d
46662 -rw-r--r-- joerg/bs       1745 2003-10-10 18:06 OBJ/i386-sunos5-gcc/extract.d
46663 -rw-r--r-- joerg/bs       1518 2003-10-10 18:06 OBJ/i386-sunos5-gcc/create.d
46664 -rw-r--r-- joerg/bs       1235 2003-10-10 18:06 OBJ/i386-sunos5-gcc/append.d
46665 -rw-r--r-- joerg/bs       1368 2003-10-10 18:06 OBJ/i386-sunos5-gcc/diff.d
46666 -rw-r--r-- joerg/bs       1423 2003-10-10 18:06 OBJ/i386-sunos5-gcc/remove.d
46667 -rw-r--r-- joerg/bs       1493 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.d
46668 -rw-r--r-- joerg/bs       1572 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.d
46669 -rw-r--r-- joerg/bs       1453 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.d
46670 -rw-r--r-- joerg/bs       2257 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.d
46671 -rw-r--r-- joerg/bs        969 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.d
46672 -rw-r--r-- joerg/bs       1308 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.d
46673 -rw-r--r-- joerg/bs       1287 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.d
46674 -rw-r--r-- joerg/bs       1105 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.d
46675 -rw-r--r-- joerg/bs       1230 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.d
46676 -rw-r--r-- joerg/bs       1091 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.d
46677 -rw-r--r-- joerg/bs        961 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.d
46678 -rw-r--r-- joerg/bs       1113 2003-10-10 18:07 OBJ/i386-sunos5-gcc/props.d
46679 -rw-r--r-- joerg/bs       2146 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fetchdir.d
46680 -rw-r--r-- joerg/bs       1093 2003-10-10 18:07 OBJ/i386-sunos5-gcc/unicode.d
46681 -rw-r--r-- joerg/bs       1211 2003-10-10 18:07 OBJ/i386-sunos5-gcc/subst.d
46682 -rw-r--r-- joerg/bs       2076 2003-10-11 11:53 OBJ/i386-sunos5-gcc/volhdr.d
46683 -rw-r--r-- joerg/bs       1480 2003-10-10 18:07 OBJ/i386-sunos5-gcc/chdir.d
46684 -rw-r--r-- joerg/bs      42460 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star.o
46685 -rw-r--r-- joerg/bs      22564 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.o
46686 -rw-r--r-- joerg/bs       7880 2003-10-10 18:07 OBJ/i386-sunos5-gcc/cpiohdr.o
46687 -rw-r--r-- joerg/bs      14624 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xheader.o
46688 -rw-r--r-- joerg/bs        924 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xattr.o
46689 -rw-r--r-- joerg/bs       6120 2003-10-10 18:07 OBJ/i386-sunos5-gcc/list.o
46690 -rw-r--r-- joerg/bs      12764 2003-10-10 18:07 OBJ/i386-sunos5-gcc/extract.o
46691 -rw-r--r-- joerg/bs      14668 2003-10-10 18:07 OBJ/i386-sunos5-gcc/create.o
46692 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/append.o
46693 -rw-r--r-- joerg/bs       7636 2003-10-10 18:07 OBJ/i386-sunos5-gcc/diff.o
46694 -rw-r--r-- joerg/bs       3072 2003-10-10 18:07 OBJ/i386-sunos5-gcc/remove.o
46695 -rw-r--r-- joerg/bs       5612 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.o
46696 -rw-r--r-- joerg/bs       6220 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.o
46697 -rw-r--r-- joerg/bs       1092 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.o
46698 -rw-r--r-- joerg/bs      20996 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.o
46699 -rw-r--r-- joerg/bs       2060 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.o
46700 -rw-r--r-- joerg/bs       1664 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.o
46701 -rw-r--r-- joerg/bs      10564 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.o
46702 -rw-r--r-- joerg/bs       3864 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.o
46703 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o
46704 -rw-r--r-- joerg/bs        952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o
46705 -rw-r--r-- joerg/bs       2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o
46706 " | \
46707   $at_diff - "$at_stdout" || at_failed=:
46708 at_fn_check_status 0 $at_status "$at_srcdir/multi-fail.at:26"
46709 $at_failed && at_fn_log_failure
46710 $at_traceon; }
46711
46712
46713   set +x
46714   $at_times_p && times >"$at_times_file"
46715 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46716 read at_status <"$at_status_file"
46717 #AT_STOP_185
46718 #AT_START_186
46719 at_fn_group_banner 186 'ustar-big-2g.at:21' \
46720   "ustar-big-2g" "                                   " 27
46721 at_xfail=no
46722 (
46723   $as_echo "186. $at_setup_line: testing $at_desc ..."
46724   $at_traceon
46725
46726
46727
46728 unset TAR_OPTIONS
46729
46730 { set +x
46731 $as_echo "$at_srcdir/ustar-big-2g.at:26:
46732
46733 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
46734
46735
46736 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
46737 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
46738
46739
46740 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
46741 "
46742 at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-2g.at:26"
46743 ( $at_check_trace;
46744
46745 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
46746
46747
46748 test -z "$STAR_TESTSCRIPTS" && exit 77
46749 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
46750
46751
46752 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
46753
46754 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46755 at_status=$? at_failed=false
46756 $at_check_filter
46757 echo stderr:; tee stderr <"$at_stderr"
46758 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big
46759 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
46760 " | \
46761   $at_diff - "$at_stdout" || at_failed=:
46762 at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:26"
46763 $at_failed && at_fn_log_failure
46764 $at_traceon; }
46765
46766
46767
46768 cat >stderr.re <<'_ATEOF'
46769 tar: Record size = .*
46770 _ATEOF
46771
46772 awk '{print NR " " $0}' stderr > $$.1
46773 awk '{print NR " " $0}' stderr.re | join - $$.1 |
46774 while read NUM RE LINE
46775 do
46776   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
46777 done
46778
46779
46780   set +x
46781   $at_times_p && times >"$at_times_file"
46782 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46783 read at_status <"$at_status_file"
46784 #AT_STOP_186
46785 #AT_START_187
46786 at_fn_group_banner 187 'ustar-big-8g.at:21' \
46787   "ustar-big-8g" "                                   " 27
46788 at_xfail=no
46789 (
46790   $as_echo "187. $at_setup_line: testing $at_desc ..."
46791   $at_traceon
46792
46793
46794
46795 unset TAR_OPTIONS
46796
46797 { set +x
46798 $as_echo "$at_srcdir/ustar-big-8g.at:26:
46799
46800 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
46801
46802
46803 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
46804 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
46805
46806
46807 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
46808 "
46809 at_fn_check_prepare_notrace 'an embedded newline' "ustar-big-8g.at:26"
46810 ( $at_check_trace;
46811
46812 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
46813
46814
46815 test -z "$STAR_TESTSCRIPTS" && exit 77
46816 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
46817
46818
46819 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
46820
46821 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46822 at_status=$? at_failed=false
46823 $at_check_filter
46824 echo stderr:; tee stderr <"$at_stderr"
46825 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1
46826 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
46827 " | \
46828   $at_diff - "$at_stdout" || at_failed=:
46829 at_fn_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:26"
46830 $at_failed && at_fn_log_failure
46831 $at_traceon; }
46832
46833
46834
46835 cat >stderr.re <<'_ATEOF'
46836 tar: Record size = .*
46837 _ATEOF
46838
46839 awk '{print NR " " $0}' stderr > $$.1
46840 awk '{print NR " " $0}' stderr.re | join - $$.1 |
46841 while read NUM RE LINE
46842 do
46843   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
46844 done
46845
46846
46847   set +x
46848   $at_times_p && times >"$at_times_file"
46849 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46850 read at_status <"$at_status_file"
46851 #AT_STOP_187
46852 #AT_START_188
46853 at_fn_group_banner 188 'pax-big-10g.at:21' \
46854   "pax-big-10g" "                                    " 27
46855 at_xfail=no
46856 (
46857   $as_echo "188. $at_setup_line: testing $at_desc ..."
46858   $at_traceon
46859
46860
46861
46862 unset TAR_OPTIONS
46863
46864 { set +x
46865 $as_echo "$at_srcdir/pax-big-10g.at:26:
46866
46867 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
46868
46869
46870 test -z \"\$STAR_TESTSCRIPTS\" && exit 77
46871 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff \$STAR_TESTSCRIPTS \$STAR_DATA_URL || exit 77
46872
46873
46874 tar --utc -tvjf \$STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
46875 "
46876 at_fn_check_prepare_notrace 'an embedded newline' "pax-big-10g.at:26"
46877 ( $at_check_trace;
46878
46879 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
46880
46881
46882 test -z "$STAR_TESTSCRIPTS" && exit 77
46883 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
46884
46885
46886 tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
46887
46888 ) >>"$at_stdout" 2>>"$at_stderr" 5>&-
46889 at_status=$? at_failed=false
46890 $at_check_filter
46891 echo stderr:; tee stderr <"$at_stderr"
46892 echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g
46893 -rw-r--r-- jes/glone           0 2002-06-15 14:53 file
46894 " | \
46895   $at_diff - "$at_stdout" || at_failed=:
46896 at_fn_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:26"
46897 $at_failed && at_fn_log_failure
46898 $at_traceon; }
46899
46900
46901
46902 cat >stderr.re <<'_ATEOF'
46903 tar: Record size = .*
46904 _ATEOF
46905
46906 awk '{print NR " " $0}' stderr > $$.1
46907 awk '{print NR " " $0}' stderr.re | join - $$.1 |
46908 while read NUM RE LINE
46909 do
46910   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
46911 done
46912
46913
46914   set +x
46915   $at_times_p && times >"$at_times_file"
46916 ) 5>&1 2>&1 7>&- | eval $at_tee_pipe
46917 read at_status <"$at_status_file"
46918 #AT_STOP_188